farstream-0.2.7/0000775000076400007640000000000012462323001010510 500000000000000farstream-0.2.7/farstream.pc.in0000664000076400007640000000057612401500475013362 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/farstream-@FS_APIVERSION@ pluginsdir=@libdir@/farstream-@FS_APIVERSION@ Name: Farstream Description: Farstream base classes and utilities Requires: gstreamer-@GST_API_VERSION@ gstreamer-base-@GST_API_VERSION@ Version: @VERSION@ Libs: -L${libdir} -lfarstream-@FS_APIVERSION@ Cflags: -I${includedir} farstream-0.2.7/missing0000755000076400007640000002370312073410014012031 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.18; # UTC # Copyright (C) 1996-2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, 'missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file 'aclocal.m4' autoconf touch file 'configure' autoheader touch file 'config.h.in' autom4te touch the output file, or create a stub one automake touch all 'Makefile.in' files bison create 'y.tab.[ch]', if possible, from existing .[ch] flex create 'lex.yy.c', if possible, from existing .c help2man touch the output file lex create 'lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create 'y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running '$TOOL --version' or '$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acconfig.h' or '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: '$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get '$1' as part of Autoconf from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: '$1' $msg. You should only need it if you modified a '.y' file. You may need the Bison package in order for those modifications to take effect. You can get Bison from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.l' file. You may need the Flex package in order for those modifications to take effect. You can get Flex from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the Help2man package in order for those modifications to take effect. You can get Help2man from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.texi' or '.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy 'make' (AIX, DU, IRIX). You might want to install the Texinfo package or the GNU make package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: '$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the 'README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing '$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: farstream-0.2.7/autogen.sh0000775000076400007640000000530512401500475012441 00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. DIE=0 package=farstream srcfile=farstream/fs-candidate.c # Make sure we have common if test ! -f common/gst-autogen.sh; then echo "+ Setting up common submodule" git submodule init fi git submodule update # source helper functions if test ! -f common/gst-autogen.sh; then echo There is something wrong with your source tree. echo You are missing common/gst-autogen.sh exit 1 fi . common/gst-autogen.sh CONFIGURE_DEF_OPT='--enable-gtk-doc --enable-introspection' autogen_options $@ echo -n "+ check for build tools" if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi version_check "autoconf" "$AUTOCONF autoconf autoconf259 autoconf257 autoconf-2.54 autoconf-2.53 autoconf253 autoconf-2.52 autoconf252" \ "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1 version_check "automake" "$AUTOMAKE automake automake-1.9 automake19 automake-1.8 automake18 automake-1.7 automake17 automake-1.6 automake16" \ "ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE=1 version_check "libtoolize" "libtoolize libtoolize15 glibtoolize" \ "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1 version_check "pkg-config" "" \ "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1 die_check $DIE aclocal_check || DIE=1 autoheader_check || DIE=1 die_check $DIE # if no arguments specified then this will be printed if test -z "$*"; then echo "+ checking for autogen.sh options" echo " This autogen script will automatically run ./configure as:" echo " ./configure $CONFIGURE_DEF_OPT" echo " To pass any additional options, please specify them on the $0" echo " command line." fi toplevel_check $srcfile # aclocal if test -f acinclude.m4; then rm acinclude.m4; fi tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS" tool_run "$libtoolize" "--copy --force" tool_run "$autoheader" # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo echo timestamp > stamp-h.in 2> /dev/null tool_run "$autoconf" debug "automake: $automake" tool_run "$automake" "--add-missing --copy -Wno-portability" test -n "$NOCONFIGURE" && { echo "skipping configure stage for package $package, as requested." echo "autogen.sh done." exit 0 } echo "+ running configure ... " test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT" test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT" echo echo ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT ./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || { echo " configure failed" exit 1 } echo "Now type 'make' to compile $package." farstream-0.2.7/Makefile.in0000664000076400007640000010455412462321045012514 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/common/coverage/lcov.mak INSTALL NEWS \ README AUTHORS ChangeLog $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(srcdir)/config.h.in \ $(srcdir)/farstream.pc.in \ $(srcdir)/farstream-uninstalled.pc.in COPYING compile \ config.guess config.sub depcomp install-sh missing ltmain.sh subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = farstream.pc farstream-uninstalled.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(noinst_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) 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" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = -I m4 -I common/m4 AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection SUBDIRS_EXT = SUBDIRS = \ farstream \ gst $(SUBDIRS_EXT) \ transmitters \ tests \ docs \ common \ common-modified \ m4 \ examples # pkgconfig DIST_SUBDIRS = \ farstream \ gst $(SUBDIRS_EXT) \ transmitters \ tests \ docs \ common \ common-modified \ m4 \ examples # pkgconfig EXTRA_DIST = \ AUTHORS COPYING NEWS README ChangeLog autogen.sh \ $(pcinfiles) pcverfiles = farstream-@FS_APIVERSION@.pc \ farstream-@FS_APIVERSION@-uninstalled.pc pcinfiles = farstream.pc.in \ farstream-uninstalled.pc.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = farstream-@FS_APIVERSION@.pc noinst_DATA = farstream-@FS_APIVERSION@-uninstalled.pc CLEANFILES = $(pcverfiles) DISTCLEANFILES = $(pcinfiles:.in=) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/coverage/lcov.mak $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/common/coverage/lcov.mak: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 farstream.pc: $(top_builddir)/config.status $(srcdir)/farstream.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ farstream-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/farstream-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ 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)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ 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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 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 mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA 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 $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -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-pkgconfigDATA .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck 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-info install-info-am install-man install-pdf \ install-pdf-am install-pkgconfigDATA 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-am uninstall uninstall-am \ uninstall-pkgconfigDATA check-valgrind: cd tests/check && make check-valgrind @HAVE_GST_CHECK_TRUE@check-torture: @HAVE_GST_CHECK_TRUE@ cd tests/check && make torture @HAVE_GST_CHECK_FALSE@check-torture: @HAVE_GST_CHECK_FALSE@ true %-@FS_APIVERSION@.pc: %.pc cp $< $@ %-@FS_APIVERSION@-uninstalled.pc: %-uninstalled.pc cp $< $@ dist-hook: chmod u+w ${distdir}/ChangeLog if test -d .git; then git log >${distdir}/ChangeLog; fi .PHONY: lcov-reset lcov lcov-run lcov-report lcov-upload # run lcov from scratch, always lcov-reset: $(MAKE) lcov-run $(MAKE) lcov-report # run lcov from scratch if the dir is not there lcov: $(MAKE) lcov-reset # reset run coverage tests @GST_GCOV_ENABLED_TRUE@lcov-run: @GST_GCOV_ENABLED_TRUE@ @-rm -rf lcov @GST_GCOV_ENABLED_TRUE@ lcov --directory . --zerocounters @GST_GCOV_ENABLED_TRUE@ -if test -d tests/check; then $(MAKE) -C tests/check inspect; fi @GST_GCOV_ENABLED_TRUE@ -$(MAKE) check # generate report based on current coverage data @GST_GCOV_ENABLED_TRUE@lcov-report: @GST_GCOV_ENABLED_TRUE@ mkdir lcov @GST_GCOV_ENABLED_TRUE@ lcov --compat-libtool --directory . --capture --output-file lcov/lcov.info @GST_GCOV_ENABLED_TRUE@ lcov --list-full-path -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d\| -f1 > lcov/remove @GST_GCOV_ENABLED_TRUE@ lcov --list-full-path -l lcov/lcov.info | grep "tests/check/" | cut -d\| -f1 >> lcov/remove @GST_GCOV_ENABLED_TRUE@ lcov --list-full-path -l lcov/lcov.info | grep "docs/plugins/" | cut -d\| -f1 >> lcov/remove @GST_GCOV_ENABLED_TRUE@ lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info @GST_GCOV_ENABLED_TRUE@ rm lcov/remove @GST_GCOV_ENABLED_TRUE@ mv lcov/lcov.cleaned.info lcov/lcov.info @GST_GCOV_ENABLED_TRUE@ genhtml -t "$(PACKAGE_STRING)" -o lcov --num-spaces 2 lcov/lcov.info @GST_GCOV_ENABLED_TRUE@lcov-upload: lcov @GST_GCOV_ENABLED_TRUE@ rsync -rvz -e ssh --delete lcov/* gstreamer.freedesktop.org:/srv/gstreamer.freedesktop.org/www/data/coverage/lcov/$(PACKAGE) @GST_GCOV_ENABLED_FALSE@lcov-run: @GST_GCOV_ENABLED_FALSE@ echo "Need to reconfigure with --enable-gcov" @GST_GCOV_ENABLED_FALSE@lcov-report: @GST_GCOV_ENABLED_FALSE@ echo "Need to reconfigure with --enable-gcov" # 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: farstream-0.2.7/Makefile.am0000664000076400007640000000240712401500475012474 00000000000000DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-introspection SUBDIRS_EXT = SUBDIRS = \ farstream \ gst $(SUBDIRS_EXT) \ transmitters \ tests \ docs \ common \ common-modified \ m4 \ examples # pkgconfig DIST_SUBDIRS = \ farstream \ gst $(SUBDIRS_EXT) \ transmitters \ tests \ docs \ common \ common-modified \ m4 \ examples # pkgconfig EXTRA_DIST = \ AUTHORS COPYING NEWS README ChangeLog autogen.sh \ $(pcinfiles) ACLOCAL_AMFLAGS = -I m4 -I common/m4 check-valgrind: cd tests/check && make check-valgrind if HAVE_GST_CHECK check-torture: cd tests/check && make torture else check-torture: true endif pcverfiles = farstream-@FS_APIVERSION@.pc \ farstream-@FS_APIVERSION@-uninstalled.pc pcinfiles = farstream.pc.in \ farstream-uninstalled.pc.in %-@FS_APIVERSION@.pc: %.pc cp $< $@ %-@FS_APIVERSION@-uninstalled.pc: %-uninstalled.pc cp $< $@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = farstream-@FS_APIVERSION@.pc noinst_DATA = farstream-@FS_APIVERSION@-uninstalled.pc CLEANFILES = $(pcverfiles) DISTCLEANFILES = $(pcinfiles:.in=) dist-hook: chmod u+w ${distdir}/ChangeLog if test -d .git; then git log >${distdir}/ChangeLog; fi include $(top_srcdir)/common/coverage/lcov.mak farstream-0.2.7/ChangeLog0000664000076400007640000252620512462323001012216 00000000000000commit 01fafe82fbc01f31e76623fbbbe6dd99eb28d6bb Author: Olivier Crête Date: Wed Jan 28 22:15:59 2015 -0500 Version 0.2.7 commit e8c277eeed5c277605f2ecc191f347f68fed0a61 Author: Olivier Crête Date: Wed Jan 28 22:15:25 2015 -0500 configure: Add "subdir-objects" automake option Automake now warns that it will be the only behavior in the future. So quell the warning by adding it. commit e7857ade23f9771d250e4c3be772a1dcdc0584d5 Author: Olivier Crête Date: Wed Jan 28 22:08:04 2015 -0500 Fix GIR annotations to remove deprecated styles commit b788ca15fae591a917de0ed77eeb632a919f7325 Author: Youness Alaoui Date: Wed Jan 28 18:19:08 2015 -0500 transmitter: Fix nice unit test for rtcp-muxing. Ignore component 2 ready. Component 2 may become ready before component 1 in which case data sent to that part of the pipeline will be dropped since cid 1 is not yet ready, which causes the unit test to fail since data is missing. commit f2c04851e27dc428153cb1520cb412fd8db2a144 Author: Youness Alaoui Date: Tue Jan 13 17:36:01 2015 -0500 transmitter: Add a unit test for send-component-mux property on nice transmitter commit eda61c44c79956eaa5723725d31d606a9df67c92 Author: Youness Alaoui Date: Fri Dec 5 12:52:51 2014 -0500 rtpxdatapay: Use gst_buffer_copy_into to avoid unreffing the buffer commit 645b9490bb3ec507cac2b01061c9b67c18abb5ae Author: Youness Alaoui Date: Fri Nov 28 17:58:34 2014 -0500 rtpxdatapay: Add support for MTU and split long messages into multiple packets Split all messages into max 1200 bytes of payload and send a GstBufferList when needed Keep sending a normal buffer in case the buffer is smaller than 1200 bytes to things slightly faster commit 9102709e6f8a0b9c390e8636589c3d80f9b1810a Author: Youness Alaoui Date: Mon Aug 11 15:53:51 2014 -0400 Add support for send-rtcp-mux on fs-rtp-session and nice transmitter In fs_nice_transmitter_set_send_component_mux(), the component IDs, which start from 1, are used as nicesinks array indexes and nicesinks[0] is always NULL. commit 5bd19ca4a6c4fa0df50f521eb860d97e95310641 Author: Youness Alaoui Date: Thu Jul 17 23:46:44 2014 -0400 Add support for reliable nice transmitter and selection of ice-udp/ice-tcp commit 7f02aac24c859aadf4a0a83991502c9bcc1ddaf8 Author: Olivier Crête Date: Tue Jan 27 16:37:57 2015 -0500 msnconnection: Fix potential race/deadlock Unlock the mutex while waiting for the thread to exit. commit 6b5e40c6c1f62ae1a1099f56ae70ed26b23c8a88 Merge: 83199d9 fb51436 Author: Olivier Crête Date: Tue Jan 27 15:58:30 2015 -0500 Merge branch 'branch-0.2.6' commit 83199d96480cd7835adc9d290e537effc550b4ca Author: Olivier Crête Date: Tue Jan 13 14:11:27 2015 -0500 fs-session: Reduce padding because added set_encryption_parameters commit b71946fd05e2cdf80af132c306624c60d779ef89 Author: Evan Nemerson Date: Sat Nov 22 11:02:01 2014 -0800 introspection: Call g-ir-scanner correctly This provides a symbol prefix separate from the identifier prefix, corrects the identifier prefix to not include the trailing underscore, specifies the exported pkg-config file, and provides a list of C headers. https://bugs.freedesktop.org/show_bug.cgi?id=86589 commit 3e36909e396d389348a62181585cd20f43929937 Author: Jakub Adam Date: Mon Oct 20 15:03:28 2014 +0200 nicestreamtransmitter: expose port range setting from libnice commit 75e249e8d9aa95e414145933aecb6b4f6614096f Author: Olivier Crête Date: Tue Nov 11 18:53:15 2014 -0500 nice-stream-transmitter: Return right enum for GstPadProbeReturn commit 16ae4d0126faefcc725311073f4971617bfd7858 Author: Olivier Crête Date: Tue Oct 28 16:24:57 2014 -0400 Fix clang warnings https://bugs.freedesktop.org/show_bug.cgi?id=85565 commit 80d4827a83f22d861adbd64a8cebc2ab372dddc1 Author: Nicolas Dufresne Date: Tue Oct 28 14:52:00 2014 -0400 rtp-discover-codecs: Make global access to blueprints thread-safe The global variable list_codec_blueprintfs refcounted with codecs_list_ref was not thread safe. This patch uses a global lock to make this code path thread safe. https://bugs.freedesktop.org/show_bug.cgi?id=85567 commit bf84ab63c8313d2c7299c82928dbfa528448062b Author: Olivier Crête Date: Tue Oct 28 15:18:19 2014 -0400 rtpsession: Don't try to return srtpenc/dec if not installed https://bugs.freedesktop.org/show_bug.cgi?id=85566 commit 15dc8ef0efc871e4af7f7c661b05e081b6062d17 Author: Olivier Crête Date: Mon Oct 13 10:32:08 2014 -0400 nicestreamstransmitter: Remove extra unlock.. commit fb51436e0a6dcefac5506744a6be3fd236b1ca79 Author: Olivier Crête Date: Thu Oct 9 18:05:22 2014 -0400 Version 0.2.6.1 commit f7aba8f7709981db4e46307439cdc7b183d8bbf3 Author: Olivier Crête Date: Thu Oct 9 17:57:46 2014 -0400 Version 0.2.6 commit 3cd69d66c849df4541cf0974c8429623dc103cbb Author: Jakub Adam Date: Tue Apr 22 14:26:49 2014 +0200 Add ICE-TCP candidates Also to the nice transmitter commit 2cb3e163f153434b6e386d1fe80efcc6e70eb738 Author: Olivier Crête Date: Thu Oct 9 17:35:29 2014 -0400 Version 0.2.5.1 commit 37f8913ca758dd26eb3bbdf03eace04164b7a87c Author: Olivier Crête Date: Thu Oct 9 17:31:09 2014 -0400 Version 0.2.5 commit 0d19d5610ac05b27aab1af447165c3eca795ed84 Author: Olivier Crête Date: Thu Oct 9 17:11:11 2014 -0400 rtpstream: Use the right variables in validation Copy-paste error commit 958728fe7ca77b74a6b876b97f6d6e2ef877a840 Author: Olivier Crête Date: Thu Oct 9 16:39:13 2014 -0400 Requirement is actually 1.4 for srtp commit 5f6f8aa6c7eeeeb0cf564499967e292f5a0eee07 Author: Olivier Crête Date: Thu Oct 9 16:23:24 2014 -0400 nice stream transmitter: Ignore ICE-TCP candidates for now commit 5128b46b1f981668eb9fdfd436ce900abba506fb Author: Olivier Crête Date: Tue Oct 7 16:29:36 2014 -0400 rtpsession: Don't try to start sending before a transmitter is set No stream is really sending before a transmitter is set. commit b79bb94f11fecbff4a1cff4f1952610c8da2da05 Author: Olivier Crête Date: Thu Sep 18 15:48:30 2014 -0400 Bump requirement for srtp, need GStreamer 1.2 commit 3c993718d0b559bfb27dcb8ae56f19fec00b4bd7 Author: Youness Alaoui Date: Thu Aug 7 23:23:29 2014 -0400 session: Add internal-session property commit b344a73c10cb1a57bbacf55292c0a376f7e43c97 Author: Youness Alaoui Date: Thu Jul 31 17:03:02 2014 -0400 rtpsession: Fix discovery of RTCP ssrc. SRTCP packets will have SDES encrypted, so we need to check for RR and SR reports. Also, the code was checking if rtcp_map failed, instead of succeeded. This also allows us to mix rtp and rtcp on the same component. commit c8a6bf9f4b72dd3264cc6a80290ee8ef71c7b695 Author: Youness Alaoui Date: Thu Jul 17 23:44:45 2014 -0400 Fix unit tests not working with gst 1.0 commit 52e41e7324e3e8a54c5991e0bb3e6217a8ef46c0 Author: Olivier Crête Date: Mon May 5 22:32:25 2014 -0400 rtp: Add srtp test commit 344468a3b7a6828c0c16f95c81b99ed3af8c001a Author: Olivier Crête Date: Mon May 5 21:26:39 2014 -0400 rtp: Implement setting SRTP decryption key commit 8989360664f68944ca6c00e69b2d88194fed4c38 Author: Olivier Crête Date: Mon May 5 20:29:44 2014 -0400 rtpsession: Factor out SRTP parameter validation commit d95620da48f4c10127eaf32e3a52cdecd3af1f9e Author: Olivier Crête Date: Mon May 5 16:15:51 2014 -0400 rtpsession: Implemnt setting SRTP encryption key commit 9d4e85377d991abeb01de9c9aac77d2c70fbeef3 Author: Olivier Crête Date: Fri May 2 16:10:15 2014 -0400 rtpsession: Create srtpenc & srtpdec commit 7a68e77830e4c8472f52bdf39272b86da35bc4aa Author: Olivier Crête Date: Fri May 2 15:54:58 2014 -0400 lib: Add parameters to set encryption and decryption parameters commit 9c7aa550ed0ea0b6962c7e3c1f42d7af253ea0fa Author: Olivier Crête Date: Mon May 5 23:20:11 2014 -0400 transmitter: Remove recvonly-filter It was pretty much useless anyway. commit 220236e6564486571b0e7eae079b9cb6a554b933 Author: Olivier Crête Date: Mon May 5 22:47:23 2014 -0400 Remove fsrtcpfilter It's not useful in real life commit deb2be339b727b5fcdc7337c0c77a9202e7e4933 Author: Olivier Crête Date: Fri May 9 21:50:58 2014 -0400 tests: Test for x-data type commit 3bf911fd7586d8cb72368c4d3d25fe27c58c2e16 Author: Olivier Crête Date: Tue May 6 17:01:53 2014 -0400 fsrtpxdata: Add RTP pay/depay for Microsoft Lync RTP x-data commit ac98be9a8a48f6f21babd2d5b41df0f5b85a3e42 Author: Olivier Crête Date: Tue May 6 16:20:36 2014 -0400 Add Application Media type commit 4e4d73f86c19d2615992445b89b2622fb45ac7e9 Author: Olivier Crête Date: Fri May 9 20:55:03 2014 -0400 rtpdiscocodec: Also discover formats with no encoder This makes L16, L24 and Video/RAW available to Farstream without profiles. commit 04a706724d818f450f68b453492aae9e8cb08af5 Author: Olivier Crête Date: Fri May 9 20:50:48 2014 -0400 rtpdiscocode: Ignore codecs with no "payload" property commit 8d818b6377f19fe9e4e25b3c40c35ba49bcc13ed Author: Olivier Crête Date: Fri May 9 18:03:41 2014 -0400 rtpdiscocodec: Use GQueue instead g_list_append commit 35f0811fa6f064cc771e67edc9f73585fb954155 Author: Olivier Crête Date: Fri May 9 17:52:11 2014 -0400 rtpbitrateadapter: Check bitrate changes since last getcaps or last notification Not only since the last reconfigure commit aaf96cc1715fddcee6e4a6a99f37e6961d182d74 Author: Olivier Crête Date: Fri May 9 17:47:04 2014 -0400 rtpbitrateadapter: Remove unused caps commit e9ac7697589d6c9fb493ed489a8c33efa7d17b79 Author: Olivier Crête Date: Fri May 9 17:45:41 2014 -0400 rtpbitrateadapter: Support non-video caps too commit 3856338f15d79bdb2ae410079ac26042a4f5f6f8 Author: Olivier Crête Date: Fri May 9 17:45:12 2014 -0400 rtpbitrateadapter: Do dynamic getcaps commit 11cd5652bd027186902b440eb3a11d592bbcf2f1 Author: Olivier Crête Date: Fri May 9 17:25:33 2014 -0400 rtpbitrateadapter: Let upstream do possible renegotiation on > 10% bitrate change commit dc66a180329b6b0cc53fc8d26ff256d2726f37c5 Author: Olivier Crête Date: Fri May 9 17:17:57 2014 -0400 rtpbitrateadapter: Remove caps property commit 11dba722578095699a686ec8765590b11a0717cd Author: Olivier Crête Date: Fri May 9 17:13:05 2014 -0400 rtpbitrateadapter: Pass media type from caller commit 75285f4aa31a17296d8399389aaec11c5b0179f7 Author: Olivier Crête Date: Fri May 9 17:11:01 2014 -0400 rtpbitrateadapter: Remove gray caps commit af34d45cb18c3c588198e0ad8f3f4d57942289e5 Author: Olivier Crête Date: Thu May 8 21:25:27 2014 -0400 rtpcodecnego: Filter by input and output caps commit e0815937292a6083f78bd5a0288cb1668c80adae Author: Olivier Crête Date: Fri May 9 16:23:53 2014 -0400 rtpsession: Implement allowed caps setting commit 279d507732bedc0395584c9ba0ad7bb555163e6d Author: Olivier Crête Date: Thu May 8 22:32:26 2014 -0400 session: Add API to set the allowed caps commit 0cb4edb253ea78d8544682079c36b16f0b082df8 Author: Olivier Crête Date: Thu May 8 21:25:14 2014 -0400 rtpsession: Add input and output caps commit a072e43f45379ca0641da9c20575217d372148ec Author: Olivier Crête Date: Thu May 8 21:12:00 2014 -0400 rtpcodecnego: Skip full list iteration One send codec is enough to be happy! commit 9ec4fe113a4d3f816087cbc36a827f1bebd1a26b Author: Olivier Crête Date: Thu May 8 20:35:55 2014 -0400 rtpcodecnego: Discover input/output caps for application specified pipelines From the codec preferences, if there is a pipeline, inspect to find the possible caps. commit 2beafb328ed8bc6f09e9a4af03c228edd4e86cdc Author: Olivier Crête Date: Thu May 8 20:05:51 2014 -0400 rtpdiscocodec: Factor out in/out caps discovery commit 6062868a5eb42ba31b39e4898acc24033c977e6e Author: Olivier Crête Date: Thu May 8 18:26:20 2014 -0400 rtpcodecnego: Add CodecPreference struct wrapping codec prefs commit a56dd182a6de3a13bf40c4a80e9335e52655dcf5 Author: Olivier Crête Date: Thu May 8 15:16:42 2014 -0400 rtp: Use FsStreamDirection instead of "is_send" gboolean Makes the API clearer commit 3af84c53630b362dde97cf98802303dd389826e6 Author: Olivier Crête Date: Wed May 7 23:07:48 2014 -0400 rtpcodecdisco: Discover output caps from receive codecbin commit c8d42be114f72159cea45b8f7da5c59d6d3823e2 Author: Olivier Crête Date: Wed May 7 22:51:59 2014 -0400 rtpcodecdisco: Discover input caps from send codecbin commit ec1dc8736b5e05e882762a2034e70c0dea3844f4 Author: Olivier Crête Date: Wed May 7 22:27:24 2014 -0400 rtpcodeccache: Add input/output caps to the codec cache commit 063fa048b38d6aea79f8aaed4654cfe1a3f9a0b2 Author: Nicolas Dufresne Date: Wed Sep 3 15:01:35 2014 -0400 example: Sources need to be live In current state this commandline example produce choppy audio, with warning: "Unexpected discontinuity in audio timestamps of -0:00:03.168625000, resyncing". Setting the source to live, as it's suppose to be, fixes the issue. commit de7da7e70dbc1117ca59da4e98af5cc9d7a0efb2 Author: Olivier Crête Date: Thu Jul 31 15:59:46 2014 -0400 rtpsession: Only try to read RTCP if mapping succeeded commit 4571880743d2d37938bd4a618bd305907a8518f3 Author: George Kiagiadakis Date: Tue Jul 22 20:01:22 2014 +0300 fs-element-added-notifier: do not unref elements from already added bins when setting a keyfile The FsElementAddedNotifier does not own a reference to these elements. commit a911b7543fe396b98b45a06e53aa3a130173b9f5 Author: Jakub Adam Date: Mon May 12 12:07:45 2014 +0200 rtpdiscocodec: Fix build with -Werror=format-security commit 44ef0dffa8a3fda3695cda360bb16739d0610bdd Author: Olivier Crête Date: Fri May 9 21:55:25 2014 -0400 rtpconference: Fix debug print commit 241326fcc90d2a6e2d3d717d8deacbad92dd97b7 Author: Olivier Crête Date: Thu May 8 00:03:10 2014 -0400 rtpcodecdisco: Style fix commit f01a491107f19be196fe2b32ae6f62ad09241b0c Author: Olivier Crête Date: Fri May 9 18:34:04 2014 -0400 rtpsession: Verify object exists in dispose path commit 1f71dc237e90313cf1d0c4753ed9048401a279b5 Author: Olivier Crête Date: Fri May 9 20:07:48 2014 -0400 rtpdiscocodec: Debug pipeline at the right level commit dabb550aba18486b115fe6b15986222d29ac26ba Author: Olivier Crête Date: Wed May 7 22:51:41 2014 -0400 rtpcodecdisco: Use GST_PTR_FORMAT for caps debug commit 76374a1844b33da20f70b5b2a17f6414d6109482 Author: Olivier Crête Date: Wed May 7 21:36:30 2014 -0400 rtpcodecdisco: Improve debug printing commit a15b66e23dd29ace82b9de218ea243b88d343890 Author: Olivier Crête Date: Tue May 6 17:17:20 2014 -0400 videoanyrate: Use the Fs prefix internally too commit 72f7b6326839caecc979d64eba3c0e459ddb4af9 Author: Vincent Penquerc'h Date: Tue May 6 00:45:35 2014 -0400 rtp: Fix a couple typos https://bugs.freedesktop.org/show_bug.cgi?id=37997 commit c84c351e3dd55f3cd77e4031d4faf86e5637b4bc Author: Iain Lane Date: Fri Mar 21 15:18:38 2014 +0000 Fix some mismatched / redundant gtk-doc tags gtk-doc 1.20 got more strict about correctness here wrt. balanced tags. Also bump the relevant gtk-doc requirement, these tags were added for a reason back then. https://bugs.freedesktop.org/show_bug.cgi?id=76458 commit 32dcff23964fa6d6910584b1b664150734033fd2 Author: Olivier Crête Date: Mon May 5 15:17:39 2014 -0400 Version 0.2.4.1 commit 798be3e02f665855577b6886768868ee24d7e4df Author: Olivier Crête Date: Mon May 5 15:09:16 2014 -0400 Version 0.2.4 commit 53db372266191c757fc38e222f4d08f9c6d6f46f Author: Olivier Crête Date: Mon May 5 14:41:23 2014 -0400 msnconnection: Fix typo commit 587f35ea8e3126c00b6c4e33e67277a60c3d45ba Author: Olivier Crête Date: Sun May 4 01:18:47 2014 -0400 msnconnection: Double check return value of recv() Even though it has already been peeked at! commit 3aec0fb8ec87299835987266fed208f5267bb000 Author: Olivier Crête Date: Sun May 4 00:48:28 2014 -0400 rtpsession: Check that there is either a blueprint or a profile Having neither is always invalid! commit 64bfaf6af39957996ae1114767d1f674e246fd97 Author: Olivier Crête Date: Sun May 4 00:47:13 2014 -0400 msnconnection: Make sure token is correctly read commit 3610fe76c1856f19595b8d966180444922ca4056 Author: Olivier Crête Date: Sun May 4 00:45:40 2014 -0400 rtp: Check both variants, not only one! commit 4b1f0b5fa6bc9f435453839d4d58ca5d8a6c863e Author: Olivier Crête Date: Sun May 4 00:40:03 2014 -0400 multicast: Assert that udpsock is valid if there are ttls left If the sock is not valid, that we should be the only user and the ttl should have been flushed. commit 148e8f2f815c5060e35840de00daa8eba5b58897 Author: Olivier Crête Date: Sun May 4 00:36:57 2014 -0400 rtptfrc: Fix off by one error 128 is dynamic and needs checking commit 89b390d95860eacccdf0686de28c332ff779a16d Author: Olivier Crête Date: Sun May 4 00:35:19 2014 -0400 rawudp: udpsock is never NULL there commit e126cd6e0c1e23682b3ca79154cede6994297dc8 Author: Olivier Crête Date: Sun May 4 00:34:14 2014 -0400 multicast: udpsock is never NULL there commit dc1e2819c45341d2232cefce47bfb7d086b4e554 Author: Olivier Crête Date: Sat May 3 18:53:25 2014 -0400 rtpkeyunitmanager: Correctly check for local ssrc Found by coverity commit 67538d45102afb55bcee200917aabc866117e04e Author: Olivier Crête Date: Sat May 3 18:39:11 2014 -0400 rtpsession: Since GStreamer 1.2, the real internal SSRC is on the incoming caps commit eb809dbae5074cf527b37f6bb7171ccd1d20682b Author: Olivier Crête Date: Sat May 3 18:38:55 2014 -0400 rtpsession: Also notify of SSRC change on caps change commit 055e0f4089a094c6f9735270280e9d5970716bd3 Author: Olivier Crête Date: Sat May 3 17:00:24 2014 -0400 tests: Disable upnp tests by default commit 4bf22a838a8641c997ef50e38b1d0b784a63e444 Author: Olivier Crête Date: Fri May 2 16:01:20 2014 -0400 Fix documentation commit 70267acdd6cde281d9be936701d4e3d1c92cd885 Author: Olivier Crête Date: Thu May 1 19:00:34 2014 -0400 docs: Use Farstream API version when installing docs This also forces us to make a private copy of the gtk-doc.mak commit 02e2009bca52f7a886a981c5559c6344e8d63371 Author: Jasper Lievisse Adriaanse Date: Mon Mar 3 15:21:30 2014 +0100 include for setsockopt(2) commit 5f52c16b14fd8fac562aaf04e926a0d8e9a298e1 Author: Jasper Lievisse Adriaanse Date: Mon Mar 3 15:39:00 2014 +0100 Include for struct sin_addr. commit 8fb69ff4f49a42548321177135af99dcc168fb56 Author: Jasper Lievisse Adriaanse Date: Mon Mar 3 15:48:16 2014 +0100 Include for struct iovec. commit e349a7db681b643beaf8174a32b071292abd980e Author: Olivier Crête Date: Thu Feb 27 18:00:13 2014 -0500 raw: Fix crash where the stream would try to contact its session before its been set commit 8b99315a911e82aaaac31566c33d0a2d7f3483b1 Author: Ryan Lortie Date: Thu Feb 13 22:03:09 2014 -0500 transmitters: include for IPPROTO_* POSIX says that we need for IPPROTO_* to be defined, so make sure we include it. It also ensures that we get a definition of 'struct sockaddr' which appears in the rawudp header as an argument type. commit cbe9ad35878f921ea7ad67957335eb7a2685eb93 Author: Olivier Crête Date: Thu Dec 5 17:14:29 2013 -0500 rtpsession: Need to read the method on stop too Otherwise it used an initialized variable. Thank you clang-analyzer commit ad52fadfa918a3f0f72dd400502e9b6e0813d218 Author: Olivier Crête Date: Thu Dec 5 17:14:16 2013 -0500 examples: Remove unused variable commit 320f6514aad713e465fb8c7b963e9680bb606c79 Author: Olivier Crête Date: Thu Nov 7 16:46:32 2013 -0500 rtp-codec-nego: Actually test that the codec id is valid Bug found by David Binderman commit e035edc0fd27b2ae7f08742d820f8fc22c7023a2 Author: Mathieu Duponchelle Date: Wed Oct 16 16:33:11 2013 +0200 tests/rtp/sendcodecs: pass a GError to parse_launch. Otherwise for some reason launch_full returns a pipeline even when an element is missing, despite the FATAL_ERRORS flag. commit d2931996112ad9850ff57019c1b1d779b52fa1c3 Author: Olivier Crête Date: Thu Sep 5 12:41:28 2013 -0400 Add files from newer autotools to .gitignore commit c217975266aa3ad379b613a9b154f757432413df Author: Olivier Crête Date: Tue Jun 25 10:38:24 2013 -0400 multicast: Remove not required non-standard header commit 699ab34321dff414ba3e9c8f329bfc3d2a9ff6d0 Author: Olivier Crête Date: Thu Jun 20 22:58:52 2013 -0400 tests: Only use matching host candidates for nice force_remote_candidates test The other candidates may or not may not work commit 6e899cdc8210aa28fec63cce0de65338c73234d2 Author: Simon McVittie Date: Mon Jun 3 20:06:53 2013 +0100 Prefer dynamic PT 101 for telephone-event at clock rate 8000 The WebRTC implementation in Google Chrome <= 26 would reject calls if there was "a telephone-event payload type less than 101"[1] and as of 2013-06-03, the Google Mail web UI with the VoIP extension seems to have a similar signalling bug. Experimenting with the web UI indicates that telephone-events with clock rate != 8000 are irrelevant, and only clock rate 8000 matters. Hopefully the same was true in WebRTC (I can't find a libjingle commit that looks likely to have fixed this). Meanwhile, many SIP implementations and at least one Jingle implementation (Freeswitch's mod_dingaling) either hard-code payload type 101 to be telephone-event, or make the payload type for telephone-event a configuration option. I can't help thinking this was not how dynamic payload types were meant to work, but interoperability is interoperability... This fixes interop when Empathy 3.8 + telepathy-gabble 0.17.4, on a system with not many codecs installed) calls the Google Mail web UI. When the same setup is called by a peer that specifies a different PT for telephone-event:8000 (the Google Mail web UI uses 126 in its outgoing calls), the peer's choice of PT takes precedence. [1] https://code.google.com/p/webrtc/issues/detail?id=1783 https://bugs.freedesktop.org/show_bug.cgi?id=65311 commit ea40fa9de7ed76c92dd8806be944633374bf9b7e Author: Olivier Crête Date: Mon Apr 15 21:53:22 2013 -0400 Version 0.2.3.1 commit c79445e6df897014cdbe2799717226394f89a6fb Author: Olivier Crête Date: Mon Apr 15 21:47:13 2013 -0400 Version 0.2.3 commit 47b852d92214d0e3a6fa732b08a9c92cf32ec5e0 Author: Olivier Crête Date: Mon Apr 15 20:55:33 2013 -0400 tests: Use G_GSIZE_FORMAT where appropriate commit 10b3d38560ec53d980d13240559e6758c1113e21 Author: Havard Graff Date: Thu Mar 21 13:46:11 2013 +0100 fs-rtp-discover-codecs: plug memoryleak use g_list_delete_link to free the list as well commit d5d734480e923156c8155cbc1d4f1faacd89c969 Author: Olivier Crête Date: Thu Apr 4 14:17:59 2013 -0400 rawudp: Use GSocket abstraction for portability commit 5caa188909453f8890a8af8b4b41fe3d287a7fec Author: Olivier Crête Date: Thu Apr 4 14:17:15 2013 -0400 multicast: Use gio instead of getaddrinfo for resolving commit cdf4998b4ce7da59f15aa88b5f4629e5995cab94 Author: Olivier Crête Date: Thu Apr 4 14:04:03 2013 -0400 tests: Use GSocket instead of getaddrinfo to parse IP addresses commit 81351b580da0f8db520ca0ff5e5725c199a7a8b9 Author: Olivier Crête Date: Thu Apr 4 12:19:18 2013 -0400 Misc win32 portability fixes Based on a patch by Conrad Poelman commit 50fffb08d941dce58ae48bf531faead8a4e22ed7 Author: Olivier Crête Date: Tue Apr 2 19:13:06 2013 -0400 codec-discovery: Intersect different parts of the same caps to reduce them We do this because a caps may have the static payload in a separate structure from the encoding-name We just want both in the same structure commit 982231315490a59b83b3ff8165d21caa7cb1944d Author: Olivier Crête Date: Tue Apr 2 16:34:42 2013 -0400 rtpsession: Set error in all error cases commit a5c7a7d4afa43a1a2b65587c5ddfc1ea9a553b5a Author: Olivier Crête Date: Fri Mar 29 14:44:50 2013 -0400 rtpsubstream: Don't free codec after setting it inside substream Bug discovered by Havard Graff commit 2c19591ca948fc302508b2afbdd232b219d92e2a Author: Olivier Crête Date: Fri Jan 11 19:47:42 2013 -0500 session: Add API to set the transmitter parameters as a GHashTable commit 77df96b6b6fad5aac69dc73c06816d050f60a735 Author: Olivier Crête Date: Fri Jan 11 19:46:52 2013 -0500 candidate: Add helper function for pygi This way, it can set a FsCandidateList to a GValue commit 9676376e6c5e31fb83d205c33c1a755acd58f61e Author: Olivier Crête Date: Fri Jan 11 19:46:19 2013 -0500 candidate: Allow various elements to be NULL commit fdf07e579b90760f1e2cdcd1a4c4a9b3476009af Author: Havard Graff Date: Thu Mar 21 17:50:51 2013 -0400 fs-codec: plug memory leak encoding_name is already g_strdup'ed in codec_new commit eca3548baca2ba4fbed2addf960342d846936b39 Author: Havard Graff Date: Thu Mar 21 17:49:18 2013 -0400 rtp-stream: plug session leak commit bc8fd0624d7da549d1d76d02488d3fbe8e444b95 Author: Olivier Crête Date: Thu Mar 21 17:47:04 2013 -0400 fs-rtp-substream: Don't leak caps on error Based on patch from Havard Graff commit 076cf029c54ac5d328a70d186897fa0678df387a Author: Olivier Crête Date: Tue Mar 26 14:33:52 2013 -0400 rtp-codec-discovery: Intersect instead of merge We want the semantics of intersection, not merging, as this will produce a caps with two separate structures in some cases. commit 5d84ac699038d3d53f6c79c0cf1fee24c2c13be1 Author: Olivier Crête Date: Fri Mar 22 15:15:25 2013 -0400 Use == instead of = test for portability Bug reported by OBATA Akio commit 5bdb476dfe467c129cb2e50fc7bf120df7babfdd Author: Arun Raghavan Date: Fri Mar 22 15:09:29 2013 -0400 rtp: Tune pulsesink/pulsesrc latency values further This makes for lower overall values without forcing a bunch of underruns at the start which we got by having pulsesink's buffer-time as 2*latency-time. commit 1a0dd0526eb5ab5ed40fe54ccb37b61a619c7d6c Author: Olivier Crête Date: Fri Mar 22 15:04:55 2013 -0400 Remove deprecated GStaticMutex usage commit c355f2191a9bd67026d9d08969c370a4018513f0 Author: Nuno Araujo Date: Fri Jan 25 01:37:08 2013 +0100 Fix the build with automake 1.13 In Automake 1.13, the long-deprecated macro AM_CONFIG_HEADER (deprecated since 2002) has been removed in favour of AC_CONFIG_HEADERS. commit ba382df8e27bd1e3e7fda1a9740f2b7928535d73 Author: Olivier Crête Date: Thu Feb 28 17:26:54 2013 -0500 tests: Fix GSource leak commit 1f9fcbdf164612d0d630bb3c903e7e70fe61693f Author: Olivier Crête Date: Thu Feb 28 16:54:32 2013 -0500 shm: Fix candidate leak commit 45b9a3fe974a72140cdfda21c0e98f16dd8cc4e6 Author: Olivier Crête Date: Thu Feb 28 16:52:33 2013 -0500 shm: Fix funnelpad leak commit 7a453aff93040adf414d5bc7af34b214d51a471f Author: Emanuele Aina Date: Fri Feb 22 11:05:00 2013 +0000 build: Fix building with the gold linker by referencing gmodule-2.0 With the binutils-gold linker the '--no-copy-dt-needed-entries' flag is active by default and using any symbol from indirectly loaded libraries will result in undefined reference errors. Add to the libfarstream target the AG_GST_GLIB_CHECK-generated GLIB_LIBS variable, which references gmodule-no-export-2.0. https://bugs.freedesktop.org/show_bug.cgi?id=61268 commit f4727622b206f534bf6e6c1a1711d3df9c2e19ec Author: Olivier Crête Date: Tue Feb 5 17:25:41 2013 +0100 Use the generic marshallers instead of generating them commit 8c05863f85469223192409f7852b2ce19f44fdfc Author: Olivier Crête Date: Fri Jan 11 18:40:14 2013 -0500 dtmfdetect has moved to spandsp commit 31b5b16da88a0a9623981d1dbd8e08b989077a20 Author: Olivier Crête Date: Wed Nov 14 13:23:35 2012 +0100 Version 0.2.2.1 commit bfad285b3695bd154a36f7d67149e7f3562a8745 Author: Olivier Crête Date: Wed Nov 14 13:13:16 2012 +0100 Version commit fef0054b2c492426219e23ac8f1c36d23968f217 Author: Debarshi Ray Date: Wed Oct 24 17:54:08 2012 +0200 Update and fix the default properties for vp8enc The property names of the vp8enc element changed in GStreamer 1.0. See the following commits from gst-plugins-good for some of the corresponding changes: - 392bd12a45b959b696365e5f25e315c2489fe025 - 9c0ff2f38174f2e4111859bd66956a77764cb515 Also, vp8enc uses target-bitrate, not bitrate. commit 1fd82440d4b3c16dcb1d1b5df0c3484eb95ffc43 Author: Olivier Crête Date: Thu Oct 4 16:31:21 2012 -0400 Version 0.2.1.1 commit 6c488e499417dbfa8957d7717c3cbe6a5214ac09 Author: Olivier Crête Date: Thu Oct 4 16:17:33 2012 -0400 Version 0.2.1 commit be619f6564d552dba6cacca91b7515d650d5de83 Author: Olivier Crête Date: Thu Oct 4 15:30:55 2012 -0400 rtpsession: Set the discovery valve to playing before linking it commit 3f1f966a1db423b7068d14f2487aa10b0154f881 Author: Olivier Crête Date: Wed Oct 3 12:28:11 2012 -0400 Update the LGPL headers to the new FSF address commit e08986bf2e923896800681011a705c005ffbca75 Author: Olivier Crête Date: Fri Apr 27 17:18:39 2012 -0400 elementaddednotifier: Add signal id when setting default properties too commit 3901964fa0696305a548191cf568eca05a4aec15 Author: Olivier Crête Date: Fri Apr 27 16:39:07 2012 -0400 elementaddednotifier: Return the signal ID when adding from a keyfile commit 44b935ca4b889816a004e413f95bdaa0b4c7156f Author: Olivier Crête Date: Fri Apr 27 16:37:25 2012 -0400 elementaddednotifier: Free keyfile using GClosure notifiers commit 36508987dc0c03c12fc4b8dcf26d5f86f6b9ebab Author: Olivier Crête Date: Fri Apr 27 16:35:52 2012 -0400 elementaddednotifier: Chain up finalize commit 3160dfb4abe8420a4790d6549212471678a81184 Author: Olivier Crête Date: Fri Apr 27 16:05:13 2012 -0400 elementaddednotifier: Set keyfile properties on already-added bins too Iterate through already added bins to add element properties commit d406132e22bf7fc28c1024455232631cdace1492 Author: Olivier Crête Date: Fri Mar 9 15:00:03 2012 -0500 elemendaddednotifier: Annotate the fact it takes ownership of the keyfile commit 402b496c7a483c906d0598c59d5b2fd462968191 Author: Olivier Crête Date: Fri Apr 27 16:04:33 2012 -0400 utils: Don't crash if trying to get default properties of a factory-less element commit 4a3606a6ec570ecf0500dfefbc6bfffa4cbeb120 Author: Olivier Crête Date: Tue Apr 17 18:16:48 2012 -0400 Make fs_conference_debug category symbol private Don't export it in the dll commit 1b77821dd10a08b2a23325b700384ac8b6bdcebb Author: Olivier Crête Date: Wed May 2 17:36:28 2012 -0400 stream: Keep ref to src pads for iterator to not break commit 895b34c4dab9840c478816e8713c29d12c321a7e Author: Olivier Crête Date: Mon Oct 1 17:46:43 2012 -0400 tests: Re-enable shm test commit 444b0d1b9aef13ef0b5017858b76610eea429b30 Author: Olivier Crête Date: Mon Oct 1 17:23:21 2012 -0400 Remove GST_USE_UNSTABLE_API as GStreamer 1.0 has been released commit 87556cc9902e7ab257fe533e89681a03ed5cd566 Author: Olivier Crête Date: Tue Sep 25 16:47:30 2012 -0400 Version 0.2.0.1 commit 501ef7d6ad4ff3cb724ab4ea43e466796eb66c9a Author: Olivier Crête Date: Tue Sep 25 15:10:43 2012 -0400 Version 0.2.0 commit dfcbd4cbcf111d6cfe6c174c4fdb5a9235062cf9 Author: Olivier Crête Date: Tue Sep 25 15:08:26 2012 -0400 Port to GLib 2.32 commit 224a49a5c784efbe6bc4b9e8c7632332efcf7456 Author: Olivier Crête Date: Mon Sep 24 13:26:54 2012 -0400 rtp: Register error downgrade element before using it commit 4650d969bd0e55d13b273d8f1a1fd68aa3011c35 Author: Olivier Crête Date: Sat Sep 22 15:13:10 2012 -0400 rtp: Prefer Opus and VP8 But we still place H.264 above VP8 commit f1a047a526360480bc2c2e3835b236271adeea30 Author: Olivier Crête Date: Fri Sep 21 16:57:18 2012 -0400 Example: Port to GStreamer 1.0 and misc improvements Also add volume controls Also port to GTK+ 3 Also port to GObject introspection Also use default properties and preferences commit d074dd9f633dc9244d354a90ae2eabf5ee5ce295 Author: Olivier Crête Date: Fri Sep 21 22:00:16 2012 -0400 rtp: Ignore decoder error messages Add a GstBin that transforms the error messages into warnings commit 177fa0ecfff9c5e946f65006ca289a7b0690a217 Author: Olivier Crête Date: Thu Sep 20 18:54:08 2012 -0400 rtpsession: Announce send codec parameters whenever they change Re-announce send codec parameters if they change in any way commit f68a5d7d7615bab8911d818bad14e82f5a9fb87a Author: Olivier Crête Date: Thu Sep 20 18:53:15 2012 -0400 rtpsession: Set codec pointer for debug messages commit 97f705a3ba001fd8d948d6493c057bdb1c8ee845 Author: Olivier Crête Date: Thu Sep 20 18:52:27 2012 -0400 Add some allow-none annotations commit 740ec399f90944d56648367bba914b922f97b4cc Author: Olivier Crête Date: Tue Sep 18 17:36:07 2012 -0400 fsrtpsession: Add a valve before the param discovery pipeline commit 48e94cef47a605fdb1e5034a8d3eeec2f31a5b2d Author: Olivier Crête Date: Tue Sep 18 17:35:38 2012 -0400 Re-base onto GObject commit 23376fd825bf8aaa9181e9217edbb82189ee07d9 Author: Olivier Crête Date: Fri Sep 14 16:37:32 2012 -0400 candidate: Add fs_candidate_new_full() Without it, introspection can not set the other field commit 143aff0c4420f517f9ac2258f1fefbeddd5fbf37 Author: Olivier Crête Date: Thu Sep 13 21:53:28 2012 -0400 Version 0.1.91.1 commit 7436327f318fe87640f01ec34e11c47d611420ce Author: Olivier Crête Date: Thu Sep 13 21:48:31 2012 -0400 Version 0.1.91 commit da58e0cfd3c11a56d0079363cdbb27a980d69844 Author: Sjoerd Simons Date: Wed Sep 12 23:35:29 2012 +0200 Rename the mutex to test_mutex as gstcheck defines mutex now commit 0d5714b926e4e2aac1fa7aeeb4c584789a9655b6 Author: Sjoerd Simons Date: Wed Sep 12 23:34:42 2012 +0200 Update for gstcheck changes following the GLib api changes commit 31a4ba93eec6c0813af6f77ce017180e04c06cdf Author: Sjoerd Simons Date: Sun Aug 12 13:13:06 2012 +0200 rtp-discoverer: Fix reference counting gst_caps_merge takes ownership of both arguments, fix the reference counting to take that into account commit 528caf919d92d6a4f501c161f863fccccd851462 Author: Sjoerd Simons Date: Sun Aug 26 19:15:33 2012 +0200 Add uninstalled pc file commit 129176598afd1d760ef5d7864276fc681d40abfd Author: Olivier Crête Date: Tue Sep 11 12:36:52 2012 -0400 Replace FS_MAJORMINOR with FS_APIVERSION commit d58ba0017be71c37ef4b5a36109c3dd68cc423c3 Author: Olivier Crête Date: Tue Sep 11 12:33:34 2012 -0400 Using git for a long long time commit 75e530c41571376e037ecab4c0c1cda0548b3b46 Author: Olivier Crête Date: Tue Sep 11 12:33:13 2012 -0400 Change version numbers commit cb7fa417ab3f3268b5565571f79d5d6eba387bb7 Author: Olivier Crête Date: Tue Sep 11 12:08:11 2012 -0400 fsvideoanyrate: Apply filter caps commit 812768968f895deb3bf37e98b8a754a54ff631fb Author: Olivier Crête Date: Tue Aug 28 15:46:59 2012 -0700 gst_caps_merge now eats references commit 7ffdc23a2b6ac98c864ab2df58e2989cb268efe6 Merge: 4263c6b 6d4f0c1 Author: Olivier Crête Date: Tue Aug 28 15:43:38 2012 -0700 Merge branch 'master' into gstreamer-0.11 commit 4263c6bc1f0f4aff94e7351904102c229c66e47c Author: Olivier Crête Date: Tue Aug 28 15:43:19 2012 -0700 Port simple-call to gst 1.0 commit 6d4f0c15cc64ebc99cb1ac08d3703f90c37b35d1 Author: Olivier Crête Date: Tue Aug 14 17:44:52 2012 -0700 Add dependency to enable parallel build of introspection commit 462fd20e8174f59cf8835871a0f3fed5eb75c5c6 Author: Olivier Crête Date: Tue Aug 7 15:37:00 2012 -0700 Fix annotations to make new gir happier commit 88e90aa877f1acf59374c8011ad2d82071a37b97 Author: Olivier Crête Date: Tue Aug 7 15:27:50 2012 -0700 Replace GST_MAJORMINOR with GST_API_VERSION commit b2590cc39404fce58aa214f82dfc23a64f07bbf6 Author: Olivier Crête Date: Mon Aug 6 14:29:50 2012 -0700 Put the correct new Freedesktop URLs commit 6fd5e6db851979b11130d7ba081b555dade3e6fa Author: Olivier Crête Date: Mon Aug 6 13:03:40 2012 -0700 msn: Add extra debugging info commit 48bf154c33a478dc9e68698bb112462ca3f5a2f2 Author: Olivier Crête Date: Mon Aug 6 13:03:04 2012 -0700 Revert "Add breakpoints in error functions for easier debugging" Because the unit tests fail on the breakpoints :-( This reverts commit 9fac4e2b35fccc976cf1d9ed202030beae091e66. commit e6678aa684635866c9d1c0aeae97dbd89306a41e Author: Olivier Crête Date: Mon Aug 6 11:45:09 2012 -0700 The plugin name is no longer a string commit b1131d0c192d002e98a8db43abd4ea30f73b059a Author: Olivier Crête Date: Tue Jul 31 18:53:50 2012 +0200 tests: Remove unfixable tests commit 8610a3b5466203f7ed1223f8dd90d49032ce624b Author: Olivier Crête Date: Tue Jul 31 18:53:06 2012 +0200 tests: Remove broken _destroy() tests commit 6365c268b7f3074bc0663d7d598b63976cbe4982 Author: Sjoerd Simons Date: Mon Jul 30 08:43:36 2012 +0200 Switch to modern video caps commit bbede55529e95da8c9bd3d5cbd9cfd7046ec7f68 Author: Sjoerd Simons Date: Mon Jul 30 08:41:56 2012 +0200 Change video caps from x-raw-yuv to x-raw commit f8abadfd6bc2fcf217937cd8bf54cdeefe6f00ea Author: Sjoerd Simons Date: Sun Jul 29 17:11:22 2012 +0200 tfrc: Use new API for buffer appending commit 61bdb747d1027e5040c774cd57c27b477e3dc7c0 Author: Sjoerd Simons Date: Sun Jul 29 17:09:51 2012 +0200 tests: gst_rtp_buffer_validate has been pulled into gst_rtp_buffer_map commit 37a223f60b1002bd84fa0d9f6fbbea655db68e39 Author: Sjoerd Simons Date: Sun Jul 29 17:08:57 2012 +0200 tests: Update for changes to the gst_bus_set_sync_handler api commit 1320a919f835570461948744e52cdb5bb7adbeb2 Author: Sjoerd Simons Date: Sun Jul 29 17:08:09 2012 +0200 Add base plugin cflags to tests that need them commit 66c8f5819a55a2d8a867aa5d2612da43660e0ba7 Author: Sjoerd Simons Date: Sun Jul 29 12:25:58 2012 +0200 Use the rtp packet length accessor instead of the struct commit 0ce579fbd1898d95c2e7bc769783d6ec4e1c109f Author: Sjoerd Simons Date: Sun Jul 29 12:25:22 2012 +0200 gst_caps_fixate now returns the fixated caps commit 073b7ddecba997ce6717a5e9135e2643a44ec4fb Author: Sjoerd Simons Date: Sun Jul 29 12:22:38 2012 +0200 Update for new BaseTransform fixate-caps prototype commit 3c9f9f1c05ec655a3529f6e2ae9e3a4c9d262898 Author: Sjoerd Simons Date: Sun Jul 29 12:15:18 2012 +0200 Add missing headers for stat commit 1a9cc3d30a6a3984c65e5cf1b445d7507a59693e Author: Sjoerd Simons Date: Sun Jul 29 12:14:55 2012 +0200 Use accessor functions for pad templates commit df556de3d968874ea8575bbb65b95f5735b5e42f Author: Sjoerd Simons Date: Sun Jul 29 12:13:30 2012 +0200 Return an error on unknown address family commit c8e87af2a27edf1279a5ab18f3ec16fcc8722dc7 Author: Sjoerd Simons Date: Sun Jul 29 12:13:13 2012 +0200 Fix crash if fs_transmitter_list_available returns NULL commit 9b4d8c10a2c872791504bb0c6f3f6a18e2d3ba1f Author: Sjoerd Simons Date: Sun Jul 29 12:12:38 2012 +0200 rtp_buffer_validate is gone, validation now happens on mapping commit 14131d2803f2523780e99c6984b27bd023e38aee Author: Sjoerd Simons Date: Sun Jul 29 12:11:41 2012 +0200 Use gst_caps_merge instead of removed gst_caps_union commit 14256fb917dac59578dc229f2fc8cfbc109513a2 Author: Sjoerd Simons Date: Sun Jul 29 12:10:21 2012 +0200 gst_clock_id_wait_async_full was renamed to gst_clock_id_wait_async commit d2a7db650913095c2a5d3c0aa97f279e74294c76 Author: Sjoerd Simons Date: Sun Jul 29 12:07:33 2012 +0200 Add missing ; commit 084f8006b2d1991e60da12b58bf6017b07bcb307 Author: Sjoerd Simons Date: Sun Jul 29 12:07:04 2012 +0200 Search for python for mangle-tmpl.py commit 6a6df70780c1693076c1afe39d63ae95896b0d24 Author: Sjoerd Simons Date: Sun Jul 29 12:06:10 2012 +0200 Use gstreamer 1.0 instead of 0.11 commit 303c1a902816d3c742a26b34eb12c17b887ac00e Author: Sjoerd Simons Date: Sat Jul 28 16:33:07 2012 +0200 Update common module commit ec267d9d072298100b6b13bafa1fce3440dabe38 Author: Olivier Crête Date: Sat Jan 28 14:02:06 2012 +0000 tests: Ignore non-running multicast devices commit 9fac4e2b35fccc976cf1d9ed202030beae091e66 Author: Olivier Crête Date: Sat Jan 28 13:53:35 2012 +0100 Add breakpoints in error functions for easier debugging commit 077745926547f0b7f6859072ffa0d45f11692cfe Author: Olivier Crête Date: Sat Jan 28 13:44:49 2012 +0100 debug-msg is gone, remove from tests commit 53239894e9e1b033744d9404b1e50f402b935449 Author: Olivier Crête Date: Sat Jan 28 08:38:45 2012 +0100 update rtcpfilter test for gst check api updates commit ed911efc60de1538c4e24ca01f376e25c09a4124 Author: Olivier Crête Date: Fri Jan 27 16:50:08 2012 +0100 Port to GStreamer 0.11 commit fb74f736e23844bbf289011f9bff7ad91581af18 Author: Olivier Crête Date: Fri Jun 29 15:35:56 2012 -0400 fs-codec: Remove outdated TODO commit 39450457190675716c8e66700e35b05334a6a1a0 Author: Olivier Crête Date: Fri May 25 17:06:59 2012 -0400 Gtk-doc tags belong after the description commit f6b097be1a591332b2b7af9ff97126d7c0ed80e7 Author: Guillaume Desmottes Date: Wed Apr 4 11:12:42 2012 +0200 The right macro is GLIB_VERSION_MAX_ALLOWED https://bugs.freedesktop.org/show_bug.cgi?id=48285 commit 23122f81bf3eeb20d2acf0af1275ed5abd6be20a Author: Olivier Crête Date: Fri Mar 23 18:28:24 2012 -0400 tests: Remove used of deprecated g_strcasecmp commit 2c266acb41c65004e63fb66b708d5ed02e22ccd0 Author: Olivier Crête Date: Fri Mar 23 17:45:55 2012 -0400 tests: Link against libgstbase when it is used commit d686cc11a8135947fb06136edf4320a07d793b91 Author: Olivier Crête Date: Fri Mar 23 15:42:14 2012 -0400 rtpdiscovercodecs: Typecast factory into feature to make compiler happy commit f13bbc080f28d22bef6d24472eddc1bdfc689755 Author: Olivier Crête Date: Fri Mar 23 15:33:03 2012 -0400 Version 0.1.2.1 commit ee62969e5d28a942384f245f4ffd79ca492af838 Author: Olivier Crête Date: Fri Mar 23 13:18:17 2012 -0400 Version 0.1.2 commit 3ba750b3a2d4f1205e728db71cf5c9e7edc8d43e Author: Olivier Crête Date: Fri Mar 23 15:29:06 2012 -0400 Add empty overrides file as the new gtkdoc creates one and to make distcheck happy commit 1504e2c7881947b9917c17aa5f3e14d6ec7d5807 Author: Olivier Crête Date: Fri Mar 23 15:29:29 2012 -0400 Ignore rank==0 from auto discovery commit 629cc095af3b031dd4661377608f3718b59575ed Author: Olivier Crête Date: Fri Mar 23 13:44:12 2012 -0400 tests: Make debug messages into GST_DEBUG commit 04cc2bbca52b7047e8b7baf6e39fc99646babd42 Author: Olivier Crête Date: Fri Mar 23 13:39:48 2012 -0400 Update doc generator from common commit 62d74a0d6a77fe064206ce5c51f4200f54e651d2 Author: Olivier Crête Date: Fri Mar 23 13:07:37 2012 -0400 Revert "shm-stream-transmitter: Add property to control the buffer-time" This reverts commit 7a8dd5ef57afc9dd279366b6c07a38c30493f927. Because the patch in shmsink was bad and did not deal with timestamps going backwards. We must re-apply this patch once a new upstream GStreamer has been released. commit c38383444d605650e8f33eeed2e445ef36e129c9 Author: Olivier Crête Date: Wed Mar 21 15:03:56 2012 -0400 rtpcodecnego: Add more debugs on local codec list creation commit 7d26b23ce613498f86ddb0723e929c9868ac17de Author: Olivier Crête Date: Wed Mar 21 15:03:18 2012 -0400 rtpdiscovercodecs: Remove duplicate codecs Only keep the first codec if there is more than one way to produce the same RTP codec commit 56d3f36341d9f6a6eeff38db22f7cb25ee46fb7c Author: Nicolas Dufresne Date: Thu Mar 15 12:56:43 2012 -0500 Set better latency/buffer time for pulse src/sink commit 028b3ed519b6a1c0b548819a86304f1fef85e341 Author: Nicolas Dufresne Date: Thu Mar 15 12:53:46 2012 -0500 Add default element properties for rawconference commit 900483fd33efb8e985d0e908e042a3dfc6998af8 Author: Olivier Crête Date: Wed Feb 29 13:30:50 2012 -0500 example: Call the right function commit 659f0dffcdee0e48344b03b581f8477847653306 Author: Olivier Crête Date: Wed Feb 29 13:30:38 2012 -0500 Update glade file commit 6553314dde640e1ef7a37c4e630156cd027159db Author: Olivier Crête Date: Wed Feb 29 12:08:43 2012 -0500 Require GLib 2.30, do not allow APIs added after and ignore later deprecations commit 10e6385ebccab96ef254f62271b0f19d3d5be3cf Author: Olivier Crête Date: Tue Feb 28 17:14:49 2012 -0500 Don't emit element-added signal without a parent commit d9fa44186200e1cd17d69a1ae5b0dead202f7a58 Author: Olivier Crête Date: Tue Feb 28 17:13:43 2012 -0500 rtpcodecnego: Ignore config while comparing send codecs commit d01dc756827235d0caa6f6e067994cf117387708 Author: Olivier Crête Date: Tue Feb 28 17:13:16 2012 -0500 Remove check for gst <0.13 commit 3e416cad5dcdda95d94770dd2828574f50b04f11 Author: Olivier Crête Date: Wed Feb 22 16:53:26 2012 -0500 Update common commit 544e5ef7af95dd8d70bbc122962a04a3f0c9f74a Author: Olivier Crête Date: Tue Feb 21 20:11:29 2012 -0500 Add "do-timestamp" property to the transmitters Make it possible for the "raw" plugin to not have the transmitter put timestamps on the buffers. commit f8b2fbc4dcfe495ca26acb33e875aea56f929dd4 Author: Olivier Crête Date: Mon Feb 20 17:01:30 2012 -0500 Version 0.1.1.1 commit 104b0bd8e937b762e7c4faeb6831df7847b5b57e Author: Olivier Crête Date: Mon Feb 20 17:00:59 2012 -0500 Version 0.1.1 commit 8028c159500f909d745b33327e71ba5b53b5a56e Author: Olivier Crête Date: Mon Feb 20 16:49:51 2012 -0500 Fix python examples commit 04a8f33daab5c304e87fbd3c8559e8218a42fcdc Author: Olivier Crête Date: Mon Feb 20 16:49:33 2012 -0500 Fix python bindings commit d5d0c925638a55c8b1f72a3472e5176862b5cd3a Author: Olivier Crête Date: Mon Feb 20 13:22:23 2012 -0500 Update defs commit b355218252fc5a5cf7d7ef954e91e3225ad354b0 Author: Olivier Crête Date: Mon Feb 20 13:22:15 2012 -0500 Add override for fs_stream_set_transmitter commit 2ff161461abfefe2370d70c22ed86126d9225531 Author: Olivier Crête Date: Mon Feb 20 13:06:09 2012 -0500 python: Use force for force commit a78b7d31ce00e718105d8193e52a973116040332 Author: Olivier Crête Date: Wed Feb 15 15:56:40 2012 -0500 Rename fs2-gui-user-frame.ui to fs-.. commit c70cf5ce02be0e4fe9c6104ac87a7ef66a9790b5 Author: Olivier Crête Date: Fri Feb 10 13:20:18 2012 +0100 rtpsession: Wait until stream is destroyed to flush transmitters commit f478640df6dffcd5d2d3bde604631fb389198103 Author: Olivier Crête Date: Fri Feb 10 13:19:31 2012 +0100 session: Remove extra ; where it doesn't belong commit 4ffcc64264342c3fd285b9ff7a97903c106b94e3 Author: Olivier Crête Date: Fri Feb 10 12:20:37 2012 +0100 Require new gst-plugins-bad, it's needed for DTMF to work correctly commit ddb7df30af670e5e3570d6a699adde215b211d5e Author: Olivier Crête Date: Tue Jan 10 15:41:24 2012 -0500 Update GIR annotations commit 906a08210dade0582c2654e26bdcb9e117cdd298 Author: Olivier Crête Date: Tue Jan 10 15:33:16 2012 -0500 Add stream message parsers to the doc commit a606a0518e89185946013f948fedbeb5a0c1076e Author: Olivier Crête Date: Tue Jan 10 15:33:00 2012 -0500 Move the FsSession's conference property to the base class commit eb3505fac61c06913ecf1920cb6b4fb7e20eb474 Author: Olivier Crête Date: Mon Jan 9 17:10:13 2012 -0500 rtpsession: Set boolean property to exactly "1" if true It seems boolean properties don't accept values > 1 commit 052ae546e9a8afaf7f4bea751194e9c39d9fd46e Author: Jonathon Jongsma Date: Tue Dec 20 14:13:56 2011 -0600 Fix fs_stream_parse_component_state_changed() Check for the right message name and parse the state as an enum, rather than a uint. commit e58a6d7e4fdb3da7b8d5e66cf464da796b1c9200 Author: Jonathon Jongsma Date: Thu Dec 15 16:24:54 2011 -0600 Improve error message for missing stream transmitter commit 7a8dd5ef57afc9dd279366b6c07a38c30493f927 Author: Sjoerd Simons Date: Tue Nov 8 11:48:25 2011 +0000 shm-stream-transmitter: Add property to control the buffer-time Allow the transmitter to buffer how much can be maximally queued in the shmsink before blocking. Default to 20 miliseconds. For audio network packets tend to be around 20ms is size, so 20ms is a suitable size for audio. For video, 20 miliseconds is less then one frame at 30 fps, so with 20ms as default at most one video frame will be queued up in the shm sink. commit ec877c7a4df94e5ba419ff3c706481a2223c29b8 Author: Olivier Crête Date: Tue Nov 8 17:00:19 2011 -0500 Add parsing functions for all GstMessages commit daa31cd16df26a73b4d7b99d46c704322afbf2ea Author: Olivier Crête Date: Mon Nov 7 19:58:45 2011 -0500 session: Put the messages argument into a real table commit d5118475a8837f856ef41cfe69386b4fdbcc524b Author: Olivier Crête Date: Mon Nov 7 19:04:20 2011 -0500 session: Add functions to parse the custom GstMessages commit d5936d72aad50ee811a92f719e4cc046ad9fc424 Author: Olivier Crête Date: Mon Nov 7 18:52:43 2011 -0500 session: Make the volume into a guchar commit e53ef7872372b7da4331f755f5a53c7bc0f6a051 Author: Olivier Crête Date: Mon Nov 7 17:55:09 2011 -0500 session: Document the farsight-telephony-event-started/stopped messages Also use the specific registered types where appropriate commit bd4a007703028127d00988cfd55e7d0c9469633b Author: Olivier Crête Date: Mon Nov 7 17:26:21 2011 -0500 rtpsession: Document the dtmf messages a bit more commit df0a22311427638db1036448722b45c5ca7b5284 Author: Olivier Crête Date: Mon Nov 7 15:53:28 2011 -0500 Remove non-existing fs_add_constants commit 3b55ff5184c192c36e4228e1116c5e25688db7e2 Author: Olivier Crête Date: Fri Nov 4 18:17:32 2011 -0400 stream: Clarify the origin of the transmitter parameters commit e61c563d342fcfc50cca9ff051c59d99a1b9c762 Author: Olivier Crête Date: Sat Oct 29 22:48:44 2011 +0200 rtpsession: Queue events inside instead of letting the sources do it Also, make it possible to iterate the sessions without holding the object lock Also, we track when the sources are done processing an event so that we can minimize the number of dropped events if we change the source. commit e08de8e6518bdf28917e258d95fa5d891e968328 Author: Olivier Crête Date: Sat Oct 29 20:46:49 2011 +0200 rtpspecialsources: Keep ref to the sources until it is gone commit fb64d45034c76c7e8e336440296f6f84bd7b87c3 Author: Olivier Crête Date: Sat Oct 29 19:30:42 2011 +0200 fssession: Remove the "method" from the telephone_event methods Now, it will always try event then fall back on sound. If one wants to ensure that only sound is sent, one must remove the events from the remote codecs. commit 195ac9201b2f04a22f7ecc099781d0f83d422d8c Author: Arun Raghavan Date: Tue Nov 1 13:58:42 2011 +0530 rtp: Set proper latency values on pulsesink/pulsesrc This sets a 50ms buffer-time on pulsesink and pulsesrc and a 25ms latency-time on pulsesink, which should decrease the overall latency of the audio pipeline (the current value being used is the default buffer-time of 200ms). commit 103fccc1ce2fa9bf82b9e3a5138d0e633e0d2d96 Author: Olivier Crête Date: Sat Oct 29 19:18:41 2011 +0200 Update python defs file commit 097c4f31da296b486434ba8381911978817571f5 Author: Danielle Madeley Date: Mon Oct 17 04:52:17 2011 +0200 Use 0_1 in name of some variables for the introspection automake commit 1d683055112a737f0246e2504f6b68e6efadceb7 Author: Olivier Crête Date: Mon Oct 17 04:26:45 2011 +0200 autogen.sh: Include our m4 before the common one This way we get the newer introspection.m4 commit bd64cf328044d52bf696f1e48609d13148f00967 Author: Olivier Crête Date: Tue Oct 11 18:52:20 2011 -0400 Use our own version name, not gstreamer's commit 452ae1fb846f2fead11f1160320fe159291abf52 Author: Olivier Crête Date: Tue Oct 11 18:39:26 2011 -0400 Aim the pkgconfig file at the right place commit a8c245a7734659664be39981e227b9c017292959 Author: Olivier Crête Date: Tue Oct 11 16:35:09 2011 -0400 Update docs commit 3bad0f31069406428f496b2d4ad1199fd75b94bb Author: Olivier Crête Date: Tue Oct 11 16:12:44 2011 -0400 Rename plugins directories to match plugin names commit 52a59229d200a8d74d66e02126c290434d3157d8 Author: Olivier Crête Date: Tue Oct 11 16:08:49 2011 -0400 Move the lib out of gst-libs commit 7098f40db04b6a32c311b802a2c12f0f450ee7b7 Author: Olivier Crête Date: Tue Oct 11 15:55:45 2011 -0400 Rename libgstfarstream into libfarstream commit e33572c56e93ad1a0f644047f30fc23ab5e01372 Author: Olivier Crête Date: Tue Oct 11 14:55:29 2011 -0400 Rename Farsight 2 to Farstream commit 449a53f65146448d70f761cc1257171702c83db4 Author: Olivier Crête Date: Mon May 16 16:45:03 2011 -0400 tests: Disable GstMessage from nice thread tests FsRtpConference doesn't track the threads created by the Nice Transmitter as its not created by a GstTask and it does not emit a StreamStatus message, so we have to be careful. commit 133c8c8f2296ec68ab62a5eb0e39741fd146b05b Author: Olivier Crête Date: Mon May 16 16:44:03 2011 -0400 tests: Check g_critical if unreffed from wrong thread commit f9ca612650ee69c616eecc92b4d6f6371dec33b1 Author: Olivier Crête Date: Fri May 13 21:56:57 2011 -0400 rawstream: Remove nasty dispose in other thread trick commit e186668c0afe71ca232cda7f7ef5ac57e1c54d53 Author: Olivier Crête Date: Fri May 13 21:54:24 2011 -0400 rtpsession: Remove nasty dispose in other thread trick commit 0c76c4b94a4effc6e14439e0e3abf863567cf78a Author: Olivier Crête Date: Mon May 16 12:16:45 2011 -0400 tests: Destroy session/stream instead of unreffing it in raw tests commit f2bb626523363316dc3451472130d38b0dc8d30d Author: Olivier Crête Date: Mon May 16 12:15:51 2011 -0400 test: Check for state change failure commit fb7fa764c3d5abeb0760b106397efbdb898c92a9 Author: Olivier Crête Date: Mon May 16 12:15:13 2011 -0400 raw: Don't make all test fails on critical commit c51fa775f003b5b9fcc8df1ce7fc833691a693b6 Author: Olivier Crête Date: Fri May 13 21:44:40 2011 -0400 python: Remove .dispose() methods, they've been replaced by .destroy() commit 23ce62d4af95759e0c56885edf2423d7214f14da Author: Olivier Crête Date: Fri May 13 21:42:28 2011 -0400 tests: Call fs_session/stream_destroy in the tests commit c54795623db610a99362d030c926467019ae447d Author: Olivier Crête Date: Fri May 13 21:42:24 2011 -0400 rtpsession: Protect callbacks from the stream against session dipose Session dispose can be called manually, the callbacks from the streams should be protected against it. commit 365cd55a62deddbffd98ce114b027ada2b364846 Author: Olivier Crête Date: Fri May 13 21:15:18 2011 -0400 rawsession: destroy stream on dispose commit 3bdf7667759e5c4716040a236b0eaa4987feac27 Author: Olivier Crête Date: Fri May 13 21:12:46 2011 -0400 rawsession: Remove unused code commit 240c86ca4472ab83ace61d00c89a544ebd04d95e Author: Olivier Crête Date: Fri May 13 21:11:53 2011 -0400 msnsession: Destroy stream on dispose() commit d04e03aa89f266e1f8f44eab8db6fd2aefb8d571 Author: Olivier Crête Date: Fri May 13 21:09:50 2011 -0400 rtpsession: Destroy stream on dispose() commit 643096fc4444d5e54bbba6247f481796dcf08615 Author: Olivier Crête Date: Fri May 13 20:08:29 2011 -0400 session: add _destroy() method This will remove all references to other objects and remove it from the conference and _destroy() all of its child streams. commit 9bf185861238db37c973a1dfe497888eb5ea7598 Author: Olivier Crête Date: Fri May 13 19:48:42 2011 -0400 stream: add _destroy() method This will remove all references to other objects and remove it from the session. commit 4f5d87bc48fd2d595427b2deda307db3fd66215e Author: Olivier Crête Date: Fri May 13 17:35:17 2011 -0400 conference: Remove BaseConference Merge the FsConference interface and FsBaseConference All the plugins will use the base class commit 942c16ae7de74774e9d3466b82a60d9bf109d2cc Author: Olivier Crête Date: Thu May 12 16:14:25 2011 -0400 stream: Rename fs_stream_get_src_pads_iterator to fs_stream_iterate_src_pads This is for consistency with other Gst elements commit d7057e4088d6b03628fb1c574bd4e8c2a4fdaad1 Author: Olivier Crête Date: Thu May 12 16:10:02 2011 -0400 fs-conference: Rename file from fs-conference-iface.[ch] to fs-conference.[ch] commit 43050cc249532c66d957980259b2b57816db3269 Author: Olivier Crête Date: Thu May 12 15:58:46 2011 -0400 codec: Remove ABI/padding from FsCodec commit abfbf593d6c6834280d0d5dd6266eb51a903070f Author: Olivier Crête Date: Thu Feb 10 16:55:11 2011 +0000 Rename fs-enum-types.h to fs-enumtypes.h commit 0d96bce3ebbb625bf570394729556b8d2324ab75 Author: Olivier Crête Date: Thu Feb 10 16:40:05 2011 +0000 interfaces: Remove fs-interfaces Use nice-interfaces instead commit ee625ac37479928550ce9f4d47a003388ed47b0f Author: Olivier Crête Date: Thu Feb 10 16:34:17 2011 +0000 msnconnection: Use nice interfaces commit 1eb6d734e100cbacd7dddefaf0ea03be59f9400a Author: Olivier Crête Date: Thu Feb 10 16:08:18 2011 +0000 rawudp: Use nice-interfaces instead of fs-interfaces commit ba8b7d2818e7a78de47d40cc3aa4594458bb0193 Author: Olivier Crête Date: Wed Feb 9 11:25:04 2011 +0000 session: Remove transmitter creation from fs_session_new_stream() commit 49f40c71c2073c94c8f824e3bd1d7594211dc2e9 Author: Olivier Crête Date: Tue Feb 8 18:33:43 2011 +0000 msnstream: Port to use only set_transmitter also ported the tests commit 9f8848ea4ed24b7aa66d509be5507b02dfa28dd8 Author: Olivier Crête Date: Tue Feb 8 18:16:22 2011 +0000 tests: Use set_transmitter for raw tests commit 4aa321820f8c6b99d034c8ec5c7b391e4fe04b4e Author: Olivier Crête Date: Tue Feb 8 18:00:04 2011 +0000 tests: Use set_transmitter for rtp tests commit 0c8d9f6f03f908b1c9579ffc1f677baf5bed09db Author: Olivier Crête Date: Tue Feb 8 17:41:26 2011 +0000 tests: Remove unused header commit 2589b0aec011871f942d89a74e41360a05d41aa5 Author: Olivier Crête Date: Tue Feb 8 17:33:39 2011 +0000 msnstream: Implement set_transmitter() commit 3b462a9d63fc0dfbfe7eb91d962c4771236e1bc5 Author: Olivier Crête Date: Tue Feb 8 17:04:56 2011 +0000 rawstream: Implement set_transmitter() commit 49839f32d48adef791c5280c6bd6c236030f17de Author: Olivier Crête Date: Mon Feb 7 18:56:17 2011 +0000 rtpstream: Implement set_transmitter() commit b1524b5456537db80ffe60f970926ad1c447a058 Author: Olivier Crête Date: Mon Feb 7 18:29:48 2011 +0000 stream: Add set_transmitter() method commit 71decc1a43524d7a32e1b75a2bf256a7dba3a33a Author: Olivier Crête Date: Mon Feb 7 17:45:04 2011 +0100 stream: Remove set_remote_candidates() with add_remote_candidates() commit f8af52d65a721585e4b9125a92e1b1f65448f8dd Author: Olivier Crête Date: Mon Feb 7 17:30:02 2011 +0100 streamtrans: Replace set_remote_candidates() with add_remote_candidates() commit 4d3b2521dcaf27f5fd5682a45a723b495c98b4bd Author: Olivier Crête Date: Mon Feb 7 16:24:45 2011 +0100 session: Remove "codecs-ready" Now "codecs" is NULL until the codecs are ready commit 8b0c48cfc07464dc993ccca4c6635430c2bf3272 Author: Olivier Crête Date: Mon Feb 7 15:40:13 2011 +0100 shm: Use force_remote_candidates instead of set_remote_candidates commit 8f1682fdb15dda2aa0081cee0e05461a1ec5cdb9 Author: Olivier Crête Date: Mon Feb 7 15:39:42 2011 +0100 rawstream: Implement force_remote_candidates commit 252ce36964bf77858590e3f3a56d43b74718ff2b Author: Olivier Crête Date: Mon Feb 7 13:13:00 2011 +0100 rawconference: Remove cname parameter from new_participant() commit 9ba53f18d80976f12d4e4ca63d1b54cb0fdc7cae Author: Olivier Crête Date: Mon Nov 22 18:12:02 2010 -0500 session: Replace FS_DTMF_METHOD_IN_BAND with FS_DTMF_METHOD_SOUND commit c63836b5b6b662b80ef6bea2d5365cea313fe42c Author: Olivier Crête Date: Wed May 5 13:17:31 2010 -0400 rtpconference: Pass the SDES GstStructure as-is commit 631cad73bf08ae9c5b828d315f09ba659a835bb8 Author: Olivier Crête Date: Wed May 5 13:19:42 2010 -0400 gui: Remove usage of sdes-cname property commit e1e9025c2aa3a9effc2f9fb17ff92eb2903b6bb9 Author: Olivier Crête Date: Tue May 4 20:29:23 2010 -0400 codec: Remove special ptime/maxptime commit 56654e9555d741bbf4327f17b8c4e972de6b40b2 Author: Olivier Crête Date: Sat Jul 25 20:54:34 2009 -0400 multicast: Use force_remote_candidates, not set commit 6fe8daabcf8ba6fff6e7926330c6c4d64327a88c Author: Olivier Crête Date: Sat Jul 25 20:36:47 2009 -0400 rawudp: Use force_remote_candidates, not set commit 1e79915c6e26e57aafc91766c2fdeb9d08fe6d24 Author: Olivier Crête Date: Sat Jul 25 20:01:11 2009 -0400 session: Remove debug-msg from error signal commit 93491d1e99f3362023800094717b74ce546920dd Author: Olivier Crête Date: Sat Jul 25 19:50:05 2009 -0400 stream: Remove debug-msg from error signal commit cee1670b7a34e9de31bedbe5b7e4b7172b3225e2 Author: Olivier Crête Date: Sat Jul 25 19:39:47 2009 -0400 transmitter: Remove debug-msg from error signal commit af9c99feca26c3ca44dc321006ef4cc748100d44 Author: Olivier Crête Date: Sat Jul 25 19:32:29 2009 -0400 streamtransmitter: Remove debugmsg from error signal commit 720630513361d7f4ce7fe4e4108a96d6d5914fd3 Author: Olivier Crête Date: Sat Jul 25 19:24:34 2009 -0400 rawudp component: Remove error debug msg commit a0b8044350a2030402a220555003f24964309d2b Author: Olivier Crête Date: Sat Jul 25 19:19:42 2009 -0400 examples: Remove debug-msg commit 6632c4111ce4e03585b18620a14464242ed78467 Author: Olivier Crête Date: Sat Jul 25 19:18:24 2009 -0400 tests: Remove debug-msg commit e90b7f50ab103d8769eb0e0c3653bcffa67ffbd4 Author: Olivier Crête Date: Sat Jul 25 20:02:35 2009 -0400 conference: Remove debug-msg from documentation commit d41576225f9c6b31568be6453365d34b3dcc1077 Author: Olivier Crête Date: Sat Jul 25 19:03:27 2009 -0400 streamtransmitter: Derive from GstObject commit 6fd405efd6ecc1425e4eda9728b397e9a1e6f1de Author: Olivier Crête Date: Sat Jul 25 19:02:59 2009 -0400 transmitter: Derive from GstObject commit cf9e24032510df0bea3e43fd49a62d88ebb79ba3 Author: Olivier Crête Date: Sat Jul 25 19:02:32 2009 -0400 stream: Derive from GstObject commit c7b41d372cbc875f9748d202d1359c6e17f9f303 Author: Olivier Crête Date: Sat Jul 25 19:01:54 2009 -0400 session: Derive from GstObject commit b82a0f9bc0a6f8d19a153650e3bf1af60935a902 Author: Olivier Crête Date: Sat Jul 25 19:01:03 2009 -0400 participant: Derive from GstObject commit bebda696501be2868113f06d979a10b35acb5754 Author: Olivier Crête Date: Sat Jul 25 18:56:42 2009 -0400 participant: Remove unused error signal commit 6c479966098c96dce8b715cd8fa3f375d67fbb15 Author: Olivier Crête Date: Sat Jul 25 17:57:39 2009 -0400 participant: Move the cname property to the RTP subclass commit b1357f194fefaf3b2b119585383a386fff8be0a0 Author: Olivier Crête Date: Sat Jul 25 18:52:03 2009 -0400 conference: Remove cname parameter from new_participant() commit 29a7936ba2a08dc4b4f40daae41d40c2fc601b29 Author: Olivier Crête Date: Sat Jul 25 17:48:51 2009 -0400 Remove unknown cname error commit 0ad38341d101fbf7942e8bf9b08703acb7fdf6e4 Author: Olivier Crête Date: Sat Jul 25 17:48:27 2009 -0400 Restore full padding commit 3ebc62d310bf31db6931ccfe1a1d5ea11588c0e0 Author: Olivier Crête Date: Wed Feb 9 18:02:18 2011 +0000 Build introspection data commit 09b6afa0ade08c64c201a2ee8d458f493a027720 Author: Olivier Crête Date: Wed Feb 9 18:05:54 2011 +0000 Add introspection annotations commit 67d47857389ed45fbba4e7789f6ba92051dda2bb Author: Olivier Crête Date: Thu Feb 10 17:20:26 2011 +0000 elementaddednotifier: Add defaults function commit 73851cc96165c5df80c0379e3688cc6eff96cfe0 Author: Olivier Crête Date: Tue Oct 11 15:20:16 2011 -0400 codec: Make FsFeedbackParameter into a Boxed type commit e536c5e0b57f8f0becb5566a2d12bbf8d6f5c2f8 Author: Olivier Crête Date: Wed Feb 9 18:06:52 2011 +0000 codec: Make FsCodecParameter into a Boxed type commit f0f07f51f14a91d9dda04ef86cae221f154df55b Author: Olivier Crête Date: Wed Feb 9 18:06:37 2011 +0000 Put enums in introspection friendly format commit b468d0864a2c105a0026a8db5364156f041f64bc Author: Olivier Crête Date: Wed Feb 9 14:29:25 2011 +0000 lib: hide the _fs_base_conference_init_debug symbol commit 54f2bdf02ba3b47c83ca411d4a31f08bcbe2ff14 Author: Olivier Crête Date: Mon Oct 10 16:24:42 2011 -0400 Version 0.0.31.1 commit 68056b822543998b4943ea2648845b8fb62e579f Author: Olivier Crête Date: Mon Oct 10 15:59:44 2011 -0400 Version 0.0.31 commit f7441b7b8d24cf310a06d385f1242cbc47257bf8 Author: Olivier Crête Date: Mon Oct 10 12:09:00 2011 -0400 rtpkeyunitmanager: Make sure the variable is initialised before using it Bug reported by Sjoerd's compiler commit 6fd0f858a666097ccad7bcdbfa15c3b6b4ad5109 Author: Olivier Crête Date: Mon Oct 10 12:10:26 2011 -0400 tests: Check for passing the config data through the remote codecs commit 17884a6c9aa1847441821f0958e978d39f7c6ccb Author: Olivier Crête Date: Sun Oct 9 17:30:09 2011 -0400 rtpsubstream: Restore the capsfilter for the recv caps commit 802862f9dc0cc8dfde51e647c0625a6c289e27c7 Author: Olivier Crête Date: Sun Oct 2 22:00:59 2011 -0400 rtp: Disable TFRC from default config commit bd43fb41e48b131dc21f88bb456d05a3931a9284 Author: Olivier Crête Date: Sun Oct 2 21:55:51 2011 -0400 rtpkeyunitmanager: Hardcode FIR type in there as it's not in libgstrtp yet commit 0ce4e886950c7d56ed40aa939a521abd7c7a1540 Author: Olivier Crête Date: Fri Sep 30 17:46:15 2011 -0400 rtptfrc: Deal correctly with the other side resetting its algo So it works fine if the other side stop and restarts sending. commit 4fcf2d71a65fde17b5c1bf4e044b63e28a4bb619 Author: Olivier Crête Date: Fri Sep 30 03:25:23 2011 +0300 bitrateadapter: We don't hold a ref commit 829928c7854754b173136f5617d298d09ff9bdc0 Author: Olivier Crête Date: Thu Sep 29 18:50:23 2011 -0400 rtpbitrateadapter: Make sure the async clock callback not called when in the wrong state commit 4b31587e7fe714ff5e197ae730f6c05002b5521d Author: Olivier Crête Date: Thu Sep 29 20:28:49 2011 -0400 rtptfrc: Clear byterate limiter when one stops sending commit e7cdc578e781d7da57b1dbe8c6ce5375173b44cc Author: Olivier Crête Date: Wed Sep 28 17:50:02 2011 -0400 rtptfrc: Invert the API, reduce the footprint inside FsRtpSession commit 529b9b62ca72baf24260930663e2fd0e3c61e7d6 Author: Olivier Crête Date: Wed Sep 28 14:56:38 2011 -0400 rtptfrc: Dynamically add and remove the packet modder commit a799325d87830947e62a1c43dd22ceb8488693a3 Author: Olivier Crête Date: Mon Sep 26 19:01:01 2011 -0400 rtptfrc: Reset tfrc algo when we stop sending commit 6abf465c7227b679c074afb2d4befe794fb71d25 Author: Olivier Crête Date: Tue Sep 13 16:07:48 2011 -0400 rtptfrc: Print warning when filtering out TFRC commit 0cfd3c8a5fb2038a96908bb7d6d12361cbf94741 Author: Olivier Crête Date: Tue Sep 13 16:07:18 2011 -0400 rtpbitrateadapter: Remove g_debug commit c11f3aa0470ae9727bb6f4f752748355c4c33e57 Author: Olivier Crête Date: Tue Sep 13 16:06:54 2011 -0400 rtpbitrateadapter: Allow lower framerates if higher ones not available If the higher framerates are not available, allow the lower ones commit 62fd2e5df73d323d7d920968e6d238b0a823b17c Author: Olivier Crête Date: Tue Sep 13 16:06:10 2011 -0400 rtptfrc: Use the right URN for rtt-sendts commit 5a5a309d21e37ac1f8c36993638102591aee98ba Author: Olivier Crête Date: Thu Sep 8 21:32:21 2011 -0400 rtpkeyunitmanager: Add object to disable automated keyframes when they're not needed commit 8cc3956dfe71f9a44209912cd64262f946f7c64b Author: Olivier Crête Date: Mon Aug 29 20:01:38 2011 -0400 rtpbitrateadapter: Let template caps through Let template caps through so someone else can use a different algo to pick the resolution and framerate. commit a669c2a7de33f0da40707504089af9c2e1f3174c Author: Olivier Crête Date: Fri Aug 26 12:12:58 2011 -0400 rtpbitrateadapter: Emit message from the fs-rtp-session commit 095475e2eb9b703de4736d851860f167ad625ba0 Author: Olivier Crête Date: Fri Aug 26 12:12:34 2011 -0400 rtpbitrateadapter: Add _new function commit c576f3e07d1d85085a1a16ac0954cf2728d3b34f Author: Olivier Crête Date: Thu Aug 25 22:29:13 2011 -0400 rtpbitrateadapter: Name variable more accurately commit 245081f2dc8fbd168ed89f5e6113a12959239d4b Author: Olivier Crête Date: Thu Aug 25 22:14:50 2011 -0400 rtpsession: Integrate bitrate adapter Attach the bitrate adapter commit 2dade46d6236ac39751b2ecdf26b0301de721ad2 Author: Olivier Crête Date: Tue Aug 23 16:52:01 2011 -0400 rtpbitrateadapter: Make resolution adaptation more sanely Adapt to mean-stddev bitrate, hoping that this is a good long term value commit 76946b6ba9474a3536757dda9514ca6cf4d63aa2 Author: Olivier Crête Date: Thu Jul 28 14:23:07 2011 +0100 rtp-bitrate-adapter: 20 sounds like a good number commit 336ac9e99bf4a9fc58bfdf659706157f7e5a80a2 Author: Olivier Crête Date: Thu Jul 28 12:14:40 2011 +0100 rtpbitrateadapter: Make updates always at least 30 secs appart commit 99dad90959932c47a14d151e5ed62bdb0e537ef0 Author: Olivier Crête Date: Wed Jul 27 16:18:05 2011 +0100 rtp-bitrate-adapter: Remove unused rtp caps commit f138ad007fdec708807020c3a817430bfc280571 Author: Olivier Crête Date: Wed Jul 27 18:57:50 2011 +0100 rtp-bitrate-adapter: Simplify the algorithm Only allow some fixed resolutions and then bracket them by bitrate commit 02ee31d7917dab248928d1ea173ad721a56cb347 Author: Olivier Crête Date: Wed Jul 27 18:56:19 2011 +0100 rtp-bitrate-adapter: Replace buffer-alloc with property notification The source probably has to be restarted, so give an indication to the application commit 08cfb22915ca286bf89c528d0061337901e9506e Author: Olivier Crête Date: Wed May 4 18:11:08 2011 -0400 rtpbitrateadapter: Wait until the end of the interval to force a change Don't force a change before the end of the interval commit 559a85e00a7648736d7c6a99c66cbf7b6b30ea19 Author: Olivier Crête Date: Tue May 3 15:12:56 2011 -0400 rtpbitrateadapter: Add element to adapt resolution/framerate based on the bitrate New element that will generate a caps change if required commit b59f3ceb78007613bcaa97bc589ce30d65713b62 Author: Olivier Crête Date: Tue Apr 26 17:05:21 2011 -0400 rtptfrc: Move parameterless initialization to _init commit e9e2f5b37a73b8113aa37aab7476ef026bd50a74 Author: Olivier Crête Date: Wed Jun 22 16:06:30 2011 -0400 tfrc: Turn on inst_rate by default commit 5628addcf92446342d65f3a85cdf9aec735c539d Author: Olivier Crête Date: Wed Jun 22 16:05:28 2011 -0400 tfrc: Update inst_rate on no-feedback too commit d83f037cda8583ef4ae41737dc851d9af6b4591f Author: Olivier Crête Date: Thu Jun 16 02:46:44 2011 +0300 rtptfrc: Centralise bitrate update commit 60c42af6acd76dad8a43a24c1a3fc7c3f5e18628 Author: Olivier Crête Date: Mon Jun 13 20:20:54 2011 -0400 tfrc: header size is a constant, treat it as such commit 11120f09b8adeae2f977f0be0dcd4f828fe9d3be Author: Olivier Crête Date: Mon Jun 13 20:19:36 2011 -0400 tfrc: Start at 20kB/s instead of the default 1.5kB/s commit 32ef8661beddbb77fbb885333d9f830221411553 Author: Olivier Crête Date: Mon Jun 13 14:57:26 2011 -0400 tfrc: Only use inst rate once it has been set commit 8e9a92e86ff811d3c0e7d13688f4f5e042ebc004 Author: Olivier Crête Date: Wed Jun 8 18:38:26 2011 -0400 rtptfrc: Make sure the time variable is initialized before using it commit 99000fb1accee361d7b897bfa8763938b5dcd7d4 Author: Olivier Crête Date: Wed Jun 8 14:28:34 2011 -0400 tfrc: Make sure the feedback packets are not supressed by mistake commit 5f2252f30feaee936b957afa6e019f48609a2041 Author: Olivier Crête Date: Tue Jun 7 14:34:02 2011 -0400 tfrc: Don't start the feedback timer before the sender RTT is received commit e3eb402a7311e49fbe3fea093043613d02060c2f Author: Olivier Crête Date: Mon Jun 6 18:24:54 2011 -0400 tfrc: t_mbi is a constant so capitalize commit 491818a636a09d4e361a299191fde12f8125f759 Author: Olivier Crête Date: Mon Jun 6 15:05:57 2011 -0400 tfrc: Wait at least 20ms before declaring a feedback packet as lost commit 311104492ccbe0c86a5a7a1bd2c9972293c71087 Author: Olivier Crête Date: Mon Jun 6 15:05:06 2011 -0400 tfrc: Switch over to using usecs instead of msecs commit e7997447a7726f0b5fecfdaf951b855154ad8312 Author: Olivier Crête Date: Fri Jun 3 18:17:03 2011 +0100 int64 in tfrc commit 1db256e6be79b199141e9831db23ec496118a7d9 Author: Olivier Crête Date: Fri Jun 3 17:43:28 2011 +0100 tfrc: Use gst_util_uint64_scale_round when it is useful for added safety commit 0b775c19015d4e1fe15652d45d3999c2ea208c5e Author: Olivier Crête Date: Fri Jun 3 17:05:35 2011 +0100 tfrc: Replace 1000 with a define commit 3162db28947078dc8a5c49b92a09ebee6a2de47a Author: Olivier Crête Date: Thu Jun 2 18:23:40 2011 +0100 rtptfrc: Make the on-the-wire timestamps be usecs commit 66f1ccbf7c3abb89625b3a07bd1b91349f360af5 Author: Olivier Crête Date: Thu Jun 2 18:15:30 2011 +0100 tfrc: Use guint64 everywhere to refer to timestamps commit fd293eda533722a79be2d31b774c9c1518e0adb7 Author: Olivier Crête Date: Thu Jun 2 18:03:44 2011 +0100 rtptfrc: Use guint64 for all timestamps commit 319ccdcff14cfd9bbe1c562e6c6db1b6857b6f38 Author: Olivier Crête Date: Thu Jun 2 17:54:25 2011 +0100 rtptfrc: Deal with ts cycles for the sender side commit 55daf846ab30a8ff6d057395f951d7a38855fe17 Author: Olivier Crête Date: Thu Jun 2 13:58:40 2011 +0100 rtptfrc: Handle ts rollovers for incoming RTP packets commit eaae463a9773521699f6f6d0dd4149a44ec1f1a0 Author: Olivier Crête Date: Tue May 24 17:53:53 2011 +0300 tfrc: Print recover rate when halving the rate commit 5580981d0d7d2197f301ef56633c8b5c535bb1e7 Author: Olivier Crête Date: Tue May 24 17:37:39 2011 +0300 rtptfrc: Ignore timeouts that are called after their ID has been removed commit 103f349765ab52612ec7200333804b3676e7539b Author: Olivier Crête Date: Tue May 24 17:14:17 2011 +0300 tfrc: Recompute initial rate when RTT changes The initial rate is really a function, not the actual initial rate, so recompute it every time. The RTT might change during a call, so the rate used as the recover rate should use the updated RTT. commit bac20153465fd898ffb47f80b935e4ca44e091a2 Author: Olivier Crête Date: Tue May 24 17:50:39 2011 +0300 rtptfrc: Add debug message on sending RTP commit c4db37c1aa1e27ac866e6b3863c8b096b81a2534 Author: Olivier Crête Date: Mon May 23 20:29:57 2011 +0300 rtptfrc: Use GST_*_OBJECT logging macros commit 71ac7b25d46ae0f5458a9aea129d47742607f23a Author: Olivier Crête Date: Mon May 23 14:12:55 2011 +0300 rtptfrc: Time in async clock feedback is requested time The time in the async clock feedback is the time the event was requested for, not the time when it was delivered, so let's read the time from the clock again. commit 99d5ff3881bb979b4d813f5c28bcac223259ae98 Author: Olivier Crête Date: Mon May 23 14:09:11 2011 +0300 rtptfrc: Don't ignore reports with 0 RTT A RTT is 0 is valid, it just means its less than 1 ms, like on a loopback device commit 606954d9610a9e7256f1e3b007cc5d752c99fecc Author: Olivier Crête Date: Fri May 20 21:10:38 2011 -0400 tfrc: Correct debug message, p is not required commit f7e4bafe2b3c73418c6fef8ec62d0480d54137d5 Author: Olivier Crête Date: Fri May 20 21:05:50 2011 -0400 rtptfrc: Add source to hashtable when its ssrc is found commit 09dcfa6a68db36f7c0ae7553902f62879193ab55 Author: Olivier Crête Date: Fri May 20 19:20:55 2011 -0400 rtptfrc: Remove unused get commit 48188ecbc99f70e4ced43ba029e1f0c97915e74e Author: Olivier Crête Date: Fri May 20 19:20:40 2011 -0400 rtptfrc: Mae sure the last src is set on validation if possible If a source is validated before getting any rtcp message from it, then make it the last_src commit 2faff4a788d45efa50be8510fb0a743c9fa27684 Author: Olivier Crête Date: Fri May 20 18:44:14 2011 -0400 rtptfrc: Remove duplicated on-ssrc-validated hook commit ac610ac59521e5fc309178bc062a1a04117b8ef6 Author: Olivier Crête Date: Fri May 20 18:06:09 2011 -0400 rtpsession: Only add tfrc once Add tfrc once, and only to video for now commit 87e7fd221a723ee6a90b69b5a7886bc54d5ee014 Author: Olivier Crête Date: Fri May 20 17:52:54 2011 -0400 tfrc: Rename on_fb to fb in debug to avoid confusion with no_fb commit 49ac37140fc68c66ea46d535ac37f9490083befa Author: Olivier Crête Date: Fri May 20 17:30:37 2011 -0400 tfrc: Don't halve rate if no packet has been sent This is the second case for RFC 5348 4.4 1 commit 0cd5347bc9931cdb360063f1dcdfb45b464bb692 Author: Olivier Crête Date: Fri May 20 17:29:33 2011 -0400 tfrc: Don't let averaged rtt fall down to 0 even if its lower than 1ms commit 8f8265d39d3864d75fca1d1c21ab450d6ed2ad56 Author: Olivier Crête Date: Fri May 20 13:30:24 2011 -0400 rtptfrc: Only reset the feedback timer when feedback is sent Wait until the feedback is sent to set the new feedback timer, the time of the next feedback message is only computed when the next one is ready anyway. commit 6e8c87f94d9c0d298a6d8d85c6233f19d4211336 Author: Olivier Crête Date: Fri May 20 13:21:37 2011 -0400 rtptfrc: Hold lock while modifying object members commit 0e6ccbd48a26d5f6288f1f85a95a015b9e8c295f Author: Olivier Crête Date: Thu May 19 17:10:44 2011 -0400 tfrc: Fix -Wunused-but-set warnigns from GCC 4.6 commit cbadf0d0c4ab5e09039da470667c4abee2030bd7 Author: Olivier Crête Date: Tue May 17 17:54:18 2011 -0400 tfrc: Put %p of structs in debug commit fd47b72b355e7e8a805d6de568795112a96e61d8 Author: Olivier Crête Date: Tue May 17 17:09:53 2011 -0400 rtp: Put nack/pli and tfrc in the default codec where appropriate commit 089367412cdda0f4bb121d2dc0fd655e0cbb5ef3 Author: Olivier Crête Date: Tue May 17 17:09:14 2011 -0400 rtptfrc: Ignore sender timer if the source's sender is gone commit 0561312154da7f6e5a9a1ce418de3b88fc3dd826 Author: Olivier Crête Date: Tue May 17 17:08:40 2011 -0400 rtptfrc: Don't leak clock ids commit 0bfb497bfa1f32310e81fc31501da16c0c8787d4 Author: Olivier Crête Date: Mon May 9 14:13:23 2011 -0400 rtptfrc: Disable syncing without a valid timestamp commit 72d9fcbee6369d5d81ce6a35579f83ea0a6e6cb6 Author: Olivier Crête Date: Mon May 9 14:11:40 2011 -0400 rtppacketmodder: Reduce some debug messages to LOG level commit 2846c431f146f163d7d51e620b2c150087def716 Author: Olivier Crête Date: Thu Apr 21 16:08:11 2011 -0400 rtpsession: Don't set bitrate from tfrc before getting the codecs Only set the bitrate from tfrc once the codecs have been set commit 624fe60999db909f082795a0a8a5d1f9a034ecd8 Author: Olivier Crête Date: Thu Apr 21 15:53:51 2011 -0400 rtpsession: Don't leak rtp_tfrc Don't leak rtp_tfrc on dispose commit d7b30527ea1a0f4791d6bc1480ab2781d3bed59d Author: Olivier Crête Date: Thu Apr 21 15:51:59 2011 -0400 rtptfrc: No instance is required for the filter function Filtering codecs doesn't require a FsRtpTfrc instance, so don't depend on one commit ac639f6ea761fa147d61735496035010e2e0548c Author: Olivier Crête Date: Wed Apr 20 20:06:23 2011 -0400 tfrc: Estimate segment size to compute the initial loss interval Estimate the segment size to compute the initial loss interval to try to reduce the amount of the jitter at the start of the connection commit f79821d257f813240f900c62c762f3a131289124 Author: Olivier Crête Date: Wed Apr 20 19:20:40 2011 -0400 tfrc: Use computed average of the segment size at the sender commit 761f4ac5c9b398c79930e0766aab8ad82c7c5e0c Author: Olivier Crête Date: Wed Apr 20 17:44:12 2011 -0400 rtptfrc: Print changes to the sending rate commit f7c1a65a830ee1c4d8d5b1f9b813e00a53edbcff Author: Olivier Crête Date: Wed Apr 20 17:42:38 2011 -0400 tfrc: Add sender-side debug prints commit 3e363a98dcae442269e6ea7d70116330b25e0957 Author: Olivier Crête Date: Wed Apr 20 17:40:53 2011 -0400 tfrc: Produce separate debug for sender and receiver commit 9d03ab1071e68d3699948d44aa023100db9c5965 Author: Olivier Crête Date: Wed Apr 20 16:50:00 2011 -0400 tfrc: Compute the first loss interval correctly Follow RFC 5348 section 6.3.1 to compute the first loss interval from the interval that would have been required to produce the observed rate commit db369c1dd7596c072dd7cfc6e5eabcf103820732 Author: Olivier Crête Date: Wed Apr 20 13:44:30 2011 -0400 rtptfrc: Work around slighly misordered packets Need to make it more reliable in the case of timestamp or seqnum jumps commit d84189f6f7ee702b31dec21437a9f33cfccbbb73 Author: Olivier Crête Date: Tue Apr 19 18:56:10 2011 -0400 tfrc: Correct comment on TCP throughput equation commit ec9e01708e07e1f374b71d67836afa17b9cc40c1 Author: Olivier Crête Date: Tue Apr 19 18:55:08 2011 -0400 tfrc: Reformat TCP througput equation commit a929687ff3ebd8ec945e7e01cb92bb5036e12c6d Author: Olivier Crête Date: Tue Apr 19 17:17:44 2011 -0400 rtptfrc: The bitrate its in bits/sec, not bytes commit 2900e3669f0bec502596fe80e88ec5f6646c3079 Author: Olivier Crête Date: Mon Apr 18 17:15:39 2011 -0400 tfrc: Remove dangerous loop and replace with a direct computation If there is less than one packet received in a RTT, then just jump to the next packet to compute the next loss interval. commit 01a993a9f921b677b64eb6372f72128504d32a55 Author: Olivier Crête Date: Fri Apr 8 19:31:48 2011 -0400 tfrc: Remove max_index < 1 assert commit fbdf83284ec339f86b48bcba19bdbd9b79c853a8 Author: Olivier Crête Date: Fri Apr 8 18:03:07 2011 -0400 rtptfrc: Split packet modification and synchronization commit e3506a7f31343bfe10a143398a3b2c32cbc3ac11 Author: Olivier Crête Date: Fri Apr 8 17:56:37 2011 -0400 packetmodder: Use do/while for do/while commit 237d7a0bb88b71b637fa324553b67bc276788a76 Author: Olivier Crête Date: Fri Apr 8 17:55:56 2011 -0400 packetmodder: Sync on ts, not on buffer commit 305049bf9d2370e8d9065d55de041a06cb9bc366 Author: Olivier Crête Date: Fri Apr 8 17:53:30 2011 -0400 rtptfrc: Remove BufferList support Let's try to learn to walk before we can run commit f302ddbf87aee9ee3b584ea1735f677f8dcc479f Author: Olivier Crête Date: Fri Apr 8 14:52:42 2011 -0400 packetmodder: Factor out clock sync commit 50688ff3170dcf5ce1b6802ec576f4489e468b15 Author: Olivier Crête Date: Thu Apr 7 19:06:29 2011 -0400 tfrc: Verify data limitedness through throttling mecanics commit 425667e528f1615fc6578d45e54b2b6bb5d5c59c Author: Olivier Crête Date: Thu Apr 7 18:49:28 2011 -0400 rtptfrc: Delay packets to strictly enforce sending rate commit 31c3d5d13acbb53e8ad584830e5f714fddcd93b5 Author: Olivier Crête Date: Thu Apr 7 16:43:42 2011 -0400 rtptfrc: Remove implemented TODO commit 4047b09502bb4b9f8ab9e973da7f9046bd9a2afc Author: Olivier Crête Date: Thu Apr 7 15:25:05 2011 -0400 packetmodder: Sync buffers to the clock commit 8b1b112bfc1dfe5f3970961923c4e94799a23329 Author: Olivier Crête Date: Thu Apr 7 15:11:09 2011 -0400 packetmodder: Always merge groups commit 3a7b38163e831709e5e65566b4c45f306eb09cdb Author: Olivier Crête Date: Thu Apr 7 14:53:01 2011 -0400 packetmodder: Don't push on error and return it correctly commit 0e5b20b77dc5d3546ee1dc1f0ea5222cb64fd2bf Author: Olivier Crête Date: Mon Apr 4 21:02:56 2011 -0400 tfrc: Simplify adding to history commit 2be984d331cd3f33b598cde7c51d2600c778efd5 Author: Olivier Crête Date: Mon Apr 4 19:57:49 2011 -0400 rtptfrc: Ignore any feedback packets that are older than the newest one received This should help make the RTT evaluation better commit 63dd709f4117debb932b945caccea6bebb6cc4c8 Author: Olivier Crête Date: Mon Apr 4 19:46:34 2011 -0400 rtptfrc: Use averaged rtt to compute the data-limitedness commit 6f2df7b86c5ed134acb0d07dc44ecf9f5f9d6435 Author: Olivier Crête Date: Mon Apr 4 18:36:34 2011 -0400 tfrc: Put memmove args in right order commit dc8afb0a133abfef074106b2086864703ef4d44a Author: Olivier Crête Date: Mon Apr 4 18:21:42 2011 -0400 tfrc: Pass parameters in the right order.. commit 34952c6e0406ff195d368dd3d29734e172b44580 Author: Olivier Crête Date: Mon Apr 4 17:16:59 2011 -0400 tfrc: Make sure multiplication doesn't overflow commit d327807d1f3ab85a7b6dec364893e85555adff7f Author: Olivier Crête Date: Mon Apr 4 15:39:17 2011 -0400 tfrc: Don't send more than one feedback msg for milli-second commit c5e9f084eda80f8fe9ed1b6a89de3948b35e054f Author: Olivier Crête Date: Fri Apr 1 20:03:32 2011 -0400 rtptfrc: Don't try to access tracked source before fetching it commit 9441e312e7c38ec5a8802489160ab5b4c6875ee0 Author: Olivier Crête Date: Fri Apr 1 17:46:48 2011 -0400 tfrc: Make sure we don't exceed G_MAXUINT commit 8ebddda90a3af157c4ee4f92585366894f931002 Author: Olivier Crête Date: Fri Apr 1 17:45:12 2011 -0400 tfrc: Simplify getting max recv rate commit 887bcd5c9baffa870c3253048ffb4ee85d620d41 Author: Olivier Crête Date: Fri Apr 1 17:11:53 2011 -0400 rtptfrc: Make sure bitrate doesn't roll over G_MAXUINT commit 379efade84388e0a7686bc3e9c52ebe5d48d3341 Author: Olivier Crête Date: Wed Mar 30 20:30:44 2011 -0400 rtptfrc: Only send requested feedback commit 0ff0d3a8d2b017b77970ea8c91ef1ab8a2623ea2 Author: Olivier Crête Date: Wed Mar 30 20:19:04 2011 -0400 tfrc: Use R_(m-1) instead of R_m for x_recv computation commit a8aa29c1f956fae5d599ba1fe98cc13c6c77ce5d Author: Olivier Crête Date: Wed Mar 30 20:02:18 2011 -0400 tfrc: Compute x_recv and p as the last possible moment commit 98da8cfd36dc7edcd702b5589d8040eca348b554 Author: Olivier Crête Date: Wed Mar 30 19:03:04 2011 -0400 rtptfrc: Track initial source more directly commit 2a18366132e9b1497b05988d5f6c30f7b83ce414 Author: Olivier Crête Date: Wed Mar 30 18:37:29 2011 -0400 rtptfrc: Fix first rtt detection commit d068041c4b243ba59dd7cb3442745c675cb61135 Author: Olivier Crête Date: Wed Mar 30 18:37:14 2011 -0400 tfrc: Sync max rtt handling commit ed4e043547719a34ed7c619429d55d578e11eb6b Author: Olivier Crête Date: Wed Mar 30 18:11:02 2011 -0400 rtptfrc: Verify sender pointer before using it commit 063504feb8f8e053085ccb817039885de35c7a7d Author: Olivier Crête Date: Wed Mar 30 17:51:40 2011 -0400 rtptfrc: Start timer when creating sender src on first sent packet commit b4ba7ff6584d0d03808e99e5911a1900a427dc5e Author: Olivier Crête Date: Wed Mar 30 17:48:50 2011 -0400 rtptfrc: Created tracked source as first as the first packet is sent commit 89a7b9e85c20d4939d498679939babeb243297da Author: Olivier Crête Date: Wed Mar 30 17:48:31 2011 -0400 rtptfrc: Factor out TrackedSource allocation commit b7d53ff611d821b1056e02317111cf495e8d8d86 Author: Olivier Crête Date: Wed Mar 30 17:47:14 2011 -0400 rtptfrc: Rename free function commit 78d40c279bd22d41b8d2b084d4ed35bf2c7f9afe Author: Olivier Crête Date: Wed Mar 30 17:36:13 2011 -0400 rtptfrc: Remove unused variable commit 369a34222db9ad5b6725af9dd6e0ec3e71d43617 Author: Olivier Crête Date: Wed Mar 30 17:03:36 2011 -0400 rtptfrc: Tell all tracked sources about sent packets commit 9bbe1bdef7cffe0a254559c4168a5dcb2421f698 Author: Olivier Crête Date: Wed Mar 30 15:55:42 2011 -0400 tfrc: Send initial rate if TfrcSender not initialised commit c2ca73e3f1ee9df67309ba647b8cbdc08ced49ba Author: Olivier Crête Date: Wed Mar 30 15:40:57 2011 -0400 tfrc: Use RTO to set nofeedback timeout commit 710a339651e6f3b0d3902e341559528add908090 Author: Olivier Crête Date: Wed Mar 30 15:32:24 2011 -0400 tfrc: Keep track of sending packets commit 1fab89561bb579c4492e00f0eec56b3a335f14a2 Author: Olivier Crête Date: Wed Mar 30 15:20:35 2011 -0400 rtptfrc: Add some G_LIKELY commit d669712bcf6d6e81ecabfe342dbfd8725eb106b6 Author: Olivier Crête Date: Mon Mar 28 17:30:46 2011 -0400 rtp: Set tfrc rate from start if enabled commit f3946c186204bed23f8a3156be25d85d5b4b2a34 Author: Olivier Crête Date: Mon Mar 28 17:30:27 2011 -0400 rtptfrc: Lock codec negotiation commit 25f38e115a25584abfdffb392561ce14a1ddbc16 Author: Olivier Crête Date: Mon Mar 28 16:35:06 2011 -0400 tfrc: Smooth out sender RTT at the receiver too commit 3d5b1d5502b13708a70eaba0ed40af83c190c4f1 Author: Olivier Crête Date: Fri Mar 25 16:39:57 2011 -0400 tfrc: Don't emit seqnums outside of the seqnum interval commit 48f5dce4841fb0c6eb2a0c14ca8b68ec5c07b02b Author: Olivier Crête Date: Fri Mar 25 16:38:03 2011 -0400 tfrc: Add a bit more debug info commit 29d739b0eb553ab290aeb32e22a89e66ba934d20 Author: Olivier Crête Date: Thu Mar 24 17:03:57 2011 -0400 rtptfrc: Send averaged RTT as sender's estimate commit b294cd3af2fdb5b243408b554f544389a5d8fcc7 Author: Olivier Crête Date: Thu Mar 24 15:42:02 2011 -0400 tfrc: Remove artificial bitrate limitation commit 3df89593f60540c824b8ba3c7977e2c36c8dc160 Author: Olivier Crête Date: Mon Mar 21 17:53:20 2011 -0400 rtptfrc: Correctly send max_delay as a guint64 to "send-rtcp" action signal commit 11bdb4c7e6a261211726354973272afda526aee4 Author: Olivier Crête Date: Tue Mar 1 21:04:02 2011 -0500 rtptfrc: Fix leak commit 53abb8407ef88b9a83a979eeaf8b66f3960ac112 Author: Olivier Crête Date: Thu Feb 3 15:12:31 2011 -0500 rtptfrc: Keep list of codecs that do TFRC commit 0a9ed8aa73c19de4f53babca31da770483ff1bfc Author: Olivier Crête Date: Thu Feb 3 15:56:07 2011 -0500 rtptfrc: Only send TFRC feedback if hdrext was seen and negotiated When getting a RTP packet, ignore it if it isn't a type for which TFRC feedback was negotiated. commit 464ab51e47e350616ecd9eda85e91c8b5917e3ba Author: Olivier Crête Date: Fri Feb 18 17:47:38 2011 -0500 rtpsession: Print debug message when setting bitrate commit 93289c67af7d79bcaf79b7923543a463e22c9cce Author: Olivier Crête Date: Wed Feb 2 17:17:48 2011 -0500 rtptfrc: Use the hdrext id that has been negotiated commit bd07039094eca57182d71314c0d32bfbc32c4b44 Author: Olivier Crête Date: Wed Feb 2 17:16:57 2011 -0500 rtptfrc: Negotiate the TFRC hdrext and rtcp-fb parameters Add a new negotiation filter for TFRC commit cd1a0831ef6d326db90380d20e4d57ea1887d555 Author: Olivier Crete Date: Tue Oct 19 17:16:10 2010 +0100 tfrc: Fix loss event rate computation algo again Fix some more bugs in the loss event rate computation, also add some optional debugging code to find future problems. commit dba378765d06da5503e43271937bb27f7feb0570 Author: Olivier Crete Date: Tue Oct 19 17:10:54 2010 +0100 tfrc: Add method to use the instantaneous rate to reduce oscillations This is suggested for slow links by RFC 5348 section 4.5 commit 4bea2b47a388e17bc33741163361ed79420c389a Author: Olivier Crête Date: Fri Oct 1 17:59:19 2010 -0400 tfrc: Correct computation of the Average loss rate commit efded9e57eb6262c5b253162f3ef7c79aac5e67e Author: Olivier Crête Date: Fri Oct 1 17:44:01 2010 -0400 rtpsession: Print the bitrate as unsigned commit 0794a03f983724343824f7f59264e5d6ca3981c8 Author: Olivier Crête Date: Fri Oct 1 17:43:38 2010 -0400 tfrc: Put a a ceiling on the sending rate commit 43610eb5dc708e8d0c8adad11595e07ca969ebec Author: Olivier Crête Date: Mon Sep 27 20:07:57 2010 -0400 tfrc: Make data-limited checker work commit 29b7d3882a53dc5acf68e4c61ef60ec6475f7b88 Author: Olivier Crete Date: Mon Sep 27 23:43:10 2010 +0100 tfrc: Keep a minimal history in time Keep a minimum of 10 RTTs of packet history, it may be a bit too much but it works better if we have lots of packets lost one by one. commit 3a137c0230e869660f4b895b19b4972522c29c15 Author: Olivier Crête Date: Mon Sep 27 16:21:48 2010 -0400 tfrc: Re-do the algorithm to find loss intervals commit d31d9e688e3fc64caaec815878f72bac2fcb052c Author: Olivier Crete Date: Fri Sep 24 01:37:14 2010 +0100 tfrc: Document another case commit 0854a8b31a5efce57b76b0871aceb0d9c218e16b Author: Olivier Crete Date: Fri Sep 24 01:36:23 2010 +0100 tfrc: Fix loss event rate computation commit 6af55efa666148cafcaface86f424bc80604dd3e Author: Olivier Crete Date: Fri Sep 24 01:33:04 2010 +0100 tfrc: Initialise lost_count to 0 commit 571b930d68b233ec7e6901ba3833c77430bdf539 Author: Olivier Crete Date: Fri Sep 24 01:32:11 2010 +0100 tfrc: Improve identation commit 19e519a51df42015dc1b5f7a26cc9fc54a653167 Author: Olivier Crete Date: Fri Sep 24 01:28:03 2010 +0100 tfrc: Manipulate the loss event rate as a double The loss event rate is between 0 and 1, so manipulate it as a double instead of a guint. commit 48b5197fc3cd065e1aeab133c1f38bd3623f63d4 Author: Olivier Crête Date: Tue Sep 21 17:43:21 2010 -0400 rtptfrc: Prevent computer RTT from being 0 commit 75381cf6e3fe2a6ac17b701379e03d03e082d2d7 Author: Olivier Crête Date: Mon Sep 20 19:40:06 2010 -0400 rtptfrc: Transform send rate from bytes to bits commit 5eb01b9272dc8e77f93f93a493250a2674bd7bdf Author: Olivier Crête Date: Fri Sep 17 16:27:09 2010 -0400 rtpsession: Print the bitrate as it is being set commit fece6e17f053214bbeb41cfa00bc08022f39296e Author: Olivier Crête Date: Fri Sep 17 16:23:13 2010 -0400 rtpsession: Only use TFRC for Video for now commit 05e6b820e4bd8dfcb650e8a3a8db0136f9d453c7 Author: Olivier Crête Date: Wed Sep 15 17:25:58 2010 -0400 rtpsession: Propagate TFRC decided bitrate commit 0fec959dfc682d68365bc687e578aaed42b45568 Author: Olivier Crête Date: Wed Sep 15 16:13:02 2010 -0400 rtptfrc: Export the desired bitrate commit e9e9a8faa7e1a0a31781c549b04a3fb7165e26d3 Author: Olivier Crête Date: Thu Sep 2 21:24:27 2010 -0400 rtptfrc: Make disposal of timer thread safe commit 3c7d1d704c9b52031d75870d0c4a3cdec0a99761 Author: Olivier Crête Date: Thu Sep 2 19:55:23 2010 -0400 tfrc: rate is in bits/s commit 3f994622b6a4b90b9afba353679bed322bb0d72c Author: Olivier Crête Date: Thu Sep 2 18:33:20 2010 -0400 tfrc: Ignore if rtt==0 commit 1f50ff51ab24130ebebe6ce04e749a1fa5fae6ee Author: Olivier Crête Date: Thu Sep 2 17:29:17 2010 -0400 rtptfrc: Chain up dispose and lock it commit b28867922130cd67e446ab8219787f19fa7af718 Author: Olivier Crête Date: Thu Sep 2 17:27:12 2010 -0400 rtptfrc: Stop timers before unreffing rtpsource commit 0d735588ecc97e64cf420c097104950ca53d4219 Author: Olivier Crête Date: Thu Sep 2 17:21:55 2010 -0400 rtptfrc: Remove unfinite loop in sender timer commit a1d501ef09ccd9bc977a21e463fa868096e84446 Author: Olivier Crête Date: Thu Sep 2 17:07:53 2010 -0400 rtptfrc: Detect if it was data limited commit d761afff98c281416e0ed0091716dbf6923330f7 Author: Olivier Crête Date: Thu Sep 2 16:28:48 2010 -0400 tfrc: Implement algorithm to find out if a period was data limited Implement the algorithm proposed in RFC 5248 section 8.2.1 to find out if a whole period was data limited or not. commit cd52003115be86ec7d6c9839b255040ef6204597 Author: Olivier Crête Date: Wed Sep 1 18:58:16 2010 -0400 rtptfrc: Add log message on RTP packet commit 50e238a24cd465e77b8616e81fd15a5b399a5be1 Author: Olivier Crête Date: Wed Sep 1 18:57:55 2010 -0400 tfrc: Compute receive rate in bytes/s not per ms commit a20cc1eda77616249bb094ab22c7f154e6ae24b2 Author: Olivier Crête Date: Wed Sep 1 18:57:25 2010 -0400 rtptfrc: Only call feedback update once on timer expiry commit 661a5a11d7654870df448523027ffab7a4647b65 Author: Olivier Crête Date: Wed Sep 1 18:11:08 2010 -0400 rtptfrc: Remove extra line commit dd8098b9ced9f89628b283a7fc618e8f91e92516 Author: Olivier Crête Date: Wed Sep 1 18:11:01 2010 -0400 tfrc: indentation fix commit d2dd64fa6dcccc2ad2b14e3ecae998ad6b5d5c06 Author: Olivier Crête Date: Wed Sep 1 17:14:06 2010 -0400 tfrc: Try to give a reasonable value if the rate==0 commit aa339af2497d964727eef6a0ceae3fc15d453a9c Author: Olivier Crête Date: Wed Sep 1 17:13:31 2010 -0400 rtptfrc: Improve RTT debug message commit a96e572fa86bfc7bd209f6f1512e9d67bfaa5091 Author: Olivier Crête Date: Wed Sep 1 17:11:42 2010 -0400 rtptfrc: Initialise expiry variable Initilise the expiry stack variable, otherwise the initial value is random and could be the same commit e794ccc7eee8aef6444f48af25cd1db55324fa8f Author: Olivier Crête Date: Tue Aug 31 19:30:23 2010 -0400 rtptfrc: Ignore impossibly high RTT commit b5d625eb9f8bb7032a695ebbb3e411ba37a63902 Author: Olivier Crête Date: Tue Aug 31 19:10:39 2010 -0400 rtptfrc: Stop receiver feedback timer when freeing sources commit 1e415ad2301455998b99f0ddccbde68e7eeb3670 Author: Olivier Crête Date: Tue Aug 31 17:32:44 2010 -0400 rtptfrc: Store last source commit 1aa9c670ebd6dcf2666123c35fcd5b8dc4ee455f Author: Olivier Crête Date: Tue Aug 31 17:10:12 2010 -0400 rtptfrc: Prevent infinite loops in feedback timer commit 5faacbd6c2a32684a6324060a6cb345cde287d9c Author: Olivier Crête Date: Tue Aug 31 17:09:39 2010 -0400 rtptfrc: Set the RTCP FB packet type commit b23c6045bcc24608f11562c44b7fd0127565c255 Author: Olivier Crête Date: Tue Aug 31 16:58:20 2010 -0400 rtptfrc: Read RTT correctly commit 9f3a93123ee7070696e0f8e56c236fa3a56ede7f Author: Olivier Crête Date: Tue Aug 31 15:31:31 2010 -0400 rtptfrc: Wait until RTT is received to start feedback timer commit f185f182ef9a5142634f823248b454127dac833d Author: Olivier Crête Date: Tue Aug 31 15:28:15 2010 -0400 tfrc: Send TFRC report on every buffer until RTT is received commit 4c08461f01d52a728ac05e5a30ea3d374b6625da Author: Olivier Crête Date: Mon Aug 30 19:14:16 2010 -0400 add some more debug commit f90e1e7a41c00c1de734b7ef8f261c693ad705a4 Author: Olivier Crête Date: Fri Aug 27 22:05:50 2010 -0400 rtptfrc: Add debug message when sending report commit 239dadd6ac942ea09aefe3e0f1ef97f5ad10b5d4 Author: Olivier Crête Date: Fri Aug 27 21:56:46 2010 -0400 rtptfrc: Use the right property name for the RTPSession ssrc commit 7fa817c82c987f88adda25a832e5128158eb0095 Author: Olivier Crête Date: Fri Aug 27 21:48:40 2010 -0400 tfrc: Initialize reset time with start time commit c16bca26e8a4b2fb14ff2c608fe00d801afb554b Author: Olivier Crête Date: Fri Aug 27 20:33:20 2010 -0400 rtptfrc: Add TFRC header before getting a valid RTT commit c26183a4f9ad1b962c46ca17e5ea5fd3a864e5a1 Author: Olivier Crête Date: Fri Aug 27 20:32:58 2010 -0400 rtppackermodder: Remove extra unref commit a1df5444af03bbfc8e339e0ee4fe56107f2644fe Author: Olivier Crête Date: Fri Aug 27 16:59:54 2010 -0400 rtptfrc: Add debug prints for rate commit 873e04ba6de4a9e440cd3d74ed683ff6067369d5 Author: Olivier Crête Date: Fri Aug 27 16:42:51 2010 -0400 rtptfrc: Request RTCP packets when required commit 95b9faaec0d2887a63c5601cf1b59e1eb439d8be Author: Olivier Crête Date: Fri Aug 27 13:55:32 2010 -0400 rtpsession: Hook up FsRtpTfrc commit c87292df93f544b36ce6c3759af013cd9e0788dc Author: Olivier Crête Date: Fri Aug 27 13:54:02 2010 -0400 tests: Simplify building the codec discovery test program commit abb1157080923a99f3c8fde5b07816732333c9c8 Author: Olivier Crête Date: Fri Aug 27 13:36:43 2010 -0400 rtptfrc: Hardcode extension type and id commit 6a2298d5fe913fd2aa726d4c72881c6c019015be Author: Olivier Crête Date: Thu Aug 26 18:18:00 2010 -0400 rtptfrc: Remove unsued finalize commit 9941a6f04ad19477ad112a9f73bef69202bb76cd Author: Olivier Crête Date: Thu Aug 26 18:08:50 2010 -0400 rtptfrc: Simplify code a bit commit 0c0a0a9c72551f37538e7e4bbf7c5a66da1e3004 Author: Olivier Crête Date: Thu Aug 26 15:39:31 2010 -0400 rtptfrc: Add feedback timer commit e3c4edf631c59690642b3c6ef53c7514dbcf0d7d Author: Olivier Crête Date: Thu Aug 26 13:23:44 2010 -0400 rtptfrc: Hook up receive side packets commit 8523d66506067a47092626a7741a23ab835cfa5d Author: Olivier Crête Date: Thu Aug 26 13:22:29 2010 -0400 tfrc: Export receive and loss event rates commit 080b69351e61363b9e2e2bdaf751ba6dedabd88d Author: Olivier Crête Date: Wed Aug 25 15:22:45 2010 -0400 rtptfrc: Parse the TFRC header on incoming RTP packets commit ec27e98596f988145a470f3072ca0725eb57b1c0 Author: Olivier Crête Date: Tue Aug 24 19:54:38 2010 -0400 rtptfrc: Use sender ssrc to track trackedsources To use the sender ssrc, we need to create the tracked sources dynamically when a feedback message is received. commit e128be40da0151492f7a55914156de6d678c992d Author: Olivier Crête Date: Tue Aug 24 19:34:47 2010 -0400 rtptfrc: Move rtt to trackedsource, keep trace of last active src commit 6148a25ed869119b68de7aa5dc4e2c0b88344415 Author: Olivier Crête Date: Tue Aug 24 19:12:40 2010 -0400 rtptfrc: Store rtt commit 47d3eb996ff5a553356d4d35f5980d0751506e94 Author: Olivier Crête Date: Tue Aug 24 16:51:56 2010 -0400 rtpsession: Use send_filter if it is present commit 4e66786588c8e3f993fa2dd5c64741181df968c2 Author: Olivier Crête Date: Tue Aug 24 14:40:54 2010 -0400 rtp: Add element to modify RTP headers commit 60591a54f45b24e61dca51baf36635a5d6478616 Author: Olivier Crête Date: Wed Aug 18 16:31:26 2010 -0400 rtptfrc: Implement the no feedback timer commit a823b86a90fd8adceb130b94d08bf14207229512 Author: Olivier Crête Date: Tue Aug 17 17:56:53 2010 -0400 rtptfrc: Push RTCP tfrc feedback into the TfrcSender commit f20ed12ae7485be232812c87b587bdee49c3754b Author: Olivier Crête Date: Tue Aug 17 17:56:01 2010 -0400 rtptfrc: Track sources so TFRC can be applied to them commit d5e91ddea7565472af2c47b33863a51574c84e3a Author: Olivier Crête Date: Tue Aug 17 17:53:56 2010 -0400 rtptfrc: Add function to get time in milliseconds commit 00e3d7f03773e4e4957a36b312901efc9285dc8d Author: Olivier Crête Date: Tue Aug 17 17:52:20 2010 -0400 rtptfrc: Add debug category commit 2db3695f7d6863d45e8382a1df40e069ec133c2a Author: Olivier Crête Date: Tue Aug 17 17:51:27 2010 -0400 rtptfrc: Remove private, put everything in object structure commit 80166ec68ef25f71d3614ad02000196205aab7f9 Author: Olivier Crête Date: Thu Aug 5 17:17:20 2010 +0200 rtptfrc: Hook up to various signals commit 0aed65a96cb525566109903a507f0737432ad6ae Author: Olivier Crête Date: Tue Aug 3 13:22:24 2010 +0200 rtp: Add empty tfrc object commit 39c0f1bfcd4c0a89492fd901226662296b8e2b26 Author: Olivier Crête Date: Mon Aug 2 19:13:25 2010 +0200 rtp: Add tfrc implementation commit c8365c5b1930f31d182330a2d6dc7ebab1be4a4d Author: Olivier Crête Date: Thu Sep 22 17:23:13 2011 -0400 rtp-codec-nego: Correctly keep the discovered properties on renegotiation First correctly keep the various properties in the send_codec, then correctly compare the send codec of the new and old codec association and if they are the same, then keep discovered properties. commit 8744912ebb44e38189e8bbb3fc80160ff3badd47 Author: Olivier Crête Date: Thu Sep 22 18:44:10 2011 -0400 tests: Add some extra tests for changing codec params commit 9d4a8fb9432d12324e99ec68b677dd3da920b422 Author: Olivier Crête Date: Thu Sep 15 14:22:04 2011 -0400 Version 0.0.30.1 commit 6dd0882eeb0bd2da42028abe1d90edcb34f67023 Author: Olivier Crête Date: Wed Sep 14 15:28:30 2011 -0400 Version 0.0.30 commit 24d7f7e8555a47fc5058e77c502a4bc7e31a8e93 Author: Olivier Crête Date: Thu Sep 15 14:06:38 2011 -0400 tests: Make rawconf shm test work reliably commit 2e0b1a5c46aa222a71f300ed8f12c1e78cbdb13b Author: Olivier Crête Date: Thu Jul 14 22:15:19 2011 -0400 shmstreamtrans: Transform bus errors into state changes commit 0f65cfc532bf4a225b50d092b7d1b9357f6087d8 Author: Olivier Crête Date: Thu Jul 14 20:46:16 2011 -0400 shm: Capture read errors and transform them into a signal commit 99fce828b314565223bb8325b38b759adba15292 Author: Olivier Crête Date: Thu Jul 14 20:43:57 2011 -0400 shm: Emit a signal on a SHM disconnection error message commit b4430215672b8e1b62f4eee3b6ff6a8e6f9d1d6f Author: Olivier Crête Date: Wed Sep 14 11:41:37 2011 -0400 rtpsubstream: Drop newsegment events New segment events can cause the sink to think that there is segment accumulation going on and be really confused. We only operate in running time so just drop them. GStreamer 0.11 has the correct fix for that problem. commit 47d921efdd6b24283253d672af6537a33b2e6fa7 Author: Olivier Crête Date: Wed Sep 14 15:01:34 2011 -0400 tests: Test for unless changes in decoders commit 758e13c65b6f6f220ecc9eba3db0d56c90de37ef Author: Olivier Crête Date: Wed Sep 14 15:06:13 2011 -0400 tests: Make inband config data test actually work commit f89a253187961e11f86a760ac273fec347558182 Author: Olivier Crête Date: Tue Sep 13 20:04:02 2011 -0400 rtpsubstream: Only replace the recv codec bin if it has really changed Only replace the receive codecbin if the new one would be produced by a different blueprint of profile. This should reduce the number of unncessary constructions/destruction when extra parameters arrive. In that case, only the new setcaps will be called. commit f02721ee169d895716edec25d06971c652dbb30c Author: Olivier Crête Date: Tue Sep 13 19:31:37 2011 -0400 rtpsubstream: Do setcaps in have-data callback Also, drop buffers if setcaps fails, even if the buffers have old caps. commit 8a826f852a82452719b0f26b4ee92a1f577c883a Author: Olivier Crête Date: Tue Sep 13 18:56:23 2011 -0400 rtpsubstream: Remove useless capsfilter commit de97aa97f7b36a5258c204cbea822bc3f8994bdc Author: Olivier Crête Date: Thu Sep 8 17:41:09 2011 -0400 rtp-discover-codecs: Add spanplc after the decoder is available commit 110e64a58db8ed23f6bb3fdfdebc275c12ea64a6 Author: Olivier Crête Date: Thu Sep 8 17:40:38 2011 -0400 test: print the receive pipeline correctly commit fac564f9aa5284d05fb1080117e8990e3cfaf849 Author: Olivier Crête Date: Tue Jul 26 00:03:41 2011 +0200 nice: allow port 0 for stun server commit 965acccdded30e37e120b6bee429d9f1a88e6222 Author: Olivier Crête Date: Tue Jul 26 00:03:30 2011 +0200 rawudp: Allow port 0 for stun server commit a682e69d3c71bcae6e2c5ce774dfea237e978df4 Author: Olivier Crête Date: Fri Apr 15 17:25:52 2011 -0400 rtp: Send dtmf through rtpmux Send the DTMF events through rtpmux commit 6c29f98e438786c5fb7c271c36fcf6cde27937b6 Author: Olivier Crête Date: Tue Jul 26 00:53:28 2011 +0200 rawudp: Test for candidate with port 0 commit f0a31c7bd67b0d73e00de4eb03532fd1736f1213 Author: Olivier Crête Date: Tue Jul 26 00:42:46 2011 +0200 nice: Test for candidate with port 0 commit 1fc54c6671140d3f4a25c5cd25fe42acaa6f15ad Author: Olivier Crête Date: Tue Jul 26 00:02:47 2011 +0200 transmitters: Allow port 0 in remote candidates commit 4e93a66d3521023196dce643c7ffece0349338cf Author: Vincent Penquerc'h Date: Thu Jul 21 13:54:56 2011 +0300 Add #include and where appropriate Needed for rename, sscanf, atoi, snprintf This fixes building on the new Meego. commit 49d3ec270a88e9ecacd46557e95c7be2766aa1f5 Author: Sjoerd Simons Date: Thu Jul 21 19:34:26 2011 +0100 When we start sending, request a KeyUnit so the stream starts at a valid point commit 44a13a2449b91ec9cc1c9a269926fb41d3154c45 Author: Olivier Crête Date: Fri May 13 21:42:24 2011 -0400 rtpsession: Protect callbacks from the stream against session dispose Session dispose can be called manually, the callbacks from the streams should be protected against it. commit a1c911f1949b60b048e700ea76bd55047e95fda4 Author: Olivier Crête Date: Thu Jul 14 20:49:20 2011 -0400 shm: Don't register the internal bin commit 0d7121f470cab2298e93fc101977ecd1b1fa98b8 Author: Olivier Crête Date: Fri May 27 11:39:38 2011 +0300 tests: Factor out identity bit of keyfile tests The keyfile tests have identical bits, put it in a common function commit c875a6c57ba00e5815a65b91db5b02e1a3ce41b4 Author: Olivier Crête Date: Fri May 27 11:28:23 2011 +0300 elementaddednotifier: Allow using the object's name as the group in keyfiles Previously, only the factory name was matched against, now we can set properties that will be set only on one instance commit 5052b6ab7c4ebb4e6f20a360c316dc77ffa2ef4e Author: Olivier Crête Date: Tue Jul 12 21:38:02 2011 -0400 tests: Allow for longer timeout for sending DTMF commit 768ee96f5d80132f26b7217e885631ecf97865e7 Author: Olivier Crête Date: Wed Jun 15 16:33:45 2011 -0400 Set the sinks async=sync=FALSE before adding them to their parent bins commit 90977a2080eef430c3f1a8d1abe591b872ba62dc Merge: 59b0d19 e47536f Author: Sjoerd Simons Date: Mon Jun 13 18:16:51 2011 +0100 Merge remote-tracking branch 'vincent/leak' commit e47536fe12e1861dbb7a166c57d68d9b22732f6c Author: Vincent Penquerc'h Date: Mon Jun 13 20:04:20 2011 +0300 Remove element from the bin when it fails to link or change state commit bd78ccf83d0a50672a4d2942d248756137ba5e36 Author: Vincent Penquerc'h Date: Mon Jun 13 20:02:53 2011 +0300 Fix gst-sink leak The element returned via a property has a ref that the caller is supposed to unref. commit 59b0d19d30b5e3a7489d1b5cac34cb88b45f4fe9 Author: Youness Alaoui Date: Fri Jun 10 19:44:49 2011 -0400 rtpsession: send-bitrate property is also readable commit 9ef8ca06fb965cdccb930e676ce0d35d7a799e77 Author: Olivier Crête Date: Fri Jun 10 16:16:59 2011 -0400 Version 0.0.29.1 commit aaad8b0733b76982883dc4bcfae9457b200ac8e7 Author: Olivier Crête Date: Fri Jun 10 16:02:26 2011 -0400 Version 0.0.29 commit 8f86199aae8350159752fc82d5eaa9c1cb6bb0fa Author: Olivier Crête Date: Fri Jun 10 15:35:18 2011 -0400 tests: Release lock while calling set_remote_cands, src_pad_added could be called from it commit d095818623d41e884dbfd6a77b655253b2716813 Author: Olivier Crête Date: Fri Jun 10 14:52:58 2011 -0400 rtpcodecspecific: Document the meaning of the various codec parameter flags commit 70f57dd69d418bd33e84eb5c2f373e1740d5a272 Author: Olivier Crête Date: Wed Jun 1 17:38:13 2011 +0100 tests: Add test for fs_session_codecs_need_resend commit 8f3955590a169b68e178ae320168a3ab61e64d3f Author: Olivier Crête Date: Wed Jun 1 16:48:44 2011 +0100 session: Add new function to know if one needs to re-send the codecs Add a new vfunc so that the users of the plugin can know if the change in codec is big enough that the codecs would need to be reliably resent to the other side. commit 9a186c1ab8e9d7b564b1127aac9e254864962787 Author: Olivier Crête Date: Tue May 31 21:24:30 2011 +0100 rtpcodecspecific: Check if config params have changed and need to be re-sent Check if matching codecs have different config parameters, and return the list of codecs that need to be resent or NULL otherwise. We do that by matching the codecs one by one with a fuzzy SDP Offer/Answer match and then when we find matchs, we check if any of the config params are either different or only available in the new or the old one. commit 668c68292feb400b27ecea32a91f1ad9e0bf9d88 Author: Olivier Crête Date: Wed Jun 1 13:20:04 2011 +0100 Make gtk-doc more happy for the libs commit b615afaa276060ef6b460c5bb32f46a6e8131190 Author: Olivier Crête Date: Wed Jun 1 13:14:10 2011 +0100 make gtk-doc happier commit 1465bec584585c62cc85083f6b672776c7bdd80d Author: Olivier Crête Date: Fri May 27 11:09:24 2011 +0300 rtpconference: Add missing stdio.h/stdlib.h includes commit 1b80532b449ddfc04042ce4357c7c5aa035efdfa Author: Olivier Crête Date: Thu May 19 17:06:35 2011 -0400 Fix -Wunused-but-set from GCC 4.6 commit c62997391b432b31c8f695607c1545864ff93da6 Author: Olivier Crête Date: Thu May 12 17:24:13 2011 -0400 Use GQueue instead of the g_list_reverse trick commit 85dd356927accbce903e3980200f64946c14ef62 Author: Olivier Crête Date: Wed May 11 17:12:50 2011 -0400 Add Python support for feedback params commit d8f94d4923cd540e7b55a72315c19934d05301bc Author: Olivier Crête Date: Wed May 11 15:15:30 2011 -0400 docs: Add missing opening tag commit 783e942060af4b84d3874abed5e72b033670b440 Author: Olivier Crête Date: Tue May 10 21:25:04 2011 -0400 Version 0.0.28.1 commit 76dc68d80b4ddae7bdb4159ebdf94f447457ae70 Author: Olivier Crête Date: Tue May 10 16:50:41 2011 -0400 Version 0.0.28 commit 8ad7a67d943bc0aae96a97f049c0bd14ce342b5e Author: Olivier Crête Date: Tue May 10 17:59:29 2011 -0400 Don't check for property we know to be there We require a newer version of gst-plugins-good/base/bad/etc now so no need to check if the properties exist at runtime. commit fb125f32c9bb03e7ff55a97e35b073e04fe4c516 Author: Olivier Crête Date: Mon Feb 28 18:35:50 2011 -0500 utils: Add function to get the default RTP Header Extensions commit 9ad130b60723971127f20b2be4e45da1e357b145 Author: Olivier Crête Date: Mon Feb 28 18:25:34 2011 -0500 tests: Add tests for Rtp Header Extension functions commit b262c6ccc5eb62f2047fed62b3aa71ce0a6d7daf Author: Olivier Crête Date: Mon Feb 28 18:14:42 2011 -0500 rtp: Add function to compare two FsRtpHeaderExtension structures commit 5b3a20d2e22e835f5e9879ae428e43027a74b9f8 Author: Olivier Crête Date: Mon Feb 28 17:12:05 2011 -0500 rtp: Add function to load header extensions from a keyfile commit c8782fe69bbf295c77e14785dfc8f4d618ed375b Author: Olivier Crête Date: Mon Feb 28 17:09:59 2011 -0500 codec: Don't assert on invalid params commit b3d6aeaad89e8e59330d37c9b6b6c30179de7ef5 Author: Olivier Crête Date: Fri Feb 18 17:31:46 2011 -0500 rtp: Add formatter for hdrext types commit 3b225697d5865b4d63b2ddbce2d8f263cbe0922e Author: Olivier Crête Date: Thu Jan 27 21:09:43 2011 -0500 tests: Add tests for RTP header extension negotiation commit 7eb6ee3991b7252ab957f0452e671ebf98ccafdd Author: Olivier Crête Date: Wed Jan 26 20:26:38 2011 -0500 rtpsession: Negotiate RTP Header extensions commit 3198dd02b4e5fde72df5b7099ee98039118f7ea4 Author: Olivier Crête Date: Wed Jan 26 20:02:54 2011 -0500 rtpsession: Set the new codec where they are created Improves the cleanliness a bit commit be7232a85ba5b94ee2566814f6fb0f3300a40fa3 Author: Olivier Crête Date: Wed Jan 26 19:20:47 2011 -0500 rtpcodecnego: Add functions to do RTP Header Extension Negotiation commit ea906e92d9cfd17e7894fb8b16d91b584674bb07 Author: Olivier Crête Date: Mon Jan 24 18:11:26 2011 -0500 rtp: Add rtp-header-extension properties commit 7d31c8292832b1f9446554a33fe009baebe595f0 Author: Olivier Crête Date: Thu Jan 20 20:47:26 2011 -0500 rtp: Document FsRtpHeaderExtension and its methods commit 8d1c6e468da8300f9bec8963f8029724465bfe82 Author: Olivier Crête Date: Thu Jan 20 20:31:14 2011 -0500 rtp: Add public header with the FsRtpHeaderExtension type Also now require GLib 2.26, welcome to 2011! commit 4213400c11666ba223136d1bf7bafca4708782ba Author: Olivier Crête Date: Tue Mar 1 16:35:59 2011 -0500 tests: Test minimum reporting interval negotiation commit 39eef469c8e11fc6bf519e88952de8f0270e9067 Author: Olivier Crête Date: Tue Jan 4 18:49:42 2011 -0500 tests: Add some other invalid codecs to the GKeyFile loading test commit 97c2bc06ba7087f5f6f25712a13811bab108a62b Author: Olivier Crête Date: Tue Jan 4 18:49:18 2011 -0500 codec: Always use fs_codec_new() to allocate a codec commit 5ea7f5df1cf9320bf4d174757380ba868c369ae8 Author: Olivier Crête Date: Thu Apr 21 20:36:29 2011 -0400 rtpsession: Set the properties on the rtp session correctly Also request it early enough commit 017d8dd4fbc7815fde01f218e21ebd272daec65f Author: Olivier Crête Date: Tue Jan 4 18:17:47 2011 -0500 rtpsession: Set the minimum-reporting-interval to the minimum of the codecs Take into account the current sending codec as well as the receiving codecs of all substreams commit d9a0e18a9c950a532f3e9309fcb2618b14737859 Author: Olivier Crête Date: Tue Jan 4 17:00:54 2011 -0500 codec: Make the minimum reporting interval invalid value G_MAXUINT commit 2471788666aeb248dba01577e699ed3cf883446a Author: Olivier Crête Date: Fri Nov 26 16:19:36 2010 -0500 tests: Test minimum_reporting_interval property commit 5e09a0d71e7e2935290f03e4169edec40a85d4ef Author: Olivier Crête Date: Thu Nov 25 18:33:28 2010 -0500 rtpcodecnego: Negotiate Minimum reporting interval commit e8833d436b647be6177812722c74763ef61e7347 Author: Olivier Crête Date: Thu Aug 12 16:55:16 2010 +0200 tests: Add test for AVPF negotiation commit c253ef2e4ebc167680063333f8df48317ff64079 Author: Olivier Crête Date: Tue Aug 10 14:08:24 2010 +0200 rtp: Pass feedback params into the caps commit f2a90db7e0be7e6633796df41840ceef355fa0b2 Author: Olivier Crête Date: Tue Aug 10 14:02:13 2010 +0200 rtpcodecnego: Intersect feedback parameters commit 807da106f72d47cba98147e4da81ac66bfbd2391 Author: Olivier Crête Date: Wed Aug 11 17:58:00 2010 +0200 tests: Add test for feedback parameters commit 6d33637c1e812847ded010c92fc095413c7fe56a Author: Olivier Crête Date: Wed Aug 11 16:54:02 2010 +0200 tests: Test reading feedback params from GKeyFile commit f8781be57cb7cae76ccaacd4e30196948bdb0c92 Author: Olivier Crête Date: Tue Aug 10 13:50:44 2010 +0200 codec: Add function to remove feedback parameters commit 8254c4f7bf21340a65cd6ad2e7a27cc55f0a89e6 Author: Olivier Crête Date: Mon Aug 9 18:06:50 2010 +0200 codec: Add feedback params to gkeyfile commit 624a152060dd413d64eb0ecc5b54ad72f0c5a7f9 Author: Olivier Crête Date: Mon Aug 9 17:57:13 2010 +0200 codec: Add feedback parameter commit f228f6f47d95a10ade20ea9f0258ac1aeb923c66 Author: Olivier Crête Date: Thu Aug 5 19:47:43 2010 +0200 codec: Add minimum reporting interval parameter commit 6784b6bb1b86402e4346e86c3c74c7d9def2d8ea Author: Olivier Crête Date: Thu Aug 5 19:23:30 2010 +0200 fscodec: Refactor freeing of codec parameters commit a8d280c7e1c305c665b160be67679bfee847b220 Author: Olivier Crête Date: Wed Aug 11 17:32:43 2010 +0200 tests: Use standardised function to remove fscodec optional params commit 5dff4b882ce6f00f01b5b35621e7e74bda7b3d92 Author: Olivier Crête Date: Fri May 6 15:28:23 2011 -0400 rawudp: Send the original STUN packets from the same thread This is to make sure the STUN packets for each component are sent in order. Some firewalls just allocate output ports linearly. In that case, we prefer if the order of the outside ports is the same as the order of the local ports, that way, if we do UPnP, we have fewer chances of mixing it up. commit 88940cf647ae0365e04cd94731406f3a75a777ba Author: Olivier Crête Date: Tue May 3 19:19:13 2011 -0400 Version 0.0.27.1 commit e6f8664811983b7ebc799b795ee2c3bf25d6b18b Author: Olivier Crête Date: Tue May 3 19:11:20 2011 -0400 Version 0.0.27 commit f6b0768165bae81725297c48ea06da25158d7544 Author: Olivier Crête Date: Wed Apr 27 19:17:39 2011 -0400 tests: fix some leaks fix some leaks in the tests commit 63feab41120a48fef5c31269d5c2ad0e6caa9255 Author: Olivier Crête Date: Mon Apr 25 20:07:15 2011 -0400 nicetransmitter: Check if gststream isn't NULL before using it There could be a delay between the _stop() function and the stream transmitter is disposed during which one could try to access it. commit 223d1cc50b512dab8cd84c2f8badb85fabf9cb9d Author: Olivier Crête Date: Mon Apr 25 19:28:51 2011 -0400 rawsession: Set the fakesink to async=sync=FALSE If we don't do that, the whole pipeline may wait for frames to reach it. commit d9285cc92c39b3b3446e7d63b39b58e47a634a3c Author: Olivier Crête Date: Mon Apr 25 16:32:10 2011 -0400 tests: Allow for conflict in pad count in multicast test commit 8f13ba6c97941c2ff5c93f66c799fb737688096d Author: Olivier Crête Date: Thu Apr 21 20:44:33 2011 -0400 rtpsession: Set the bitrate inside the send codecbin based on the send-bitrate property commit 900b91121c6f72c49e3325219ff4526c89715bed Author: Olivier Crête Date: Thu Apr 21 20:43:45 2011 -0400 rtpsession: Add send bitrate property commit c50d6e3e6b8d38c6eae1582743136fbdccfab613 Author: Olivier Crête Date: Thu Apr 21 20:42:47 2011 -0400 fsutils: Add function to set bitrate generically Since upstream GStreamer does not want to do it, lets add a function to set the bitrate on different encoders without having to keep all the knowledge around. commit 23d85ce645fa96d8c258aa6bc4e67faada7c46d7 Author: Olivier Crête Date: Wed Apr 13 18:35:53 2011 -0400 rtpsession: Use the regular ca->codec, not the send_codec to create dtmf source The special sources lookup codec looks at the ->codec field, not at the ->send_codec field to look up the match CodecAssociation commit c1df094b8451994ba8efdba279fe1e646d17aee6 Author: Olivier Crête Date: Wed Apr 13 18:06:19 2011 -0400 rtpsession: Return FALSE if there is an error on rtp_set_send_codec commit 6b8ed9f70b5ca6ec94edde7077d6f628a47706bc Author: Youness Alaoui Date: Wed Apr 6 17:31:20 2011 -0400 shm-transmitter: Do not call sink_set_sending if the shm_sink is NULL commit 0e582381ef874cb8a6785b6f8d11e2d4edb9a2b3 Author: Olivier Crête Date: Tue Apr 5 12:45:37 2011 -0400 tests: Check for multicast before gupnp tests commit 67a0fdf66e4f4c73a25292f5b72f617513755df4 Author: Olivier Crête Date: Sat Apr 2 21:58:16 2011 -0400 python: Don't link to libpython Some distributions (Debian) link libpython statically into the python interpreter commit 467d8807d779743652d48a235ba2647930eee61e Author: Olivier Crête Date: Wed Mar 16 17:40:02 2011 -0400 rtpsession: Immediately adds transmitter sink, we need to send RTCP even when receiving The parent elements should be be waiting for this bin to continue because transmitter has async=FALSE and async-handling=TRUE Reverts a020bf8c34656e8c5b1ebfde478847e6aebbfa51 commit 68ae7a7b5c55d821d2940db8b200a610e511d16c Author: Olivier Crête Date: Mon Jan 11 15:36:09 2010 -0500 Request keyframes with all-headers when we have a new target commit ee9674058b327d3e2fc0c70a41bbd0ae3016147c Author: Olivier Crête Date: Mon Feb 7 17:34:55 2011 +0100 stream: Add python bindings for src pad iterator commit bb637b74caec4dccfc186bc0f8a11e5001e0f8bd Author: Olivier Crête Date: Mon Feb 7 16:24:35 2011 +0100 tests: Ignore some more things in the async dispose case commit 8f9e381cdcaaf5091f0983b0e8880479ea2ff891 Author: Olivier Crête Date: Wed Mar 9 18:09:17 2011 -0500 nicestream: Request keyframe only if stream is >= connected commit 1560b16f912f0ef775274a4962e3870b571bbe86 Author: Olivier Crête Date: Tue Feb 8 16:49:45 2011 +0000 raw: Move all Gst processing to the session commit 6aee195dba0efd3533aa9d3fedae32cf38caec42 Author: Olivier Crête Date: Wed Mar 9 17:36:48 2011 -0500 rawsession: Correctly protect transmitter_linked commit 48c8cc96d5a26f4f48bd842a34aefff873db3c8f Author: Olivier Crête Date: Wed Mar 9 16:58:14 2011 -0500 rawsession: Set capsfilter to null when disposing commit 228f5eaa39d6246f9d13dd3fa494c679b589b3fe Author: Olivier Crête Date: Tue Feb 8 15:51:05 2011 +0000 rawstream: Rename capsfilter to recv_capsfilter commit cec5a855a517d286c999ad700b1739915bbf3cf3 Author: Olivier Crête Date: Tue Feb 8 15:46:36 2011 +0000 rawsession: Correctly name remove_stream method commit 821fb893894b9a7434d5bf2cd9ea2ebfc0a438a9 Author: Olivier Crête Date: Wed Mar 9 16:45:02 2011 -0500 rawsession: Rename capsfilter to send_capsfilter commit f1cfa2c2cd0e852a77e5916d1e73feb13fc7fe83 Author: Olivier Crête Date: Tue Feb 8 14:04:12 2011 +0000 rawstream: Greatly simplify ghostpad addition commit 8e2f7e2ca05f9b8eba3577c2a398a6df25757f49 Author: Olivier Crête Date: Wed Mar 9 16:42:16 2011 -0500 rawsession: Add method to get transmitter from stream commit 6862918b82dec55533b3f0dfa102a9400b8a94fd Author: Olivier Crête Date: Tue Feb 8 11:21:22 2011 +0000 rawsession: If its !=NULL is useless commit 347b3b30056646da20c1dfbf7b9dbe59ff63a22b Author: Olivier Crête Date: Tue Mar 1 16:56:08 2011 -0500 rtp: Use fs_codec_new() everywhere commit a004b388e5a28d38892a93243e7186a48a08e3e0 Author: Olivier Crête Date: Mon Feb 28 15:21:59 2011 -0500 interfaces: Re-order includes/ifdefs to make it build on windows commit 4807a91be9d7cb8b1767b5cd416872f0c1aeb4ff Author: Olivier Crête Date: Wed Feb 23 16:13:24 2011 -0500 Version 0.0.26.1 commit 72ef2c35a48538b6c26ef9900a227611dc9c6cdc Author: Olivier Crête Date: Wed Feb 23 16:04:46 2011 -0500 Version 0.0.26 commit 2f30193b1f257579e62275e5dc34d23aead460a6 Author: Olivier Crête Date: Wed Feb 23 14:52:43 2011 -0500 rawconference: Correctly check if thread is internal commit 1c3854fe3138b213cd1d3278ca86beb6e6a88061 Author: Olivier Crête Date: Wed Feb 23 15:35:51 2011 -0500 rawstream: Don't start sending before having codecs commit ccd9a5354b4473ce20fa6ef91fa97d80f3fc7066 Author: Olivier Crête Date: Wed Feb 23 15:36:19 2011 -0500 rawsession: Only manipulate the valve from the session itlsef commit 279b78a8d5bcbf6b70a7c76b431c9c139c227e38 Author: Olivier Crête Date: Wed Feb 23 15:12:07 2011 -0500 rawsession: Simplify transform bins creation commit 0e176ed25403ab64539c3c2e1b99483d03da116d Author: Olivier Crête Date: Wed Feb 23 15:09:00 2011 -0500 rawsession: Remove g_debug commit 0352d3c1cfa0cd10f8816abe83b62931abbc175e Author: Olivier Crête Date: Wed Feb 23 15:07:16 2011 -0500 rawsession: Unref the right object commit 256af8d78b10a9aecfe9c75042dc7e8e9f57fea8 Author: Olivier Crête Date: Wed Feb 23 15:06:46 2011 -0500 rawsession: Only remove sink if it has been added commit 3d25a3ef1116df4d95664ddf8abba64b0ff09244 Author: Olivier Crête Date: Wed Feb 23 14:52:02 2011 -0500 rtpconference: Correctly check if a thread is internal commit 9b67a3d5493d7d4645bd48a334765a12bc797dbd Author: Jakub Adam Date: Sun Feb 20 22:17:14 2011 +0100 rtpstream: Fix reference leak in fs_rtp_stream_set_negotiated_codecs_unlock() commit 21f7a67eec08db6f2e7325cc3cc942481a741a1a Author: Sjoerd Simons Date: Mon Feb 21 18:32:11 2011 +0000 Keep a ref to the fakesink commit 1459b54dcdc03f14e76dd4cffbd4649af653de33 Author: Sjoerd Simons Date: Mon Feb 21 14:23:25 2011 +0000 fsrawconference: Make the construction more consistent In the construction of a raw session we add a bunch of elements. For all elements unref them in _constructed if adding them to the bin fails, for all other failures, leave it to the _dispose function to remove and unref the elements commit 30686e6bde917d1265f399b4f8ab3397437faab6 Author: Sjoerd Simons Date: Mon Feb 21 14:20:00 2011 +0000 Use full prefix, even for private functions commit b70c43a141d8183a3354369dae7cd351a289b035 Author: Sjoerd Simons Date: Fri Feb 18 19:40:56 2011 +0000 Add a transformation bin the source pipeline As upstream negotiation in Gstreamer still doesn't actually work, we'll need to change transform elements around every time the caps are changed as that will cause a re-negotiation and things will keep working.. Unfortunately managing dynamic pipelines has its own challenges, so add a tee ! fakesink which will eat all the errors for us... commit a2650fa32ce7cb28c343efe18d247cd62770fba8 Author: Sjoerd Simons Date: Thu Feb 17 18:00:13 2011 +0000 fsrawconference: Make fsrawstream explicitely ask the session to set the direction commit f2bf87379d54d76d832196b5a284599cdc50fffc Author: Sjoerd Simons Date: Thu Feb 17 17:52:05 2011 +0000 fsrawconference: Cope with fs_raw_session_new returning NULL commit 06c1d7cd9322c3d380d7f5482c42f4de57c4cb91 Author: Olivier Crête Date: Tue Feb 15 12:26:22 2011 -0500 Version 0.0.25.1 commit 82ae43536096773e56d7c454102015a5be1d5877 Author: Olivier Crête Date: Tue Feb 15 12:16:16 2011 -0500 Version 0.0.25 commit a64fc0e98135e5a39830f6531d777c1c01dfe58b Author: Emilio Pozuelo Monfort Date: Tue Feb 15 14:24:02 2011 +0000 nicestreamtrans: Fix off-by-one bug https://bugs.freedesktop.org/show_bug.cgi?id=34291 commit 00c51f57e87cfa8a929722e0ca14307bb06a2e8c Author: Olivier Crête Date: Thu Feb 10 20:34:28 2011 +0000 Version 0.0.24.1 commit 7fca1a7b94c572fe7430937270cfbeadde80f587 Author: Olivier Crête Date: Thu Feb 10 20:24:58 2011 +0000 Version 0.0.24 commit 4e38065f498be2f780afa34cce58ca6319832485 Author: Olivier Crête Date: Thu Feb 10 20:16:30 2011 +0000 tests: Rtcp test doesn't make sense in raw commit 0933f2a4c79f1c632f1239dc75b6ba2aef9361dc Author: Olivier Crête Date: Thu Feb 10 20:08:26 2011 +0000 rtp: add default prefs to EXTRA_DIST commit b208a2b2e305ffa042b038fe2b769e2291d3bcf0 Author: Olivier Crête Date: Thu Feb 10 20:01:49 2011 +0000 tests: Fix another race in tests commit 3bbcc8456ef905e20d043b35487015a88f262b38 Author: Olivier Crête Date: Thu Feb 10 19:58:38 2011 +0000 nicestream: Skip Nice errors if the component has never been ready commit afc31f00f87a35c83b1ba6623bb49e35225beca3 Author: Olivier Crête Date: Thu Feb 10 19:52:12 2011 +0000 nicestream: Fix small leak commit 21f5f608c3ab6d6a15de3d584dd11731b7cef108 Author: Sjoerd Simons Date: Thu Feb 10 19:47:27 2011 +0000 nicestream: Sort ipv4 addresses first commit bc1fe3674aba764d9c8ac58f5d7d0aa4f57a772b Author: Olivier Crête Date: Thu Feb 10 17:26:12 2011 +0000 utils: Fix doc string commit 4bef5ac11bcc9b29838e395e20b4e97e21deb83c Author: Olivier Crête Date: Tue Jan 25 16:02:52 2011 -0500 utils: the keyfile stuff already checks the user dirs commit 7091068c01ae9667cd3df048a9b2221e1d819617 Author: Olivier Crête Date: Tue Jan 25 14:56:20 2011 -0500 utils: Pass the element directly instead of its factory name commit 0601247f77918d5164d9437b39958488d0c8137e Author: Olivier Crête Date: Tue Jan 25 14:51:35 2011 -0500 utils: Check default properties/codecs in user data dir too commit 9fbf87263e6987f1cb3815c1f3f59d0bc81d5e18 Author: Olivier Crête Date: Mon Jan 3 21:29:52 2011 -0500 rtp: Add default-element-properties commit 6fd2080695ff480afff472bc702736f701a32926 Author: Olivier Crête Date: Mon Jan 3 21:25:12 2011 -0500 utils: Add function to get default element properties commit 937a7024d94cd49c7f0f4b7e67f93a077c04b0eb Author: Olivier Crête Date: Mon Jan 3 21:12:47 2011 -0500 rtp: Add default codec preferences commit 995bc91e11e0cdc387c382fb40ee0342d460b165 Author: Olivier Crête Date: Mon Jan 3 21:06:58 2011 -0500 utils: Add function to get default codec preferences commit a6b21cf32800ac89328ed7d2dafc5cb5921db042 Author: Olivier Crête Date: Wed Feb 9 14:32:40 2011 +0000 raw: Don't delete non-generated files commit 12f411d74cd6806e822b26595ca3c994664c1419 Author: Sjoerd Simons Date: Thu Feb 3 16:08:01 2011 +0000 Remove the temporary socket directory after usage commit f7eaafac336e7a0d4bd3095ed23cfc46104adb9c Author: Sjoerd Simons Date: Wed Feb 2 18:54:06 2011 +0000 nicetransmitter: Place the local socket in the tmp dir Don't hardcode /tmp, instead use g_get_tmp_dir to potentialy get it from the environment, but falling back to /tmp commit bcf2e5601e8a6fc5952546f0645314c22c157c8f Author: Sjoerd Simons Date: Wed Feb 2 18:50:25 2011 +0000 nicetransmitter: Add documentation for create-local-candidates commit f31e4f1f81fdbe4e92e3a46aab871496d9cba448 Author: Sjoerd Simons Date: Wed Feb 2 18:34:29 2011 +0000 nicetransmitter: Add an option for the transmitter to pick the local side commit 735a9afb2ff464f63e7cc09123b1e48b3019dc5b Author: Mike Ruprecht Date: Sun Jan 30 19:09:13 2011 -0600 rawconference: This is really meant to be called on the stream. commit 9dcf389fe180d043dd5c0a3f01a00712a16ff82d Author: Sjoerd Simons Date: Mon Jan 31 18:55:35 2011 +0000 nicetrans: Only emit local-candidate after gathering Unfortunately libnice doesn't currently support doing connectivity checks untill it has finished gathering. If we send a remote peer our candidates before finishing gathering they can start sending us connectivity checks before we're ready for them... So instead sends the local candidates in one batch when gathering is finished, so we'll be ready for the connectivity checks. commit 4de2ee6cf7c7a921fe586bac2ddcd96762bf1cde Author: Olivier Crête Date: Fri Jan 28 18:18:01 2011 -0500 rawconf: Put the whole caps into the encoding_name in codecs commit 71241041866f1f88f9332c6d4e523c78fadf63cb Author: Mike Ruprecht Date: Fri Jan 28 16:22:21 2011 -0600 rawconference: Make FsRawStream codec doc visible. commit 05469ae14cbb244bb5fab0423e0f2974d643cbba Author: Olivier Crête Date: Thu Jan 27 22:25:23 2011 -0500 docs: Improve the title commit 1c7e76e591a2428fac220de7782ebcdc5a6a4660 Author: Olivier Crête Date: Thu Jan 27 22:22:08 2011 -0500 docs: Add docs for the raw plugin commit 8c7bce8df1812735a70a4d1fa070b539ee4fed8a Author: Olivier Crête Date: Thu Jan 27 22:00:00 2011 -0500 raw: Remove trailing whitespace commit 3af48c2c25b23e635d3e5058dfca24028d393d33 Author: Olivier Crête Date: Thu Jan 27 21:57:52 2011 -0500 raw: Simplify session notification of new stream codecs commit 5a0d0be465413d30b6ddcb18ff56279550d56560 Author: Olivier Crête Date: Thu Jan 27 21:52:46 2011 -0500 rawstream: Simplify set_remote_codecs commit 1640a0df00f2065b3317c365cda7f407f9d3d317 Author: Olivier Crête Date: Thu Jan 27 21:50:44 2011 -0500 cuseless commit 16917a0ce3cbf129c5da55453ee93ffe26638d5c Author: Olivier Crête Date: Thu Jan 27 21:38:25 2011 -0500 rawsession: Codec has already been validated commit 22fae947afa44962f80815bf218bd7eeaec34f7b Author: Olivier Crête Date: Thu Jan 27 21:33:22 2011 -0500 raw: Don't check for stuff in the codecs that is meaningless for raw commit 93157d2029372249c157b70b52eaf44ef089b0dd Author: Mike Ruprecht Date: Wed Jan 26 01:50:23 2011 -0600 rawconference: Add a test with the shm transmitter. commit 249546141263e6d5cb0b6c271fe75de3d5ac6697 Author: Mike Ruprecht Date: Thu Jan 20 22:54:58 2011 -0600 rawconference: Remove stream from session in stream's dispose. There's a chance that removing the stream when the session has it weak-reffed can be called from a streaming thread. This can cause it to crash and/or deadlock. This patch changes the stream to call the remove_stream function in the session in its dispose function. The stream already protects itself from being disposed in a streaming thread and therefore prevents the crash/deadlock. commit a71ce2e1e578838576956436fbd5696c44c446b3 Author: Mike Ruprecht Date: Wed Jan 19 22:25:30 2011 -0600 rawconference: Use local conference variable. commit 1182d5e54502576080bbb71aaaba1720a93de237 Author: Olivier Crête Date: Mon Jan 17 21:51:04 2011 -0500 tests: Split the rtpconf extra init into separate callbacks for stream and conf commit 88b8af0b7022f0414f2039a34779545535eda0d8 Author: Olivier Crête Date: Mon Jan 17 21:36:37 2011 -0500 tests: Split the rawconf extra init into separate callbacks for stream and conf commit 299f9bca316e5dc0edbc124783e2d2cbdfc684cd Author: Mike Ruprecht Date: Mon Jan 17 21:04:59 2011 -0600 rawconference: Remove weak_ref when done. commit 0d995759f2cbe8e4d807609da5925c4475eff190 Author: Mike Ruprecht Date: Thu Jan 13 23:28:50 2011 -0600 rawconference: Dispose FsRawStream in a separate thread if needed. commit ddebdd5331edc9bfb9bc7a6fc31cc52c0207fe28 Author: Mike Ruprecht Date: Thu Jan 13 23:22:27 2011 -0600 rawconference: Add fs_raw_conference_is_internal_thread. commit 5aeb5bb3b477a7c55e99cb112d1bcd0c752d4982 Author: Mike Ruprecht Date: Thu Jan 13 23:07:50 2011 -0600 rawconference: Fix trailing whitespace. commit 3fc1903dd11d04a432c97a388b96e50e6c02c262 Author: Mike Ruprecht Date: Thu Jan 6 18:37:07 2011 -0600 rawconference: Correct an error message. commit 1dc1ec9b5dcc3b93bb63807f20cce07ee57628d3 Author: Mike Ruprecht Date: Thu Jan 6 16:03:07 2011 -0600 rawconference: Wait to add the transmitter's gst-sink until sending. commit 01be250a04dc4e46a5c76ca7d995e602b0c3410e Author: Mike Ruprecht Date: Wed Dec 22 20:03:45 2010 -0600 rawconference: Dispose of objects in a single place in new_stream. commit c02711cccf1c468dae4c88b0523ad8d711ce0ef5 Author: Mike Ruprecht Date: Wed Dec 22 19:06:57 2010 -0600 rawconference: blocking_id will always be 0 here. commit cdb408a99c72ccaabbfaeb850fcfe13ff34ee911 Author: Mike Ruprecht Date: Wed Dec 22 19:03:01 2010 -0600 rawconference: Remove transmitter-pad from the public API. commit ede1c36fc2ca0657e23575f68a0a32fd2a0baf38 Author: Mike Ruprecht Date: Wed Dec 22 16:33:13 2010 -0600 rawconference: Correctly use g_value_set_boxed instead of _take_boxed. commit 89aaa3f9c93a5c83f0418e49641c44f8c3a95498 Author: Mike Ruprecht Date: Wed Dec 22 16:12:42 2010 -0600 rawconference: Use macro instead of g_mutex_lock directly. This patch creates and uses FS_RAW_SESSION_LOCK and _UNLOCK and FS_RAW_STREAM_LOCK and _UNLOCK to improve the ability to debug mutexes. commit 92b2c0152b6654dce6ecd26e9dce2638703b1185 Author: Mike Ruprecht Date: Wed Dec 22 15:45:03 2010 -0600 rawconference: Add @author to the files I made. commit d40a53ff1fd9fe42ed58e407501400f91d8b75ed Author: Mike Ruprecht Date: Thu Jan 6 18:38:39 2011 -0600 rawconference: Misc style and error checking fixes to Sjoerd's commits. commit 252365baec664f29c8683f3db9de4e9c39eb40ab Author: Sjoerd Simons Date: Tue Dec 21 19:15:52 2010 +0000 When adding streams, sync the element states with the parent element commit 400e1e243ea53f3fb8948a251ec5884655f46603 Author: Sjoerd Simons Date: Tue Dec 21 19:15:31 2010 +0000 When removing a stream, make the valve drop packets again commit ac7b28bc5b7e2d23d21ff63c93bc114a33d6359c Author: Mike Ruprecht Date: Fri Dec 10 16:17:11 2010 -0600 rawconference: Change signature of function to avoid collision. This patch changes the signature of fs_codec_to_gst_caps to fs_raw_codec_to_gst_caps to avoid colliding with a function of the same name in the FsRtpConference plugin. commit 81786172cafa99550ba56c327bf46afdba0a8401 Author: Mike Ruprecht Date: Thu Dec 9 23:16:23 2010 -0600 rawconference: Keep reference to GstObjects in FsRawStream. commit 3884313398786472d0dbb76f81d1551efbaed31b Author: Mike Ruprecht Date: Thu Dec 9 23:15:16 2010 -0600 rawconference: Actually store the src_pad in FsRawStream. commit adfaa7d3c677e0dc39f309b8d204c66376664a88 Author: Mike Ruprecht Date: Thu Dec 9 23:00:02 2010 -0600 rawconference: Remove unused member from FsRawStream private struct. commit 403faf6cb341fb3c39ff4445c4b84924b1d003c4 Author: Mike Ruprecht Date: Thu Dec 9 22:47:12 2010 -0600 rawconference: Improve locking in FsRawStream. commit d4483ffff8ec363fb7ad4c0cda5e2e7540496559 Author: Mike Ruprecht Date: Thu Dec 9 22:25:52 2010 -0600 rawconference: Simplify FsRawSession dispose a little. commit b0a31fffcd29b3bf10ebc5094edeaef58bd18a62 Author: Mike Ruprecht Date: Thu Dec 9 22:17:44 2010 -0600 rawconference: Hold references to GstObjects in FsRawSession. commit c5b911455c60d7dadaeae571d7cb840daae0d7c5 Author: Mike Ruprecht Date: Thu Dec 9 21:49:22 2010 -0600 rawconference: Improve FsRawSession's locking. commit b8b318ec394c534c1d01b9a2a3d12c08130f3aa1 Author: Mike Ruprecht Date: Thu Dec 9 21:06:35 2010 -0600 rawconference: Remove elements from bin if sync_state_with_parent fails. commit 2343da21a899c50e21582eea83fab87250f4b906 Author: Mike Ruprecht Date: Thu Dec 9 20:18:36 2010 -0600 rawconference: Simplify a little of removing streams. commit af89d1294910c65ee52399e9d4959bbe70d9fe22 Author: Mike Ruprecht Date: Thu Dec 9 19:59:45 2010 -0600 rawconference: Simplify FsRawSession's dispose function. commit 731a7f97898ee904079922b13504b6b9fd188062 Author: Mike Ruprecht Date: Thu Dec 9 19:52:32 2010 -0600 rawconference: Remove redundant gst_element_sync_with_parent call. commit dca8eee64d96bd3fcfeca63441a9f574f09a1852 Author: Mike Ruprecht Date: Thu Dec 9 18:59:17 2010 -0600 rawconference: Fix implemention of FsRawSession's current-send-codec. commit 3764477bb2e3442d8296c2dc2b51c7151b924807 Author: Mike Ruprecht Date: Thu Dec 9 17:35:45 2010 -0600 rawconference: Store FsRawSession codecs and notify on change. commit 7d49655cf293b40249533cb67842ae7cb7dfe024 Author: Mike Ruprecht Date: Wed Dec 8 21:10:39 2010 -0600 rawconference: Fix potential double-free. commit 79305183c8cd77634b524cae0f43bacd107e01cb Author: Mike Ruprecht Date: Wed Dec 8 20:41:47 2010 -0600 rawconference: Deactivate pad after removing from bin. commit 497995e1f217ad7a4d1e78aab6eb73dbf3d51ec1 Author: Mike Ruprecht Date: Wed Dec 8 20:32:44 2010 -0600 rawconference: Remove unneeded variable and just return value. commit ac35328ca4c2c6d8f6bda415a8ca2d37f4c1dcf1 Author: Mike Ruprecht Date: Tue Dec 7 22:52:03 2010 -0600 rawconference: Fix copy/paste errors. commit 946d4d96a472805a267b7c43cadbb742e7911622 Author: Mike Ruprecht Date: Tue Dec 7 22:45:20 2010 -0600 rawconference: Use correct pad template. commit 0b5a485f339760a64739042e1d5217af85f19622 Author: Mike Ruprecht Date: Tue Dec 7 16:32:08 2010 -0600 rawconference: Fix disposed testcase. commit 4cb2235dfeb99e3e9712b08927ff6d188523e9db Author: Mike Ruprecht Date: Tue Dec 7 16:27:53 2010 -0600 rawconference: Free transmitter src and sink when removing streams. commit 793adf54314b05d610ea8e7a893d44c83b6b3994 Author: Mike Ruprecht Date: Tue Dec 7 16:26:04 2010 -0600 rawconference: Set the correct error in fs_raw_session_new_stream. commit 4d33116c5be131431bc41b24f3ac70cdab55d557 Author: Mike Ruprecht Date: Mon Dec 6 19:36:56 2010 -0600 rawconference: Fix base test. FsRawConference doesn't generate codecs. commit 19bcab0f5eac23018ef8b9a1519d406e641ed4f7 Author: Mike Ruprecht Date: Fri Dec 3 19:53:58 2010 -0600 rawconference: Use optional_parameters for codec properties. commit 976455ddaa78bbfa1bce2bee6e9b6819ec852a95 Author: Mike Ruprecht Date: Thu Dec 2 15:29:14 2010 -0600 rawconference: Abstract converting FsCodec to GstCaps. commit aa0f00a35e9f62570c5448fc0a21ac1f2dc655c3 Author: Mike Ruprecht Date: Thu Dec 2 12:15:22 2010 -0600 rawconference: Add tests for FsRawConference plugin. This patch adds tests for the FsRawConference plugin. Virtually all of the code is from the FsRtpConference plugin testsuite. commit fbc01a45ad847a3f4564ba5453e135ac238b6e64 Author: Mike Ruprecht Date: Thu Dec 2 11:08:22 2010 -0600 rawconference: Add data probe and src_pad_added emission. commit 06c964515fd8811451be5c81732cf7b6196164ac Author: Mike Ruprecht Date: Thu Dec 2 11:01:19 2010 -0600 rawconference: Set capsfilter caps when set_remote_codecs is called. commit dbdca89b1e97cf97aadee885d10e1d9c79b871ff Author: Mike Ruprecht Date: Thu Dec 2 10:59:39 2010 -0600 rawconference: Plug memory leak. commit 7529cdce2d5a32c5d53b9e6d4cdd5c757e77c940 Author: Mike Ruprecht Date: Thu Dec 2 10:58:19 2010 -0600 rawconference: Set initial valve drop settings after creation. commit 34a2b8146decafb206ca616081e2d76616d85485 Author: Mike Ruprecht Date: Thu Dec 2 10:56:06 2010 -0600 rawconference: Set ST's "sending" property when setting "direction". commit 8589287d2125f772ff4371c113ae629cb7ad1e4a Author: Mike Ruprecht Date: Thu Dec 2 10:48:35 2010 -0600 rawconference: Set booleans instead of bitmasked integers. commit ae0e46b054f3ae6c660e6c2a7acae780a79039ae Author: Mike Ruprecht Date: Thu Dec 2 09:59:07 2010 -0600 rawconference: Fix some GstElement refcount issues. commit 8c9aee835102cc55450cdbe8e7786f203b2615fe Author: Mike Ruprecht Date: Thu Dec 2 09:47:39 2010 -0600 rawconference: Implement FsRawSession's remote codec handler. commit 6a28aca56d1d7ef5849888b69085797546e06d59 Author: Mike Ruprecht Date: Thu Dec 2 09:46:06 2010 -0600 rawconference: Implement FsRawSession's codecs properties. Implement the FsRawSession's "codecs" and "codecs-without-config" properties. commit bd9b9c1a7dfcc298324fe9e4cd08b26d20ac8b18 Author: Mike Ruprecht Date: Thu Dec 2 09:44:08 2010 -0600 rawconference: Link the FsRawSession's capsfilter and transmitter_sink. commit 652fd46887658b751b8f10f2a0db72f2dfbb1d55 Author: Mike Ruprecht Date: Thu Dec 2 09:16:48 2010 -0600 rawconference: Free the FsRawSession's FsTransmitter. commit 7a69ac1b61e25eeec54b224e20ac2baa24d3bbea Author: Mike Ruprecht Date: Wed Nov 24 02:02:01 2010 -0600 rawconference: Add to FsConference and partially link transmitter. commit e225019df1fd66150e0ea56479ee845989f6aa1a Author: Mike Ruprecht Date: Tue Nov 23 23:18:26 2010 -0600 rawconference: Fix getting an out of range warning on a gboolean value. commit 8701fe7fa56f9b3d67c78e748b1f1f85476c382b Author: Mike Ruprecht Date: Tue Nov 23 01:31:19 2010 -0600 rawconference: Fix some type issues in fs_raw_session_new_stream. commit 4e029fecdc46be0557f7d42964f180dbb7117552 Author: Mike Ruprecht Date: Thu Nov 18 23:10:33 2010 -0600 rawconference: Improve setting the direction. commit 4f0087e0c99238c0119768b18b4561d80b872296 Author: Mike Ruprecht Date: Wed Nov 17 21:57:42 2010 -0600 rawconference: Implement the remote-codecs FsRawStream property. commit b70363090e2bebf8ac74bce981df8427af3fca36 Author: Mike Ruprecht Date: Mon Nov 15 23:05:43 2010 -0600 rawconference: Implement fs_raw_stream_set_remote_codecs. commit 063f2638f987b7898dc4d7f2bc4c928098d0bdb1 Author: Mike Ruprecht Date: Sun Nov 14 18:09:03 2010 -0600 rawconference: Create and connect FsStreamTransmitter signal handlers. commit 1e382ae597944c970358d2d4c5f42ef777f09afb Author: Mike Ruprecht Date: Fri Nov 12 14:53:28 2010 -0600 rawconference: Implement fs_raw_stream_set_remote_candidates. commit 667925eb8248482570ae0ec8f0f76446fac5f631 Author: Mike Ruprecht Date: Thu Nov 11 21:23:11 2010 -0600 rawconference: Remove fs_raw_stream_set_tos_locked. commit 8fef272dfa18140118befe4563692fef3e204b74 Author: Mike Ruprecht Date: Thu Nov 11 21:22:12 2010 -0600 rawconference: Add FsStreamTransmitter. commit f2e97b099d8b108f63bb64f7ad74df41daa19d8d Author: Mike Ruprecht Date: Thu Nov 11 20:00:19 2010 -0600 rawconference: Implement fs_raw_session_get_stream_transmitter_type. commit f9d4f972c4cf584668c561aa7be4a1ef873e28a7 Author: Mike Ruprecht Date: Thu Nov 11 19:45:33 2010 -0600 rawconference: Add FsTransmitter member. commit 31974c06037c24d8a92c82494d473a5ac86242f1 Author: Mike Ruprecht Date: Thu Nov 11 17:50:54 2010 -0600 rawconference: Add FsRawStream class files. commit 547c2091e4e92666f22f48b13be0127def0c9bb6 Author: Mike Ruprecht Date: Fri Nov 5 22:07:33 2010 -0500 rawconference: Add capsfilter to the session pipeline. commit 6d5546215bc20ed576ac10ec0abe35579530b69b Author: Mike Ruprecht Date: Fri Nov 5 20:35:21 2010 -0500 rawconference: Add an id to FsRawSessions and support creating them. commit ba067d5b954e119a68d113558d8d2ab630f9ab28 Author: Mike Ruprecht Date: Thu Nov 4 20:44:14 2010 -0500 rawconference: Implement fs_raw_conference_list_transmitters. commit 84060f78d4e2c1f31dc7e047446698dbd4d15b12 Author: Mike Ruprecht Date: Thu Nov 4 20:26:03 2010 -0500 rawconference: Add the FsRawSession class. These files have been copied directly from the FsMsnSession class and have simply been renamed. More modifications will be needed. P.S. The section documentation has also been altered to better suit the FsRawSession class. commit 66d044279d23b7fdf01f125c1c2d42aeb17b9dbb Author: Mike Ruprecht Date: Mon Nov 1 17:38:24 2010 -0500 rawconference: Remove cname from FsRawParticipant. commit 24e9a7184e18850b172bc7d218900308ccf5619e Author: Mike Ruprecht Date: Sat Oct 30 22:37:47 2010 -0500 rawconference: Add FsRawParticipant. commit 0418bc34a1cdb701062a3bb5f2a44a4afd0a43f5 Author: Mike Ruprecht Date: Sat Oct 30 21:50:14 2010 -0500 rawconference: Add base FsRawConference class and plugin structure. commit 22774302f3aadba3f1df976aec4462779d4f147f Author: Olivier Crête Date: Thu Jan 20 21:57:31 2011 -0500 Version 0.0.23.1 commit 680b46c8a3ac3b782f07a9c82f90cb145eaae7ba Author: Olivier Crête Date: Thu Jan 20 21:40:17 2011 -0500 Version 0.0.23 commit bed86be379f2f243474a4475fe42b53e12eae50b Author: Olivier Crête Date: Thu Jan 20 21:49:51 2011 -0500 common-modified: Dist another stamp file commit 33c8decb747ca2052cc04006746365abed82093a Author: Olivier Crête Date: Thu Jan 20 21:24:54 2011 -0500 nice: Update to use the nice 0.1.0 API commit 8a7ef0893b1f7abca05c24f9829e5c29778abc8f Author: Jakub Adam Date: Thu Jan 20 20:51:04 2011 -0500 nice: Add compatibility for MS Office Communicator 2007 R2 commit ea8cb34f2027241e348aa27e8bf16ae5be53bd45 Author: Olivier Crête Date: Thu Jan 20 16:15:14 2011 -0500 example gui: Keep a ref to the FsElementAddedNotifier to keep it alive commit cbe641522903ad838ec827135ac5f41d2c959de2 Author: Olivier Crête Date: Wed Jan 19 14:46:05 2011 -0500 example gui: Set the necessary properties for x264enc commit bb9e92964fed41e1abbdfee4dd2205edacb74d06 Author: Olivier Crête Date: Mon Jan 17 22:31:05 2011 -0500 rtpsession: Really fix dispose checking commit 684eca007b642630f635de3390430acffa2e8251 Author: Olivier Crête Date: Fri Jan 14 15:09:38 2011 -0500 rtpsession: Only set disposed to TRUE when actually disposing commit 84b2047da2ec50dc5417edd910ee9a6d2361e41d Author: Olivier Crête Date: Wed Jan 12 19:19:37 2011 -0500 tests: Add a test of codecs-ready before calling any method Make sure the codecs-ready is not TRUE if no methods have been called yet and some codecs that require discovered parameters are missing. commit 342ef3b56ce3ffe09aa5e0fd7f717db9218b8992 Author: Olivier Crête Date: Wed Jan 12 19:16:51 2011 -0500 rtpsession: Make sure the original codecs are propertly setup Do the update codecs when creating a FsSession so that original codecs have the required bits for the parameter gathering. commit 78458336223f2f28b61a92e0399d14566ed73815 Author: Olivier Crête Date: Mon Dec 20 16:56:44 2010 +0530 tests: Add test for pad alloc in fsfunnel Patch by Yongnian Le commit 4dafd5471f6a006f41e3eb55d5aa5accff6dbdf7 Author: Olivier Crête Date: Mon Dec 20 16:50:07 2010 +0530 funnel: Implement pad allocation Patch by Yongnian Le https://bugs.freedesktop.org/show_bug.cgi?id=32208 commit 2c56d479b9f5bc29ffdbb119e1f6e7c70840dfda Author: Andoni Morales Alastruey Date: Thu Dec 9 22:33:41 2010 +0100 Use portable 'g_snprintf' instead of 'snprintf' https://bugs.freedesktop.org/show_bug.cgi?id=32276 commit e9ecb91ed9589716883eb3aa05d1eb5ff0f2342d Author: Andoni Morales Alastruey Date: Thu Dec 9 22:54:07 2010 +0100 Replace legacy index() with strchr() and avoid calculating the index twice https://bugs.freedesktop.org/show_bug.cgi?id=32276 commit 8b16e803264325d1941ba420adc72dfcfd1f4e26 Author: Olivier Crête Date: Wed Dec 15 21:56:04 2010 +0530 mcaststreamtransmitter: Fix error message commit c2966a229a14da1c751dc8ee2c32535512653563 Author: Olivier Crête Date: Tue Nov 23 16:08:41 2010 -0500 shmtransmitter: Remove unused header includes commit cb3de7b50a42a414e59456a10fafc694ad2426d5 Author: Olivier Crête Date: Tue Nov 9 15:19:02 2010 -0500 Update gtk-doc-plugins.mak from common/ commit 9b732e99dd895ff09f67a72cbcb4f77c9b477ad3 Author: Olivier Crête Date: Mon Nov 8 15:52:08 2010 -0500 Verify the sanity of arguments passed to user-facing functions commit c8302f5170d842c7081520a30cb5280a21dd7140 Author: Olivier Crête Date: Thu Nov 4 18:35:29 2010 -0400 rtpsession: Unblock pad if the discovery callback is called while disposing of a session commit f7fb339ef66ec9f1325701d1f2ef4207afd52b34 Author: Olivier Crête Date: Mon Nov 1 17:36:44 2010 -0400 docs: Add docs for the shm transmitter commit 717f494dfbdc4ab64c03440f2a384cad8f4e4651 Author: Olivier Crête Date: Mon Nov 1 17:35:55 2010 -0400 docs: Update custom doc building rules to match newer gst tools commit 81a7237a05a37c8c973e0114b3d930c5d8035ec4 Author: Olivier Crête Date: Mon Nov 1 17:35:28 2010 -0400 nice: Use the right enum type for pad link return commit 12d971d58760d89dc0f3a20f43b02567ad3c1049 Author: Olivier Crête Date: Mon Nov 1 16:56:17 2010 -0400 Version 0.0.22.1 commit b356af11e71889eb64daa01553307dbbad4e4717 Author: Olivier Crête Date: Mon Nov 1 16:06:58 2010 -0400 Version 0.0.22 commit 36a7fc2ec61dc6d69448542d5546d1cf0bdfa0ef Author: Olivier Crête Date: Mon Nov 1 16:47:03 2010 -0400 Disable the test for changing the DTMF PT for now commit 559b582051b83eda33e2cf8e5563d22d6e8e5de4 Author: Olivier Crête Date: Mon Nov 1 16:05:51 2010 -0400 python: Require pygobject 2.16 to build commit c5bf786f663c65881c3375101db36c5f28fcc89f Author: Olivier Crête Date: Fri Oct 8 12:41:10 2010 -0400 rtpconference: The ptime/maxptime in caps are actually uints, not strings commit de1b8406948278d182dff54965241d940cbefbac Author: Olivier Crête Date: Mon Oct 4 17:24:31 2010 -0400 Update common and tabify Makefiles commit 2643cb8a870509074002c408e59f941f2eee15c0 Author: Olivier Crête Date: Mon Sep 13 18:07:24 2010 -0400 gitignore: Hide shm test commit 495b81157bf4856752085b7cc9d919b9cb468761 Author: Olivier Crête Date: Wed Sep 8 14:26:26 2010 +0300 readme: bump -bad requirement for shm plugin commit b772ff59d4f7aa2bebca5a1c3ca149918dad8b35 Author: Olivier Crête Date: Wed Sep 8 14:06:14 2010 +0300 tests: Whitelist shm plugin commit dcb980da78ddd3d97103508e2110ca02987af6ff Author: Olivier Crête Date: Wed Sep 8 10:50:44 2010 +0300 tests: Clear GError* between tests commit 530cf1c46f232f4b2990249813480d0363d321db Author: Olivier Crête Date: Wed Sep 8 10:50:18 2010 +0300 shmtrans: Don't try to unref NULL pointer on error commit 7dd8951d6583dc5e8e61a32f9e13c9b378da08c3 Author: Olivier Crête Date: Wed Sep 8 10:37:04 2010 +0300 configure: Require GLib 2.16 for GIO GIO is required by the shm example, require it. commit fcafc3b510a8f8be6c26c50ad1fafe4c4cea04bc Author: Olivier Crête Date: Tue Feb 9 11:19:54 2010 +0000 tests shm: check that prepared is called commit 89ca5fa4f6fedbc5f69c965f591c88aedb71c633 Author: Olivier Crête Date: Wed Feb 3 18:03:12 2010 +0200 shmtrans: Sync downstream element states before linking them commit be502e3d8334dfe450e8b1214c3cc4dac0022eb6 Author: Olivier Crête Date: Tue Jan 26 14:59:38 2010 +0200 shmtrans: Add debug commit fd916e1a71e5e2530c6a5c38a6241b8c479cf19c Author: Olivier Crête Date: Wed Feb 3 17:31:38 2010 +0200 shmtrans: Release teepad before stopping downstream elements commit ed0937ed0eb62c354de4c327061821756c57e1f1 Author: Olivier Crête Date: Tue Jan 26 12:37:28 2010 +0200 shmtrans: Emit local candidate with new path commit 7d9d69b75f7a0ee749f9d8e62d74e452340dea5e Author: Olivier Crête Date: Tue Jan 26 14:48:51 2010 +0200 shmstreamtrans: Set the sending in set property (not get) commit 631ef3725315f94597e09ee4136b65b68e26944c Author: Olivier Crête Date: Tue Jan 26 14:22:31 2010 +0200 shmtrans: Set do-timestamp and is-live to true on shmsrc commit df48a86229a4cc1d2e1e47918c2ea8c773af4417 Author: Olivier Crête Date: Mon Jan 25 08:39:46 2010 -0500 shmstreamtransmitter: Emit local-candidates-prepared commit eb7be5cfab3007fc5c05acaa3ad9390fb43e35d8 Author: Olivier Crête Date: Fri Nov 20 20:04:05 2009 -0500 shm: Document shm stream transmitter commit d2bd51bbcda4b51f93df8c5b8cf76eee198c793a Author: Olivier Crête Date: Fri Nov 20 19:55:04 2009 -0500 shmstream: Also ignore usernames that are empty commit 3d3f7d093c4450923ca429367bee39bd822d1ee7 Author: Olivier Crête Date: Fri Nov 20 19:52:28 2009 -0500 shm: Replace base_ip with username commit 405175be1ccb24440d018e374d2c933b7a5d607f Author: Olivier Crête Date: Fri Nov 20 19:36:08 2009 -0500 simplecall: Add shm version of simple-call commit bd79115bc77891ee33914b4478510a2d778616e5 Author: Olivier Crête Date: Fri Nov 20 19:06:20 2009 -0500 shm: Verify the success of state changes commit 2126b76eb46a74e4bd142cc2dc664f59c499f5db Author: Olivier Crête Date: Wed Oct 21 10:27:21 2009 +0300 tests: Add tests for the shm transmitter commit f6b69e63a83a07be8833b55fd61c69e675ee0891 Author: Olivier Crête Date: Tue Oct 20 12:01:33 2009 +0300 shm: Implement shm transmitter commit 76da655c11a52545a19b073dd22c242a74115ba9 Author: Olivier Crête Date: Fri Oct 16 16:40:27 2009 -0400 shm: Add empty transmitter commit 3d14332b2d3992c9a3f14f158135c26751ee3c4d Author: Olivier Crête Date: Thu Sep 2 21:09:17 2010 -0400 tests: Unlock lock in all cases commit 9605bd0371a36cae6c203cc9d9f3840b246ebae6 Author: Olivier Crête Date: Thu Sep 2 18:36:03 2010 -0400 fsplugin: Release lock on errors commit 38fca349840efb464b58856a97b393f8d1e7bdcd Author: Olivier Crête Date: Tue Aug 24 14:08:33 2010 -0400 elementaddednotifier: Don't abort on elements that have no factory commit 1348c07f7c6306905691b96d9ad6774d03725804 Author: Olivier Crête Date: Mon Aug 16 18:51:52 2010 -0400 rtpsession: Use copy of codec because mutex has been unlocked Can't use the ca pointer because it is part of a list that has been unlocked. commit 94ea369ca309f5b4a5d80b3fafec4aec8e4d783c Author: Olivier Crête Date: Thu Aug 12 15:08:35 2010 +0200 tests: Skip theora reception test if theora is not detected commit c022406deac41c5b3e356d537f8c1ad8cc4f480b Author: Olivier Crête Date: Fri Jul 16 19:12:41 2010 -0400 Version 0.0.21.1 commit 09c35f45fb4137dd8e0e2972ebca39ff2cdf9abd Author: Olivier Crête Date: Fri Jul 16 19:01:14 2010 -0400 Version 0.0.21 commit ecacf4f86a51470aca6de8747642e4224d906407 Author: Olivier Crête Date: Thu Jul 15 12:20:31 2010 -0400 tests: Have iteratory fold func return TRUE commit 09b528df52d4b92872fa3dcf9f63270cfb081c33 Author: Olivier Crête Date: Thu Jul 15 12:04:37 2010 -0400 rtpcodecspecific: Don't dereference potentially NULL variable commit 527a8361ea3297e35112ec7d3637e73820692a96 Author: Olivier Crête Date: Wed Jul 14 16:42:24 2010 -0400 Add warning cflags commit 1e1752d1cd2731d96ac13b25c8cb62184ea7ab5e Author: Olivier Crête Date: Wed Jun 30 16:12:21 2010 -0400 tests: Fix broken tests commit 4a55046e411205d1322e87e207054576ffd3942c Author: Olivier Crête Date: Tue Jun 29 17:54:14 2010 -0400 common-modified: Rename file in Makefile.am too commit e0af30df990c3363b78c44999b972e11a18b8209 Author: Olivier Crête Date: Tue Jun 29 17:47:39 2010 -0400 Add new enum-types file names to .gitignore commit c54b58700b53cc015a18bc648dbc4556d5f7a3fc Author: Olivier Crête Date: Tue Jun 29 17:44:58 2010 -0400 docs: Add crosslinks between libs and plugins doc commit a98e459707789e8b6f1f4a387102967a0747c0db Author: Olivier Crête Date: Tue Jun 29 17:00:52 2010 -0400 gtk-doc-plugins: Update from common commit bea77f711e714be449363eb2306a0ddb81673d52 Author: Olivier Crête Date: Tue Jun 29 16:32:10 2010 -0400 rtpsession: Put codecs from from "other" pads in the secondary codecs If the send_codec_bin has more than one src pad, then the codecs from the pads that dont match the main codec will show up in the "secondary-codecs" property of the "farsight-send-codec-changed" message. commit d70bc03956b1ad74a00eb9900e06e850fca67cf6 Author: Olivier Crête Date: Tue Jun 29 16:07:15 2010 -0400 rtpsession: Return error detaisl when linking send codec src pads commit 76ca77924b44367eda150ed7e6439b289f2b9078 Author: Olivier Crête Date: Sun Jun 27 04:37:55 2010 -0400 nice: Use nice_interfaces to get local addresses commit a98e85e79b74b932c40fdbcbf84547f584f8139c Author: Olivier Crête Date: Sun Jun 27 03:32:46 2010 -0400 Actually need dep on fs-enutypes.h to regenerate it commit d5d98ca1715a2a1d0db00b2cf566a56a9262156f Author: Olivier Crête Date: Sat Jun 26 16:56:36 2010 -0400 tests: Use GST_PLUGIN_LOADING_WHITELIST to prevent unintented failures commit 1932e991d46f36bffdb5896de8e4b525890c0567 Author: Olivier Crête Date: Sat Jun 26 16:30:57 2010 -0400 Don't regen fs-enum-types.h symlink if not needed commit c5496115517064047f8b64646bba88c4982754d5 Author: Olivier Crête Date: Wed Jun 23 19:29:51 2010 -0400 tests: Drop messages in codec tests commit a4bc9ee1d1a7fa7565d30248d2afb52c3fff6e71 Author: Olivier Crête Date: Wed Jun 23 18:22:00 2010 -0400 Don't re-create symlink when target changes commit ad33fc798ce6b16351180fc6857f804fa8ae5799 Author: Olivier Crête Date: Wed Jun 23 17:14:36 2010 -0400 tests: media_type isn't a pointer commit 60772f6cd9d280bfe9249448f6b8eeef944131fc Author: Olivier Crête Date: Wed Jun 23 17:13:40 2010 -0400 fsstream: Allow src_pads to not be empty It could be non-empty if the src pads are removed during the dispose phase. commit 177299ecdd35fd1e441ba65c9dd78dac6b6118ae Author: Olivier Crête Date: Mon Jun 21 16:29:46 2010 -0400 fsstream: Chain finalize to parent commit 1043a7f8e5f3209fffe1fe0583be6afd62da0aef Author: Olivier Crête Date: Mon Jun 21 14:31:33 2010 -0400 rtpdiscocodec: Add useful info to debug message commit 8768b5fad83bc6b147bb2d33b776552656708b7f Author: Olivier Crête Date: Mon Jun 21 14:30:09 2010 -0400 rtpdiscocodec: Use the proper getter functions commit 96c96fa9b1bccc9232b191ca6483b82177baf311 Author: Philip Withnall Date: Mon Jun 21 17:18:38 2010 +0100 rtpdiscocodecs: Remove a bad cast when listing codecs commit 8af63824c3fad84bc0e3a45f0018f75700b3e0cb Author: Olivier Crête Date: Tue Jun 15 17:25:35 2010 -0400 rtpcodecdisco: Use gst_caps_copy_nth commit dea00429e8eb9cee778afbc656bb48cd38714b0b Author: Olivier Crête Date: Tue Jun 15 17:24:23 2010 -0400 rtpdiscocodec: Simplify loop a bit more commit a646df62454567ba71c06cfea652453d935c9843 Author: Olivier Crête Date: Tue Jun 15 17:23:40 2010 -0400 rtpdiscocodec: Remove commented out code commit 746af45fad4616e89703bf390572d7d84e2a287e Author: Olivier Crête Date: Tue Jun 15 17:23:15 2010 -0400 rtpdiscocodec: Simplify loop a bit commit 00a7cb2ef3ed6acb35069dbc9e3f89a0b192719b Author: Olivier Crête Date: Mon Jun 14 20:02:19 2010 -0400 fsstream: Remove #if0'd code commit 2dc1f1ceca585f474df5a0a9111987ef4f67632b Author: Olivier Crête Date: Mon Jun 14 20:01:54 2010 -0400 fsstream: Actually do finalize commit 9428c3903bb46ca9232349f3593cef1f96d45bd1 Author: Olivier Crête Date: Mon Jun 14 19:57:36 2010 -0400 tests: Add lock to prevent unref before initialisation has finished commit 83c6b7229d49811c47fb03a576982907b580848b Author: Olivier Crête Date: Thu Jun 3 17:24:23 2010 -0400 Remove divergent copy of glib-gen.mk and use silent rules where possible commit a0e112dc9cfede0f86e74601869ddedc2ea4f338 Author: Olivier Crête Date: Thu Jun 3 17:18:51 2010 -0400 gst-glib-gen: Rename enum types tp FS_ commit 7ccde3d466703f5c82aa85ed9e87d5a5eae35bf5 Author: Olivier Crête Date: Thu Jun 3 17:18:15 2010 -0400 Add gst-glib-gen.mak From gst common 357b0db99f9957e1003df3979506cf6ca3278138 commit ff14bc7b1d71a68bd32ebb363a76622f1c5c1ecd Author: Olivier Crête Date: Tue Jun 1 17:27:03 2010 -0400 Version 0.0.20.1 commit 95fcdf18b0b877d073614fd322dcccfd870a7f87 Author: Olivier Crête Date: Tue Jun 1 17:12:33 2010 -0400 Version 0.0.20 commit b757f7cd345cb50b7413fc8688f6aea845d006de Author: Olivier Crête Date: Tue Jun 1 16:55:26 2010 -0400 tests: Remove extra debug commit 2d0aff947d1bc25adbaad25c6fe520e7363e3036 Author: Olivier Crête Date: Thu May 20 14:10:17 2010 -0400 tests: Add test for stream pads iterator commit a4f2fc80ba843023643ae7d1b121e17ac9882aa1 Author: Olivier Crête Date: Thu May 20 13:03:23 2010 -0400 fsstream: Add iterator to get src pads Allows finding which src pads belong to which FsStream commit c0a26ab7442103fb46011ebd8698e5ecd6b3cb75 Author: Olivier Crête Date: Thu May 20 13:02:56 2010 -0400 fsstream: Keep track of src pads commit 3f2ca3bb5aeb5733733d9a4d4bc19e520e73edbf Author: Olivier Crête Date: Mon May 31 15:18:40 2010 -0400 tests: Check that secondary-codecs are correct in dtmf test commit 9f63f05575c0722025702d2855ce7ca009819640 Author: Olivier Crête Date: Wed May 26 15:09:06 2010 -0400 Add secondary codecs to the farsight-send-codecs-changed message This way, the user can know when a change in DTMF codec has taken effect. commit 0a5462944878ab7c64893b35d1ae9e137955dfa7 Author: Olivier Crête Date: Mon May 31 16:13:19 2010 -0400 rtpcodecspecific: Separate mandatory and optional config parameters Only be happy with the mandatory ones. Also add "delivery-method" as an optional one. commit d4f5cb0dd2f46a09c52b09747e84afdca2023c12 Author: Olivier Crête Date: Mon May 31 15:24:31 2010 -0400 nicetransmitter: Remove nicesrc before stopping it This should prevent any EOS commit 56cb75eca2f161e801e391735e7e4b3b406941cf Author: Olivier Crête Date: Sat Mar 6 22:29:57 2010 -0500 tests: Add simple test for funnel element commit 7a258f3d6ee2630774476ca2c3fffd2e3fe67a86 Author: Sjoerd Simons Date: Fri May 28 20:55:00 2010 +0100 rtpsession: Correctly lock codec association in send_src_pad_blocked_callback() commit 48181445f0663d8a8cbfd5e88c50997dc490b005 Author: Sjoerd Sjoerd Date: Fri May 28 20:07:59 2010 +0100 rtpcodecnego: Skip disabled and reserved codec-associations in match function commit 6412913150cad978d9a9d7f05784dfb169ac201c Author: Olivier Crête Date: Fri May 28 13:45:47 2010 -0400 rtpsession: Use a copy of the codec because the lock has been released commit 506191030cbb9d868ea1d7dbb43304d8bad2bc93 Author: Olivier Crête Date: Fri May 28 13:45:31 2010 -0400 rtpcodecnego: Skip disabled/reserved codecs while negotiating commit f9a2ce305e342e897a3499db40c154cf0e5b2639 Author: Sjoerd Simons Date: Fri May 28 13:58:59 2010 +0100 Make a temporary copy of the send codec It's not safe to use a pointer to our codec associations without holding the FsRtpSession lock as other functions might destroy/replace them. Instead make a temporary copy of the selected send codec, which can be used safely outside of the locked sections commit 739290af44b7f2abc07fc142175321ffc7f614bd Author: Olivier Crête Date: Wed May 19 15:40:21 2010 -0400 Version 0.0.19.1 commit 9f833f49ed4ac7a4a578d0a3266c000486314c7b Author: Olivier Crête Date: Wed May 19 15:25:16 2010 -0400 Version 0.0.19 commit 7d1c909fbd276c79f5464efcf50082c896d946fb Author: Olivier Crête Date: Sun May 9 22:48:59 2010 -0400 rtpcodecnego: Get the codec params after the negotiation Only keep the codec params after the negotiation if the send codec has not changed commit 0f99348a7c89eefc45d72ddb003267b0496a27ec Author: Olivier Crête Date: Mon May 17 17:43:10 2010 -0400 rtpsession: Keep the recv codec as the discovery codec commit 5ac07d8e7e5b34218f9ca1e6e2c9131d29d62591 Author: Olivier Crête Date: Tue May 18 22:10:56 2010 -0400 fsplugin: Lock global variables commit 74ace7988083fd5cc284bdd07fa8cee6cf8ad74e Author: Olivier Crête Date: Tue May 18 20:12:42 2010 -0400 Update common/ and remove shave in favor of automake silent rules commit fb9843f846ab72cd10010e6deb166977d4277cc1 Author: Olivier Crête Date: Sun May 9 22:46:46 2010 -0400 rtp: Only emit send-codec-changed if something changed commit bc23b47dad9aa6e975789a4a6db5117c70d804c0 Author: Olivier Crête Date: Sun May 9 22:45:38 2010 -0400 gui: Ignore elements with no factory commit 4f0e2d4dd23a837a5eaa6bd7acddfcb1a0af3d21 Author: Olivier Crête Date: Sun May 9 21:56:11 2010 -0400 rtp: Work with new rtpdtmfmux using priority_pad for dtmf commit 6a0e2eff9eed12f5dcd20fcd62a92c2ec7aa222d Author: Olivier Crête Date: Thu Jan 21 14:29:10 2010 -0500 rtpsession: Set "favor-new" property when it exists commit 809408b31a48764054ef08cbbb1eef1336a720b2 Author: Olivier Crête Date: Wed May 5 15:17:27 2010 -0400 tests: Remove test on ptime in send-codec-changed The ptime in send-codec-changed is now the ptime used to receive on the same payload type (ie, it is the codec from "codecs"). Not the actual codec used to send. commit a8d1f30d2c1698ce0f94a00b939da7f29b89f55c Author: Olivier Crête Date: Wed May 5 14:51:43 2010 -0400 tests: There may be more than one send-codec-changed message on the bus If the timing is unlucky, there may be a first send-codec-changed message before the new one. commit 418137f1f6cfbca6ee5b53801469d657cfa0f18f Author: Olivier Crête Date: Tue May 4 20:11:49 2010 -0400 Version 0.0.18.1 commit faaa85d3746799c0bb4c6dc0545fc12f4af98b58 Author: Olivier Crête Date: Tue May 4 19:52:38 2010 -0400 Version 0.0.18 commit cfa5727ffb40cd5c22fce59721f4d0c1c1c0a998 Author: Olivier Crête Date: Mon May 3 14:31:34 2010 -0400 tests: Add test for H.264 parameter negotiation commit 90f61c184656399783539f6fbfbfded0390fda2c Author: Olivier Crête Date: Mon May 3 14:27:53 2010 -0400 rtpcodecspecific: Read the vales in the H.264 profile-level-id in the right order commit 4560f835883c097335b62bb45717b12786f6b0c6 Author: Olivier Crête Date: Mon May 3 14:27:23 2010 -0400 rtpcodecspecific: Give enough space for H.264 profile-level-id commit 0912af993b494d6dfe7baaf0eb7eef3689125847 Author: Olivier Crête Date: Fri Apr 30 18:32:33 2010 -0400 tests: H263-2000 negotiation tests Also fixes some bugs in the implementation commit 8e60f92c79903a96dd12c9bb8e0893a4acd0d43b Author: Olivier Crête Date: Fri Apr 30 17:31:29 2010 -0400 tests: Add tests for H263-1998 paramete negotiation commit 438c602844b3f03944ac3eb2f24cd31b35e89993 Author: Olivier Crête Date: Fri Apr 30 17:27:25 2010 -0400 rtpcodecspecific: For H.261/H.261 SQCIF/QCIF are restrictors These parameters restrict the default, so we have to keep them even if one side has them. The other ones are larger than the default, so they should only be present if both sides support them. commit e772760ce08fadfdba6ee3976ddebdb006b8311c Author: Olivier Crête Date: Fri Apr 30 16:05:19 2010 -0400 rtpcodecspecific: Ignore H263-2000 with profile but no level commit 7645aead7e031b03aa21be78b49266e61df467f2 Author: Olivier Crête Date: Fri Apr 30 13:41:48 2010 -0400 tests: Add test for H.261 negotiation commit 25b81d029411576331ce0dd0453733aec168d1df Author: Olivier Crête Date: Thu Apr 29 20:03:11 2010 -0400 tests: Add test for G.729 param nego commit 66c925d3858cfbd2712c2aebc182a4832220ca06 Author: Olivier Crête Date: Thu Apr 29 19:52:04 2010 -0400 rtpcodecspecific: Support G.729 annexb=yes correctly The parameter restricts the codec, so it has to be kept even if only one side supports it. commit 02f47f758638d1f42d418a7e39fefdaf8c8c413e Author: Olivier Crête Date: Thu Apr 29 18:08:27 2010 -0400 tests: Add test for iLBC param negotiation commit ddc7a691a11c12e938f66ce8cd42aa15ce8a4206 Author: Olivier Crête Date: Thu Apr 29 18:08:10 2010 -0400 rtpcodecnego: Don't keep previously negotiation params when re-creating the local list commit 6ffe4fa9cdd12cc05bbc68f5b897a5aebf4943cf Author: Olivier Crête Date: Thu Apr 29 16:09:13 2010 -0400 rtpcodecnego: Allow profile-based codecs with dynamically allocated payload types commit fc144cd9dca94a7d8e07463c192e34fa8c72ab0e Author: Olivier Crête Date: Thu Apr 29 15:55:04 2010 -0400 tests: Fix small leak in test commit bad4e98475fae154af43604355849e6a7ff407c2 Author: Olivier Crête Date: Thu Apr 29 15:06:50 2010 -0400 tests: Factor out the setup phase for codec negotiation tests commit e62722b3002bb74e28fb2153073e10aca3626bbf Author: Olivier Crête Date: Wed Apr 28 17:54:14 2010 -0400 rtpcodecspecific: Add H.264 negotiation commit 0e3d829169860362d6ef7b65a11b874c80345bb4 Author: Olivier Crête Date: Wed Apr 28 16:27:55 2010 -0400 rtpcodecspecific: Add jpeg2000 param negotiation commit 3b553203462579ef607be1b42e90996d123b777c Author: Olivier Crête Date: Wed Apr 28 16:07:07 2010 -0400 rtpcodecspecific: Add negotiation data for H.261 commit e16ac9342492f3aef5659dc54d53ed1492c12e31 Author: Olivier Crête Date: Wed Apr 28 13:47:12 2010 -0400 rtp: Keep a separate send_codec in the list to separate send and recv parameters Instead of treating ptime/maxptime as if they were special, now treat them like any other parameter and have two codecs with potentially different parameters. This means that the send side can now just take the send_codec from the CodecAssociation. This also has the side-effet that the ptime/maxptime can be put in optional_parameters. commit 1542f02478dce2da3caabbf200312d0326e7555a Author: Olivier Crête Date: Tue Apr 27 17:51:39 2010 -0400 rtp: Replace codec_copy_without_config with more generic codec_copy_filtered commit 59e2c9511c14c1f42d989a6c60b92b6c34a7beb7 Author: Olivier Crête Date: Tue Apr 27 15:31:20 2010 -0400 rtpcodecspecific: Use the default function to telephone-event events commit 14c8ab67903095174ce8e54cde84cc5c1959e294 Author: Olivier Crête Date: Tue Apr 27 13:14:24 2010 -0400 rtpcodecnego: Replace use_local_ids by multi_stream commit 18896af565d106c9a814209fe30863ef6d0cb62c Author: Olivier Crête Date: Mon Apr 26 20:47:42 2010 -0400 rtpcodecspecific: Handle ptime/maxptime in the text parameters commit 24eaa05748e32a211ccd6d1e97867e80bcee3994 Author: Olivier Crête Date: Mon Apr 26 20:47:26 2010 -0400 rtpcodecspecific: Split the param type filter into local and remote filters commit 26f4d51ab0ca7e219fd9f1938ea70c0ec95cb455 Author: Olivier Crête Date: Mon Apr 26 20:40:59 2010 -0400 rtpcodecnego: Add a few debug messages commit 0076e73568ec26e7ed7eb363f25a389f764b0895 Author: Olivier Crête Date: Mon Apr 26 20:00:26 2010 -0400 rtpcodecnego: Remove duplicated list traversal The fs_codec_get_optional_parameter function does the exact same thing. That is finding an optional parameter by name. commit 9c08f0a3b52c0532930a62e10ef84f54b42faccd Author: Olivier Crête Date: Mon Apr 26 18:01:14 2010 -0400 rtpcodecspecific: Replace FsStreamDirection with FsParamType commit 2bb6e38c954427a950885a80dd54747e04b92a30 Author: Olivier Crête Date: Sat Apr 24 15:17:19 2010 -0400 tests: Make message more accurate This test is done on stream and session codecs. commit 20f0bbe1c7aa6eea0d51e3db3fec8f368a0b1669 Author: Olivier Crête Date: Fri Apr 23 12:58:38 2010 -0400 rtpsession: Do correct atomic manipulation of codec preferences commit 3e7ccae619e4e2899c8c9ea86abfc4e44040e2ed Author: Olivier Crête Date: Fri Apr 23 12:42:08 2010 -0400 rtpcodecnego: Verify the codecs using the negotiation function commit 859f9eb9244e65830c71d6a5b023c80fd423bccf Author: Olivier Crête Date: Thu Apr 22 19:54:16 2010 -0400 rtpcodecspecific: Massively simplify codec-specific negotiation Have per parameter functions instead of a massive one. commit 3db32c219bce64cbc3fe8847d69d2d8e37b4811b Author: Olivier Crête Date: Fri Apr 23 12:45:07 2010 -0400 fscodec: Let the param parameter of remove_optional_param be NULL commit b0640d53cdf7742c38cc81426943fd4140d36a84 Author: Olivier Crête Date: Fri Apr 16 17:41:09 2010 -0400 rtpcodecnego: Rename lookup_codec_association_custom_intern to _internal commit 474593d19b33d690e62e6cf1c69d832d58512c22 Author: Olivier Crête Date: Fri Apr 16 14:37:27 2010 -0400 rtpcodecspecific: Remove mode=20 from iLBC if both sides support it This should implement the negotiation from RFC 3952. commit 3d5002b55d0e805b2b2d155f78d7662265eca8de Author: Olivier Crête Date: Thu Jun 25 19:21:13 2009 -0400 rtp: Release the request pads from gstrtpbin, require gst-p-bad 0.10.17 to match commit f169dec1535dbc00699fa801b50309fe0198a2c1 Author: Olivier Crête Date: Wed Jul 29 16:55:37 2009 -0400 rtpsession: Defer dispose to another thread if dispose is called from a streaming thread commit 4721b6f63c772b1f7eeef663798c5108e7bf1b58 Author: Olivier Crête Date: Wed Jul 29 16:44:42 2009 -0400 rtp: Keep track of all internal threads commit b24a9c7403760cb728ff82ba4c289361fff3d6ac Author: Olivier Crête Date: Thu Apr 1 19:45:56 2010 -0400 rtpsubstream: Use the session's enter/leave mechanism and keep refs in substream callbacks commit ab0519f2ae4c6ba3a522c27c72b0822148b9a77f Author: Olivier Crête Date: Wed Apr 7 21:24:08 2010 -0400 rtpsubstream: Don't loop to get new codec bins It will be re-locked if the codecs is changed so the callback will be called again commit 6ba456df1694aeaba2d80f10572a27c7bdac073f Author: Olivier Crête Date: Wed Apr 7 21:16:53 2010 -0400 tests: Add test for theora reception without config commit 63f2178ff41ee0134560b2e5b5d78fd100c99d08 Author: Olivier Crête Date: Tue May 4 14:21:49 2010 -0400 Use gst_pad_get_caps_reffed Use this new function where logical. Now require GStreamer 0.10.26 commit fd1f9a3d09122c031fa06729611e14209d03566e Author: Olivier Crête Date: Tue May 4 14:12:58 2010 -0400 rtp: Use gst_caps_can_intersect() where possible Use the new function where possible, required gstremaer 0.10.25 for it. commit 9afc783721081f2d3cc1bd64084e8ed7c38f00bb Author: Olivier Crête Date: Tue May 4 13:55:30 2010 -0400 rtpsubstream: Don't try to modify caps from buffer commit d707dff35724b8f54001ea0b039dff5431483d2c Author: Olivier Crête Date: Thu Apr 15 15:19:32 2010 -0400 rtpspecificnego: Use the default function for H263-2000, so less duplicated code commit f566173d832c0e468435f3261946186ff8c078b9 Author: Olivier Crête Date: Tue Apr 13 18:09:23 2010 -0400 gitignore: Remove no longer existant file commit 999960e74e2f4409afe9dbb868647072a78cf7b7 Author: Olivier Crête Date: Tue Apr 13 17:59:46 2010 -0400 Rename _doc.c files to .doc.c commit 5e8bbdf945df61eb5df77aeec796a671204f26d5 Author: Olivier Crête Date: Tue Apr 13 17:58:18 2010 -0400 rtp: Rename gstfsrtpconference.c to fs-rtp-conference-plugin.c commit b9cb72e59ff7e5aa51fef11b45a844a4bcd1677e Author: Olivier Crête Date: Tue Apr 13 17:43:16 2010 -0400 lib: Put the includes in the order according to the coding style commit 5b94e5d645968b4823a8691eccbb7aff60ac8521 Author: Olivier Crête Date: Tue Apr 13 17:40:13 2010 -0400 msn: Put the includes in the order according to the coding style commit 71e23fb7571632ad92108924ecb6f0d57171534f Author: Olivier Crête Date: Tue Apr 13 17:36:09 2010 -0400 rtp: Put the includes in the order according to the coding style commit e014f667f7f535be64b6cc899d033f7ea62cf709 Author: Olivier Crête Date: Tue Apr 13 17:37:29 2010 -0400 docs: Add header order to the CodingStyle file commit 15639bea2501bac9725b75258d9a5d17ee900e07 Author: Olivier Crête Date: Tue Apr 13 17:28:50 2010 -0400 rtp: Rename fs-rtp-specific-nego to fs-rtp-codec-specific commit 3495664c1de60a1ba385ab0a980948d215d83c46 Author: Olivier Crête Date: Tue Apr 13 16:49:17 2010 -0400 rtpspecificnego: Rename sdp_is_compat to more accurate sdp_negotiate_codec commit aa71f48e51c8afcaad67db29d237e52b54d95aef Author: Olivier Crête Date: Tue Apr 13 16:46:19 2010 -0400 rtp: Remove validate_config option from sdp_is_compat Option is not useful anymore, taking a remote codec without the config does no harm. commit 0d5bdb9d79f239b39173e23233d54d2d5f643a92 Author: Olivier Crête Date: Tue Apr 13 16:34:44 2010 -0400 rtpspecificnego: Document the goal of the various specific config functions commit 54034b29d5a151f9514efa4c63902478ed1e9e11 Author: Olivier Crête Date: Mon Apr 12 15:08:25 2010 -0400 docs: Fix the unused warnings commit 0f4404d86b22b41ba5b508bf0176ebfed6ad44b5 Author: Olivier Crête Date: Fri Apr 9 18:14:00 2010 -0400 rtpsession: Fix line above 80 chars commit 2b06614455a059f61d3cba9bb86d10ae9c8bc347 Author: Olivier Crête Date: Fri Apr 9 17:28:11 2010 -0400 nicestreamtransmitter: Don't include udp-bsd.h It is no longer needed https://bugs.freedesktop.org/show_bug.cgi?id=27260 commit b35321b7e9fa54311f41e7e520884c29ec7eeaeb Author: Olivier Crête Date: Fri Apr 9 17:22:05 2010 -0400 interfaces: Use union to prevent strict-aliasing violation Patch by Reimundo Heluani https://bugs.freedesktop.org/show_bug.cgi?id=25797 commit 6ca5ea83a63389d7b2eb5cf13ab4e980d2ea8aeb Author: Olivier Crête Date: Mon Apr 5 14:37:21 2010 -0400 rtpsubstream: Fix ref leak if substream is stopped commit 49eaf7976c2b3ebf0d54134bac537f4d4b7c1f56 Author: Olivier Crête Date: Thu Apr 1 18:47:02 2010 -0400 rawudptransmitter: Make sure stack variable is empty before using commit 459c46a2af31de2fd47e06c3c0e122e84b089dfb Author: Olivier Crête Date: Thu Apr 1 18:45:40 2010 -0400 rtpsession: Remove leaked element commit 03b8f9fb6e70e400ed7c189bbcdcefe0435e4c83 Author: Olivier Crête Date: Thu Apr 1 18:41:28 2010 -0400 rtpcodecache: Sanity check the number of blueprints commit b19e3e7582e210a8f85a4b043c7b4615aeb87cee Author: Olivier Crête Date: Tue Feb 23 18:36:10 2010 -0500 rtpnego: Ignore ptime/maxptime when copying the CodecAssociation The maxptime in the CodecAssociation only comes from the remote side, not from the local one. commit acbb1698ed55d6ea87d41195ba351db9d26a2841 Author: Olivier Crête Date: Mon Feb 22 21:26:49 2010 -0500 rtpcodecnego: Take ptime into account when looking for sending codec association commit 4a11b95fde8843673acae7a7632720e4552c3384 Author: Olivier Crête Date: Mon Feb 22 21:20:14 2010 -0500 rtpcodecnego: Don't deadloop if codec isn't valid for sending commit f7304fa2dd546d60562401e53320109cb931b33d Author: Olivier Crête Date: Mon Feb 22 17:45:12 2010 -0500 rawudpcomponent: Put version number in upnp comment commit 3ede4eefda3ae6f548d8562b130279d11d26b0a4 Author: Olivier Crête Date: Thu Feb 18 17:24:04 2010 -0500 rawudpcomponent: Unlock on invalid IP error commit bc6ffc8d967ac741330c0bc3b3423208a6511c3d Author: Olivier Crête Date: Mon Nov 23 16:08:50 2009 +0100 rtp: Force new keyframe when a new SSRC is validated A new SSRC being validated means we have received RTP packets from a new source. It means the NAT bindings exist. commit 814ebee8d98adeb42c0b6aad9073c0b8128b0265 Author: Olivier Crête Date: Mon Nov 23 12:28:15 2009 +0100 nice: Request new keyunit when a component becomes ready commit b05b01559918cec54069e28f9c2bbb99c770acf6 Author: Olivier Crête Date: Mon Feb 8 19:03:14 2010 +0000 tests: ptime test had inverted condition commit 333cdc6b88ac724bef0f5874471ac8b448e9c661 Author: Olivier Crête Date: Mon Feb 8 18:55:09 2010 +0000 rtpspecificnego: Fix corner cases in dtmf events processing commit c3b0aad4283476a9e478b9613e7ffd03069fd6e7 Author: Olivier Crête Date: Mon Feb 8 18:54:18 2010 +0000 tests: Correct double dtmf test result commit c8e0f4eaa36506bbb9e03ae736a24bdf6fa1dd7c Author: Olivier Crête Date: Mon Feb 8 16:53:36 2010 +0000 tests: DTMF events will be at most 15 in real life and requires events= commit 9339d7e758f6497760286b0639ab507b4e783a1f Author: Olivier Crête Date: Mon Jan 25 18:30:58 2010 +0200 msnsession: Already disposed condition was inverted commit 4d89782b0d6a8c96f459ce23df4dad26b5b1d195 Author: Olivier Crête Date: Tue Jan 5 12:35:38 2010 -0500 Version 0.0.17.1 commit 56c1eecaa134a71d2c46ccbe1b63194aacacc782 Author: Olivier Crête Date: Tue Jan 5 12:14:40 2010 -0500 Version 0.0.17 commit f64d09baa3a3ddc798859c8b32e43d4826747a06 Author: Olivier Crête Date: Mon Jan 4 15:57:08 2010 -0500 tests: Add test for telephone-event events parameter nego commit b29d812239f3871d2fd79e687d6206fecc4fa4e7 Author: Olivier Crête Date: Sat Jan 2 17:47:09 2010 -0500 rtpspecificnego: Add handling of telephone-event event ranges commit 070ff2aba5c04cd3f7491e3583e1d0180c2a1206 Author: Olivier Crête Date: Sun Jan 3 20:25:28 2010 -0500 tests: Skip tests if no local candidates are produced commit 327e825d42c46678e6d4ba818af98c8c9e9633b0 Author: Olivier Crête Date: Sun Jan 3 20:16:12 2010 -0500 rtcpfilter: Reduce the packet size when reducing the packet commit 31e1b458076c88bb2dc990bbd2543f8c7caa2093 Author: Olivier Crête Date: Sun Jan 3 19:07:14 2010 -0500 tests: Skip libnice tests if it finds no local candidates commit 1cf636312b3e78833bdeb22a41176575c8d5aed4 Author: Olivier Crête Date: Sun Jan 3 19:05:01 2010 -0500 rtpdtmfsoundsource: Respect the ptime/maxptime too commit fb8059850299c2c9ae3cbcd9d64527a523ec5690 Author: Olivier Crête Date: Tue Dec 29 14:09:03 2009 -0500 tests: Add test ptime/maxptime passing commit 5e0a762ab70d2a098059420c3eafc9666d2448f1 Author: Olivier Crête Date: Mon Dec 28 21:19:54 2009 -0500 rtpsession: Set the ptime/maxptime on the send codec bin caps commit 69d70c143143347f26fe591a960e32dcbfb82ddf Author: Olivier Crête Date: Mon Dec 28 21:19:39 2009 -0500 rtpcodecnego: Negotiate the ptime/maxptime commit 16084893a78030d8865decc57c9112d03678396b Author: Olivier Crête Date: Mon Dec 28 21:18:50 2009 -0500 rtpconference: Add function to make gst caps while keeping the ptime commit 5733939b65124648620e5aa9e2bdba6368b0680b Author: Olivier Crête Date: Mon Dec 28 21:16:11 2009 -0500 rtpcodecnego: Add function to copy the list of codecs with the send-side ptime commit 06df2cba3cd242a373b87039dd26a57369cec1e3 Author: Olivier Crête Date: Mon Dec 28 20:18:59 2009 -0500 tests; Add test for fscodec ptime/maxptime handling commit 16af4796550b512b6568e96d8f342bbeb068ce49 Author: Olivier Crête Date: Mon Dec 28 20:13:56 2009 -0500 codec: Add ptime commit ccdddc4941ff53713f9b5d148b268742cb7e8ee5 Author: Olivier Crête Date: Thu Dec 3 10:12:36 2009 +0530 codec: Add maxptime commit 0e81d852d0d3f2aac280f01a87ae6dd4f8781a05 Author: Olivier Crête Date: Tue Dec 22 15:55:41 2009 -0500 tests: Take rtpsession lock during message emissions This ensures that it is not held across message emissions. commit 39e92f6356b533adb4e378cb830b770eff6b3332 Author: Olivier Crête Date: Tue Dec 22 13:06:39 2009 -0500 tests: Add debug-blocks commit 039cda44dd0e41f7f4e1a4ca409343d0b5361b61 Author: Olivier Crête Date: Tue Dec 22 13:06:30 2009 -0500 rtpsubstream: Keep ref on substream while callbacks are invoked commit f71363416f7845fe60faf47b88ffd0220f890334 Author: Olivier Crête Date: Tue Dec 22 13:06:08 2009 -0500 rtpsubstream: Put codec/codecbin inside loop commit d3aa11f608eb7a1225f79db31034a6d60e7d4401 Author: Olivier Crête Date: Mon Dec 21 17:10:43 2009 -0500 rtpsubstream: Use rw-lock to make sure the substream really stops commit 98fd50c7f74dfbd58b31ea3522ee68cdb5ab8263 Author: Olivier Crête Date: Mon Dec 21 16:45:57 2009 -0500 rtp: Move locking into callback commit 35c11d71f4482d241b47b82401f079baa1eba521 Author: Olivier Crête Date: Mon Dec 21 15:39:33 2009 -0500 rtpsubstream: Don't hold session lock too much while setting new codecbin commit 9cbd95a8958478b1b4537f11d4ba705f81be6ed6 Author: Olivier Crête Date: Mon Dec 21 15:24:56 2009 -0500 rtpsubstream: Move modification locking to blocked function Also allow only one thread to be in substream blocked function at once. commit e11ef1a346baf58dcf67f59ae4e3e0dc787dd639 Author: Olivier Crête Date: Mon Dec 21 14:09:06 2009 -0500 rtp: Move substream blocking logic into substream commit 6c5129ac32684b9a80094a0e2071b9754ea7f307 Author: Olivier Crête Date: Mon Dec 21 14:08:40 2009 -0500 rtp: Don't include marshaller headers in headers commit 24182b1d04e2350a56831dac6dc5cb050bd917fa Author: Olivier Crête Date: Mon Dec 21 14:07:47 2009 -0500 rtp: Depend on the correct var for marshaller list generation commit f0ca4af5c9b3583ab8ffc9bbc01840e2184a20d8 Author: Olivier Crête Date: Sun Dec 27 11:38:41 2009 -0500 rtcpfilter: Add gst-p-base paths to Makefile.am Patch contributed by Armijn Hemel commit d84cff657a7057fef1218580449ecc71daffc5f3 Author: Olivier Crête Date: Sat Dec 5 14:25:24 2009 +0530 rawudp: Remove upnp-request-timeout, it was a terrible idea commit 4c6a92d54b2ea441d14ac296aaf9625e78cdef31 Author: Javier Jardón Date: Thu Dec 3 22:43:21 2009 +0100 Substitute deprecated Glib symbol: g_mapped_file_free Use g_mapped_file_unref if Glib >= 2.22 is available http://bugs.freedesktop.org/show_bug.cgi?id=21422 commit 4a0ac4a9275bc0a634e9137c422f23c311e5012c Author: Olivier Crête Date: Fri Nov 20 19:12:47 2009 -0500 rtpsession: Only add stream to list if its creation worked commit 42c565ec5e3d0e2bdb8e7b90c297425f1984254f Author: Olivier Crête Date: Wed Nov 18 10:52:08 2009 -0500 README: Require gst-p-bad 0.10.17 for dtmfsrc dtmfsrc can do do more than 8000 Hz, that has only been fixed in gst-plugins-bad 0.10.17 commit af3392d0634b1cf084afc164459394125d041e8b Author: Olivier Crête Date: Wed Nov 11 16:48:09 2009 -0500 rtpdtmfsound: Try hardwired PCMx only if the clock-rate is 8000 commit 3e7b98ade4ffede0fb8bc5ce326daff6a1a360ae Author: Olivier Crête Date: Mon Nov 9 15:33:52 2009 -0500 rtp: Lookup codec with config is always for sending, so make it explicit Also, the dtmf sound will always get a valid codec now. commit b9c3f87e23c4e08a93abf2b2ed735ca447235863 Author: Olivier Crête Date: Mon Nov 9 13:03:08 2009 -0500 rtpconference: Make message about gst_bin_add failure more accurate commit ae09f2625284ba27dcc8a0c5fb54745c41501e98 Author: Olivier Crête Date: Mon Nov 9 13:02:30 2009 -0500 rtpdtmfsoundsource: Ignore codecs that don't have a blueprint commit a4b660da2d2863fea824b384811ee0edfb617378 Author: Olivier Crête Date: Thu Nov 5 16:44:07 2009 -0500 tests: Test dtmf as sound commit 3fc8eaeb003e475044063c34a205fa52e9af3249 Author: Olivier Crête Date: Thu Nov 5 16:01:49 2009 -0500 tests: Make recv-pipeline per test commit a154b292b530873eadc62119a28c63373eafd9a7 Author: Olivier Crête Date: Wed Nov 4 17:54:03 2009 -0500 rtpdtmfsoundsource: Use main codec if PCMA/U are not available commit b8d3b2b9f969b982d5ea07f26b81c397959392f3 Author: Olivier Crête Date: Wed Nov 4 16:07:51 2009 -0500 rtpspecialsource: Make local class_get_codec function static commit a908a023039fe62a4da51749d99118c2d0578945 Author: Olivier Crête Date: Wed Nov 4 16:03:04 2009 -0500 rtp: Regroup CodecBlueprint related functions in one place commit c5a996fadd8bc24bdac4549792d6aa152ee68a20 Author: Olivier Crête Date: Wed Nov 4 14:50:44 2009 -0500 rtpspecialsource: Rename negotiated_codecs to negotiated_codec_associations This way, the list contents can be guessed commit 446e5b38951ba4dc85b4081db923cd713fac8084 Author: Olivier Crête Date: Fri Oct 9 20:31:22 2009 -0400 rtpsession: Don't need to set queue-delay anymore commit f09359f8e8ba07f283bbced4a74c5b9d51a80fa5 Author: Olivier Crête Date: Fri Oct 9 20:30:29 2009 -0400 rtpsession: Split codecbin generation from factory from profile commit 1657e35c10ff73e2cf191b9c86578d884c23af32 Author: Olivier Crête Date: Fri Nov 13 19:44:25 2009 -0500 tests: Make it build against GUPnP 0.13 commit f9f9d5a3895ecf6669012dcba7c8cb68adc1e575 Author: Olivier Crête Date: Fri Nov 6 13:49:12 2009 -0500 msnsession: Check if dispose has already been called commit 04c5ea7586f6d6559be3d2bd963bda2c27285475 Author: Olivier Crête Date: Fri Nov 6 13:47:05 2009 -0500 fstransmitter: uint can't be < 0 commit 2efb3ffbfcb533b003f0b426a6ec01690f7e95c5 Author: Olivier Crête Date: Mon Oct 26 13:52:55 2009 +0000 rawudp: Bring upnp discovery timeout down to 2 seconds commit 27d875f7e1e632272a3e1b5ae07ce676a448c0f2 Author: Olivier Crête Date: Mon Oct 26 12:32:58 2009 +0000 tests: Verify that it is not possible to disable all codecs Add a reserve-pt to guarantee that it is not possible to disable all codecs commit aa346ebd2a6d29f7ba0ec65aad45590331660fcb Author: Olivier Crête Date: Mon Oct 26 12:42:06 2009 +0000 rtpcodecnego: Verify if there are any valid local codecs left after applying preferences commit 573ff392b197c6255e3cb4c6935eabb45f7ddca7 Author: Olivier Crête Date: Fri Oct 9 16:07:33 2009 -0400 rtpsession: Make error message less cryptic commit 3d9847d67304a1b7de05f936fd7d5d39e9b6bf9b Author: Olivier Crête Date: Tue Oct 6 14:42:30 2009 -0400 Version 0.0.16.1 commit 30889433aec2a3ac9e91c69235bb91a920df1fe1 Author: Olivier Crête Date: Tue Oct 6 14:23:32 2009 -0400 Version 0.0.16 commit d0b400225cbbac0b7f2dfd40b4430b4cd203c30a Author: Olivier Crête Date: Mon Oct 5 15:07:15 2009 -0400 rtpspecialsource: Remove want_source() method get_codec() function does the same thing commit 43ed724ee47ce1f80c7b3a2947ffa1499c51fe8a Author: Olivier Crête Date: Mon Oct 5 15:01:15 2009 -0400 rtpdtmfsoundsource: Implement get_codec method commit cdddd7835fe1dbf5d308f59be9eb5badc67c90cf Author: Olivier Crête Date: Mon Oct 5 14:52:22 2009 -0400 rtpdtmfeventsource: Implement get_codec method commit 6227b7d59b5319db449cd5243661407749af9ec0 Author: Olivier Crête Date: Mon Oct 5 14:45:15 2009 -0400 rtpspecialsource: Add new get_codec method commit 94e51ff396f980e94b301877d560ba918fa9e15c Author: Olivier Crête Date: Wed Sep 30 19:05:30 2009 -0400 rtp: Check if the codec changed when removing special sources commit dc374fec5d6ba1d6ccb998febb720985b57c84ae Author: Olivier Crête Date: Wed Sep 30 18:55:26 2009 -0400 rtp: Allow checking if a codec is valid for sending even if it has no way to build a codecbin commit 28ca580d77444830cc525093eade4aabc15ddc5a Author: Olivier Crête Date: Wed Sep 30 15:31:19 2009 -0400 rtpcodecnego: Fix doc string commit 152a26550bf8dd2f08de5f91bb2977104b5a5bbf Author: Olivier Crête Date: Wed Sep 30 15:13:10 2009 -0400 rtpspecialsource: Move static function closer to its use place commit 260cea17e20a4eb77d207712790fc8a041ca0574 Author: Olivier Crête Date: Wed Sep 30 14:25:17 2009 -0400 rtpspecialsource: Fix over-80 line commit 0d10afe4ff342f988c69916d2510bbd2bc7f6161 Author: Olivier Crête Date: Wed Sep 30 14:24:51 2009 -0400 rtpsession: Check/update secondary sources even if the primary one doesn't change commit 269568e6c30797e02c122b0d0ce1ff1d1a0677c2 Author: Olivier Crête Date: Tue Sep 29 19:19:32 2009 -0400 tests: Tests changing the dtmf PT mid-call commit 0747362705098acd5336eaddb4f071c5f95231ac Author: Olivier Crête Date: Tue Sep 29 18:46:40 2009 -0400 tests: Make sure dtmf events are really received commit dc7c9df2fdf8e27abe5ccfc6201cec2e1f0354f9 Author: Olivier Crête Date: Tue Sep 29 18:45:13 2009 -0400 test: Test changing the dtmf_id commit 02eaccd14eb2def5148d9302e8647309eaa36b46 Author: Olivier Crête Date: Tue Sep 29 18:07:18 2009 -0400 tests: dtmf method is not always auto commit e90f83853a8affa655dcfabdffcdb0dbb16ccc99 Author: Olivier Crête Date: Tue Sep 29 18:05:48 2009 -0400 rtpsession: Only emit send-codec-changed message after the special codecs have been changed commit a12ecea8e3187ef38bb254794d573c4b579e8e71 Author: Olivier Crête Date: Thu Sep 24 20:57:20 2009 -0400 rtpsession: Don't leak iterator on linking failure commit d6f3c3b7d88db29d455eb4b5a20e558075d822a6 Author: Olivier Crête Date: Thu Sep 24 20:57:06 2009 -0400 rtpsession: Cleanup send codecbin on failure commit 3cc35a8592ef7ca083b9dea658ea24bf5f90656e Author: Olivier Crête Date: Thu Sep 24 20:55:51 2009 -0400 rtpsession: Print error on session dispose problems commit ccb7cac69c5f07479c603f6776a01eb0571414ec Author: Olivier Crête Date: Thu Sep 24 17:25:10 2009 -0400 rtpdtmfsoundsource: Correctly check the presence of elements commit 8407fc8b6c280712d11ade59db34661f1e95aa49 Author: Sjoerd Simons Date: Sat Sep 19 18:15:59 2009 +0100 rawudp: Use %d for ints, not %s commit 1c8f9c12c9de884362287e89dc51da37ca1cc467 Author: Olivier Crête Date: Fri Sep 18 15:46:53 2009 -0400 configure: quiet automake portability bs commit c7c7e355a20b4a0e117232d733407dc656cc6652 Author: Olivier Crête Date: Thu Sep 17 21:58:07 2009 -0400 msnstream: Make send sink async=false for now commit b51c1f8559bf9704857c5483294b68eca3a02701 Author: Olivier Crête Date: Thu Sep 17 21:44:35 2009 -0400 msnstream: Don't keep lock into set_remote_candidates commit a8393dbb09aca8902c94996cc0061acbc48d8bc9 Author: Olivier Crête Date: Thu Sep 17 12:46:27 2009 -0400 tests: Test invalid property name in fs_element_added_notifier_from_keyfile commit 1f2685d2335eae0bcb6547e49410afec466f5355 Author: Olivier Crête Date: Thu Sep 17 12:47:10 2009 -0400 element-added-notifier: Don't crash on invalid property commit 928e4a5f785507d98cdb467a4e1e7feafb18e326 Author: Olivier Crête Date: Mon Sep 14 17:38:26 2009 -0400 rtpconference: Don't assert on non-existing sdes parts commit c884c30b8157f184c9e2aa39c20ca0aeffe808ba Author: Olivier Crête Date: Thu Sep 10 17:33:49 2009 -0400 rtpspecialsource: Dispose is not always called twice, cleanup in finalize commit e893ed9ae9b533cf0910dfc9d179979dcff5730a Author: Olivier Crête Date: Tue Sep 8 19:28:20 2009 -0400 rtpsession: Remove useless ref commit c581896d27c1838f8f4df74587ee3f7144b14bc1 Author: Olivier Crête Date: Thu Sep 3 18:44:23 2009 -0400 Version 0.0.15.1 commit 0c0baf1e171afb2e9f3622486398a957f11fece2 Author: Olivier Crête Date: Thu Sep 3 18:24:08 2009 -0400 Version 0.0.15 commit 3453a584cea2c7272e0a5cc5b3b42d130d91e5ba Author: Olivier Crête Date: Thu Sep 3 18:17:25 2009 -0400 Require gst-p-bad 0.10.14 for mimic commit e3708e794bc68c482fd76fbf57b503913ea38d30 Author: Olivier Crête Date: Thu Sep 3 17:56:53 2009 -0400 tests: Unlock src before setting it to playing commit b1019f6c98f2a10b1eb975d3ebab8d281f565d87 Author: Olivier Crête Date: Thu Sep 3 17:55:57 2009 -0400 tests: Refrain from using the thread unsafe version of failure in the nice test commit 32fe84dae17f4fc5fd4816bc4f13454b683e727d Author: Olivier Crête Date: Thu Sep 3 15:20:10 2009 -0400 rtpsession: Keep ref on stream while associating substreams to it commit 46f89ab40e611a5ed0697fe4592935e70b19a0da Author: Olivier Crête Date: Thu Sep 3 14:22:00 2009 -0400 rtpsubstream: Remove another double-unlock in error case commit 304e7ac095e8c539b917fccc3e771231dae5c0ee Author: Olivier Crête Date: Tue Sep 1 19:38:01 2009 -0400 rtpsession: Don't double-unlock commit eeae1d72e8b95d416f1c96f9de624cab4223760d Author: Olivier Crête Date: Tue Sep 1 19:35:32 2009 -0400 rtpsession: Fix leaking caps on signals after dispose commit 67f291df926ffc381abb571bdb7f5f3d88093c74 Author: Olivier Crête Date: Tue Sep 1 18:51:05 2009 -0400 rtpsession: Fix potential leak if already disposed commit 9432e1e2d57bfe7a3f1bd94ce7b302162c1d3ad0 Author: Olivier Crête Date: Tue Sep 1 18:50:51 2009 -0400 rtpsubstrea: Remove unused variable commit 9c6f5e1b9bbc7543e527a088a27bda9563e407c1 Author: Olivier Crête Date: Mon Aug 31 15:01:32 2009 -0400 elementaddednotifier: Use g_connect_signal_object Otherwise each element had a ref on the notifier and relied on the not thread safe weak references. commit 8d102cfee303c77020f7c3ddd6370c88792e5bb9 Author: Olivier Crête Date: Thu Aug 20 10:19:40 2009 -0400 rawudp: Emit local candidates if there are no local interfaces suitable for UPnP commit c6b9fd4eda3cbf2082ac5b07a6e9dc5f9f8cf534 Author: Olivier Crête Date: Thu Aug 20 10:19:13 2009 -0400 rawudp: Add some UPnP debug messages commit 5bbd242795b143f862b775220f89a2e652bd9ee0 Author: Olivier Crête Date: Mon Aug 17 17:03:37 2009 -0400 glib-gen: Use single = instead of == for portability commit 160cea00257fcce1924f1696725208c79dab50f9 Author: Olivier Crête Date: Wed Aug 12 14:48:47 2009 -0400 msnconnection: Check return values from recv() commit e71f86bc3ab0185c0e1ef00406bdb48fd1dbc050 Author: Olivier Crête Date: Wed Aug 12 14:28:26 2009 -0400 msnsession: Conference must always set before get_property commit c8aac249cd1aa38882644bde1c78ddd76c5cb2b5 Author: Olivier Crête Date: Wed Aug 12 14:27:14 2009 -0400 msnsession: Only try to lock conference if it has been set commit f61c6fdfcd7763fa0e640455c6b67ed51b600faf Author: Olivier Crête Date: Wed Aug 12 14:24:14 2009 -0400 rtpsession: Initialise variable to NULL Makes coverity happy commit cc0c86bd6a3cb4cad5da753ed57e40fd3d17db84 Author: Olivier Crête Date: Wed Aug 12 14:23:52 2009 -0400 msnconnection: Remove unused variables commit 5872086d4d3d72dc675c190206138231b0edf26f Author: Olivier Crête Date: Fri Aug 7 19:14:13 2009 -0400 rtpstream: Correct documentation commit 84161b32250d847e4b200b99589b1359b7822f9a Author: Olivier Crête Date: Fri Aug 7 16:43:40 2009 -0400 rtpsession: Unref transmitter src/sink in dispose Unref element from g_object_get(), fixes leak commit bdc51c5a3d829bd2fcf041ce06e6ff3a35c80ebd Author: Olivier Crête Date: Fri Aug 7 16:43:11 2009 -0400 elementaddednotifier: Unref element in iterator loop Fixes leak commit 4f698cbfecb89258397d29ffb82e8c8e3b6c8de1 Author: Olivier Crête Date: Tue Aug 4 15:37:36 2009 -0400 elementadded: Use gst_value_deserialize to read properties Use the existing function instead of having our own less-capable re-implementation commit 9ecc88b7d54d2037053bb3e5beba1c5f491598a5 Author: Olivier Crête Date: Mon Aug 3 16:47:44 2009 -0400 Version 0.0.14.1 commit 20ffe3888a03c9e762b03419eba46d55ad56ceb7 Author: Olivier Crête Date: Mon Aug 3 16:32:19 2009 -0400 Version 0.0.14 commit ec8c0a1204b0381c778fa39fba485f041e7e8582 Author: Olivier Crête Date: Tue Jul 28 13:35:34 2009 -0400 nice: Pass ToS property to libnice commit e1adf1e1951daf8aedfac4559be0c85bc4731407 Author: Olivier Crête Date: Fri Jul 31 17:44:36 2009 -0400 Bump libnice requirement to 0.0.9 This is required to the tos setting function commit 6afd591046fcaa93341767dcf70a8b2539a16f45 Author: Olivier Crête Date: Sat Jul 25 15:26:15 2009 -0400 tests: Add tests for ToS commit 124a3e748a51be156ac8fcc6f71f7e31c698b161 Author: Olivier Crête Date: Sat Jul 25 15:04:23 2009 -0400 msn: Implement ths ToS property commit 4131702911fae979eb1a2e8ba5cf26cefc46bb62 Author: Olivier Crête Date: Sat Jul 25 14:42:39 2009 -0400 rtpsession: Set Type of service on transmitters commit 331f91c979bd8e0051d3fa017fd14e86e9123d5d Author: Olivier Crête Date: Sat Jul 25 14:36:14 2009 -0400 session: Add ToS property commit 6bc62f2b1f9947e0529b788e5135ca9f61bf4816 Author: Olivier Crête Date: Wed Jul 22 17:28:11 2009 -0400 fstransmitter: Pass the ToS in the _new function commit 4715c87e5e06ab521ae699d5f94dd01c52c87505 Author: Olivier Crête Date: Wed Jul 22 16:57:49 2009 -0400 multicast: Implement ToS field commit 518947fb469f6e4ef11c09712c7678de625f0f53 Author: Olivier Crête Date: Wed Jul 22 16:51:23 2009 -0400 rawudp: Implement setting of the ToS commit 18fbd33aea8fb4a76a03a4e771fbcb89fff1b5fa Author: Olivier Crête Date: Wed Jul 22 16:31:44 2009 -0400 transmitter: Add tos (type of service) property commit fcf8499faea878b879d54ddfc2f9d006d455cd4f Author: Olivier Crête Date: Mon Aug 3 14:56:05 2009 -0400 tests: Make it build on OSX where RECVERR/ERRQUEUE don't exist commit 2ec43985ac3713941e7b3155374ea2c64df62d6f Author: Olivier Crête Date: Mon Aug 3 14:32:01 2009 -0400 msn: Print error on test failure commit 6f9f1bb3f51508c571e0fb9d8a5ddc2dcec9ee4b Author: Olivier Crête Date: Mon Aug 3 14:30:57 2009 -0400 rawudp: Set the socklen to the right len per address family commit f07efb47967ab5bd851c0c6d45bbdfee8cdc9aac Author: Youness Alaoui Date: Mon Aug 3 13:54:59 2009 -0400 Fix some formatting issues commit 105493503257083fae86ac127b279e0903c1d8d1 Author: Olivier Crête Date: Mon Aug 3 11:53:07 2009 -0400 rtcpfilter: Verify if the packet exists before continuing commit 451b9e235f41faee2fcd0d188d629c58e1a14634 Author: Olivier Crête Date: Thu Jul 30 12:14:22 2009 -0400 Version 0.0.13.1 commit 6f953c28402209772a7add26cbbebbe81a8ce5bf Author: Olivier Crête Date: Thu Jul 30 12:02:29 2009 -0400 Version 0.0.13 commit 96870f00af162f2292c12ab7a4ba855dd705a249 Author: Olivier Crête Date: Thu Jul 30 11:56:41 2009 -0400 tests: Fail keyfile test if can't load file Fail the tests if it can't load the keyfile Also add the keyfile.. commit 8489132f0f12a798d501788265438199e5c39c98 Author: Olivier Crête Date: Thu Jul 30 11:45:45 2009 -0400 gui: Add .ui files to automake file commit 1e94ebd3a107ca205d0827b822bd2751ebab64ba Author: Olivier Crête Date: Wed Jul 29 18:22:06 2009 -0400 rtpconference: Let messages through on construction errors commit 217ae1539ad7333acacfa31b546259ca5e628c18 Author: Olivier Crête Date: Wed Jul 29 16:29:57 2009 -0400 Revert "rtp: Release the request pads from gstrtpbin, require gst-p-bad 0.10.13 to match" This reverts commit f5c228f61018b75d908e1c1ca586fdb00a587500. The session dispose then tries to remove the recv part of the gstrtpbin, which tries to stop the jitterbuffer stream. The session dispose could be called from a streaming thread (if it is disposed during a src-pad-added signal for example). We need to stop it from another thread in this case. commit f5c228f61018b75d908e1c1ca586fdb00a587500 Author: Olivier Crête Date: Thu Jun 25 19:21:13 2009 -0400 rtp: Release the request pads from gstrtpbin, require gst-p-bad 0.10.13 to match commit f8cb36ea210d153027101ab06ec1aab409dcfd0c Author: Olivier Crête Date: Sat Jul 25 21:36:21 2009 -0400 base: Use g_signal_connect_object to prevent races commit 19a023fd7488c5623bdb36f73d6e4abdba3f4d13 Author: Olivier Crête Date: Sat Jul 25 18:38:48 2009 -0400 Document undocumented symbols commit e7022c942e982684cb7eda32e93a8401236fabc5 Author: Olivier Crête Date: Sat Jul 25 18:30:16 2009 -0400 tests: Sync src state with parent to try to defeat race The race is that the source can be state locked while the main pipeline is stopped. This will caues an abort() when the pipeline in unreferenced. commit 5a905095a7738a197072efc6788765c271772a85 Author: Olivier Crête Date: Sat Jul 25 18:15:27 2009 -0400 msn: Remove unused parent_class pointers commit e596117cdae463af8e2373758b9817bdb0f73afe Author: Olivier Crête Date: Sat Jul 25 18:13:54 2009 -0400 rtp: Remove duplicated parent_class pointers commit 7e5b540de33bf84472f402027130a3e66ca1ff78 Author: Olivier Crête Date: Sat Jul 25 18:07:50 2009 -0400 lib: Cleanup parent_class/dispose/finalize Remove a bunch of useless stuff commit c26d3d6662e0e256c0c31faa027da9fd1a6f9296 Author: Olivier Crête Date: Sat Jul 25 16:33:43 2009 -0400 Add G_PARAM_STATIC_STRINGS everywhere commit 2474ebad24d038c20d8a746061975634767fe1db Author: Olivier Crête Date: Wed Jul 22 15:57:05 2009 -0400 msn: Make the fdsrc timestamp the buffers This way, it will act like a live source and will timestamp the buffers with the current running time. commit dacec3a33ddd40490ef1dfd83987df88367c632a Author: Olivier Crête Date: Wed Jul 22 14:07:18 2009 -0400 funnel: Ignore errors from newsegment push commit a6cc137442dbba91f24385e50a161700d4ddd27e Author: Olivier Crête Date: Wed Jul 22 13:56:23 2009 -0400 tests: Remove useless get_state commit 1ade48f68856a68dffecbf00a69ff10eb9dd9fb5 Author: Olivier Crête Date: Tue Jul 21 21:12:48 2009 -0400 rtp: Create caps only if needed, fixes leak commit 9d375e15be9cb5d853cbe024b60fe47295afccf8 Author: Olivier Crête Date: Tue Jul 21 21:01:14 2009 -0400 rtp: Remove useless properties in special sources commit 4bbc6acd6b185ebda25a0f8f240c69b82236ffa7 Author: Olivier Crête Date: Tue Jul 21 20:26:50 2009 -0400 rtp: Fix caps leak in discovery commit 3eb91e52c98d137b94e12ee0ffb4c111318199e3 Author: Olivier Crête Date: Tue Jul 21 17:55:00 2009 -0400 rtpspecialsource: Simplify muxer pad release code commit 8d7ace3dfed620b5edfb15f6ccdd1e03ac50b99a Author: Olivier Crête Date: Tue Jul 21 16:17:26 2009 -0400 rtp: Remove unused arguments commit 5bcd7363b3c5cca1b9411b26e9b9ed35d9423513 Author: Olivier Crête Date: Tue Jul 21 16:03:12 2009 -0400 rtp: Unref muxer request pad commit 30a6c5f2e909ef000dac892f0f3ce7d14f42e9ca Author: Olivier Crête Date: Tue Jul 21 15:27:56 2009 -0400 rtp: Set sdes-* properties to sdes rtpbin property This is to make it work with the newer rtpbin where the sdes properties have been made into a single GstStructure commit dd15fa29f6b6f89fae56c56347e727914cf4ffa2 Author: Olivier Crête Date: Mon Jul 20 22:42:18 2009 -0400 rtp substream: Use substream lock to protect stopped/modifying These could be called after the session has exited commit 8a4ac8cb4b602df46476e0c114f83120e286cb37 Author: Olivier Crête Date: Mon Jul 20 22:41:56 2009 -0400 tests: Completely comment out broken cname tests commit ccf43f84537b18b2a3caa2d5a02bd0f5355df159 Author: Olivier Crête Date: Mon Jul 20 21:44:47 2009 -0400 tests: Free allocated path Also, fix some >80 char lines commit 1b86bfe8b0e32de4139131bd0490eefb8c7e6f09 Author: Olivier Crête Date: Mon Jul 20 21:44:29 2009 -0400 nice: Free nice candidates, fixes leak commit 00bc98bf7429f8ba6f1578f4d4380ff86bf659ea Author: Olivier Crête Date: Mon Jul 20 21:26:37 2009 -0400 multicast: Free allocated mutex commit 176dd64070ffbe19c8b950ebea264b315655f75c Author: Olivier Crête Date: Mon Jul 20 21:24:28 2009 -0400 tests: Don't leak strings from GUPnP in rawudp test commit 4a6bc0bcb61b90d246466c7399501543673bd113 Author: Olivier Crête Date: Mon Jul 20 18:41:30 2009 -0400 test: Test unreffing the stream during various nice transmitter signals commit 6b86b08338f79fb636836a2ff3c27be1c1bab1bf Author: Olivier Crête Date: Mon Jul 20 18:40:47 2009 -0400 nice: Emit state-changed signal from idle too This is to work around the fact that libnice keeps its lock held over signal emissions. commit 7b73f48e08ff6d879fb606c89447ab7c76b59acf Author: Olivier Crête Date: Mon Jul 20 18:39:06 2009 -0400 test: Stop nice transmitter before unreffing it commit a7771cf73d11bc2592b626d29aa7af5ceeb0baa6 Author: Olivier Crête Date: Mon Jul 20 17:53:28 2009 -0400 nice: Emit new-candidate and selected-candidate-pair signals from an idle Emit the signals from an idle because libnice keeps a lock over signal emissions commit d40bbdd86f2ceac2c2719b577abf222481bb66b7 Author: Olivier Crête Date: Mon Jul 20 17:11:04 2009 -0400 nice: Keep sinks state locked while not in bin For some reason, they tend to lose their NULL state even though they have no parent commit ddd4dc632465393e86f5726c4c6dd23b32b87ced Author: Olivier Crête Date: Mon Jul 20 16:28:23 2009 -0400 nice: Do gathering_done processing from a idle callback This is because libnice keeps its lock held over signal emissions. commit 3d02ec497c6133386af2b9dd0f1e5b49ffb6a441 Author: Olivier Crête Date: Mon Jul 20 16:27:12 2009 -0400 nice: Add function to add idle callback in agent thread Add a function to be able to add an idle callback to work around libnice's recursive locking. commit 83ad9166d5e97598e7be8be62fde964f0a8671b7 Author: Olivier Crête Date: Mon Jul 20 16:26:19 2009 -0400 rtp: Disconnect stream transmitter signals on dispose The stream transmitter could be multi-threaded and could therefore survive the FsRtpStream if some other thread has a reference. commit ac4d08c1fe77f88b6abf516c0933bd65ea22465b Author: Olivier Crête Date: Mon Jul 20 15:50:18 2009 -0400 test: remove empty line commit 216cdb47c3f81624de4204a9001742045c5de5e7 Author: Olivier Crête Date: Fri Jul 17 13:42:16 2009 -0400 Revert "rtp: Keep a ref on the session/stream while calling into it from an async callback" This reverts commit a82b8a42f594a37b3299645c67b7ccf58025994c. commit 78b7b99cd303545bebe75390debb784bdc905eb1 Author: Olivier Crête Date: Fri Jul 17 14:07:53 2009 -0400 rtp: use g_signal_connect_object to keep refs while the signal is running commit 84af7fd86e11f53bc35a1e8f8e8e2618dd6b958e Author: Olivier Crête Date: Thu Jul 16 18:04:16 2009 -0400 nice: Don't let agent thread try to join self commit 54bde6a964f000c02f22f53f4dc8e03659151b5e Author: Olivier Crête Date: Thu Jul 16 19:39:50 2009 -0400 test: Test deadlock if stream destroyed while agent in signal Test that the nice stream transmitter will not die if it is unreffed while it is in a callback commit 533ee1fc9ef62b23f1382aba00099e8549dd3bfb Author: Olivier Crête Date: Tue Jul 14 16:15:48 2009 -0400 test: Test if it caues a problem if the session/stream is destroyed while the stuff is running commit a82b8a42f594a37b3299645c67b7ccf58025994c Author: Olivier Crête Date: Tue Jul 14 16:22:42 2009 -0400 rtp: Keep a ref on the session/stream while calling into it from an async callback commit d02f45eefc3db282e31a28b433d3e5727f96b5ac Author: Olivier Crête Date: Tue Jul 14 14:49:59 2009 -0400 transmitters: set the ToS field on outgoing packets Set the ToS field to the highest priority in the hope that this will help reduce latency. commit 56f2489d68fe881ed861f7fd057cd4ffe7be925d Author: Louis-Francis Ratté-Boulianne Date: Mon Jul 13 14:02:54 2009 -0400 msn: Generate random session_id upon construction commit a278c5cbc9b6f2cc40c54addeb2da3f46cc8b6b6 Author: Louis-Francis Ratté-Boulianne Date: Mon Jul 13 14:00:21 2009 -0400 msn: Accept session_id between 1 and 9999 commit 531adfe9ed3a6aaded3d2cf9082a6c233181941f Author: Olivier Crête Date: Sun Jul 12 15:08:02 2009 -0400 msn: Enable paused-mode on mimenc if possible commit 67eaddf0bbd5345899d3972528efbe632e1d46c3 Author: Olivier Crête Date: Sun Jul 12 15:00:55 2009 -0400 msn: Check required element before allowing subelement creation commit fd507be99ba2304f16fad5cf102b02b3594ce246 Author: Olivier Crête Date: Sun Jul 12 14:53:20 2009 -0400 msn: Split fsmsnconference into separate send and recv elements commit beb54d208e5b6d872590e1dd62a437979d7991c3 Author: Olivier Crête Date: Sun Jul 12 16:31:12 2009 +0100 Rename element fsmsncamconference commit aa3bf48fcc6efd3a939fc567d62f9cbcfa01524d Author: Olivier Crête Date: Sun Jul 12 16:23:04 2009 +0100 msn: Add myself to authors Also update copyright dates commit b8cc4ee40c4b71a423e4d687210cacdeebc4da0a Author: Olivier Crête Date: Fri Jul 10 21:43:17 2009 +0100 msnconnectioin: unlock lock instead of double-locking.. commit 0adc1ade20915588cf1c6c129e901e792f488977 Author: Olivier Crête Date: Fri Jul 10 17:17:51 2009 +0100 Register enum types in a thread safe way commit 53c3eff23f2d56d17ade27dcd964c55985f448d3 Author: Louis-Francis Ratté-Boulianne Date: Thu Jun 18 10:44:08 2009 -0400 msn : session ID can be between 1000 and 9999 commit 0491f6a7008584ac1346e35c309a366480f12faa Author: Louis-Francis Ratté-Boulianne Date: Fri Jun 19 12:49:52 2009 -0400 Check the right session id commit 4d004f2757351d59b339ce1a527504f78bf47531 Author: Louis-Francis Ratté-Boulianne Date: Fri Jun 19 12:47:44 2009 -0400 Set state to connected when we begin to receive data without receiving "connected" first commit 8d7f45f156bfc552ec7a9458dd70c638078ba8c2 Author: Louis-Francis Ratté-Boulianne Date: Thu Jun 18 15:13:53 2009 -0400 Added a test for fs_element_added_notifier_set_properties_from_file commit 899acf9334b8df5279d83d0d98b732f3bd55d5a4 Author: Olivier Crête Date: Thu Jun 18 15:36:11 2009 -0400 tests: Put get_fullpath into the generic testutils file commit 8c38af58376d7aea25c5db18b49fc3e96fe77207 Author: Louis-Francis Ratté-Boulianne Date: Thu Jun 4 17:00:03 2009 -0400 Added fs_element_added_notifier_set_properties_from_file and python binding commit 27316bd6737efdde048f922906c8b8d451ca25e6 Author: Olivier Crête Date: Thu Jun 18 14:41:53 2009 -0400 python: add missing methods commit 6e8ddb3bc477e391f47502166c47661a186d6eb0 Author: Olivier Crête Date: Thu Jun 18 14:37:56 2009 -0400 msn: Allow session ids from 1 commit c33edb27264e8d448eb7c1cbf35a43a5d0f03e61 Author: Olivier Crête Date: Tue Jun 16 16:12:06 2009 -0400 msn: use type##_parent_class pointer from G_DEFINE_TYPE commit 2a95bb2b8e7b5f1124e8b1529577ed1393b94589 Author: Olivier Crête Date: Tue Jun 16 16:09:37 2009 -0400 msnconnection: set method before adding properties commit 6eb1598868d88a1cc606625bddff2e5590aec1ce Author: Olivier Crête Date: Fri Jun 12 20:01:38 2009 -0400 msn: Allow any 4-digit session-id commit 147e588c48f0a5176d973106a20dfafa6f2512da Author: Olivier Crête Date: Sun May 31 16:49:07 2009 -0400 msn: Add a bit of documentation commit 492b7079ea083ba98eb1e2e367401f23eb4f171b Author: Olivier Crête Date: Sun May 31 16:26:54 2009 -0400 msn: Generate plugin documentation commit d71b180e56a265f861a488152945fecc4285c7e2 Author: Olivier Crête Date: Sun May 31 16:17:25 2009 -0400 rtp: Re-order Makefile to split out common stuff from the different results commit b2308c6ce077a5649c1d2f6405b603ba18a9b278 Author: Olivier Crête Date: Sun May 31 16:16:06 2009 -0400 msn: Build doc-building library commit 4a8a61bf135def9b08b54d31fbc0e11ee3365954 Author: Olivier Crête Date: Sun May 31 16:08:37 2009 -0400 msn:l Remove non-existent test from makefile commit f8aac7b4c2fc496ea767fe427021b9961c05aa6e Author: Olivier Crête Date: Sun May 31 16:05:30 2009 -0400 msn: Stash the session id in the candidate username commit e4dd04988c2e454d9018ce94a253233a8527506f Author: Olivier Crête Date: Sun May 31 15:55:22 2009 -0400 msn: Get the session id from the connection obj commit 99b255338975dabace3b4efad1218c2351b9aec2 Author: Olivier Crête Date: Sun May 31 15:54:03 2009 -0400 msn: Add session-id property to the connection commit 1663e1194068401686a64fdd51cea692b88ff962 Author: Olivier Crête Date: Sun May 31 15:45:29 2009 -0400 msn: Store session-id/initial-port as unsigned int in connection commit bdc7f04805fcafb39f8f1440b7b64a74d007931c Author: Olivier Crête Date: Fri May 29 16:34:06 2009 -0400 msn: Move session-id/initial-port setting from the session to the stream's creation commit 9974b73ccea2a35f0f180d6d8bebee5a4feef53c Author: Olivier Crête Date: Fri May 29 16:22:56 2009 -0400 msn: Check for race in stream addition commit d5f98965aa4f5397498372ff73d6ac5ef1953589 Author: Olivier Crête Date: Fri May 29 16:18:53 2009 -0400 msn: Create the connection in the constructed method commit 40046fb07a214d2f63feb6f7b1823454dbfdb5d1 Author: Olivier Crête Date: Fri May 29 16:07:20 2009 -0400 msn: Add session-id and initial-port construct params to fs-msn-stream commit 8f8b00f4c1dff189cd0c3e02c01b784dd716f322 Author: Olivier Crête Date: Fri May 29 16:01:02 2009 -0400 msn: Implement get_stream_transmitter_type commit 674546cbd7ed071252ee51400021b61476cdcf10 Author: Olivier Crête Date: Fri May 29 15:58:40 2009 -0400 python: Use fs_session_get_stream_transmitter_type commit 29c73993a4274a48b7f075a033cdf372b50b6a92 Author: Olivier Crête Date: Fri May 29 15:54:29 2009 -0400 rtp: Implement get_stream_transmitter_type commit 082dd2ac74b537c88e9b7acec733031364cc4382 Author: Olivier Crête Date: Fri May 29 15:50:32 2009 -0400 msn: Comment out non-existing test commit dd8bb7273514c5cdea48bcff8b1a14a940e1849b Author: Olivier Crête Date: Fri May 29 15:30:53 2009 -0400 lib: Add fs_session_get_stream_transmitter_type api commit 4bca81e8baf613102b44681cd41e445919daf259 Author: Olivier Crête Date: Fri May 22 18:20:32 2009 -0400 msn: Emit messages on connection failure commit f3a819b737182a61e0f27dde3ac96be42bcfd9fe Author: Olivier Crête Date: Fri May 22 18:15:54 2009 -0400 msn: emit connecting and ready stream states commit 7a98482bf69ab0cfd437e4b054f5431c0780173f Author: Olivier Crête Date: Wed May 13 17:51:54 2009 -0400 Release conference obj lock before changing the valve properties The obj lock of a containing bin is taken in the notify signal when changing the properties of its childs. commit 65404e4a9b96357178c3064d487373a0560c7eb7 Author: Olivier Crête Date: Mon May 11 23:51:11 2009 -0400 msn: Don't leak codecbin on error commit d0540a94f3c14807d823d6d8160eb3cf9f33a556 Author: Olivier Crête Date: Mon May 11 23:39:30 2009 -0400 Add tests for error case commit a2e6278f905ca188e154ae4d03c95be00f94c548 Author: Olivier Crête Date: Mon May 11 23:36:53 2009 -0400 msn: add test for other direction commit 8bc93fcf6ce0a6f8e48f7b56716303eee02c38ad Author: Olivier Crête Date: Mon May 11 23:23:51 2009 -0400 msn: Check for right variable commit b45c053944211aa05ec31a9ea3886e9daf1d9419 Author: Olivier Crête Date: Mon May 11 23:23:39 2009 -0400 msn: Add Call test commit a353dc8f82f28837c0bc81573d2116e5a00b36a8 Author: Olivier Crête Date: Mon May 11 23:20:53 2009 -0400 Make stream-transmitter a property of the rtp stream commit f176488e1f013ba2b1d63565f49a3c494f242453 Author: Olivier Crête Date: Mon May 11 22:51:39 2009 -0400 msnconnection: Replace GArray with GPtrArray commit c540cd6e3dc64b3a58db69ab9ffd0a0fa85b56e4 Author: Olivier Crête Date: Mon May 11 22:49:37 2009 -0400 msn: Fix leak of pollfd commit 53a6fd9a50cdb6042a9543fedbaf8d07b3fcd937 Author: Olivier Crête Date: Mon May 11 22:45:21 2009 -0400 msn: First test commit 40c0125d893a487de94780384bec902c4654b99c Author: Olivier Crête Date: Mon May 11 22:08:16 2009 -0400 msn: Stop on success from listen() commit eff682fd69e7ddc2b507573e054980b6c42cc25b Author: Olivier Crête Date: Mon May 11 20:39:21 2009 -0400 msn: Stream locking completed commit a8725b378eedc1669e06342c8a8da3d1d14ce844 Author: Olivier Crête Date: Mon May 11 20:14:02 2009 -0400 msn: Dispose of all objects commit 9d7a611885b867139c0efd69946bf202634a06f4 Author: Olivier Crête Date: Mon May 11 19:50:59 2009 -0400 msn: use session valve directly in stream commit b102b7e8c02a852c0c0cd65c051b51a9aab0fa11 Author: Olivier Crête Date: Mon May 11 19:49:54 2009 -0400 msn: make session valve public commit 2963195dab1a18ad0ffca316e5e737b713264d37 Author: Olivier Crête Date: Mon May 11 19:45:03 2009 -0400 msn: Use the conf lock to protect session commit 7c4b60d5114f2b33eec73d53bfd16738191fc866 Author: Olivier Crête Date: Mon May 11 19:33:47 2009 -0400 msn: indentation commit 696d433f91040541ec2a0013983bb30b438b8542 Author: Olivier Crête Date: Mon May 11 19:12:22 2009 -0400 msn: simplify session dispose commit e3a22cd94166de6c8f154359e07dda153471a21f Author: Olivier Crête Date: Mon May 11 19:10:31 2009 -0400 msn: unref conf on dispose commit c7a416fa4bc3f86574adf3055138838fc46c697e Author: Olivier Crête Date: Mon May 11 19:09:17 2009 -0400 Remove sink pad on session dispose commit abe3671ebaed103a6d3c5262d6494be2c0386b3a Author: Olivier Crête Date: Mon May 11 18:26:08 2009 -0400 msn: handle direction changes commit 8fff5ab3846abc952c7b6adbb688cab8406ca6dc Author: Olivier Crête Date: Mon May 11 18:17:25 2009 -0400 Don't crash on error commit 867fea9b2dee6d34231dcaa63da269621f1f5a61 Author: Olivier Crête Date: Mon May 11 17:27:33 2009 -0400 Create pipelines just in time commit 16eb798f1b25926f8d57bcc459914b75823e2d27 Author: Olivier Crête Date: Sat May 9 17:38:58 2009 -0400 msn: check if the fd has to properly set commit 99268adbf9e962591015dc1c332ff7752d068fcc Author: Olivier Crête Date: Sat May 9 17:23:43 2009 -0400 expose the right sink pad commit 14381945b4daa32f75dbb280f06a916a382bdcbd Author: Olivier Crête Date: Sat May 9 17:07:41 2009 -0400 msnconnection: downgrade some errors into warnings commit 29b9fb235d37271b514904085b97acbb84ae5d17 Author: Olivier Crête Date: Sat May 9 17:02:59 2009 -0400 msn: Set the default debug cat commit d202585b20d2c7eadcb63314cf83751d019f0da0 Author: Olivier Crête Date: Sat May 9 16:50:15 2009 -0400 Thread protect pollfds commit fbf87a141ef6fccf09338bde76b25cc65f020468 Author: Olivier Crête Date: Sat May 9 16:45:14 2009 -0400 Use shutdown_fd to close other fds too commit 796a71ee259203084e10b8f6a38ebdbd7546dc6d Author: Olivier Crête Date: Sat May 9 16:42:21 2009 -0400 msnconnection: Remove duplicate pollfd checks commit 0786bef952b6b76a9eff986955b8287dd601e158 Author: Olivier Crête Date: Sat May 9 16:40:47 2009 -0400 Find pollfd before shutting it down commit b5bc31cf16e7befb59912357fc3eb6d53ea0610f Author: Olivier Crête Date: Sat May 9 16:22:15 2009 -0400 msnconnection: Set pollfd server flag before adding it to thread commit 4034c4ccc3bffc799bbf1b00c5417f9f56d480d3 Author: Olivier Crête Date: Sat May 9 15:39:17 2009 -0400 msnconnection: Document locking commit 999398a9aae68a682eef973ab900c1e1139bc758 Author: Olivier Crête Date: Sat May 9 15:33:25 2009 -0400 replace sprintf/strcmp with snprintf/strncmp commit a5445ade738e7361f4eca99abe8fb3f858854cc8 Author: Olivier Crête Date: Sat May 9 15:27:57 2009 -0400 Indentation commit 2e27df5d46deb2afcde9aadda2815cc3ecbb1619 Author: Olivier Crête Date: Sat May 9 15:27:44 2009 -0400 Replace perror() calls with GST_ERROR commit 35e858428643482ee259253658c7f68545d3bfa3 Author: Olivier Crête Date: Sat May 9 15:25:57 2009 -0400 Remove useless checks commit a569dfd63c944098bd6006da6cb7133ad01f11e8 Author: Olivier Crête Date: Sat May 9 15:25:23 2009 -0400 msnconnection: Free the mutex commit 2d6879631fa0e9f57b90be13265f7844fc2428eb Author: Olivier Crête Date: Sat May 9 15:24:24 2009 -0400 msnconnection: Split dispose and finalize commit 2215f89222711718564497f877db6d866838a075 Author: Olivier Crête Date: Sat May 9 13:57:36 2009 -0400 msn: Return errors correct on set_remote_candidates commit eef5a2558d2d84d44d31f7b9b06f3cdf6e608689 Author: Olivier Crête Date: Sat May 9 13:51:40 2009 -0400 msn: Cleanup code, get proper locking for gather candidates and return errors correctly commit ef897dcced2580f6f55e409370d1a2c33539e5a4 Author: Olivier Crête Date: Sat May 9 13:34:36 2009 -0400 msn: make session mutex not recursive commit 99b8e2f57fff4f52c740206ddec885cc767e5d7e Author: Olivier Crête Date: Sat May 9 13:33:32 2009 -0400 msn: Remove session's id prop, its always 1 commit 07891656937b23f8432a6f5e956708ce631e489a Author: Olivier Crête Date: Sat May 9 13:30:55 2009 -0400 its valve, no fsvalve now commit 709f35ff0ae5265d1899ac167d4e320bc800cdb9 Author: Olivier Crête Date: Sat May 9 13:30:39 2009 -0400 msn: Return nothing when reading codec prefs commit b1d27064426e44aabd99c7ca69d7a49e94823329 Author: Olivier Crête Date: Fri May 8 18:12:16 2009 -0400 Make the strings static commit 6e2a765492b1668b581e4a6045f9b0cdec87d8e7 Author: Olivier Crête Date: Fri May 8 18:10:26 2009 -0400 Set the initial port property commit 7288dd713a2b5c3a831f7f54bd8e57e058b36ff3 Author: Olivier Crête Date: Fri May 8 18:02:21 2009 -0400 Replace g_debug with GST_DEBUG in fsmsnconnection commit 4650f1a362c8232c62b3e96bd86c3148736cc3d9 Author: Olivier Crête Date: Fri May 8 17:59:32 2009 -0400 Use macro for mutex commit a183ddf9fbf50b464ef7aa629837074037eac9f1 Author: Olivier Crête Date: Fri May 8 17:52:03 2009 -0400 msnwebcam: Make code C90 compliant commit d6760e79be28a7b16bfa107e88ad0488aadf79a6 Author: Olivier Crête Date: Fri May 8 17:37:00 2009 -0400 Fix indentation commit 51fcd36cb9a5aa52a762bf310976ac928a167e95 Author: Youness Alaoui Date: Thu Jan 22 08:46:28 2009 -0500 Make the src_pad_added signal be fired once connected.. it must not be in the constructor otherwise noone can connect to it commit ba7c621d9f485790ff2a60dc04339e096210004a Author: Youness Alaoui Date: Thu Jan 22 08:45:19 2009 -0500 add queues on the send/receive pipelines... commit 362210fdf75dc7b3f38e588f49d427b179a68e0d Author: Youness Alaoui Date: Wed Jan 21 19:20:07 2009 -0500 use fs_interfaces instead of nice_interfaces... for now commit e59e8d1da0e0c259f98be68586d030abdb564c43 Author: Youness Alaoui Date: Wed Jan 21 19:14:25 2009 -0500 Correctly fix fsmsnconference to work commit 662d79de9b5efeeab0bc2e7689016d1c0b8d947b Author: Youness Alaoui Date: Wed Jan 21 19:14:07 2009 -0500 fix a compilation issue.. and use FS_MSN_SESSION_LOCK instead of GST_OBJECT_LOCK commit fd4a0023193568fa3eb872b421fa263e71c544d5 Author: Youness Alaoui Date: Wed Jan 21 19:13:14 2009 -0500 Correctly find the port we used.. in case port is 0, we can't use the port variable since it will be randomly allocated commit cb5ffca56b6f1a663a7177e9a309a7162e4cb996 Author: Youness Alaoui Date: Tue Jan 20 23:40:28 2009 -0500 a lot of stuff to move a bit forward in making fsmsnconference work... commit 26eda514ae70f5865bfae939ade2d1f6aa757745 Author: Youness Alaoui Date: Fri Jan 9 18:04:53 2009 -0500 Making the msn-connection use a state machine per socket and not use blocking sockets. Fixed GstPoll and tested it, it works! commit 2645a167cb0637b2398f6dd4ababbb4881a3201a Author: Youness Alaoui Date: Tue Jan 6 18:44:35 2009 -0500 avoid bug if we can't create a new session commit f7e46f27bda5efad507585cfca0c9c30d68f9ec3 Author: Youness Alaoui Date: Mon Jan 5 15:41:56 2009 -0500 Move all connection related stuff into its own object commit e1965e29ea758c4f47572557b94cb6094373d9ac Author: Youness Alaoui Date: Mon Dec 15 20:05:42 2008 -0500 Correctly set up the pipeline if we are sending and we act as the server commit 8da16e4b57c6206e59adb73bfbdfc75cd50f9519 Author: Youness Alaoui Date: Mon Dec 15 20:02:41 2008 -0500 Port msnstream to use GstPoll instead of GIOChannel commit 956a9e5ca4e65f913b0b83534119242ffb16e5be Author: Youness Alaoui Date: Thu Dec 11 18:36:00 2008 -0500 remove duplicate useless weak_ref commit c7dde5d081530399023c38dfb8c0bf27cda17c86 Author: Youness Alaoui Date: Thu Dec 11 18:35:48 2008 -0500 update to API which needs the cname to be a const commit 06aeb2c47d0bfed520b38b83d62093749a0a625c Author: Olivier Crête Date: Sun Nov 30 14:34:57 2008 -0500 Add polling thread commit 7d1462f2517b7f7c83b5b627bde226c0e85e9b89 Author: Olivier Crête Date: Sun Nov 30 13:56:27 2008 -0500 Add GstPoll based infrastructure commit fe48102f4656fceaaf004cf050489301e20d03e3 Author: Olivier Crête Date: Sun Nov 30 18:27:11 2008 +0100 Don't allow bidi or nodi streams commit 286c919fa1a1834830eab232930c925e7ecf10a1 Author: Olivier Crête Date: Mon Oct 13 12:55:02 2008 -0400 Add sink pad and valve to FsMsnSession commit 7d0fae9227a636a54c4e99847e4d3728978e7f55 Author: Olivier Crête Date: Sun Oct 12 16:14:15 2008 -0400 Guarantee only one session commit 600b0d983ba3adbec0e8e43046b5bc2bc7cf3910 Author: Olivier Crête Date: Sun Oct 12 16:07:21 2008 -0400 Make the msn conference enforce a single participant and a single session commit 4a611bbbe2707ed4aca4d0fe76d986f8a5e9740f Author: Olivier Crête Date: Sun Oct 12 15:19:05 2008 -0400 Fix indentation in FsMsnParticipant commit f95bb569372df7fa0c9ddbfa1190ea2dd2a86bf4 Author: Olivier Crête Date: Sun Oct 12 15:16:55 2008 -0400 Add already_exists error commit 71e6f78278b3177a62ec679ce5036e5de69d3b8b Author: Olivier Crête Date: Sun Oct 12 12:39:48 2008 -0400 Remove gstfsmsnconference.c commit 20477cff6719ed4ec7bca212842989721ccdd3c3 Author: Olivier Crête Date: Sun Oct 12 12:38:44 2008 -0400 Fix copyright headers in the msn plugin commit 373b35c1252ed45724157989d09424773a44a37a Author: Olivier Crête Date: Sat Oct 11 15:06:20 2008 -0400 Indent fs-msn-stream properly commit 4342e3513467197f3848f2ea003a9bfda75780b1 Author: Olivier Crête Date: Sat Oct 11 15:03:17 2008 -0400 Indent fs-msn-session properly commit 868239dd01d6604efe27ad37aaf84fd6ee1a9b0e Author: Olivier Crête Date: Sat Oct 11 15:01:32 2008 -0400 Indent fs-msn-conference properly commit 9dfc92eb7ecbb15f80d2856bb6c3e373000bf99d Author: Richard Spiers Date: Mon Aug 18 02:26:56 2008 +0200 Last minute changes to the stream commit b3b25e88463a68f1525e4026549940ffd765415f Author: Richard Spiers Date: Mon Aug 18 01:57:06 2008 +0200 Making the code neater, fixing some errors so it can compile with Werror, as well as some stream changes commit 242cd483e2fe68e3f9ed599b31d92a95bd161aa2 Author: Richard Spiers Date: Sun Aug 17 00:19:43 2008 +0200 More modifications to fs-msn-stream - sending and recieving should work now commit ce88e4d0b67e2336b1277fb4abe79f8bc719e808 Author: Richard Spiers Date: Wed Aug 13 02:04:56 2008 +0200 More work done on the msn stream - connected various functions together, starting to look almost functional commit 4de2748cb97a5032c4e46675c8a4d70baffcaefd Author: Olivier Crête Date: Wed Aug 6 15:42:19 2008 -0400 Fix indentation commit fa71df786c7647ff3c352393050e87ebf4a9dd84 Author: Richard Spiers Date: Wed Aug 6 21:06:17 2008 +0200 Created a duplicate gui example to hack around in Added more functionality to the fs-msn-stream commit 83da09316963d8dc25439e2ca2b557d04b05a49f Author: Richard Spiers Date: Mon Jul 21 22:01:39 2008 +0200 Just adding in some author information commit 6fe761fd5b7d3d2b59e9d81e71666d2e16037db2 Author: Richard Spiers Date: Mon Jul 21 21:38:26 2008 +0200 First real commit - mostly skeleton code Starting to add some msn functionality Nothing too new, just reworked some functions commit 0355c710ffdefc3e5582076bfa1da5fbf657f80f Author: Olivier Crête Date: Mon Jul 13 18:35:39 2009 -0400 rtp: Make the locking of fs_rtp_sub_stream_verify_codec clearer commit eed05a55ce1a68cc1de6d6ce8a6da4ca0c847c37 Author: Olivier Crête Date: Mon Jun 29 23:05:44 2009 -0400 rtp nego: simplify the iLBC negotiation function commit 73c669f834b87db78a2cbed480a41052c2d95d93 Author: Olivier Crête Date: Mon Jun 29 17:22:48 2009 -0400 rtp cache: Reject cache if the factory does not exist commit a709918824a4b71b67b33f37c43b0f9284789e39 Author: Olivier Crête Date: Thu Jun 25 19:14:35 2009 -0400 rtp: Keep session ref while doing callback commit 1905290e982b14e9a1e1cd31c072e856c39cc91b Author: Olivier Crête Date: Thu Jun 25 17:48:45 2009 -0400 tests: Use GST_DEBUG/LOG/WARNING instead of g_debug in tests commit 396f5fd2d31fe86031c0f374c231a4f72996984b Author: Olivier Crête Date: Thu Jun 25 17:35:29 2009 -0400 nice: Release lock before calling into nice agent commit a18a67d67dac193403355da32e6fdf5270b1a6a2 Author: Olivier Crête Date: Tue Jun 23 19:19:11 2009 -0400 python: Rebuild defs commit 8e9ffbcdf1b35fdacfcff3c56f31f06205a80685 Author: Olivier Crête Date: Thu Jun 18 14:40:44 2009 -0400 python: Export fs_stream_add_id commit ee956c08df2cb5e318d9caefef6f528484f58c10 Author: Olivier Crête Date: Tue Jun 16 17:58:05 2009 -0400 nice: Use stream_id from arguments commit 005b71225cac0dd85e128c1b07e5c8e010e0df15 Author: Olivier Crête Date: Tue Jun 16 17:57:19 2009 -0400 nice: Dribble out candidates commit 855ac3ad0c476a841e0f2513a71fef77fd63848c Author: Olivier Crête Date: Tue Jun 16 13:24:10 2009 -0400 gui: Replace libglade with GtkBuilder commit 0161852402ff7d0dcd41315234eab8fe53b57018 Author: Olivier Crête Date: Mon Jun 15 17:53:32 2009 -0400 rtp: Make cache work on memaligned platforms commit 901c42f3087f1ceb99d15545c77cfc35eba7b9ee Author: Olivier Crête Date: Mon Jun 15 13:37:35 2009 -0400 rtp: Remove pad block cb when destroying substream commit beed3cb4ed40026f4fed7a076dece480812003f9 Author: Olivier Crête Date: Wed Jun 10 10:38:51 2009 -0400 Try to unref internal session only if its set commit 516449ba927cab674a7bdbc415508c4e5991c138 Author: Olivier Crête Date: Tue Jun 9 10:17:22 2009 -0400 Update gst version in configure to 0.10.23 to match README commit 35960e8d82b5322680d9dcd948d43b06da9aa4a3 Author: Olivier Crête Date: Mon Jun 1 15:44:20 2009 -0400 Update core gst dep to match the -bad dep commit 8be088f5829ff168595fc5549e875eb49cd08388 Author: Olivier Crête Date: Thu May 28 17:56:36 2009 -0400 Version 0.0.12.1 commit 3f40b79a04bfc89d9fd318b5bf9ef7857b539dea Author: Olivier Crête Date: Thu May 28 17:50:18 2009 -0400 Version 0.0.12 commit 8a64db4a0035559a34b84ab5593512a8061ff232 Author: Olivier Crête Date: Thu May 28 17:39:21 2009 -0400 Disable RTCP CNAME based association tests The message is broken in gst-plugins-bad 0.10.12, so it won't work. commit 4c476d49211f2f387b5f050a6bde853765dd4303 Author: Olivier Crête Date: Thu May 28 17:36:57 2009 -0400 rtp: Check for the new name of the sdes message commit 4a60b35295dbc1f9b70f33cb15bbbc6b8df5502a Author: Olivier Crête Date: Thu May 28 16:38:49 2009 -0400 tests: Reduce nice test debug output commit 8c46154df085bf91c71ac62e18a19c8a93393356 Author: Olivier Crête Date: Thu May 28 14:05:33 2009 -0400 tests: Name multicast rtp tests more accurately commit a53438667b01b10fd15645c53764be071a0d1361 Author: Olivier Crête Date: Tue May 26 20:46:25 2009 -0400 Revert "nice: remove useless state unlock" This reverts commit bbefabf9da7fc4a695a8e18591fe1309e79b1479. commit 42181a7499c669fdb29b6dbc3c3bc995c426f356 Author: Olivier Crête Date: Tue May 26 15:52:27 2009 -0400 Set link to playing before linking it commit 586b649e80f316a2dfc0cef8df398ea68e3f3673 Author: Olivier Crête Date: Tue May 26 15:51:20 2009 -0400 rtp: Do proper locking when removing send codec bin commit d443e642c4e453cb028b5670536cf1699a843a68 Author: Olivier Crête Date: Mon May 25 17:16:55 2009 -0400 Version 0.0.11.1 Version 0.0.11 is in a branch commit a46e57c168338c8a2e3b39771e10aa5e626abeda Author: Olivier Crête Date: Sun May 24 14:44:58 2009 -0400 rtp: Re-add plugin ldflags commit 5c2609de1101faa2409680e8b7ca3321bb27c6af Author: Olivier Crête Date: Fri May 22 14:52:25 2009 -0400 tests: Disable upnp for invalid stun test commit bb17542752c655957580a25892d1082aa33af85d Author: Olivier Crête Date: Fri May 22 13:40:06 2009 -0400 tests: Do g_debug instead of warning when skipping tests commit 79ce8d23643eda8ddb45fb3bbf5444e6c225f299 Author: Olivier Crête Date: Wed May 20 19:02:34 2009 -0400 Update -bad dep for ssrc setting property commit b51b61984e7e2f465c375f9781eec7c3bf9b9089 Author: Olivier Crête Date: Thu Apr 23 18:25:00 2009 -0400 Add ssrc based multicast test commit 80a81edd9ee3085426ac755b33c2226b0f6270a6 Author: Olivier Crête Date: Wed Apr 22 17:42:04 2009 -0400 Implement fs_stream_add_id in RTP plugin commit 6aaadd3066a8ab0133ad3feb72c5c657e608240a Author: Olivier Crête Date: Tue Apr 21 19:53:20 2009 -0400 Add fs_stream_add_id api commit c8ccc1d254a167e88fc25bf28547c90609385230 Author: Olivier Crête Date: Mon Apr 20 20:18:41 2009 -0400 Add test for changing the sending ssrc commit 91325df0c3835686abaa654ced8d63e45fc57d22 Author: Olivier Crête Date: Mon Apr 20 19:10:22 2009 -0400 Implement the ssrc property on the rtp session commit f9e660f88e6226d023e4a55ddd3adae4f185662a Author: Olivier Crête Date: Fri Apr 24 12:15:15 2009 -0400 Get rtpbin internal session commit ad703c2a8a4a728e53c7993d9cf055607e22801c Author: Olivier Crête Date: Wed May 20 19:00:50 2009 -0400 Version 0.0.10.1 commit 31d9d40883b7df444d28a89e7d445c877185bfbf Author: Olivier Crête Date: Wed May 20 18:54:34 2009 -0400 Version 0.0.10 commit 2fefd38935055282f0e9f8f08f5349259ef0d861 Author: Olivier Crête Date: Tue May 19 16:23:57 2009 -0400 codec: Ignore case when comparing codec parameter names commit ab58cfd77f2cb50be081c2a6430fdb698cf22015 Author: Olivier Crête Date: Tue May 19 16:21:33 2009 -0400 codec: Ignore case when comparing codec names commit 307660cbb1f4c785d029366b52d96e7f9fe2ef2e Author: Olivier Crête Date: Tue May 19 16:21:14 2009 -0400 codec: Accept special arguments with any case commit 4eb594b91b135956edbc5d77b840a6aa7361db6d Author: Olivier Crête Date: Tue May 19 15:43:06 2009 -0400 rtcpfilter: Replace SR with empty RR if there was no RR commit ebe4d6f0692cf5f713e567d7472b63801d3a137e Author: Olivier Crête Date: Tue May 19 14:43:09 2009 -0400 rtcpfilter: Test for no-rr case commit 688eb530fddf21f7b1a93380097d3cadd14e1b0a Author: Olivier Crête Date: Tue May 19 13:58:06 2009 -0400 rtp: Don't unref passed caps in discovery Don't try to unref the caps pass as input, instead ref them when they are added somewhere. commit 59df5a00e4ea0ef5840f637d67328c5742aa625f Author: Olivier Crête Date: Wed May 13 17:18:32 2009 -0400 rtp: Free substream if its parent is unlinked commit 34eb9f312cecaa53c4e51f68d674b221be02f09b Author: Olivier Crête Date: Wed May 13 16:47:28 2009 -0400 rtp: Make sure substream is stopped before disposing of it commit bcb3d7ad3fabbfd196e4e029d555be65d5b9d683 Author: Olivier Crête Date: Wed May 13 15:27:03 2009 -0400 Have substream emit a unlinked signal commit 92a7eac0b5ff87e89c770beaea3de66e893ae775 Author: Olivier Crête Date: Wed May 13 12:20:39 2009 -0400 nice: Free nice candidate with the right function commit bbefabf9da7fc4a695a8e18591fe1309e79b1479 Author: Olivier Crête Date: Tue May 12 12:24:27 2009 -0400 nice: remove useless state unlock commit ea8b7bf7e31a40b1e4e64c09c795dce9d5090ccf Author: Olivier Crête Date: Tue May 12 12:07:20 2009 -0400 Safeguard against malformed GstRTPBinSDES messages commit e4b2dbb273171888fef35e30e5a9b773cf36dc7b Author: Olivier Crête Date: Tue May 12 12:03:38 2009 -0400 rtcpfilter: Verify if there is at least one packet commit 32c15a7520f65ba5fabb4933036aa91366492b7b Author: Olivier Crête Date: Tue May 12 12:01:51 2009 -0400 nice transm: Make sure foundation ends with a NUL byte commit 5651022a4a8acf6bb296be512758f68cc787f224 Author: Olivier Crête Date: Tue May 12 11:59:59 2009 -0400 substream: Add missing break commit bbd8db90081fdc96ecd6cd513abbf1e95eb379d9 Author: Olivier Crête Date: Tue May 5 15:05:51 2009 -0400 Continue discovery until the caps have been found commit 7efe8ad1732ecaadf22ad3ea5e912e60231ead1f Author: Olivier Crête Date: Thu May 7 13:51:20 2009 -0400 Remove unused variable when debug disabled commit a6829deb59d85e26349d92a6da7b632b729d9d43 Author: Olivier Crête Date: Sun Apr 26 18:16:01 2009 -0400 Remove deprecated GLib symbols commit 2250f8e4c3d8e7615e3bd180a7f881778dcbc035 Author: Olivier Crête Date: Tue May 5 12:37:03 2009 -0400 funnel: Change the pad caps on source change commit 5e79e5ed87c5615f80db761048e3ae7c2a3426d3 Author: Olivier Crête Date: Tue Apr 28 17:10:51 2009 -0400 Use a convenience lib to avoid building everything twice commit e5937fa4c41abdff87855b361dd5bbc05e7fea4f Author: Olivier Crête Date: Tue Apr 28 16:49:40 2009 -0400 Update common and use shave commit 677bdc62a5c612ba34037b6de2d9b55a6ad9e9b2 Author: Olivier Crête Date: Thu Apr 23 18:25:00 2009 -0400 Add full conference multicast test This test uses cname for the association commit f17b7f3af4f694170a9fdfa06ec60e893c07882e Author: Olivier Crête Date: Thu Apr 23 20:03:34 2009 -0400 Return more errors in multicast transmitter commit f296ea9b403fe9165c24aa03042627a933049c6d Author: Olivier Crête Date: Thu Apr 23 17:48:35 2009 -0400 Factor out the utility func to find multicast addresses commit 666aaa493d3fb011db2fd6c6d31d0dbb4c6a5b24 Author: Olivier Crête Date: Thu Apr 23 17:37:00 2009 -0400 Select the transmitter name for each test in rtp tests commit 064b3fff689bd0f7f32abde95c76e796bebb50ad Author: Olivier Crête Date: Thu Apr 23 21:36:08 2009 -0400 Remove usage of cname in the most tests commit 7dad3b6432fa3965584026f60624211ff92f1aa4 Author: Olivier Crête Date: Thu Apr 23 20:54:53 2009 -0400 Make the cname optional in participants commit 0e4ec9f0c6811a120ff31d9d39538c965350ea33 Author: Olivier Crête Date: Thu Apr 23 20:39:54 2009 -0400 Don't emit the UNKWOWN_CNAME error anymore commit f376c3ff602c89e8757e25eea9347b3a40dcaddf Author: Olivier Crête Date: Tue Apr 21 19:41:04 2009 -0400 Fix doc typo commit 6e04cf3ab2ff1b3ae077ad11d6f30032646dda86 Author: Olivier Crête Date: Thu Apr 23 19:20:12 2009 -0400 Return an error if no codecs where detected, every time commit 93fd20fddbf0c3841499fb00a21351717c268391 Author: Olivier Crête Date: Wed Apr 15 18:29:22 2009 -0400 Use internal stunalternd for testing commit 68732ff3e7a769d4c150139d6b9dd47a981d7c6a Author: Olivier Crête Date: Fri Apr 10 14:13:19 2009 -0400 Emit GstForceKeyUnit when multicast starts sending commit 442a43705c4121c41c6e60f50244fff40e7cb776 Author: Olivier Crête Date: Fri Apr 10 14:09:47 2009 -0400 Emit GstForceKeyUnit when nice starts sending commit 2b94c4aa5fb26f48d50a3873dfaff1d6eb64681a Author: Olivier Crête Date: Fri Apr 10 14:06:22 2009 -0400 Emit GstForceKeyUnit when rawudp starts sending commit 1de519a700932fdb37a88bca1d1c62bff1ea0c03 Author: Olivier Crête Date: Fri Apr 10 17:23:00 2009 -0400 Only enable stun debug if rawudp debug level is debug or log commit 9cbbdc2dd7efd1a06aa1c197fc1eb916da7e3ffb Author: Olivier Crête Date: Wed Apr 8 21:03:32 2009 -0400 Use NiceAddress to parse stun ip commit e04ccafdf2990ae96b49113f117f9403927bb76e Author: Olivier Crête Date: Wed Apr 8 17:07:44 2009 -0400 Update libnice dep to 0.0.6 for stable stun API commit 4dc735149c08003fff154c6f5902c2e2afae7022 Author: Olivier Crête Date: Tue Apr 7 20:29:04 2009 -0400 Add stun alternate-server tests commit 77286bdba89619f59c08d086f0e25a658042b017 Author: Olivier Crête Date: Tue Apr 7 18:32:46 2009 -0400 Implement stun alternate server commit 97de77fe3f12c84f527ab4c9dab171a2e30ead8a Author: Olivier Crête Date: Tue Apr 7 18:17:49 2009 -0400 Use libnice stun timer commit 580a0fbf168a94f87de3d39584f128449146bfe0 Author: Olivier Crête Date: Tue Apr 7 17:12:15 2009 -0400 use libnice to parse incoming stun commit afe00f2ca7a339b72b5bd0d1ef6ad0c4df5604d0 Author: Olivier Crête Date: Tue Apr 7 15:57:17 2009 -0400 Remove stun for old libnice commit befe532b310bf9763b9a87e2492020b590734bb6 Author: Olivier Crête Date: Tue Apr 7 15:56:48 2009 -0400 Use libnice when sending STUN requests commit 342f097a3fbe9af972d76429c5eb69278e00d412 Author: Olivier Crête Date: Fri Apr 10 14:56:48 2009 -0400 Don't print NULL candidate commit a89f6b1df1fd2fbb08ab95c8180fe23a9caaa196 Author: Olivier Crête Date: Fri Apr 10 13:24:20 2009 -0400 Remove unused label commit 753462cfbc0cce96a84eaa3dfd96b682ec68c443 Author: Olivier Crête Date: Thu Apr 9 19:06:30 2009 -0400 Remove support for H263-N800 hack commit 34b52b61ec10e573db0ab3c77a3d01d377cd807f Author: Olivier Crête Date: Thu Apr 9 14:02:04 2009 -0400 Update references diagram to match reality commit f20f61665b7b225fd91dba6d2b52c260e237d6a5 Author: Olivier Crête Date: Wed Apr 8 20:39:47 2009 -0400 Stop encoding when no one is sending commit 3c8acacf9120fa5b7962e4062a31eef0ca761385 Author: Olivier Crête Date: Wed Apr 8 19:26:37 2009 -0400 Don't try to use gdk/gtk defs in python codegen commit 386c809953600827c6c7637839bcb702f60b1e2a Author: Olivier Crête Date: Wed Apr 8 18:11:52 2009 -0400 Remove dep on pygtk if pygobject 2.16 is present commit 6904d6df1959168646946dc431339074a5a3fb08 Author: Olivier Crête Date: Mon Apr 6 20:35:23 2009 -0400 Version 0.0.9.1 commit 4fe6016ec86e748342ee3fa35b607cbefc049109 Author: Olivier Crête Date: Mon Apr 6 20:29:37 2009 -0400 Version 0.0.9 commit 6025f3cedd2171d596513effe1d40fb00ae318df Author: Olivier Crête Date: Thu Apr 2 19:10:11 2009 -0400 Make libnice non-optional commit ac7dc4a43ac6098397ca8feaff5c4f75c00fec45 Author: Olivier Crête Date: Tue Nov 18 19:09:59 2008 -0500 Improve dtmf tests a bit commit a020bf8c34656e8c5b1ebfde478847e6aebbfa51 Author: Olivier Crête Date: Tue Nov 18 15:16:13 2008 -0500 Add transmitter sink just in time commit 5c91c2278e85a4465640ba398fc47fbdf73dc6a8 Author: Olivier Crête Date: Tue Nov 18 15:06:24 2008 -0500 Factor out the transmitter sink addition commit f9fc5976df3cd689b2f2950e8e486bdaeaae64e8 Author: Olivier Crête Date: Tue Mar 31 13:40:34 2009 -0400 Check if both fields are not NULL before strcmping them commit c3ceaf59765f90dcc438bf38ceae8d0669121b55 Author: Olivier Crête Date: Tue Mar 31 13:38:51 2009 -0400 Ignore stun binding responses with no mapped address commit ec64b568b2c471f94eff579f86de944e63ce00c2 Author: Olivier Crête Date: Tue Mar 31 13:36:14 2009 -0400 Don't offerflow if nice candidate is inet6 commit d3083e1068ff1c3bbb7cf46ae1ae2af34458b895 Author: Olivier Crête Date: Tue Mar 31 12:35:37 2009 -0400 Remove unused variables commit 6883c96812a322f5717b758488c160da6efbc77e Author: Olivier Crête Date: Mon Mar 23 14:58:22 2009 -0400 Drop the buffers before decoding if the direction is not receiving or both commit ded8205cc9d9c6e98961fb620a3dca3cd9ea8801 Author: Olivier Crête Date: Sun Mar 15 20:56:20 2009 -0400 Remove rtp/rtcp tee fakesinks commit c2b1bf7104f9e367cb199bf906e05c34c4071390 Author: Olivier Crête Date: Tue Mar 17 18:00:12 2009 -0400 Disallow invalid relay-info parameters commit 3338bab01a35a792bff24397d53e50fce3a0b2c3 Author: Olivier Crête Date: Tue Mar 17 18:12:54 2009 -0400 Test for invalid relay info argument correctly commit 2cc6bb13aeb056c317b2eeacb091b6ebc05a917c Author: Olivier Crête Date: Fri Mar 20 19:22:35 2009 +0200 Already always requires gst 0.10.12 commit 68d2c034c6e12e5e7219c0e7885179fc9cd6ebe2 Author: Olivier Crête Date: Wed Mar 18 04:44:51 2009 -0400 Update python requirements commit 8615191479ed0842bb9082cedd17e2259c7edb9b Author: Olivier Crête Date: Wed Mar 18 04:38:57 2009 -0400 Use AM_PYTHON_PATH instead of AS_PYTHON_PATH commit aa8fc29ab49dae0e51e246837f55f88dd6907783 Author: Olivier Crête Date: Sun Mar 22 20:12:59 2009 -0400 fsvalve is now valve in -bad commit 21a170180c69f8af4ead8efb66ce493b46c8ecb8 Author: Olivier Crête Date: Sun Mar 22 20:11:40 2009 -0400 Officially depend on new gst-plugins-bad commit 9eddf78c30d18c5b68fb8c5b808dacb9764917cd Author: Olivier Crête Date: Sun Mar 15 17:01:38 2009 -0400 Version 0.0.8.1 commit c2f4b1c52f7d601678d8008ba5ed8fa5d82dcd4d Author: Olivier Crête Date: Sun Mar 15 16:53:21 2009 -0400 Bump version to 0.0.8 commit 00866207d3bbe0fab6c5f651b72cc4ac1d1cc86f Author: Olivier Crête Date: Sun Mar 15 17:06:28 2009 -0400 Our h263-1998 negotiation function was really for h263-2000... commit 49043f860f9de91e561949775f491a47e00359ac Author: Olivier Crête Date: Tue Feb 24 17:22:18 2009 -0500 Set remote codecs with same id to keep the same config commit 88997e86f4b4b5826da80e8bb622e0d53b09c9c7 Author: Olivier Crête Date: Tue Feb 24 17:04:50 2009 -0500 Remove deprecated delivery-method property commit 0092891a388e113fc612eeb8eabb9966959a1f47 Author: Olivier Crête Date: Fri Feb 13 18:22:01 2009 +0000 Keep the discovered codec config when re-negotiating commit 8e08a8611b7845c3543529d40b352caf1e97f951 Author: Olivier Crête Date: Tue Feb 24 16:58:31 2009 -0500 Remove special case to keep codecs configs commit c836f483b47fd393eae65b3038da6c2f3f8da9a5 Author: Olivier Crête Date: Tue Feb 24 15:43:55 2009 -0500 Hide most negotiation details messages to LOG level commit cdb0b6803a90db370e2f30cfd2df37443244392d Author: Olivier Crête Date: Mon Feb 23 20:26:11 2009 -0500 Make codec config regression test more strict commit 14009993476cada27a4882c9099cdfb24a3c209c Author: Olivier Crête Date: Thu Feb 26 22:45:28 2009 -0500 Always verify a substream's codec after it has been added to a stream This fixes a subtle race where the codecs are changed between the time when the codecbin is set on the substream and the moment the substream is added to a stream (during this perioud the substream is "free floating", so we need to verify that nothing nasty happened during that period). commit de28370480715fb9b8fed46a07595804f56e566f Author: Olivier Crête Date: Thu Feb 26 19:04:13 2009 -0500 Drop buffers that don't match with our caps, don't leak intersected caps commit c4ea1072376004e963451a41b06e36d1a7647d3a Author: Olivier Crête Date: Sun Mar 15 15:23:52 2009 -0400 Update gst requirements commit 02c327d08560b0836e1ed81e7144ff3a699db888 Author: Olivier Crête Date: Sun Mar 15 15:05:29 2009 -0400 Add checks for the stream codecs change notifications commit e79203ea6d4803fd393bf72ac9a1e809b57e8be4 Author: Olivier Crête Date: Sun Mar 15 15:05:12 2009 -0400 Emit notify for FsStream::remote-codecs commit 079b22d5d8491ef4eb86885b2934553ea72a63b1 Author: Olivier Crête Date: Sun Mar 15 14:53:58 2009 -0400 Emit codecs notifications if only the recv-only state of a codec has changed commit f14baee14fce3b6a85e117f86490eaead7eae981 Author: Olivier Crête Date: Mon Feb 23 21:12:07 2009 -0500 Rename has_negotiatied to a more meaningful name commit b5ebd16f57c2f9be5f475ea1f2dcb69d077c7193 Author: Olivier Crête Date: Wed Feb 25 21:18:35 2009 -0500 Use autoconvert as fsselector too commit 6a30b64995f725624e13eb13025c7f454e22dc5c Author: Olivier Crête Date: Thu Mar 5 22:35:35 2009 -0500 Add a bit more debug on the nice transmitter commit b72eac7dcbe274920e8c89cce147a3551e44ac11 Author: Olivier Crête Date: Thu Mar 5 20:04:21 2009 -0500 Force the child name to be rtpbin commit ef12330aafc65807b1589bd2aa88608c83367eeb Author: Olivier Crête Date: Thu Feb 26 15:49:21 2009 -0500 Print the right variable commit 70597011612f01270f576302fe4d7f0e3b8e7704 Author: Olivier Crête Date: Mon Feb 23 18:47:39 2009 -0500 Really set page size to zero on spinbutton adjustement commit 2011d92b3f655d09122e21ee19c40b2acdf2b7f2 Author: Olivier Crête Date: Mon Feb 23 18:43:04 2009 -0500 Actually use the stream negotatiated codecs to create the codec bins commit 412ba58856b4b10c955d02aa40a5193986f0aa97 Author: Olivier Crête Date: Mon Feb 23 18:42:19 2009 -0500 Ignore new cache dir commit 7ebd18f5fa4c235107f35a76adf7c3262749b912 Author: Olivier Crête Date: Mon Feb 23 16:47:42 2009 -0500 Move examples to examples dir commit 548f9520d56d7a0efd23482e1b02ff63d2a3e5be Author: Olivier Crête Date: Mon Feb 23 15:13:47 2009 -0500 Set page size to zero on spinbutton adjustement commit 6d80cb925c0ac3964dbc64510d587ff36859e3c2 Author: Olivier Crête Date: Sat Feb 21 09:47:15 2009 -0500 Add pluginsdir to the .pc files commit 15776d132fe6933f34b705b7f34c79f5889127ee Author: Olivier Crête Date: Fri Feb 20 14:45:08 2009 -0500 Add test for 0 clock rate codec commit a5b5fae2bf489772e416a7ae5dbd8ac8d3cb9404 Author: Olivier Crête Date: Fri Feb 20 14:45:27 2009 -0500 Allow remote codecs without a clock rate commit d6dd346d168f19fec5ef3bec6d05f3897fe43f4c Author: Olivier Crête Date: Fri Feb 20 14:44:39 2009 -0500 Reset has_negotiated to false before next test commit 6a508286719e1079b0d726e4abbce7237a0edecd Author: Olivier Crête Date: Wed Feb 18 16:04:42 2009 -0500 Remove use of deprecated clock-rate property commit 9954eaf267764c75a195ce85283cd42f348cfb68 Author: Olivier Crête Date: Wed Feb 18 16:05:07 2009 -0500 Add missing GError setting commit df5cf6f9ed20c732794df1a8eb2396e6abe97720 Author: Olivier Crête Date: Fri Feb 20 12:12:22 2009 -0500 Don't set global remote creds in google/msn modes commit fd0ea6cf933cb1884714384d4ce50eae3cfd6cd7 Author: Olivier Crête Date: Fri Feb 20 11:40:35 2009 -0500 Release lock on various errors commit 6cd21e72ed9f89fae7b97b6b37098dfe33888a4b Author: Olivier Crête Date: Wed Feb 18 13:47:36 2009 -0500 Move the cache into the XDG cache dir commit 5c3491c6062e13155daf52832651319f164f0ab2 Author: Olivier Crête Date: Tue Feb 10 13:38:13 2009 +0000 Don't force base ip/port, its optional commit 20356773667bf9c78579225acfd792e34ae4722f Author: Olivier Crête Date: Tue Feb 10 13:37:37 2009 +0000 Don't add baseaddr to host candidates commit 3f6c306c47e98cc61a07e46d5ec5276cb44eb7c7 Author: Olivier Crête Date: Tue Feb 10 13:32:31 2009 +0000 Fix indentation in new patches commit 039f08122cf25b3a84180722d6cea13ceb97ff62 Author: Olivier Crête Date: Tue Feb 10 13:31:15 2009 +0000 Add more sanity checks on ICE candidates commit 807b0fa892397be8053574d655d0f26a5b2b78a0 Author: Olivier Crête Date: Tue Feb 10 01:03:14 2009 +0000 Set the global credentials in draft-19 mode commit 708657045bf1a5a8e2287cf01fb54320a4042944 Author: Olivier Crête Date: Tue Feb 10 01:00:52 2009 +0000 Fix potential leak of unset remote candidates commit 304eece2c5b96643a93438bbf8f50be11fcc698e Author: Olivier Crête Date: Tue Feb 17 15:04:14 2009 -0500 Add new m4 file to configure, etc commit 30f6cfddd866a8b43a31af59ec1b7022b0ae43da Author: Olivier Crête Date: Fri Feb 13 22:13:57 2009 +0000 Don't force non-exist configure switch commit e49a1dc2081c685ecbb81fb845cf0b311b6c6918 Author: Olivier Crête Date: Fri Feb 13 22:11:42 2009 +0000 Add python headers check from gst-python commit 92c4dddf7931d284dd3227317da92411ba7d2193 Author: Olivier Crête Date: Fri Feb 13 22:01:41 2009 +0000 Remove autopoint from autogen commit 41524871bc203bd29b76697664cc30fc3cb99964 Author: Olivier Crête Date: Thu Feb 12 14:33:00 2009 +0000 Don't use ca after unlocking, and invalidate ca just in case commit 3fbc07d4d145b5c9d27822dc420415713be19190 Author: Olivier Crête Date: Fri Feb 6 13:36:39 2009 +0100 Implement filtering out of unused telephone-event clock-rates commit 552dd5f80ab560aebe6d9274440a7aa7d1a11815 Author: Olivier Crête Date: Fri Feb 6 12:48:33 2009 +0100 Use the new filtering function on the negotiation result commit 5646c98e62c36eb660a960eb725ee5b9058aea8c Author: Olivier Crête Date: Fri Feb 6 12:45:15 2009 +0100 Add negotiation_filter method to the special source class commit 49cf8a4fc4c5d485662ba9bbe40faab08d77e5d0 Author: Olivier Crête Date: Thu Feb 5 15:54:50 2009 +0000 Clarify what CodecAssoc->disable means commit d20c4cbfa97f129b889137b14beb566eb139ea23 Author: Olivier Crête Date: Tue Feb 10 13:47:11 2009 +0000 Don't leak upnp timeout src commit 8206bace3743cadee08c53a34b9249c817056ee6 Author: Olivier Crête Date: Tue Feb 10 13:46:56 2009 +0000 Don't try to test for valid case of in-band config commit 93722fdd68e520f175b2e12903a2b5abbf27564b Author: Olivier Crête Date: Fri Feb 6 15:56:08 2009 +0100 Accept remote candidates without valid codec configuration commit f6a3526db81759673929d8ef7da205111d230025 Author: Olivier Crête Date: Thu Feb 5 14:05:54 2009 +0000 Use common-modified glib-gen.mak for rtcpfilter commit 88da2deef7981109321c475b9d788b744f856191 Author: Olivier Crête Date: Thu Feb 5 14:05:16 2009 +0000 Bump up requirement to gst 0.10.22 for new rtcp filtering commit f6889f37eb26ceb9be864990e8f9f3157854eee1 Author: Olivier Crête Date: Thu Feb 5 13:59:48 2009 +0000 Merge the sending property in multicast properly commit a7d420424d000815e6ab3cf0fa175ca823c59d38 Author: Olivier Crête Date: Fri Dec 19 18:32:22 2008 -0500 Add tests for rtcpfilter element commit 7326b57b65176c946b93d9f91a72534e3840c0d2 Author: Olivier Crête Date: Fri Dec 19 18:19:03 2008 -0500 Reduce rtcp packet size if we modify it commit 15f23f723bbf6268a3998d9de9f6905f8fd502ac Author: Olivier Crête Date: Thu Dec 18 21:09:56 2008 -0500 Add nice tests for the sending property commit 87fa4179a17fa9f64283397b07b8e2c2f41fbba0 Author: Olivier Crête Date: Thu Dec 18 20:54:09 2008 -0500 Make mcast test flags into an enum commit d1b081871a6713b5f0b1bef3a0560ba2535286b0 Author: Olivier Crête Date: Thu Dec 18 20:52:38 2008 -0500 Use fake filter in multicast test commit d4561a61ed18492a6ab8e9de679b012051e66cfb Author: Olivier Crête Date: Thu Dec 18 20:52:26 2008 -0500 Add Fake filter element for transmitter tests commit 4a7e1b1851dbc36d4d0003aa69c845d9182fdda2 Author: Olivier Crête Date: Thu Dec 18 20:40:31 2008 -0500 Set sending state at start commit 282c42b8452a250f9ae180cda8b4143f84086700 Author: Olivier Crête Date: Thu Dec 18 20:40:21 2008 -0500 Test sending with filter commit 82257fb478db818baf81d61cfc89e6c99996f892 Author: Olivier Crête Date: Thu Dec 18 20:37:00 2008 -0500 Test with filter while sending too commit 366fbb4ceb87337d9f7c36f1562f590dcadc97ae Author: Olivier Crête Date: Thu Dec 18 20:35:41 2008 -0500 Split setting recvonly filter from not-sending behavior commit 96b4f820c36cc8c318391b0a5cbd294f5f52ccb7 Author: Olivier Crête Date: Thu Dec 18 20:34:12 2008 -0500 Use not_sending flag directly commit c3f0e42d600edaec651ad49c34af1f6406c67149 Author: Olivier Crête Date: Thu Dec 18 20:23:57 2008 -0500 Use the sending property to change the sending state of the filter commit a4eed44afdc6af9e36a74f272dd1ee0071f58ef6 Author: Olivier Crête Date: Thu Dec 18 20:21:21 2008 -0500 Introduce recvonly filter in nice transmitter commit 616a880ef019472ff81325d6ebdce317cda5ac64 Author: Olivier Crête Date: Thu Dec 18 20:12:44 2008 -0500 Factor out nice sink freeing commit 90911d9efd9670b02672d2d995591d22f63c5338 Author: Olivier Crête Date: Thu Dec 18 20:09:40 2008 -0500 Extend the nice sink/src creation function to support filters commit ef0c11a292f36a69e01f1600f75f0b7ebf168bca Author: Olivier Crête Date: Thu Dec 18 17:56:57 2008 -0500 Add test for partial-sending mode in multicast transmitter commit 8a8da9bf3df3006eac8177fa2cc2ecb031ee915e Author: Olivier Crête Date: Thu Dec 18 19:41:59 2008 -0500 Use sending property in multicast filter commit f4bc6e3ada7eba5b7d25fa579070701e277ee77b Author: Olivier Crête Date: Thu Dec 18 16:36:47 2008 -0500 Remove filter with sink commit 1697e5543c6f7da8afce6dc57071e0bfe0bea01c Author: Olivier Crête Date: Thu Dec 18 16:20:58 2008 -0500 Allow multicast sockets to start in the sending state commit ddcbad5f411545d500cf19ce8a2cf550104e7e97 Author: Olivier Crête Date: Tue Dec 9 18:58:45 2008 -0500 Extend the multicast sink/src creation function to support filters commit 76e9556e0754cd1e22b75cba180ea7fa695f068b Author: Olivier Crête Date: Tue Dec 9 17:42:58 2008 -0500 Add test to rawudp for partial send case commit baf33b494cc5a6fc3a5b9c12a4b6b52222af796d Author: Olivier Crête Date: Tue Dec 9 14:59:54 2008 -0500 Add sendonly targets in rawudp commit 24a5e93264dcd340e9a0a276ef9ac0fa0c8ee95a Author: Olivier Crête Date: Tue Dec 9 18:02:59 2008 -0500 Free recvonly pipeline when putting port too commit 3a1a784d01bb39ed6386606d9d9a5b361e077542 Author: Olivier Crête Date: Tue Dec 9 13:20:55 2008 -0500 Add recvonly pipeline and functions to add dests to it commit 6948939eb6b377741f72a99f98eb896c8b05822f Author: Olivier Crête Date: Mon Dec 8 20:18:39 2008 -0500 Extend the rawudp sink/src creation function to support filters commit 6b7beb56e12d92759db5a7c3facbbf2c31160d17 Author: Olivier Crête Date: Mon Dec 8 18:40:51 2008 -0500 Connect the get-recvonly-filter and error signals from the transmitter commit 8a3925c3cf1a9b3edd6d444a5822b2921ac2bfde Author: Olivier Crête Date: Mon Dec 8 14:20:22 2008 -0500 add get-recvonly-filter signal commit ec55fda78a4b2dbd13ce40f25e3b6530b0c00c0a Author: Olivier Crête Date: Thu Dec 4 16:14:32 2008 -0500 Implement dropping the SR if sending is false commit 5f411ba4fff21f6e262ed5308442f50e665a38fb Author: Olivier Crête Date: Wed Dec 3 17:09:26 2008 -0500 Add sending property to rtcp filter commit f80aca36d9a02410de9bc719efdc24654c8d1444 Author: Olivier Crête Date: Wed Dec 3 16:29:10 2008 -0500 Import empty RTCP filter element commit 1d2568ebf0902c4f6bc8a9ef9d9024460b93b1b2 Author: Olivier Crête Date: Thu Feb 5 12:55:31 2009 +0000 Ignore new registry file commit 089d9e24955854a988cfc190b3b8b4dc2bf14a32 Author: Olivier Crête Date: Thu Feb 5 12:48:02 2009 +0000 By STUN, I mean TURN commit 4789542dc48b5a6970d44acb4ba851801b6f1673 Author: Olivier Crête Date: Thu Feb 5 12:38:37 2009 +0000 Replace copy of common with git submodule commit d1ea53d5635966800c6cd431afe40ed255d6849a Author: Olivier Crête Date: Thu Feb 5 12:36:44 2009 +0000 Keep our glib-gen.mak commit 79b655581ef3d575a5bfdbebf1505e5db8c0fbad Author: Olivier Crête Date: Thu Feb 5 12:18:39 2009 +0000 Move our modified gtkdoc plugins sutff out of common commit 110e5451e3324b1ccad662b0064d5324db54ea0b Author: Olivier Crête Date: Tue Feb 3 19:11:49 2009 -0500 Protect against multiple threads calling into the pad block callback commit 247267b91367635bbc2a373a6ef435d81971388c Author: Olivier Crête Date: Tue Feb 3 18:42:48 2009 -0500 Rename confusing function to _discovery commit f827fe388eec7aae823f716119f1482c1c573eec Author: Antoine Tremblay Date: Sun Jan 25 11:15:08 2009 -0500 Fix Makefiles for gst-plugins-base includes and libs The makefiles were using GST_BASE_LIBS/CFLAGS rather then GST_PLUGINS_BASE_LIBS/CFLAGS for the base rtp libs Also add -lgstrtp/gstnetbuffer at the end of the LDADD commit a5eccc7c16dae57e4cd5074330cb0a07475b961c Author: Olivier Crête Date: Wed Jan 21 17:15:37 2009 +1100 Use the standard/merged python bin_to_do_file in our test commit 8779b777d280c63f428f3f956b63adf316fb1b70 Author: Olivier Crête Date: Tue Jan 20 15:32:15 2009 +1100 Make sure we don't call the pad blocked callback twice in the case of pad_alloc+pad_push commit 6337ac815c8c4a40313c33a020fd916199c55bba Author: Olivier Crête Date: Tue Jan 20 14:06:06 2009 +1100 Print error too commit d09c1026385d570d8072dd30a93dfe00c1922f01 Author: Olivier Crête Date: Thu Jan 15 14:51:37 2009 -0500 Accept remote codecs without a clock rate Old jingle did not provide it commit a2c9db3cc79813f7b26820a923920a3af6131a57 Author: Olivier Crête Date: Thu Jan 15 14:48:24 2009 -0500 Test setting a static codec without its clock-rate commit 93c655a55a5e5be5ef12902b530a01d4bfd1475b Author: Olivier Crête Date: Fri Jan 9 21:25:36 2009 -0500 Share the same default stun timeout in stream and component commit de3c90819e61c92dfb685205aecd12d4216b9bf3 Author: Olivier Crête Date: Fri Jan 9 17:01:03 2009 -0500 Version 0.0.7.1 commit 2f18cbf114beb4c1e3840d70dd3c5516aced282d Author: Olivier Crête Date: Fri Jan 9 16:50:49 2009 -0500 Version 0.0.7 commit 09a3b23e8a53c2de135c58f295bfa6aec1b654a5 Author: Olivier Crête Date: Fri Jan 9 14:58:29 2009 -0500 Also allow force disposing of participants commit da48ddf2c5cb638de7ca130d04998c35742cc0c0 Author: Olivier Crête Date: Fri Jan 9 14:51:41 2009 -0500 Add dispose method to the python bindings commit d09a16e1b98701120341f165f7e0775727462dcd Author: Olivier Crête Date: Fri Jan 9 14:44:21 2009 -0500 Update python bindings def file to include diposed commit 1ba1cebf8cd51b39c79af5bcc9ed20d0f9959b21 Author: Olivier Crête Date: Fri Jan 9 14:43:20 2009 -0500 Add test for post-dispose calls commit 51cabe12089105ba72f8f5ac51fccb51c4819abe Author: Olivier Crête Date: Fri Jan 9 14:26:36 2009 -0500 Protect rtpsession dispose with a rw lock commit dafa26580c0053fbf8757f09b94f6e8fe3d19779 Author: Olivier Crête Date: Thu Jan 8 16:57:19 2009 -0500 Clarify session->conference refs commit 4b50fbb8df470a1b795f5d65f9735815b80a75ea Author: Olivier Crête Date: Wed Jan 7 20:48:40 2009 -0500 Move stuff to dispose/finalize cleanly in rtpsession commit d95dc199b4e05ff75308168daa389498726f6c39 Author: Olivier Crête Date: Wed Jan 7 20:25:23 2009 -0500 Protect streamtransmitter in stream against early dispose commit 849a89d1a98ce31a4808391f6010a0338bf673fb Author: Olivier Crête Date: Wed Jan 7 20:06:17 2009 -0500 Protect participant in stream with mutex commit 52541a83889fabfc2b1f66d2ce153b6f56519bb5 Author: Olivier Crête Date: Wed Jan 7 20:04:16 2009 -0500 Make the session inside a stream dispose-safe - Protect it with its own mutex - Take a ref when using it - Unref afterwards - Remove now useless disposed variable commit 9f5053f5ca8c90ac2fa20550038870b94b0a81fb Author: Olivier Crête Date: Wed Jan 7 19:37:23 2009 -0500 Stream transmitter is no longer readable commit 9ec108ce4f720aa5d34b4ab95a559f8cdc818642 Author: Olivier Crête Date: Tue Jan 6 20:23:57 2009 -0500 Add error for when an object has been disposed commit 07468bca054a465841b9365cb8a3cd107866b5b6 Author: Olivier Crête Date: Tue Jan 6 20:20:07 2009 -0500 Make fsrtpstream's dispose thread safe commit df58bbe7b02a56f33de9aecec64650093052e0c6 Author: Olivier Crête Date: Fri Jan 9 14:56:41 2009 -0500 Add force_remote_candidates bindings in python commit e3154fa95d492a339ff401c57248bcc6656144fe Author: Olivier Crête Date: Fri Jan 9 14:54:55 2009 -0500 Fix component defs in python bindings commit 19e00a88964e326012db5e4fbf077cd000a0bb08 Author: Olivier Crête Date: Wed Jan 7 18:16:08 2009 -0500 Document the relay-info property completely commit 71e9aa289661d962cad953c7bf805a33511a59d6 Author: Olivier Crête Date: Wed Jan 7 17:21:29 2009 -0500 Remove gst-function.m4 from makefile.am too commit f8a7173d877b3af4352a45b885e5405458311a6d Author: Olivier Crête Date: Wed Jan 7 17:08:37 2009 -0500 Fix potential race in tests commit 545f7ff35abf61c1a53afbfb61fa6c173f52578f Author: Olivier Crête Date: Tue Jan 6 20:41:35 2009 -0500 Make the stream transmitter fully private commit 86f421f6a9612b249cb7def4ca413661679e7456 Author: Olivier Crête Date: Tue Jan 6 20:48:03 2009 -0500 Remove useless ifs commit 359f1f690f468596d0c06ace568f2b0c715f7fec Author: Olivier Crête Date: Tue Jan 6 20:20:14 2009 -0500 Remove useless checks commit b09e1ff35011eee4fafd5df9343aa5942ef02f02 Author: Olivier Crête Date: Tue Jan 6 19:44:56 2009 -0500 Ignore new multicast method commit aef439dd682d1a17aac6c9ff0992cc8b57e6ba3b Author: Olivier Crête Date: Tue Jan 6 19:07:27 2009 -0500 remove unused configure macro commit 88f38b9fc20c532180e1fe887da1e2455bf8d4c9 Author: Olivier Crête Date: Tue Jan 6 17:55:15 2009 -0500 Replace 2.16 g_warn_if_fail() with a g_assert() commit 43aa65f17d375cf6c466a3e9b50838bd405a4740 Author: Olivier Crête Date: Tue Jan 6 17:50:03 2009 -0500 Make the stun timeout process respect the max timeout commit 2803d30dfa087c08b3ab3b13aff9c1f5bdca7ec2 Author: Olivier Crête Date: Tue Jan 6 17:48:38 2009 -0500 Add more debugs in the stun process commit 759219497c9e0a08678e6955f154344df318f3e1 Author: Olivier Crête Date: Tue Jan 6 17:47:32 2009 -0500 Limit the stun timeout, have a shorter default commit ace837cb861ad299d60ff06a42d61144c1a3e43d Author: Olivier Crête Date: Tue Jan 6 17:07:28 2009 -0500 Write debug output when a candidate is emitted commit 1f26ac3513303f92c13dcab4b1c088dbcd5c151a Author: Olivier Crête Date: Mon Jan 5 16:24:05 2009 -0500 Properly filter the h263* pipelines commit 32b2f72025e1cc1b9e626482c53554e54fed1f32 Author: Olivier Crête Date: Mon Dec 29 00:38:51 2008 -0500 Make multicast stream transmitter code re-entrant commit f4636ab314e11e96bbef1bb6271e9bf460fd5efd Author: Olivier Crête Date: Sun Dec 28 17:14:02 2008 -0500 Use an atomic for the send count in mcast commit 8ecfcb74a8a40285e136cbeb099b6ccd9c597962 Author: Olivier Crête Date: Sun Dec 28 17:11:44 2008 -0500 Make sure the same udpsock is not created twice in mcast commit d006a2f390b2302031f7838f49c57cf5c42a622c Author: Olivier Crête Date: Sun Dec 28 17:07:56 2008 -0500 Protect the udpsocks lists with a mutex in mcast commit a88a6b5952bad37af78b9ae4ce6d54a9718be89e Author: Olivier Crête Date: Sun Dec 28 15:56:55 2008 -0500 Update plugin doc section to match renamed internal functions commit 749c043808b99aaf2e5bc4ff25f81d48881ba05e Author: Olivier Crête Date: Sun Dec 28 15:47:39 2008 -0500 Protect the udpports list in the rawudp transmitter commit 5e6fa18ef516f9d99f38fd7d8e255570278015c9 Author: Olivier Crête Date: Tue Dec 23 20:36:05 2008 -0500 Remove unused variable commit 3b3652fed7d197068137c2da86f388481c4067a3 Author: Olivier Crête Date: Tue Dec 23 20:01:39 2008 -0500 Release lock while changing the sending status of a nice stream commit ad4c6e414997ba1eb285ea826c20e9bad57e0131 Author: Olivier Crête Date: Tue Dec 23 20:01:22 2008 -0500 Make sending protected in nice transmitter commit 84327a52309722044047c69d2bc93c486596104d Author: Olivier Crête Date: Tue Dec 23 18:06:40 2008 -0500 fix small leak in test commit 916baf074e02558929b569930d9f6d7058e83a51 Author: Olivier Crête Date: Tue Dec 23 18:06:23 2008 -0500 Cleanly release the request pads on the funnel's disposal commit 08ca2f6a3da89b6b6cd4a8ffb4de3e23d66bab31 Author: Olivier Crête Date: Tue Dec 23 17:50:23 2008 -0500 Use proper locking when creating special codecs commit 23251002857d0d38c562863fef6c1a25e12f441c Author: Olivier Crête Date: Tue Dec 23 17:50:00 2008 -0500 re-init global vars on every run in sendcodecs test commit 7674cf047faf0fd11498aafdd88d3cb8d2514f12 Author: Olivier Crête Date: Tue Dec 23 17:45:47 2008 -0500 Typo commit 7cf20b9d5a5cabe8e14f4aec8a66bd90e1f205d8 Author: Olivier Crête Date: Tue Dec 23 17:05:52 2008 -0500 Remove useless check commit fa8b19ebe8c27a7c6ba974ff40de43e37e587ce3 Author: Olivier Crête Date: Tue Dec 23 17:05:45 2008 -0500 jump to right error label commit 4da3ac3c9a5506fddc6ea242abe40f40f4dc0bd7 Author: Olivier Crête Date: Tue Dec 23 17:04:26 2008 -0500 Do proper locking in special_sources_remove commit 5921c0d213d2c48a8f00c3362fd8b050b0a51a0e Author: Olivier Crête Date: Tue Dec 23 16:46:08 2008 -0500 Remove unused _update special source method commit da1708c4363476a37d6f0d1149b342cb693c7878 Author: Olivier Crête Date: Tue Dec 23 16:40:45 2008 -0500 Fix typo commit 83bf1f77fb0e4c61b4fdfd7f801ea2818c13fed3 Author: Olivier Crête Date: Mon Dec 22 22:23:54 2008 -0500 Release locks while adding ghostpad commit e3ae726b9059875298439c0e1385f10c79224cfb Author: Olivier Crête Date: Mon Dec 22 22:23:17 2008 -0500 Remove useless/dangerous casts commit c35994e7b2b9e737b5e117734805d9f3c3616534 Author: Olivier Crête Date: Mon Dec 22 22:14:01 2008 -0500 Only copy the right one instead of leaking the others commit f0b6ea643026cd422be4dab2da19eb0bf6ff51cb Author: Olivier Crête Date: Mon Dec 22 21:14:46 2008 -0500 Simplify locking a little commit ebb5662e1f900ad0057dbb47ace92635721ac296 Author: Olivier Crête Date: Mon Dec 22 21:07:47 2008 -0500 Release locks while modifying the recv pipeline commit 19d0648b0d676a042d966fb4ece5c6b034a58757 Author: Olivier Crête Date: Mon Dec 22 19:54:53 2008 -0500 Fix some unsafe code in add_output_ghostpad commit 58515895e315cbf186bea3955ca960027c523057 Author: Olivier Crête Date: Mon Dec 22 18:35:46 2008 -0500 Release locks while modifying the discovery pipeline commit 862c9ddc841aa802263ae659185d62a1c1969ce9 Author: Olivier Crête Date: Fri Dec 19 22:44:07 2008 -0500 Always modify the send pipeline from the streaming thread commit df2ab1d95d65c5a71eab075837bee51724b9f410 Author: Olivier Crête Date: Fri Dec 19 22:43:37 2008 -0500 Add audiotestsrc to dtmf tests commit e3e5ed12e7df5f76634ec7334a10e8256dccc0d8 Author: Olivier Crête Date: Fri Dec 19 22:43:19 2008 -0500 Set extra capsfilters to playing too commit f71caffe4ec7cba7b278bd6bf56fba179fc931c8 Author: Olivier Crête Date: Fri Dec 19 21:03:40 2008 -0500 Only modify the send codec bin from the streaming thread commit b39240719ce03214bcda40be976a40dfe0506081 Author: Olivier Crête Date: Fri Dec 19 20:36:02 2008 -0500 Use regular GMutex instead of static mutex and add some debugging functions commit 0cd975bfcc3e354b60e0d733bdcd4ee03eb0320b Author: Olivier Crête Date: Fri Dec 19 20:17:04 2008 -0500 Fix double unlocks commit c1a212611a69520e577c835aa54b4e4a2bfb3307 Author: Olivier Crête Date: Tue Dec 16 18:43:16 2008 -0500 Protect transmitter hashtable with a lock commit a9f6bfcc42651b76c86cfd7235b6e79a9bbca992 Author: Olivier Crête Date: Tue Dec 16 18:28:38 2008 -0500 Don't re-lock too early after emitting src-pad-added commit 4bf3fcc7cbe5463ae1b0818f0a56f4107db4f33b Author: Olivier Crête Date: Tue Dec 16 18:15:23 2008 -0500 Don't re-lock in secret after sending the codec-changed notification commit f8033f5e470453fe8bd345a28107d0315112a6d1 Author: Olivier Crête Date: Tue Dec 16 18:06:14 2008 -0500 Make set_negotiated_codecs into an unlocking function commit f3fae388b747f100f3fed32018e121318a74f9a4 Author: Olivier Crête Date: Tue Dec 16 17:58:59 2008 -0500 Make it explicit that the set_codecbin function unlocks the lock and let it flow commit 7a85f091520fb1b293b8c868bc0d4dc75d7fa7bf Author: Olivier Crête Date: Tue Dec 16 17:32:48 2008 -0500 Hold stream ref while letting lock go commit ebed02b70838d66fdb795007d00d0a3cdc96c102 Author: Olivier Crête Date: Tue Dec 16 17:32:29 2008 -0500 Emit negotiated-codecs notify after letting the locks go safely commit cb3a6e0efdd03612c8755f4245fad9561944aa31 Author: Olivier Crête Date: Tue Dec 16 17:23:02 2008 -0500 Use public members for ssrc, pt and no-rtcp-timeout commit 9b5ca7f15343813e6bc37ec7884efedc58c361cb Author: Olivier Crête Date: Tue Dec 16 17:18:40 2008 -0500 Make pt, ssrc and no_rtcp_timeout public members of substream commit a67e872a4d9a715551be0f4d18ba8386dfb403de Author: Olivier Crête Date: Tue Dec 16 17:15:07 2008 -0500 Use substream codec member directly commit 2c5d62129a9337da532fec4efbe3286ae4e572cc Author: Olivier Crête Date: Tue Dec 16 17:07:41 2008 -0500 Make the substream's codec member public commit b9b42653eb6a577839b07a5d5cb1191f322fbb91 Author: Olivier Crête Date: Tue Dec 16 16:38:53 2008 -0500 Remove locking in dispose function commit b5c8cbee9d6bfdae813f54916703281934775768 Author: Olivier Crête Date: Tue Dec 16 16:33:21 2008 -0500 Fix comment commit c1509515f3c43ffebdb2caad07218323b2ec35d9 Author: Olivier Crête Date: Tue Dec 16 16:31:12 2008 -0500 remove double set commit 7cdf044a6c3d261ebe4779e538423e40f95ef4f5 Author: Olivier Crête Date: Fri Dec 12 21:13:43 2008 -0500 unlock lock before emitting signal commit d8b4582ca40418aa8d7c8041773fbb903194b708 Author: Olivier Crête Date: Fri Dec 12 21:11:38 2008 -0500 Don't hold locks during disposes commit 413fe0c53df6af621799c232c9f4616aa8f74469 Author: Olivier Crête Date: Fri Dec 12 21:02:02 2008 -0500 Make substream property accessor under the session lock commit 8d1e9d826c50f1d7354debb53902a55f86486e49 Author: Olivier Crête Date: Fri Dec 12 20:59:03 2008 -0500 Make some properties into public members commit 9be84dd2989bfc378d0553e17ff55b281dadfa79 Author: Olivier Crête Date: Fri Dec 12 20:46:44 2008 -0500 Release the rtp session lock when emitted bus messages or signals commit b9e95fd630518391a0182315fceaf361ea8e436a Author: Olivier Crête Date: Fri Dec 12 20:19:31 2008 -0500 forgot another commit 92fd076651a79ddd8a4c36b494ad9daaeecb14f3 Author: Olivier Crête Date: Fri Dec 12 20:16:01 2008 -0500 forgot one in FsRtpSession commit bd9b1fe43e3c8618e98edae4088e3747fe1742e3 Author: Olivier Crête Date: Fri Dec 12 20:15:03 2008 -0500 Replace recursive mutex with a regular mutex commit 948ee9942a51eb0b474b4f2a50d5e7e0b0983f20 Author: Olivier Crête Date: Fri Dec 12 20:12:14 2008 -0500 More locking cleanup commit 35765d51affe8185d503151769ba3687f583651b Author: Olivier Crête Date: Fri Dec 12 19:55:32 2008 -0500 Make clear in FsRtpStream what is called with a lock held and what isnt commit 142e0b50b60635c9148412b7416aab1696a6a807 Author: Olivier Crête Date: Fri Dec 12 19:33:00 2008 -0500 In FsRtpSession, make it clear what should be locked and what shouldnt commit 2385e21a47d6d32fb3c782ae2aff558d3af4ccf1 Author: Olivier Crête Date: Fri Dec 12 19:25:55 2008 -0500 Make it clear that the lock is held accross the new_remote_codecs callback commit 18854fbe448f368cbe46bbc2b2d2d75673b78411 Author: Olivier Crête Date: Fri Dec 12 19:21:06 2008 -0500 Rename to fs_rtp_session_add_send_codec_bin_locked commit e92e56ac010bf833f152be19f1c0a836f13373c5 Author: Olivier Crête Date: Thu Dec 18 19:49:20 2008 -0500 Free ttls array too commit 07a0261bfe1f1b95b98930a28c18b200d064ab69 Author: Olivier Crête Date: Thu Dec 18 17:50:46 2008 -0500 Its safe not to override associate-on-source commit e1e67be7545b0095658de0cf2fe1a900f8fb56db Author: Olivier Crête Date: Thu Dec 18 21:27:35 2008 -0500 Copy the version.entities file to the xml dir for regular gtk-doc too commit 6d6fdf58b476386e9422d8b8aa9ef2fadfb76f5d Author: Olivier Crête Date: Thu Dec 18 21:25:38 2008 -0500 Ignore another file commit a8b21156a5cf3370acccb570fb2b1e6f63c717ca Author: Olivier Crête Date: Wed Dec 17 21:10:53 2008 -0500 Use the locked_state pattern everywhere in rtpsession commit 29b82d308c8bab9bea5d979b2b3bbba3cab5edca Author: Olivier Crête Date: Wed Dec 17 21:10:23 2008 -0500 Stop send elements in the right order commit 1ce598bba40c86fa9f9e61b9aa6f821e51c6b44b Author: Olivier Crête Date: Wed Dec 17 20:59:44 2008 -0500 Stop the substream components correctly and in the right order commit 7846dfe0315eebfd771eedf82ce3758d7f16f6e2 Author: Olivier Crête Date: Wed Dec 17 20:55:02 2008 -0500 Stop substream components in the right order commit fe3b32ee1bce40e0a48e96b0196a7af2b917a63f Author: Olivier Crête Date: Wed Dec 17 18:11:10 2008 -0500 Put version in generated documentation commit d364caad681ca714523f75443f88c23d4bbc489d Author: Olivier Crête Date: Tue Dec 16 15:25:12 2008 -0500 Revert "Don't change the PT if we're re-using an already existing codecassociation" This reverts commit 53005f7023613a06a80dd34f25f930c62bcaba90. commit 8c072690fb3224a03976405f28ec9d4f8ce19e96 Author: Olivier Crête Date: Fri Dec 12 11:49:51 2008 -0500 Close bracket in right place commit 671cd3e2350571b9a4f7278be2602fc056294682 Author: Olivier Crête Date: Tue Dec 16 15:07:07 2008 -0500 Add test for dynamic pt commit 00d75ceef845107a956d0b495414cf1c5e872bba Author: Olivier Crête Date: Tue Dec 16 14:23:16 2008 -0500 Quell wrong compiler warning commit 9f14e4a3e12ca493c7406f2815dfe70a43d6ae15 Author: Olivier Crête Date: Tue Dec 16 12:54:51 2008 -0500 Remove useless set commit eb489aeab9821caaf1b1029ff3493a26182bd5f8 Author: Olivier Crête Date: Tue Dec 16 12:54:40 2008 -0500 Only free old candidate once new one has been accepted commit 3656951827b6fe10ae4e37dbe391a32c1c12c8f7 Author: Olivier Crête Date: Tue Dec 16 13:03:26 2008 -0500 Don't fail on NULL candidates in base functions commit dc6c52ba745e363387dbce75a964a6268c1977be Author: Olivier Crête Date: Thu Dec 11 17:39:52 2008 -0500 Version 0.0.6.1 commit 0f91b46ee7815dcb939b433c2f2740e3b8964bd5 Author: Olivier Crête Date: Thu Dec 11 17:34:56 2008 -0500 Version 0.0.6 commit 605eedcc1606c87bf8879530d501d0e0806b260c Author: Olivier Crête Date: Thu Dec 11 17:34:45 2008 -0500 Fix plugins doc Makefiles to let distcheck pass commit 1d38646c1f3d770c54cbb89190136d303e5afb20 Author: Olivier Crête Date: Wed Dec 10 17:06:15 2008 -0500 Use fixed caps on funnel src pad commit 6a874365c890a4f4da3cf95406250d702a724d43 Author: Olivier Crête Date: Tue Dec 9 19:41:37 2008 -0500 Simplify (and correct) the multicast transmitter to always send with the max requested TTL commit 3148bc8e723dddbce002c92b13bed51ba222b6d3 Author: Olivier Crête Date: Tue Dec 9 15:10:52 2008 -0500 Force checking for sed commit 8d64d4c111a57f4a7845c1959d560ca5f7d3124b Author: Olivier Crête Date: Tue Dec 9 15:00:15 2008 -0500 Test for newer pythons too commit f42efca4e0bf0b648c930eb874c12f0ee3604700 Author: Olivier Crête Date: Mon Dec 8 18:41:16 2008 -0500 Update doc for get_stream_transmitter_type method commit 452b5550f198c08bc24cc62940c357f6a5d00c79 Author: Olivier Crête Date: Mon Dec 8 17:30:43 2008 -0500 Remove the request pad before the sinks. This is required to prevent the race where a buffer is stuck in the sink while trying to stop it and returns wrong-state commit f9be9e386d19d6fc395443b83be0cfc752400374 Author: Olivier Crête Date: Mon Dec 8 14:27:16 2008 -0500 Document list_transmitters in session class commit 0236d0bd7572e9793e0bd8cb8bbf55e573934f35 Author: Olivier Crête Date: Mon Dec 8 14:21:13 2008 -0500 Remove one debug statement that prints too often commit c8e97fd900cd4ec24271da2023073a910b318e1e Author: Olivier Crête Date: Mon Dec 8 14:20:55 2008 -0500 Skip upnp-ignored -> stun tests if stund isnt there commit 7eabd4fe29191feda4fe5d4158dd4f1c256f8850 Author: Olivier Crête Date: Thu Dec 4 17:40:30 2008 -0500 Replace static mutex with regular mutex in nice transmitter commit 668643d410e6fe3a0a6d09038dfe55780a2a072d Author: Olivier Crête Date: Wed Dec 3 18:19:49 2008 -0500 Only try to generate the doc for existing transmitters commit 4aeee7cde69c47c968e29db2c705f84d25a1dacb Author: Olivier Crête Date: Tue Dec 2 19:32:33 2008 -0500 Versioin 0.0.5.1 commit c604c378b968b2c078af78b40b8b1b138f0a4aba Author: Olivier Crête Date: Tue Dec 2 19:26:38 2008 -0500 Versioin 0.0.5 commit 779b3a8642d459584e7e8ab880bbcb0ff2cf39e9 Author: Olivier Crête Date: Mon Dec 1 19:50:50 2008 -0500 Make it compile with python 2.4 commit 1a1cacba2b635c362187d0d6941d1f71960e0350 Author: Olivier Crête Date: Mon Dec 1 19:30:25 2008 -0500 Add nice requirement to the README commit c2f7f9676dced4b3bc7ed1c6fc9a5b39f06d292e Author: Håvard Graff Date: Mon Dec 1 18:10:01 2008 -0500 Forward events commit ec9f768df52f009861b12f7083c5fa9de4e23516 Author: Håvard Graff Date: Mon Dec 1 18:07:01 2008 -0500 Implement getcaps in the funnel commit 0540db2ebd8e45f5887865f440a548f094bcb46d Author: Olivier Crête Date: Sun Nov 30 20:37:17 2008 -0500 We need libnice 0.0.3 with the relay constants commit de6f9e9f59f55c4fc71ff699a49da1cec1766336 Author: Olivier Crête Date: Sun Nov 30 09:43:12 2008 +0100 Protect sink addition/removal with a mutex commit 84a180100167b331946303143a3137b0326f4685 Author: Olivier Crête Date: Sun Nov 30 09:39:41 2008 +0100 Use the new method to control the sendingness commit 4dd1c36b6118363f2486f62a2b554438568e1f02 Author: Olivier Crête Date: Sun Nov 30 09:37:26 2008 +0100 Add method to set the nice sink sending or not commit f33fe835392d4dd4b4068ecabf87f5f8192fac82 Author: Olivier Crête Date: Sun Nov 30 09:28:41 2008 +0100 Check linking success as asap commit 19d78cdd1bcb2ef6423f6ec36496dbd34a45ad96 Author: Olivier Crête Date: Sun Nov 30 09:17:17 2008 +0100 Keep a ref to the nice elements commit 2b62a803ed02567715958293dab8e54ff5b208b6 Author: Olivier Crête Date: Fri Nov 21 11:00:16 2008 -0500 Don't release the request pads on gstrtpbin, its not implemented and prints out a warning commit d9a5fc09cfd04ce54ffa5ec7ed89937ddd6682a3 Author: Olivier Crête Date: Thu Nov 20 19:00:34 2008 -0500 Set the remote_candidates from an idler to prevent deadlock commit 8f52bfa113a7fd242775d612176a31d7455fe953 Author: Olivier Crête Date: Thu Nov 20 18:53:28 2008 -0500 Wait until the component is ready before using it to avoid losing buffers commit 2c57ca7bb37712dae5ca3513e534b67467e1aaf8 Author: Olivier Crête Date: Thu Nov 20 18:52:51 2008 -0500 Lock the counter while they're being processed commit 8615988202b7e3a966b61cd10c0786cc740d620c Author: Olivier Crête Date: Thu Nov 20 18:16:52 2008 -0500 Fix small leaks in nice transmitter and tests commit bca3688dac528d8ec5cc0f072d24bfbabd6b00e3 Author: Olivier Crête Date: Tue Nov 18 14:33:26 2008 -0500 Remove double semi-colons commit 33140c5ae130e024452bf8140f6b363d97b61b73 Author: Olivier Crête Date: Tue Nov 18 13:51:00 2008 -0500 Make rawudp compile without upnp commit bc3429305e79e4ffec8e57d1a3a98a7e727fa322 Author: Olivier Crête Date: Tue Nov 18 13:35:33 2008 -0500 Add more UPnP tests commit 52a7dc97ee0152e8db8fbb1696d0505974f6c9b6 Author: Olivier Crête Date: Tue Nov 18 13:07:28 2008 -0500 Disconnect signal when stopping upnp discovery commit 029e5b617ac88514bcf5d80fa5d517b5a2805cf7 Author: Olivier Crête Date: Mon Nov 17 18:34:23 2008 -0500 Only emit the upnp candidates if stun fails commit 46dd2a0add2af23e39d2db6395d350ab370eda0f Author: Olivier Crête Date: Mon Nov 17 18:33:58 2008 -0500 Make stund rawudp tests non optional commit dcc8977245577938d2226b744bb7b645702a9f8a Author: Olivier Crête Date: Mon Nov 17 18:27:47 2008 -0500 Prevent deadlock in rawudp test stopping process commit 32780a7353525ef7e2f2e370d55124592d909a91 Author: Olivier Crête Date: Mon Nov 17 17:55:11 2008 -0500 Stop upnp discovery if stun candidate is found commit 726597c3ef3a7a57121d00f1ec48aca29fd0ceb2 Author: Olivier Crête Date: Mon Nov 17 17:49:00 2008 -0500 Centralise upnp discovery stopping code commit 4533b5df57e97241c5cd902135e7107540121d86 Author: Olivier Crête Date: Sun Nov 16 20:13:47 2008 +0000 Disable upnp discovery on stund test commit f39c66d97dfd5aed97a4898f678e40ec1cdb3506 Author: Olivier Crête Date: Sun Nov 16 20:13:17 2008 +0000 Really disable upnp discovery if its disabled commit 42086875e4a58af06b6fded66f7271b0e4f8e49f Author: Olivier Crête Date: Sun Nov 16 19:26:07 2008 +0000 Start/stop the stund in test fixtures commit 381218dc71408e87ab47d1a89e00421ee409d307 Author: Olivier Crête Date: Mon Nov 17 16:38:09 2008 -0500 Reset global variables on every test commit 91a5a265803cf2a696dba0cc950187dd26a45292 Author: Olivier Crête Date: Mon Nov 17 13:44:12 2008 +0000 Print the right variable in error commit afba4e4e9a7e2996fddf6c336b1fada1d33debbf Author: Olivier Crête Date: Sat Nov 15 17:48:36 2008 +0000 Document more requirements commit f761cd7ed8c32ebc056b87d1b5487dde21a17d79 Author: Olivier Crête Date: Fri Nov 14 09:38:00 2008 +0000 Remove more unused stuff in the configure commit bacfca413a16a9dafd99d579720c4fdb89fba1ba Author: Olivier Crête Date: Fri Nov 14 09:36:15 2008 +0000 Require gst 0.10.20 for gst_bin_find_unlinked_pad() commit 3d6a068e00e20c542aed4acbffd7d15d9bcbf2d9 Author: Olivier Crête Date: Thu Nov 13 22:09:04 2008 +0000 Remove unused stuff in configure commit 750c3376c20d2a9df8a0cc017c4a8af13b12c299 Author: Olivier Crête Date: Thu Nov 13 22:05:58 2008 +0000 Ignore nice properly if its not installed commit f2eb8d35651ffcefc7e899543c98b7a4e8c1b538 Author: Olivier Crête Date: Thu Nov 13 22:02:47 2008 +0000 version 0.0.4.1 commit 914525d4af200202356ee8dae0403060a0f12101 Author: Olivier Crête Date: Thu Nov 13 18:37:28 2008 +0000 Version 0.0.4 commit c4415871b6e360468fc3396d206c0edb90082e17 Author: Olivier Crête Date: Thu Nov 13 18:37:20 2008 +0000 Don't distribute pyfarsight.c commit 9a95c078e7f21fefb48301fd029c30237192e88a Author: Olivier Crête Date: Thu Nov 13 18:14:34 2008 +0000 Remove const to match nice api change commit aac853005303a67956b22599ef5e66ccb3937b07 Author: Olivier Crête Date: Thu Nov 13 17:05:55 2008 +0000 Disable stund test unless STUND is defined commit 775be7887ed675d38e3bd7ca81114c99f922385b Author: Olivier Crête Date: Thu Nov 13 16:47:35 2008 +0000 Add missing files to tarball commit dad0b082e8f988b71262e8f1c0669acc8f215c6c Author: Olivier Crête Date: Thu Nov 13 16:29:16 2008 +0000 Include coverage files commit a0d1d492470db64203cac4df8f45e2c13151366b Author: Olivier Crête Date: Thu Nov 13 15:49:31 2008 +0000 Remove no longer valid message commit a2f039f2effcce87f071fa3e6e6e8db0f74bc59d Author: Olivier Crête Date: Thu Nov 13 15:27:09 2008 +0000 Lock source to prevent it being started by the bin before its linked commit 07c6f2f37f53e4935227c50011956a91cd8af83b Author: Olivier Crête Date: Thu Nov 13 15:26:04 2008 +0000 Stop immediately on error commit f1e1f853ddecfaa33b3d05f5007772a3a2cecd5c Author: Olivier Crête Date: Thu Nov 13 15:16:49 2008 +0000 Give the fakesrc a more meaningful name commit c2e160d1e95c4b7ba1fd452db22449acc1690c6c Author: Olivier Crête Date: Thu Nov 13 14:36:54 2008 +0000 Re-send stun requests with increasing timestamps per RFC3489 commit c2208240b603cab33772dd654ebb3444b24ac9c0 Author: Olivier Crête Date: Thu Nov 13 14:14:22 2008 +0000 Send the stun request in the timeout function commit 249269c1e00e5eb0b59d0015845a5079081fe7a7 Author: Olivier Crête Date: Thu Nov 13 13:14:42 2008 +0000 Simplify rawudp stun timeout handling commit 2bd85c650c2e5725bad80ac1f215dbd279652dc3 Author: Olivier Crête Date: Thu Nov 13 13:04:13 2008 +0000 Factor out the stun sending part commit d5174f34e17c53ff908fe994e3936cb510cf6e6b Author: Olivier Crête Date: Thu Nov 13 12:50:55 2008 +0000 Make sure the pipeline is playing before we start trying to do dtmf commit 5f8f3a34fe2ea73f66f6186cbfff94e18e1b5e7c Author: Sjoerd Simons Date: Thu Nov 13 12:13:17 2008 +0000 Only strncyp the candidate foundation if it's set commit f415d1908289480a3838022d47e28d6783f79cdb Merge: d36d151 90bc234 Author: Olivier Crête Date: Tue Nov 11 19:23:49 2008 +0000 Merge branch 'nice-transmitter' commit 90bc23487c3f3b973d5bc633e948180e3169c891 Author: Olivier Crête Date: Tue Nov 11 19:05:06 2008 +0000 Test setting relay-info commit cffd47cf286425213823d0a35229b6b35a5e9804 Author: Olivier Crête Date: Tue Nov 11 18:59:35 2008 +0000 Fix small leak commit 1e19d6991faa2f01abf2138eca248c6a81ed8d78 Author: Olivier Crête Date: Tue Nov 11 18:33:53 2008 +0000 Take the values, so no leak commit d36d151870690c28328bbc6703fd61418a9deea5 Author: Olivier Crête Date: Tue Nov 11 18:14:05 2008 +0000 Install gtk-doc in parallel-installable place commit fe33f681b70ea5469cf3b799088eba5f12b2a1f6 Author: Olivier Crête Date: Tue Nov 11 16:51:41 2008 +0000 Dist the right filename commit 92a90e7f491a44eed3215bf0a8fc5478060b42ed Author: Sjoerd Simons Date: Tue Nov 11 13:32:26 2008 +0000 We own the new stream so drop the extra ref pygobject_new adds commit 5f578b1b75f41c51eb1c663457de541fa41152a4 Author: Sjoerd Simons Date: Tue Nov 11 13:31:47 2008 +0000 Update defs file commit 80d24cda002735f9ddc15eb1cc3eba23127857c5 Author: Sjoerd Simons Date: Tue Nov 11 13:31:00 2008 +0000 Let the sed annotate all new_ functions with caller-owns-return commit 42ab6b09670188702a9cbf23e3298f4d643d749d Author: Sjoerd Simons Date: Tue Nov 11 13:04:27 2008 +0000 Add rebuild-defs.sh to EXTRA_DIST commit 7f560e94b67777827cc7b423578dacdf3a1b98b1 Author: Olivier Crête Date: Tue Nov 11 13:18:38 2008 +0000 Use slice for nicegststream commit f0d5735141dae346b1da71526c86b396212c7397 Author: Olivier Crête Date: Tue Nov 11 13:17:34 2008 +0000 Don't leak probe ids commit 2a4cedc564491a77e7d85afbd9238db181c7a029 Author: Olivier Crête Date: Tue Nov 11 12:17:09 2008 +0000 Add test for invalid arguments while creating nice transmitters commit 67a0e4c93bdd52fdd04b95c833faea8a0cc59d0a Author: Olivier Crête Date: Tue Nov 11 11:43:34 2008 +0000 Check is there is a valid particpant commit c66481c4a1b1860d5d2efcdbfaed3e17a07c4fa2 Author: Youness Alaoui Date: Wed Nov 5 15:42:54 2008 -0500 a component id equal to the number of components is valid commit 9c858c06561b3f48a3e3dadc27f877de26966334 Author: Youness Alaoui Date: Wed Nov 5 15:42:21 2008 -0500 we modify candidates, so we need to save the next item before modifying the list commit 4456bbbcc15aed451e4fd02427d34d399deafe49 Author: Olivier Crête Date: Wed Nov 5 19:45:59 2008 +0200 Add test for force_selected_candidates commit e9cb820acf588d24520178aa1b52dc54779a222c Author: Olivier Crête Date: Wed Nov 5 14:38:44 2008 +0200 Update error message to match code commit b6c75d4e448c095370043bab96fe9ff3776db233 Author: Olivier Crête Date: Wed Nov 5 14:22:00 2008 +0200 Use FS_COMPONENT_NONE in tests commit cfa848f11e04450f1ddf17272f67bc4f1d143352 Author: Olivier Crête Date: Wed Nov 5 14:21:23 2008 +0200 Add FS_COMPONENT_NONE commit bbacf3b1f17e61c16d505ea048d27c86c056b0de Author: Olivier Crête Date: Wed Nov 5 14:15:02 2008 +0200 Add stund based test commit 2c3323ecff7134943332c8d4dcbcabb6b132f20c Author: Olivier Crête Date: Wed Nov 5 14:02:59 2008 +0200 Add test for preferred local candidates commit 628c81f93be9c8b6ef69f5da9c2772735d32520f Author: Olivier Crête Date: Mon Nov 10 18:16:19 2008 +0000 Delay forced candidates until the gathering is done commit 34a31a13479c12f3f0fb2b0cb2c9548a95c4d3c0 Author: Olivier Crête Date: Mon Nov 10 18:04:07 2008 +0000 Factor out the candidate forcing function commit a87463e5dad318743e20db1bea243b6999fc9afb Author: Olivier Crête Date: Mon Nov 10 17:53:56 2008 +0000 Empty candidate list on restart commit 07a1aa39bb84613d30b7edd41437b299a3e314cd Author: Olivier Crête Date: Mon Nov 10 17:52:57 2008 +0000 Queue remote candidates until gathering is done commit 148e3401f3bc1dd224bfdd900af6470cfca0279a Author: Olivier Crête Date: Tue Nov 4 19:13:30 2008 -0500 Only set relay info on right component commit e36e777884a50742aa307da160b41d7dc5c5579c Author: Olivier Crête Date: Tue Nov 4 19:13:20 2008 -0500 Components start at 1 commit aebd1118ad81c3f4fbd4025a97017013aa18578e Author: Olivier Crête Date: Tue Nov 4 19:05:14 2008 -0500 Don't enforce having one relay info per component commit ea506377ce65c8b23ba991e6994f8aeaf5edce14 Author: Olivier Crête Date: Tue Nov 4 17:16:13 2008 -0500 The local credentials are now copied inside libnice commit e3f5b5c968e4afb99bd378adc4b24a3e724b4966 Author: Olivier Crête Date: Tue Nov 4 16:09:27 2008 -0500 Use a static format string commit 2edaf4e4091d2fff8e1b370029ac9400a21f2b42 Author: Olivier Crête Date: Tue Nov 4 16:09:02 2008 -0500 Declare variable to make automake happy commit 457b259890c69116281784aa685bfc423abcf6fa Author: Youness Alaoui Date: Mon Nov 3 19:40:39 2008 -0500 only declare constant size arrays commit d6890ecefb77b5d6ceef22c066c7a2f0f6467091 Author: Youness Alaoui Date: Mon Nov 3 19:38:48 2008 -0500 Fix include commit ca009d8745814396a65cce222c54b53071d9782e Author: Youness Alaoui Date: Mon Nov 3 19:38:35 2008 -0500 declare variables only at the start of blocks commit 5e00a42d7d2b2a41c377ff7cdefbad72ea24a265 Author: Olivier Crête Date: Mon Nov 3 19:29:31 2008 -0500 Set boolean to true to avoid double-setting of forced candidates commit 5acf2c9d3042e7f7f10678508628a06a83027477 Author: Olivier Crête Date: Mon Aug 25 20:31:59 2008 -0400 Use the agent directly in callbacks instead of getting it from somewhere else commit 840f394ca2acfe34874ce96c2deb2aed5275fce8 Author: Olivier Crête Date: Fri Aug 22 22:26:41 2008 -0400 Only connect the agent new candidate signal after the initial gathering is done commit 030f17792f03f8c6f20b54eb48fe6ea81fbfba59 Author: Olivier Crête Date: Mon Nov 3 16:47:43 2008 -0500 Match renaming of enum commit e50acec901b70b78ca129ef0a19475208da4b84c Author: Olivier Crête Date: Mon Nov 3 16:38:33 2008 -0500 Ignore gathering-done signal if the stream_id doesn't match commit a637cef192bece4f294b567b43ae0f461b28c6f6 Author: Olivier Crête Date: Thu Oct 30 16:09:57 2008 -0400 Add right see_also to nice transmitter commit d2076525eb0dd352efafe360ea1861100f71f3ee Author: Olivier Crête Date: Thu Oct 30 16:09:29 2008 -0400 Add nice transmitter to gtkdoc commit 1730673281f71c128f6caeebce44bd6bdc7021c1 Author: Olivier Crête Date: Wed Oct 29 16:52:01 2008 -0400 Only stop on missing libnice if it was explicitely requested by the user commit 29fab1d5d914cd8c111dcbf67080234f8bfc731c Author: Olivier Crête Date: Wed Oct 29 13:13:39 2008 -0400 Remove GError in get_stream_transmitter_type to match updated api commit a67e1c3934bb1f920a9e216e302a66d5ce17e434 Author: Olivier Crête Date: Tue Oct 28 20:35:40 2008 -0400 Make it possible to set multiple turn servers (udp, tcp, tls) to libnice commit 4fb01402a8871252ef3441b7f81132ddbff3c0e5 Author: Olivier Crête Date: Tue Oct 28 20:15:01 2008 -0400 Replace long/short term creds with relay-type commit 90a5e28cf3d704e6a3e25ad4a013abe4a8f539db Author: Youness Alaoui Date: Tue Oct 7 14:30:07 2008 -0400 Removing unused/unexisting socket factory commit 6437113512cf1d1bf03a67c095dd805d9f6425de Author: Youness Alaoui Date: Tue Oct 7 14:30:25 2008 -0400 Remove long term credentials flag from set_relay_info. API change.. commit f3c863a05def2767e7e112e53ee5f05c46d7db2f Author: Youness Alaoui Date: Wed Sep 17 20:42:17 2008 -0400 Add support for enabling/disabling nice and stun debug messages commit c0a54ac7244580dd7d5d3e1fb905410629931043 Author: Youness Alaoui Date: Wed Sep 17 02:18:23 2008 -0400 we must use g_value_dup_boxed instead of g_value_get_boxed as the GValueArray gets freed right after the set_property commit f57fc3799d4df92be5662aa930c9f2aa1f7c75cc Author: Youness Alaoui Date: Wed Sep 17 02:17:44 2008 -0400 update libnice API : replace ID19 by DRAFT19 for compatibility commit e6a1d37f07ebba47791b381bdeda6213a0dc856b Author: Olivier Crête Date: Thu Sep 11 18:56:38 2008 -0400 Add long-term-credentials boolean commit dc457e3b2ab0bfb338be72dab70729e0f0b1262a Author: Olivier Crête Date: Thu Sep 11 18:56:25 2008 -0400 Read port from "port", not ip commit 5c70bcd5b6628e217c28502bfce0d0a6b23d59bb Author: Olivier Crête Date: Wed Aug 6 19:27:00 2008 -0400 Add call to nice_agent_set_relay_info commit bdd3ca080e47ffb95ec20cd88855a0e4af76c9df Author: Olivier Crête Date: Wed Aug 6 19:06:44 2008 -0400 Add property for relayinfo commit 4254a6880157397f252fe3633b4037cc05582d5b Author: Olivier Crête Date: Wed Aug 6 19:02:45 2008 -0400 Remove turn-ip/turn-port parameters (they're unused) commit 01226e7c8b96a52f2370fd763479350e11df371d Author: Olivier Crête Date: Wed Aug 6 16:38:49 2008 -0400 Remove udpsocketfactory from nice_agent_new() call commit b1f6da2eeae47586e167768198f0ec55ec0e3c85 Author: Olivier Crête Date: Tue Jul 29 22:55:50 2008 -0400 Add new test for associate-on-source in nice transmitter commit c6523b506dbf4864878aa11248e3f0f4c82e8706 Author: Olivier Crête Date: Tue Jul 29 22:29:49 2008 -0400 Add known buffer handler to the nice transmitter commit 8d94b613fd734a34981df3b3c8b092d89d1783f4 Author: Olivier Crête Date: Tue Jul 29 22:21:39 2008 -0400 Add associate-on-source property to the nice transmitter commit 1c718ca425a520655580a0630f5c147ec8ad7814 Author: Olivier Crête Date: Tue Jul 29 22:19:25 2008 -0400 Add break to compat mode getter in nice st commit 17d8fb17221b7c3e93409acb9b2bfa5d5c02055e Author: Olivier Crête Date: Tue Jul 29 22:15:42 2008 -0400 Add per-buffer callback to the nice transmitter commit ad5d1befeb2acba20d45768f976d7a6e575af07d Author: Olivier Crête Date: Tue Jul 29 22:05:51 2008 -0400 Implement stream transmitter stop method in nice transmitter commit 27e61e6281e9d4cb434e6663b733211f8467a6ca Author: Olivier Crête Date: Tue Jul 29 17:32:56 2008 -0400 Remove unload method from the nice transmitter commit fbd8057d784308e9900c54dee5d0024b79a7d5c6 Author: Olivier Crête Date: Mon Jul 28 16:38:27 2008 -0400 Remove useless check commit 5a73d0661ca24cb098960543582809475fdce3e3 Author: Olivier Crête Date: Thu Jul 3 15:39:36 2008 -0400 Implement force_remote_candidate api in nice transmitter using new nice api commit 3e7aa9def4f9a7de1052978af4842cc5535019f6 Author: Olivier Crête Date: Tue Jul 1 16:49:34 2008 -0400 Port nice transmitter test to set api commit f2167cc364391ece37e0c7857352853eb9a1f5a7 Author: Olivier Crête Date: Tue Jul 1 16:29:09 2008 -0400 Port nice transmitter from add to set candidates api commit 70a4b3bb2deffa9c0e7300fdbb0bdc60ddfef7f2 Author: Olivier Crête Date: Tue Jul 1 13:10:44 2008 -0400 Check that the state changes happen in the right direction commit 36de08560d9b000747f6cc5cbf32b5b3ef391ff2 Author: Olivier Crête Date: Mon Jun 30 20:01:04 2008 -0400 Remove the state property from the nice transmitter commit 01be6bdc0a4bf61fe9b1ccfdf0ca1da779784c25 Author: Olivier Crête Date: Fri Jun 27 20:13:25 2008 -0400 Use the state-changed signal instead of the notify::state signal in tests commit 13cf7a8a07fa2117272d7081ac2047513e74f38e Author: Olivier Crête Date: Fri Jun 27 14:59:53 2008 -0400 Emit new component-exposing signal commit 59127d8757764bfb1f4ed5793e420c242d59cb82 Author: Olivier Crête Date: Tue May 6 16:41:56 2008 -0400 Make the libs/cflags be in the right order in the transmitter commit b5fb45a894f471a40a56384be0890aff12d311ed Author: Olivier Crête Date: Fri May 2 14:35:10 2008 -0400 Add fake participant subclass for unit test commit a7c730a8b859b472c5de826e1de0842df781b435 Author: Olivier Crête Date: Fri May 2 14:34:53 2008 -0400 Remove g_warning, it crashes test commit 0cbbaf094df2e47c07c7a766c34e0cc1ff461a9d Author: Olivier Crête Date: Fri May 2 14:26:28 2008 -0400 Lock participant data with participant lock commit dd54f350defd31c8e8f26da15c6d204233a8e1ec Author: Olivier Crête Date: Fri May 2 14:12:39 2008 -0400 use the right agent object commit bb9161a21f475a02e9bf80e4b9474c923a95156d Author: Olivier Crête Date: Fri May 2 14:12:30 2008 -0400 Module is unloadable, strings are not static commit bc227bcdccad93723b7e6d0f93b601de0a9294a0 Author: Olivier Crête Date: Fri May 2 14:06:51 2008 -0400 Remove now unused external agent functions from FsNiceAgent commit 4473d91f863babcf9835cb9886880a34f3610823 Author: Olivier Crête Date: Fri May 2 14:05:50 2008 -0400 Use FsNiceAgent to provide agent in FsNiceTransmitter commit 9ed897a97926517aaa403f36495194df57cbdcae Author: Olivier Crête Date: Fri May 2 14:00:51 2008 -0400 Check if agent making succeeded in fs_nice_agent_new function commit fa512f4769d43129d7d696b127efe7d230088f76 Author: Olivier Crête Date: Fri May 2 13:56:43 2008 -0400 Set preferred local candidates in FsNiceAgent commit ff404d0a48a17049ccd0739c539c2cd7264d474b Author: Olivier Crête Date: Fri May 2 13:53:23 2008 -0400 Set prefs cands on agent on _new commit 2939cbecd270a704468ea7c0f2046c9ab7300566 Author: Olivier Crête Date: Fri May 2 13:52:04 2008 -0400 Add preferred local candidate property to FsNiceAgent and make compat mode readable commit 8bdf90a16e622732647e4c32652d65a3e5b4596f Author: Olivier Crête Date: Fri May 2 13:45:39 2008 -0400 Create nice agent in FsNiceAgent commit a5d644e5e8caef9d2e85cb15335874be45036d8a Author: Olivier Crête Date: Fri May 2 13:41:51 2008 -0400 Set compat mode when creating fsniceagent commit 37e768a6bdde44229db43adc614128d094589b1a Author: Olivier Crête Date: Fri May 2 13:39:48 2008 -0400 Rename FsNiceThread into FsNiceAgent commit 08388cd9bdb8906514cbf09616e55f499a06767e Author: Olivier Crête Date: Fri May 2 13:29:22 2008 -0400 Move the nice thread into a nice agent object commit 46f3efc9e204bdc7ccb9b447c237ffb4580b3bdf Author: Olivier Crête Date: Fri May 2 13:28:47 2008 -0400 Create udpsocket factory in nice-thread class commit cf3983d6bc3207cf01dc3f3df5867b0287f041fd Author: Olivier Crête Date: Fri May 2 13:26:45 2008 -0400 Add compatibility_mode property to the nice thread commit e098237b6b018bdda0b0e33ff1a18dbfc54df037 Author: Olivier Crête Date: Fri May 2 13:23:00 2008 -0400 Revert "Use GInitiallyUnowned for fs-nice-thread" This reverts commit 48e70218512d2021944c30a9143b5ede7a4ba073. commit 39026fc5192c7a586b4a603fca9623622e57ec2c Author: Olivier Crête Date: Thu May 1 22:52:36 2008 -0400 Only set username/password on local candidates commit 10f428951b68df459123e0270257bd1ec1355916 Author: Olivier Crête Date: Thu May 1 22:52:01 2008 -0400 Only try to add base_addr if it is valid commit 5e8f05e9ab3a42cdc4f45c0bcec24a706d492f54 Author: Olivier Crête Date: Thu May 1 22:51:01 2008 -0400 Give login/password on a per-candidate basis commit 3c5ef661c9da6376e812953954d2d7bfcdc39409 Author: Olivier Crête Date: Thu May 1 22:50:28 2008 -0400 Use remote foundation to look for remote candidate commit a0a814931b569437408f41e1fcb8fcfdd7662736 Author: Olivier Crête Date: Thu May 1 19:35:01 2008 -0400 Free NiceCandidate with the right method commit d88e5d7b067223b198ea6f792f6ecbe7fed0494e Author: Olivier Crête Date: Thu May 1 19:34:33 2008 -0400 Ignore more than one call to candidates_added() commit a65ca967b14a7e0d0a3e003c10418330e6f6ccba Author: Olivier Crête Date: Thu May 1 19:34:04 2008 -0400 Free candidate only once commit 30754a667dcbc3a16ec2393a19371156e707ea38 Author: Olivier Crête Date: Thu May 1 19:33:42 2008 -0400 Check that ip is there and accept that possibility of having no base commit fe3abd903dbef32ecb2c2a39bfdfbd5880a79b2d Author: Olivier Crête Date: Thu May 1 19:33:07 2008 -0400 Dupe username and passwords commit 6d9ecb8f01abd3d738afe26b9e1e22445071b17b Author: Olivier Crête Date: Thu May 1 17:40:14 2008 -0400 Use GInitiallyUnowned for fs-nice-thread commit 4d512ad91633cb73ebaef49b715e6bcc9125b218 Author: Olivier Crête Date: Thu May 1 17:21:48 2008 -0400 Use g_object_unref directly instead of having a function wrapping it commit 92ec6f0b86005e5c5001fca5c6db3d89dc1723a7 Author: Olivier Crête Date: Thu May 1 17:21:06 2008 -0400 Keep ref to participant when adding agents to it, only destroy it when all agents are gone commit db801963f8d7dcbd02ed14c750701a5995e8c3e7 Author: Olivier Crête Date: Wed Apr 30 23:01:08 2008 -0400 Fix leaks in nice transmitter commit f389dc54451f89f4da185cf0d488d72f9897e1ab Author: Olivier Crête Date: Wed Apr 30 22:39:26 2008 -0400 Free gotten candidates (adapt to new api) commit d72a4cf94ee7495e79f4d6a3a8560161fb5919ec Author: Olivier Crête Date: Tue Apr 29 20:43:45 2008 -0400 Don't ignore new-candidate commit dc3c7de35fecd4b7d0c3afb295362a150ea83d9e Author: Olivier Crête Date: Tue Apr 29 19:02:50 2008 -0400 Set the initial controlling mode and default to true commit 57139e6ad2ed2e85b2cdbd59551271418140a74a Author: Olivier Crête Date: Tue Apr 29 18:16:48 2008 -0400 Keep ref to main transmitter in nice transmitter commit ab922039e4976e8ab55a8f145a1b9981d773440f Author: Olivier Crête Date: Tue Apr 29 16:44:35 2008 -0400 Put the debug extern into the header file commit 04181c648770e024d16826cdc458f5edd324ca0c Author: Olivier Crête Date: Tue Apr 29 14:11:19 2008 -0400 Pass a pseudo-participant in the unit test commit f8af3785b91ca5acb432634ddab1481638fe7e89 Author: Olivier Crête Date: Tue Apr 29 14:07:39 2008 -0400 Connect to agent signals commit 53f87936e4590d1ff539c17e9889f5427c10dd92 Author: Olivier Crête Date: Tue Apr 29 13:50:30 2008 -0400 Find agent on participant if one exists, otherwise build one commit 4662f7768acec22adf079070d011585da29eb3fb Author: Olivier Crête Date: Mon Apr 28 21:28:42 2008 -0400 Pass the participant to the build function commit 05187bf2d8f46fd8eba29535fb6353af93065b77 Author: Olivier Crête Date: Mon Apr 28 21:24:23 2008 -0400 Move the agent inside the stream transmitter commit 5ad65859d9bfc16105295686ee0fdd607cf60bb0 Author: Olivier Crête Date: Mon Apr 28 21:16:38 2008 -0400 Remove almost everything from the FsNiceTransmitter class commit dc8bd71b9ff3aef3d5e84a740f845c84cd207e09 Author: Olivier Crête Date: Mon Apr 28 20:46:24 2008 -0400 Add FsNiceThread object to be a reference counted thread commit e4c2c2c4db4b184038f9475d9abf56669765fa15 Author: Olivier Crête Date: Mon Apr 28 20:16:34 2008 -0400 Make add_gst_stream take the agent as an argument commit 4ff5e2c61f00b3a307a7cfc72c001dd256f81399 Author: Olivier Crête Date: Sat Apr 26 01:38:07 2008 -0400 Print the state by name in the test commit d60a7bd6ae7d71a292e664f7e756583698c50f41 Author: Olivier Crête Date: Sat Apr 26 01:37:57 2008 -0400 Init nice state to disconnected commit 2263fbf6356e5b782ed1c0fe128aaa033491a387 Author: Olivier Crête Date: Sat Apr 26 01:23:57 2008 -0400 Build pipeline in reaction to change in stream state commit 6943c55afeb48304fae11739726500f9072dfe48 Author: Olivier Crête Date: Sat Apr 26 01:12:17 2008 -0400 Implement the state property in the nice transmitter commit c8c81eee50d93d507a41044889e51c8a807713dd Author: Olivier Crête Date: Sat Apr 26 00:39:09 2008 -0400 Almost working nice test commit 8af8ac35c88701575291ecc6f5ef64bb9d137cc7 Author: Olivier Crête Date: Fri Apr 25 22:33:26 2008 -0400 Compare selected pair to the foundation (not the struct...) commit 78a097cd2c35ede7ec60a42aa088289656e981b8 Author: Olivier Crête Date: Fri Apr 25 21:56:19 2008 -0400 Only set the remote candidates on the matching component commit 68266912fa408d5ecf4091dd2835a49266f167d9 Author: Olivier Crête Date: Fri Apr 25 21:17:02 2008 -0400 Don't use per-candidate passwords, they're currently broken in libnice commit c8da82637bc421a835ae4c62742d67a9cc002b1c Author: Olivier Crête Date: Fri Apr 25 18:50:54 2008 -0400 NULL candidate list when its empty commit e9dfedffc6efa39a88e9e24134fc716955cd7afb Author: Olivier Crête Date: Fri Apr 25 18:45:58 2008 -0400 Don't keep mutex while traversing list commit f6b01221158d2524f056bcdf21129597d2ff873b Author: Olivier Crête Date: Fri Apr 25 18:45:26 2008 -0400 Don't lock printf uselessly commit 20f59dc0a26bb66c4adc75ff6e47f368dc1dc0d2 Author: Olivier Crête Date: Fri Apr 25 18:34:09 2008 -0400 Add debug messages commit 83f4e9c31329be955eda41315726394b65b5e60b Author: Olivier Crête Date: Fri Apr 25 18:33:27 2008 -0400 Test the content of returned candidates commit 1f1b4c5f72cbd1a08067137e834d29d3c491f95b Author: Olivier Crête Date: Fri Apr 25 18:33:15 2008 -0400 Take a copy of candidates before returning commit 3126eba1ab128c81de55566e25b6ecbc648313a6 Author: Olivier Crête Date: Fri Apr 25 18:24:21 2008 -0400 Get the credentials in a safer way commit e6dbaf81526cc8907b95b9ed437c00d805d96a8e Author: Olivier Crête Date: Fri Apr 25 18:20:26 2008 -0400 Use the right test for component counters commit 2e05734725f882a212626e23cc374c301cd80a26 Author: Olivier Crête Date: Fri Apr 25 18:11:49 2008 -0400 Create stream in build step, start gathering in gathering step commit d960d091224fa3de993e7fff2cceb09276d1554f Author: Olivier Crête Date: Fri Apr 25 17:15:30 2008 -0400 Set sync/async properties before potentially going to playing commit 0b318f83cb081778d6b3c6d3d46e43828c8633d0 Author: Olivier Crête Date: Fri Apr 25 17:00:21 2008 -0400 Add some debugging messages commit 40eda4165315dfebdebfb7bdc8aa9e623c7d2338 Author: Olivier Crête Date: Fri Apr 25 16:59:57 2008 -0400 Test for errors creating libnice stream commit b5c61846db1f6cb5a848101afb929172646f8457 Author: Olivier Crête Date: Fri Apr 25 15:44:43 2008 -0400 Ignore new-candidate signals before the candidates-gathering-done arrives commit e5e08e72e27d3592b39bfd0e5150c3830d9101cb Author: Olivier Crête Date: Fri Apr 25 15:29:08 2008 -0400 Use the functions to add stream transmitters commit b07e5fcfec7395e0bfa5081036941cb253fa9605 Author: Olivier Crête Date: Fri Apr 25 15:21:11 2008 -0400 Add functions to create/destroy nice sinks/sources commit b1ab33ec72e08008ba86dd6f3c920c81310e5de4 Author: Olivier Crête Date: Fri Apr 25 15:28:43 2008 -0400 Die if the nice transmitter if requested by libnice aint there commit 63ddcecef11aa2d946990c91ff84241efc344dd6 Author: Olivier Crête Date: Fri Apr 25 13:14:58 2008 -0400 Use all interfaces if not specific inteface is set commit a522858780b62dce880be6205d0d5ef304629b99 Author: Olivier Crête Date: Thu Apr 24 19:03:55 2008 -0400 Only check error value if it is set commit e7943a85fd21c77dd43ff86fd2ec5e1e5ff37067 Author: Olivier Crête Date: Thu Apr 24 19:03:36 2008 -0400 Also check if transmitter is set commit 3c88f50ebb1a25b43425280a9dceb1967e4ac3ff Author: Olivier Crête Date: Thu Apr 24 19:01:45 2008 -0400 Add test for main functionality of nice transmitter commit cb026610eed86b6e4d451be1c9936c0007871733 Author: Olivier Crête Date: Thu Apr 24 19:01:31 2008 -0400 Fix little type where the stream is started first commit ab0da744a08cc54685f5db901bd65ac71520db76 Author: Olivier Crête Date: Thu Apr 24 19:00:42 2008 -0400 Have ignored compatibility-mode property and set it to ID19 as default if none is set commit e3e2e219087706faf290a8a73d4e922e84d068f0 Author: Olivier Crête Date: Thu Apr 24 18:31:08 2008 -0400 Move the transmitter creation test to the generic file commit 383b4e8a3a19a90a3a257420e6c8676ac69ebd3d Author: Olivier Crête Date: Thu Apr 24 18:27:32 2008 -0400 Add test for nice transmitter commit b37b852168594a0b1cae21b51c2e780e678eddc9 Author: Olivier Crête Date: Thu Apr 24 18:11:59 2008 -0400 Make the stream id into a property and the streams into a list commit 79de71120f1f1843b3ff9494fed779f798349076 Author: Olivier Crête Date: Thu Apr 24 18:03:03 2008 -0400 Implement gather candidates commit e05eadb41f70904a7d9ad2749dbaf89e82af2193 Author: Olivier Crête Date: Thu Apr 24 17:38:37 2008 -0400 Implement setting the remote candidates commit c68ce3e1150a0bd929ac5fa470ec1179af54a5aa Author: Olivier Crête Date: Thu Apr 24 17:11:15 2008 -0400 Emit candidates for all components when gathering is done commit ca4038e0fc40ce0e9b939ef43ca851244b911fdb Author: Olivier Crête Date: Thu Apr 24 17:10:45 2008 -0400 Set the username/password from global if there is no local commit e6d0bbff47890703e911ce11e5a2bd6afd6dfc19 Author: Olivier Crête Date: Thu Apr 24 16:45:06 2008 -0400 Print message on state change commit 20848824980b2b06bf97bcc15dbb259a5d453a93 Author: Olivier Crête Date: Thu Apr 24 16:44:36 2008 -0400 Replace g_warnign with GST_WARNING commit 6e1b2772a0d4bacad0638599332a643305c140ac Author: Olivier Crête Date: Thu Apr 24 16:41:44 2008 -0400 Act on gathering-done signal commit d49ed15bff888e2db39e5f5ea61f85eef6c265d8 Author: Olivier Crête Date: Thu Apr 24 16:39:18 2008 -0400 Add mutex to nice stream transmitter commit 7cdf7bd1c42e4ca191473fedfeff38d69c97c165 Author: Olivier Crête Date: Thu Apr 24 16:35:49 2008 -0400 Dispatch gathering done signal commit dae7d50aca64acfefa4d47daf00b366c4702f542 Author: Olivier Crête Date: Thu Apr 24 16:26:05 2008 -0400 Implement fs_nice_stream_transmitter_new_candidate commit 2776509080cb7e29d0115a0f7244c9d71684a6a2 Author: Olivier Crête Date: Thu Apr 24 16:23:55 2008 -0400 implement fs_nice_stream_transmitter_selected_pair commit 4a4cbc5d3950d5c9b7c765232384d784c1bd1ae6 Author: Olivier Crête Date: Thu Apr 24 15:53:39 2008 -0400 Implement select_candidate_pair commit a86f714249315cce202b7fb836a29b791bc0f239 Author: Olivier Crête Date: Thu Apr 24 15:53:56 2008 -0400 Remember if the stream was created and destroy it if it wasnt commit f72ebbe861663c06b3117e192264a86ac08be74a Author: Olivier Crête Date: Thu Apr 24 15:41:29 2008 -0400 Add all empty api functions commit eba09dce7c8035742369df927e8aef1670d40051 Author: Olivier Crête Date: Thu Apr 24 15:35:32 2008 -0400 Remove unused build method commit df68bd7f5d16f1c505d1b1c26dc65c59536972ae Author: Olivier Crête Date: Thu Apr 24 15:32:11 2008 -0400 Add the property getter/setters commit 867173a4241766479a8be67cb553849a64a0223e Author: Olivier Crête Date: Thu Apr 24 15:22:53 2008 -0400 Make the agent into a public member commit 205a2ce145135215e9161a666da112621b124065 Author: Olivier Crête Date: Thu Apr 24 15:21:13 2008 -0400 Add various properties to the stream transmitter commit 250453a2b718eea3943dfb4a0dc1ab98830a1e1c Author: Olivier Crête Date: Thu Apr 24 15:01:51 2008 -0400 Set the stream_id when building a stream commit e15b19218545fca0fb3b0936cc97c3cc04fc07c0 Author: Olivier Crête Date: Thu Apr 24 12:21:46 2008 -0400 Track stream destruction in a thread-safe way commit ae04b334a634181136b6afd3f5c077bb824615fc Author: Olivier Crête Date: Wed Apr 23 16:14:12 2008 -0400 Dispatch the signal to the appropriate stream transmitter commit db26b279ca2a0fa57bd0a1128cfa2ec02d3b974c Author: Olivier Crête Date: Wed Apr 23 15:59:51 2008 -0400 Use macros for locks and unlocks commit 9ae3b66b5b7f205b96ef835deb89327f9b8bd577 Author: Olivier Crête Date: Wed Apr 23 15:56:53 2008 -0400 Keep the streams in a GArray commit c762f609345e5c4f2a68b472970e8e516b19b278 Author: Olivier Crête Date: Tue Apr 22 21:10:19 2008 -0400 Add empty handlers for the main signals commit 3ae4d9ca8ebc33c9a36253fb0578e7c529b53065 Author: Olivier Crête Date: Tue Apr 22 21:02:44 2008 -0400 Create nice agent commit c3e420593a4710d32fff88067ddc7bbbda7a98c7 Author: Olivier Crête Date: Tue Apr 22 20:19:55 2008 -0400 Add mutex to nice transmitter commit 7fca91ecd3401720c71627ea7dfbeb2c8fb8a18f Author: Olivier Crête Date: Tue Apr 22 20:06:14 2008 -0400 Add agent property commit 596f94d1dd76ad819dcf4067b8c3824364675659 Author: Olivier Crête Date: Tue Apr 22 20:03:18 2008 -0400 Verify compat mode and make sure all streams have the same commit 2d375dbe7eb58eb937aef3ee5e02ba2abb23e38d Author: Olivier Crête Date: Tue Apr 22 19:46:04 2008 -0400 Add GMainLoop commit 7c2bd0202827ca72e6a30d60d1134770e88f97b6 Author: Olivier Crête Date: Tue Apr 22 19:42:11 2008 -0400 Make nice transmitter use right right { identation commit 4f9a9ed437a6c82c8a4cd1f3232573674ddb5ff1 Author: Olivier Crête Date: Tue Apr 22 19:40:26 2008 -0400 Add main context commit 68eccbe06665615f3489117c68f7ca22778bfb70 Author: Olivier Crête Date: Tue Apr 22 19:37:30 2008 -0400 Remove useless dispose functions commit ab482fe16751be4dffac0eefb640f341ccf944d0 Author: Olivier Crête Date: Tue Apr 22 19:30:30 2008 -0400 Add getter for the component property commit 5621d06111b30bef8fb3310f5e884b7394861edd Author: Olivier Crête Date: Tue Apr 22 19:23:00 2008 -0400 Rename funnels/tees to non-udp names commit 4752a0f86fa73252754d20393b1f004b674861c7 Author: Olivier Crête Date: Tue Apr 22 19:14:57 2008 -0400 Add empty implementation of the nice transmitter commit 40365c65d64bd0847bfd106279495e1548c4e2af Author: Olivier Crête Date: Tue Apr 22 18:57:28 2008 -0400 Add empty libnice transmitter commit 39882301823879d66261feae9c1ee4721ab19404 Author: Olivier Crête Date: Fri Oct 31 22:25:29 2008 -0400 Fix typo in doc commit ece5033223c9d26a5b622e78e06cb83076959bce Author: Olivier Crête Date: Fri Oct 31 22:24:24 2008 -0400 Add include files to the docs commit 484b9981b82d500acd9a1e0bedafba0802b4bbac Author: Olivier Crête Date: Fri Oct 31 22:13:55 2008 -0400 Make _emit_error functions take const arguments commit c8eef3ca945911896b94285f5c7598fb7fb0ed8b Author: Olivier Crête Date: Fri Oct 31 22:10:04 2008 -0400 Make the cname argument to new_participant const commit 5bb89efbef0eae1c2674dd62c7cc3974071e8d76 Author: Olivier Crête Date: Fri Oct 31 18:47:11 2008 -0400 Add test for fs_codec_list_from_keyfile commit 20f34f46e1de908ae6da5b03b5d8c4628380c8fc Author: Olivier Crête Date: Fri Oct 31 18:30:30 2008 -0400 Fix typo in test commit c0de1656938037e4a0d30e93de6f7251ea4c7db4 Author: Olivier Crête Date: Wed Oct 8 18:04:02 2008 -0400 Import fs_rtp_session_list_transmitters commit b79eb6b930f5138c8c91e76280296a35f691d47f Author: Olivier Crête Date: Wed Oct 8 18:00:05 2008 -0400 Add python bindings for fs_session_list_transmitters commit d1679e8039ef9766ad5915baa999cd4be58ac894 Author: Olivier Crête Date: Wed Oct 8 17:49:46 2008 -0400 Add fs_session_list_transmitters() commit 774d863b92d59eec7131db5d986b5173b075bf34 Author: Olivier Crête Date: Wed Oct 8 14:05:19 2008 -0400 Add API to list transmitters commit 35f805a0904b6bf95305d45896e6f84387cef7e1 Author: Olivier Crête Date: Wed Oct 8 14:00:58 2008 -0400 Add API to list plugins commit 83a16df136be1683edc61d9122050dad415a01f6 Author: Olivier Crête Date: Fri Oct 31 14:12:27 2008 -0400 Add stdlib.h to simple-call for atoi commit 9c94b93af942061abba4083d2450733edb9cd771 Author: Olivier Crête Date: Fri Oct 31 13:34:07 2008 -0400 Remove duplicated test invocation commit 244f6d959c5dec95f31930d70ac1394706eaec6a Author: Olivier Crête Date: Thu Oct 30 16:10:31 2008 -0400 Add proper links to the see_also in the transmitters commit 821d1df216233db4af7350c9e6f2b34344252cc6 Author: Olivier Crête Date: Sat Oct 25 14:00:30 2008 -0700 Replace gint with Py_ssize_t in python bindings where appropriate commit c07ca88f918e53bca0fd93cb8f056845e63870a6 Author: Olivier Crête Date: Tue Oct 28 19:04:13 2008 -0400 Don't use upnp discovery in rtp tests commit d4c75daacc637f939eaad9253c836a973f27d1e3 Author: Olivier Crête Date: Tue Oct 28 18:50:27 2008 -0400 Possibly set the upnp's xml path with env var for tests commit 9b773fe2f9b90974d739381f7b6ac8adc3081bca Author: Olivier Crête Date: Tue Oct 28 18:48:16 2008 -0400 Add upnp xml files to the distcheck commit aac3ceaf0ab1016145836c85a57faa596bca71ed Merge: 8c02231 6174b79 Author: Olivier Crête Date: Tue Oct 28 17:50:48 2008 -0400 Merge branch 'upnp' into upnp-merged commit 8c0223185fac47b0f0830d1f9966233ce8d09dec Author: Olivier Crête Date: Mon Oct 27 17:16:17 2008 -0400 Add gcov libs to gtkdoc scanner libs to make it work both gtk-doc and coverage enabled commit 142462215a92482aabd01f2edcbc6dad1e4d997f Author: Olivier Crête Date: Fri Oct 24 13:11:27 2008 -0700 Add lcov stuff from core gstreamer commit 9cc8f55b3eb79ad1baf5ae56334ce67270336f00 Author: Olivier Crête Date: Mon Oct 27 20:19:15 2008 -0400 Don't clean inspect*.stamp commit 51f50718e2e913ef76e55138688f7eb43ac0b689 Author: Olivier Crête Date: Mon Oct 27 19:39:52 2008 -0400 Don't distribute generated marshaller files commit d02cfcd2d3dea52562fe33c9bffd3febd26d3f7d Author: Olivier Crête Date: Mon Oct 27 17:57:30 2008 -0400 Have fs-rawudp-* use the generic marshaller generator commit a8659d6599ad5654158081e15a0918e0fe5b1fec Author: Olivier Crête Date: Mon Oct 27 17:53:52 2008 -0400 Have fs-rtp-* use the generic marshaller generator commit cd7fdbef7675978622cb5b6d31f7b7a6aeda652c Author: Olivier Crête Date: Mon Oct 27 17:49:07 2008 -0400 Replace multiple copies of marshaller/enums generator with gst version commit cb225613fb9e7f7ac8dd85a98dc90e35598f449c Author: Olivier Crête Date: Mon Oct 27 17:39:43 2008 -0400 Add dep on makefiles ot glib-gen.mak commit e1b8eeed8597c29ea049ed4e4ea50a60039912c2 Author: Olivier Crête Date: Mon Oct 27 17:37:55 2008 -0400 Removed hardcoded header with variable? commit c7b6da0d52b0f8ee8f15a768c34b23e5cb4fd853 Author: Olivier Crête Date: Mon Oct 27 17:36:18 2008 -0400 Rename -enumtypes* files to -enum-types* in glib-gen.mk commit 58b4225bd100dbc0f66775845198235877470e4c Author: Olivier Crête Date: Mon Oct 27 17:35:35 2008 -0400 Import glib-gen.mk from gstreamer commit a7186a23d111aaa328469d5c807bc58928f16274 Author: Olivier Crête Date: Mon Oct 27 17:49:55 2008 -0400 Ignore generated marshaller files commit 150524d89b97e930d904cb20cf345c23321520d9 Author: Olivier Crête Date: Wed Oct 22 23:01:04 2008 -0700 Allow plugin doc to be built in parallel commit 58d3939f10999f1007e5fc00874ce055d99231fb Author: Olivier Crête Date: Wed Oct 22 22:47:14 2008 -0700 Auto-generate rawudp marshallers list commit 047959848ed46cf912bcef45bf09a8d674471c0a Author: Olivier Crête Date: Wed Oct 22 22:43:54 2008 -0700 Auto-generate fsrtpconference marshaller list commit 1405cf339438edbbd9f9d6bfea7bc0246a878c00 Author: Olivier Crête Date: Wed Oct 22 22:37:57 2008 -0700 built fs-marshal.list is in builddir, not srcdir commit 5199f761674288567a2ff01f913bc64bad8d4962 Author: Olivier Crête Date: Wed Oct 22 21:59:49 2008 -0700 Add documentation for codec profiles commit 0b85280b76ca9e02cb8339a6eb796fcdc592e006 Author: Olivier Crête Date: Wed Oct 22 21:39:45 2008 -0700 Remove unused element in temporary struct commit 1850a70301155f01f070585be95ff2c83e43193a Author: Olivier Crête Date: Wed Oct 22 21:33:54 2008 -0700 Put variable declaration down into the block where its used commit 6c41cd48a8f0ca5aa55b7d02d565133846e61204 Author: Olivier Crête Date: Wed Oct 22 21:31:21 2008 -0700 Give function more explicit name about its memory allocation commit 9c1c498f0d0fd2319d3dc0b5691f2c4773cfed79 Author: Olivier Crête Date: Wed Oct 22 21:28:01 2008 -0700 Check if there are src/sink pads in the profiles that match the codec commit fa73244ec37437552be245e1bc7b8a6df3a2acb5 Author: Olivier Crête Date: Wed Oct 22 20:31:48 2008 -0700 Factor out duplicated generated pad linking function commit 6be9da9079ea9c824ce4e584737a8d6384c25c95 Author: Olivier Crête Date: Wed Oct 22 20:15:49 2008 -0700 Put recv-only codecs at the end commit ac02e92686d1ab4412ee19c2ee85d0615817a094 Author: Olivier Crête Date: Wed Oct 22 22:56:29 2008 -0400 Fix identation commit 523570c092d72ff781842463a14a0724442c6666 Author: Olivier Crête Date: Wed Oct 22 22:29:19 2008 -0400 Add tests for recv-only profiles commit 84b8972d28ebfdd1fbdac99ecc1d23847495874b Author: Olivier Crête Date: Wed Oct 22 22:01:07 2008 -0400 Don't require a send profile commit d025b9350177bb93baf6cc23db58276e2c323fc1 Author: Olivier Crête Date: Wed Oct 22 21:59:41 2008 -0400 We need a least one codec thats valid for sending commit 3afe81c3ed5eafc6ef03664d277418ac6ddb976f Author: Olivier Crête Date: Wed Oct 22 16:25:02 2008 -0400 Replace underscores with hyphens in profile property names commit 04a97f7f9fb6b5285fe31d373a1de5dee614f5ce Author: Olivier Crête Date: Tue Oct 21 17:08:24 2008 -0400 Reduce tests loudness a bit commit 2dc7374b7af8007131525ffdd3d885e209d227ce Author: Olivier Crête Date: Tue Oct 21 17:03:12 2008 -0400 Don't mix src and sin kpads in creating the codecbin commit 5ad81abb341cdbd46aa77b0fdd3182fe2c7ad592 Author: Olivier Crête Date: Tue Oct 21 16:57:31 2008 -0400 move extrainit before exchanging the codecs commit 25b2e4c324fc74bbc32a2bc2cfe6fd2d1da63ad9 Author: Olivier Crête Date: Tue Oct 21 16:07:29 2008 -0400 Add tests for the codec profiles commit a721d5d58bbc6b855b387e40d270d0a42c0a741d Author: Olivier Crête Date: Tue Oct 21 15:48:27 2008 -0400 Test codec profiles on codecs that have a blueprint too commit 921b76c12b0dcae8044e24525f5c53d95294d2c4 Author: Olivier Crête Date: Mon Oct 20 18:32:40 2008 -0400 Link extra pads if they exist commit bff18f6bd73843efb37c4cbc947ab0b56148794a Author: Olivier Crête Date: Mon Oct 20 14:26:50 2008 -0400 Cleanup extra capsfilters when changing send codec bin commit 7683edd257040e23dcd51f9acea8609832e1405d Author: Olivier Crête Date: Mon Oct 20 14:13:17 2008 -0400 Free extra send capsfilters on session destruction commit 859ab28fad34b99a0e397f8b5a4675c430e4c745 Author: Olivier Crête Date: Sun Oct 19 19:05:32 2008 -0400 Add test for invalid srcpad case commit 1ec9ac1d5f1deacd3d59bed357d806461c10c006 Author: Olivier Crête Date: Sun Oct 19 19:05:10 2008 -0400 Add bin parser wrapper to bind all pads into the bin commit 34a788d7d9848b388e2b56cf42c97be4f58de6d3 Author: Olivier Crête Date: Sun Oct 19 18:26:17 2008 -0400 Add basic test for codec profiles commit 237b3bc24469b9ecb7c9cbe113bec58fd5cec7bd Author: Olivier Crête Date: Sun Oct 19 17:42:03 2008 -0400 Reject invalid profiles commit 432b2087f7717f6042131d790360ff28d7ffaefa Author: Olivier Crête Date: Sun Oct 19 17:35:06 2008 -0400 Don't look for iterator resync when it can't happen commit f9542ca3534d1643560dc06e0dd66fed77050b13 Author: Olivier Crête Date: Sun Oct 19 17:22:42 2008 -0400 Rename send/recv_profile to farsight_send/recv_profile to make sure they don't clash with real optional parameters commit 67c833aad73bcfd4652cb2e51e3c8255baaf117c Author: Olivier Crête Date: Fri Oct 17 16:36:54 2008 -0400 Validate the pads from the profile against the current codecs before using it commit ed202d297b5886514ba367e2c859cda1b30c50bf Author: Olivier Crête Date: Wed Oct 15 18:55:18 2008 -0400 Accept codecs without blueprints commit dcc00a0a0c2c2caf46a387f24e00df369f84b6e5 Author: Olivier Crête Date: Wed Oct 15 18:54:54 2008 -0400 Refuse profiled codecs that have no blueprint and no details commit bacb9d0fe823f6bd023ca14720cbfa364cf8af89 Author: Olivier Crête Date: Wed Oct 15 18:51:15 2008 -0400 Do not try to find the pipeline factory if there is no blueprint commit be8d346ea7fcce0494de085b6f8b7e1bbff32ec2 Author: Olivier Crête Date: Wed Oct 15 15:52:55 2008 -0400 Create bin from profile instead of blueprint if available commit 008f5def028a32b14ce014c1a69d969f8c51eb8e Author: Olivier Crête Date: Wed Oct 15 15:30:18 2008 -0400 Remove useless temporary variables commit a746c87130e3f3feb00181870fc6fc4f7c3c3d28 Author: Olivier Crête Date: Wed Oct 15 12:06:47 2008 -0400 Get codec profile and save it over the negotiation commit 8fafa85e1ab8ee3f9d17ed5b8c79b3a6aacd2cf7 Author: Olivier Crête Date: Tue Oct 14 17:37:46 2008 -0400 Accept codec prefs with profiles commit 1630cb1eb73d002203e97a0fdacbcb5e3b7a378a Author: Olivier Crête Date: Thu Oct 9 16:02:37 2008 -0400 Hide blueprint inside _create_codec_bin() commit 6d75f4c9d78122d0457560e62fdcfe9ed199478a Author: Olivier Crête Date: Thu Oct 9 15:58:59 2008 -0400 Remove blueprint from fs_rtp_session_add_send_codec_bin() commit 5c75b68d532b531a35f376392befbbfd346be44c Author: Olivier Crête Date: Thu Oct 9 15:52:48 2008 -0400 Have fs_rtp_session_select_send_codec_locked return CodecAssociation* commit e134243bda4e868122508a65a2f202aae34d18d0 Author: Olivier Crête Date: Thu Oct 9 14:43:39 2008 -0400 Hide Blueprint from recv codec creation commit 8fbd25cba07ed383701bdc85386e77076f2d1f3b Author: Olivier Crête Date: Tue Oct 14 18:35:33 2008 -0400 Add more constness to fscodec commit f8aa0435484ae62ba2cec88a33fc537fa06e52d0 Author: Olivier Crête Date: Wed Oct 22 22:15:02 2008 -0700 Add a section for core classes on the rtp plugin in the doc commit 4eabdc938b9002a5db5cba02acb55bb56c0c13a6 Author: Olivier Crête Date: Wed Oct 22 22:06:17 2008 -0700 Sync plugins manuals title with lib manual commit d2f4b6c7b09f79fd2075d3efd4c9247748c30339 Author: Olivier Crête Date: Wed Oct 22 16:17:01 2008 -0400 Disable multicast tests if we don't have a multicast capable interface up commit 94a7867f23e7c8a26a2f12a55126f109f4b06311 Author: Olivier Crête Date: Tue Oct 21 14:37:09 2008 -0400 Fix typo commit 4d5609f50076f3122bc5258662c7114126970e0e Author: Olivier Crête Date: Tue Oct 21 11:54:27 2008 -0400 Hide more private symbols from gtkdoc commit 01e87c45c54640ac6218aba7c65347951a6b761a Author: Olivier Crête Date: Mon Oct 20 20:25:11 2008 -0400 Don't leak request pad for special source commit 716344596ea345e14ff0bb7f485ebb90aa531790 Author: Olivier Crête Date: Mon Oct 20 20:19:07 2008 -0400 Release rtpmuxer request pad commit c27cc69e1f94f5bf79cbb75d557e090fb1b4b2e1 Author: Olivier Crête Date: Mon Oct 20 11:59:33 2008 -0400 Replace ssize_t by Py_ssize_t commit 8c54f6ff6496152c562cf1bc2780b628c5c9027b Author: Olivier Crête Date: Fri Oct 17 15:03:14 2008 -0400 Generate the signal marshaller .list files on the fly Code taken from Gabble commit 8b2cef2d98c390ebd0c0f7076eb76598685f4dff Author: Olivier Crête Date: Wed Oct 15 16:08:54 2008 -0400 Don't leak pads in funnel Thanks to Håvard Graff and Ole Andre for finding this leak commit aba418b83e789c02b17b42ad4494a5ff4f453562 Author: Olivier Crête Date: Wed Oct 15 14:05:51 2008 -0400 Use local stund from libnice for tests if available instead of stunserver.org commit 6174b796edafcd303f3602af586113c7fbc423de Author: Olivier Crête Date: Thu Oct 2 13:30:48 2008 -0400 Remove leftover .pc file commit 44ddceeba6bd61801c51567436d329684fdf19d7 Author: Olivier Crête Date: Tue Sep 30 18:44:52 2008 -0400 Remove upnp stuff from .gitignore commit 252468fb26cf65e74d301d39a93d3bfd1d52656f Author: Olivier Crête Date: Tue Sep 30 18:32:09 2008 -0400 Re-add xml test files commit 001302e5bed7ebb9e68238aed2b5c460268e0256 Author: Olivier Crête Date: Tue Sep 30 18:23:29 2008 -0400 Remove internal copy of gupnp-igd commit 93b8326372d34fa0642be3cfc42a45f4ec6cd048 Author: Olivier Crête Date: Tue Sep 30 18:18:24 2008 -0400 Move to external gupnp-igd library commit 425ffc7e1c5872cf222e6507f5e407726786a55d Author: Olivier Crête Date: Tue Sep 23 14:15:27 2008 -0400 Don't try to do gst-xmlinspect if pygst inst there (will fail with non-tarball..) commit 802134bfd4a1bc95beaf2edefa80a8eb7cdec397 Author: Olivier Crête Date: Tue Sep 23 13:31:05 2008 -0400 Check for plugin doc stuff separately commit a26b7b70d8196c910c5f0faa0566f7384db5e860 Author: Olivier Crête Date: Tue Sep 23 13:31:02 2008 -0400 Require pygst to build module doc commit 0c74330c35916001bc8cace3b7be0e1bb9a9f9a0 Author: Olivier Crête Date: Mon Sep 22 16:09:42 2008 -0400 Replace the private signals on FsRtpStream with callbacks commit 91a9c5ea5cb7ce2787ddfb68e93c2f054f8fe650 Author: Olivier Crête Date: Mon Sep 22 15:36:27 2008 -0400 Improve fsrtpconference documentation commit 11ffc28c7d6967aab68a34aaf810fb611850a6cb Author: Olivier Crête Date: Mon Sep 22 15:20:51 2008 -0400 Documenet fs-rtp-conference a bit commit b319f0940f460ad77c1e0db34c8bf893ff6d42ba Author: Olivier Crête Date: Mon Sep 22 15:18:37 2008 -0400 Make the transmitter names explicit commit f07838bbdefde05bcefe219e72193cdee9eb52d9 Author: Olivier Crête Date: Mon Sep 22 15:15:55 2008 -0400 Rename/add element descriptions in the right style commit 5a7002af7fa9156b3df09afa886c57669594c5f2 Author: Olivier Crête Date: Mon Sep 22 15:11:23 2008 -0400 Create properly-named element docs commit 95052d44e26a1097f05981b9e8cfe3fc5f5fa7ea Author: Olivier Crête Date: Mon Sep 22 13:10:07 2008 -0400 Remove inspect directory if it already exists commit b491bf57bc8453704253d88e6239e08626baf29e Author: Olivier Crête Date: Mon Sep 22 13:00:08 2008 -0400 Reflect the fact that I don't commit the inspect/etc stuff to git commit 19d1a0c44dd1606bb6249ac9419a2cf8d003018c Author: Olivier Crête Date: Mon Sep 22 12:54:53 2008 -0400 Always mkdir inspect/ (just in case) commit a6717e1b87342fb91ed40205b940c36aadebf160 Author: Olivier Crête Date: Mon Sep 22 12:37:12 2008 -0400 Only add the _doc.c file to BUILT_SOURCES if it should be built commit f0245d1a6f2209bdf6a3d0699b7550e432c76b07 Author: Olivier Crête Date: Fri Sep 19 21:53:00 2008 -0400 Add plugin doc files to .gitignore commit d5353997268dd6737e88b31286589d5a8354cc3e Author: Olivier Crête Date: Fri Sep 19 21:43:17 2008 -0400 Clean up the stamp file if srcdir!=builddir commit ff438e5b1118b96267fa246c41d325c063117b7a Author: Olivier Crête Date: Fri Sep 19 20:35:04 2008 -0400 Add forgotten files for plugin doc commit 541e6df0b19deac76ccf68d685aad013c42a5296 Author: Olivier Crête Date: Fri Sep 19 19:15:33 2008 -0400 Format the plugin doc nicely commit a7cedd00f3b4e8337a69c06c001266e8571b864c Author: Olivier Crête Date: Fri Sep 19 19:03:38 2008 -0400 Generate doc for our gst elements include fs plugins commit 6362a78117d159bc8cb066ddaf6b0febf8779495 Author: Olivier Crête Date: Fri Sep 19 19:02:22 2008 -0400 Add transmitter types commit 0cd1e4ce3fcf80c2a2be15d8f0eb4b80e717aabc Author: Olivier Crête Date: Fri Sep 19 19:01:56 2008 -0400 remove gtk-doc style comment for non-gtkdoc comment commit 340cef531c3ce40526cf21427bd18759cc22c898 Author: Olivier Crête Date: Fri Sep 19 17:16:28 2008 -0400 Generate doc for the transmitter plugins commit c21745e3fcacb89e7687879c1fcd0143b10adb6c Author: Olivier Crête Date: Fri Sep 19 17:15:07 2008 -0400 Fix docbook in transmitter docs commit c48d4a1a94bf0f3c2c44166d89c3fc89c1472a58 Author: Olivier Crête Date: Fri Sep 19 14:56:03 2008 -0400 Import a copy of gtkdoc-scangobj commit c383f26e8c5c11a1f7b6628a87a9a40529e6ddc8 Author: Olivier Crête Date: Fri Sep 19 14:52:01 2008 -0400 Add gst plugin documentation scripts imported from the gst cvs commit 371d353c3a5382e3b9a814769d29249dc58f245a Author: Olivier Crête Date: Fri Sep 19 17:15:43 2008 -0400 Don't crash if the error pointer is NULL commit 648d8632a975bca64502698c2cda668f212459fd Author: Olivier Crête Date: Fri Sep 19 13:45:10 2008 -0400 Remove useless GError in fs_transmitter_get_stream_transmitter_type() commit bc312d633a493b9ad57258e3575c2f86cd5d36fd Author: Olivier Crête Date: Tue Sep 16 19:37:41 2008 -0400 Fix leaks in upnp code commit 320bbcfb1ceb6c502015b3aaa65935822ff46aa1 Author: Olivier Crête Date: Tue Sep 16 19:17:27 2008 -0400 Check that the upnp service was called commit 2a219cacdee56a1f89abf7065d56635ffda1da88 Author: Olivier Crête Date: Tue Sep 16 19:09:54 2008 -0400 Add upnp test to the rawudp transmitter commit 5185c6585242be05c52b88aa95c2c14ea5b2314e Author: Olivier Crête Date: Tue Sep 16 18:36:24 2008 -0400 Add upnp .pc file to gitignore commit f5fbc64c4b5f7085430ccfaa1b6167e6d85196a8 Author: Olivier Crête Date: Tue Sep 16 15:29:23 2008 -0400 Oops, operate on right argument commit e9e79337a1884bb7e9f4e44b5e3c5e78f2643fdc Author: Olivier Crête Date: Tue Sep 16 14:48:32 2008 -0400 add xml files for upnp service commit 130148f848e023f2198f540fe26c02ea4639cdee Author: Olivier Crête Date: Tue Sep 16 14:39:49 2008 -0400 Fix error message to make it less unclear commit 56788615990450ba1ba29b05e4898c214bf7467a Author: Olivier Crête Date: Tue Sep 16 14:38:43 2008 -0400 Use idle task trick to stop main loop in other thread commit 843d54f5ce2dae689b6ee1275f8c3ce60bb6d82a Author: Olivier Crête Date: Tue Sep 16 14:37:50 2008 -0400 Don't make the root device available before filling it commit 5d68dbf15d03319dcc40e54e27653044c2908bdd Author: Olivier Crête Date: Tue Sep 16 12:58:11 2008 -0400 Add flag to prevent race conditions commit fdc8dd2584e95adf62e85e951a5bce475e5f6388 Author: Olivier Crête Date: Mon Sep 15 17:19:40 2008 -0400 Leave propreties even when upnp not enabled commit ff4513563e288604deea72dbeb9cf8e6ff3e9eb5 Author: Olivier Crête Date: Mon Sep 15 17:19:27 2008 -0400 Don't build upnp tests if not enabled commit 3ff095c1966c606da62bf520e87022bfb435af22 Author: Olivier Crête Date: Mon Sep 15 14:55:23 2008 -0400 Make fs2-gui executable commit d30c74ff21d005f50638f97f7178d12395cac5ff Author: Olivier Crête Date: Mon Sep 15 13:43:59 2008 -0400 Add uninstalled-paths.sh script commit c75e2637e89e8109ca38b0746ce345a1d384daa5 Author: Olivier Crête Date: Mon Sep 15 12:54:31 2008 -0400 Test all three modes of operation of fspnpsimpleigd commit 44bcfcdb20174a25675e48560d8e4a29db70d917 Author: Olivier Crête Date: Mon Sep 15 12:30:00 2008 -0400 Rename test commit c5958b10cca7e52d146ba74acc523ef205b9b6a4 Author: Olivier Crête Date: Fri Sep 12 19:15:27 2008 -0400 Add more complete test for fssimpleupnpigd commit 1e485a66f8d8c44ac208ab70d9e74f9d6c729491 Author: Olivier Crête Date: Fri Sep 12 18:34:42 2008 -0400 Add base of upnp library test commit 23b4a962a0084f529519167fb2753ed0bf048701 Author: Olivier Crête Date: Fri Sep 12 15:30:55 2008 -0400 Remove outdated codec parameters doc commit f753353cddd7ba6ea2e3b358edb6491042f2abc2 Author: Olivier Crête Date: Fri Sep 12 15:30:34 2008 -0400 Add codingstyle.txt to the tarball commit 23e9cec66b76c4d376be13eb73c960c291553981 Author: Olivier Crête Date: Fri Sep 12 15:28:45 2008 -0400 Add nego-use-cases to the tree commit 503f9bef754ae23fddfe45ef2a41bf4d756f7919 Author: Olivier Crête Date: Fri Sep 12 14:37:40 2008 -0400 Disable upnp in normal tests commit ac05fac4b2a93f9fac2c915433ab63d929c11802 Author: Olivier Crête Date: Fri Sep 12 14:29:30 2008 -0400 Set priority on our idle callbacks to default (just in case) commit 4ad0dfb70f1cb5d526aefa8fda65304bef2b0f7c Author: Olivier Crête Date: Thu Sep 11 15:31:38 2008 -0400 Don't hold a real ref to the object in the idle struct, otherwise it risks becoming the last ref to the object commit 9bfd7da40322c9b430c29a3cdb98bf92ed215f7e Author: Olivier Crête Date: Thu Sep 11 14:53:37 2008 -0400 Add forgotten ifdefs commit db3f008d6732bea9acdb877d2561a41e55899466 Author: Olivier Crête Date: Thu Sep 11 14:33:49 2008 -0400 Add discovery timeout to the upnp stuff commit 2e8a56f8a5b5feed3c0b1d10c819b72683856d4c Author: Olivier Crête Date: Wed Sep 10 19:15:15 2008 -0400 Emit upnp candidate if one is found commit b0a59097a5dd270e6ffee3683ec97add57560f53 Author: Olivier Crête Date: Wed Sep 10 19:03:56 2008 -0400 Remove unused variable commit a6f0ae09925a55bf444b1444f611c1891e18a091 Author: Olivier Crête Date: Wed Sep 10 18:47:30 2008 -0400 Remove old line in doc commit b94c9f667a91f72436dd718bfd5fa59d100c8017 Author: Olivier Crête Date: Wed Sep 10 17:16:25 2008 -0400 Add port mapping to rawudp transmitter commit de97188c6067dffc753cf38448e886f58f698b5d Author: Olivier Crête Date: Wed Sep 10 16:07:58 2008 -0400 Pass upnp parameter to the components commit 795759617ad8807d2b44c92ff34beb555e86ec9b Author: Olivier Crête Date: Wed Sep 10 15:22:05 2008 -0400 Pass the igd object to each component commit 45f0cf94360616c7e1e1c7c0b9cde8722c40ff50 Author: Olivier Crête Date: Wed Sep 10 15:11:23 2008 -0400 Propage the upnp properties to each rawudp component commit a3e7f7e55ec644ac0ed1eb10edb27afa618223d6 Author: Olivier Crête Date: Wed Sep 10 15:07:32 2008 -0400 Conditionally compile the rawudp transmitter against our upnp lib commit fecf87a04f6d88750f6c03da679a8d880dc9c9fc Author: Olivier Crête Date: Tue Sep 9 17:23:26 2008 -0400 Set default timeouts at object creation time commit a4f5129c98989a708102c121ed352976acf1e3b0 Author: Olivier Crête Date: Tue Sep 9 17:14:14 2008 -0400 Build upnp object if needed commit 19aca7ab71e9769ac484c0fc50df1d3579fda7cb Author: Olivier Crête Date: Tue Sep 9 17:12:45 2008 -0400 Include the proper path commit 1fe7e2f202785afe6acc0fe77913d730b5ff422d Author: Olivier Crête Date: Tue Sep 9 16:55:22 2008 -0400 Add upnp properties to the rawudp transmitter commit 9eae8ef1aedafdc70fa5c81f1e43cccff6840484 Author: Olivier Crête Date: Tue Sep 9 15:23:50 2008 -0400 Emit error if port is requested post-external port failure commit 3d4c949f70fce05e68e602de5df2ef525aecf9c1 Author: Olivier Crête Date: Tue Sep 9 15:17:53 2008 -0400 Remove new-external-ip signal commit 5e65e3952f4d2b13a2c7b91a51d52d2bf1c81a76 Author: Olivier Crête Date: Tue Sep 9 15:16:44 2008 -0400 Remove error signal from upnp test commit c3c659ace05227d777999748ab2777024db79e9c Author: Olivier Crête Date: Tue Sep 9 15:15:29 2008 -0400 Compile tests for upnp stuff commit aaf2fc5d7dfee499b1fca78b630ad74cfcba0f87 Author: Olivier Crête Date: Tue Sep 9 14:56:17 2008 -0400 Remove old error signal commit 3a89edd2edfc9e82b8117f9bf7ff07331f9b5b51 Author: Olivier Crête Date: Tue Sep 9 14:55:56 2008 -0400 Emit GError in new domain on errors commit 22913bcf07ac96c1e2dc9a2c145f8bad8fbb9594 Author: Olivier Crête Date: Tue Sep 9 14:44:39 2008 -0400 Add error domain for simple igd commit f31ae705adf8068f090616d123d3691fd3831515 Author: Olivier Crête Date: Mon Sep 8 19:36:26 2008 -0400 Separate wanting and having gupnp commit dec8d0f68e8cab996e3544ee0a9c38c363cea387 Author: Olivier Crête Date: Mon Sep 8 18:05:08 2008 -0400 Add .pc file for the upnp lib commit 91d78441c361fb1694aa88af28914fb7e196ff23 Author: Olivier Crête Date: Mon Sep 8 17:44:02 2008 -0400 Remove the useless simple commit 1532dd90362c602a1c8b4ffa67340d8d6e471ef0 Author: Olivier Crête Date: Mon Sep 8 17:31:08 2008 -0400 Add configure/makefiles to gupnp lib commit 50520d258124d94091ba5ff49760fdd083bca354 Author: Olivier Crête Date: Mon Sep 8 16:41:47 2008 -0400 Fix error string for python config check commit e4505074b33d06b6f3342277b79dc27afbec4c6c Merge: efa832b ff2fd6f Author: Olivier Crête Date: Mon Sep 8 15:19:51 2008 -0400 Merge branch 'ready-to-merge' of ../gupnp into upnp commit ff2fd6f39c8662238d114726d49ed4cf40e559fc Author: Olivier Crête Date: Mon Sep 8 15:02:07 2008 -0400 Move upnp stuff in fs2 places commit 0c4e829093e4d5f36096228b4818899b0c059466 Author: Olivier Crête Date: Mon Sep 8 14:32:51 2008 -0400 emit signal when the mapped address changes commit 612824d43562573ae998f9963af603e8f3257c76 Author: Olivier Crête Date: Mon Sep 8 14:16:14 2008 -0400 Get notification when the ip address changes commit 0caf7af0e50c7398ffe65f6d7ea867120eead27f Author: Olivier Crête Date: Fri Sep 5 15:34:37 2008 -0400 Make non-threaded test use custom mainsource commit a0d498e3b4b8c27b55191eeac6c21fdc232a6df8 Author: Olivier Crête Date: Fri Sep 5 13:52:20 2008 -0400 Don't unset the main context.. commit 07b3203907832b6181c317360b04bc3437fb03d1 Author: Olivier Crête Date: Fri Sep 5 13:46:18 2008 -0400 Remove unused function commit 9569b1b0bec8ead6f4964c8afeb67aacf3fdc38b Author: Olivier Crête Date: Fri Sep 5 12:00:59 2008 -0400 Loop on length, not pointer commit b4ef73523681304da7c7d8b1a7d7330c850a3fd8 Author: Olivier Crête Date: Thu Sep 4 21:40:06 2008 -0400 Force wakeup of the main context commit 3c2353cf6b15e2f42289872753ea559108dbed6c Author: Olivier Crête Date: Thu Sep 4 21:29:41 2008 -0400 Add thread test commit 834683a1c4bb1e9242985c3853073a6fef811f5f Author: Olivier Crête Date: Thu Sep 4 21:29:29 2008 -0400 Fix thread object creation commit 4ebab786b67bedc642103394045b84b3443e4bf4 Author: Olivier Crête Date: Thu Sep 4 21:22:25 2008 -0400 Big oops in test commit d1b588b3915cf8c3cce2136ac0bf7ae9ef6f35e0 Author: Olivier Crête Date: Thu Sep 4 21:16:21 2008 -0400 Add caller for remove-port function commit 8aa562ced28aa7a909eeb10d0376b856cf0c5479 Author: Olivier Crête Date: Thu Sep 4 21:15:18 2008 -0400 Share the same data struct for remove commit 329650f60ee84f1d4f20801cf575b1627bbff202 Author: Olivier Crête Date: Thu Sep 4 21:14:10 2008 -0400 Make add_port use the thread commit cde65fde6cea2d79e51648f2a8028145f54e18e9 Author: Olivier Crête Date: Thu Sep 4 21:05:36 2008 -0400 Add empty subclasses commit 2b585645eff861492980a5c7fdaf6ee53e778dd4 Author: Olivier Crête Date: Thu Sep 4 20:44:57 2008 -0400 Add thread commit 0e32af15ba0d21a4b5412c84fbe84c4e3c6384c9 Author: Olivier Crête Date: Thu Sep 4 20:32:47 2008 -0400 Add mutex, context and loop commit 04708c30d2dfc9c80cea3ccd3b5c4e6fcdf1c72f Author: Olivier Crête Date: Thu Sep 4 19:37:34 2008 -0400 Make the other methods virtual too commit d5bd7bec2c4ab328beb4269c6cba601007f3991b Author: Olivier Crête Date: Thu Sep 4 19:30:20 2008 -0400 Add bare threading container commit 415967fbddb4b0fb07269e2c47eb7a7e16e1e858 Author: Olivier Crête Date: Thu Sep 4 19:30:01 2008 -0400 Don't delete marshaller list on clean commit 0f53b44b313d1f61d6f4b8aacefcbba5788bddd3 Author: Olivier Crête Date: Thu Sep 4 19:12:27 2008 -0400 Remove unimplemented function commit b98b6faf1ac067c964c45834178a0a722bea55e9 Author: Olivier Crête Date: Thu Sep 4 18:51:01 2008 -0400 Replace build with constructed to make a nicely subclassable gobject commit dd4192ab66e1254bfcb00acf661d6cbd7c3aa67d Author: Olivier Crête Date: Thu Sep 4 18:47:40 2008 -0400 Make main context a construct-time property commit f004b925a4643e0efe618d53b7d392277adc36a9 Author: Olivier Crête Date: Thu Sep 4 18:42:23 2008 -0400 Put everything into build commit 15300fe3f01aa2625c982a363625068d97892fb5 Author: Olivier Crête Date: Thu Sep 4 18:11:09 2008 -0400 Fix warning commit c1649d25df990cd96473aeb12fdd239224204fbb Author: Olivier Crête Date: Thu Sep 4 18:10:46 2008 -0400 Add marshaller list commit 70aafea323a30cfa8f8277651af897c9c69bae3b Author: Olivier Crête Date: Thu Sep 4 18:10:12 2008 -0400 Remove bare test commit a2e56e78896502f23442cfd9dc7962a8e192eb87 Author: Olivier Crête Date: Thu Sep 4 18:04:27 2008 -0400 Add new error signal commit da1c3a941b3e9c463b167b85cbd1616d05655b8a Author: Olivier Crête Date: Thu Sep 4 17:25:39 2008 -0400 Renew the mapping at the appropriate interval commit 58ad8d1b5b9bc219f076b4def66df475f136fa28 Author: Olivier Crête Date: Thu Sep 4 16:52:19 2008 -0400 Add call to remove mapping commit aee71c79d115ee110027b21dacd2579d8812b926 Author: Olivier Crête Date: Thu Sep 4 16:06:26 2008 -0400 Add test for port mapping commit 9427a3d9fd7141f2187318d20cec545e46582a56 Author: Olivier Crête Date: Thu Sep 4 16:06:15 2008 -0400 This signal is detailed commit 20623e82ef04e6bdeb035779760e9a0b21ea1785 Author: Olivier Crête Date: Thu Sep 4 15:14:48 2008 -0400 The proxy structs are not kept by gupnp commit ee1fa5bb060d736683d49bc047152d8cf36d1114 Author: Olivier Crête Date: Wed Sep 3 20:24:56 2008 -0400 Emit signal on mapping success commit dd06555e4090cf38073bf9d870dbe76bca8c8fe0 Author: Olivier Crête Date: Wed Sep 3 19:21:25 2008 -0400 Cleanup mappings commit a96779e980b5ec8e82b04f36a2588f0615dbcb73 Author: Olivier Crête Date: Wed Sep 3 19:17:07 2008 -0400 Stop mapping calls on remove commit 02b736c0e31d9ffeaf04fb9fadd1b9d4715c34ee Author: Olivier Crête Date: Wed Sep 3 18:06:00 2008 -0400 Centralise proxymapping stopping commit a98b50b8a73bd9a75158382537e97f2d53deb30e Author: Olivier Crête Date: Wed Sep 3 17:59:49 2008 -0400 Rename cleanup functions to free commit bfd7e3a62c685dd630c131eefe8af045931315d5 Author: Olivier Crête Date: Wed Sep 3 17:23:09 2008 -0400 Add new mappings when a new service proxy appears commit 168f4969ae29f5f1259a5b23cde22ee54ba839e0 Author: Olivier Crête Date: Wed Sep 3 17:07:42 2008 -0400 Remove timeout on GetExternalIP It was always shorter than the Port mapping timeout in any case commit 2a1f71fedf9a129244c3a4494189c31bcbc50e89 Author: Olivier Crête Date: Wed Sep 3 17:06:22 2008 -0400 Add request to create proxy mappings commit 6cdf0e24a9a8c1d42fcbb539ccc9ee32ad6e3655 Author: Olivier Crête Date: Wed Sep 3 16:42:19 2008 -0400 Remove generic action system commit 877a9a4b6bfb0082bdac8d7bac0304c9e16c3d2c Author: Olivier Crête Date: Wed Sep 3 15:40:58 2008 -0400 remove timeouts on answer commit 40b33bb8696cafb4568531b55d52e65a189f4bcb Author: Olivier Crête Date: Wed Sep 3 15:39:08 2008 -0400 Remove gather call commit feafc7358e71ae146f77c247e788a3ea8cfc06a1 Author: Olivier Crête Date: Wed Sep 3 15:15:21 2008 -0400 Save external ip when its received commit 477a656f86e3cbf7f49f2fed8f52fc2ac0043664 Author: Olivier Crête Date: Wed Sep 3 14:59:17 2008 -0400 Add function to remove a mapping commit 86527b6aa743cf5dd04a82cf672d5cb2bef08bde Author: Olivier Crête Date: Wed Sep 3 14:47:24 2008 -0400 Save new mapping when adding one commit 65e6a52636a7f9f088eed9e036b20706e656c16f Author: Olivier Crête Date: Wed Sep 3 14:29:01 2008 -0400 Add list of current mappings commit e69e6600222a22ab5a5bcde1c14edde66be1abeb Author: Olivier Crête Date: Tue Sep 2 14:22:58 2008 -0400 Add action timeout commit a93e7bb3f2cfc4ae0e1cd40062aa0e00db3b4d01 Author: Olivier Crête Date: Tue Sep 2 14:16:27 2008 -0400 Replace GArray for proxies/services with GPtrArrays commit 2e655098a739944396ad836e6162a2562356a5aa Author: Olivier Crête Date: Fri Aug 29 19:43:27 2008 -0400 Pass the Proxy structure to the gather stuff commit cbbc6fe11a0987295860a7a4d4f9b791dd217211 Author: Olivier Crête Date: Fri Aug 29 19:38:29 2008 -0400 Store proxies in structures to be able to remember actions commit c886a9283bc11c3209894b9559a50e891fa9131a Author: Olivier Crête Date: Fri Aug 29 18:50:40 2008 -0400 Ignore errors when building gupnp context commit 0bb40bc4bab1a396166d470eeda751b195fdda66 Author: Olivier Crête Date: Fri Aug 29 18:26:55 2008 -0400 Add object test commit 6f6088f681fe31d228b488fe6096a54e4ce356f2 Author: Olivier Crête Date: Fri Aug 29 18:25:02 2008 -0400 Use remove-fast commit 0b05d2a6fb4afc72d081af04ba6e767633d9a9b8 Author: Olivier Crête Date: Fri Aug 29 18:24:45 2008 -0400 Use GPtrArray correctly commit 1a24b841c847cb6f6ba23e9749954b9ed9b43a2f Author: Olivier Crête Date: Fri Aug 29 18:22:33 2008 -0400 Default to the default context commit 9b15edbdbc86d2b657e20d2b0ffb0fffb6230b8b Author: Olivier Crête Date: Fri Aug 29 18:22:26 2008 -0400 Add make clean and -g commit 3285d4adfa2a928a9cee3075884430b48a49ac19 Author: Olivier Crête Date: Fri Aug 29 18:20:30 2008 -0400 use uint, not int commit db7ae34c5fee3fd9b851d605cedf94615d3a0515 Author: Olivier Crête Date: Fri Aug 29 18:18:44 2008 -0400 fix error commit 066e0c897216636ae8e5df9dc9f375d20ecb0198 Author: Olivier Crête Date: Fri Aug 29 18:18:39 2008 -0400 add private commit 305fad6a6a676bb86afe0061c621c0621dee0eaa Author: Olivier Crête Date: Fri Aug 29 18:12:59 2008 -0400 Rename test to test-bare commit a061d6cbcd507477a9bb92014e34d17fd980cd43 Author: Olivier Crête Date: Fri Aug 29 18:11:51 2008 -0400 Emit signal or error on action completeness commit 92096841b2cb0c0a266cf1cfdd0ec289481143ef Author: Olivier Crête Date: Fri Aug 29 18:09:31 2008 -0400 Add signals commit 1dde874dce7b397a7290941d4b9d869294f57ccb Author: Olivier Crête Date: Fri Aug 29 18:04:15 2008 -0400 Add gathering commit 4cd5501786ffbca814ef0d0ff8807962d266d1ee Author: Olivier Crête Date: Fri Aug 29 17:31:24 2008 -0400 Remove threading stuff for now commit e9a8e943b00b298156a9b7d73d98659b1c1ba098 Author: Olivier Crête Date: Fri Aug 29 15:29:56 2008 -0400 Save, forget proxies on signals commit c515107e096d04ca73a32350332f969af367d014 Author: Olivier Crête Date: Fri Aug 29 15:28:46 2008 -0400 Disconnect signal handlers on dispose commit 5fea45ae8799d8937f7a41d15c1840a4f22ca268 Author: Olivier Crête Date: Fri Aug 29 15:19:58 2008 -0400 Create core gunpnp objects commit 1f7ac3d36f5f28f82b5d3de7aae7a42e2e42bbcd Author: Olivier Crête Date: Fri Aug 29 15:11:41 2008 -0400 Rename context to main context commit 483f67d4ac032afc6bae85ecef7e11f24e5b1632 Author: Olivier Crête Date: Fri Aug 29 15:08:28 2008 -0400 Add list of service proxies commit 3eef820e9e972760c4ed445b2ee428f1b66b915f Author: Olivier Crête Date: Fri Aug 29 14:33:17 2008 -0400 Add request-timeout property commit 423caf13c105b3e3053a7661c30627521062c68c Author: Olivier Crête Date: Thu Aug 28 20:48:13 2008 -0400 Add main context construction/destruction aparatus commit 9030e23e04e718dbf39d8ac8242b1c73262186ef Author: Olivier Crête Date: Thu Aug 28 20:22:01 2008 -0400 Add maincontext member commit 386f13c83141062ea26965e2535da764fd09463b Author: Olivier Crête Date: Thu Aug 28 19:33:39 2008 -0400 Initial import of gupnp igd experiment commit efa832be0a40878ed3ebb25840ec7c1c11342422 Author: Olivier Crête Date: Wed Aug 27 14:25:24 2008 -0400 Test for auto-multicast everywhere commit 7b5fe8b40e91609460068c370ef53143497cc2b4 Author: Olivier Crête Date: Wed Aug 27 14:05:36 2008 -0400 Default to pcma/pcmu (we know these work) commit 4daa86528eb88cc7a952185574a0ff809cde7612 Author: Olivier Crête Date: Wed Aug 27 14:05:27 2008 -0400 Set the sink to playing while adding it commit 31d344d2f2ebe148cfaf52208889b8caca5a0bb5 Author: Olivier Crête Date: Wed Aug 27 14:00:43 2008 -0400 Add copyright header and warning notice commit 1604f6f0c1c1fde36697050495036855c6b02fdb Author: Olivier Crête Date: Wed Aug 27 13:58:51 2008 -0400 Print more messages commit cb4665802aeddb7ad99ffafc2b8b5aa0229750a7 Author: Olivier Crête Date: Wed Aug 27 13:06:39 2008 -0400 Fix leak in simple call commit 1c40b25a8d45bc5dbbbf8bc43650935afda8bac1 Author: Olivier Crête Date: Wed Aug 27 13:03:46 2008 -0400 Use a simple fs1-like use-the-local-candidates as remote and pass the candidate on the command line commit e30c8d4bf2e063b21fc5f191317fab784049f50f Author: Olivier Crête Date: Wed Aug 27 12:38:13 2008 -0400 Handle errors commit 46ac8538a870ee758728768c8d02b65168dd771c Author: Olivier Crête Date: Wed Aug 27 12:25:03 2008 -0400 Make simple-call usage clearer commit 5c4f8806f977098a02ac96e3fce37637498866c5 Author: Olivier Crête Date: Tue Aug 26 18:52:16 2008 -0400 Make src local commit c17779aef3ea42a3a5d5833e689e318dd9a73235 Author: Olivier Crête Date: Tue Aug 26 18:51:21 2008 -0400 Add src-pad-added callback to the simple call commit d37c2072a6b6f3945b69ad06f1faf4fd05fe7f58 Author: Olivier Crête Date: Tue Aug 26 18:41:04 2008 -0400 Add audio session to command line test commit a8aa2adc84e25ac6ad1dc9367231bb0804448858 Author: Olivier Crête Date: Tue Aug 26 18:25:18 2008 -0400 Add beginning of simple command-line call app commit 02bfe7cc5771e34e1c5cda91ca7d21edfe9f8e1a Author: Olivier Crête Date: Mon Aug 25 16:33:57 2008 -0400 Bump version 0.0.3.1 commit 5fda6e799789e2cf7f6fd8dd6550d8b1dab8dfe5 Author: Olivier Crête Date: Mon Aug 25 17:06:00 2008 -0400 Version 0.0.3 commit c697423323f087c5803f7c96fe6ecea78a0f79d3 Merge: 10a0c5c 5112498 Author: Olivier Crête Date: Mon Aug 25 16:37:37 2008 -0400 Merge branch 'master' of git+ssh://git.collabora.co.uk/git/user/tester/farsight2 commit 10a0c5c2c282239f6e9fc54244e2b26b05824e05 Author: Olivier Crête Date: Mon Aug 25 16:25:20 2008 -0400 Apply the auto-multicast property only if it exists commit 51124987c4909a74a7eec024f36b6cd8f76a289b Author: Olivier Crête Date: Sat Aug 23 00:25:10 2008 -0400 Theora and H.264 works fine now, remote h263 recommenation from readem commit 99b6b6b1e4eb53be06dbb3433c6248666332ccbd Author: Olivier Crête Date: Sat Aug 23 00:13:15 2008 -0400 Fix comment commit 4a33773f2e582aa4bd104148dc3a1d96f0185a2e Author: Olivier Crête Date: Fri Aug 22 16:20:16 2008 -0400 Fix typo commit 8c420bbaf81989d75134692627c436b3bcd98b26 Author: Olivier Crête Date: Fri Aug 22 14:19:00 2008 -0400 Don't hardcode address of stunserver.org, resolve it commit b5da0e1b90a894b69160cb01d99d29ef70d7b9b8 Author: Olivier Crête Date: Fri Aug 22 12:22:18 2008 -0400 Fix documentation comment commit cc1c1a14fa56b53c6f3563d52e4aa03c3a9b6268 Author: Olivier Crête Date: Fri Aug 22 12:15:27 2008 -0400 Remove unused GError in codec cache commit b2defec1ed01e1093e942db2dfce8a5020ef5c89 Author: Olivier Crête Date: Thu Aug 21 18:25:56 2008 -0400 Update pythons defs commit 76c2efa3f28836f4ae0bbe7c22a5465d49861a59 Author: Olivier Crête Date: Thu Aug 21 18:34:29 2008 -0400 Remove fs_codec_to_gst_caps from the public api commit a02d563db1c67b64f7e8d3072efd141e54ea0917 Author: Olivier Crête Date: Thu Aug 21 18:25:27 2008 -0400 Check for h2def in other places too commit 19382497eb835187b44430fdd89330ed14e9605f Author: Olivier Crête Date: Thu Aug 21 18:16:27 2008 -0400 Remove FS_MEDIA_TYPE_APPLICATION commit 0388381071610b0e4fbfb06b5ff8361b93fe21d5 Author: Olivier Crête Date: Thu Aug 21 18:11:33 2008 -0400 Don't make special sources return GErrors, their errors are internal and will be reported by GST_ERROR commit f82cddabca49f7b326bf0fd048da901d0fcc5ec3 Author: Olivier Crête Date: Thu Aug 21 17:05:04 2008 -0400 Add more comments commit c4737a410968d468ec0d7a2f19834c6cbc7eb0dd Author: Olivier Crête Date: Thu Aug 21 17:04:36 2008 -0400 Use FS_ERROR_NO_CODECS_LEFT where appropriate commit 986b6fd1f0d6786f71ea333bbc13777576ab3857 Author: Olivier Crête Date: Thu Aug 21 17:03:54 2008 -0400 Add FS_ERROR_IS_FATAL macro commit 9e211fe0e0d2f0c35c6e5510ebe8e6307851d679 Author: Olivier Crête Date: Thu Aug 21 17:03:35 2008 -0400 Document FsError codecs more commit 154d0ee1930e221de48993ed48b257eac9335d0c Author: Olivier Crête Date: Thu Aug 21 15:24:06 2008 -0400 Use a more appropriate error no commit f0e2b1f80d50bbf4bf98ebd0c85f4fe9e815af4d Author: Olivier Crête Date: Thu Aug 21 14:55:46 2008 -0400 Have property getter/setter for FsTransmitter print a warning if they're not subclassed commit cd512b45b842154c6652bb2709f4b7ebb17bcda9 Author: Olivier Crête Date: Thu Aug 21 14:54:26 2008 -0400 Have property getter/setter for FsTransmitter print a warning if they're not subclassed commit 8e47bb67be73e522f52173db0ab1f4226dc0c764 Author: Olivier Crête Date: Thu Aug 21 14:53:31 2008 -0400 Use g_return_val_if_fail to check if the argument and if the compulsory methods have been subclassed commit 13cbcabd7e395054311035a8861a1d1243a8736d Author: Olivier Crête Date: Thu Aug 21 14:51:02 2008 -0400 Have property getter/setter in FsStream base class return an error if the properties are not subclassed commit 3a8237c362591d672b8dc89f0caaade0f05430b7 Author: Olivier Crête Date: Thu Aug 21 14:47:33 2008 -0400 Consistently name fs-funnel fs_ and without gst stuff commit 12fc2a3b4331935e85f38f2e67192a6f0bf05bdc Author: Jani Monoses Date: Thu Aug 21 00:05:34 2008 +0300 use GST_ELEMENT_DETAILS commit 39483cb48e0ca2b539cf2c3a3913f4ce1b18d150 Author: Jani Monoses Date: Wed Aug 20 23:15:20 2008 +0300 cleanup unused var commit 12f97af00f502a324bd5b8bfc3b4567ff40b72a2 Author: Jani Monoses Date: Wed Aug 20 23:57:52 2008 +0300 move class pad_template and details initialization from _class_init to _base_init as done in the other plugins and recommended in the Gstreamer docs commit e6daab3ab4cd0a174dd0a16d259fb5d93150cd05 Author: Jani Monoses Date: Wed Aug 20 23:55:13 2008 +0300 use gst_element_class_set_details instead of gst_element_class_set_details_simple commit 79c309e4acca9709aac4bd890bc08e4632340542 Author: Jani Monoses Date: Wed Aug 20 23:37:19 2008 +0300 use inline function instead of macro for _do_init to be consistent with the other plugins commit 16a499c6f6ebd81fc9fe9bc9c65390461fadfa6e Author: Olivier Crête Date: Thu Aug 21 14:40:35 2008 -0400 Remove useless property getter/setter from FsBaseConference commit de90a066f3f729a4014ba29f5458fa63cc8cc0d5 Author: Olivier Crête Date: Thu Aug 21 14:38:49 2008 -0400 Test for compulsory methods with g_return_val_if_fail commit 8c5c361ec1a718db5fa72b6678a14d5ee03d0913 Author: Olivier Crête Date: Thu Aug 21 14:35:53 2008 -0400 Check for NULLs with g_return_val_if_fail in fs-plugin commit d9355a16e5ddbde8208073824cec5120e4acc4ae Author: Olivier Crête Date: Thu Aug 21 14:32:01 2008 -0400 Remove trailing whitespace commit 2fb0beb32080644cb7dee342d97f93ef5ec2b3c2 Author: Olivier Crête Date: Thu Aug 21 14:31:24 2008 -0400 Check for NULL parameters too commit 73bdcc3e8a8b2cfdea43082c098507b6b98f4ba3 Author: Olivier Crête Date: Thu Aug 21 14:27:19 2008 -0400 Use g_return_val_if_fail instead of gerror if a compulsory method is not implemented in conference commit 209743558182186cbf844254b1609ce148940090 Author: Olivier Crête Date: Thu Aug 21 14:25:16 2008 -0400 Don't delete member that can be reused later commit 5145a46d88a1142605559a1c80190d55ee713e77 Author: Olivier Crête Date: Tue Aug 19 18:08:47 2008 -0400 Correctly disable SPEEX commit 2564017097c5872956bc55f3cf4bacaf2a7c8e91 Author: Olivier Crête Date: Tue Aug 12 12:19:29 2008 -0400 Disable SPEEX by default (the current gst encoder is broken) commit 5fc224d2dce340ae35723c90b81b96b3d2ee1394 Author: Olivier Crête Date: Sat Aug 9 02:13:16 2008 -0400 Add time ovrelay to videotestsrc commit 493c455d43e4cbc890ac921118d6b4f69f61e8d0 Author: Olivier Crête Date: Sat Aug 9 02:03:21 2008 -0400 Make videoanyrate fixate caps correctly commit d87e39a4e1e3f91fdedb7102d146186fa3117214 Author: Olivier Crête Date: Fri Aug 8 17:56:12 2008 -0400 Respect audio/video disabling in more places commit f866563df8f1b1fe544533b7741c8f9a60c1b3d2 Author: Olivier Crête Date: Thu Aug 7 21:09:56 2008 -0400 Have the server pass around the stream codecs to everyone commit 902786ae96685004fd271f2c07f230c585ccb0c0 Author: Olivier Crête Date: Thu Aug 7 20:11:12 2008 -0400 Send None data if there is no data commit 96b0bc47c6a60f278843e97ff339ecae73310546 Author: Olivier Crête Date: Thu Aug 7 18:36:43 2008 -0400 Implement proper codec distribution in fs2-gui commit 2dbdebfff77556066653154be2e70d7acc7e8f50 Author: Olivier Crête Date: Thu Aug 7 18:11:27 2008 -0400 Send out codecs from all participants to new participants (in fs2-gui-net) commit 685161de3de8161c1d6c02d79994b908d29fc639 Author: Olivier Crête Date: Thu Aug 7 17:32:08 2008 -0400 Port fs2-gui to use a list of codecs commit 16086d16fe8d8b5fef4895752918ba4076cce43a Author: Olivier Crête Date: Thu Aug 7 17:28:56 2008 -0400 Replace codec/codec_done with codecs in fs2-gui-net commit cad56ce9af28ff5ed672c445d07167214adc639c Author: Olivier Crête Date: Thu Aug 7 17:28:46 2008 -0400 Add destroy method to TestParticipant commit 0b14b3873a864fda0123c1d33c6e8e075a1622a7 Author: Olivier Crête Date: Thu Aug 7 16:52:04 2008 -0400 Writeout the pipeline on sigint if possible commit 4b1db0773929ef6943bcb1528cdbeeddc8392c40 Author: Olivier Crête Date: Thu Aug 7 16:50:43 2008 -0400 Improve debug messages commit 7cddba545f4a28d9fb4583bba91fd19fb7d4d70e Author: Olivier Crête Date: Wed Aug 6 21:14:13 2008 -0400 Remove unused parameter in internal function commit 6ba3eacd336c21a41af279c6fc9cc38afbeeddb7 Author: Olivier Crête Date: Wed Aug 6 21:10:27 2008 -0400 Add a bit more debug info commit 1737faee0acd361a01bc5dee47b8b9cc874da335 Author: Olivier Crête Date: Wed Aug 6 20:42:25 2008 -0400 Give substream/session elements meaningful names commit 278d59e38871fe1ad2eb3a00b3a65a5f23746302 Author: Olivier Crête Date: Wed Aug 6 17:50:19 2008 -0400 Get the sinks by interface instead of by name in gui commit 0b90ea70bbea0c12683d17b9b41e11dc98403ef5 Author: Olivier Crête Date: Wed Aug 6 17:43:05 2008 -0400 Improve debugs for stream associations commit d886046ddf949c064e3b4996336a969a7b99fef6 Author: Olivier Crête Date: Wed Aug 6 17:42:47 2008 -0400 Check for free substream when we get an association from a known source commit 65dfc512282d0cff6c7d956d6a9068d8d5e8f95d Author: Olivier Crête Date: Wed Aug 6 17:29:30 2008 -0400 Document fsplugin commit 39a9c61a4a87b0a3b396b5455fc54f3789f29ae2 Author: Olivier Crête Date: Wed Aug 6 17:14:43 2008 -0400 Document FsPlugin structure commit b9c2459403c63947022a6538898cc49ac84e17ce Author: Olivier Crête Date: Wed Aug 6 17:07:26 2008 -0400 Fix small typos in the comments commit fdc269449517ce3e7a19ede88c1bb13972278c00 Author: Olivier Crête Date: Wed Aug 6 17:02:31 2008 -0400 Separate substream connection and connect more than one substream for the right ssrc commit 5be0d4836bb20b2ea9fe8c308322438f5276aa80 Author: Olivier Crête Date: Wed Aug 6 17:02:09 2008 -0400 Send out white noise instead of a sine commit 9e486f4e4ab27465a27fdc2c96e9e4de60fb5971 Author: Olivier Crête Date: Wed Aug 6 15:52:26 2008 -0400 Use get_static_pad instead of deprecated get_pad, patch from oleavr commit f30cb991e108150b205efe8fdd2e94212ce5d454 Author: Olivier Crête Date: Wed Aug 6 13:27:10 2008 -0400 Don't return void value.. commit 6a2011a10225f69a048e2e551578796843fb8cac Author: Olivier Crête Date: Tue Aug 5 18:17:10 2008 -0400 Don't dupe the buffers unless its required commit 3a964dd7e863d242e87bde1379621c14ddd35eb2 Author: Olivier Crête Date: Tue Aug 5 17:43:33 2008 -0400 Flush stuff in state changes and flushes in fsfunnel commit 29ee5e52bc61faf83814aabfb80be37f3eff4738 Author: Olivier Crête Date: Tue Aug 5 17:29:35 2008 -0400 Initial timestamp-merging work for funnel commit 47a60e3f8e3e59a122a86a471b8689f4983a7949 Author: Olivier Crête Date: Mon Aug 4 19:43:26 2008 -0400 Give preference to the original rate, but allow any rate commit fee57ff1fa2327fe0dc1e33e2f24bf06fd2a7c54 Author: Olivier Crête Date: Mon Aug 4 19:40:13 2008 -0400 Add videoanyrate element to the pipeline commit e651657ca948f05aa7f2b93fd3c3a67593394226 Author: Olivier Crête Date: Mon Aug 4 19:39:50 2008 -0400 Add videoanyrate element commit b01cd258bf64adbdc4a86bc0e518811a1ab463d8 Merge: 2716551 ae15df5 Author: Olivier Crête Date: Mon Aug 4 13:13:25 2008 -0400 Merge branch 'master' of git+ssh://git.collabora.co.uk/git/user/tester/farsight2 commit 2716551b23e621dba34e89d80bcf56d0617d8971 Author: Olivier Crête Date: Mon Aug 4 13:12:43 2008 -0400 Newer gst-p-farsight need for correct rtpdtmfsrc commit ed60d6333feb45a3edcda793be727895f20b30d0 Author: Olivier Crête Date: Thu Jul 31 16:50:45 2008 -0400 Bump gst required to 0.10.18 for gst_netaddress_equal commit ae15df5ebf67712a9ea633b1a95697fc2b2bdacf Author: Olivier Crête Date: Wed Jul 30 11:41:41 2008 -0400 Make the transmitter param optional in the python bindings commit 8c70570fca7b2e0c17ad4db93f82d0d6775cdd51 Author: Olivier Crête Date: Wed Jul 30 11:41:22 2008 -0400 Use right type for pydict_next position commit ab22758b9d7c334d8e3131abf08dc58a3d028a4e Author: Olivier Crête Date: Tue Jul 29 21:58:13 2008 -0400 Make it a bit clearer what the stop method is meant to do commit 43e619fdc9270c2cd3ca62755f919f2f30286502 Author: Olivier Crête Date: Thu Jul 3 15:36:17 2008 -0400 Update python bindings and doc to force_remote_candidates() commit f24ad72a31d262c99e289af3e1862f30fc58d45a Author: Olivier Crête Date: Thu Jul 3 15:22:48 2008 -0400 Replace select_candidate_pair with force_remote_candidates in FsRtpStream commit e325d4b3ea58cdc947856e5f680da8f26f4ca546 Author: Olivier Crête Date: Thu Jul 3 15:20:44 2008 -0400 Replace select_candidate_pair with force_remote_candidates in FsStream commit d6817a34a10e2d5556277d7d3ee60b9f9417044b Author: Olivier Crête Date: Thu Jul 3 15:15:02 2008 -0400 Replace select_candidate_pair with force_remote_candidates in FsStreamTransmitter commit 2a0f89bc2b9fbec20b2e9439a83528462d304d84 Author: Olivier Crête Date: Mon Jun 30 20:30:04 2008 -0400 Update python bindings with new enum values commit dc656ea845cd02dcf7f9b6e13c08e4d551387c89 Author: Olivier Crête Date: Mon Jun 30 20:19:08 2008 -0400 Listen to the Stream transmitter signal and emit the proper messages commit 0fb4c7da2da0bcd3443ad8dd54b48b2ddcf87b62 Author: Olivier Crête Date: Mon Jun 30 20:18:36 2008 -0400 Add doc for new farsight-component-state-changed message commit 17b1a56a9650218c204947204f358b85b09468a6 Author: Olivier Crête Date: Mon Jun 30 20:15:42 2008 -0400 Add new error for connection failure commit 110fbb3bfedc38ba6758e87aa92387e6ab182560 Author: Olivier Crête Date: Fri Jun 27 14:19:31 2008 -0400 Add a per-component stream state signal to the stream transmitter commit 53dcc2994564bfe8a72a77d27997754ae0f17d9a Author: Olivier Crête Date: Fri May 2 14:24:58 2008 -0400 Add data lock to FsParticipant commit e000bae7923c152f97fed24d62944648584128c3 Author: Olivier Crête Date: Sat Apr 26 00:55:11 2008 -0400 Add FsStreamState enum commit e8f191d585682f07dc9008e4624a043388b89e4d Author: Olivier Crête Date: Fri Apr 25 15:32:56 2008 -0400 Remove double * that confused gtk-doc commit 87485d1d83c5275c49d12afaab06ab3a924e75a6 Author: Olivier Crête Date: Thu Apr 24 13:16:10 2008 -0400 Improve titles in documentation a bit commit e56bcff90306d80b824abdd8951f06084ba64f7f Author: Olivier Crête Date: Wed Apr 23 16:06:05 2008 -0400 Add fs_transmitter_emit_error method commit fc6390e1bbb6b40e65dfc730781ee23e189387e4 Author: Olivier Crête Date: Tue Apr 22 19:16:56 2008 -0400 Remove trailing whitespace in configure file commit 8760b763b364c563345c7a1e0b2524542f26467f Author: Olivier Crête Date: Tue Jul 29 15:19:39 2008 -0400 Really make the netbuffer stuff thread safe commit 4d805b43f2868045712c492340d48e62620b05f7 Author: Olivier Crête Date: Tue Jul 29 15:13:11 2008 -0400 Add more debug/comments to the stop stream test commit 735a1453e8a548dec392553f9cfe159e27cf62e9 Author: Olivier Crête Date: Tue Jul 29 15:12:14 2008 -0400 Don't hold the component lock when stopping the udpport commit 57d5a7a8715b6c5cdeb1efb6b977515641be2a1a Author: Olivier Crête Date: Tue Jul 29 14:30:48 2008 -0400 Add test without associate-on-source commit 899873e67390253d9648cdfee838374dc627115c Author: Olivier Crête Date: Tue Jul 29 14:27:22 2008 -0400 Make the generic nway_test take the stream params are arguments commit 94bcaad8e67b22c6b4233efeec307803ce7d83c6 Author: Olivier Crête Date: Tue Jul 29 14:24:35 2008 -0400 Add possiblity to pass strean transmitter parameters in the rtp test commit cf21d0dfd6ab09a642bc6b188e249fda03a18858 Author: Olivier Crête Date: Thu Jul 24 17:03:23 2008 -0400 Add a test for associate-on-source=FALSE commit a700c27f3368d2b973a4dab1cd5cf561932111ce Author: Olivier Crête Date: Thu Jul 24 17:03:01 2008 -0400 Use an empty handoff handler for the stop stream test commit 5b905f68e30981d7ba0b129822a24cd88089846f Author: Olivier Crête Date: Thu Jul 24 17:02:02 2008 -0400 Initialise counters on each test commit 6a6b363eccb49691b3fea5028355f8b366a8bff1 Author: Olivier Crête Date: Thu Jul 24 17:00:49 2008 -0400 Split transmitter tests commit 98088ca8dab3d2beeded2d5a4cc2fd906cf503e2 Author: Olivier Crête Date: Thu Jul 24 16:19:57 2008 -0400 Remove wrong check commit ed7622209aac623867e5a55b13b38d3447bba2dc Author: Olivier Crête Date: Thu Jul 24 16:02:59 2008 -0400 Implement associate-on-source in the fsrawudpcomponent commit 4d420940e6fd53bdec1531a93b74d0afb626232a Author: Olivier Crête Date: Thu Jul 24 15:53:29 2008 -0400 Add associate on source property to the rawudp stream transmitter commit 45df047be5ab6328aea30a3497afc07d8a97156f Author: Olivier Crête Date: Thu Jul 24 15:39:34 2008 -0400 Add associate-on-source property to the FsStreamTransmitter base class commit 37852c8d2a0c6c14daae595de08949571728723d Author: Olivier Crête Date: Wed Jul 23 20:34:53 2008 -0400 Store the remote address into the udpport and check the uniqueness commit c212602cbacd2371278a739d70aa245df86608ae Author: Olivier Crête Date: Wed Jul 23 20:07:56 2008 -0400 Add functions to add/remove known addresses from a udpport commit 43c23632fdf7dfb82e0609151e2486323bdfc479 Author: Olivier Crête Date: Wed Jul 23 19:25:11 2008 -0400 Add GArray for known addresses and mutex to protect it to the rawudp udpport commit bca1e409ec59428b3a637fc38ed8ff68df1ff19b Author: Olivier Crête Date: Fri Jul 18 18:38:41 2008 -0400 Pre-register netbuffer because gst type registeration inst thread safe commit e94f1072924cf18a1b1d2712dfd1a14252ac1524 Author: Olivier Crête Date: Fri Jul 18 16:18:49 2008 -0400 Add test for no-rtcp mode commit 70a331fdc5fd36a3e33d23f8827d5538754e06a0 Author: Olivier Crête Date: Fri Jul 18 16:16:14 2008 -0400 Add ssrcs from to the known list if they come inside valid buffers commit 27df9fbba2590025fdfb0469c17ad30da900c8cd Author: Olivier Crête Date: Thu Jul 17 17:33:56 2008 -0400 Have fsrtpstream proxy the known-source-packet-received signal commit a5ae196ae78f3503709a8dd7b1b3186049df93fc Author: Olivier Crête Date: Thu Jul 17 16:44:05 2008 -0400 Protect udpport with mutex (sometimes, it should be properly refcounted...) commit e1840bbe003021fb5eb924746785f2bf2c949cfe Author: Olivier Crête Date: Thu Jul 17 16:39:12 2008 -0400 Make start_stun into a private function and call stop_stun() on dispose commit 4f1dc7765b08d100fb23957739d72b821b50b557 Author: Olivier Crête Date: Thu Jul 17 16:20:12 2008 -0400 Move rawudp stream transmitter lock into a macro commit c1f96e64d9efbde20995dd6a34082adeb5dae9db Author: Olivier Crête Date: Thu Jul 17 16:13:41 2008 -0400 Implement the stop method in the rawudp transmitter commit 3a5a716640ca2d52063d0f96ac1a401fa747f47b Author: Olivier Crête Date: Thu Jul 17 16:01:42 2008 -0400 Stop stream transmitter in rtp plugin too commit 251af4e64c09b0db12f985fac71324295cf20f00 Author: Olivier Crête Date: Thu Jul 17 15:59:58 2008 -0400 Call stop api in unit tests commit 133608fc85c0863f251fa53b550fb4d0886b4749 Author: Olivier Crête Date: Thu Jul 17 15:57:36 2008 -0400 Add stop() method to FsStreamTransmitter commit 9ac02d4310a86f5b24b8b9649b9e005717bdd0d2 Author: Olivier Crête Date: Thu Jul 17 14:27:04 2008 -0400 Add warning if non-netbuffer received from udpsrc commit 64e174864fc5ba3854b8aa31bedef83c4f4829c5 Author: Olivier Crête Date: Thu Jul 17 14:26:11 2008 -0400 Don't check the buffers for the stun test commit e364d6721846b6836ef127e1936177538c3bc194 Author: Olivier Crête Date: Thu Jul 17 14:25:50 2008 -0400 Replace the has_stun flag with a global var commit 9c7ad122b820d26e8b6d72cb7799e9b58351e4cc Author: Olivier Crête Date: Fri Jul 4 19:45:38 2008 -0400 Remove unused list of ssrcs from FsRtpStream commit 110ca2898ec6500dbd8663e07f8f65a4784daace Author: Olivier Crête Date: Fri Jul 4 19:44:41 2008 -0400 Implement tracking of knowledge of ssrc with the new hash table commit e9dfe145d4871c59523061609ee28d9c1bf83fa0 Author: Olivier Crête Date: Fri Jul 4 19:39:17 2008 -0400 Remove known ssrcs for a stream when the stream is removed commit baf9fdede53490039737ca2e4749d5f20a694c48 Author: Olivier Crête Date: Fri Jul 4 19:36:04 2008 -0400 Add hash table of ssrc->stream to fsrtpsession commit ae8055e7a731c6ac640189944c07733401dd15f6 Author: Olivier Crête Date: Wed Jul 16 18:06:48 2008 +0300 Add test to verify that the "known-source-packet-received" is emitted commit 9644ba277bbd4166b706e27cdf2f7c0ff66f7fc2 Author: Olivier Crête Date: Wed Jul 16 17:58:33 2008 +0300 Seems like we can't marshal a pointer into a gstbuffer and emit signal properly commit 2d1486334eb821b8a9ea5699a867a619c3fc5682 Author: Olivier Crête Date: Wed Jul 16 16:17:27 2008 +0300 Relay the component signal through the stream commit 035124ff823a1a42c72acb0ea6cc95e0f245f5e3 Author: Olivier Crête Date: Thu Jul 3 20:12:16 2008 -0400 Have FsRawUdpComponent emit a signal when a buffer from a known address is received commit 092744a428ff0a234900c2dbae5efc40b9b48850 Author: Olivier Crête Date: Thu Jul 3 19:57:35 2008 -0400 Store the address of the remote end in a GstNetAddress so we can compare commit af6c3459a2712060e9b718ede9c5ec1fd4566ef7 Author: Olivier Crête Date: Thu Jul 3 19:24:32 2008 -0400 Add signal to FsStreamTransmitter emitted when a buffer from a known source is received commit ea64cf2dad0a1e61a52f5db29c501b8ae7b957ce Author: Olivier Crête Date: Mon Jul 28 16:37:40 2008 -0400 Remove the now useless unload callback (modules are no longer unloadable) commit 2275e15272dc37710df9c272f7bc3acec6fd9ff9 Author: Olivier Crête Date: Mon Jul 28 16:31:17 2008 -0400 Remove useless check to not re-init debug categories commit a760dfd85b3c9bbb759fc63bc72344f77fd2fc34 Author: Olivier Crête Date: Wed Jul 23 20:44:13 2008 -0400 Add test to make sure a module can be reused commit 04936b06d32a3b4e135765e407cdea8a021b83c3 Author: Olivier Crête Date: Wed Jul 23 20:44:00 2008 -0400 Don't g_module_close() the transmitter plugins on unload commit 571e9554b660c675f3db9a6be7f98f8dea1f848b Author: Olivier Crête Date: Wed Jul 23 17:23:58 2008 -0400 Put codec/candidate docs in more logical order commit 8d346cc111d62f285b7bd3cc3ae7f0845d4c8249 Author: Olivier Crête Date: Wed Jul 23 14:14:27 2008 -0400 Emit the codec-changed signal if the codec is changed for a substream commit 824237891cafa725637d116086a2dcfd7c95adaf Author: Olivier Crête Date: Tue Jul 22 13:10:57 2008 -0400 Don't add NULL codec to current-recv-codecs list commit a7429b41fcce99d58d005de37f9b14bf63150b61 Author: Olivier Crête Date: Fri Jul 18 17:21:55 2008 -0400 Add unblock-threads in proper places in python .def files commit bb19a6dab574c7d5b85183fa8cf424586cb7e4ee Author: Olivier Crête Date: Fri Jul 18 17:21:32 2008 -0400 Update gitignore for tests renames commit 03bd336fcd98cdfecf001998fb25eb37391faa4e Author: Olivier Crête Date: Wed Jul 16 18:03:06 2008 +0300 Remove abuses of error_network (into invalid args) commit 779f9e8f95609f1bdf197403f9ba9d0486c5b1d1 Author: Olivier Crête Date: Wed Jul 16 18:22:58 2008 +0300 Remove the gtkdoc style comments commit 8806ee5c4834618f21c0e4676cabd806d13a8ef5 Author: Olivier Crête Date: Wed Jul 16 16:27:07 2008 +0300 Document stop-stream test a bit commit 61732080deb6368cc73c35690ee360d9da7937d3 Author: Olivier Crête Date: Thu Jul 10 01:24:15 2008 +0300 Port python gui to set_remote_candidates() commit 0d4cfd8d8a3d83d81a2ec827a383e1d8f755afe8 Author: Olivier Crête Date: Tue Jul 8 15:29:36 2008 +0300 Update python example to new api commit a60bc46ddded17b63e8caf4fe67a2fede2803b13 Author: Olivier Crête Date: Tue Jul 8 15:26:42 2008 +0300 Use candidate methods for candidate, not codec methods commit cdda3641746f2f6801f6bae1e0367dd2e9f65762 Author: Olivier Crête Date: Sun Jul 6 12:53:00 2008 +0200 Ignore some functions that should be ignored commit 04d8096ac75a7dbb47ede0cbf98c238e79cb9a9b Author: Olivier Crête Date: Sun Jul 6 12:34:03 2008 +0200 Make sure old codecs override local preferences commit 4acc36b05a90857efad5d61b210501e64622b37c Author: Olivier Crête Date: Sun Jul 6 12:33:35 2008 +0200 Add test (and correct existing) to make sure that the remote codecs override local preferences if they should commit 7269a2debcaacad67dd5523b4160719df8e742bc Author: Olivier Crête Date: Sun Jul 6 12:07:37 2008 +0200 Document parameter (it wasn't clear) commit 57f5794859b044314f1b045e78e0065711a456b2 Author: Olivier Crête Date: Sun Jul 6 12:01:48 2008 +0200 Add a bit more info to python example commit 482b4c01871906db3bc792c63f013c2e58151ede Author: Olivier Crête Date: Sun Jul 6 11:55:44 2008 +0200 Update python example to new api commit 57c1da7f8a6a8de03d5729477f56ae31f86d06d0 Author: Olivier Crête Date: Sun Jul 6 11:55:30 2008 +0200 Force codec to h263-1998 in python example commit 728a6e7dac7c00b448ee82cdde6ad18d0a0020cd Author: Olivier Crête Date: Sun Jul 6 11:54:58 2008 +0200 Require pygst 0.10 in python example commit 28d18c7f6e4fc23c8db7175c31385239716f55c5 Author: Olivier Crête Date: Sun Jul 6 11:54:28 2008 +0200 Make it clear in python binding error messages that any sequence should do commit 74850df1cd0418808ec36546da9447bb8794066d Author: Olivier Crête Date: Thu Jul 3 19:40:42 2008 -0400 Fix little typo in docstring commit 03fc950b07243bb8e8856fa535b5c44a475eafd4 Author: Olivier Crête Date: Thu Jul 3 19:41:37 2008 -0400 Rename fs_rawudp_component_add_remote_candidate to more exact set_remote_candidate commit 631e44b3c04bfd9a0252b01e7458509725826aa5 Author: Olivier Crête Date: Thu Jul 3 19:20:33 2008 -0400 Fix doc copy-paste error commit c270aabf30c8ed58c85cadf5889983a50635927d Author: Olivier Crête Date: Thu Jul 3 18:58:07 2008 -0400 Clarify error documentation a bit commit f5cd3158701ddb2f490d4508a40bb8e8e88ffafb Author: Olivier Crête Date: Tue Jul 1 17:44:31 2008 -0400 Make it clear that the "farsight-new-active-candidate-pair" is per-component commit b0236a57a5aa0a3e5ac0153fe327a8775a00f07b Author: Olivier Crête Date: Tue Jul 1 16:56:58 2008 -0400 Move rtp tests to new candidate api commit f31f33cd0f11f5fa8666426da1e6402de73749af Author: Olivier Crête Date: Tue Jul 1 15:55:29 2008 -0400 Port the multicast transmitter test to the new api commit 03dd277856f15bfb73846839fefe9c6628f0ac0b Author: Olivier Crête Date: Tue Jul 1 15:55:21 2008 -0400 Port multicast transmitter to set_remote_candidates() commit fed25848ff6b330470e7dfac7d4eb5edff5f4a4b Author: Olivier Crête Date: Tue Jul 1 15:34:35 2008 -0400 Port rawudp test to new api commit af03dc9060ae23111357d5f8df05113084a07c34 Author: Olivier Crête Date: Tue Jul 1 15:34:21 2008 -0400 Port rawudp transmitter to add->set transition commit d1a06ade804b2e926359708c443f9d6bdbcd8184 Author: Olivier Crête Date: Tue Jul 1 14:39:22 2008 -0400 Port the rtp plugin for the add->set candidate change commit 35bae116386a5114b1c93501ac0194c93b044c28 Author: Olivier Crête Date: Tue Jul 1 16:28:46 2008 -0400 Port python bindings to new api commit a74bcc6dac2a501d779b197b3ef9ad2b48b1b044 Author: Olivier Crête Date: Tue Jul 1 14:38:11 2008 -0400 Change add->set remote candidates in the transmitter base class commit 6434f74a66ea2b372ef462206c12ae70f921d7e9 Author: Olivier Crête Date: Tue Jul 1 14:25:32 2008 -0400 Change the candidates api set->add in the core lib commit 2f9fb71b09b61f2d129a5bcc9b30216313b828d9 Author: Olivier Crête Date: Sat Jun 21 17:47:41 2008 -0400 Ignore generated diagrams commit b01c791f6245fc994db9e72373502d43de46ca85 Author: Olivier Crête Date: Sat Jun 21 17:46:30 2008 -0400 Add recv substream capsfilter commit f3fdc0e268a9853bf126e19ab9abf850b09c7f09 Author: Olivier Crête Date: Sat Jun 21 17:38:40 2008 -0400 Add Discovery elements to the diagram commit 59afdcbe1f9b015de12aece5ebd12a92f2e4771e Author: Olivier Crête Date: Sat Jun 21 17:24:36 2008 -0400 Added diagrams sources from the doc to the source tree commit 6b5c78678b5ce73a14012e57f361179e657813f8 Author: Olivier Crête Date: Fri Jun 20 17:39:02 2008 -0400 Only copy back the new discovered codec if it has been found commit 721dcf04b29f65f737a33cb8a0e8d0fe9c111407 Author: Olivier Crête Date: Fri Jun 20 17:37:42 2008 -0400 Rename the RTP tests with more suiting names commit 9bda56375f95fb1f84b3c4c705b5b5b2b1bb927d Author: Olivier Crête Date: Fri Jun 20 15:45:14 2008 -0400 Remove wrongly-named macros from gtkdoc stuff too commit 327fa5d7188e695341a8d096381ffa4ad16879fa Author: Olivier Crête Date: Fri Jun 20 15:18:00 2008 -0400 Make doc a little clearer commit 050a969e0e1dda1ff59cce888e71f6527bc71ae8 Author: Olivier Crête Date: Fri Jun 20 15:17:52 2008 -0400 Fix wrongly named macros commit 9ff4d10220e22d8e7337d40c75ae85693818b542 Author: Olivier Crête Date: Thu Jun 19 19:53:30 2008 -0400 Don't overwrite already discovered config parameters commit 395bc16b231a76cab36ddd3cf0995a79af985fa0 Author: Olivier Crête Date: Thu Jun 19 19:53:10 2008 -0400 Add more debug to codec param gathering commit f687e837812f5aadff01be455cb576d9509a895b Author: Olivier Crête Date: Thu Jun 19 19:51:28 2008 -0400 Disable vorbis in fs2-gui :-( commit 81cb1bf1dbae84fc229ebe04d5987f4a39bf60d6 Author: Olivier Crête Date: Thu Jun 19 14:18:03 2008 -0400 Remove forgotten remnant of local-codecs-config commit 28f46a878f387ccadf65aab46b59b107b78988fb Author: Olivier Crête Date: Wed Jun 18 16:39:40 2008 -0400 Fix a small leak in codec detection commit 78b3510cce0c2fb5c834890c3dd80576fc8dd1d1 Author: Olivier Crête Date: Wed Jun 18 16:12:14 2008 -0400 Use the same method to check for theora and vorbis configuration commit 3e27b861896937f30d2422b57f4682dba4e6be59 Author: Olivier Crête Date: Wed Jun 18 13:22:03 2008 -0400 Also remove the new label when removing a participant commit caa63bd937b755f962458274fbc51714b96d1400 Author: Olivier Crête Date: Tue Jun 17 18:00:10 2008 -0400 Set the send tee to playing after adding it commit 9e385beada4da8a7755f72b2e5f0c47a3f8644ad Author: Olivier Crête Date: Tue Jun 17 16:07:33 2008 -0400 Show recv codecs in fs2-gui commit ff039dec1c2967904487e731d93d4bb202116402 Author: Olivier Crête Date: Tue Jun 17 16:07:18 2008 -0400 Rename message farsight-current-recv-codecs-changed into farsight-recv-codecs-changed for consistency commit 472f499082e78e62a66bb5f5ec1338711ae9ab5f Author: Olivier Crête Date: Tue Jun 17 13:37:54 2008 -0400 Put all of the outputs in a GtkTable layout commit 9d0e795467bb6b4fe1f67ecc597086b81d3a0cc3 Author: Olivier Crête Date: Tue Jun 17 13:29:10 2008 -0400 Add the possibility to change the codec on the fly in the UI commit ea3dcb736a92ed9aaf1c27e3d86b1cad875f321b Author: Olivier Crête Date: Tue Jun 17 13:22:29 2008 -0400 Show the current send codecs in the fs2-gui commit 0e7090e7b88e5a8ff036f6de60a902871f627bfa Author: Olivier Crête Date: Mon Jun 16 20:22:17 2008 -0400 Use pad blocking to clear substreams commit cf052793ca8fd82081002f330a2cb15400b1a308 Author: Olivier Crête Date: Mon Jun 16 19:44:26 2008 -0400 Add functions to get/remove codec prefs to python bindings (even though they're not bindable) commit b73c0c5155eb347efd136adf50d87a409e868982 Author: Olivier Crête Date: Mon Jun 16 19:15:51 2008 -0400 Rename local-codecs-config into codec-preferences commit 6e3c37235781c65803cc464c29d8f0cb5f871ece Author: Olivier Crête Date: Mon Jun 16 18:53:01 2008 -0400 Add property notifications for codecs-without-config commit 0ea88c558951fe6c4458efa0a586c0a9f2a8706c Author: Olivier Crête Date: Mon Jun 16 18:43:40 2008 -0400 Add unit test for codecs-without-config commit b31e58c4bff1bf8c0a094da8445cdcce6f848194 Author: Olivier Crête Date: Mon Jun 16 18:36:23 2008 -0400 Implement codecs-without-config property in FsRtpSession commit 124a87499155f73d426a085cfce6275bcf3542aa Author: Olivier Crête Date: Mon Jun 16 18:34:57 2008 -0400 Add codecs-without-config property to FsSession commit a20d488396b1d84373b552fba217c0c42cbb2c58 Author: Olivier Crête Date: Mon Jun 16 18:27:10 2008 -0400 Rename FsSession property negotiated-codecs into codecs commit d5c8205e4676379a2943e385e477958798d9aa58 Author: Olivier Crête Date: Mon Jun 16 18:09:14 2008 -0400 Remove the local-codecs property commit 4ff2ccef175121f1512c8e850f40b6b18a590549 Author: Olivier Crête Date: Mon Jun 16 18:02:09 2008 -0400 Remove the implementation of the "local-codecs" property commit bce0c51b4f274caf0d65c4b9c34951d174278851 Author: Olivier Crête Date: Mon Jun 16 18:00:02 2008 -0400 Port the unit tests us negotiated-codecs for everything commit 211f6bde17dfa3bde46cecf3f974f09bc605a6ab Author: Olivier Crête Date: Mon Jun 16 17:55:10 2008 -0400 Notify on negotiated codecs when the config are set commit 88dc2975d956816cc1f4bee6fa84d8e3c308592b Author: Olivier Crête Date: Mon Jun 16 17:30:19 2008 -0400 Enable h.264 in fs2-gui commit 684961e5242a3c93f6b33b70ebdbe795f5f39c0d Author: Olivier Crête Date: Mon Jun 16 17:15:18 2008 -0400 Accept case when no remote clock-rate is specified (its probably a re-match..) commit 7f445515f8a7dd2d9ce3350bd01b35d1501a5b53 Author: Olivier Crête Date: Mon Jun 16 16:45:34 2008 -0400 Print remote codecs on fs2-gui commit af5ad5f4a261d9367548bbda6135f77d03aa6a03 Author: Olivier Crête Date: Mon Jun 16 16:45:15 2008 -0400 Print errors in fs2-gui commit a477ac05212b6d2c50c24a3b6f842e759e2a1e6b Author: Olivier Crête Date: Mon Jun 16 16:44:52 2008 -0400 Allow more than one set of config parameters to be discovered on a codec commit ebd0577c198c2ae39020f915269a62bbaa46182a Author: Olivier Crête Date: Mon Jun 16 16:44:13 2008 -0400 Set the discovery capsfilter when the codecbin is set commit 48356a23b5438d6f3407ab05ca165239b3864645 Author: Olivier Crête Date: Mon Jun 16 15:41:07 2008 -0400 Add H.264 config parameters commit e6390905b074ee50400395e212d67cd64bee47f7 Author: Olivier Crête Date: Fri Jun 13 20:37:00 2008 -0400 Use speex as the default audio codec for the test commit 02687520848fc626856f764d826533ae2669a4db Author: Olivier Crête Date: Fri Jun 13 20:01:36 2008 -0400 Only send dtmf as audio if the current code has a clock-rate of 8000 commit 0a098b2477be0b61c2a40b3b92d993c768b36378 Author: Olivier Crête Date: Fri Jun 13 19:07:08 2008 -0400 Re-send codecs if they have changed (once the initial negotiation is over) and use new operator commit 2783e29272e8835befda7d0fb329d1a9c816feae Author: Olivier Crête Date: Fri Jun 13 18:19:22 2008 -0400 Use pad blocking to switch the discovered codec commit f917cebdc65fd30a7cea4bfd103f38bff806b2c1 Author: Olivier Crête Date: Fri Jun 13 17:50:13 2008 -0400 Block on the tee src pad instead of the ghostpad when changing discovery stuff commit 31beef1a431b443df0046b601784df818157320c Author: Olivier Crête Date: Fri Jun 13 17:35:52 2008 -0400 Implement stable comparison operator for FsCodec in python commit aa1adb61e2d891fb51e90bad9c90a939f09180cb Author: Olivier Crête Date: Fri Jun 13 17:23:56 2008 -0400 fix comment commit 617bc45cb854456791f13b4f727c2f50da5f3170 Author: Olivier Crête Date: Fri Jun 13 17:16:48 2008 -0400 Default to Theora in fs2-gui !! commit 931bac974c60eaf4e47bd28632111e779586f559 Author: Olivier Crête Date: Fri Jun 13 17:11:14 2008 -0400 Also discover codec parameters when the actual data is sent commit 1535fae272b7cf9e21f992c4296dcf842fcea30f Author: Olivier Crête Date: Fri Jun 13 16:42:11 2008 -0400 Add a bit more debugging to the fs2-gui commit 6161cdd6a781a807ca9c30cb80c46fa6d3594a93 Author: Olivier Crête Date: Fri Jun 13 16:40:10 2008 -0400 Remove farsight-codecs-ready message, use farsight-codecs-changed instead: commit 980a5e4b82fa6e738971f97633c8f77308b75c00 Author: Olivier Crête Date: Fri Jun 13 16:36:43 2008 -0400 Emit the codecs-changed message when the codecs are ready commit b509befb4750ca135bf8fa3b3962ecb889df50a4 Author: Olivier Crête Date: Fri Jun 13 16:14:41 2008 -0400 Invert tee and valve (tee is now before the valve) on send pipeline commit b9163d0daf081b1a951d41f2cc0e69d8cd407297 Author: Olivier Crête Date: Fri Jun 13 15:16:07 2008 -0400 Add some debug to the codec distribution commit 3d13c0e03876af7a07b9c301eff4cdbc7e2cdf17 Author: Olivier Crête Date: Fri Jun 13 15:15:18 2008 -0400 Add parameter to sdp_is_compat to validate the configuration or not commit c2178915462772a2f63e40b46a4c49ed9b950ac5 Author: Olivier Crête Date: Fri Jun 13 15:13:25 2008 -0400 Force the caps on the buffer to be the exact caps of the substream commit 295897bf9f81d2f7dd5c129c75ce75607c1aebba Author: Olivier Crête Date: Fri Jun 13 15:09:54 2008 -0400 Drop all buffers until we have codecs that the codecbin can accept commit 36eca288ad51cfda2a13df9e55b047a429251d1d Author: Olivier Crête Date: Fri Jun 13 15:09:09 2008 -0400 Save current caps in substream commit cbcb8f0e5437273f91fbc7455c4f8e9f8b3f4c11 Author: Olivier Crête Date: Fri Jun 13 14:41:41 2008 -0400 Default auto-multicast to FALSE (to be compatible with newer udpsrc) commit 3ce8ac28b2cd762b3f5e13993551fde8aea129ca Author: Olivier Crête Date: Thu Jun 12 22:01:21 2008 -0400 Dump codecbin if setcaps fails on it (like if there is no codec data) commit 3b97d0ee5d7b911b8794d0b8d8bb6fcf6085f634 Author: Olivier Crête Date: Thu Jun 12 22:00:06 2008 -0400 Use the already selected stream commit 11991ecbb98162264e73132c64e45b12f2c918e5 Author: Olivier Crête Date: Thu Jun 12 21:59:44 2008 -0400 Add a bit more debug and properly save the recv stream codec commit dc9fdf39764b3785485da101a8372e62c284083e Author: Olivier Crête Date: Thu Jun 12 21:43:44 2008 -0400 Add more details to test errror commit cfdfdb5a9ec2564fee974e9a9cc0496e6cb12ae4 Author: Olivier Crête Date: Thu Jun 12 21:42:44 2008 -0400 Add forgotten thread safe checks in rawudp transmitter unit test commit 66174a48e5eb10acd3bdf430bed6f248ae8397d2 Author: Olivier Crête Date: Thu Jun 12 20:07:58 2008 -0400 Add test for a different order of negotiation commit eba20f057af5ff487ecaa18373807392a7ee403c Author: Olivier Crête Date: Thu Jun 12 20:04:45 2008 -0400 Keep the need_config parameter when doing a negotiation commit e4e3f874b53665b45edc62ec42cdc24367317705 Author: Olivier Crête Date: Thu Jun 12 19:58:42 2008 -0400 Rename confusingly named variables commit f66daf9651945bed4033e4c5db8a4b97b21f2b02 Author: Olivier Crête Date: Thu Jun 12 19:56:46 2008 -0400 Print optional params list pointer in debug too commit fa4345c9d4da352e206fa41eda15d0b4a187bd95 Author: Olivier Crête Date: Thu Jun 12 17:52:50 2008 -0400 Add test to check if config data is broken by negotiation commit bf6bedb00e83b93735cff64468f1bb646e789167 Author: Olivier Crête Date: Thu Jun 12 17:43:36 2008 -0400 Build stream in main function in tconfig data test commit 67d049b98c66b058ff454fbb0920a4e27770ac34 Author: Olivier Crête Date: Thu Jun 12 17:36:18 2008 -0400 Split config data test into two parts commit b05ae9cba4255c4a65802ec46ec260888e729e0a Author: Olivier Crête Date: Thu Jun 12 16:08:33 2008 -0400 Split updating of special sources into two part to prevents races commit 3d123a4b2947e6db769e95febe46df4219246778 Author: Olivier Crête Date: Thu Jun 12 15:23:09 2008 -0400 Return FALSE on error on verify_send_codec_locked commit 9d15cfd82f119760afe727a74b46f0afefc2c53e Author: Olivier Crête Date: Thu Jun 12 15:22:28 2008 -0400 Use pad blocking instead of probing to modify the running send pipeline commit 39fe6118e8773bada586a24c28953d7284a8a7df Author: Olivier Crête Date: Wed Jun 11 20:00:57 2008 -0400 Add a bit more debugging to FsRtpSession commit 503987d00500d91d31903839a64969e1ebd196c5 Author: Olivier Crête Date: Wed Jun 11 18:22:00 2008 -0400 Set new codecs before invalidating old ones commit 239004232997546ee5cfe3565f1243e91f1e5942 Author: Olivier Crête Date: Wed Jun 11 18:04:47 2008 -0400 Reject vorbis without configuration commit e0fc7c8d52de650fb8099ed798b5750f739fdf26 Author: Olivier Crête Date: Wed Jun 11 17:59:04 2008 -0400 Add function to search for optional codec parameters commit 66e2f6f91705f4dac4ca3822182710f37ff70f6e Author: Olivier Crête Date: Wed Jun 11 17:44:51 2008 -0400 Add macros to printf FsCodecs commit bb5e48ed77221f5ae18b73cd769fa4ee58238521 Author: Olivier Crête Date: Wed Jun 11 17:05:31 2008 -0400 Send message with right name commit 816d88bb3f76636b83e1a51350d037a34e5d9a79 Author: Olivier Crête Date: Wed Jun 11 16:37:39 2008 -0400 Re-indent list to make it nicer commit bb3857eab405ecc356f09f379aae0b6476eced63 Author: Olivier Crête Date: Wed Jun 11 16:35:22 2008 -0400 Don't resend the same lists multiple times commit 1227d34629c2b950037acf82acda535e2ab99f89 Author: Olivier Crête Date: Wed Jun 11 16:34:29 2008 -0400 Make python bindings deal with empty lists correctly commit f40756a4654da4805f34793e8915d4c158fa5c1e Author: Olivier Crête Date: Wed Jun 11 16:11:35 2008 -0400 Don't leak config param name/value when removing it commit 05a0359d9d96b495c42f423956ecaf85c8376bf5 Author: Olivier Crête Date: Wed Jun 11 15:54:02 2008 -0400 Add multi-party test commit 5360048ddcb5697f78e0ed3ae17f00c4c1eac30a Author: Olivier Crête Date: Wed Jun 11 15:50:24 2008 -0400 Simplify test a bit commit e8fac133858d872b161c2117ade2a46b99e63a37 Author: Olivier Crête Date: Wed Jun 11 15:42:27 2008 -0400 Don't allow codecs to become unready after setting the remotes commit b0b0388ad2738c24cb8815f6b180301cbd47e8f4 Author: Olivier Crête Date: Wed Jun 11 15:35:49 2008 -0400 Add test for preservation of the config data on negotiation commit 87fbf1dca4fa97f49111d6d777d0ac9be0fb7546 Author: Olivier Crête Date: Wed Jun 11 15:35:16 2008 -0400 Don't drop configuration on re-negotiation commit 2da99e78dd3e63aad31425dc77dde070853dfc12 Author: Olivier Crête Date: Wed Jun 11 15:34:59 2008 -0400 Remove duplicated variable definition commit 9a70ef4fc9a988422a622887e4884e0df5aa3a65 Author: Olivier Crête Date: Wed Jun 11 15:34:43 2008 -0400 Remove useless function to re-add config data if the codec is exactly the same commit 810a3343993423762c6f9a7af6b4144d634b1d7b Author: Olivier Crête Date: Wed Jun 11 12:29:34 2008 -0400 Unify codecs-ready and codecs-changed in test commit 5cf2b4b673abcc661f72823fa7894d6c19f9eb92 Author: Olivier Crête Date: Tue Jun 10 18:56:25 2008 -0400 Add more error checking to send tee creation commit 8c461f9c14c3500a0b54a4dd86ee065222d6872f Author: Olivier Crête Date: Tue Jun 10 18:45:47 2008 -0400 Don't leak request pads commit b392cf8729549c248a78fc6f6bf228a5a3485942 Author: Olivier Crête Date: Tue Jun 10 15:52:44 2008 -0400 Add debug to substream caps commit d9437b82bb7e00227802d730437bdfd50e26b848 Author: Olivier Crête Date: Tue Jun 10 15:17:35 2008 -0400 Replace the notify::negotiated-codecs signal with the farsight-codecs-changed message commit f1ff76357df874da807d2577ff43bea361567a57 Author: Olivier Crête Date: Tue Jun 10 14:48:22 2008 -0400 Don't send codecs until they're ready commit b3bbb074194b224ed2b1fb8d5d63f0e14301e05d Author: Olivier Crête Date: Tue Jun 10 11:30:15 2008 -0400 Lock state of videosink and funnel to prevent race condition commit 2674b51bedf2a5ec6fe20879dc74098f9fa3ee60 Author: Olivier Crête Date: Mon Jun 9 20:26:38 2008 -0400 Disable h.264 for now commit 1fefb18d16675caec10641ee7b110503f64cdf08 Author: Olivier Crête Date: Mon Jun 9 20:25:57 2008 -0400 Negotiate h263-1998 from the remote codec instead of the local commit 9a01b12603cf835030c09991f415964ad7dcc37d Author: Olivier Crête Date: Mon Jun 9 20:05:01 2008 -0400 Stop using local codecs commit 0373a3f0c13ea38d1c50363ec4895bde6c0b60bc Author: Olivier Crête Date: Mon Jun 9 19:50:02 2008 -0400 Fix typo commit 934c9ab0aaa6066c2ecb8d527ead5a7395cabce5 Author: Olivier Crête Date: Mon Jun 9 19:40:13 2008 -0400 Split only on first = sign to account for base64 encoded values commit 224130fbb4cba531f30b98163b2f2fd1bcc6df83 Author: Olivier Crête Date: Mon Jun 9 19:36:49 2008 -0400 Sync the capsfilter too (not the sink twice) commit decdaa8307ebe5a16af4080e653ec2c689755a96 Author: Olivier Crête Date: Mon Jun 9 19:25:02 2008 -0400 Ignore setting of NULL caps commit fb3dbe58857c5c76764e0ecc1c671772adca7430 Author: Olivier Crête Date: Mon Jun 9 18:23:50 2008 -0400 Update vocabulary in fs2-gui-net to match fs2-gui commit fc184a101508e5e8afcea18ae5d738e50a2ae41b Author: Olivier Crête Date: Mon Jun 9 17:48:11 2008 -0400 Update fs2 gui net module self-test to match its current state commit e735fb265a11921bae633b7ee86f38415d0bbeaa Author: Olivier Crête Date: Mon Jun 9 16:40:12 2008 -0400 Use the negotiated codecs in the streams instead of regenerating them every time commit ee0c3522bb4aa54b7290d9bae2456069272cac55 Author: Olivier Crête Date: Mon Jun 9 16:33:36 2008 -0400 Check the streams when verifying substream recv codecs commit 96f97f4bb470df4b5e745b060e3803e3bcbafe4f Author: Olivier Crête Date: Mon Jun 9 16:21:50 2008 -0400 Distribute the negotiated codecs to the various streams commit aea9056a921953496e98d337346a1cd014c775bf Author: Olivier Crête Date: Mon Jun 9 16:21:30 2008 -0400 Implement the negotiated-codecs property in FsRtpStream commit 6beab1a70e166d9348ad186e3b80bea4e0f03f91 Author: Olivier Crête Date: Mon Jun 9 16:03:20 2008 -0400 Make the config data optional when creating codec lists commit 6a827386ad155921100f0969fa83058222c5447b Author: Olivier Crête Date: Mon Jun 9 13:39:24 2008 -0400 Add negotiated-codecs property to the #FsStream commit c828890b7510ad7f5fcc3a6b77ff125858087df5 Author: Olivier Crête Date: Mon Jun 9 13:07:00 2008 -0400 Add locking to fs_rtp_stream_set_remote_codecs commit ca0121dbfa5183f922e3629646419fcadab02f3f Author: Olivier Crête Date: Mon Jun 9 13:02:47 2008 -0400 Set the caps on the substream capsfilter commit dfb34632365dc883c877204996b75d836306d7ec Author: Olivier Crête Date: Sun Jun 8 22:55:33 2008 -0400 Don't pass config data to pt map commit 06a5e6d34679b67f47b1bd7013010ea65f5ddf0a Author: Olivier Crête Date: Sun Jun 8 22:48:37 2008 -0400 Revert fscodec doc to correct meaning commit 00458663b4461da6af00f6fe2917e93b6ddec623 Author: Olivier Crête Date: Sun Jun 8 21:56:35 2008 -0400 Invalidate recv codecs according to each streams config data when the config data is changed commit 5721daaf84254e9ada9881ff572f4f811cede571 Author: Olivier Crête Date: Sun Jun 8 21:44:39 2008 -0400 Remove extraneous use of substream codec invalidation commit eaeefa96cc6994c51e1cef08c21c0a9f7a5c3b17 Author: Olivier Crête Date: Sun Jun 8 21:44:07 2008 -0400 Make substreams into a "public" member of FsRtpStream commit cee87d4eb0627cdd2a78bef6a279225018d28a6d Author: Olivier Crête Date: Sun Jun 8 21:27:37 2008 -0400 Name substream_add_codec_bin into more appropriate set_codec_bin commit a63985195e4342fad48ab0e3eefee8d00a0b7e3c Author: Olivier Crête Date: Sun Jun 8 21:13:38 2008 -0400 Re-indent FsRtpSession according to new rules commit 78536fb6ff86614fc30394b4ea07894174355226 Author: Olivier Crête Date: Sun Jun 8 21:08:54 2008 -0400 Explicit locking semantics commit c7e5e3f425c03739a346e4ecd57cabf0c5f1574b Author: Olivier Crête Date: Sun Jun 8 21:02:45 2008 -0400 Ignore the config data when specifying the send codec commit 00699437a3d1d50ef002716952215bfa19d7e2cc Author: Olivier Crête Date: Sat Jun 7 16:27:40 2008 -0400 Add a function to lookup a codecassociation by codec ignoring the config data commit 6c4f944e742901272ea6f14ccc9cc6fef4a63dd8 Author: Olivier Crête Date: Sat Jun 7 16:08:35 2008 -0400 Remove config parameters from FsCodec commit 1ec1719ae0f2e53952be6299a17031964ce786ff Author: Olivier Crête Date: Sat Jun 7 16:04:57 2008 -0400 Use negotiated codecs to get the config data.. commit 97a70a4f6d48f14d6421eb8a081ccbe4b11aeefd Author: Olivier Crête Date: Sat Jun 7 15:44:35 2008 -0400 Oops, had inverted the return values of codec_needs_config commit a35784c930881abd907a9b46d8fdec4dd55f9f6e Author: Olivier Crête Date: Sat Jun 7 15:37:07 2008 -0400 Add the discovered parameters in optional parameters commit 216b2500e117b88c26859e3ece7a25d266a682ee Author: Olivier Crête Date: Sat Jun 7 15:34:58 2008 -0400 Make the recv codec using only optional params and new magic commit ace48956dbbc63469a6072b5d7c465667637c22e Author: Olivier Crête Date: Sat Jun 7 15:31:28 2008 -0400 Make codec_copy_without_config "public" commit c30187d94c06262483801118a637b0576412cb41 Author: Olivier Crête Date: Sat Jun 7 15:28:44 2008 -0400 Keep optional params that are config params in last step of negotiation commit e076889412c0ccd72ff289f49a78ec6f815f7dec Author: Olivier Crête Date: Sat Jun 7 14:57:56 2008 -0400 Always use codec_nedds_config to check if there is a need to fetch config data commit 5c26e8c2b95fa76a3310958079ee83fba42f9d4e Author: Olivier Crête Date: Sat Jun 7 14:57:18 2008 -0400 Make codec_needs_config check if the config is already there commit a63de65fda28d92ac99afbd3dbc19b526a4e71ca Author: Olivier Crête Date: Sat Jun 7 14:53:22 2008 -0400 Ignore remove config data when negotiating commit 81ea115159015809562c06b9e64444ef9106f2cb Author: Olivier Crête Date: Sat Jun 7 14:51:13 2008 -0400 Update specific nego with newer fiber-rich coding style commit 4e9ba7e2381b6c725fbe911ff8610c6415877bce Author: Olivier Crête Date: Sat Jun 7 14:48:28 2008 -0400 Add function to remove config params from a codec commit a4d188ec0f2dc39aabfe546f155f56983e869c0b Author: Olivier Crête Date: Sat Jun 7 14:45:54 2008 -0400 Add fs_codec_remove_optional_parameter commit f15d6c310f601a48ea33f81fe2f2494e277ab67c Author: Olivier Crête Date: Fri Jun 6 17:54:28 2008 -0400 Add a capsfilter to the substream commit d8e8194af79c03d8cc27b82f84036eebcc3f738d Author: Olivier Crête Date: Fri Jun 6 17:35:11 2008 -0400 Invalidate substream codecs based on the config params too commit 038ed2a4d2addadb8799451e7140dc554ae18a69 Author: Olivier Crête Date: Fri Jun 6 16:52:13 2008 -0400 Set the receive codec based on the configuration data commit 6fd1d15854edac10c7ea7dc4d6e7ba37cff3af19 Author: Olivier Crête Date: Fri Jun 6 15:50:50 2008 -0400 Add fs_codec_are_equal_including_config() commit b25125a33df7b55f764017fa685d11ac9f7a842d Author: Olivier Crête Date: Thu Jun 5 18:28:05 2008 -0400 Add test to verify that the configuration data is properly discovered commit 04a82734cc1005d3642f1d85820c69d56ffe3c36 Author: Olivier Crête Date: Thu Jun 5 17:58:01 2008 -0400 Don't reset the pointer, but the pointed commit f8fd33e6cdc50879a3cd60d848b56e2579495afd Author: Olivier Crête Date: Thu Jun 5 17:53:39 2008 -0400 Re-indent and share some stuff in fs_codec_copy commit e896ec924ee76c397ec01154d973ee06d09b4814 Author: Olivier Crête Date: Thu Jun 5 17:52:50 2008 -0400 Copy th econfig param if they exist commit 79115585ce9469d595a72532f1d138dbaf1f9ced Author: Olivier Crête Date: Thu Jun 5 17:10:12 2008 -0400 Operate directly on the codec inside the codec association commit fe5bfdaaf0ef52cc168979a7a9c557cb6cb34931 Author: Olivier Crête Date: Thu Jun 5 16:43:56 2008 -0400 Remove useless custom negotiation function commit 40c867d595dbbe03f774fc497c7f92ec6b82c396 Author: Olivier Crête Date: Thu Jun 5 16:06:39 2008 -0400 Name the discovery elements meaningfully commit 5793f2ff373e1378f83b57e16c6f4e61c9645ec9 Author: Olivier Crête Date: Wed Jun 4 20:17:59 2008 -0400 Don't create the send codecbin/sources if no remote codecs have been set commit b6808084ee04d6eafd66dbb7fcb611739fd9fe5a Author: Olivier Crête Date: Wed Jun 4 19:04:50 2008 -0400 Add first version of the code to gather the codec config data commit cbd92ff848bc9684375b35a3b735697600b61745 Author: Olivier Crête Date: Wed Jun 4 17:31:38 2008 -0400 Keep the codec parameters of existing codecs if the negotiation hasn't changed them commit 6250b445f7c5e265d4d25f3bb2ca344c5d13dc4f Author: Olivier Crête Date: Wed Jun 4 16:00:25 2008 -0400 Add start of config-data test commit e47e21bbee9d9be92f240beef9409b3293f4b13e Author: Olivier Crête Date: Wed Jun 4 15:58:04 2008 -0400 Change the codecs immediately on setting the local_codec_configs commit ecf4028d525d08f88cf26c68c6deed3f36d21b44 Author: Olivier Crête Date: Wed Jun 4 15:08:16 2008 -0400 Verify if ca exists before dereferencing it commit d03c4de4816d6e0ccc794c528fbb412030a7c426 Author: Olivier Crête Date: Wed Jun 4 13:55:25 2008 -0400 Add documentation for the "farsight-codecs-ready" message commit 0074b65095d6fbdfb0d1b66c083553a467c24608 Author: Olivier Crête Date: Wed Jun 4 13:29:46 2008 -0400 Implement codecs-ready property in FsRtpSession commit d370782e4b8c568b043b5b1bc0d279f84f1dec0b Author: Olivier Crête Date: Mon Jun 2 17:17:37 2008 -0400 Add a function to know if a parameter for a codec is a config-param or not commit 0b33876eaf5621d0413116542b8d3927b17cd7ae Author: Olivier Crête Date: Mon Jun 2 17:15:55 2008 -0400 Add fs_codec_add_config_parameter commit cb45470b14463d852203303dc16f4cb215441750 Author: Olivier Crête Date: Thu May 29 18:23:33 2008 -0400 Move common code into add_send_codec_bin commit 42905161173ceb8132cccca992d7fcebb160d9aa Author: Olivier Crête Date: Thu May 29 18:11:15 2008 -0400 Add tee after the send valve commit caad17e43093f057ad1c41a36875af7775686011 Author: Olivier Crête Date: Thu May 29 14:58:15 2008 -0400 Don't re-request config params from codecs that already have them commit 61c841314fd5376c02f2146b9a683abaefe450de Author: Olivier Crête Date: Thu May 29 14:57:58 2008 -0400 Keep the codec params when re-generating codecs commit bb3ddd00f5a4646090f795f61f6205844e4db9ad Author: Olivier Crête Date: Thu May 29 12:09:14 2008 -0400 Mark codecs for config retrieval from table commit c3fb6ef2c2d09055e38f5175a546f145cf607151 Author: Olivier Crête Date: Thu May 29 11:47:29 2008 -0400 Split codec negotiation into negotiation and effectuation commit cc05ac2543e76b39075796e1780983fb05780070 Author: Olivier Crête Date: Thu May 29 11:18:06 2008 -0400 Create an initial list of codec associations when building a session commit e1f5678e06ca783b0ad70c9d3b3f297e24d2564d Author: Olivier Crête Date: Thu May 29 11:17:42 2008 -0400 Remove useless printing commit 53005f7023613a06a80dd34f25f930c62bcaba90 Author: Olivier Crête Date: Thu May 29 11:17:00 2008 -0400 Don't change the PT if we're re-using an already existing codecassociation commit 2f80d8a81989b37a37894722725e6d337bbe95d3 Author: Olivier Crête Date: Wed May 28 22:40:50 2008 -0400 Re-use existing (even disabled) codec associations when regenerating new ones commit 91601696888908bf0775f5e11b8a631c2ae3d2d5 Author: Olivier Crête Date: Wed May 28 22:40:03 2008 -0400 Don't change the pt of the reserved-pts (for obvious reasons) commit f3038d7b3bdc4eb4e69c9398a4a0da31ba1d40a7 Author: Olivier Crête Date: Wed May 28 22:32:37 2008 -0400 Ignore oldca if it doesnt exist commit bc0174ba76cd73d3d099707a3deec7d673a9f216 Author: Olivier Crête Date: Wed May 28 22:32:14 2008 -0400 Improve appearance commit b7e1314ec29430d22496831f5bdc1bfc981ea3f4 Author: Olivier Crête Date: Wed May 28 22:17:53 2008 -0400 Add test to verify that set_local_codecs_config() with the local codecs is idempotent commit d37e4ece4b7441ff964035c3a6456933c671da08 Author: Olivier Crête Date: Wed May 28 20:10:25 2008 -0400 Don't fail reserve-pt test if codec ids don't start at 96 commit 6f608b5479fd26ed3b94b900186fee343beabc5b Author: Olivier Crête Date: Wed May 28 19:57:20 2008 -0400 Rename negotiated_codecs into codecs commit eec93c460013b4e36adb3eddef9d240632c552c6 Author: Olivier Crête Date: Wed May 28 17:20:16 2008 -0400 Standardise indentation commit 3fc3b6d6e2524b69079e8224839012dcf69ae10e Author: Olivier Crête Date: Wed May 28 17:18:39 2008 -0400 Replace generic pointer which typed one commit 5440eabe56c649945fac5ffc13ef516327f8c7f5 Author: Olivier Crête Date: Wed May 28 17:17:33 2008 -0400 Move Remove the duplicate lookup commit 8e65b0907fc7f9cec360327180d4ef30e3d7f687 Author: Olivier Crête Date: Wed May 28 15:59:55 2008 -0400 Document new callback a bit commit b0b1ee5f5706b504ba4683d9f3eddebfe0609d0d Author: Olivier Crête Date: Wed May 28 15:56:21 2008 -0400 Fix small leak commit 629da69ef6a263ab4ad270c81561e58a8ba70ab8 Author: Olivier Crête Date: Wed May 28 14:42:51 2008 -0400 Fix comment after copypasting commit 972ef88ec451fc8fac498d32a9a0d24f334e8f6b Author: Olivier Crête Date: Wed May 28 14:07:36 2008 -0400 Merge fs_rtp_session_get_recv_codec_for_pt into the only place its called from commit 33d636b3ebbe7b34232aa9e9a080bd1b214e12d1 Author: Olivier Crête Date: Wed May 28 14:03:30 2008 -0400 Make the related functions private to the stream commit 0eb002e60fcf0a8260ae62352ed105caff6cc99f Author: Olivier Crête Date: Wed May 28 14:02:14 2008 -0400 Move codec selection/addition on codew change to session from substream commit 077716922f2245ba018f08645b77e058cebaddaa Author: Olivier Crête Date: Wed May 28 13:51:03 2008 -0400 Listen to the blocked signal in the session commit 7214958fcaf3d6b195ac96cccddfe227effa6620 Author: Olivier Crête Date: Wed May 28 13:19:36 2008 -0400 Make the result of the rtpbin_blocked_cb only depend on the state of the substream commit e6a3fda63fb26d3349f813c8b8d3e29cb993e576 Author: Olivier Crête Date: Tue May 27 20:54:07 2008 -0400 Merge new_codec_bin into add_codec_bin commit 71bbfb43720fc57267b0f02e6fc2a989d3764b8b Author: Olivier Crête Date: Tue May 27 20:44:12 2008 -0400 Make new_recv_codec_bin_locked method private commit 5dd2b01a3d072b21cb5ea0b2eea5e6aa37ba7552 Author: Olivier Crête Date: Tue May 27 20:38:36 2008 -0400 Move function to select substream codec into session commit 4aaa2bd9adf7cfd1cb1a881edb6bdfe62724c565 Author: Olivier Crête Date: Tue May 27 20:37:18 2008 -0400 Fix small typo commit f1e0cd5618500c0defa774ccc3a79142b54a30e9 Author: Olivier Crête Date: Tue May 27 20:27:33 2008 -0400 Split codecbin addition into creation and setting commit 373b95f7d594816a72fb4b38674b39331eb8460a Author: Olivier Crête Date: Tue May 27 20:26:52 2008 -0400 Add check for invalid codec on src-pad-added signal commit a19c8acff68a8d298112ca9614261ed87dd674dc Author: Olivier Crête Date: Tue May 27 19:35:14 2008 -0400 We're using a recursive lock, remove unlocked version commit e1d333809f0ad5dd5fdc390d8f034496a62d63fd Author: Olivier Crête Date: Tue May 27 19:17:23 2008 -0400 Replace add_codecbin with set_codecbin (which also removes the old one if it already exists) commit 5001bf709f0214db623690ba169072384d7c939d Author: Olivier Crête Date: Tue May 27 18:36:04 2008 -0400 have the rtp substream emit a signal when its blocked commit 7e6ed57b1794cab075c42f1b4ec9409b3c65266e Author: Olivier Crête Date: Tue May 27 14:53:57 2008 -0400 Add vorbis/theora negotiation functions commit 129e13d2dfcacfc9bf16d091037b65699fe1feaa Author: Olivier Crête Date: Mon May 26 18:18:58 2008 -0400 Use signal to do re-negotiation commit 4e148709595b1815f9962f3922221730cd079050 Author: Olivier Crête Date: Mon May 26 18:05:58 2008 -0400 Have the stream emit a signal when new remote codecs are set commit 45037a2c49ab56a8429810fa3dc7d31bc84984a3 Author: Olivier Crête Date: Mon May 26 17:33:25 2008 -0400 Remove local_codecs private member from the FsRtpSession (its always computer on demand now) commit 97df2bce606ad2b5768eb8032ade9122b1a932aa Author: Olivier Crête Date: Mon May 26 17:33:03 2008 -0400 Use negotiatied codecs to generate new local codecs commit e2f6babc00f84b2760978f36b58a1b202e1ed581 Author: Olivier Crête Date: Mon May 26 17:32:32 2008 -0400 Remove old negotiation function commit adce415db4ddbd26f0fb161de8ffe9053cd70f81 Author: Olivier Crête Date: Mon May 26 17:27:28 2008 -0400 Use new negotiation algorithm directly commit b781592b414cd70bca7d45fc92d9c8af520393e4 Author: Olivier Crête Date: Mon May 26 16:56:06 2008 -0400 Put argument of fs_rtp_session_negotiate_codecs in a more logical order commit eb93ffc2b8d330834ccdaabdb2b79f97160acc7d Author: Olivier Crête Date: Mon May 26 16:55:12 2008 -0400 Export new functions commit 495066172e716105f735b3e92f53251fa81dc914 Author: Olivier Crête Date: Mon May 26 16:26:11 2008 -0400 Make locking rules clearer commit b887b213a746a3fc1fa2804cbee034f9233f2d62 Author: Olivier Crête Date: Mon May 26 13:55:15 2008 -0400 Use new function in old negotiation commit 15ffa630d136e8a2acc39a38149c30ef0c8d750d Author: Olivier Crête Date: Mon May 26 13:52:31 2008 -0400 Add function to complete the codec negotiation commit b8f45a992e52d4f771537ed3f0c7708fb759f672 Author: Olivier Crête Date: Fri May 23 19:08:23 2008 -0400 Use new stream negotiation function in old negotiation function commit 17a1185768608667814ffc9da31094de67602fb5 Author: Olivier Crête Date: Fri May 23 19:02:59 2008 -0400 Reject list of codec associations without valid codecs commit 41c36632d1e449ff19ac601bd2b52f4ba5cd0d99 Author: Olivier Crête Date: Fri May 23 18:49:25 2008 -0400 Add function to negotiate codecs for one stream commit 36a2e719c68cef6599b1493a4298fab3f65d2043 Author: Olivier Crête Date: Fri May 23 18:12:27 2008 -0400 Make the blueprint/codec pars of the CodecAssociation "public" commit b166242be3a2b452040345a261089948319f0c57 Author: Olivier Crête Date: Fri May 23 15:22:26 2008 -0400 Add more complete test for reserve-pt commit 5bdb0e4e7efcabcda718c269a382de43a4d00ba7 Author: Olivier Crête Date: Fri May 23 14:53:42 2008 -0400 Generate local codecs on the fly commit 39d6bc87aac201026fd239349c4913e47cd67adf Author: Olivier Crête Date: Fri May 23 14:52:53 2008 -0400 Use strcmp correctly... commit 914c343abc619f82356622746b830fa3057ea0a9 Author: Olivier Crête Date: Fri May 23 14:19:37 2008 -0400 Make the local codec negotiation use the new standard indentation commit e9b7a913e8f8de31d1bb69fef6561bc6e39c92e2 Author: Olivier Crête Date: Fri May 23 14:05:34 2008 -0400 Document create_local_codec_associations function commit 394ab27e5034795b897795e0a22899e5a7d3e096 Author: Olivier Crête Date: Thu May 22 20:29:52 2008 -0400 Create new local codecs from previously negotiated ones commit dd35045ca1aae13e601dae74217f10e2ae9419bf Author: Olivier Crête Date: Thu May 22 20:18:21 2008 -0400 Add check on NULL ca in copy function commit 8d88361d95336977daf84018ba31860f71d0d526 Author: Olivier Crête Date: Thu May 22 20:17:47 2008 -0400 Add version of the codec_assoc custom lookup function that doesnt not ignore disabled codecs commit f77b691f65f0d5d10a7057afce6c44087bd7df37 Author: Olivier Crête Date: Thu May 22 19:55:36 2008 -0400 Remove useless gst caps in specific negotiation functions commit 978c613cad7f608d0cbe2915dd3fe6afc5cd226f Author: Olivier Crête Date: Thu May 22 19:32:14 2008 -0400 Rename custom lookup function to match others commit 4e67fd97fa55fd698c17f45deabbc0b24cbace57 Author: Olivier Crête Date: Thu May 22 19:07:35 2008 -0400 Fix indentation commit 1434fd9d4fb17641fe585a479387cf598dbdfcf0 Author: Olivier Crête Date: Thu May 22 17:53:30 2008 -0400 Mark reserved pts with their own flag commit 9ce7d8c4af2685a665f352da3c398c577d632a54 Author: Olivier Crête Date: Thu May 22 17:36:39 2008 -0400 Add sanity check commit 19ce42b9c7a79abd2f5be0aea4ee36b98141bc5d Author: Olivier Crête Date: Thu May 22 17:32:57 2008 -0400 Move function to compare lists of codec associations into the codec-negotiation file commit 546ebd7ed80d5614b82cf284cf652392452aa718 Author: Olivier Crête Date: Thu May 22 17:29:06 2008 -0400 Rename the function to compare lists of codec associations commit 3b0ad13aff4181514137ae622ff10a43800b6f53 Author: Olivier Crête Date: Thu May 22 16:46:05 2008 -0400 Remove useless empty lines commit cd22b4b1e769eca01fbcbd2cdf9e99f6c66730ed Author: Olivier Crête Date: Thu May 22 16:25:27 2008 -0400 Completely remove negotiated_codecs list commit f8b89f3ba9c2c4c52fb63ec416b512eeed944148 Author: Olivier Crête Date: Thu May 22 16:23:20 2008 -0400 Make the special codec negotiation use the codec associations commit e578172583d202c7f8fc170260f87b42782ca0d6 Author: Olivier Crête Date: Thu May 22 14:17:25 2008 -0400 Use CodecAssociation directly in send codec selection process commit 424f15c0912fa99adec105c52d81dc17587a819b Author: Olivier Crête Date: Thu May 22 14:01:43 2008 -0400 Add function to check if a codec association is valid for sending commit 02353985b9db137c2df3bbcb1c2726dbe37b78c6 Author: Olivier Crête Date: Thu May 22 13:37:26 2008 -0400 Compare lists of codecassociations instead of codecs commit 0c0f4962e9e7ccb8fca961491f41b60561402227 Author: Olivier Crête Date: Thu May 22 13:04:34 2008 -0400 Generate negotiated codecs from the codec associations list commit b5cca54b91d908115d64407be337f9f05b6f9b02 Author: Olivier Crête Date: Thu May 22 13:04:18 2008 -0400 Use new function to generate local codecs commit da4c6e12cdbd69edfa6c42a1b92926154127351c Author: Olivier Crête Date: Thu May 22 12:52:02 2008 -0400 Further document the CodecAssociation structure commit 0775da97e5d1738628fd8342b77120d88bd28ff2 Author: Olivier Crête Date: Thu May 22 12:48:37 2008 -0400 Add function to transform a list of CodecAssociation to a list of valid codecs commit 49887b57397e263fce0bf981887df3369ee6b158 Author: Olivier Crête Date: Thu May 22 12:48:18 2008 -0400 Document codec_association lookup functions commit 171b7a76e5904e6ba78b85d1f421ce46e32e92d3 Author: Olivier Crête Date: Thu May 22 12:40:04 2008 -0400 Remove uses of negotiated_codecs in select_send_codec_locked commit a06385620296a1c6b77b4db1bb95b99070f6d9a9 Author: Olivier Crête Date: Thu May 22 12:35:15 2008 -0400 Use the lookup_codec_association_by_codecd in set_send_codec commit 53c6ae0b908e5d0a079acb6a79f6b60e55c5c0af Author: Olivier Crête Date: Thu May 22 12:34:57 2008 -0400 Add function to search a codec association by codec commit 817dc83b2986aef846ce2894d03aff1c50b04fe2 Author: Olivier Crête Date: Wed May 21 19:41:05 2008 -0400 Transform negotiated_codec_associations from a hashtable to a glist commit 03eba2ccfbd87a02f66fb70352fb89fbcea713a0 Author: Olivier Crête Date: Wed May 21 18:49:59 2008 -0400 Use lookup function to access codec_associations instead of doing it directly commit 9b102fe5ae28cc5355b30041e773586f188fbe8a Author: Olivier Crête Date: Wed May 21 18:39:18 2008 -0400 Remove CN hack commit 69b7c9c5700f2153c714b4532fe0b897426a25fe Author: Olivier Crête Date: Wed May 21 18:12:29 2008 -0400 Remove now unused local_codecs variable commit 37d8d9d79dd708e361822ceb8104ba74f3b6e1c2 Author: Olivier Crête Date: Wed May 21 18:06:56 2008 -0400 Generate local codecs on the fly from local codecs associations commit 6c96c832b910f960f9296abc6d363cc5fa0c5533 Author: Olivier Crête Date: Wed May 21 18:03:26 2008 -0400 Remove unused media_type argument commit 49ee70d9c3f73f2371a8d5f20c82db65ad5b1f24 Author: Olivier Crête Date: Wed May 21 18:00:18 2008 -0400 Remove useless error message and commented-out code commit 11372882ae2329dfd5f857dd60f2ecd508919b3c Author: Olivier Crête Date: Wed May 21 17:59:36 2008 -0400 Make error on no local-codecs-assocs in constructor more exact commit b6c843fb83dfdf03b033863e26e140407af6667f Author: Olivier Crête Date: Wed May 21 16:50:20 2008 -0400 Make local_codec_associations into a GList commit 497915512c726028d5c97d3c6cbf01707faed380 Author: Olivier Crête Date: Wed May 21 16:26:49 2008 -0400 Re-indent file commit b7a956b0f4b72c030cb61524b04568efe138ab77 Author: Olivier Crête Date: Wed May 21 15:50:32 2008 -0400 Add properties to the CodecAssotiation struct for new situations commit 920c88f1c42f93f83a05722bab3ff37f112a519d Author: Olivier Crête Date: Tue May 20 14:49:12 2008 -0400 Fix negoCiation again commit e64a9660af7eaa4afe0fbdfa1ed9677adf120f3d Author: Olivier Crête Date: Tue May 20 14:46:04 2008 -0400 Emit the "farsight-codecs-changed" message when the codecs change commit bd0d2af0334058e68ef2a5db15100ed4dd91fb5e Author: Olivier Crête Date: Tue May 20 14:35:19 2008 -0400 Add farsight-codecs-changed signal to FsSession commit 5febbbbe4387e10b6e45faef3f0131ceb74304d3 Author: Olivier Crête Date: Tue May 20 14:35:03 2008 -0400 Add "codecs-ready" property to FsSession commit 33ee0feafd7d370a668da888962b04bb934e2427 Author: Olivier Crête Date: Tue May 20 13:54:58 2008 -0400 Add config_params to the FsCodec structure commit 66cd09105e34cf13d92d0a2713eab5e1051b8b59 Author: Olivier Crête Date: Mon May 12 16:05:09 2008 -0400 Don't pass useless list of local codecs into codec negotiation function commit fa8b059ebbe9a1a45d93f3aa2283a3b1117461a2 Author: Olivier Crête Date: Wed Apr 30 15:56:04 2008 -0400 Fix negoCiation commit 008ad5473e898cd18df3b52334dd0d23a01dc7d7 Author: Olivier Crête Date: Wed Apr 30 14:47:44 2008 -0400 Update codec parameter doc to match current state commit 37ce3fd42b1761a66a2364d0f553fc9d5ae5a456 Author: Olivier Crête Date: Wed Apr 30 14:45:07 2008 -0400 Import design doc for codec nego from fs1 commit 216dd6ff7984176d5099dac18dcd40f4c9aadde3 Author: Olivier Crête Date: Fri May 23 15:44:00 2008 -0400 Use dtmf muxer, instead of regular rtp muxer commit bdb4b6e5691b5e1c93a0b9fcc5f39ad6ef444936 Author: Olivier Crête Date: Thu May 8 16:36:22 2008 -0400 Add file describing the coding style commit 290d8a6072606acc6dbf9c184a9b2e2230d2e7da Author: Olivier Crête Date: Thu May 8 12:54:30 2008 -0400 Update deps to match reality commit e7990754e56ad28cabefbae93b6e71d79af8dd63 Author: Olivier Crête Date: Tue May 6 20:37:11 2008 -0400 Allocate CodecAssociations using GSlice commit bac611eefc0e1e22590872a3c2b5f5950ec369d8 Author: Olivier Crête Date: Tue May 6 20:32:37 2008 -0400 Allocate CodecBlueprints using GSlice commit f2b4ea1c789e2f37c13fe74102edf19e976d7506 Author: Olivier Crête Date: Tue May 6 19:44:37 2008 -0400 Allocate CodecCap using GSlice commit 395e3fc94a1e7579327fbe45dbd23f8a8d2ae20f Author: Olivier Crête Date: Tue May 6 19:41:09 2008 -0400 Allocate UdpPort using gslice commit 9e7b831c8c914a8af9baa123947d39120a6a03df Author: Olivier Crête Date: Tue May 6 19:33:48 2008 -0400 Allocate UdpSock using GSlice commit add01c013d5b78ff77cc9fd992d94bab7e17c11b Author: Olivier Crête Date: Tue May 6 19:30:52 2008 -0400 Allocate FsCandidate usnig GSlice commit 477bf7e65dc77593bf53c79a519866fe13729fe0 Author: Olivier Crête Date: Tue May 6 18:04:54 2008 -0400 Allocation FsCodec using GSlice commit eaf80c7603f1f8efb2e8866bc6cebb6f5ca6fa0f Author: Olivier Crête Date: Tue May 6 18:40:55 2008 -0400 Use fs_codec_add_optional_parameter everywhere commit 58703a85df9292a12a90dbe62c1b774f698a8499 Author: Olivier Crête Date: Tue May 6 19:00:52 2008 -0400 Add add_optional_param to python defs ? commit 8eca6c35a44c4f4b81a1af2de3e91f9310f8e423 Author: Olivier Crête Date: Tue May 6 18:14:42 2008 -0400 Add fs_codec_add_optional_parameter function commit 4d895cb0356b60b2413553db6a3148fdd958e1b3 Author: Olivier Crête Date: Tue May 6 16:29:53 2008 -0400 Put the ldadd, cflags in the right order and on different lines commit 679b0a004bc02cab4548c9b217f04dca03ac55a7 Author: Olivier Crête Date: Mon Apr 28 13:41:03 2008 -0400 Don't use gst version when installing our docs commit 4532089439d4d11edc757ac4bc7005ac80197ab3 Author: Olivier Crête Date: Thu Apr 24 13:09:05 2008 -0400 Add documentation for fs-interfaces commit 46b39b14c11247a2e8c718b5ef78628719e56362 Author: Olivier Crête Date: Thu Apr 24 13:00:44 2008 -0400 Rename farsight_ interfaces functions into the fs_interfaces_ prefix commit f12c929c6ee8d29cb1afdbe5bd5b6c8269efd55b Author: Olivier Crête Date: Thu Apr 24 12:58:00 2008 -0400 Add begin/end decls commit 6d991b94870d5a1efdd0fff2047b1d62ab679197 Author: Olivier Crête Date: Thu Apr 24 12:56:55 2008 -0400 Move fs-interfaces into core library commit dd4a12a19e234b26eda56add0038dbe9ddca1f3e Author: Olivier Crête Date: Tue Apr 22 19:29:49 2008 -0400 Add getters for the component count to the transmitters commit edca059a46f132281dcca6c0c725fa45c1db487e Author: Olivier Crête Date: Tue Apr 22 19:15:13 2008 -0400 Fix comments in multicast transmitter commit 097b1a268bbdd78a363b800050949b1a0303f9e4 Author: Olivier Crête Date: Tue Apr 22 18:57:49 2008 -0400 Remove trailing whitespace in makefile.am commit 80043602c8791907c4cc936db384c84195747c36 Author: Olivier Crête Date: Mon Apr 21 17:32:39 2008 -0400 Use the enum types in for the error signals commit 90eb7dce50c56ffa4aed7a5b9c49925b7de96a81 Author: Olivier Crête Date: Fri Apr 18 14:45:18 2008 -0400 Fix some small leaks commit 19c7774bd0378099767482bd8edb756116cc1073 Author: Olivier Crête Date: Fri Apr 18 13:28:28 2008 -0400 Use set_locked_state trick to stop the elements commit 1dab2d980153f5a5947338ee040a8e867e8d343c Author: Olivier Crête Date: Thu Apr 17 20:06:03 2008 -0400 Don't unlock lock in pre-locked function commit 5328481b9a3aa694ce707d78e842a1f5eb9789bc Author: Olivier Crête Date: Thu Apr 17 15:43:23 2008 -0400 Use local headers in priority when building python bindings commit 112823425a65e5a2aefada8618c7bb0e50b42ded Author: Olivier Crête Date: Thu Apr 17 15:38:23 2008 -0400 Release the lock also for early return commit 86238e8cd805f6107dec7eafa67ce741eaa49cb5 Author: Olivier Crête Date: Sun Apr 13 23:21:08 2008 -0400 Don't leak new codec if it already exists commit 97db07fb533163e144ffbfb324392e8261010b45 Author: Olivier Crête Date: Sun Apr 13 22:44:17 2008 -0400 Remove build marshallers, but add list file in tarball commit cff795d7750d29fd00a5e30a636ab82a0c0fb079 Author: Olivier Crête Date: Sun Apr 13 22:34:38 2008 -0400 Import newer common files from gstreamer cvs commit c2ab1de6f6a54b9288730b5d948feb48997aa4d5 Author: Olivier Crête Date: Sun Apr 13 22:25:10 2008 -0400 Don't leak candidate in test commit 4793ddba623c96e0fb600ede2f4a4df73ab4cbb5 Author: Olivier Crête Date: Sun Apr 13 22:18:50 2008 -0400 Don't modify a GList while iterating it commit 1fac1efa30ca32c0c88181c5f7152cf8639e668d Author: Olivier Crête Date: Sun Apr 13 21:57:39 2008 -0400 Don't leak GErrors in tests commit 8d90c571904800df6ac118973324e26fdc93a745 Author: Olivier Crête Date: Sun Apr 13 12:52:10 2008 -0400 Define the error signal in the rawudp component and forwards the errors in the streams. commit edccbbb98cd53c45e32cbafb80e39c046244482d Author: Olivier Crête Date: Sun Apr 13 12:40:13 2008 -0400 Seems like windows has an ERROR macro, renamed our signal to ERROR_SIGNAL Original patch from Haakon Sporsheim commit 228208a619c434c4f72e2dc36e6a8dbac683bdb4 Author: Olivier Crête Date: Sun Apr 13 12:30:34 2008 -0400 Add mangling for stupid microsoft renaming posix functions Patch from Haakon Sporsheim commit f5d923eae738b0c468ab389b1a2a4cc8ea7fb147 Author: Olivier Crête Date: Sun Apr 13 12:20:55 2008 -0400 Added win32 implementation of fs-interfaces.c Patch from Haakon Sporsheim commit ab9156a8d4e7ce46fd42cca92002af08fa46c939 Author: Olivier Crête Date: Sun Apr 13 12:19:44 2008 -0400 Added explicit (const void *) cast for sockopt(...) argument Patch from Haakon Sporsheim commit 5e19c4adb899c3c786ddad5c85dfc02d333721ab Author: Olivier Crête Date: Sun Apr 13 12:18:57 2008 -0400 Added missing HAVE_IP_MREQN guards when using mreq.imr_addres/mreq.imr_interface Patch from Haakon Sporsheim commit d67e0059f7580c1a49268e26ed64576e583d17dd Author: Olivier Crête Date: Sun Apr 13 12:16:58 2008 -0400 Added #include "config.h" to missing .c files. Patch from Haakon Sporsheim commit 7d36d03522aa3f94eacd55ea58bad1626be90cf4 Author: Olivier Crête Date: Sun Apr 13 12:15:56 2008 -0400 Added fix for all inclusions of socket related headers with G_OS_WIN32 usage. Patch from Haakon Sporsheim commit 42b966a2ed3badf3ecf61cbe60508ef512e5ef98 Author: Olivier Crête Date: Sun Apr 13 12:05:23 2008 -0400 Removed #include in fs-multicast-transmitter.h. It was not needed Patch from Haakon Sporsheim commit 01c02f40540886dd9e702961a32c6963ef129636 Author: Olivier Crête Date: Sun Apr 13 12:02:51 2008 -0400 Added HAVE_UNISTD_H guard for all #include . Patch from Haakon Sporsheim commit 98fce3ec4d3fa9d77d367644267767b60a6e9296 Author: Olivier Crête Date: Sun Apr 13 11:58:06 2008 -0400 Added explicit cast for ips in g_free (ips) cal.l Fix for MSVC mainly. Patch from Haakon Sporsheim commit 8736fa5a3e7b28f1bc9efbe31a3606e8cc76fc50 Author: Olivier Crête Date: Sun Apr 13 11:50:11 2008 -0400 Remove empty structures, they're only valid in C99 commit bef465531d08be1e0a8de3f0264851ce898634e3 Author: Olivier Crête Date: Sat Apr 12 17:16:07 2008 -0400 Upgrade gst-p-farsight dep to 0.12.7 commit d567f23321a0ef38c73575263eb1af2b1e168cce Author: Olivier Crête Date: Sat Apr 12 17:09:15 2008 -0400 Make fs2-gui.py not depend on python 2.5 commit ab6be3fe8fb2cd80e21983b8c02d7c3114c7beee Author: Olivier Crête Date: Sat Apr 12 16:54:46 2008 -0400 Add python wrapping for fs_codec_list_are_equal() commit bed8edaa7d6453e6727f4122d98a0639dc070039 Author: Olivier Crête Date: Sat Apr 12 16:53:58 2008 -0400 Add unified function to do pylist->glist of fscodecs commit 9aacea9f99c8ebedb85a80e6f41032ef0b995265 Author: Olivier Crête Date: Sat Apr 12 15:41:25 2008 -0400 Add set_local_codecs_config to the python bindings commit 01efcc368ca5a4e0feb6540dd82afe6e3868a43c Author: Olivier Crête Date: Sat Apr 12 15:18:55 2008 -0400 Add rtp implementation of new set_local_codecs_config method commit ddbcae940a6ea448e669d6a3f9069da837b6306f Author: Olivier Crête Date: Sat Apr 12 14:01:58 2008 -0400 Add failable fs_session_set_local_codecs_config() commit 66a845dbf6ad7518dc66d74d2e80748c442b2bfd Author: Olivier Crête Date: Sat Apr 12 15:16:17 2008 -0400 Add new fs_codec_list_are_equal() function commit fa64bb967e77b600ec5b67784a16ca0d82c644f6 Author: Olivier Crête Date: Sat Apr 12 14:32:01 2008 -0400 Add new error code for when there is no local codecs commit 3796b15180f36d6d936f0536cb0b0b693a8a89f6 Author: Olivier Crête Date: Sat Apr 12 14:23:46 2008 -0400 React properly to NULL codecs (with tests) commit f91a6d7d576ce90d27c141a53dfacfc41621300c Author: Olivier Crête Date: Sat Apr 12 15:18:26 2008 -0400 Depend on right variable to rebuild enum types commit 72172ba3bcc6566cf4b14c95e46249983a0345b3 Author: Olivier Crête Date: Sat Apr 12 15:37:17 2008 -0400 Remove candidate_id from the python test commit 450fce0dd46433d50f1177aa2aff46878b07d43b Author: Olivier Crête Date: Sat Apr 12 15:25:11 2008 -0400 Update python binding for new api changes in candidates commit e7bb5bcd11316c151007d836f4bf235e1301fd2b Author: Olivier Crête Date: Sat Apr 12 13:06:48 2008 -0400 Remove dead code, local-codecs-config are not construct time after all commit 90ad061ee82be1014d4323dd8d33d6c19bc79d9c Author: Olivier Crête Date: Fri Apr 11 15:14:41 2008 -0400 Have the new codec too in current-recv-codecs-changed commit 89299355f0616a0c7f5b8cb87a608736103dfa8c Author: Olivier Crête Date: Thu Apr 10 22:24:08 2008 -0400 Select candidate pair now takes const arguments commit faace66b98b4e657285a877c276fe23a60027b3d Author: Olivier Crête Date: Thu Apr 10 21:37:16 2008 -0400 Fix error message commit 58426223683c684a70eea2e2f5dc3af0853d1041 Author: Olivier Crête Date: Thu Apr 10 20:51:09 2008 -0400 Don't crash on NULL parameters for FsElementAddedNotifier commit 6c65100dbc40a4b3daf64705639be16b41967763 Author: Olivier Crête Date: Thu Apr 10 20:42:37 2008 -0400 Add tests for NULL parameters for FsElementAddedErrors commit 634de3417f3dbf8c2f62049e7d94a30429bfdc18 Author: Olivier Crête Date: Fri Apr 11 01:19:43 2008 -0400 Put libtool versioning in lib commit 99916b5308830c86dcaddc039d8a5d8e8c3b5443 Author: Olivier Crête Date: Thu Apr 10 19:59:47 2008 -0400 Add another audioconvert commit 04acacf62a9fe6ba9ca728f1fcf855f4eda69942 Author: Olivier Crête Date: Thu Apr 10 15:19:27 2008 -0400 Fix typo in documentation commit 893e67160c1ec24c1fb52b97659d3313345d93b4 Author: Olivier Crête Date: Thu Apr 10 00:35:19 2008 -0400 Candidate priority is a guint32 commit 8937cc894c96d3a570f81f3079d89aee56aa7d19 Author: Olivier Crête Date: Wed Apr 9 23:54:45 2008 -0400 Disable multicast test with specified interface on multihomed machines... commit ff51a2959bc1f14e205b39d661efb28f83b2654d Author: Olivier Crête Date: Wed Apr 9 23:45:27 2008 -0400 Ignore NULL encoding names, dont use glib 2.16 g_strcmp0 commit e898dcaa4ff125e8bb399ac655a165576daae50a Author: Olivier Crête Date: Sun Apr 6 17:36:32 2008 -0400 Make it clear that element-added can be emitted anywhere commit cad9f17c77e8928c2cf54bc836fabb0fb9260b5d Author: Olivier Crête Date: Wed Apr 9 17:27:13 2008 -0400 Merge candidate_id field into foundation field (they're the same) commit 9458a562bceb14e4c1aa4e1d5475725e25ee70cf Author: Olivier Crête Date: Wed Apr 9 17:26:44 2008 -0400 Use fs_candidate_new() in the rawudp test too commit 13ae72105f46074ef679f3f1b7decd92a4d0d7f7 Author: Olivier Crête Date: Wed Apr 9 12:46:19 2008 -0400 Don't crash on null encoding-name (seems like jingle allows that) commit fb7269685faa7d46fa20dd8b7ac53dcd746ac17f Author: Olivier Crête Date: Wed Apr 9 12:42:54 2008 -0400 Only use linux ip_mreqn if it exists, otherwise revert to ip_mreq; commit 7e7f6f7ca223586a2d1a28082b126ed9371e3425 Author: Olivier Crête Date: Wed Apr 9 12:40:19 2008 -0400 Add test for ip_mreqn structure commit 79dcc536c4893c011defb1ce5fd9618b3225de2d Author: Olivier Crête Date: Wed Apr 9 12:21:57 2008 -0400 Document the "farsight-error" bus message and make "error-no" into a FsError commit 660bf1bd73f3774389364675d7b05fbd946d86bd Author: Olivier Crête Date: Wed Apr 9 11:56:45 2008 -0400 Add a list of the new recv codecs to the bus message commit 4bd4e39cadfe28a19a74687db8046fbb6b172fbc Author: Olivier Crête Date: Wed Apr 9 11:49:03 2008 -0400 Fix little leak commit 4ab22285c3ed4468ee55674d0141d6eb2e7fddb4 Author: Olivier Crête Date: Wed Apr 9 11:37:17 2008 -0400 Document new bus message commit aa3e1411ee158728307dc414a85c9ec100461301 Author: Olivier Crête Date: Wed Apr 9 11:33:04 2008 -0400 Make test use new message commit 74fca93cdabcef05701193194c2c682b4e1dc5a3 Author: Olivier Crête Date: Wed Apr 9 11:19:38 2008 -0400 Emit a bus message on changes in the currently sent codec commit 694db4a6dafd162539800c379ae1cd9d80e51da0 Author: Olivier Crête Date: Wed Apr 9 11:12:25 2008 -0400 Check if its the right type of bus message commit b9c14db5791ee09eb970bd821462f5c99b1cec19 Author: Olivier Crête Date: Wed Apr 9 11:09:15 2008 -0400 Use gst_structure_has_name instead of strcmping commit 4466f7463404279ed829a9336129ef68fd182f87 Author: Olivier Crête Date: Tue Apr 8 21:25:24 2008 -0400 Make tests and gtkdoc build use the uninstalled libraries commit f352cb6bf54aa760b9543a0f42491faee39d3ae5 Author: Olivier Crête Date: Tue Apr 8 21:06:07 2008 -0400 Link tests/gtkdoc against our local version of libgstfarsight commit fc51b576aa458fa28835dd4a76ece02a3e8913cd Author: Olivier Crête Date: Tue Apr 8 21:05:19 2008 -0400 Add document of new gst messages commit a794f42ddc1c97ca0009c0cd483813af84347254 Author: Olivier Crête Date: Tue Apr 8 21:04:24 2008 -0400 Remove obsolete signals commit 5d6f4b452a99f97e04fa697fe20700699ac22864 Author: Olivier Crête Date: Tue Apr 8 20:53:59 2008 -0400 Don't put the session in the messages coming from the streams commit 91f5fc0f411cfe9ad29d5f5195d603d65b771cd3 Author: Olivier Crête Date: Tue Apr 8 20:07:20 2008 -0400 Move python gui to new api commit 3da8f693bbc9dc1d74a98d62513c74b428e0d297 Author: Olivier Crête Date: Tue Apr 8 19:46:26 2008 -0400 Make the test use the bus messages commit 4be662b24b7d472401b02cf72d32ac8c0de4dc51 Author: Olivier Crête Date: Tue Apr 8 19:45:13 2008 -0400 Remove weak references on object destruction (as the parent may slighly outlive the child) commit 0b07112560a3fb6e8a52e76caea7e4257114d6b8 Author: Olivier Crête Date: Tue Apr 8 19:36:58 2008 -0400 Remove funcs from doc too commit bcd4976904e9198260f2482e26a60eb46d1a5087 Author: Olivier Crête Date: Tue Apr 8 19:14:19 2008 -0400 Start candidates gather from stream constructed commit dbdeda38c48d30b5daf53f8cb54898059b4c5b09 Author: Olivier Crête Date: Tue Apr 8 19:04:52 2008 -0400 Move _new_local_candidates higher commit 39e2692fffc83315a07d53293977a1fedf269391 Author: Olivier Crête Date: Tue Apr 8 18:41:39 2008 -0400 Move stream signals to the Bus commit 8b57bcf7ccb248901670f87767532ffdf3d35dce Author: Olivier Crête Date: Tue Apr 8 17:22:48 2008 -0400 Make sure it works even in racy case commit b75931b66ed59f37a897d91496441b617b926a62 Author: Olivier Crête Date: Tue Apr 8 16:42:39 2008 -0400 Simplify no-stun case commit 29672e209e9e0f7d55ecaa2be5eeda8ee4f15520 Author: Olivier Crête Date: Tue Apr 8 16:33:35 2008 -0400 Emit local candidates and local-candidates-prepared in a saner way commit ab59f0758273c6cb629bda5ec0579ae26ba3fb19 Author: Olivier Crête Date: Tue Apr 8 16:11:27 2008 -0400 Gather candidates in rawudp test commit a2104987e4696978d488013eb352363fd1a180cd Author: Olivier Crête Date: Tue Apr 8 15:04:16 2008 -0400 Add new gather_local_candidates method to the FsStreamTransmitter commit a3c05821f6ddc8f414b8343a12012fb7c70533e4 Author: Olivier Crête Date: Tue Apr 8 11:25:44 2008 -0400 Move handling of the sending property to the component object commit f09c1cea1135c0c3bfd6342ac81f8c132a05661c Author: Olivier Crête Date: Mon Apr 7 20:28:13 2008 -0400 Move remote candidate setting to component class commit 452b2bee7d4e7b3d29a42e1b0278ae9fc326be39 Author: Olivier Crête Date: Mon Apr 7 20:03:51 2008 -0400 Create empty FsRawUdpComponent class commit 19d1afd5592175aa638765c787588c1ceaa56815 Author: Olivier Crête Date: Mon Apr 7 19:50:14 2008 -0400 Move the extern to the header file where it belongs commit 938fc4db4323730736c0149e8faba3055a71d545 Author: Olivier Crête Date: Tue Apr 8 13:43:05 2008 -0400 The 172.16.x.x range is /12, not /10.. oops commit 20e59d39c45ff42360a1f5c6e239d0079bcc53ff Author: Olivier Crête Date: Mon Apr 7 21:01:11 2008 -0400 Use fs_candidate_new() function and fix leak (double malloc) commit 601c7408de13ca9672c26dfe7473a97bd92468ec Author: Olivier Crête Date: Mon Apr 7 18:18:15 2008 -0400 Remove unused candidate api methods commit 4b7655bcdbf4a5fdb5a01cd98e0ac7ba33722229 Author: Olivier Crête Date: Mon Apr 7 15:09:35 2008 -0400 Remove lots of useless nulling in the finalize commit 5cd46949702cbe03617d39f062d3a6ff97a62856 Author: Olivier Crête Date: Mon Apr 7 13:18:33 2008 -0400 Use thread instead of g_timeout for no-rtcp-timeout commit 40880656e949620d22d1153c40b914f9bea9eab1 Author: Olivier Crête Date: Sun Apr 6 17:16:35 2008 -0400 Oops, do the right test commit dd4df5e7ccd5ce62e1feab36ee4b7dd89617638d Author: Olivier Crête Date: Fri Apr 4 17:46:20 2008 -0400 Remove now unused/obsolete new-negotiated-codecs signal commit 81c4d3f575c065c4ec8c41f4264e9bb49afb1806 Author: Olivier Crête Date: Fri Apr 4 17:39:21 2008 -0400 Use notify::negotiated-codecs signal in tests commit 8a6950d2c054f481fda9ba8a624abb1b574130b4 Author: Olivier Crête Date: Fri Apr 4 17:26:29 2008 -0400 Emit notify signal when negotiated-codecs is changed commit ad08979a34bcec294b9bb7c13cc9b1bd44bb5e71 Author: Olivier Crête Date: Fri Apr 4 17:23:59 2008 -0400 Run simpler tests first commit 494d155f124829a2bd7d59a79c450f4c04e32ad0 Author: Olivier Crête Date: Fri Apr 4 16:57:14 2008 -0400 Remove now redundant send-codec-changed signal commit 3e89ae11f7355261c2d5f9b314cc8837a0e76ed1 Author: Olivier Crête Date: Fri Apr 4 16:55:25 2008 -0400 Remove recv-codecs-changed from the enum too commit c3238f135497119ebebdb213ac8869c7a93988eb Author: Olivier Crête Date: Fri Apr 4 16:54:34 2008 -0400 Make test use notify signal for current-send-codec commit b333edd17b430b70b35e4dc2f687b33a4a6e1339 Author: Olivier Crête Date: Fri Apr 4 16:40:58 2008 -0400 Emit the GObject::notify signal on current-send-codec when the current send codec is changed commit 7f9d54d52dd7a4d9318e4d05580ef36f6fc074cd Author: Olivier Crête Date: Fri Apr 4 16:33:38 2008 -0400 Remove the now redundant (with notify) FsStream::recv-codecs-changed signal commit 43fe414632fc4809b6364d76732b16a44e0ba100 Author: Olivier Crête Date: Fri Apr 4 16:29:01 2008 -0400 Emit the notify signal when the value of current-recv-codecs changes commit ac6a0143e08c52580e7b2e8464f66a0c3f36a29c Author: Olivier Crête Date: Fri Apr 4 16:23:24 2008 -0400 Test that the notification is emited when the local codecs are changed commit ec59dd97fd0702f5f7587ae5162235c5304a99ac Author: Olivier Crête Date: Fri Apr 4 16:23:06 2008 -0400 Emit notify signal on changes in the local-codecs property commit 0ffb4e8316bf50047f5992e0306f2aa63ab374f7 Author: Olivier Crête Date: Thu Apr 3 16:25:26 2008 -0400 Add bus watch for errors on transmitter tests commit 0e1208000faa174ec36a6026073094c002b700bd Author: Olivier Crête Date: Thu Apr 3 16:24:50 2008 -0400 Check correctly for the right type of farsight error GstMessage (in test) commit 5e35701532be54f69170b787a87a2509c03812c5 Author: Olivier Crête Date: Thu Apr 3 15:37:58 2008 -0400 Add test to verify is stopping a single stream works commit 212de28041a3a4a79837f8584defc7ea0a4b4966 Author: Olivier Crête Date: Thu Apr 3 15:37:43 2008 -0400 Fix typos commit 64f4c18866f62f2de82c33ce6c308a1705e71692 Author: Olivier Crête Date: Wed Apr 2 22:37:37 2008 -0400 Call parent at the end of constructed methods commit 6c97d5a55413f65ae6e7cbf29afb79107532277d Author: Olivier Crête Date: Wed Apr 2 22:19:57 2008 -0400 Use liveadder if its available commit 690c45b2c0ba906e993974538212d9b071e5d823 Author: Olivier Crête Date: Wed Apr 2 15:31:30 2008 -0400 Fix some little coding style problems found by sparse commit 15423b5262df067cf3ebee8a1a6bfb0283e23d67 Author: Olivier Crête Date: Wed Apr 2 15:12:36 2008 -0400 Fix various small coding style issues ( func()->func () mostly) commit f7ed309f3b37f7db947bbea5eeeb684aae38c615 Author: Olivier Crête Date: Wed Apr 2 14:49:53 2008 -0400 Improve coding style (func() -> func ()) commit 541accde281a2ae1a5930cffb16da6853efcfdd0 Author: Olivier Crête Date: Wed Apr 2 14:40:46 2008 -0400 Remove some trailing whitespace commit f83665cdd8a41057a0b551d8efd8724e986342f2 Author: Olivier Crête Date: Tue Apr 1 18:54:33 2008 -0400 Don't use set_properties(), only use set_property() commit 5d379dba1963d177e6d9808d37e52f0dde5dc336 Author: Olivier Crête Date: Tue Apr 1 18:07:32 2008 -0400 Cleanup built sources commit fc2ecbe652c555e0f4ac322434a1f34c4afdd6fb Author: Olivier Crête Date: Tue Apr 1 17:59:05 2008 -0400 Put the list of marshallers into the tarball commit df7501e685f69055855c57abdaa5fe8c4b192740 Author: Olivier Crête Date: Mon Mar 31 18:00:42 2008 -0400 Always emit the codec-changed signal from the substream commit 58e8a0eeb6ff202dc5d4f02fe1d01b4ca187639d Author: Olivier Crête Date: Mon Mar 31 17:56:27 2008 -0400 Remove dead code commit fa3b5a1bd6e6ed4280938de3f28ca7e0daa8e526 Author: Olivier Crête Date: Mon Mar 31 17:55:01 2008 -0400 Have the substream emit a signal when its codec changes commit 8336064f6887b9efea48cf079267bf3cbdc9ef01 Author: Olivier Crête Date: Mon Mar 31 17:47:56 2008 -0400 Always emit the no-rtcp-timedout signal, but disconnect the handler when we dont want it anymore commit 9e4cee2d59337aa11667ddc2fc9a1b35be7ee0ff Author: Olivier Crête Date: Mon Mar 31 17:41:39 2008 -0400 Have the substream emit its own error signal instead of emitting it on its parent objects commit 29dd9c34aff663ce5d5e0ef5775f97422f2fd875 Author: Olivier Crête Date: Mon Mar 31 17:29:16 2008 -0400 Use the substream error function in substream commit e0c9298f9bd88d463a9f048eebbf3fd45b77cc2b Author: Olivier Crête Date: Mon Mar 31 17:25:12 2008 -0400 Dont have the substream call the stream function directly but have it emit it own src-pad-added signal instead commit 654de8b195bae11f4e5fa7d29990ecae7670116f Author: Olivier Crête Date: Mon Mar 31 17:22:19 2008 -0400 Make quit the default button commit 5ea14ac2aebac28ee8563d4194d66b66fcd43bf5 Author: Olivier Crête Date: Mon Mar 31 15:26:16 2008 -0400 Release the python GIL when calling into Farsight code commit 5109194c36eba5824cf784bb8d8e757b643fed5c Author: Olivier Crête Date: Fri Mar 28 14:44:45 2008 -0400 Default to alsasrc for fs2-gui.py commit f5d684f7ea5b6c06b63ee99fa7fccbf57055e93f Author: Olivier Crête Date: Thu Mar 27 20:41:20 2008 -0400 Use gst-python's autoconf test to check for python instead of calling python-config directly commit b545a951fef09836e71bb3fd12f03f5011271900 Author: Olivier Crête Date: Thu Mar 27 18:02:26 2008 -0400 We really require glib 2.14 for the constructed method commit 15490158ac82408d4b3c9ea428dbd10d8c1fe621 Author: Olivier Crête Date: Mon Mar 24 12:40:34 2008 -0400 Document reserved-pt mecanism commit 192db7054f5f0ce219e2ec3642a60c1401e0ab26 Author: Olivier Crête Date: Mon Mar 24 12:36:35 2008 -0400 Add unit test for reserve-pt commit d841bd44f901df5346db23deb05bc18aa672b4d6 Author: Olivier Crête Date: Mon Mar 24 12:30:21 2008 -0400 Add a way to reserve payload-types commit 8b59d1c6bf932d731d17672f9ded5796e111df33 Author: Olivier Crête Date: Mon Mar 24 12:30:00 2008 -0400 Move TODO out of the structure so it doenst show up in the gtkdoc commit 8ec83f9fcfea49f5d11023061bcffd959fcbe0cf Author: Olivier Crête Date: Mon Mar 24 12:06:24 2008 -0400 Document the FsRtpSpecialSource class commit 5d5840463bae8df1145f867ec81657c962788440 Merge: 30fcad5 265a1aa Author: Olivier Crête Date: Thu Mar 20 18:38:25 2008 -0400 Merge branch 'dtmf' commit 265a1aaa5d3aa8a2f40c38e6bed67f2e31ab29fc Author: Olivier Crête Date: Thu Mar 20 18:33:17 2008 -0400 Add possibility to send DTMF from test-gui commit e5df444dd8e373e2771d82289c14581328a01050 Author: Olivier Crête Date: Thu Mar 20 18:33:05 2008 -0400 Allow all dtmf methods through, check for even improbable errors commit a744a07be36f8f2074da9c7d5834f35e34c55d3f Author: Olivier Crête Date: Thu Mar 20 18:29:37 2008 -0400 Handle event references correctly for dtmf-events in special sources commit bdeda50b4e531f99cd9cbd6c175f69a6be560a3d Author: Olivier Crête Date: Thu Mar 20 16:15:17 2008 -0400 Add rtpdtmfdepay as the receive pipeline commit 4a40143fd25f93e655f8c885821ef1f196f792d2 Author: Olivier Crête Date: Wed Mar 19 19:32:52 2008 -0400 Add special source for Dtmf as sound commit ddd6f062a53456b26ea1d3030fbf24c149ae1ce6 Author: Olivier Crête Date: Wed Mar 19 19:32:32 2008 -0400 Make dtmf test more solid commit 303560414a5ed8c6379b1c5ee56beac5e272c912 Author: Olivier Crête Date: Wed Mar 19 19:23:19 2008 -0400 Keep ref to bin/muxer in specialsources (because of the multithreading) commit 648c139e12d445ec68bd53e495bea937fe40630a Author: Olivier Crête Date: Wed Mar 19 18:41:23 2008 -0400 Move more code to the base class commit b6f0d5a7587ae1b74230080ec595d8f834c21c6a Author: Olivier Crête Date: Wed Mar 19 18:26:47 2008 -0400 Ensure sources are used in the right order commit f63a9b8c07ed52807ed7daf33c6aa91ed6acf9aa Author: Olivier Crête Date: Wed Mar 19 18:20:57 2008 -0400 Move most of the FsRtpDtmfEventSource code into its base class commit ce10a8d2aa180528e1df6f68b353c4311192b394 Author: Olivier Crête Date: Wed Mar 19 17:54:13 2008 -0400 Add build method and make the DtmfEvent subclass use it commit 556456221bf6b420754fa1f6d60bb963b024d434 Author: Olivier Crête Date: Wed Mar 19 17:53:40 2008 -0400 Verify payload type in dtmf event test commit cc44012f753343b73914c8b8b3e4e04871935e4c Author: Olivier Crête Date: Wed Mar 19 17:19:40 2008 -0400 dtmf type is always 1 (named events) commit 479ddf4af049e0ebc2819842022b7e14967051e8 Author: Olivier Crête Date: Wed Mar 19 16:28:28 2008 -0400 Verify that buffers are actually sent commit 4b11ecb0d010927ac1c271282e9cdb7e54ad02c3 Author: Olivier Crête Date: Wed Mar 19 15:51:45 2008 -0400 Add test for FsRtpDtmfEventSource commit 4ea644c8abaccf47e525df36adc2251b69ad69e8 Author: Olivier Crête Date: Wed Mar 19 15:50:12 2008 -0400 Various small improvents to GstRtpDtmfEventSource (to make it work) commit e370cfc4a7f2d56c0a71ed09cfc0a89e057a5f05 Author: Olivier Crête Date: Wed Mar 19 13:19:08 2008 -0400 Don't put un-named type for event, it breaks conversion to/from gstcaps commit 0803077b014a1ab14a77ab30c95c8c211558aa5b Author: Olivier Crête Date: Wed Mar 19 13:18:30 2008 -0400 Dont revert the order of the cached blueprints on read commit 9299dc4ba706f072408f75b098f0b1f9631b69ca Author: Olivier Crête Date: Tue Mar 18 19:16:46 2008 -0400 Use localhost instead of a realistic hostname commit 7368825a1e7f481d55803e0a0504cef6008e3319 Author: Olivier Crête Date: Tue Mar 18 17:04:36 2008 -0400 Fix various bugs in FsRtpDtmfEventSource commit 16f17507cb3cc938c4a5074b2da75d769c31d0d2 Author: Olivier Crête Date: Tue Mar 18 17:03:56 2008 -0400 Fix indentation a bit commit bc196957530c76ec8e2626edc77712e4beffa400 Author: Olivier Crête Date: Tue Mar 18 15:01:20 2008 -0400 Properly check for errors when updating the special sources commit e1cdf90f0ca9145929a3c1a7ccc56fe3050649fe Author: Olivier Crête Date: Tue Mar 18 15:01:04 2008 -0400 Move initializing the sources into the first call for them, using GOnce commit 8f8782b1dd0358b4f857dfeb672827418a12cd32 Author: Olivier Crête Date: Tue Mar 18 14:25:58 2008 -0400 Create dtmf special sources commit 6e71a7dc40221995b0d04ea1747b47e2a3a1913c Author: Olivier Crête Date: Tue Mar 18 13:36:22 2008 -0400 Integrate special source into the FsRtpSession (except for adding them) commit 90a643dfdaae9f3ed0e6115057f4fc4cb5271934 Author: Olivier Crête Date: Tue Mar 18 13:28:44 2008 -0400 Add dtmf blueprints commit 30113ed158ab5e0c77ce35d7942bc1d29c8e89cd Author: Olivier Crête Date: Tue Mar 18 13:26:48 2008 -0400 Alloc parameters in blueprints for dtmf source commit e6fc83dc0910589381f2dce70ae3fee9223dd896 Author: Olivier Crête Date: Tue Mar 18 13:25:39 2008 -0400 Make the rtp codec discovery test use the standard gst debug commit 7bb7549641b99ab24f408941b00b590c759aded9 Author: Olivier Crête Date: Tue Mar 18 12:07:32 2008 -0400 Add function to stop special sources commit 7e7759e11a00fe8e5ab04a8d778e65af6c46789e Author: Olivier Crête Date: Tue Mar 18 11:47:38 2008 -0400 Add a way to tell if the source should be before of after other sources, to be able to differentiate between sournd and event dtmf commit 3455b6670486b04dd0faffa4bf02f7b891b5b14a Author: Olivier Crête Date: Mon Mar 17 19:41:32 2008 -0400 Add implementation of functions to start/stop dtmf events in FsRtpDtmfEventSource commit 996ce7c78199e854d13d316cafa9ea9de236e521 Author: Olivier Crête Date: Mon Mar 17 19:05:16 2008 -0400 Add function to start/stop telephony events on FsRtpSpecialSource commit 1496537e61d1cc31d4cf86c0508e0bce4a3e790b Author: Olivier Crête Date: Mon Mar 17 18:06:17 2008 -0400 Don't try to build a send or receive pipeline if there is no blueprint for it commit 89eba61b83fc6434dd18d4f1b9c8dfad8987a860 Author: Olivier Crête Date: Mon Mar 17 14:57:08 2008 -0400 Add function to shutdown the FsRtpDtmfEventSource commit 6e47dbf4cd5917fe145b62c786f906e4818c4311 Author: Olivier Crête Date: Fri Mar 14 16:11:04 2008 -0400 Create dtmfeventsource elements commit e2f767b283aa29e1928889aa063cee1fd1b83377 Author: Olivier Crête Date: Fri Mar 14 15:10:48 2008 -0400 Properly unref stuff in FsRtpDtmfEventSource commit 3a9cdd4c9438ea0a4cf9dc5e0e1975ceca5b2e57 Author: Olivier Crête Date: Fri Mar 14 15:09:10 2008 -0400 Check for the presence of rtpdtmfsrc before adding dtmf event blueprint commit 30fcad55d2f73bf1d80f25977102ac879c9133b3 Author: Olivier Crête Date: Fri Mar 14 12:22:59 2008 -0400 Removed unused FsCodecPreference (from fs1) commit 3befee0852f2b1d9410f156af77ef3834a1b966f Author: Olivier Crête Date: Thu Mar 13 18:47:00 2008 -0400 Add bin/rtpmuxer properties to FsRtpDtmfEventSource commit 23ba3c9bedda59637cc89dc9354a8e2e17490bdc Author: Olivier Crête Date: Thu Mar 13 18:40:48 2008 -0400 Implement the want_source class method for dtmf event commit 098d710dc6bc24de4c1e7631d3c2cf908a8b4d7d Author: Olivier Crête Date: Thu Mar 13 18:34:25 2008 -0400 Implement add_blueprint in the dtmfeventsource commit d6ad9a9e5835363ebd878b6c087b1d4a1d2cde6f Author: Olivier Crête Date: Thu Mar 13 18:29:41 2008 -0400 Also pass the selected codec with the negotiated codecs everywhere commit 0937fb64077f54637e753309360ff6fde87e63b0 Author: Olivier Crête Date: Thu Mar 13 18:05:49 2008 -0400 Add empty FsRtpDtmfEventSource class commit d1d13e73ac62ba76ed9cc94b6ab6cf997d5571c8 Author: Olivier Crête Date: Thu Mar 13 17:46:46 2008 -0400 Implement new and update methods in the base SpecialSource class commit 63dc033792f110307f49f36f5cc7e35dedd43bc8 Author: Olivier Crête Date: Thu Mar 13 16:06:53 2008 -0400 Need the bin and the muxer to add the source commit bcf01e38e9a52af1bd7b8f8884cde821cbe7f894 Author: Olivier Crête Date: Thu Mar 13 15:49:44 2008 -0400 Rename it back to FsRtpSpecialSource (its more descriptive) commit aed66d72cce3d89ba73aee978e5df132efda7a59 Author: Olivier Crête Date: Thu Mar 13 15:45:07 2008 -0400 Implement more of the base class commit afe15ad80f259dc7386309761755c91625b29779 Author: Olivier Crête Date: Wed Mar 12 17:08:22 2008 -0400 Add base functions to add blueprints commit 19f62c3ad45d9d5c49a4c924352e626758ca63c0 Author: Olivier Crête Date: Wed Mar 12 16:56:05 2008 -0400 Add special codecs to buildables commit ab7b6932cee25c0609cd63e22783d5aae8b1f3be Author: Olivier Crête Date: Wed Mar 12 16:37:16 2008 -0400 Rename FsRtpSpecialSource into FsRtpSpecialCodec commit 28cb5436bc257ca63884191f335e812f23550fcd Author: Olivier Crête Date: Wed Mar 12 16:34:55 2008 -0400 Reduce latencies for fs2-gui commit ba34d22664faa608a350c7098e4e3e3ddcf66bb2 Author: Olivier Crête Date: Wed Mar 12 16:34:35 2008 -0400 Update dependency for proper multicast commit 25dfadcb46583c2bd7dc0201053c64eb0321cdbc Merge: ba138cd df1418b Author: Olivier Crête Date: Tue Mar 11 19:57:03 2008 -0400 Merge branch 'master' into dtmf commit df1418ba39e1e27ca532b88c3ecd43864768a06a Author: Olivier Crête Date: Tue Mar 11 19:56:49 2008 -0400 Update documentation name in .gitignore commit ba138cd5de90273c0df08d076ba454bf25f62df8 Author: Olivier Crête Date: Tue Mar 11 19:55:55 2008 -0400 Add special source class header commit 5a52442f90ad4a5ada96af82f6f433a1055a1895 Author: Olivier Crête Date: Tue Mar 11 18:51:59 2008 -0400 Turns out the de-const typecasts were needed commit 3980e17fd767e929709e0ca877c50f4ff25af5e7 Author: Olivier Crête Date: Tue Mar 11 16:02:16 2008 -0400 g_free() already checks for NULLness, not need to check ourselves commit a67daf65f37168c451ed1f132853e88a3f63fd3c Author: Olivier Crête Date: Tue Mar 11 16:00:27 2008 -0400 Dont leak foundation when destroying candidate commit 272200c1fd0a7a65c6a38c8e0094c3ba869a0023 Author: Olivier Crête Date: Mon Mar 10 18:58:51 2008 -0400 Bump version to 0.0.2.1 commit 7a258c63be5b31625f6729eac080feb6e2c1af05 Author: Olivier Crête Date: Mon Mar 10 18:27:31 2008 -0400 Version 0.0.2 commit f3159127a7b05bf7b6a87fbc74c50cd390922ef1 Author: Olivier Crête Date: Mon Mar 10 15:44:14 2008 -0400 Rename the fs2 doc dir into farsight2-libs commit 0d6e507d2f69eee134f17e55f17d60328756d1bd Author: Olivier Crête Date: Mon Mar 10 15:29:06 2008 -0400 Prevent fs_marshal_* functions from being exported commit 284a37754f29f186f378349dc31e6a1ce04eda13 Author: Olivier Crête Date: Sat Mar 8 15:08:44 2008 -0500 Fix pasto commit 471a2f6393ca246fafaef1491fc1eb45d2210d2e Author: Olivier Crête Date: Sat Mar 8 14:56:23 2008 -0500 Add python examples in the tarball commit 83e4dfe2d9c22da3bbd6e32c84a427b4ee51a3d2 Author: Olivier Crête Date: Sat Mar 8 14:55:54 2008 -0500 Only export fs_* symbols commit bef4b7a3bb7f595153b7aa6c0b89dba156eb5fd7 Author: Olivier Crête Date: Sat Mar 8 13:58:20 2008 -0500 Avoid installing versioned plugins commit 016dd0523e4ee6d0f8025541d1c763d9507741ae Author: Olivier Crête Date: Sat Mar 8 13:49:23 2008 -0500 Rename the plugins dir to farsight2-version commit 2061797ef3df2251f67dc019344e3bd91807384f Author: Olivier Crête Date: Sat Mar 8 13:48:05 2008 -0500 Use the right macro to print gsize commit ce2488eb2afac6bdd68503cd70bd84842b701401 Author: Olivier Crête Date: Sat Mar 8 13:44:01 2008 -0500 Add pkgconfig file commit 573ff93c8df3d617a8083c95bacdadeda48e50d9 Author: Olivier Crête Date: Fri Mar 7 23:33:26 2008 -0500 Bump version to 0.0.1.1 commit bb6d58e2b9a9b79829d123cf214bd2a022a73055 Author: Olivier Crête Date: Fri Mar 7 23:19:37 2008 -0500 Version 0.0.1 commit f09613b13b4541c66c03dbf5e3c6e6e1248da6e8 Author: Olivier Crête Date: Fri Mar 7 23:17:54 2008 -0500 Dont use g_timeout_add_seconds, its really broken (gnome bug #448943) commit eade48eae07af7f59917659d462c9ae3db91a81c Author: Olivier Crête Date: Fri Mar 7 18:48:20 2008 -0500 Add licensing info to the README commit 88fa398838cd1195665795b5eaded1ee390fcf23 Author: Olivier Crête Date: Fri Mar 7 18:44:27 2008 -0500 Make multicast requirements clearer commit a6a3e46b6b192a227bb120a4d462e7fe2db28e50 Author: Olivier Crête Date: Fri Mar 7 18:37:20 2008 -0500 Bump gtk-doc requirement to 1.8 commit 3943f97ec5bb34a6d4ce3923e63ed171811b7dfa Author: Olivier Crête Date: Fri Mar 7 18:29:38 2008 -0500 Add basic readme with build/run requirements commit 0f156f461995263cc5a68fc7acf4614942e5a4f9 Author: Olivier Crête Date: Fri Mar 7 18:24:56 2008 -0500 Auto generate ChangeLog from git commit 7b14103de31d0ef90f4921c4bb519fc914d6ede7 Author: Olivier Crête Date: Fri Mar 7 18:14:06 2008 -0500 Add authors commit a70c9fc75a5d70cfe5614bb2d201bff0801dc643 Author: Olivier Crête Date: Fri Mar 7 18:12:04 2008 -0500 Bump gst requirement to 0.10.17 commit 536f1cbcfb842eb2475c54ff54edeb944596ccba Author: Olivier Crête Date: Fri Mar 7 18:08:59 2008 -0500 Its farsight2, not farsight 0.3 commit cbd14d6b5c211004d617b59142804b21aeaf5ad9 Author: Olivier Crête Date: Fri Mar 7 17:50:11 2008 -0500 Reduce requirements to glib 2.12 and pygtk 2.10 commit 9f1822e7ff47b47ad5cddf2ce73aa14981c0c07f Author: Olivier Crête Date: Fri Mar 7 15:15:15 2008 -0500 Make it version 0.0.0.1 commit df80fe7a96b23886c867fd087df67afd764e0be5 Author: Olivier Crête Date: Thu Mar 6 20:09:06 2008 -0500 Add proper includes to pre-declare functions commit 3b6b25c5ccbbc35b4127416a8d6b2b405b57ddaf Author: Olivier Crête Date: Thu Mar 6 16:14:11 2008 -0500 Fix parentheses commit 7fa342a447364dce08f09bbf3288db995f93acdd Author: Olivier Crête Date: Thu Mar 6 14:17:51 2008 -0500 Add simple multicast example commit aa4e86ca5539c2d22d35a787dded1b623b313715 Author: Olivier Crête Date: Thu Mar 6 13:37:27 2008 -0500 Typecast into the right types of objects commit b3a814d2b6ff265c472c259c1cda707105dbaf85 Author: Olivier Crête Date: Thu Mar 6 13:28:00 2008 -0500 Add stdlib.h for strtol/atoi commit ca36a0f4533f85094b0fab41d3571b978384642f Author: Olivier Crête Date: Tue Mar 4 15:26:20 2008 -0600 Set the right async properties on the multicast udp sinks commit 527590ad011d1d89bc801e1a6d563fc309e2bae2 Author: Olivier Crête Date: Tue Mar 4 13:23:05 2008 -0600 Let the system gst path through commit 3d7fadfbeda6059c45ef2722f1b6cb8ac354ebb7 Author: Olivier Crête Date: Mon Mar 3 15:29:13 2008 -0600 Rename file in Makefile.am (its a -, not a _) commit 94bd1a51b8a4c33943ccac59c2763cc5978318b0 Author: Olivier Crête Date: Wed Feb 20 18:05:06 2008 -0500 Fix leaks, possible corruption and always put loopback address at the end commit 5ec774af29cc3eab95e9a8affccd278338fa8e04 Author: Olivier Crête Date: Wed Feb 20 18:03:14 2008 -0500 Clarify code and improve comments in fs-interfaces commit 922ac74731543ffe2852c06a3c425fb5f62fa955 Author: Olivier Crête Date: Wed Feb 20 11:42:20 2008 -0500 Add test to verify changing from sendrecv to sendonly commit 7c778bd34bc1cd31a46bd15fdb5bbe3b9322f7c1 Author: Olivier Crête Date: Tue Feb 19 21:24:45 2008 -0500 Setup the source with the rest of the pipeline, not later commit 6540e7345a5e0bdab122a4893d377be2e2412b59 Author: Olivier Crête Date: Tue Feb 19 21:20:08 2008 -0500 Add test for sendonly and recvonly streams commit f8410615e5e8a4596dc9c9fea426197dd1f51be6 Author: Olivier Crête Date: Tue Feb 19 20:34:17 2008 -0500 Add extra_init callback to the test commit ca5033ef5edbf25394c11e25b96fca1c5c9fa757 Author: Olivier Crête Date: Tue Feb 19 20:33:27 2008 -0500 Make handoff handler configurable in the stream commit 5ddb9c40ba7802bb7af901e98fda88555511b363 Author: Olivier Crête Date: Tue Feb 19 20:25:11 2008 -0500 Connect all the stream signals at the same place, re-order some functions commit 9a6a0675a1350cbc0695d70b5ff5fcc7c98e3ab3 Author: Olivier Crête Date: Tue Feb 19 20:21:52 2008 -0500 Rename a tests that clearly aren't simple commit bbed04451b26d8824ee7a8313f51c59d33a64799 Author: Olivier Crête Date: Tue Feb 19 18:23:15 2008 -0500 Fix memory leaks commit da8331480f6f2a8a29dba72a8b74176463607295 Author: Olivier Crête Date: Fri Feb 15 17:19:21 2008 -0500 Remove unimplementable fs_stream_preload_recv_codec commit 83a4e45712c48b901f3bc5693fd8bd10392a3925 Author: Olivier Crête Date: Fri Feb 15 16:59:19 2008 -0500 Make H264 work with fs2-gui.py commit b7a720922f11a07695ff3a53986c4681d9357dae Author: Olivier Crête Date: Fri Feb 15 16:58:45 2008 -0500 Make the preview sink async=false (no point doing async if sync doesn't work) commit 79b642323a81448f6f9ca590d3d2f91adbebb3a8 Author: Olivier Crête Date: Fri Feb 15 15:15:11 2008 -0500 Fix small ref leak in the notifier commit 87b6df5694effeecc84277684b941fc9dc0e56a2 Author: Olivier Crête Date: Fri Feb 15 14:58:33 2008 -0500 Add FsElementAddedNotifier to the python bindings commit 3623a5918b2b4b830088b48930fd167448cebf87 Author: Olivier Crête Date: Fri Feb 15 14:51:28 2008 -0500 Make the element addition notification thing into a GObject so that we can use regular signals commit 4b7dd57225ed263716f990c0ef4af52d6c428392 Author: Olivier Crête Date: Thu Feb 14 20:37:54 2008 -0500 Add videoscale to all video codecs to make dumb codecs (like H263) that only take specific resolutions happy commit 2f6c0ec543b5dfdbc9c5c41d5ad474a46fe5a8c5 Author: Olivier Crête Date: Thu Feb 14 18:57:54 2008 -0500 Default the test gui to alsasrc commit 2119baa2b0e2ec0e498db31abe94b72889e25710 Author: Olivier Crête Date: Thu Feb 14 18:57:36 2008 -0500 Improve error messages a bit commit 04fb2e438dc7af4bbf4f2753b215e0bcf5eb7c0a Author: Olivier Crête Date: Thu Feb 14 18:57:12 2008 -0500 Don't sync on sending side (the latency is very different from the receiving side...) commit 306b8446c9b448fb3db4cf8103c7a78ba2798087 Author: Olivier Crête Date: Thu Feb 14 18:56:00 2008 -0500 Make the sending queues leaky and small enough to not create too much latency commit 3bdcd5c7c97833e7998effa4c0b9ed7b6b15e64b Author: Olivier Crête Date: Wed Feb 13 20:31:06 2008 -0500 Document python test gui a bit commit c3e14c5bbe8efc907ee4f159350a47aef7428816 Author: Olivier Crête Date: Wed Feb 13 19:40:02 2008 -0500 Make the audio/video sync work in fs2-gui.py commit ac9d40f4e03b8542ea124c5c1b675f8975d65997 Author: Olivier Crête Date: Wed Feb 13 18:42:54 2008 -0500 Connect the on-bye-ssrc signal from the gstrtpbin commit a6708485fa15ed28d08c5ce548e811548b2ab66c Author: Olivier Crête Date: Wed Feb 13 18:42:24 2008 -0500 Add function to remove SSRCs on rtcp bye in the rtpsession commit 369a4c91b04fadf6c944af19482dd04b2cc25001 Author: Olivier Crête Date: Wed Feb 13 18:39:30 2008 -0500 Add function to remove known SSRCs from a stream when a rtcp bye is received commit 7fa93ee4f96788017d8320b237b303849c89da28 Author: Olivier Crête Date: Wed Feb 13 17:27:46 2008 -0500 Add list of known ssrcs (in case rtcp arrives before rtp) commit 599b31bbdba6c431fb0715bb1e5c146540ae236c Author: Olivier Crête Date: Wed Feb 13 16:36:05 2008 -0500 Remove the sync from the valve commit 5025ea667e1e91ed4f9211a426fa127c3608c9c3 Author: Olivier Crête Date: Wed Feb 13 16:33:01 2008 -0500 Make the no-rtcp-timeout stuff work properly and give some more debug commit a5a31e415b0a55bedbc041e73adb224795f56e71 Author: Olivier Crête Date: Wed Feb 13 16:25:29 2008 -0500 Add some debug for substream sync commit dae2fc681aa65d15f91e8d4dcfd2cd425383464b Author: Olivier Crête Date: Wed Feb 13 16:24:09 2008 -0500 Have the transmitter sink bin do the async-handling commit f373984d35ff3c267f03febc77f05d802dcd1510 Author: Olivier Crête Date: Wed Feb 13 14:48:42 2008 -0500 Fail cleanly if the gstrtpbin could not be created/added commit 2b4410d299c61aca617abb3f54fef0b9d13112b4 Author: Olivier Crête Date: Tue Feb 12 17:55:22 2008 -0500 Add a bit more debug for ssrc/session association commit 1a975eb45cbad8b2c2bd830148921cb4f6b75772 Author: Olivier Crête Date: Tue Feb 12 14:23:57 2008 -0500 Set the new sync property to TRUE on the valve on the substreams to not empty the jitterbuffer commit 4ea785a382b1742e45d5abbd71ede0b3e6e47443 Author: Olivier Crête Date: Sat Feb 9 10:38:02 2008 -0800 Add test for failed codec negotiation commit 0344b7580c90c88ab46dd31d915a012957908630 Author: Olivier Crête Date: Sat Feb 9 10:37:50 2008 -0800 Test correctly if no codec could be negotiated commit ea17ca47563564f8158294bc24c80fd1adf000cf Author: Olivier Crête Date: Sat Feb 9 10:19:36 2008 -0800 Replace dont force PyList, accept any PySequence commit 6a9ff349fd87222fe53d281b88803b84b6dfb6aa Author: Olivier Crête Date: Sat Feb 9 09:46:40 2008 -0800 Dont crash if creating the stream transmitter fails in rawudp test commit 28aae637060ee161eda1c6d447c48e9bfe379803 Author: Olivier Crête Date: Fri Feb 1 00:02:49 2008 +1100 Make the multi-party negotiation really prioritize the local pt only when multiple streams has remote codecs, make the remote_codecs a public member commit 0e29514e03f6633e3ab844da13808fe366c82c55 Author: Olivier Crête Date: Tue Jan 29 15:07:36 2008 +1100 Verify that h263version actually exists commit 074b208cc18884f9fd81fb9125f83b8d3aacaf90 Author: Olivier Crête Date: Tue Jan 29 15:07:18 2008 +1100 Remove useless includes and dependencies commit 44e06eaab1c9a5faf2ed77ed4cea7199ec8c5b62 Author: Olivier Crête Date: Tue Jan 29 15:06:54 2008 +1100 Clarify pygobject/pygtk deps commit d4a2b1063cc1560b918bcb10acd66ddac9b926ba Author: Olivier Crête Date: Tue Jan 29 14:01:57 2008 +1100 We require glib 2.14 for the constructed vmethod commit 48a433c10af01255f3e84c4fc2611b161f0e934e Author: Olivier Crête Date: Thu Jan 24 17:32:33 2008 -0500 Re-indent rawudp transmitter according to standardised fs2 indentation rules commit 6890b95fa2fa9818c1cd925aa1f0ad2af0bda18f Author: Olivier Crête Date: Thu Jan 24 17:11:58 2008 -0500 Make the multicast transmitter used state locking instead of set_state->bin_remove->set_state hack commit 753d8cbf2de2148047373156204253a5379f96b0 Author: Olivier Crête Date: Thu Jan 24 17:07:06 2008 -0500 Prevent the rawudp transmitter's sub-element from being rescitated commit 3785be8d220925e6fb146be8f173d9205e640fd8 Author: Olivier Crête Date: Thu Jan 24 17:06:15 2008 -0500 Stop the transmitter in the right order in the rawudp test commit decfe5a3d8a0c6c25a2a3b5cb996810a4460ce2d Author: Olivier Crête Date: Thu Jan 24 17:05:53 2008 -0500 Make the generic transmitter tests thread-safe commit 65f82feea94f16734b0784e8ff1a7cd3752d8360 Author: Olivier Crête Date: Thu Jan 24 14:43:54 2008 -0500 Add forgotten lock and point lock macro to the right object commit 5a7f6233db2c3c0f87eee92ef0b751af4530d163 Author: Olivier Crête Date: Wed Jan 23 17:50:28 2008 -0500 Make audio and video optional in gui and make audio almost-work (except for sync) commit 5a3919ac59cc64aa7f026b370b7ce538c4eb3a14 Author: Olivier Crête Date: Wed Jan 23 17:45:45 2008 -0500 Improve indentation a bit commit 3485045334971db8980ea669701fb99bcd644f77 Author: Olivier Crête Date: Wed Jan 23 17:45:28 2008 -0500 Fix line length in rawudpstreamtransmitter doc commit f975e033be30170093b01fe1ecf072e35978e3c5 Author: Olivier Crête Date: Wed Jan 23 14:30:12 2008 -0500 Re-organise core library documentation into logicals blocks commit b2d39e9ffd8c792224dec027f96b60029986a1b2 Author: Olivier Crête Date: Wed Jan 23 14:15:20 2008 -0500 Improve transmitter documentation a bit commit a4aeeaa0e72e5abd4e2e5197d540740407e7131d Author: Olivier Crête Date: Wed Jan 23 14:13:35 2008 -0500 Add documentation to the rawudp transmitter commit 0e93bc52de9173b862769048ab45296a2bdb336b Author: Olivier Crête Date: Tue Jan 22 16:48:28 2008 -0500 Name the send codec bin uniquely per conference commit 574390fef7dd4f9a060636407b5723672a264b20 Author: Olivier Crête Date: Tue Jan 22 15:48:10 2008 -0500 Add test for multicast with a local interface specified commit 36a25eed50d8192dfe71e8ee3fe90e64d0f1051b Author: Olivier Crête Date: Tue Jan 22 15:47:32 2008 -0500 The Multicast transmitter now binds to the multicast address, not the local address. So we really have to have one socket per multicast group we join. commit fb74766c39d743416d76dfa172a9df5fae9e4d02 Author: Olivier Crête Date: Mon Jan 21 21:20:26 2008 -0500 Fix memory leak in multicast stream transmitter commit 268285460f56f9729c8966a6875b1fbc951b27a2 Author: Olivier Crête Date: Mon Jan 21 20:30:06 2008 -0500 Add some documentation to the multicast transmitter commit 9d21339a9822aedd36eba3548fe1d47d7e8af361 Author: Olivier Crête Date: Mon Jan 21 20:24:24 2008 -0500 Same candidate requires the ttl to be the same with multicast commit 5b10ab2fc26dfce02680e7cb4773872f67b313bb Author: Olivier Crête Date: Mon Jan 21 17:31:52 2008 -0500 Make multicast transmitter respect the TTL in the candidate commit 6037191f6202a5ef49bd5c714f744dbb523186bb Author: Olivier Crête Date: Fri Jan 18 21:20:22 2008 -0500 Add ttl field to FsCandidate commit 39f837d52301f2ea7618022d71551507b2db8828 Author: Olivier Crête Date: Fri Jan 18 21:20:08 2008 -0500 Rename pad parameter in header to make it match the code commit 448ecdd01b578dd97735e6025ea1f09bde3a687d Author: Olivier Crête Date: Fri Jan 18 21:04:05 2008 -0500 Simplify the uddport code a bit in the multicast transmitter commit 7f5502e0f5b100f5c991e324684c8ea21d0f5e8d Author: Olivier Crête Date: Fri Jan 18 20:58:11 2008 -0500 Remove all references to fs-interfaces from the multicast transmitter commit 4231047accb083fcb2b581e4d3af8ad7db1def5e Author: Olivier Crête Date: Fri Jan 18 20:57:14 2008 -0500 Remove useless get commit a29a429a450a03717ef95fdded58b219cfa6f5e8 Author: Olivier Crête Date: Fri Jan 18 20:49:53 2008 -0500 Remove unused files commit 5634e6f27d7c92f3c394632657ab09ecb6827e0b Author: Olivier Crête Date: Fri Jan 18 20:18:11 2008 -0500 Make error message a bit clearer commit 852b6475b74efa6eb329d2211ec43acf9a6187fa Author: Olivier Crête Date: Fri Jan 18 20:16:53 2008 -0500 Re-set the IP_MULTICAST_LOOP to 0 commit 0daf1e0eda2c01fc150dc405bbad20b5253d400c Author: Olivier Crête Date: Fri Jan 18 20:11:39 2008 -0500 Add simple test for multicast transmitter commit d5d1a4a2f89947b10e828884d4f5b15aedf73164 Author: Olivier Crête Date: Fri Jan 18 20:10:21 2008 -0500 Binding to interface 0 / INADDR_ANY by default commit 980ffae4622c745f78bd83340d11ad66f47c6a5e Author: Olivier Crête Date: Fri Jan 18 20:09:38 2008 -0500 Use SO_REUSEADDR/PORT commit da25dfe75f5fcd3006853dda27b7a98ddb85c56f Author: Olivier Crête Date: Fri Jan 18 20:09:03 2008 -0500 Add way to only allow binding to the exact requested port commit 2f4f0b9fd6a13f82fc77539ad3f859f7767b3329 Author: Olivier Crête Date: Fri Jan 18 18:55:32 2008 -0500 More s/prefered/preferred/ commit 1e50dfc572c0413c0d09e841265c35dc89ba5c66 Merge: 89faa33 49436d4 Author: Olivier Crête Date: Fri Jan 18 18:52:58 2008 -0500 Merge branch 'master' into multicast-transmitter commit 49436d40a3d78b7db84aeaf067fb8b8f7bc7594d Author: Olivier Crête Date: Fri Jan 18 18:52:44 2008 -0500 s/prefered/preferred/ commit 89faa339727b46c963990ffcc02197596e02466b Author: Olivier Crête Date: Fri Jan 18 18:45:35 2008 -0500 Update the fs_candidate_new call to the new api commit ca1253c68ae6676d2dd21006653d14b0ad113e77 Merge: 264cb2d a36fc87 Author: Olivier Crête Date: Fri Jan 18 18:43:06 2008 -0500 Merge branch 'master' into multicast-transmitter commit a36fc871173b87078dfde84e80dd17310c0ba1a9 Author: Olivier Crête Date: Fri Jan 18 18:42:56 2008 -0500 Add the component to fs_candidate_new and document it commit 264cb2daa92959d3b9e9f9a6d201ac9aa6d44e5c Author: Olivier Crête Date: Fri Jan 18 18:06:16 2008 -0500 Put copy of fs-interfaces in the multicast transmitter commit 3c25ae8d25d41618ca4e3b19b1e09b3e7eaffd21 Author: Olivier Crête Date: Fri Jan 18 17:30:17 2008 -0500 Complete untested version of the multicast transmitter commit 7457bad4c5cea87864dbfee9e9ddebbb028f5e74 Merge: 9261e7a 8ef9704 Author: Olivier Crête Date: Fri Jan 18 17:10:32 2008 -0500 Merge branch 'master' into multicast-transmitter commit 8ef97049f3aa236164723501ac947a981b58d9c0 Author: Olivier Crête Date: Fri Jan 18 16:53:16 2008 -0500 Add new functions to the python bindings commit 95c9344bdd13b7cafd25120896ec4e3f5daccb41 Author: Olivier Crête Date: Fri Jan 18 16:06:32 2008 -0500 Add fs_candidate_new method commit c08044a83b42d5057f9f9e16dba9a1e046ab28dc Author: Olivier Crête Date: Fri Jan 18 16:06:19 2008 -0500 Fix indentation commit 9261e7acb7df1bd17be35dc3d72b67749237645f Author: Olivier Crête Date: Fri Jan 18 16:02:55 2008 -0500 Fix incorrect \ commit fe9659f6472a2b166c8371b22ebb50f3c8f6d51e Author: Olivier Crête Date: Thu Jan 17 17:52:44 2008 -0500 get_port returns an int, not a boolean commit 6fdd40fc56166b3fcdfb4d207da5d6632504ec8c Author: Olivier Crête Date: Thu Jan 17 17:52:20 2008 -0500 Add the proper configure macro to make automake happy about per-target flags commit c8e36e0e9b095f1ec41eb9ad55f57a3dbe2e37be Author: Olivier Crête Date: Thu Jan 17 17:51:56 2008 -0500 Remove the automake portability warnings commit adcd630ca02beead88403ccd895bba07efa7a77d Author: Olivier Crête Date: Mon Jan 14 14:13:24 2008 -0500 Remove now useless mutex commit e1d99555d97b0235287dee641c670d6749210f5f Author: Olivier Crête Date: Mon Jan 14 14:11:29 2008 -0500 Fix documentation type in the rawudp stream transmitter commit 967f75b762ae18d800d4c6d679fe5a748a2b12d0 Author: Olivier Crête Date: Mon Jan 14 14:02:33 2008 -0500 Remove references to STUN from the multicast transmitter commit fe80b6e670d17987df469e81ef14d06163263dbb Author: Olivier Crête Date: Mon Jan 14 13:48:07 2008 -0500 search/replace the copied files to multicast from rawudp commit 2728f1be6f90cbebfad178c7dc7ec4f2fcd1ccf6 Author: Olivier Crête Date: Mon Jan 14 13:16:49 2008 -0500 Start multicast transmitter as a copy of the rawudp transmitter commit 844aa8febddda6e152a7eaada29297d73330e84d Author: Olivier Crête Date: Fri Jan 11 18:39:15 2008 -0500 Remove theora preference (it still doesnt work) commit 4ffa7401d3e524b2673b9610f57cb01abee7ce98 Merge: ecd6d6a 50b924f Author: Olivier Crête Date: Fri Jan 11 18:37:46 2008 -0500 Merge updated error clarification patch nothing added to commit but untracked files present (use "git add" to track) commit ecd6d6a1e954103571fd1f432e284eda131435c4 Author: Olivier Crête Date: Fri Jan 11 18:25:35 2008 -0500 Add multicast candidate type commit 727931d16e6eab0f6acc97c271bbfff855a9a3f1 Author: Olivier Crête Date: Fri Jan 11 15:59:05 2008 -0500 Ooops, don't overwrite the local ip address with ANY in rawudp transmitter commit f9e91d8b9f9c8f088a1fe6274a718c8fdab93252 Author: Olivier Crête Date: Thu Jan 10 19:15:55 2008 -0500 Transform the upwards call on the no-rtcp timeout into a signal commit 3e3fda793196024b44b1e0b08b7589e63aa651ef Author: Olivier Crête Date: Thu Jan 10 19:06:58 2008 -0500 Make the fs_stream_emit_src_pad_added a function of the library commit f0ee0a7813efd02640f33075d50b3a35cad07ad3 Author: Olivier Crête Date: Thu Jan 10 17:32:52 2008 -0500 Make the error message on no local codecs clearer commit 50b924fd1c03e23093b3cb157d041226ba9510d0 Author: Olivier Crête Date: Thu Jan 10 17:32:52 2008 -0500 Make the error message on no local codecs clearer commit ae8f9f94a3018a2a608f6af25eeae317087cf7a3 Author: Olivier Crête Date: Thu Jan 10 17:32:33 2008 -0500 Fix some indentation commit e83231aa3db6ebde4e3670466eca7772e8350cf0 Author: Olivier Crête Date: Thu Jan 10 17:32:16 2008 -0500 Implement the callback after a timeout if there is no rtcp commit 14234032b7dc8baf2c06661458eaa78b591f6fa4 Author: Olivier Crête Date: Thu Jan 10 17:31:18 2008 -0500 Add a no-rtcp-timeout property on the FsRtpSubStream and set it at construct time from the session commit efaaa37e69710175ebcb352dd6278505943bbfdf Author: Olivier Crête Date: Thu Jan 10 17:27:47 2008 -0500 Add no-rtcp-timeout property to the FsRtpSession commit a5123235e68c42beba1238577fd041b45515c346 Author: Olivier Crête Date: Thu Jan 10 13:19:53 2008 -0500 Fix small leaks commit 9ada1d79a2b3072dd4855ab80fb010ac0ae7b797 Author: Olivier Crête Date: Wed Jan 9 20:14:49 2008 -0500 Make a macro to surround the fail*() calls with a mutex to prevent "Bad message type arg" errors commit e8d53dc094ca653d336ac28349057ad043982059 Author: Olivier Crête Date: Wed Jan 9 17:52:29 2008 -0500 Print more explicit error messages in demo gui commit 5f3dbb5469b1b6ec5c1ebf2421a9770320033521 Author: Olivier Crête Date: Wed Jan 9 17:30:54 2008 -0500 Make it possible to run the python gui from anywhere commit 409920f70cde31ac0e0e50e1aeaa22e4e589ea6c Author: Olivier Crête Date: Wed Jan 9 17:18:02 2008 -0500 Implement the emission of the recv-codecs-changed signal commit 191cd34dbd25610ec563548627e3592c80b58162 Author: Olivier Crête Date: Wed Jan 9 17:02:48 2008 -0500 Improve the doc for FsSession a bit to make clear the relation between the properties and their changed signal commit 8aadb06d772db68d168100332a00415726226573 Author: Olivier Crête Date: Wed Jan 9 16:53:25 2008 -0500 Remove the argument from the recv-codecs-changed signal, the details can be fetched from the property, and improve the doc a bit more commit 7832e19dab9536b8636da1df708a9f528cff3157 Author: Olivier Crête Date: Wed Jan 9 15:57:02 2008 -0500 Add copyright/license notice to the python demo gui commit 024a15b48fc3ea4b573fbcdb0d690facb7db72a0 Author: Olivier Crête Date: Wed Jan 9 15:34:06 2008 -0500 Fix doc of recv-codecs-changed commit 04ff3a40a4ee91b6c1420d6fdcf4c1347aec9413 Author: Olivier Crête Date: Wed Jan 9 15:15:39 2008 -0500 If we receive a pad for which we have no codec (a race condition), don't block the pad forever, instead use the pad probe to drop buffers until we get the right code (but this should never happen anyway) commit acfb5b51271c433a52ae22b2e3798faaee82aac0 Author: Olivier Crête Date: Wed Jan 9 12:49:18 2008 -0500 Fix name of function is gtkdoc comment commit 6fb39ba8ca7763678f7a975b0056a51b32b88ce0 Author: Olivier Crête Date: Tue Jan 8 16:30:41 2008 -0500 Set the new codecs before invalidating the old ones commit 18f035a2b25dadef69a5d8a48b7397a6d468b990 Author: Olivier Crête Date: Tue Jan 8 16:29:58 2008 -0500 Document the codec negotiation a tiny little bit commit 3389df2ecf2e2007ff605d82a9ffc2dda2f21e5d Author: Olivier Crête Date: Tue Jan 8 16:06:00 2008 -0500 Implement the current-recv-codecs property on FsRtpStream commit 781db1d7100a5d7e5a52f7c3e0f68c10b2c3525e Author: Olivier Crête Date: Tue Jan 8 15:28:09 2008 -0500 Ignore .pyo/.pyc files commit a2fceda47ad14bd9f4eea386019f607669021d7c Author: Olivier Crête Date: Tue Jan 8 15:26:07 2008 -0500 Fix various Makefile details to make "make distcheck" pass commit 8345c23c94eac649afbf6d8bdbd8fb66f5a21ac6 Author: Olivier Crête Date: Tue Jan 8 15:15:15 2008 -0500 The recv codecs are now a list commit c617a3bc06cdf86e2b498d96c9a8b896253bfb8b Author: Olivier Crête Date: Tue Jan 8 15:09:49 2008 -0500 FsStreamDirection is now a flags, not a enum (and both=send|recv) commit 228887db9b7d95647d01b7bff4e34b9a2527ed0c Author: Olivier Crête Date: Tue Jan 8 14:26:08 2008 -0500 Oops, include the fs-private.h header in fs-transmitter.c too commit 3c072364439c5f5bb96b5160011a555b0a7f6469 Author: Olivier Crête Date: Tue Jan 8 14:25:49 2008 -0500 Give the right rule name to generate enum files commit dfae8e97952c8efbfbaf5e102f635495a029c495 Author: Olivier Crête Date: Mon Jan 7 19:22:40 2008 -0500 Use the gst debug category everywhere! commit c04d1313b1a9e23e65c0155a6ef1b52bf4b5615c Author: Olivier Crête Date: Mon Jan 7 19:22:20 2008 -0500 Add gst debug category to the rawudp transmitter commit a4e84ddaac5824b3a6dac72802716ec8ed915fad Author: Olivier Crête Date: Mon Jan 7 19:21:27 2008 -0500 Remove useless print commit 9b129c0636f305e2392b7017d4bb0cc6201eecbe Author: Olivier Crête Date: Mon Jan 7 19:21:09 2008 -0500 Add the new fs-private.h header to the Makefile.am commit 0d68b87bfe5d55e82d0b73de52089caa0624e01a Author: Olivier Crête Date: Mon Jan 7 19:20:39 2008 -0500 Fix the documentation building commit d78f84bc5f75b0010f46682ab9fc2378eb995981 Author: Olivier Crête Date: Mon Jan 7 19:20:14 2008 -0500 Also potentially init the debug from the FsTransmitter class constructor commit 252f2fa0c4aa36525546096cc6e2588a26c75f80 Author: Olivier Crête Date: Mon Jan 7 19:19:19 2008 -0500 Add a new fs-private.h header, move the debug category to there and make a function to init the debug category so it can be initialized by the fs-plugin so that unit tests can work without a Conference commit 98e936cb19b6d116c50fe73af7340449e5abdffb Author: Olivier Crête Date: Mon Jan 7 18:42:39 2008 -0500 Update parameter name in documentation commit 500995239cc65776d6e3e31c80ecb763c47ded8b Author: Olivier Crête Date: Mon Jan 7 18:03:34 2008 -0500 Add explanation of the behavior for multi-party codec negotiation commit 021ad1469395da8eed23655cb26f42605d6b1564 Author: Olivier Crête Date: Mon Jan 7 17:02:03 2008 -0500 Add test case for changing send codec while its playing commit c64bb52990001de223302a1f7bd5331b8507e829 Author: Olivier Crête Date: Mon Jan 7 17:01:32 2008 -0500 Check the correct cap to make sure we don't push an unacceptable buffer after a change in send codecs commit 61fc3daeea70d6aba18297b57d905f158092686f Author: Olivier Crête Date: Mon Jan 7 16:58:22 2008 -0500 Improve doc/debug messages a bit in FsRtpSession commit 80fbd05307bd911b0aafe87b06b565cd8679deca Author: Olivier Crête Date: Fri Jan 4 18:46:55 2008 -0500 Add test to for fs_session_set_send_codec before the stream is started commit 2229349a86cf38513efae29fe59f4b35483ddb4d Author: Olivier Crête Date: Fri Jan 4 18:45:18 2008 -0500 Fix documentation lines to use proper prefixes for constants commit 3792284ce37102a534e4bdad3c167c27a27642e2 Author: Olivier Crête Date: Fri Jan 4 15:46:44 2008 -0500 Add a property to get the output ghostpad from a FsRtpSubStream commit b42e90f7656c367956bf02403e2b0e76a552dc5c Author: Olivier Crête Date: Thu Jan 3 18:53:05 2008 -0500 Oops, some fs-rtp-conference macros dont have the right name commit 506adb7afd5e63c3a9e1e3f7340301250349e40d Author: Olivier Crête Date: Thu Jan 3 13:22:04 2008 -0500 Add tests for fs_utils_add_recursive_element_setter_from_keyfile commit 62b1086a3c87c38e1243ad64858da907c92b32e7 Author: Olivier Crête Date: Thu Jan 3 13:21:48 2008 -0500 Use proper markup for functions in the gtk-doc commit 198881417bdd9280e5740d6c62e058a8339a3fcd Author: Olivier Crête Date: Thu Jan 3 13:21:25 2008 -0500 Rename _from_keyfile option setter function commit 2fd8dbcfa662862c8004c94dfaa7ab5c5557ac3f Author: Olivier Crête Date: Wed Jan 2 20:33:59 2008 -0500 Add function to set options from a keyfile using code from Farsight1 commit f823ff965b749c33e0d7c81f2006e8b9f3f9900b Author: Olivier Crête Date: Wed Jan 2 20:33:07 2008 -0500 Remove unused prototype commit eb544fac10a4ce119f5b1fd1f75ba8a133e545c6 Author: Olivier Crête Date: Wed Jan 2 20:32:52 2008 -0500 Make the element recursive element stuff also work on non-bin elements commit d217d48f273d8851672f5e52266d081e05cfbceb Author: Olivier Crête Date: Wed Jan 2 19:23:36 2008 -0500 Add test for the recursive element adding notification commit f2b529be8a4ca9a6eef84439c564480fc961f72b Author: Olivier Crête Date: Wed Jan 2 18:36:27 2008 -0500 Fix small documentation screwups, ignore auto-generated files commit 744516e1a621c720f253a7151c8009db92abe120 Author: Olivier Crête Date: Wed Jan 2 18:35:39 2008 -0500 Remove useless printing in configure commit ad191ba9edecbf7a08a78826487c6be12bf9d325 Author: Olivier Crête Date: Wed Jan 2 18:22:33 2008 -0500 Add utility to be notified when an element is added to a bin or a sub-bin commit dc1ddf200a205f688873ff253c418dc1e5bc0928 Author: Olivier Crête Date: Wed Jan 2 15:04:37 2008 -0500 Add code to set the correct receiving direction on the substreams commit b222c39c8e3e8f5cc64843eab9b5f72e0248da11 Author: Olivier Crête Date: Wed Jan 2 15:04:03 2008 -0500 Define the FS_DIRECTION_* flags with shifts in the right direction commit 61006195ef1db2130d780c6686571c1106741ba5 Author: Olivier Crête Date: Wed Jan 2 14:49:56 2008 -0500 Add receiving property to FsRtpSubStream commit ba5a2d162f0d3e417181bb8a90b8dcf91af70b4f Author: Olivier Crête Date: Wed Jan 2 13:10:11 2008 -0500 Fix copy-paste error commit 4f9e1e60db1c9ded351d0faaa4c30dde02c2146d Author: Olivier Crête Date: Sat Dec 22 23:56:15 2007 -0500 Make the video sinks a bit smaller commit f93b9435b9b5528710ef776e0c8518185cc35d3f Author: Olivier Crête Date: Sat Dec 22 23:53:44 2007 -0500 Make the server relay the disconnection of one client to the other clients commit c995a2b16fafcdd9f42dcc57e3d2135800a2f4fa Author: Olivier Crête Date: Sat Dec 22 23:52:58 2007 -0500 Dont restart on all errors commit 2062625d63848a47e4aabb50e7c05686e6d782b6 Author: Olivier Crête Date: Thu Dec 20 21:00:33 2007 -0500 Cleanup server-side when client is disconnected commit 8f7d195cbe4296392fa99fb02b82e80dad257e49 Author: Olivier Crête Date: Thu Dec 20 21:00:06 2007 -0500 Use weakrefs instead of strong refs for session->stream to break ref cycle commit a3dcb6aa817480064a5d7eedbf4d73d2a244dec4 Author: Olivier Crête Date: Thu Dec 20 14:04:44 2007 -0500 Set latency of 100ms (to match the jb) commit d61b75f6ed3055046137a51c6b863456eeef3bf3 Author: Olivier Crête Date: Thu Dec 20 11:09:43 2007 -0500 Skip the stunserver.org test if the network is down commit 9720e502973c9907630942d52de80504e3da89ac Author: Olivier Crête Date: Thu Dec 20 11:09:11 2007 -0500 Ask for the loopback interface too (as a last chance) commit 2aa058e6c6d8d0d307b6aaa5502a5823364a0ccc Author: Olivier Crête Date: Thu Dec 20 11:08:32 2007 -0500 Always add the loopback interface last if we ask for it commit bc11980706bc04aa1a2409974ab7c6fc917fdf0b Author: Olivier Crête Date: Thu Dec 20 10:54:26 2007 -0500 Emit an error if there is no local candidate commit a6468a2176ae1e25950b7433b6b67cdc637f9583 Author: Olivier Crête Date: Thu Dec 20 10:53:26 2007 -0500 Have the right marshaller for the stream error signal and use the fs_stream_emit_error function to emit the error instead of doing it directly commit d63a10e98517d1f9888c7ff382f108758e63f1fd Author: Olivier Crête Date: Wed Dec 19 17:53:10 2007 -0500 Various small improvements to the ui test commit 1422cb99754b8ac0dee08aad9d161b5f74351450 Author: Olivier Crête Date: Wed Dec 19 15:37:12 2007 -0500 in gui test, remove useless ffmpegcolorspace and capsfilter in source commit c07893a7f0ec36176ab1b44b64f4f1cabf418af4 Author: Olivier Crête Date: Wed Dec 19 14:29:32 2007 -0500 Give output sink and preview sinks different names commit 259287cba2a2b37921cfa3a15633590f2267eebe Author: Olivier Crête Date: Wed Dec 19 14:03:23 2007 -0500 Put ffmpegcolorspace/audioconvert/audioresample inside the appropriate codec bins commit 297f7ffbf0aca968d56d164ce20729fc923bcbab Author: Olivier Crête Date: Wed Dec 19 14:02:52 2007 -0500 Replace fakesrc with audiotestsrc in generic rtpconference test commit 8623d77b70c9092993b701ea276d6f3e683f9deb Author: Olivier Crête Date: Tue Dec 18 17:23:20 2007 -0500 Comment out unused adder, use gtk.gdk.gdk_threads_init() commit 474731330ad820c563c48ca20e746126c10d8ce3 Author: Olivier Crête Date: Mon Dec 17 20:31:29 2007 -0500 Improve the UI to force the output to have the same size as the data commit 10a5168f9e82c9f84e1ab421cf52b462a74b4735 Author: Olivier Crête Date: Mon Dec 17 17:56:37 2007 -0500 Add python gui demo program commit be3dfae414e90c6fb2f71dea2aa16f9d644fd480 Author: Olivier Crête Date: Mon Dec 17 14:46:27 2007 -0500 Add fakesink after the tee in rawudp transmitter commit c6201b2f587b45def8b9b62811331fa997481a42 Author: Olivier Crête Date: Mon Dec 17 14:46:13 2007 -0500 Remove useless check, fix comment commit 65eff83776847a5787004c6b21c6c7e409960cc3 Author: Olivier Crête Date: Mon Dec 17 14:45:32 2007 -0500 Dont forget to ref the fakesinks commit fd32616b5d3c989459fc0cd9a1ab70b91fae7d08 Author: Olivier Crête Date: Mon Dec 17 14:16:38 2007 -0500 Simplify the error handling code a bit commit 7b7ed5737f3f09e6d37ce546d53694acd2dd3a45 Author: Olivier Crête Date: Mon Dec 17 14:12:04 2007 -0500 Add fakesink to the tee between the rtpbin and the transmitters commit 2b49ca8a50843af7569f1e589f003bf7b5bb971e Author: Olivier Crête Date: Sat Dec 15 21:11:43 2007 -0500 Check the right types when converting python lists to glist and correctly check that the optional params commit 93804c96c0988cfe9984d30abe60e04f25c41c11 Author: Olivier Crête Date: Fri Dec 14 16:21:29 2007 -0500 Dont crash on null attributes inside codecs and candidates commit 48f9d2cea8a07544496ad0daf7275fdbeaf770b3 Author: Olivier Crête Date: Wed Dec 12 16:57:45 2007 -0500 Use the Gst error stuff for the base classes too commit fe7b3308354779b2a13eaceabace1ce9590ef5eb Author: Olivier Crête Date: Wed Dec 12 16:57:32 2007 -0500 Have fs_codec_list_from_keyfile return a GError commit a077f32128ac5c5c08960e2006160755eaafae86 Author: Olivier Crête Date: Wed Dec 12 16:41:05 2007 -0500 Make sure we init the substream class in a single-threaded env commit 3802133f8aaadd6dbf92f30eaa1070878637bcb1 Author: Olivier Crête Date: Wed Dec 12 16:33:53 2007 -0500 Add test for invalid transmitter name commit 4f9d8b636169474c8e1cbc242f5f84b5ef498d1f Author: Olivier Crête Date: Wed Dec 12 13:35:22 2007 -0500 Add test for two-way codec negotiation commit db88d3ccea933e316e8f38af127c8f245d4333ad Author: Olivier Crête Date: Wed Dec 12 13:35:04 2007 -0500 Verify that the remote codecs passed are minimally valid commit e52172914f7a068767ed2d02a8f832eb5de0d2ab Author: Olivier Crête Date: Wed Dec 12 13:34:44 2007 -0500 Invert the result of _compare_codec_lists to get the right result, and document the function commit a563f37727c653cf482d844b1cd967008ae5a20d Author: Olivier Crête Date: Tue Dec 11 19:49:28 2007 -0500 Fix various memory leaks (thanks valgrind) commit 59ba0aff9f5bf99b2170c72cb463f25ccc300a75 Author: Olivier Crête Date: Tue Dec 11 19:49:08 2007 -0500 Remove explicit timeont on tests commit d02e7f06093e7ace89567f5046a45a630ae4a7a4 Author: Olivier Crête Date: Tue Dec 11 19:23:43 2007 -0500 Release all request pads commit 1d3cad6a5f27a8f79aa4bd2e80904b46fae0c843 Author: Olivier Crête Date: Tue Dec 11 19:05:07 2007 -0500 Fix various small memory leaks commit 117545d3137d2a533b8043a37c3b9a889099873b Author: Olivier Crête Date: Tue Dec 11 19:04:40 2007 -0500 unref request pads after releasing them commit e03aec30bdafcffd6a7eddcdebefd7771965741e Author: Olivier Crête Date: Tue Dec 11 18:03:01 2007 -0500 Fill fakesrc buffer to make valgrind happier commit 31939e9ec8485e20f8ce852214504132166f59d9 Author: Olivier Crête Date: Tue Dec 11 17:59:06 2007 -0500 Fix leak in fstransmitter test commit c36f2cbfd78f7bfc3bf2fcb195ba4f00e0c69232 Author: Olivier Crête Date: Tue Dec 11 17:57:57 2007 -0500 Fix indentation in fscodec test commit 02a1e698c2978165eab20f0538bc9d88a3b30001 Author: Olivier Crête Date: Tue Dec 11 17:57:30 2007 -0500 Fix memleaks in fscodec test and some indentation commit 931c7a47b608d0acc03f7a5aded707d308399cd4 Author: Olivier Crête Date: Tue Dec 11 17:41:50 2007 -0500 Add more tests for local-codecs-config commit 3339c89d120f8b8a3c9e0eb493f37cf1222907f5 Author: Olivier Crête Date: Tue Dec 11 17:41:34 2007 -0500 Dont ignore all prefs, clock_rate is never negative, print more debug commit a25eae8856bf31949b8d95c6931d07c0546138b3 Author: Olivier Crête Date: Tue Dec 11 16:31:25 2007 -0500 Add new test for various codec related functionalities commit 840abffcc2033006ecd1d64ba89d015cca419089 Author: Olivier Crête Date: Tue Dec 11 16:30:38 2007 -0500 Create the new local codecs association from the new codec configuration, not the old commit d3c1beff23e1ceddb5c422d7152e01c28d05dc2d Author: Olivier Crête Date: Tue Dec 11 16:15:21 2007 -0500 Get a copy of the local-codecs-config list commit dc58a6ebdd9bb5fb114f1ce24eee37f559e639f5 Author: Olivier Crête Date: Tue Dec 11 15:19:15 2007 -0500 Export the FS_CODEC_ID_* constants commit 7d38f6a4e5b30b73973381f9c0af97750c94b622 Author: Olivier Crête Date: Tue Dec 11 13:35:22 2007 -0500 Make the livesrc behave more like a real livesrc commit 7c7b90a956a331423ca5e6c31a2b9fe76f192487 Author: Olivier Crête Date: Tue Dec 11 13:24:04 2007 -0500 Use the bus message to get the information about sessions commit 537ba587c0c83f54c5aa8782ba14347314adaf8a Author: Olivier Crête Date: Tue Dec 11 12:41:51 2007 -0500 Export all of gsrtpbin's sdes properties commit 36133a9f328a46c65e4886c48930619a55df4bc2 Author: Olivier Crête Date: Tue Dec 11 12:24:31 2007 -0500 Have the rtp stream and rtp session hold hard refs to the parent objects commit 71a67d025bdfd8b987f657380c8a9ddf7ef3357a Author: Olivier Crête Date: Tue Dec 11 12:23:50 2007 -0500 Remove code that abort if the objects are unrefed in the wrong order commit 01d85b765fd041d544962a3667a5e1104bef5bf2 Author: Olivier Crête Date: Mon Dec 10 22:11:17 2007 -0500 Add python bindings commit 2faac7ddbd2b7a899e85265db856d9a1f835170d Author: Olivier Crête Date: Mon Dec 10 19:16:53 2007 -0500 Dont need to check NULLness before calling g_strdup, it does it for us commit 0ade909872c95c19eaa924395ace1218c43ec188 Author: Olivier Crête Date: Mon Dec 10 19:15:21 2007 -0500 Remove useless proto_subtype and proto_profile fields in the candidates commit a48477633420b8be985b04180ab1402a4e52b035 Author: Olivier Crête Date: Mon Dec 10 19:07:52 2007 -0500 Make the enum types be generated by glib-mkenums commit 20223761512b5023d2cf4f4fc3f14a6a92bf6c68 Author: Olivier Crête Date: Mon Dec 10 19:05:44 2007 -0500 Add method to find the GType of stream transmitter that will be created from a specific transmitters, so the bindings can find which types the GValues should be commit caa813dea6a58a065e2ac32dbe8a5704243b1358 Author: Olivier Crête Date: Fri Dec 7 17:51:45 2007 -0500 Make fs_stream_direction_get_type public commit 9489ee57be3ca7ea68dea584c014ef8503c54d55 Author: Olivier Crête Date: Fri Dec 7 16:47:32 2007 -0500 Add test for 10-way conference commit 58ea750c217268ad0917f09086a1c9d6fad181e1 Author: Olivier Crête Date: Fri Dec 7 16:34:05 2007 -0500 Use GST_BOILERPLATE_WITH_INTERFACE commit 3e6e63d23cdc7ea35d4a9a3febc9aa32f650f81d Author: Olivier Crête Date: Fri Dec 7 16:33:52 2007 -0500 Add test for changing direction property commit 89e01da28922cb72c9887ee825d6570fb9de3f95 Author: Olivier Crête Date: Fri Dec 7 15:55:54 2007 -0500 Test adding/removing remote codecs commit 73411e75bdc7edaa462c5c8d165e1eb295d4e895 Author: Olivier Crête Date: Fri Dec 7 15:52:11 2007 -0500 Add tests for various properties commit f440a2792335285c1ccd5cbd3f2a1b63e6f0516b Author: Olivier Crête Date: Fri Dec 7 15:51:57 2007 -0500 Getting a conf from a session will get a reference to it commit 0b16a063d3f2d75316609b8fe6dc358232d9b7ce Author: Olivier Crête Date: Fri Dec 7 15:39:45 2007 -0500 Remove lots of useless code from fsrtpparticipant commit 7e804605f431b7c5c3079e90cf7fc68e75c11248 Author: Olivier Crête Date: Fri Dec 7 13:39:52 2007 -0500 Emit the send-codec-changed signal, making sure its on the caller's thread commit 3f1525d4ec3a38aeef2971032154e809749c6469 Author: Olivier Crête Date: Fri Dec 7 13:39:31 2007 -0500 Implement the getter for current-send-codec commit 1f6f5f628dc82b0b352acdf774b6b6a96ac15cc8 Author: Olivier Crête Date: Fri Dec 7 13:01:59 2007 -0500 Add a cname property on the fsrtpconference and pass onto the gstrtpbin commit eb22b6b5c841d26003927ec56d9fca07be9c26f1 Author: Olivier Crête Date: Thu Dec 6 19:27:06 2007 -0500 Add multi-user test commit 47958a676c193673f60af8413931b834225fbdd6 Author: Olivier Crête Date: Thu Dec 6 19:26:51 2007 -0500 Dont mix particpants and sessions lists... commit 074234e228a6b185973da81947e3faaeb19a8339 Author: Olivier Crête Date: Thu Dec 6 19:20:04 2007 -0500 Prepare the test for multiple users commit 6a788a4cb914339f0cef5270f489b735f5379bd2 Author: Olivier Crête Date: Thu Dec 6 19:19:36 2007 -0500 Return an error if a NULL cname is passed commit e96c16183569ba479c2547406084b2a710f325e4 Author: Olivier Crête Date: Thu Dec 6 18:38:35 2007 -0500 Add warning when rtpbin asks for unknown PT commit db30b9b85bf4e08bed3a1b22c540b6efef4c4984 Author: Olivier Crête Date: Thu Dec 6 17:26:46 2007 -0500 Little simplication in the test commit 6ae79cf08517f3ab484f1b5d96c6e40cdf61ed5b Author: Olivier Crête Date: Thu Dec 6 16:06:26 2007 -0500 Use the gst debug stuff everywhere else commit 203175fe6553cbebb9e919884ef3f6bdb406a951 Author: Olivier Crête Date: Thu Dec 6 16:06:07 2007 -0500 Only print the buffer count every 10 buffers in test commit 44d6dbee0ab0999fb715143db8349d96ce5d3eef Author: Olivier Crête Date: Thu Dec 6 16:01:11 2007 -0500 Also the the gst debug messaging for the codec negotiation commit 4167179edb8d96cb99f39544b8ff90621de2b31f Author: Olivier Crête Date: Thu Dec 6 15:53:25 2007 -0500 Use Gstreamer debug message mecanisms for codec discovery and cache commit 6b8ee4d8abbfed1ee48efc29b2679da8214deac3 Author: Olivier Crête Date: Thu Dec 6 15:12:03 2007 -0500 Remove comment for set_options_elements commit ac923514c017ffd6a7784e6811f97077e0a9dd25 Author: Olivier Crête Date: Thu Dec 6 14:19:30 2007 -0500 Copy the codec into the negotiated list commit c598100e59c69fb5d5583801eabe2bac913b5ab6 Author: Olivier Crête Date: Thu Dec 6 14:13:57 2007 -0500 Dont unref the send codec bin twice commit 54a063d0c8f08d60ee294c672a8be0bc81d2b101 Author: Olivier Crête Date: Thu Dec 6 14:11:16 2007 -0500 Check session existence on new ssrc-cname-association commit 34f7623079074b95a6604c8a8f03ae95961de3b5 Author: Olivier Crête Date: Thu Dec 6 14:09:44 2007 -0500 Dont leak session ref on new association commit 819edebec9d0037d800d015dd7e4806dac66ef8a Author: Olivier Crête Date: Thu Dec 6 14:04:25 2007 -0500 Assert if a participant has no cname commit 87c2f06565b329a31c307a01092902901013e968 Author: Olivier Crête Date: Thu Dec 6 13:57:56 2007 -0500 Print the simpleconf id in debug messages commit 0f08fe284bab8afdfc55326b0e7eba5134cdee2a Author: Olivier Crête Date: Thu Dec 6 13:44:38 2007 -0500 Implement complete 2 person test commit 1cb6e39b66f342cddd0c6a61404e7b3b1982e7c3 Author: Olivier Crête Date: Thu Dec 6 13:24:13 2007 -0500 Invert the way pad the output ghostpad is added to make it more simple commit fc8311aa23cff3116a05e987e2dd318dd836e497 Author: Olivier Crête Date: Thu Dec 6 13:13:31 2007 -0500 Unref the substreams with g_object_unref.. not gst_.. commit 89e35114b86c7b421c20c3945add92c5fd8add25 Author: Olivier Crête Date: Thu Dec 6 13:13:02 2007 -0500 Zero the gstrtpbin pointre if there is an error commit dba60ce7ba57d361c17a79e54078bbec9f8d8890 Author: Olivier Crête Date: Wed Dec 5 21:35:40 2007 -0500 Oops, check for item in get_stream_by_ssrc commit ae47999322e2ff538b5aaaaf4af3657b7ee3d3c7 Author: Olivier Crête Date: Wed Dec 5 21:32:34 2007 -0500 Make fs_rtp_session_get_recv_codec_for_pt use its own locking commit d5e988344540942c6327f1332082935dff9afacb Author: Olivier Crête Date: Wed Dec 5 21:31:14 2007 -0500 Make the get_stream_by_ssrc method use its own locking commit d5636d9ba5f0fb2101e8ba45a83f24955723ac05 Author: Olivier Crête Date: Wed Dec 5 21:21:05 2007 -0500 Make the session mutex recursive commit d2495ca61c6ff3c96747bc3136d90b621270f680 Author: Olivier Crête Date: Wed Dec 5 20:54:11 2007 -0500 Save the codec/codebin in a substream commit dc487f3c035025382110e783f815871765ade393 Author: Olivier Crête Date: Wed Dec 5 20:53:51 2007 -0500 Announce a src pad if its made available after the substream creation commit 90a488e6716a16f29a880eee64f9f89f92346503 Author: Olivier Crête Date: Wed Dec 5 20:52:39 2007 -0500 Factor out the announcement of a new src pad on a RtpStream commit 69cbfe4e92a74980da895ab18b18dd024fff17b3 Author: Olivier Crête Date: Wed Dec 5 20:37:48 2007 -0500 Only create the outside pad emit the pad blocking signal if there is a codec/codecbin commit 6547c33ac88fe49666a42659ece303e61d63b57e Author: Olivier Crête Date: Wed Dec 5 20:37:04 2007 -0500 Hide the pad blocking when there is no codec bin inside the substream commit 6eda253a4d99efbb87813bcd9b6e661115f73e00 Author: Olivier Crête Date: Wed Dec 5 19:46:36 2007 -0500 Put the ghostpad on the valve in the substream and make sure its active commit 7dc8cc3c3c30434853a7b1aa812c686b81c022d1 Author: Olivier Crête Date: Wed Dec 5 19:45:11 2007 -0500 Dont hold the lock while calling add substream and remove the substream from the free list commit 31ef5806e0a93df59b4c89939d30035416333c43 Author: Olivier Crête Date: Wed Dec 5 19:44:33 2007 -0500 Print the unsigned value with %u ... commit 628ef2f1ae1347fe7aa527eef56ba21950df15f8 Author: Olivier Crête Date: Wed Dec 5 17:43:05 2007 -0500 transform the new_recv_codec_bin function into a pre-locked one commit 413ab2fff89ed991a59c1914ebd0a7e627197a2f Author: Olivier Crête Date: Wed Dec 5 17:23:21 2007 -0500 Define FsDirection to have flag-like properties commit a77718e967903ecbd46ebafaf8fe839eae40d541 Author: Olivier Crête Date: Wed Dec 5 16:31:08 2007 -0500 Actually do the request/sometimes pad stuff in the right order commit 745943676f0097eebc532d31735c5c6483255e37 Author: Olivier Crête Date: Wed Dec 5 16:28:57 2007 -0500 Expect the sometimes pad to have appeared once the request ones have been requests from rtpbin, instead of using signal commit 60e1dbff2f7d4e8a4c73fca350aa830bdaa18b45 Author: Olivier Crête Date: Wed Dec 5 15:54:23 2007 -0500 Emit the new-negotiated-codecs signal with the right name commit a0c12be72fe93ba58ca8dbfa645138f3ad8e9b4f Author: Olivier Crête Date: Wed Dec 5 15:52:33 2007 -0500 Put the codec bin ghost pads are the correct ends commit 0e3c3337934b807aff56c91a6a6400cbdc08ba24 Author: Olivier Crête Date: Wed Dec 5 15:51:59 2007 -0500 Recognize the first/last elements of the pipeline list in a more correct/obvious way commit 486343f7a4d156615f7b0b9ba7984743e4c2765c Author: Olivier Crête Date: Wed Dec 5 15:44:10 2007 -0500 Oops, emit_by_name doesnt take a separate detail argument commit 9c67549c403cebc65402bc6aab90f168bc4c0208 Author: Olivier Crête Date: Wed Dec 5 15:43:44 2007 -0500 Make the RtpStream's properties refcount more explicit commit 90b0c3177b15e3bc0cb6aaa06bcb348de8a3fc8b Author: Olivier Crête Date: Wed Dec 5 15:42:51 2007 -0500 Stop the streamtransmitter first, to make sure no callbacks are called afterwise commit fc8e115fa378fe84258d9535967dbe0b8b146c91 Author: Olivier Crête Date: Wed Dec 5 15:42:14 2007 -0500 Rename the transmitter callback in the stream to make clear that they are callbacks, not methods commit 3a32e7753a2716325e269171fb6a631e0ecd670f Author: Olivier Crête Date: Wed Dec 5 15:41:07 2007 -0500 Make the rawudp test fail on g_warning and g_critical commit 784efcbc5b588a0f3d1253626b494cad73b223b6 Author: Olivier Crête Date: Wed Dec 5 15:40:09 2007 -0500 Pass the pad name to the _new_ghost_pad function (not the direction..) commit a2e457bff0edfb50c9264f2c77b72bed00393991 Author: Olivier Crête Date: Wed Dec 5 15:39:36 2007 -0500 Make the error message clearer commit 8df7cc46e714bf4053f4661b92133c3381070097 Author: Olivier Crête Date: Tue Dec 4 21:36:59 2007 -0500 Only verify the old codec associations if they exist commit 12bb75eff191670452be796ff17963591e480c61 Author: Olivier Crête Date: Tue Dec 4 21:34:52 2007 -0500 Our special errors should be of type element commit 24bad75933a3cc7d617da2894dcb5a2ed836658a Author: Olivier Crête Date: Tue Dec 4 21:34:23 2007 -0500 Put the doc sections in a more logical order commit 86b6a883221ad1c8816858824cbb05951c117f9f Author: Olivier Crête Date: Tue Dec 4 19:46:47 2007 -0500 Remove stray h commit a07ecde48e2b5367413d670d1f2b9201fdbe39b2 Author: Olivier Crête Date: Tue Dec 4 19:09:50 2007 -0500 Add documentation for special codec ids commit 9a37efcffff0dbeee0ee95b66efad849ed9d0f9a Author: Olivier Crête Date: Tue Dec 4 19:02:03 2007 -0500 Make the base class use G_DEFINE_*TYPE commit dfc755833ee36fb666065741f5bcaef9c29c45df Author: Olivier Crête Date: Tue Dec 4 18:56:05 2007 -0500 Use G_DEFINE_TYPE to define the various FsRtp* types commit ee688737ef7c4a97223641c8fa9ea7a004535f57 Author: Olivier Crête Date: Tue Dec 4 18:45:17 2007 -0500 Creation/destruction should not take time commit 4d68ad171af38fe0138f0d161ac26e1978d0a61a Author: Olivier Crête Date: Tue Dec 4 18:25:08 2007 -0500 Little indentation fix commit c54d16e3fc3b7eb86055283fa8d841e7b1001662 Author: Olivier Crête Date: Tue Dec 4 18:24:31 2007 -0500 Add basic object life-cycle test commit 9462167bfc37bde5b2ba31b59bc2fe8ee1c006ee Author: Olivier Crête Date: Tue Dec 4 18:24:12 2007 -0500 Break in switch commit b5f98aa2a590aa8e9a703d7e9347742d0693e7b3 Author: Olivier Crête Date: Tue Dec 4 18:23:30 2007 -0500 The rtp muxer is called rtpmux commit 79863d0cd96003c32e1d76eb8486ee5fe1803797 Author: Olivier Crête Date: Tue Dec 4 18:23:11 2007 -0500 Lock the object, not the list.. commit abc3a075c21f3084b87ee033d55970ca8734c55c Author: Olivier Crête Date: Tue Dec 4 18:18:53 2007 -0500 constructed method does not need to chain up commit 486a44481368fa14e1471a9f819defc9d7c32685 Author: Olivier Crête Date: Tue Dec 4 18:18:27 2007 -0500 Put the right parent for FsRtpSession commit 56bc9c689c94b39a785125162f3f471c5c079c1d Author: Olivier Crête Date: Tue Dec 4 17:45:43 2007 -0500 Add beginning of fsrtpconference tests commit 38ec1ba4e7c497be098d81cdbc26e140f99fce9e Author: Olivier Crête Date: Tue Dec 4 17:43:39 2007 -0500 Fix little indentation error commit 39d80efdc4624385adc4ac80c43ab8f662758416 Author: Olivier Crête Date: Tue Dec 4 17:17:29 2007 -0500 Correctly report substream async errors commit 03042bad0944a326220633877d6cfd81b00cd55a Author: Olivier Crête Date: Tue Dec 4 16:31:58 2007 -0500 Add a stream property to the substream commit 21d44d385d0763dfc3d34e18f0dac9fe06b0db6b Author: Olivier Crête Date: Tue Dec 4 16:30:43 2007 -0500 Make the header file match the code commit 6ea7f4cdfd6a74a5d6e75e8bb7984a177680f00c Author: Olivier Crête Date: Tue Dec 4 15:25:31 2007 -0500 Implement associating the substream with a stream based on the cname commit 46c5f983761d45e7b26345afbb23ec62e6544e87 Author: Olivier Crête Date: Tue Dec 4 14:38:01 2007 -0500 Dispatch the new ssrc-cname association signal commit 17f60e01b7bccb1b42564962b1560ccbe061f967 Author: Olivier Crête Date: Tue Dec 4 14:31:45 2007 -0500 Make clear that pad_added and request_pt_map are callbacks, not methods commit 0ff5bae869a869cb44a2ff00b1d05b20a1520ccb Author: Olivier Crête Date: Mon Dec 3 14:45:41 2007 -0500 Make sure there is only one participant with a specific cname in a conference commit 41b318a57cd035983396df8cab224aa7aa8d550a Author: Olivier Crête Date: Mon Dec 3 14:36:19 2007 -0500 Add a GError** to the new_participant method commit d43cd4a9354eebb6dffc22ecbfdb7f76e16e9d1d Author: Olivier Crête Date: Mon Dec 3 14:31:50 2007 -0500 Implement changing the recv codec bin and simplify its creation a bit commit bcc52dd1e24ef8f3979e517fc215deac3eec8be1 Author: Olivier Crête Date: Mon Dec 3 13:54:51 2007 -0500 Fix copy-paste error in the session send blocked pad callback commit beca04ceca0795acb5ea6066f26fa1d14895ada9 Author: Olivier Crête Date: Mon Dec 3 13:46:41 2007 -0500 Invalidate the substream commit 601b4884a289772950ed4bd122e67b4c27551e81 Author: Olivier Crête Date: Mon Dec 3 13:30:44 2007 -0500 Add function to rtp substream to start the process of changing the codec commit f9c6dfb47bc69314c4053693a93b846eee924683 Author: Olivier Crête Date: Mon Dec 3 13:23:18 2007 -0500 Clearly explain what the blocking id is for commit 705084c438c2d1e208bcc31f00b8b22e4422edd9 Author: Olivier Crête Date: Mon Dec 3 13:07:30 2007 -0500 Protect the list of substreams in a stream with the session lock commit 061eb1efbeb3ce3b9b965a8526d883f2b9e5ff05 Author: Olivier Crête Date: Mon Dec 3 12:27:40 2007 -0500 Use the Rtp Session lock for the substreams too commit 4437942b6f31c63548426a3382901a01c00e8d94 Author: Olivier Crête Date: Mon Dec 3 12:23:14 2007 -0500 Make the RTP session mutex puiblic commit b840009230a0ac937543ea5926d2dd0fec33f587 Author: Olivier Crête Date: Mon Dec 3 12:09:59 2007 -0500 Make clear that the codec in the substream is also protected by the mutex commit adc7210b4555f138aa8ed0d59804d7e65d472123 Author: Olivier Crête Date: Mon Dec 3 11:37:31 2007 -0500 Simplify the set_send_codec code a little commit 14de2737e8933abafb071fc36bc476fd371d35c8 Author: Olivier Crête Date: Mon Dec 3 11:27:06 2007 -0500 Stop and dispose of the send codec bin commit 8d248b86a54c8fc6f04bb630014bdcfa6accc93d Author: Olivier Crête Date: Mon Dec 3 11:24:40 2007 -0500 Add a capsfilter after the send codec bin (to set the codec parameters from the negotiation) commit 062179b9c8cca2e2f926d4177c40645bb171002a Author: Olivier Crête Date: Fri Nov 30 20:09:39 2007 -0500 Drop buffers received from the old payload type and only drop the pad probe when a buffer of the right type is received commit 4afb96ced21a1134a52eefe43661345cd822af22 Author: Olivier Crête Date: Fri Nov 30 19:49:20 2007 -0500 Implement changing the send codec dynamically commit dd6e86c1281d91d827cc37213da5348c6b0e198a Author: Olivier Crête Date: Fri Nov 30 18:34:04 2007 -0500 Add already-locked version of selected_send_codec commit 79ac9ccd98ca425eaf8ddf928dc7cc4f80f0793f Author: Olivier Crête Date: Fri Nov 30 18:09:39 2007 -0500 Improve the documentation of some functions, make it clear that the src-pad-added signal is called on the streaming thread commit ced146eee36ff70e6fb44be5b217c4d30ddba950 Author: Olivier Crête Date: Fri Nov 30 18:07:34 2007 -0500 Use the proper locking wen accessing the codec bin in the substream commit 8c03042d52e2f0c6898f12a56658de7b4058f47d Author: Olivier Crête Date: Fri Nov 30 18:00:05 2007 -0500 Add some documentation to the private methods of FsRtpSession commit a0acd12b4b2bc4426b8d593b9da2e59747057ba5 Author: Olivier Crête Date: Fri Nov 30 16:19:04 2007 -0500 Look at the substreams to know if a stream already is associated with a ssrc commit b15c36263a6360d15fbe05d5210260c9f172df03 Author: Olivier Crête Date: Fri Nov 30 16:09:49 2007 -0500 Add the substream to the stream, save the current codec inside the substream, commit fc1d0734942e1f3c8c3e5e3946899a2ea26a96c3 Author: Olivier Crête Date: Fri Nov 30 15:30:15 2007 -0500 Add a pointer to the session into the substream commit ec7919a4ae0596ef76f240d987ce1fb3b20b5a60 Author: Olivier Crête Date: Fri Nov 30 14:45:43 2007 -0500 Remove useless id property on the FsStream commit 4b771371a85c603a43c0ff4ea2df8ce899661813 Author: Olivier Crête Date: Thu Nov 29 19:33:55 2007 -0500 Fix typo in documentation commit d5cb6e39874d00d87209ec7463bbb15a55f73b45 Author: Olivier Crête Date: Thu Nov 29 19:11:24 2007 -0500 Re-factor the creation of the send codec bin to make it more atomic, and separate it from the creation of the recv codec bin commit 900fd1f360369c0aa95fb0aeb7fd2671c2848c1e Author: Olivier Crête Date: Thu Nov 29 19:10:38 2007 -0500 Oops, the negociatiated_codec_associations hashtable contains associations, not pure codecs commit d67103613387c3a2b9e3fdafdff6153089db985d Author: Olivier Crête Date: Thu Nov 29 17:59:06 2007 -0500 Use the requested send codec if its valid commit 0eac216d2abd845efc8d16e2c02a360daf46f8f6 Author: Olivier Crête Date: Thu Nov 29 17:54:32 2007 -0500 Save the codec requested by set_send_codec commit 2ea8fb1a3627f263c86fdba31a98324b571023af Author: Olivier Crête Date: Thu Nov 29 17:17:28 2007 -0500 Build the send codec bin, changing it is not handled yet commit 16f71b452bfdbdc350b00940f48c3fa7457ba4c4 Author: Olivier Crête Date: Thu Nov 29 17:17:04 2007 -0500 Only dispose of the blueprints once all of the session elements have been destroyed commit 209f0628912945e21e66dbc3e0af6fcec47be78f Author: Olivier Crête Date: Thu Nov 29 17:16:12 2007 -0500 The error is unknown_codec, not invalid_codec commit c574bf8e59f7ea3f0c04d301fb4a23cfad968aad Author: Olivier Crête Date: Wed Nov 28 18:11:06 2007 -0500 Make sure the reception of unknown codecs is reported commit b5e502b672e8e843974bd5419b60886bd034cc4c Author: Olivier Crête Date: Wed Nov 28 18:10:43 2007 -0500 Add new error code to report the reception of a unknown codec commit 6244cef64811201f7ad101c95df9ed77381136a3 Author: Olivier Crête Date: Wed Nov 28 18:04:30 2007 -0500 Add a mutex to the FsRtpSubStream and use it to protect the codec bin commit 95ff5e20c616199e1ae2c3d39f9157a37f4fa3a8 Author: Olivier Crête Date: Wed Nov 28 18:04:11 2007 -0500 Rename the lock macros to FS_RTP_SESSION* to clearly reflect that they are for the rtp session object commit b97ef9f3a5bb6513f72cdb44046e5a6cace21fe8 Author: Olivier Crête Date: Wed Nov 28 17:10:50 2007 -0500 Create/link codec bin when a new recv codec is received commit 9d1a7861e2c7bd1908c0cd222303d06ef2654248 Author: Olivier Crête Date: Wed Nov 28 16:57:21 2007 -0500 Add function to add a codec bin to a substream commit bb6e8d33a92aa57e8105f3ca52ecc801d5fad32d Author: Olivier Crête Date: Wed Nov 28 16:19:37 2007 -0500 Add function to create a new codec bin from the negotiated codecs commit 3fb2062541dc91fc7783546984ae0ad5cd5a2b1b Author: Olivier Crête Date: Wed Nov 28 16:07:39 2007 -0500 Import improved version of create_codec_bin commit ede3e2b313cc67b78a73754b06b5273799cd2c13 Author: Olivier Crête Date: Wed Nov 28 15:13:38 2007 -0500 Make sure we stop the elements sink->source when stopping streams commit 2c21af75ce56373084dd579c1d8e29aea9a0c713 Author: Olivier Crête Date: Wed Nov 28 14:49:08 2007 -0500 Stop the src/sink elements before removing/unlinking them commit e628afd666d02095d34499f3d463cb9d1985d707 Author: Olivier Crête Date: Wed Nov 28 14:40:59 2007 -0500 Correct the copyright headers everywhere to make them LGPL v2.1 or later commit 0eb443bc5bba557e6bbba8aeb0dacf14db18124d Author: Olivier Crête Date: Wed Nov 28 14:06:30 2007 -0500 Make the FsRtpSubStream into a GObject of its own in its own file commit 62e68b7ca32d1963c87b0cb32fdb09642e2fc7dd Author: Olivier Crête Date: Wed Nov 28 14:05:59 2007 -0500 Fix fsrtpsession headers and pass the right type to the GET_PRIVATE macro commit df02f7676e7666810b6b4a859d5ed1beaa9fca9a Author: Olivier Crête Date: Tue Nov 27 22:29:13 2007 -0500 Implement codec negotiation commit 6ecec343eed691b9295c3886699e7c196a451e65 Author: Olivier Crête Date: Tue Nov 27 22:28:57 2007 -0500 Add new error for failed negotiation commit 53bb8440d30faf0958c81e088a255f26cfadefd8 Author: Olivier Crête Date: Tue Nov 27 22:10:32 2007 -0500 The local and negotiated codec lists have their own copies of the codecs commit 512dd2827aab5a0668e09f1bea4ec9275ba2a70e Author: Olivier Crête Date: Tue Nov 27 22:08:31 2007 -0500 Generate local codecs commit eed9cdf420ef882a796d9f8e9a233ded25c9becb Author: Olivier Crête Date: Tue Nov 27 22:03:47 2007 -0500 Use the new function names for the codec discovery tests commit 7cce3c2844460cd9703ffd82981e41f24b8c0440 Author: Olivier Crête Date: Tue Nov 27 21:53:01 2007 -0500 Validate the codec configurations commit 49acd3fc71c2187f8db33cff8038ddc332b4b67e Author: Olivier Crête Date: Tue Nov 27 21:52:10 2007 -0500 Import the copyright attributions for the codec discovery stuff from fs1 commit 30e54911ccee6a415d90867a75418a1326e9bd9b Author: Olivier Crête Date: Tue Nov 27 21:50:43 2007 -0500 Refuse any invalid codecs commit 44c425d59e39290b08e2f5b732fbb0aae355f98a Author: Olivier Crête Date: Tue Nov 27 21:44:54 2007 -0500 Replace the GPLv2 with the correct LGPLv2.1 commit dcf3bd48bf6a8dce138ad9af4930c6871dabb790 Author: Olivier Crête Date: Tue Nov 27 21:19:40 2007 -0500 Implement request_pt_map commit a57bcb37127d8f2e014f2beaa8196a05f85f11a3 Author: Olivier Crête Date: Tue Nov 27 21:14:37 2007 -0500 Load the blueprints when creating a new session and unload then on session disposal commit f59f2d6e0bfda0d8a6069d57aee373a1ce6a7e25 Author: Olivier Crête Date: Tue Nov 27 21:14:12 2007 -0500 Rename load/unload_codecs to fs_rtp_blueprints_get/unref commit e730077c966a15cbbf45364b7468cfd4b75b9c60 Author: Olivier Crête Date: Tue Nov 27 21:02:23 2007 -0500 Clarify locking for negotiated codecs commit 3e4928bf685d99720d7b878e52e2024ba29fed5a Author: Olivier Crête Date: Tue Nov 27 20:58:22 2007 -0500 Add remote_codecs implementation to the FsRtpStream commit 0f6f6183df37d462a17958650f6d16c96a661211 Author: Olivier Crête Date: Tue Nov 27 20:49:46 2007 -0500 Implement the various codec lists properties of FsRtpSession commit 855d27cb39e05a766f0100cf89e7ef8160d84c54 Author: Olivier Crête Date: Tue Nov 27 20:13:44 2007 -0500 Free the free substreams when the session dies commit c626bf144a4646373e3d0e58b477f3bde2e55a5e Author: Olivier Crête Date: Tue Nov 27 19:05:49 2007 -0500 Add the FsRtpSubStream struct, use it to implement session_new_recv_pad commit c7793543fe22cf9f0a938300db94007b9f69533e Author: Olivier Crête Date: Tue Nov 27 18:18:57 2007 -0500 The ssrc has to be 32bit (lets make sure it is) commit f3176271e0bc096b0e4a5c9f51b9b0048299939c Author: Olivier Crête Date: Tue Nov 27 18:16:28 2007 -0500 Oops, fs-rtp-session.h included itself commit 8fa9ed522ed94c83d0fbf1dc6dac50b157cddba4 Author: Olivier Crête Date: Tue Nov 27 18:15:44 2007 -0500 Unref the session after using it commit a3af56e7b6246da759c38e3a50d4c747f43d25ce Author: Olivier Crête Date: Tue Nov 27 17:35:06 2007 -0500 Remove preload_recv_codec, this API is probably impossible to implement on the stream commit 4e689ac2cb7d2f6b8a90b902fdb2b2abb6343e35 Author: Olivier Crête Date: Tue Nov 27 17:02:25 2007 -0500 Add a list of the rtpstreams to the rtpsession commit efe905519b48c80689ce7eac5950f09b40c9b053 Author: Olivier Crête Date: Tue Nov 27 16:59:43 2007 -0500 New src pads from the rtpbin are given to the session pending the ssrc-cname association commit aef9f2858cf56ffc21e9e8757e28828816575268 Author: Olivier Crête Date: Tue Nov 27 16:58:03 2007 -0500 Store the ssrc into the "id" property of a rtp stream commit 541276fb2692fd53cb4a59fd60e6a3bc21123f6d Author: Olivier Crête Date: Tue Nov 27 16:56:52 2007 -0500 Make fsrtpstream's constructed chain up commit 30d9a83f1e51bfd2b558b7352a4e37457ec9d6d4 Author: Olivier Crête Date: Tue Nov 27 16:56:05 2007 -0500 Make the rtpsession ID into a public member so it can be used to find the session commit 7651713d5c759cb2ae9d9c90370f8511ee1348ed Author: Olivier Crête Date: Tue Nov 27 14:09:05 2007 -0500 Add mutex to the session commit 45f55a64433a905ef66d38faa406116d4ee8029e Author: Olivier Crête Date: Mon Nov 26 19:42:08 2007 -0500 Add option to codec negotiation to prefer local codec ids commit 37e23884b68d1c0c699e41b881c72f11d9987526 Author: Olivier Crête Date: Mon Nov 26 19:21:52 2007 -0500 Import for the codec negotiation code from Farsight 1 commit 3ed242b4705e2fb1bf819ea28257b697e12a53ec Author: Olivier Crête Date: Fri Nov 23 14:44:33 2007 -0500 Import the local codec list generation code from Farsight 1 commit 2fc9a348dbf4774b251383824f07addeb76e3ab7 Author: Olivier Crête Date: Fri Nov 23 14:43:49 2007 -0500 Fix header comment to be more accurate (codec discovery is not an object) commit d48b8052571b88d338a1a1a6477a4a68fc372772 Author: Olivier Crête Date: Thu Nov 22 20:55:47 2007 -0500 Make clear that codec_blueprint_destroy is only exported for the caching commit d31af1ca6db39a41be510627353a0347e7d7798d Author: Olivier Crête Date: Thu Nov 22 20:52:52 2007 -0500 Add test program for codec discovery (its a manual test for now) commit 2a29314c5a30e08398316e0846b8febbc970e5f3 Author: Olivier Crête Date: Thu Nov 22 20:51:43 2007 -0500 Re-enable the cache and update the version number commit 9e794e6f2acfa43d3d1aa83822f8c7cbad2ca6d3 Author: Olivier Crête Date: Thu Nov 22 20:50:47 2007 -0500 Remove has_unique and sink/src content from the blueprint, its not no longer dependant on the config file commit 3752f9f97deb6c6fb788156f0d4ac2374c2db80a Author: Olivier Crête Date: Thu Nov 22 20:48:40 2007 -0500 Make load_codecs return the list of codecs (to isolate this module somehow) commit 1f5eac5e465f14eb673f2cb3de75ab87ff7e6659 Author: Olivier Crête Date: Thu Nov 22 20:47:05 2007 -0500 Make the list of elements factories in blueprints into list of lists These are ordered by preference (and can be fed directly to fsselector) commit ad1c08c22cf14c669b6c319ad3efb50effdb29e9 Author: Olivier Crête Date: Thu Nov 22 20:38:34 2007 -0500 Make ENABLE_DEBUG_CAPS into a ifdef (and dont require a prototype for debug_codec_cap_list commit 674840700146092830e73e75fe8e2734db4c5978 Author: Olivier Crête Date: Wed Nov 21 15:24:58 2007 -0500 Make it clear that the parameters for new stream are for the stream transmitter commit 0936ef5aca92a2742cf4c47d19915f185d7c48a5 Author: Olivier Crête Date: Tue Nov 20 19:41:27 2007 -0500 Don't save the cache if there is an error commit 7edf0c1e70ab4356eea1a3235eb3999ecbec3a7f Author: Olivier Crête Date: Tue Nov 20 19:36:26 2007 -0500 Define GST_MAJORMINOR and HOST_CPU in the configure.ac (like gst) commit c12142de68e3092efd63fc1300219bde3b292dd3 Author: Olivier Crête Date: Tue Nov 20 16:34:01 2007 -0500 Make load_codecs() return a GError commit ac21a0f235e36a69bce2cf82350ec8730efa6894 Author: Olivier Crête Date: Tue Nov 20 16:00:13 2007 -0500 Oops, the session should be a session, not a participant commit b702c257a797ed169027cc9289740b4bd1ee3e37 Author: Olivier Crête Date: Tue Nov 20 15:10:54 2007 -0500 Make load_codecs_cache return a GError commit 90ef008b54d81c08b62e5b380ec777307cad08f1 Author: Olivier Crête Date: Tue Nov 20 14:49:25 2007 -0500 Make the codec cache into its own separate module commit 7e36e2ffb28871248282b331c900c7e237028f7d Author: Olivier Crête Date: Tue Nov 20 14:28:41 2007 -0500 Import the codec discovery and caching stuff from Farsight 1 commit e7e686936868547a41a6880d76ea1eec1737200e Author: Olivier Crête Date: Tue Nov 20 14:28:11 2007 -0500 Add defines for codec id (and allow disabling codecs) commit 75b1b85251816b3eb06d9a4e351b9b5c55e45788 Author: Olivier Crête Date: Tue Nov 20 14:21:59 2007 -0500 Print warnings if the state change fails when removing the udpsrc elements commit 9262bd83b2590e1a77f5d9cc0986171b755c0ca2 Author: Olivier Crête Date: Mon Nov 19 20:00:42 2007 -0500 Make sure the non-forced rawudp ports are always continuguous for different components commit df9ddc6de50f342c6a0dac78af2119e92246f3e8 Author: Olivier Crête Date: Mon Nov 19 19:59:38 2007 -0500 Make the test suite code a bit cleaner commit 81d0c9493a2e8c7116dfe1894073de68b95d01f8 Author: Olivier Crête Date: Mon Nov 19 18:03:40 2007 -0500 Add a RTP muxer at object construction time commit 6999e66a87746db753fd58c27ddc8c0edc770dd5 Author: Olivier Crête Date: Mon Nov 19 18:01:58 2007 -0500 Clarify that the transmitter's sink should not do the async thing commit 9a8d66d3c4445a37a7da08627b9482985f705718 Author: Olivier Crête Date: Mon Nov 19 18:00:36 2007 -0500 Set the transmitter elements to the same state as the conference commit 6e79a19480d7125fc96a24c18f4d59c42d1906a4 Author: Olivier Crête Date: Mon Nov 19 17:28:37 2007 -0500 Remove useless entry commit 15ba998bf35421ba96076d12cdd7b377f0031bd4 Author: Olivier Crête Date: Mon Nov 19 17:01:58 2007 -0500 Use g_timeout_add_full (not the seconds version, because its broken, gnome bug #448943) commit dd2bc7b8b24b42aa589faab2470183dfab25f4d4 Author: Olivier Crête Date: Mon Nov 19 16:00:30 2007 -0500 Indentation typo commit e3f618420fa5f47680f090a7f60a0369550dca7d Author: Olivier Crête Date: Mon Nov 19 15:59:33 2007 -0500 Return FsRtpStream construction errors commit 797bc9a398bfa9d60d5079f70871907edfe34084 Author: Olivier Crête Date: Mon Nov 19 15:52:18 2007 -0500 Integrate transmitters into the FsRtpSession commit f7b29a5c0045534ef310957baa87fb72f8bd5586 Author: Olivier Crête Date: Mon Nov 19 14:43:30 2007 -0500 Pass the stream transmitter parameters to fs_session_new_stream() commit 47dce50cff4942e73e75b6adfbcfc5e43c19c43d Author: Olivier Crête Date: Mon Nov 19 12:32:20 2007 -0500 Implement the components property on the rawudp transmitter and make pads src%d and sink%d commit 2f5725233f6f2ce7921efe483df230620ac064bb Author: Olivier Crête Date: Mon Nov 19 12:31:03 2007 -0500 Add a parameter to the _new() function to specify the number of parameters commit 5034992d06e696aef384b5604630039acb5c7fe5 Author: Olivier Crête Date: Mon Nov 19 12:04:29 2007 -0500 Specify the number of components on a transmitter with a construct-only property commit 7b85263eaf552cb22e65ab55421d52c914123e92 Author: Olivier Crête Date: Mon Nov 19 11:56:33 2007 -0500 Add variable args version of fs_plugin_create commit d98b5864dc87b63e2ab154dd4a64a30b9c75ae7d Author: Olivier Crête Date: Mon Nov 19 01:42:05 2007 -0500 Verify that component_id is not 0 in add_remote_candidate commit 6bbc4fe175006d551707dd0277b443fc22c05995 Author: Olivier Crête Date: Mon Nov 19 01:30:37 2007 -0500 Change the _build() function to use any number of components commit c2b79440ecf725214ebd3e4c6bc939aca6e5555e Author: Olivier Crête Date: Mon Nov 19 01:03:33 2007 -0500 Transform the stun_recv_id and stun_timeout_id into arrays too commit 5d071b9c3e1fbf01a31d0e33129fa133497c5983 Author: Olivier Crête Date: Mon Nov 19 00:55:57 2007 -0500 Do the same for active candidates commit 1b55dda6b26e33531f3f53c447f9f2911cbaa054 Author: Olivier Crête Date: Mon Nov 19 00:43:32 2007 -0500 Make the stun candidates into an array too commit 1512e1089c611c15a21cd84d07a7637212bd4782 Author: Olivier Crête Date: Mon Nov 19 00:40:45 2007 -0500 Transform local_forced_candidate into an array commit a74a7ab93e4f304b7637c7e1b50c7e80414c3e71 Author: Olivier Crête Date: Sun Nov 18 19:34:02 2007 -0500 Make remote_candidates into an array too commit e2deaf17737265cea13c585404ab46fa22688f88 Author: Olivier Crête Date: Sun Nov 18 19:19:09 2007 -0500 Replace rtp/rtcp_udpport pointers with a single array commit 641ce612efe9b3ff76e2adec79f9f2f86695ad86 Author: Olivier Crête Date: Sun Nov 18 19:00:02 2007 -0500 Make udpports into a table too (one per component) commit ddecf7f3351ed5b715c52ef56697ff068d961947 Author: Olivier Crête Date: Sun Nov 18 18:55:09 2007 -0500 Also have the sink tees into an array, one per component commit 02a235bb27d6775cc7b835bcb914e22f2f33923f Author: Olivier Crête Date: Sun Nov 18 18:49:12 2007 -0500 Make src funnels into a table (one per component) commit 5bd8a02b78f0d1ecb4d4db0abccf86d37bc77b15 Author: Olivier Crête Date: Sun Nov 18 18:38:13 2007 -0500 Add variable for the number of components commit 67711f864d38cf852abfd7a008cfe519fbdacedc Author: Olivier Crête Date: Sun Nov 18 18:36:53 2007 -0500 Remove evil trailing whitespace commit 7dd4ecd031884a1d0fc425364c516507296e5d8b Author: Olivier Crête Date: Sun Nov 18 18:34:58 2007 -0500 Add test for forced local candidates commit ddbd6e60266925f53666de56536e882328d98c1a Author: Olivier Crête Date: Sun Nov 18 18:34:38 2007 -0500 Rename _finish_candidate_generation() to _no_stun() and have unique ids for forced candidates commit b2c2c9052aacc8462cc5d2e323a7ed585e8f46bd Author: Olivier Crête Date: Sun Nov 18 18:33:26 2007 -0500 Make the _finish_..() function only used when there is no stun, otherwise do the differnet steps directly commit 186c00b9965319033a1a087d1e2604742296b17f Author: Olivier Crête Date: Sun Nov 18 18:31:33 2007 -0500 Use enum for rtp/rtcp components for forced local candidates, don't overwrite rtp candidate with rtcp one commit e5191963208f88e8b40449688cf7a32c6767d55f Author: Olivier Crête Date: Sun Nov 18 04:26:34 2007 -0500 Add tests for STUN in the rawudp transmitter commit d9bc0cd80b091e34094a4ca8ca9d6404a7b4fdba Author: Olivier Crête Date: Sun Nov 18 04:26:04 2007 -0500 Set the STUN timeout property correctly commit 0c40a56d0694cd6fa98edadc565e33a826afa69d Author: Olivier Crête Date: Sun Nov 18 04:23:34 2007 -0500 Remove src from the bin before stopping it (before of the lost states) commit 2f05a0349f4897257ce5d38525f6ccf58231e4c5 Author: Olivier Crête Date: Sun Nov 18 03:16:19 2007 -0500 Add STUN timeout, protect more variables with the mutex commit aa4a854cab1c2a0ff36222e2561ef43eda762b88 Author: Olivier Crête Date: Sun Nov 18 03:15:34 2007 -0500 Add a function to emit async errors from the stream transmitters commit 367e53fdf84fc87374cef5cd301a6d69fd8511ec Author: Olivier Crête Date: Fri Nov 16 19:43:07 2007 -0500 Replace g_debug with a DEBUG macro that is disabled by default commit 71490af3a0ac33f4dad299d8d645a29a51dd95a1 Author: Olivier Crête Date: Fri Nov 16 19:42:47 2007 -0500 Remove useless debug messages commit c6234247d4a3e16c05d6adf2db73187fcaf5c876 Author: Olivier Crête Date: Fri Nov 16 19:42:32 2007 -0500 Little documentation fixes commit 454c94e0db17e2c01e171f017a62c468919b9be3 Author: Olivier Crête Date: Fri Nov 16 19:42:13 2007 -0500 Transform FS_COMPONENT_* into an enum commit cb261ab95d2dffe731313b31871cad218978d080 Author: Olivier Crête Date: Fri Nov 16 19:31:38 2007 -0500 De-invert the copy/destroy function of FsCodec and FsCandidate commit b48c36f42abae131fd1a773a020d024aab3c89d1 Author: Olivier Crête Date: Fri Nov 16 19:26:21 2007 -0500 Default the rtcp port to rtp port + 1, pass the right parameters to various functions, store pointers to tee and funnel in UdpPort for convenience commit feb1d53d74c5f06a8c244c07d05a36667cf512bb Author: Olivier Crête Date: Fri Nov 16 19:23:08 2007 -0500 Instead of putting a queue before the sink, just make do async=TRUE commit 33a08c8e0ecf35fde5b80c1de1bd34ede2a38f40 Author: Olivier Crête Date: Fri Nov 16 19:21:33 2007 -0500 Complete unit RawUdp transmitter unit test for local interface discovery mode commit c1e1150039b14f188d043d9f216eae23f81514c7 Author: Olivier Crête Date: Fri Nov 16 17:11:18 2007 -0500 Oops, call gst_pad_push, not chain and pass the chain func to GST_DEBUG_FUNCPTR commit 493b62da9f7ea3edfa7423271306f68af2f32805 Author: Olivier Crête Date: Fri Nov 16 15:48:59 2007 -0500 Add the local candidates back and connect all the signals on the FsRawUdpStreamTransmitter commit 17915ab0ecb77bb0e3324a6a62929ed667aa481b Author: Olivier Crête Date: Fri Nov 16 15:48:25 2007 -0500 Emit the new-active-candidate-pair signal from FsRawUdpStreamTransmitter commit 96b0c4c2d93f0ddab74f143921d41f91012faeee Author: Olivier Crête Date: Fri Nov 16 14:32:11 2007 -0500 Add beggining of test that runs the transmitter commit 8bf443473fe9d3b4916ee7fd940e0613cb485059 Author: Olivier Crête Date: Fri Nov 16 14:31:23 2007 -0500 Add descritive messages to non-existant transmiter test commit 0560bb508939e28c33ad204c35c8005d5d5ed0e0 Author: Olivier Crête Date: Fri Nov 16 14:23:35 2007 -0500 Rename ourpad to the slightly more expressive elempad, connect the queue in the right direction commit 0771789c6a02180f076f114b1ec497446c54182b Author: Olivier Crête Date: Fri Nov 16 14:22:33 2007 -0500 Use g_set_error instead of g_error_new (forgotten in one place) commit 084632476cea558d01e3e4b7abbc04a821b16df0 Author: Olivier Crête Date: Fri Nov 16 14:20:31 2007 -0500 Install the stun-port prop with the correct prop-id, free the stun_ip before replacing it, dont zero-out the error pointer and and return an error if the object can't be created commit 11254e6dd7e0e9b35bf47ad03cbf75f0a21e218e Author: Olivier Crête Date: Fri Nov 16 14:19:09 2007 -0500 Derive the FsStreamTransmitter from its parent not its class and vice-versa commit 2bd6ebd721a854865806331c84ee150bd1ef1813 Author: Olivier Crête Date: Fri Nov 16 14:18:12 2007 -0500 Pass the error flags when compiling the check tests commit 9872e58437931ba74161215a74c362f5ec5a8cde Author: Olivier Crête Date: Fri Nov 16 14:17:35 2007 -0500 Activate the request pad on the funnel when its added commit ea5ea826f415125e075794ff34b429677831d518 Author: Olivier Crête Date: Fri Nov 16 12:12:22 2007 -0500 Dont link add/link fakesrc at pipeline creation commit a74b5153bc54779a24099cfd6513d4d3cf378d0a Author: Olivier Crête Date: Thu Nov 15 20:07:04 2007 -0500 Add first unit tests for the transmitters commit 780b3e940f39dcfcfc2044c4179370b7abe39096 Author: Olivier Crête Date: Thu Nov 15 20:05:46 2007 -0500 Create the bins using gst_bin_new() and have the FsRawUdpTransmitter ref them commit 05e5401871a1547e4429073f56656b6c5017f4f6 Author: Olivier Crête Date: Thu Nov 15 20:04:43 2007 -0500 Fix the plugin loading code again commit ee3c94db7897507d4930a6c79a10117f2d6cb618 Author: Olivier Crête Date: Thu Nov 15 18:43:07 2007 -0500 Declare the rawudp transmitter as a plugin commit 577a5cab7ef10a8e1e19de948896d93d1d8503f8 Author: Olivier Crête Date: Thu Nov 15 18:42:50 2007 -0500 Dont use a variable name as a macro argument... commit a057eeb457b3d90c866e438a8d4b79c9b18e1e1e Author: Olivier Crête Date: Thu Nov 15 18:30:13 2007 -0500 Build the fs-interfaces file into the transmitter commit 56642fc7fa12ed0c8d379e0a2020cf24b0c32b67 Author: Olivier Crête Date: Thu Nov 15 18:25:34 2007 -0500 Merge FS_STREAM_ERROR and FS_SESSION_ERROR in FS_ERROR (they are the same errors) commit d62bd068621209ff027a4d8eabe7376ecb52fce1 Author: Olivier Crête Date: Thu Nov 15 18:14:24 2007 -0500 Return errors properly when there is problem while loading a transmitter plugin commit 3dc5bcf1c431767bf05bfa8e25bfedab5615f46f Author: Olivier Crête Date: Thu Nov 15 16:18:29 2007 -0500 Add queue to RTP sink in transmitter commit c6752f67e7f01336a8ac6d1ccacbda3fb08d69fe Author: Olivier Crête Date: Thu Nov 15 15:27:33 2007 -0500 Generate local candidates from user request, STUN or by scanning the available interfaces commit fd875e4de5fabec03432ee916b92e9845d12dcce Author: Olivier Crête Date: Thu Nov 15 14:58:57 2007 -0500 Add function to return the port actually used by a UdpPort commit bd0be86c94b2f8f480778eb4fba8891d3d4554a2 Author: Olivier Crête Date: Thu Nov 15 12:49:27 2007 -0500 Replace UdpStream with UdpPorts in FsRawUdpStreamTransmitter commit 551b02f22206dd0521522eea45ba5dbd01fede0b Author: Olivier Crête Date: Thu Nov 15 12:45:11 2007 -0500 Replace the single UdpStream by two UdpPort structs (makes the code much more clean) commit fe091ea39d7f705fafe9b2c7a4efdb4c3b7e547c Author: Olivier Crête Date: Thu Nov 15 12:44:09 2007 -0500 Add constants to define the components ids 1 and 2 as RTP/RTCP as in ICE-19 commit c98e347dc3b6900e2bc8999bc7afecccbebcb93b Author: Olivier Crête Date: Wed Nov 14 19:46:52 2007 -0500 Reformat the interfaces finding code according to Fs2 standards commit 2b809654c6e23b1196507eba558c8afe5c6168a1 Author: Olivier Crête Date: Wed Nov 14 19:41:05 2007 -0500 Import interface finding code from Farsight1 commit 8e28c7ea9573f0489ad7df90aeefb2fa01073a58 Author: Olivier Crête Date: Wed Nov 14 14:19:11 2007 -0500 Add stun timeout for the rawudp transmitter commit 6394d06b3c934df14295f310ac99780612396386 Author: Olivier Crête Date: Tue Nov 13 21:39:31 2007 -0500 Use GError to report non-implementedness from the transmitter classes too commit d2bee87083c4b67439b9c9575052215ef307b718 Author: Olivier Crête Date: Tue Nov 13 21:34:04 2007 -0500 Report method non-implementedness as a GError in FsStream commit ce8b3f5b02bb0f7f10d6cf16e3ba419a7a693fbd Author: Olivier Crête Date: Tue Nov 13 21:31:37 2007 -0500 Report method non-implementedness as a GError in FsStream commit b330daf94cf8553d9b237aba9c81e6b11d483dda Author: Olivier Crête Date: Tue Nov 13 20:19:07 2007 -0500 Fix indentation commit 633920d47b70bd132b6a44579b04df9a99bfecb8 Author: Olivier Crête Date: Tue Nov 13 19:37:31 2007 -0500 Implement sending property commit e18340fd8e46dbfc833618a7f991a7d298712780 Author: Olivier Crête Date: Tue Nov 13 19:32:34 2007 -0500 Implement remote candidates commit 0f236844c0d5147fed68b7b28f9a3a1ff7f8aa88 Author: Olivier Crête Date: Tue Nov 13 19:32:19 2007 -0500 Add functions to add and remove destinations from the multiudpsink commit 248c9b2b8c0c72d25ed6721de9d890ea2fa585c3 Author: Olivier Crête Date: Tue Nov 13 19:11:57 2007 -0500 Fix indentation commit b035cac6fb12e9c96a267adc7fe1a5dc1bac028c Author: Olivier Crête Date: Tue Nov 13 19:05:28 2007 -0500 Call the build function after the RawUdpStreamTransmitter has been created commit 8631533842ba7a431bb028099bb55525355622fa Author: Olivier Crête Date: Tue Nov 13 19:04:19 2007 -0500 Use g_set_error instead of g_error_new when appropriate commit 8849591a42f8702751342139197c7a8202d04916 Author: Olivier Crête Date: Tue Nov 13 18:58:15 2007 -0500 Don't set the errors to NULL without checking them commit f114444e064e82ff72646be15450102fcfe2dbef Author: Olivier Crête Date: Tue Nov 13 18:19:56 2007 -0500 Add UdpStream to the FsRawUdpStreamTransmitter commit e5c2cf930f528422849b535d471023817163cd34 Author: Olivier Crête Date: Tue Nov 13 18:16:36 2007 -0500 Add a pointer to the parent rawudptransmiter to the rawudpstreamtransmitter commit 28023a5b2e0de49656b5360568e334a73ca0f1ed Author: Olivier Crête Date: Tue Nov 13 17:06:39 2007 -0500 Add implementation of the UdpStream sub-object commit 059844ce8d283b54892277e20631f051baa4d5dd Author: Olivier Crête Date: Tue Nov 13 17:02:53 2007 -0500 Specify components 1/2 as RTP/RTCP commit c2882dc18672d59d60a14bfd5fe09212daaf93d5 Author: Olivier Crête Date: Tue Nov 13 17:00:51 2007 -0500 Add network error for the stream commit 52579af1be9211d5c32ceebb618804838364a6c7 Author: Olivier Crête Date: Tue Nov 13 13:38:25 2007 -0500 Implement the prefered-local-candidates property in the rawudp stream transmitter commit 4d87bcbc14c09111e0443885dce404f5d20969d0 Author: Olivier Crête Date: Tue Nov 13 13:33:01 2007 -0500 Add prefered-local-candidates property to the FsStreamTransmitter commit 917fce0c8ccfed84ad34af5f2f3bf0083cddbd1e Author: Olivier Crête Date: Tue Nov 13 13:19:51 2007 -0500 Add doc for newer abstract methods commit 6e16199714db458f0fa15935911d9a6a015a3a4b Author: Olivier Crête Date: Tue Nov 13 12:14:45 2007 -0500 Add FsCandidateList boxed type commit 9ce195f575f8d7c5fd9f20a9e583f123c1a5d0b7 Author: Olivier Crête Date: Tue Nov 13 11:52:07 2007 -0500 Implement properties in the rawudp stream transmitter commit 5f179760b1699e9febc0ed056875f0b882a5c12c Author: Olivier Crête Date: Mon Nov 12 17:45:05 2007 -0500 Implement new stream transmitter in rawudp commit 2da54dd9c2ffb7abb27283b6e31b5d9f8547522d Author: Olivier Crête Date: Mon Nov 12 17:26:44 2007 -0500 Pass parameters when creating a new stream transmitter commit 40a8b4303cf51ffa31e8e1b9ae74254f6473bd21 Author: Olivier Crête Date: Mon Nov 12 17:06:50 2007 -0500 Implement remote_candidates_added and select_candidate_pair in FsRtpStream commit 131b46881cd7bde6524b52b663c1f7f0a98c716a Author: Olivier Crête Date: Mon Nov 12 16:58:11 2007 -0500 Add fs_stream_transmitter_remote_candidates_added and fs_stream_transmitter_select_candidate_pair commit ef2873b8598f9a3086b3b9bbfc507fcdb728f49c Author: Olivier Crête Date: Mon Nov 12 16:47:24 2007 -0500 Add fs_stream_select_candidate_pair function commit 56e6a09d2d74a545d158c1587b611a95ccd8f15e Author: Olivier Crête Date: Mon Nov 12 16:27:47 2007 -0500 Add fs_stream_remote_candidates_added commit 7e767d1dfa3005c202cbc771eb83dad0e3f5dba3 Author: Olivier Crête Date: Fri Nov 9 15:24:06 2007 -0500 Rename native codecs/candidates to local codecs/candidates to match ICE 19 commit a808fdc85597f885edcd3b6128ee55aa7cc91fcf Author: Olivier Crête Date: Thu Nov 8 20:02:04 2007 -0500 Create transmitter elements commit 9fcf9cf518a96f5cf6180fc1f841e922b278a3d9 Author: Olivier Crête Date: Thu Nov 8 19:59:46 2007 -0500 Allow returning an error when constructing a transmitter commit 36ab671f3ea7445bce44b8e4af18ce68b0207a4c Author: Olivier Crête Date: Thu Nov 8 15:23:48 2007 -0500 Prioritize local lib when building commit 523c3d154d16554a42503f81435c4f6fe9ff2744 Author: Olivier Crête Date: Thu Nov 8 15:23:30 2007 -0500 Ignore .loT files too (some libtool thing) commit 0910bbaf4e5a33bf2bd70296975ad6a28cbbe321 Author: Olivier Crête Date: Thu Nov 8 15:23:05 2007 -0500 Add empty implementation of the rawudp transmitter plugin commit 7c30a826ea0e96c80d6e7e1d010ab347024f20f9 Author: Olivier Crête Date: Wed Nov 7 20:16:46 2007 -0500 Document object structures and classes commit a3b6684fa65d119c9a64ba9651dfebdf7a47bd95 Author: Olivier Crête Date: Wed Nov 7 19:40:26 2007 -0500 Use the plugin infrastructure for transmitter plugins commit 6c152e84a91d55bb37b39d5e73b38f49d3fb2c70 Author: Olivier Crête Date: Wed Nov 7 19:40:13 2007 -0500 Import simplified version of the Farsight1 plugin infrastructure commit 1ed280a1335029e5c28401a8b79961882ff289bd Author: Olivier Crête Date: Wed Nov 7 16:12:13 2007 -0500 Add RTCP funnel commit ab541c482f9b6514dfe59027f34eec53b39d6924 Author: Olivier Crête Date: Wed Nov 7 16:10:58 2007 -0500 Add RTP funnel commit d11bd053d2f747cf137a09e2d70c488f8e16a7b9 Author: Olivier Crête Date: Wed Nov 7 15:54:55 2007 -0500 Fix indentation of fs_rtp_session_class_init commit cf410ca210d458c902dccd4587b7366a8bb6a72f Author: Olivier Crête Date: Wed Nov 7 15:48:50 2007 -0500 Add fsfunnel element commit 6e181f80f0a2bbce9e2d4f134da8fe047d528ebb Author: Olivier Crête Date: Wed Nov 7 14:51:57 2007 -0500 Set the sending property of the stream transmitter based on the requested direction of the FsStream commit 6ef744781a990f492cff288608eda9c91de63ddf Author: Olivier Crête Date: Wed Nov 7 14:48:34 2007 -0500 Add some documentation commit dcd8a5e550488f337c9775d97fcbaf615c50a42d Author: Olivier Crête Date: Wed Nov 7 14:39:32 2007 -0500 Add fs_stream_emit_error function commit 692867a282a1d9f9ea8b3ab4b5aadde1ce35ce06 Author: Olivier Crête Date: Wed Nov 7 14:36:57 2007 -0500 Only use fs_session_emit_error for locally generated errors, not for error propagation commit 29c6495893c12f45a770f1e1fddbde485493de66 Author: Olivier Crête Date: Wed Nov 7 14:26:41 2007 -0500 Document the Session/Stream error quarks commit 69945eddd25e89e10c05902c33dff20e26700afc Author: Olivier Crête Date: Wed Nov 7 14:19:58 2007 -0500 Add error related definitions to the documentation commit ba522619be545b3015c14046c4fdbc30acee0a51 Author: Olivier Crête Date: Wed Nov 7 14:19:16 2007 -0500 Rename fs_session_error to fs_session_emit_error and document it commit 4fc0ee03e42bc7d0df2f68398eda2f95d1ffc341 Author: Olivier Crête Date: Wed Nov 7 14:18:38 2007 -0500 Forgot one av->application change commit bc3bfb4658e5aa98d1758be26105a1b253773ab5 Author: Olivier Crête Date: Wed Nov 7 13:29:34 2007 -0500 Unref participant and stream transmitters on FsRtpStream dispose commit 04effecc4ffe0d8479155689fd310bff37dfc407 Author: Olivier Crête Date: Wed Nov 7 13:28:15 2007 -0500 Link various signals/functions between the rtp stream and its transmitter commit 37b35ef578bb04f02f5f5851f98900ce80e39b3a Author: Olivier Crête Date: Wed Nov 7 13:04:56 2007 -0500 Make fs_stream_add_remote_candidate return a GErrror commit fc85d5bd78c6b887544b21e17f0f81c2ce6fbf9c Author: Olivier Crête Date: Wed Nov 7 12:56:57 2007 -0500 The property is called stream-transmitter commit 418eafb702b4f90f002c507f02b76618435c524c Author: Olivier Crête Date: Wed Nov 7 12:47:18 2007 -0500 Fix unit test for fs_codec_to_gst_caps commit 53f1ba712fe3bf511222338e646c769bb0228a7e Author: Olivier Crête Date: Wed Nov 7 12:46:10 2007 -0500 Replace media_type AV (which doesn't exist) with application (which does) commit dcc56530dc8205515d82522fbf862790357c9da7 Author: Olivier Crête Date: Wed Nov 7 12:32:50 2007 -0500 Add test registry to gitignore commit c1acb90698bbb029c98edf8bda601cd793446170 Author: Olivier Crête Date: Wed Nov 7 12:31:54 2007 -0500 Add unit test for fs_codec_to_gst_caps commit b237f5cb59f059f78e99a763056371c54afce0d1 Author: Olivier Crête Date: Wed Nov 7 12:31:23 2007 -0500 Clarify that fs_codec_to_gst_caps produces fixed caps commit d937795db839a3d9e581e799b417171ffdeb9093 Author: Olivier Crête Date: Wed Nov 7 12:23:22 2007 -0500 Free codecs at the end of the fs_codec_copy test commit a42d86a0205ab38d88155bb8548e9a334ac8ecf1 Author: Olivier Crête Date: Wed Nov 7 12:19:21 2007 -0500 Add const keyword to proper places in the FsCodec functions commit 1ebdbb1d080659e586dafdbd26b4f16a6f6c89b1 Author: Olivier Crête Date: Wed Nov 7 12:17:15 2007 -0500 Add fs_codec_to_gst_caps to be base library commit 3f1578321ae2444e96c4d46ee60aacaad34b9a2d Author: Olivier Crête Date: Tue Nov 6 18:44:44 2007 -0500 Add emacs temp files to gitignore commit 7d66ba4a5dc714d77bf53a77e5fba4b5ad09d54a Author: Olivier Crête Date: Tue Nov 6 18:24:12 2007 -0500 Add proper error on the wrong type of participant commit 48ad9c7c3870e61934e47bc2ef4855e85fc66768 Author: Olivier Crête Date: Tue Nov 6 18:20:02 2007 -0500 Add FsStream error enum commit 9f41e3c4219e30b6db0b537bf6a11890cecbca0b Author: Olivier Crête Date: Tue Nov 6 18:03:51 2007 -0500 Improve comment commit 335e231fb6cd39a7b0499e00be4d39ef5efa6b8e Author: Olivier Crête Date: Tue Nov 6 17:44:04 2007 -0500 Add tees for multiple transmitters and link them when the appropriate pads are created commit 765082ca6be32024db50d11e0865fb7a8eb619f5 Author: Olivier Crête Date: Tue Nov 6 17:40:25 2007 -0500 Rename fs_rtp_session_link_transmitter to more exact fs_rtp_session_link_network_sink commit 794fff143fe6366dd1916eaf0b2be83c4ecde900 Author: Olivier Crête Date: Tue Nov 6 17:38:30 2007 -0500 Have one one transmitter element for RTP and RTCP and this element will provide 2 pads commit 0c6882a3f68fad86feba92f9d7ef136a076c016c Author: Olivier Crête Date: Tue Nov 6 16:39:09 2007 -0500 Add callback on the apparition of the send_rtp_src_%d sometimes pad on gstrtpbin commit 552d4cab9fd4721994b3cdeb638c258df93aafce Author: Olivier Crête Date: Tue Nov 6 16:04:07 2007 -0500 Make the FsSession sink pad available from the property commit ed0d9156a8284007d3d854f097c428bb3effc3bf Author: Olivier Crête Date: Tue Nov 6 15:59:24 2007 -0500 Catch new recv pad in pad-added from GstRtpBin and call the appropriate FsRtpStream method commit a2c685f058d7cf3ba9f29c7579bc144be6131f77 Author: Olivier Crête Date: Tue Nov 6 15:29:23 2007 -0500 Rename fs_rtp_conference_request_pt_map to fs_rtp_conference_rtpbin_request_pt_map commit 30a88b993253b00f149e8c554bc52de82ae1e914 Author: Olivier Crête Date: Tue Nov 6 15:21:08 2007 -0500 Instantiate the send valve and session for FsRtpSession on the constructed method commit 4188f80fea3b4897b38f577c83c8bdc83143829f Author: Olivier Crête Date: Tue Nov 6 15:06:07 2007 -0500 Make session_new return a GError ** commit f3ce40e2ee1da7b174f86b180b60f4c8c5119154 Author: Olivier Crête Date: Tue Nov 6 15:04:22 2007 -0500 Define error enum and quark for FsSession commit ae55c62e979164ad88e1e78a88f930b1e8d0c3c1 Author: Olivier Crête Date: Tue Nov 6 14:15:10 2007 -0500 Make the GstRtpBin a public member of GstRtpConference commit 796aeca610338765619b2f1686cedf2f4d627704 Author: Olivier Crête Date: Tue Nov 6 14:13:40 2007 -0500 Set the whole RTP conference instead of just of GstRtpBin commit 63d87657dfe72ec8d1a0c2dd4a7215d297c853a2 Author: Olivier Crête Date: Tue Nov 6 14:08:33 2007 -0500 Add empty constructor function to FsRtpSession commit 14a0e4b8cc6b4137de4182bf75cdfd14d27d5e4c Author: Olivier Crête Date: Tue Nov 6 14:08:15 2007 -0500 Add unchecked _CAST macros for the RTP plugin commit 40ca756798eebfae8d1aa4b5fbc81546ccb3c8ac Author: Olivier Crête Date: Tue Nov 6 14:02:13 2007 -0500 Add gstrtpbin property to the FsRtpSession and set it at construct time from the conference commit 5700a3845ecc16fffd9fc6e09f1766acc87f0065 Author: Olivier Crête Date: Tue Nov 6 13:35:43 2007 -0500 Set a unique session id on each session of a conference commit 50637dd1803d8e91e70985b0e93986a31d4e30d9 Author: Olivier Crête Date: Tue Nov 6 13:14:23 2007 -0500 Add id property to FsRtpSession commit c4d74361ad6b3206876b04515a70874363004190 Author: Olivier Crête Date: Tue Nov 6 13:10:27 2007 -0500 Add "id" property to FsSession and FsStream commit ae400956208a77612caffde6071f23058c7a6374 Author: Olivier Crête Date: Tue Nov 6 13:10:07 2007 -0500 Base FsBaseConference on GstBin instead of GstElement commit f360f93ce764f2e29357146ffeae22ed5c30e434 Author: Olivier Crête Date: Tue Nov 6 12:38:36 2007 -0500 Put the _CAST and some _get_type into the -sections.txt file commit 47326ae7a08f33683868a0128ac3fdc8e7218a70 Merge: 2b30a02 36f0610 Author: Olivier Crête Date: Tue Nov 6 12:20:31 2007 -0500 Merge commit 'dhansakpublic/rtpbase' into rtpbase2 commit 2b30a0231e4c975dd62bd269eb411fae5c133fc2 Author: Olivier Crête Date: Tue Nov 6 12:07:38 2007 -0500 Add RTCP source/sinks to transmitter commit 36f06104e8fec605483dc996469b1d7f4022f9d8 Author: Olivier Crête Date: Mon Nov 5 21:10:07 2007 -0500 Implement request-pt-map signal handler shell commit 8e407bd503002ad52b6aab2f8978cd81a81cbd01 Author: Olivier Crête Date: Mon Nov 5 21:08:58 2007 -0500 Get CFLAGS for -Wall -Werror on non-release versions commit 2f536904999d122b4a2400ae35dc2f0ce5a442ea Author: Olivier Crête Date: Mon Nov 5 21:08:30 2007 -0500 Fix various compiler warnings commit 9dd5158f299b624811d8987e7610cf43aec0f6d2 Author: Olivier Crête Date: Mon Nov 5 20:14:48 2007 -0500 Instantiate the GstRtpBin element commit f97c2f07e1d4ea31b3767816ce9ceb06bc1a924c Author: Olivier Crête Date: Mon Nov 5 20:14:28 2007 -0500 Have proper src pad template with 3 variables commit 4fa04e768a7c28d810259e170ad6a5e2e9f8fc73 Author: Olivier Crête Date: Mon Nov 5 19:56:15 2007 -0500 Make fsrtpconference into a real GStreamer instantiable GStreamer element commit a57160b11829af4e2cad7cdbc25ca62bafc2d669 Author: Olivier Crête Date: Mon Nov 5 19:55:17 2007 -0500 Add implementation of fs_rtp_stream_new commit 9602123aa38da16b0608eb5941fe937693ffe6b1 Author: Olivier Crête Date: Mon Nov 5 19:54:50 2007 -0500 Renamed FS2_PLUGINS_BASE_CFLAGS to more meaningful FS2_INTERNAL_CFLAGS commit c84cc8b110e9c4f5463b4a400bb1144c8b4d4c8d Author: Olivier Crête Date: Mon Nov 5 19:11:59 2007 -0500 Add GST_DEBUG_FUNCPTR to FsBaseConference commit 7aecc959f96da2a1c5a19bdc9b8d398533f5ef9e Author: Olivier Crête Date: Mon Nov 5 19:09:12 2007 -0500 Remove unused get/set_property functions in fs-rtp-conference commit 3f673455007d4cf7c2b783b24f61d171aa1a91a4 Author: Olivier Crête Date: Mon Nov 5 19:04:55 2007 -0500 Add FsStreamDirection property to FsRtpStream commit 11c7878e7bd199a626fec189055c7359fd68014f Author: Olivier Crête Date: Mon Nov 5 19:03:13 2007 -0500 Store the FsStreamTransmitter in the FsRtpStream commit 087e978a59b56e7a3cdae162833ac47c5f91d2cd Author: Olivier Crête Date: Mon Nov 5 19:01:14 2007 -0500 Add FsRtpParticipant to FsRtpStream's priv commit cd45439a3c8952ed281204dbb99323d062966313 Author: Olivier Crête Date: Mon Nov 5 18:54:46 2007 -0500 Store the FsSession pointer into the stream commit c68bba59d0b5d8ed9263a6756f60e0c5a1b06454 Author: Olivier Crête Date: Mon Nov 5 18:54:34 2007 -0500 Oops, rename all of the FsStream to FsRtpStream in rtp stream commit 046252338ad5626b2ee46a0bff61382d87fb1ec9 Author: Olivier Crête Date: Mon Nov 5 18:52:21 2007 -0500 Add unchecked cast macros commit 0230dfbc78592f3f858a3952015b74f0bc4c6d21 Author: Olivier Crête Date: Mon Nov 5 18:21:15 2007 -0500 Have the RTP Session create the stream commit 6f03ff3ea8bb13b64426a450d4e26780c2df0c85 Author: Olivier Crête Date: Mon Nov 5 18:20:59 2007 -0500 Use unchecked cast (we created the object) commit 2430f085716241a155f568ecbf5dbc9cc801ab62 Author: Olivier Crête Date: Mon Nov 5 18:15:59 2007 -0500 Remove erroneous comment commit 9854e3dc4004a25e6a4b9a6f79d55d571cb971a3 Author: Olivier Crête Date: Mon Nov 5 18:14:48 2007 -0500 Add FsRtpStream object commit 28a5bcf0483e98a256eab0e364be5dcbd2bfea7b Author: Olivier Crête Date: Mon Nov 5 18:14:34 2007 -0500 Properly override the FsSession properties commit 17374fe00543ad8a289560b984447e6f882fe078 Author: Olivier Crête Date: Mon Nov 5 17:50:31 2007 -0500 Store the media_type in FsRtpSession commit 75f34c58f4e4c3e36839b72c9be66892882fffd0 Author: Olivier Crête Date: Mon Nov 5 17:38:57 2007 -0500 Add empty RTP session class commit d01c014656958b7d4c0182882c7ee44fa917341e Author: Olivier Crête Date: Mon Nov 5 17:25:09 2007 -0500 Add empty implementation of FsRtpParticipant commit 08c09edc235ccbcefa9282a9f532e71aa2b7044c Author: Olivier Crête Date: Mon Nov 5 17:24:33 2007 -0500 Store the FsParticipant cname in the base class commit e1f1ca5edfd88d142555ba207092b4cdf69206ba Author: Olivier Crête Date: Mon Nov 5 17:24:08 2007 -0500 Add G_END_DECLS to FsParticipant commit c4508480899dbec8ac2b4e506a3661559f4d0808 Author: Olivier Crête Date: Mon Nov 5 17:23:03 2007 -0500 Make FsRtpConference compile and remove useless functions commit b5973331e8ce2bc068c262aa006721465880201e Author: Olivier Crête Date: Mon Nov 5 17:21:24 2007 -0500 Use the right variable for selected plugins commit 5c5e3f10ff00733725570add95790921b2fcf3be Author: Olivier Crête Date: Mon Nov 5 16:52:45 2007 -0500 Add empty FsRtpConference commit 5864002edfc5d56a1cd4d9c98d131bca5e9df950 Author: Olivier Crête Date: Mon Nov 5 16:49:35 2007 -0500 Remove chain, getcaps, setcaps functions commit 4e1cfa570907b4c02f769e4c5984429e4b9c30fd Author: Olivier Crête Date: Mon Nov 5 16:45:48 2007 -0500 Add new_participant method to the baseconference class commit 65db0c91b332cfa0f6261b602a411348e1c29938 Author: Olivier Crête Date: Mon Nov 5 15:21:37 2007 -0500 Use the right prop numbers commit 290c69711e0bc83314ee4fe6e1b3726105b52860 Author: Olivier Crête Date: Mon Nov 5 15:19:51 2007 -0500 Add stream-transmitter property to the FsStream commit 0f50a74f6d93b96e0b9b7c63db79096b6855dd19 Author: Olivier Crête Date: Mon Nov 5 15:17:24 2007 -0500 Pass the name of the transmitter when creating a new stream commit 67b6a087845d3e2316df60b05256aaaf95491129 Author: Olivier Crête Date: Mon Nov 5 14:45:57 2007 -0500 Declare our base classes as G_TYPE_FLAG_ABSTRACT commit 653bcee2152df56eb33dd9ea2dab151636518bd9 Author: Olivier Crête Date: Mon Nov 5 14:45:33 2007 -0500 Declare doc basefiles and include our path to build gtkdocs commit 7bfa369ba1308b876a53ca3a1b2ffb9c5ae2ee07 Author: Olivier Crête Date: Mon Nov 5 14:41:39 2007 -0500 Add FsTransmitter and FsStreamTransmitter base classes commit 0098e3d64619931f92f595928afa852fd6542685 Author: Olivier Crête Date: Mon Nov 5 14:40:55 2007 -0500 Fix small thinkos in FsStream commit c0d8dcd8bd4279eaa94162c4a27447a2dc904f9a Author: Olivier Crête Date: Mon Nov 5 14:39:12 2007 -0500 Add new-native-candidate and native-candidates prepared signal to the FsStream object commit f6d4bba966f6e8ad81e8ecfdc93ac4480e5132de Author: Olivier Crête Date: Mon Nov 5 14:37:53 2007 -0500 Fix orthographic mistake commit 5a1f2f763d5ff5be192ac15f5f6ea00a3541c87f Author: Olivier Crête Date: Mon Nov 5 14:36:16 2007 -0500 Make the FsBaseConference implement the GstImplementsInterface interface commit c4ea13c6b762826127d82a2712295b03028580c7 Author: Olivier Crête Date: Mon Nov 5 14:35:20 2007 -0500 Include headers as if they were coming from the system header path commit 583990066b0dc4a5c52192e5ff64dbfaa41fdaa5 Author: Olivier Crête Date: Fri Nov 2 19:00:06 2007 -0400 Move the padding to the end of the structure (where it should be) commit 3ecba3e8324139359ee8acfa06ec0471a7e8e649 Author: Olivier Crête Date: Fri Nov 2 18:07:48 2007 -0400 Its Interface not Iface you idiot commit d031979e4aa22aae1259a9d6aeded1e3f93e3412 Author: Olivier Crête Date: Fri Nov 2 18:05:06 2007 -0400 More work on improving the documentation commit 73bb557c6de12233a2d4e4211ff37428c95ac2ee Author: Olivier Crête Date: Fri Nov 2 18:04:50 2007 -0400 Complete the renaming of fs_codec_compare to fs_codec_are_equal commit f464fae5325764f5e444d4510045cdaad0295c52 Author: Olivier Crête Date: Fri Nov 2 18:03:32 2007 -0400 Make FsBaseConference into a proper derivative of GstElement commit 4c20b1c106db17213450970b06b7635cdbc84430 Merge: f807f11 2c052ae Author: burger Date: Fri Nov 2 17:05:38 2007 -0400 Merge commit 'tester/unit-tests' commit f807f11fb330419887da8be42423e5dbb434241b Merge: 1b4339e 5bef80c Author: burger Date: Fri Nov 2 16:57:35 2007 -0400 Merge commit 'tester/misc-fixes' commit 1b4339ee556ecd3025bc232100fc3082fc169fef Merge: 139d32a 97ccf76 Author: burger Date: Fri Nov 2 16:56:45 2007 -0400 Merge commit 'tester/misc-fixes' commit 5bef80c6250a976874d2ff12c934442e598ffd8c Author: Olivier Crête Date: Fri Nov 2 16:54:50 2007 -0400 Fix indentation for new_participant commit 97ccf761467882ffe8d5b6ee021cfa6cbcf6e6c1 Author: Olivier Crête Date: Fri Nov 2 16:38:53 2007 -0400 Use g_warning when we don't have a GstObject commit 662b2d3cad8a54f4b70805b5ee36d6b6ece241b3 Author: Olivier Crête Date: Fri Nov 2 12:38:40 2007 -0400 Update the candidates definition to ICE-19 (foundation is now a 32byte string) commit 2c052ae51cb4ccccae5b6cd7b7afe82293a61d6e Author: Olivier Crête Date: Wed Oct 31 13:43:44 2007 -0400 Rename fs_codec_compare to _are_equal to match candidates API commit 808ffe16a2ee0c8e43649a64f9ade2070a0d9e65 Author: Olivier Crête Date: Tue Oct 30 18:19:41 2007 -0400 Fill base class stubs in FsStream commit dac4fbf5c328e33a577099e11d122d34903e4c22 Author: Olivier Crête Date: Tue Oct 30 18:18:37 2007 -0400 Add possibility of a GError to preload_recv_codec and pass a full FsCodec to it commit 36378388e8d2e2afad05a145c095ae0d7507065d Author: Olivier Crête Date: Tue Oct 30 18:10:03 2007 -0400 Preset the *error to NULL so the child doesn't have to do it commit f40882bf46eccfc9ba1de03f1e0a2d891df92159 Author: Olivier Crête Date: Tue Oct 30 17:46:11 2007 -0400 Verify the length of the ptrarray, not its presence. And also do it for the session's streams commit 3d36f9beaebf1c4ee6725dce191b3b88b7060bed Author: Olivier Crête Date: Tue Oct 30 17:23:06 2007 -0400 Return directly if new_stream/session fails commit 32dc28dd7f45511461673a27c7609f832a4188dc Author: Olivier Crête Date: Tue Oct 30 17:22:12 2007 -0400 Add calls to the class function for FsSession methods commit 655b7eceb94f38e94780e5aba0155a48fa6561d8 Author: Olivier Crête Date: Tue Oct 30 16:24:03 2007 -0400 Add function to create a new participant, it is created from the conference, but is owned by the user commit 96cc24396b7bb2498439c66916b16c7efb049923 Author: Olivier Crête Date: Tue Oct 30 15:39:48 2007 -0400 session and participants are objects... commit 139d32ae9f99f402cf9243a08ecf5d6cdaf797bb Merge: 90f6540 187d966 Author: Olivier Crête Date: Tue Oct 30 15:35:12 2007 -0400 Merge branch 'master' into fixes-from-darcs commit d13920f742cb0f516977e466fa8300ef2032bb1f Merge: 4b3f5aa 187d966 Author: Olivier Crête Date: Tue Oct 30 15:33:53 2007 -0400 Merge branch 'master' into unit-tests commit 187d9665c303a88fdef7136d5d82a5cf9e5dea1c Author: burger Date: Tue Oct 30 15:31:24 2007 -0400 Participants are independant, fixed refs and lifecycle issues to reflect new design commit 4b3f5aa5e8ae94123b2faff607c7067c0811abaf Author: Olivier Crête Date: Tue Oct 30 15:21:29 2007 -0400 Add gitignore file commit 5a6362ae7448d7dddf768817cde02a911b825db7 Author: Olivier Crête Date: Tue Oct 30 15:13:06 2007 -0400 Add test for fs_codec_copy commit ff3124f9e39979da680201be19c6b529e3c9a18c Author: Olivier Crête Date: Tue Oct 30 15:08:41 2007 -0400 Add Tests for fs_codec_compare commit 1d02c52284fedebeefc46a99d4af117c177259e2 Author: Olivier Crête Date: Tue Oct 30 14:45:58 2007 -0400 Add the _get_type functions for fs_codec to the Standard subsection commit 190c711d04ec76f02a63b6a241b3019dc75f374b Author: Olivier Crête Date: Tue Oct 30 14:44:12 2007 -0400 Complete documentation for fs_codec_new commit 16ce497f745a569c81ecb6866db67415815e8aef Author: Olivier Crête Date: Mon Oct 29 19:24:37 2007 -0400 Add fs_codec_compare function from darcs commit 996f352b8e1a3cfc92c6e28a134af7686964d8f1 Author: Olivier Crête Date: Tue Oct 30 14:32:48 2007 -0400 Replace fs_codec_init with fs_codec_new commit 062f7c012ebf5862dd5991bf5a28e25cdbb72778 Author: Olivier Crête Date: Tue Oct 30 12:14:42 2007 -0400 Add on test to the test suite commit 90f654039b62b55f056065129bedf33aaa09b2e5 Author: Olivier Crête Date: Mon Oct 29 19:22:09 2007 -0400 Properly reset the codec id to invalid -1 on error commit a55d026eb3100bc4c31e029990d8b3807ef217e6 Author: Olivier Crête Date: Mon Oct 29 19:06:33 2007 -0400 Add audiovideo type to media_type_to_string commit fbeab7ae9184e9e8ee94bfed2dcd3dd12f5b88e4 Author: Olivier Crête Date: Mon Oct 29 19:00:27 2007 -0400 Last is AV, not VIDEO commit 13f5110a0bd9a7d53e8d0d47b50f742176183739 Author: Olivier Crête Date: Mon Oct 29 18:59:27 2007 -0400 Add more stuff to make the base unit test framework commit a2a52b77ccc164ab897604b21e747bb5d915d00c Author: Olivier Crête Date: Mon Oct 29 18:46:43 2007 -0400 Add framework for unit tests (taken from gst-plugins-base) commit f9d4f8984f0ee5bdbcd3c35f8f1fac10f4c1d0fb Author: burger Date: Mon Oct 22 19:18:45 2007 -0400 Added weak refs between conference and sessions/participants, also made conference exit if unrefed before those 2 commit 799fe1b34b33179ef7c5244225912c925c2fac7c Author: burger Date: Fri Oct 19 18:12:47 2007 -0400 Started fs-base-conference element that implements the fs-conference-interface Made errors multiplex on GstBus Random doc and code fixes commit 957793f100239c2058286f8a5a89d38fd7c53f8c Author: Olivier Crête Date: Tue Oct 16 15:01:39 2007 -0400 Add proper marking for program listing commit bb263851d2a88152c1c26d12f74a1b1298c4e131 Author: Olivier Crête Date: Tue Oct 16 15:01:24 2007 -0400 Remove evil AM_MAINTAINER_MODE commit b1a1954b8ed5d9c2cb28efe6261f8a90a5bd4507 Author: Olivier Crête Date: Tue Oct 16 15:01:00 2007 -0400 Remove m4 subdir commit 163d1e0ee38e0c5f3d8aef35f9d3f5c0410c6a38 Author: burger Date: Tue Oct 16 11:09:36 2007 -0400 Added missing file commit 8610e0bc0a56a84a465b89655b314810e3bad2b4 Author: burger Date: Mon Oct 15 18:18:03 2007 -0400 Fixed gtkdoc generation, some fixes to code and docs commit 1c15f30a6ea7076f85802b1ad2b442301283b634 Author: burger Date: Fri Oct 12 18:08:05 2007 -0400 Add autofoo based on gst autofoo commit ce440b4c7062301987a3389b3eb14cbdd57dd03b Author: burger Date: Thu Oct 11 19:46:42 2007 -0400 More API implementation all around commit d82cc20e93e485d7011d93504d9a9d4f6143d79e Author: burger Date: Fri Oct 5 16:43:18 2007 -0400 -Removed FsSessionParticipant and replaced by FsStream -Renamed fs-conference to fs-conference-iface -Added fs-base-conference that will contain the Base element for Farsight Conference elements -More code all over commit 626f21b311df31a1e02398e5f0ddb83af7000b3d Author: Olivier Crête Date: Mon Oct 1 17:32:34 2007 -0400 Initial import farstream-0.2.7/aclocal.m40000664000076400007640000012340112462321045012277 00000000000000# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. 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'.])]) # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' 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.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # 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.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([common/m4/as-ac-expand.m4]) m4_include([common/m4/as-auto-alt.m4]) m4_include([common/m4/as-compiler-flag.m4]) m4_include([common/m4/as-libtool.m4]) m4_include([common/m4/as-python.m4]) m4_include([common/m4/as-scrub-include.m4]) m4_include([common/m4/as-version.m4]) m4_include([common/m4/gst-arch.m4]) m4_include([common/m4/gst-args.m4]) m4_include([common/m4/gst-check.m4]) m4_include([common/m4/gst-error.m4]) m4_include([common/m4/gst-glib2.m4]) m4_include([common/m4/gst-plugin-docs.m4]) m4_include([common/m4/gst-plugindir.m4]) m4_include([common/m4/gst.m4]) m4_include([common/m4/gtk-doc.m4]) m4_include([common/m4/pkg.m4]) m4_include([m4/introspection.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) farstream-0.2.7/common/0000775000076400007640000000000012462323001012000 500000000000000farstream-0.2.7/common/orc.mak0000664000076400007640000000470511710557061013215 00000000000000# # This is a makefile.am fragment to build Orc code. # # Define ORC_SOURCE and then include this file, such as: # # ORC_SOURCE=gstadderorc # include $(top_srcdir)/common/orc.mak # # This fragment will create tmp-orc.c and gstadderorc.h from # gstadderorc.orc. # # When 'make dist' is run at the top level, or 'make orc-update' # in a directory including this fragment, the generated source # files will be copied to $(ORC_SOURCE)-dist.[ch]. These files # should be checked in to git, since they are used if Orc is # disabled. # # Note that this file defines BUILT_SOURCES, so any later usage # of BUILT_SOURCES in the Makefile.am that includes this file # must use '+='. # EXTRA_DIST = $(ORC_SOURCE).orc ORC_NODIST_SOURCES = tmp-orc.c $(ORC_SOURCE).h BUILT_SOURCES = tmp-orc.c $(ORC_SOURCE).h orc-update: tmp-orc.c $(ORC_SOURCE).h $(top_srcdir)/common/gst-indent tmp-orc.c cp tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c cp $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h orcc_v_gen = $(orcc_v_gen_$(V)) orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY)) orcc_v_gen_0 = @echo " ORCC $@"; cp_v_gen = $(cp_v_gen_$(V)) cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY)) cp_v_gen_0 = @echo " CP $@"; if HAVE_ORCC tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc $(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --implementation --include glib.h -o tmp-orc.c $(srcdir)/$(ORC_SOURCE).orc $(ORC_SOURCE).h: $(srcdir)/$(ORC_SOURCE).orc $(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --header --include glib.h -o $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE).orc else tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc $(srcdir)/$(ORC_SOURCE)-dist.c $(cp_v_gen)cp $(srcdir)/$(ORC_SOURCE)-dist.c tmp-orc.c $(ORC_SOURCE).h: $(srcdir)/$(ORC_SOURCE).orc $(srcdir)/$(ORC_SOURCE)-dist.c $(cp_v_gen)cp $(srcdir)/$(ORC_SOURCE)-dist.h $(ORC_SOURCE).h endif clean-local: clean-orc .PHONY: clean-orc clean-orc: rm -f tmp-orc.c $(ORC_SOURCE).h dist-hook: dist-hook-orc .PHONY: dist-hook-orc # we try and copy updated orc -dist files below, but don't fail if it # doesn't work as the srcdir might not be writable dist-hook-orc: tmp-orc.c $(ORC_SOURCE).h $(top_srcdir)/common/gst-indent tmp-orc.c rm -f tmp-orc.c~ cmp -s tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c || \ cp tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c || true cmp -s $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h || \ cp $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h || true cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h farstream-0.2.7/common/gtk-doc-plugins.mak0000664000076400007640000003025412406633262015440 00000000000000# This is an include file specifically tuned for building documentation # for GStreamer plug-ins help: @echo @echo "If you are a doc maintainer, run 'make update' to update" @echo "the documentation files maintained in git" @echo @echo Other useful make targets: @echo @echo check-inspected-versions: make sure the inspected plugin info @echo is up to date before a release @echo # update the stuff maintained by doc maintainers update: scanobj-update $(MAKE) check-outdated-docs # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) # thomas: make docs parallel installable TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_API_VERSION@ MAINTAINER_DOC_STAMPS = \ scanobj-build.stamp EXTRA_DIST = \ $(MAINTAINER_DOC_STAMPS) \ $(srcdir)/inspect/*.xml \ $(SCANOBJ_FILES) \ $(content_files) \ $(extra_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_OVERRIDES) \ $(DOC_MODULE)-sections.txt # we don't add scanobj-build.stamp here since they are built manually by docs # maintainers and result is commited to git DOC_STAMPS = \ scan-build.stamp \ tmpl-build.stamp \ sgml-build.stamp \ html-build.stamp \ scan.stamp \ tmpl.stamp \ sgml.stamp \ html.stamp # files generated/updated by gtkdoc-scangobj SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals \ $(DOC_MODULE).types SCANOBJ_FILES_O = \ .libs/$(DOC_MODULE)-scan.o # files generated/updated by gtkdoc-scan SCAN_FILES = \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt \ $(DOC_MODULE)-decl.txt \ $(DOC_MODULE)-decl-list.txt REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = \ $(SCANOBJ_FILES_O) \ $(REPORT_FILES) \ $(DOC_STAMPS) \ inspect-registry.xml INSPECT_DIR = inspect if ENABLE_GTK_DOC all-local: html-build.stamp ### inspect GStreamer plug-ins; done by documentation maintainer ### # only look at the plugins in this module when building inspect .xml stuff INSPECT_REGISTRY=$(top_builddir)/docs/plugins/inspect-registry.xml INSPECT_ENVIRONMENT=\ LC_ALL=C \ GST_PLUGIN_SYSTEM_PATH= \ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/plugins:$(top_builddir)/src:$(top_builddir)/gnl \ GST_REGISTRY=$(INSPECT_REGISTRY) \ PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ $(INSPECT_EXTRA_ENVIRONMENT) #### scan gobjects; done by documentation maintainer #### scanobj-update: -rm scanobj-build.stamp $(MAKE) scanobj-build.stamp # gstdoc-scanobj produces 5 output files (.new) # scangobj-merge.py merges them into the file which we commit later # TODO: also merge the hierarchy scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles) @echo " DOC Introspecting gobjects" @if test x"$(srcdir)" != x. ; then \ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ do \ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ done; \ fi; \ mkdir -p $(INSPECT_DIR); \ scanobj_options=""; \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ $(INSPECT_ENVIRONMENT) \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ $(GST_DOC_SCANOBJ) $$scanobj_options --type-init-func="gst_init(NULL,NULL)" \ --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir=$(INSPECT_DIR) && \ echo " DOC Merging introspection data" && \ $(PYTHON) \ $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE) || exit 1; \ if test x"$(srcdir)" != x. ; then \ for f in $(SCANOBJ_FILES); \ do \ cmp -s ./$$f $(srcdir)/$$f || cp ./$$f $(srcdir)/ ; \ done; \ fi; \ touch scanobj-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(SCANOBJ_FILES_O): scan-build.stamp @true ### scan headers; done on every build ### scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp @echo ' DOC Scanning header files' @if test x"$(srcdir)" != x. ; then \ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ do \ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ done; \ fi @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan \ $(SCAN_OPTIONS) $(EXTRA_HFILES) \ --module=$(DOC_MODULE) \ $${_source_dir} \ --ignore-headers="$(IGNORE_HFILES)"; \ touch scan-build.stamp #### update templates; done on every build #### # in a non-srcdir build, we need to copy files from the previous step # and the files from previous runs of this step tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) @echo ' DOC Rebuilding template files' @if test x"$(srcdir)" != x. ; then \ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ do \ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ done; \ fi @gtkdoc-mktmpl --module=$(DOC_MODULE) @$(PYTHON) \ $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true #### xml #### sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files) @echo ' DOC Building XML' @-mkdir -p xml @for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \ xsltproc --stringparam module $(MODULE) \ $(top_srcdir)/common/plugins.xsl $$a > xml/`basename $$a`; done @for f in $(EXAMPLE_CFILES); do \ $(PYTHON) $(top_srcdir)/common/c-to-xml.py $$f > xml/element-`basename $$f .c`.xml; done @gtkdoc-mkdb \ --module=$(DOC_MODULE) \ --source-dir=$(DOC_SOURCE_DIR) \ --expand-content-files="$(expand_content_files)" \ --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) \ --output-format=xml \ --ignore-files="$(IGNORE_HFILES) $(IGNORE_CFILES)" \ $(MKDB_OPTIONS) @cp ../version.entities xml @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building HTML' @rm -rf html @mkdir html @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html @for f in $(content_files); do cp $(srcdir)/$$f html; done @cp -pr xml html @cp ../version.entities html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) @mv html/index.sgml html/index.sgml.bak @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_API_VERSION@\//g" html/index.sgml.bak >html/index.sgml @rm -f html/index.sgml.bak @rm -f html/$(DOC_MAIN_SGML_FILE) @rm -rf html/xml @rm -f html/version.entities @test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \ if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done @echo ' DOC Fixing cross-references' @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp clean-local-gtkdoc: @rm -rf xml tmpl html # clean files copied for nonsrcdir templates build @if test x"$(srcdir)" != x. ; then \ rm -rf $(SCANOBJ_FILES) $(SCAN_FILES) $(REPORT_FILES) \ $(MAINTAINER_DOC_STAMPS); \ fi else all-local: clean-local-gtkdoc: endif clean-local: clean-local-gtkdoc @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -f $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @rm -rf tmpl/*.sgml.bak @rm -f $(DOC_MODULE).hierarchy @rm -f *.stamp || true @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(DOC_MODULE)-docs.sgml ; \ rm -f $(DOC_MODULE).types ; \ rm -f $(DOC_MODULE).interfaces ; \ rm -f $(DOC_MODULE)-overrides.txt ; \ rm -f $(DOC_MODULE).prerequisites ; \ rm -f $(DOC_MODULE)-sections.txt ; \ rm -rf tmpl/*.sgml ; \ rm -rf $(INSPECT_DIR); \ fi @rm -rf *.o MAINTAINERCLEANFILES = $(MAINTAINER_DOC_STAMPS) # thomas: make docs parallel installable; devhelp requires majorminor too install-data-local: (installfiles=`echo $(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css`; \ if test "$$installfiles" = '$(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css'; \ then echo '-- Nothing to install' ; \ else \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ pngfiles=`echo ./html/*.png`; \ if test "$$pngfiles" != './html/*.png'; then \ for i in $$pngfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ fi; \ echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \ if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \ $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \ $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_API_VERSION@.devhelp2; \ fi; \ (which gtkdoc-rebase >/dev/null && \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \ fi) uninstall-local: if test -d $(DESTDIR)$(TARGET_DIR); then \ rm -rf $(DESTDIR)$(TARGET_DIR)/*; \ rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \ else \ echo '-- Nothing to uninstall' ; \ fi; # # Checks # if ENABLE_GTK_DOC check-hierarchy: $(DOC_MODULE).hierarchy @if grep ' ' $(DOC_MODULE).hierarchy; then \ echo "$(DOC_MODULE).hierarchy contains tabs, please fix"; \ /bin/false; \ fi check: check-hierarchy endif # wildcard is apparently not portable to other makes, hence the use of find inspect_files = $(shell find $(srcdir)/$(INSPECT_DIR) -name '*.xml') check-inspected-versions: @echo Checking plugin versions of inspected plugin data ...; \ fail=0 ; \ for each in $(inspect_files) ; do \ if (grep -H '' $$each | grep -v '$(VERSION)'); then \ echo $$each should be fixed to say version $(VERSION) or be removed ; \ echo "sed -i -e 's//$(VERSION)<\/version>/'" $$each; \ echo ; \ fail=1; \ fi ; \ done ; \ exit $$fail check-outdated-docs: $(AM_V_GEN)echo Checking for outdated plugin inspect data ...; \ fail=0 ; \ if [ -d $(top_srcdir)/.git/ ]; then \ files=`find $(srcdir)/inspect/ -name '*xml'`; \ for f in $$files; do \ ver=`grep '$(PACKAGE_VERSION)' $$f`; \ if test "x$$ver" = "x"; then \ plugin=`echo $$f | sed -e 's/^.*plugin-//' -e 's/.xml//'`; \ # echo "Checking $$plugin $$f"; \ pushd "$(top_srcdir)" >/dev/null; \ pinit=`git grep -A3 GST_PLUGIN_DEFINE -- ext/ gst/ sys/ | grep "\"$$plugin\""`; \ popd >/dev/null; \ # echo "[$$pinit]"; \ if test "x$$pinit" = "x"; then \ printf " **** outdated docs for plugin %-15s: %s\n" $$plugin $$f; \ fail=1; \ fi; \ fi; \ done; \ fi ; \ exit $$fail # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif # FIXME: decide whether we want to dist generated html or not # also this only works, if the project has been build before # we could dist html only if its there, but that might lead to missing html in # tarballs dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/html cp html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs check-outdated-docs inspect # avoid spurious build errors when distchecking with -jN .NOTPARALLEL: farstream-0.2.7/common/gst-indent0000775000076400007640000000222711710041611013724 00000000000000#!/bin/sh # # Check that the code follows a consistant code style # # Check for existence of indent, and error out if not present. # On some *bsd systems the binary seems to be called gnunindent, # so check for that first. version=`gnuindent --version 2>/dev/null` if test "x$version" = "x"; then version=`indent --version 2>/dev/null` if test "x$version" = "x"; then echo "GStreamer git pre-commit hook:" echo "Did not find GNU indent, please install it before continuing." exit 1 fi INDENT=indent else INDENT=gnuindent fi case `$INDENT --version` in GNU*) ;; default) echo "GStreamer git pre-commit hook:" echo "Did not find GNU indent, please install it before continuing." echo "(Found $INDENT, but it doesn't seem to be GNU indent)" exit 1 ;; esac INDENT_PARAMETERS="--braces-on-if-line \ --case-brace-indentation0 \ --case-indentation2 \ --braces-after-struct-decl-line \ --line-length80 \ --no-tabs \ --cuddle-else \ --dont-line-up-parentheses \ --continuation-indentation4 \ --honour-newlines \ --tab-size8 \ --indent-level2 \ --leave-preprocessor-space" $INDENT ${INDENT_PARAMETERS} $@ farstream-0.2.7/common/po.mak0000664000076400007640000000023011710041611013022 00000000000000# rule to download the latest .po files download-po: $(top_srcdir)/common/download-translations $(top_srcdir)/common/download-translations $(PACKAGE) farstream-0.2.7/common/gtk-doc.mak0000664000076400007640000001657512406633262013773 00000000000000########################################################################### # Everything below here is generic and you shouldn't need to change it. ########################################################################### # thomas: except of course that we did # thomas: copied from glib-2 # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) # thomas: make docs parallel installable TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_API_VERSION@ EXTRA_DIST = \ $(content_files) \ $(extra_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE).types \ $(DOC_OVERRIDES) \ $(DOC_MODULE)-sections.txt DOC_STAMPS = \ setup-build.stamp \ scan-build.stamp \ sgml-build.stamp \ html-build.stamp \ sgml.stamp \ html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals \ .libs/$(DOC_MODULE)-scan.o REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) doc-registry.xml if ENABLE_GTK_DOC all-local: html-build.stamp #### setup #### setup-build.stamp: $(content_files) -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ echo ' DOC Preparing build'; \ files=`echo $(DOC_MAIN_SGML_FILE) $(DOC_OVERRIDES) $(DOC_MODULE)-sections.txt $(DOC_MODULE).types $(content_files)`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ test -f $(abs_srcdir)/$$file && \ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ done; \ fi; \ fi @touch setup-build.stamp #### scan #### # in the case of non-srcdir builds, the built gst directory gets added # to gtk-doc scanning; but only then, to avoid duplicates scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo ' DOC Scanning header files' @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan \ $(SCAN_OPTIONS) $(EXTRA_HFILES) \ --module=$(DOC_MODULE) \ $${_source_dir} \ --ignore-headers="$(IGNORE_HFILES)" @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; then \ echo " DOC Introspecting gobjects"; \ GST_PLUGIN_SYSTEM_PATH=`cd $(top_builddir) && pwd` \ GST_PLUGIN_PATH= \ GST_REGISTRY=doc-registry.xml \ $(GTKDOC_EXTRA_ENVIRONMENT) \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj --type-init-func="gst_init(NULL,NULL)" \ --module=$(DOC_MODULE) ; \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### xml #### sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files) @echo ' DOC Building XML' @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) @cp ../version.entities xml @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building HTML' @rm -rf html @mkdir html @cp -pr xml html @cp ../version.entities ./ @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ @gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(abs_srcdir)"; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @mv html/index.sgml html/index.sgml.bak @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_API_VERSION@\//g" html/index.sgml.bak >html/index.sgml @rm -f html/index.sgml.bak @rm -rf html/xml @rm -f version.entities @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html ) @echo ' DOC Fixing cross-references' @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp clean-local-gtkdoc: @rm -rf xml tmpl html # clean files copied for nonsrcdir templates build @if test x"$(srcdir)" != x. ; then \ rm -rf $(DOC_MODULE).types; \ fi else all-local: clean-local-gtkdoc: endif clean-local: clean-local-gtkdoc @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -f $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @rm -rf tmpl/*.sgml.bak @rm -f $(DOC_MODULE).hierarchy @rm -f *.stamp || true @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(DOC_MAIN_SGML_FILE) ; \ rm -f $(DOC_OVERRIDES) ; \ rm -f $(DOC_MODULE).types ; \ rm -f $(DOC_MODULE).interfaces ; \ rm -f $(DOC_MODULE).prerequisites ; \ rm -f $(DOC_MODULE)-sections.txt ; \ rm -f $(content_files) ; \ rm -rf tmpl/*.sgml ; \ fi @rm -rf *.o maintainer-clean-local: clean @cd $(srcdir) && rm -rf html \ xml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt # thomas: make docs parallel installable; devhelp requires majorminor too install-data-local: (installfiles=`echo $(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css`; \ if test "$$installfiles" = '$(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css'; \ then echo '-- Nothing to install' ; \ else \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \ if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \ $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \ $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_API_VERSION@.devhelp2; \ fi; \ (which gtkdoc-rebase >/dev/null && \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \ fi) uninstall-local: if test -d $(DESTDIR)$(TARGET_DIR); then \ rm -rf $(DESTDIR)$(TARGET_DIR)/*; \ rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \ else \ echo '-- Nothing to uninstall' ; \ fi; # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/html cp html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs # avoid spurious build errors when distchecking with -jN .NOTPARALLEL: farstream-0.2.7/common/parallel-subdirs.mak0000664000076400007640000000066311710041611015663 00000000000000# include this at the end of $MODULE/ext/Makefile.am to force make to # build subdirectories in parallel when make -jN is used. We will end up # descending into all subdirectories a second time, but only after the first # (parallel) run has finished, so it should go right through the second time. .PHONY: independent-subdirs $(SUBDIRS) independent-subdirs: $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ all-recursive: independent-subdirs farstream-0.2.7/common/Makefile.in0000664000076400007640000005437412462321046014011 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = common DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = m4 EXTRA_DIST = \ ChangeLog \ gettext.patch \ glib-gen.mak gtk-doc.mak upload-doc.mak \ cruft.mak release.mak win32.mak po.mak \ parallel-subdirs.mak \ gst-autogen.sh \ check-exports \ c-to-xml.py mangle-tmpl.py scangobj-merge.py \ gtk-doc-plugins.mak \ plugins.xsl gstdoc-scangobj \ gst.supp check.mak \ coverage/lcov.mak \ coverage/coverage-report.pl \ coverage/coverage-report.xsl \ coverage/coverage-report-entry.pl \ download-translations \ extract-release-date-from-doap-file \ gst-indent \ orc.mak all: all-recursive .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 common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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 # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ 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 installdirs: installdirs-recursive installdirs-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-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 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-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: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am 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-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-am uninstall uninstall-am # 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: farstream-0.2.7/common/Makefile.am0000664000076400007640000000102711710041611013753 00000000000000SUBDIRS = m4 EXTRA_DIST = \ ChangeLog \ gettext.patch \ glib-gen.mak gtk-doc.mak upload-doc.mak \ cruft.mak release.mak win32.mak po.mak \ parallel-subdirs.mak \ gst-autogen.sh \ check-exports \ c-to-xml.py mangle-tmpl.py scangobj-merge.py \ gtk-doc-plugins.mak \ plugins.xsl gstdoc-scangobj \ gst.supp check.mak \ coverage/lcov.mak \ coverage/coverage-report.pl \ coverage/coverage-report.xsl \ coverage/coverage-report-entry.pl \ download-translations \ extract-release-date-from-doap-file \ gst-indent \ orc.mak farstream-0.2.7/common/ChangeLog0000664000076400007640000014331311710041611013476 000000000000002008-12-17 Edward Hervey * gst.supp: And yet another variation of the GstAudioFilter leak. 2008-12-15 Sebastian Dröge Patch by: Roland Illig * m4/gst-parser.m4: Fix AG_GST_BISON_CHECK to handle version numbers with more than two components (i.e. 2.4.1). Fixes bug #564507. 2008-12-14 Edward Hervey * gst.supp: And yet another variant of the GstAudioFilter leak. 2008-12-13 Edward Hervey * gst.supp: Added variants of leaks of dynamic pad templates created in GstAudioFilter. Add conditional jump triggered by getaddrinfo (maybe glibc-2.9). 2008-12-12 Edward Hervey * gst.supp: Fix leak in GIO called by gnomevfs. Nothing we can do about this. 2008-12-12 Edward Hervey * gst.supp: Added another suppression for dynamic pad templates, in this case GstAudioFilter. Added suppression for PangoLanguage which can never be freed according to the Pango API. 2008-12-12 Edward Hervey * gst.supp: A whole bunch of suppressions detected on latest gentoo ~amd64. Make some existing suppressions more generic (for subtle dependecy code changes). Added suppressions for glibc-2.9. Added suppressions for new variants of ALSA leaks. Added suppressions for a series of leaks in plugins registrations due to some pad templates' caps calculated at runtime. Added suppressions for variants of some leaks in pango/fontconfig. Added suppressions for leak in gstffmpegcsp.c (nothing we can do about it, but will only exist once). 2008-12-04 Sebastian Dröge * m4/gst-plugin-docs.m4: Remove the check if $have_gtk_doc equals yes as it's not defined and $enable_gtk_doc should be good enough. Also this restores the build of the plugin documentation. 2008-12-01 Mark Nauwelaerts * gst.supp: Add suppression variant for Ubuntu Hardy x86/64bit. 2008-12-01 Stefan Kost * gtk-doc-plugins.mak: * gtk-doc.mak: Simplily uninstall rule. Its closer to upstream and fixes #150331. 2008-11-29 Sebastian Dröge * m4/glib-gettext.m4: Update glib-gettext.m4 from latest stable GLib release. 2008-11-29 Sebastian Dröge Patch by: Cygwin Ports maintainer * gettext.patch: Update the gettext patch for use with gettext 0.17 which is required to build with libtool 2.2 because of conflicts. First part of bug #556091. 2008-11-29 Sebastian Dröge * m4/gtk-doc.m4: * m4/pkg.m4: Update gtk-doc and pkg-config m4 macros from their latest releases. 2008-11-20 Michael Smith * m4/as-objc.m4: Fix objective C test macro when none of the compilers are found at all. 2008-10-30 Stefan Kost * gtk-doc.mak: Also cp the entities here to all xinlcude based docs (workaround for not being able to set up a search path). 2008-10-17 Jan Schmidt * gtk-doc.mak: Don't clobber the real registry cache file when building docs. 2008-10-07 Jan Schmidt - Sun Microsystems * m4/gst-error.m4: Also disable the bogus "loop not entered at top" warnings appearing on Sparc Forte builds. 2008-10-06 Stefan Kost * gtk-doc.mak: Apply the same fix as below to gtk-doc.mak. Somehow did not end up in CVS. 2008-09-05 David Schleef * gtk-doc-plugins.mak: Fix the check for gtkdoc-rebase: don't pass the 'which' error back to make. This fix is more specific than what is in upstream. 2008-09-05 David Schleef * gtk-doc.mak: Fix the check for gtkdoc-rebase: don't pass the 'which' error back to make. This fix is more specific than what is in upstream. 2008-09-04 Stefan Kost * gtk-doc-plugins.mak: * gtk-doc.mak: Get closer to upstream makefiles. Don't install index.sgml twice. Call gtkdoc-rebase (if exists). 2008-08-21 Stefan Kost * gtk-doc-plugins.mak: Revert $(top_builddir) -> $(builddir) change of rev. 1.39 as there is no variable called builddir. 2008-07-31 Mark Nauwelaerts * gst.supp: Add suppressions for Ubunty Hardy x86/64bit, similar to earlier versions and 32bit variant. 2008-07-31 Sebastian Dröge * m4/gst-feature.m4: Remove GST_DISABLE_(ENUMTYPES|INDEX|URI). 2008-07-21 Tim-Philipp Müller * m4/gst-error.m4:: When checking for GST_ERROR_CXXFLAGS, check each compiler flag individually, not all together. 2008-07-20 Tim-Philipp Müller * m4/gst-parser.m4:: Fix bison version number detection for older --version output format (as bison 1.28 on OSX 10.4 outputs). Fixes #543853. 2008-07-12 Stefan Kost * plugins.xsl: Split refsect2 also here to make "Element Pads" subtitle visible. 2008-07-08 Sebastian Dröge * m4/gst-error.m4: Add compiler flags to warn if declarations after statements or variable length arrays are used. These are C99/GCC extensions and are not supported by some compilers we want to support. 2008-07-02 Mark Nauwelaerts * gtk-doc-plugins.mak: Only clean doc maintainer stamps in maintainer-clean. Fixes #539977. 2008-06-20 Sebastian Dröge * gstdoc-scangobj: Always use format strings for printf-like functions, even if they just print a string. Fixes bug #536981. 2008-06-20 Sebastian Dröge * gtk-doc-plugins.mak: * gtk-doc.mak: Include CFLAGS and LDFLAGS in GTKDOC_CFLAGS and GTKDOC_LDFLAGS, otherwise the values passed to configure are ignored. Fixes bug #536978. 2008-06-05 Tim-Philipp Müller * m4/gst-error.m4: Add -fno-strict-aliasing when compiling with -Werror, to work around warnings caused by G_LOCK with recent GLib versions (2.16.x) (#316221). 2008-06-05 Jan Schmidt * gtk-doc.mak: Don't copy html/*.png files unless they don't already exist in the destdir. Fixes distcheck failure caused by permissions problems trying to copy a file into the destdir when it already exists. 2008-05-28 Stefan Kost * plugins.xsl: The class was not shown in plugin docs. Fix typo in changelog below. 2008-05-22 Jan Schmidt * gstdoc-scangobj: Emit warnings if one of the GTypes we're expecting is 0 when scanning. 2008-05-21 Felipe Contreras * gtk-doc-plugins.mak: * gtk-doc.mak: Fix installing png images when gtk-doc is disabled. 2008-05-21 Felipe Contreras * gtk-doc-plugins.mak: * gtk-doc.mak: Fix make clean when gtk-doc is disabled and other cleanups. 2008-05-17 Jan Schmidt * gtk-doc-plugins.mak: Be more quiet when the files don't yet exist. 2008-05-16 Jan Schmidt * gstdoc-scangobj: Add a mechanism for adding 'implicitly created' GTypes into the scan, allowing for documenting plugin-private base classes that provide signals or properties for public elements. * gtk-doc-plugins.mak: Use $(builddir) instead of $(top_builddir) in a few places - there's no need to hard code 'docs/plugins' as the only useable path. 2008-05-14 Peter Kjellerstedt * m4/gst-feature.m4: Report plug-ins without external dependencies that will not be built even when the name of the plug-in is a substring of another plug-in, e.g., goom vs. goom2k1. 2008-05-14 Tim-Philipp Müller * gst.supp: Add suppression for glibc bug on gutsy/x86-64 2008-05-12 Stefan Kost * plugins.xsl: Improve the layout of the caps, but splitting them on ";". 2008-05-09 Sebastian Dröge Patch by: Brian Cameron * m4/gst-default.m4: Don't set the default audio sink to the default visualizer. Fixes bug #532295. 2008-05-07 Tim-Philipp Müller * check.mak: (help): Document GST_CHECKS environment variable in checks 'make help'. 2008-05-06 Sebastian Dröge Patch by: Marc-Andre Lureau * scangobj-merge.py: Don't depend on Twisted just for the OrderedDict but implement our own ordered dictionary class. Fixes bug #531577. 2008-04-23 Edward Hervey * gst.supp: Re-arrange latest suppressions. Add all known suppressions for ubuntu hardy. Same as for older ubuntus, but with different codepaths. 2008-04-22 Edward Hervey * gst.supp: Make tls leak suppression a bit more generic. 2008-04-22 Edward Hervey * gst.supp: Fix ommission in latest commit. Make tls leak suppression more generic in order to cover more distributions (and hopefully also future distributions). 2008-04-22 Edward Hervey * gst.supp: Add suppressions for Hardy. They're just the newer versions of similar suppressions we had for the previous versions of ubuntu. 2008-04-15 Sebastian Dröge * Makefile.am: * m4/Makefile.am: Dist all files in common. Fixes bug #527984. 2008-04-14 Tim-Philipp Müller * m4/gst-function.m4: Rename AC_CACHE_VAL cache-ids to contain '_cv_' in order to make autoconf-2.62 complain less. 2008-04-13 Tim-Philipp Müller * m4/gst-args.m4: * m4/gst-valgrind.m4: Bump valgrind requirement to 3.0 (which was released in August 2005). Fixes #489269. Also, check for version >=REQ and not >REQ. 2008-04-09 Tim-Philipp Müller * m4/gst-default.m4: Add --with-default-{audiosink|audiosrc|videosink|videosrc|visualizer} configure switches (#519417). 2008-04-03 Tim-Philipp Müller * m4/gst-args.m4: Add --disable-foo switch for dependency-less plugins (#525586). 2008-04-01 Sebastian Dröge * m4/gst-parser.m4: Unconditionally require flex 2.5.31 and bison 1.875. 2008-03-23 Sebastian Dröge * m4/gst-arch.m4: amd64/x86_64 allows unaligned memory access too. 2008-03-21 Sebastian Dröge * m4/gst-dowhile.m4: Add macro that checks if the compiler supports do {} while (0) macros and define HAVE_DOWHILE_MACROS if it does. This is needed by glib/gmacros.h to use something else than if (1) else for G_STMT_START/END when compling C++, which causes compiler warnings because of ambigious else with g++ 4.3. 2008-03-21 Sebastian Dröge * m4/gst-plugin-docs.m4: * mangle-tmpl.py: Don't depend on PyXML and use only XML modules that are shipped with python. Fixes bug #519635. 2008-03-07 Edward Hervey * m4/gtk-doc.m4: (GTK_DOC_CHECK): The previous commit to this file by Stefan Kost mentionned checking for SED, but NOT checking for gtkdoc-check (wth is that doing there ??). Therefore, removing the check for gtkdoc-check 2008-03-03 David Schleef * m4/ax_create_stdint_h.m4: Oops, checked in the wrong copy of this file. (Update from upstream) 2008-03-03 David Schleef * m4/ax_create_stdint_h.m4: Update from upstream. Fixes a bug compiling with MSVC. 2008-03-03 Edward Hervey * m4/pkg.m4: Allow override of pkg-config results, as proposed by configure --help. This is in fact just a backport from upstream pkg.m4. Fixes #518892 2008-03-03 Peter Kjellerstedt * ChangeLog: Changelog surgery of my previous commit to add bugzilla reference. * m4/gst-args.m4: Add AG_GST_CHECK_PLUGIN and AG_GST_DISABLE_PLUGIN to make it easier to include and exclude plug-ins without external references, i.e., plug-ins listed in GST_PLUGINS_SELECTED. (#498222) 2008-03-03 Sebastian Dröge * gst.supp: Add another glibc suppression. 2008-02-29 Peter Kjellerstedt * m4/gst-feature.m4: Make the comment before defines generated via AG_GST_CHECK_FEATURE look nicer. (#498222) 2008-02-26 Jan Schmidt * m4/Makefile.am: * m4/as-gcc-inline-assembly.m4: Add Dave Schleef's GCC inline assembly detection macro for using in gst-plugins-good in the goom 2k4 plugin. 2008-02-25 Andy Wingo * gst-autogen.sh: Instead of only passing certain arguments to configure, pass anything that we didn't handle. Much friendlier. Fixes #34412. 2008-02-23 Jan Schmidt * m4/gst-error.m4: Store the detected compiler flags into ERROR_CFLAGS rather than ERROR_CXXFLAGS, and use the macro that checks the C compiler, not the C++ one. 2008-02-23 Tim-Philipp Müller * m4/gst-error.m4: Reflow checks for additional warning flags so they're not nested, which fixes the result reporting in the configure output. 2008-02-22 Tim-Philipp Müller * m4/as-compiler-flag.m4: Add AS_CXX_COMPILER_FLAG * m4/gst-error.m4: Add AG_GST_SET_ERROR_CXXFLAGS (Forte bits need testing) 2008-02-22 Tim-Philipp Müller * gtk-doc-plugins.mak: Add 'check-inspected-versions' target; this helps identify files that should have been removed or where the version number should (ideally) be updated before a release (which doesn't happen automatically if the releaser doesn't build that plugin locally). Not adding at a distcheck hook yet though, because it's not really that important and would probably also be a problem on buildbots. 2008-02-22 Sebastian Dröge * gst.supp: Add even more glibc 2.7 suppressions. 2008-02-22 Sebastian Dröge * gst.supp: Add another suppression for GLib caching some values after the first call. 2008-02-12 Sebastian Dröge Patch by: Tim Mooney * m4/gst-error.m4: Use no%E_MACRO_REDEFINED on Solaris to prevent compiler warnings. Fixes bug #515905. 2008-02-11 Sebastian Dröge * gst.supp: Add a few more glibc 2.7 suppressions to make the avisubtitle unit test valgrind clean. Fixes bug #515703. 2008-02-08 Stefan Kost * ChangeLog: Changelog surgery for last commit. 2008-02-08 Stefan Kost * m4/gtk-doc.m4: Conditionally check for SED. Also sync a bit with upstream macro. 2008-02-08 Stefan Kost * gtk-doc-plugins.mak: * gtk-doc.mak: Use '$(SED)' instead of 'sed'. Don't use -i for in-place as its gnu only, move to a temp file instead. 2008-02-06 Stefan Kost * gtk-doc-plugins.mak: * gtk-doc.mak: As our docs are versioned, we need to patch the index.sgml file to have correct paths there, unless we also want to fork gtk-doc's xsl (which we don't). This hopefully fixes xrefs between modules. 2008-02-02 Sebastian Dröge * m4/gst-feature.m4: Use printf instead of echo as "echo -e" isn't POSIX and doesn't work with strict POSIX shells like tcsh or dash and also not every platform has a /bin/echo that supports it. 2008-01-24 Stefan Kost * ChangeLog: ChangeLog surgery. * gstdoc-scangobj: Sync the object scanner with gtk-doc fixes. Update args and hierarchy files. 2008-01-20 Sebastian Dröge * check.mak: * coverage/lcov.mak: * gtk-doc-plugins.mak: * release.mak: Use $(MAKE) instead of make to fix the build if GNU make is called something else on the system. * m4/as-docbook.m4: Fix path for docbook.xsl if we have no /etc/xml/catalog and add a docbook-xsl search path for FreeBSD. 2008-01-18 Sebastian Dröge * gst.supp: Add a suppression for a glibc bug: http://valgrind.org/docs/manual/faq.html#faq.exit_errors> 2008-01-18 Sebastian Dröge * gst.supp: Add some more glibc 2.7 suppressions and make the GLib suppressions for the home/tmp/etc directory caching a bit more generic. 2008-01-18 Sebastian Dröge * gst.supp: Add some glibc 2.7 supressions as found on Debian/unstable. 2008-01-14 Jan Schmidt * download-translations: Apparently I have problems with leaving things commented out when I edit shell scripts. 2008-01-12 Jan Schmidt * download-translations: Remove bash-isms 2008-01-12 Jan Schmidt * check-exports: Restore the cleanup rm of our tmp file which I didn't mean to leave commented out. 2008-01-12 Jan Schmidt * check-exports: Fixes to make check-export work on both Solaris and Linux * m4/gst-error.m4: Disable extra warning category (argument mismatch) as an error on Forte, as it prevents the libcheck fail_if macros from compiling. * win32.mak: Substitute the GStreamer version so things will keep working in 0.11 2008-01-11 Tim-Philipp Müller Patch by: Peter Kjellerstedt * m4/gst-glib2.m4: * m4/gst-libxml2.m4: Improve/fix output from configure if either glib-2.0 or libxml2 are not installed (#498222). 2008-01-09 Stefan Kost * coverage/lcov.mak: Update coverage make-rules: use them conditionaly, use libtool mode and use lcov to cleanup. 2007-12-18 Sebastian Dröge * glib-gen.mak: Also use #include "header" instead of #include
for the headers that were used to generate the source files for the same reason as below. Remove whitespace before #include. 2007-12-18 Sebastian Dröge * glib-gen.mak: Use #include "header" instead of #include
for the generated enum C files as the file will always be in the same directory and some compilers seem to be a bit strict about that unless . is added to the include path. Include all headers that were used to generate the source files in the C file as they're used there. 2007-12-17 Tim-Philipp Müller * win32.mak: (win32), (win32defs), (win32crlf): Make check for CR LF in Visual C++ 6.0 project files work, based on patch by David Schleef (#496722, #393626). 2007-12-17 Tim-Philipp Müller * Makefile.am: Don't forget to dist the new win32.mak. 2007-12-17 Tim-Philipp Müller * win32.mak: (win32), (win32defs): Move common win32 Makefile foo into this new file. 2007-12-15 Stefan Kost * gtk-doc-plugins.mak: * gtk-doc.mak: We should have never forked this that much :/. 2007-12-13 Tim-Philipp Müller * check-exports: Fix build on the ppc64 build bot. 2007-12-13 Tim-Philipp Müller * check-exports: Suppress more unintentional exports (too much hassle to rename them, since the win32 project files would need changing too). 2007-12-12 Tim-Philipp Müller * Makefile.am: check-exports should be disted. 2007-12-12 Tim-Philipp Müller * check-exports: Add quick'n'dirty script to check the exported symbols of a library against the symbols in the corresponding .def file (#493983). Based on script by Ole André Vadla Ravnås. 2007-11-06 Jan Schmidt * gtk-doc-plugins.mak: Fix distcheck by making sure the types files are treated like the other gtkdoc-scangobj generated files. 2007-09-21 Sebastian Dröge * m4/gst-args.m4: Let the AG_GST_ARG_ENABLE_EXPERIMENTAL macro default to disable building of experimental plugins. Nobody uses it yet and the --enable--experimental stuff from gst-plugins-good defaults to disable too. 2007-09-06 Tim-Philipp Müller * gtk-doc-plugins.mak: Just use the normal 'check' target and avoid a circular dependency. 2007-09-06 Tim-Philipp Müller * gtk-doc-plugins.mak: Add rule to error out if .hierarchy file contains tabs. 2007-08-20 Tim-Philipp Müller * download-translations: * po.mak: If there are new languages, they need to be added to po/LINGUAS. 2007-08-20 Tim-Philipp Müller * download-translations: * po.mak: Fix up 'download-po' a bit, so that we find new translations for languages that aren't in our po/LINGUAS file yet too. 2007-07-16 Jan Schmidt * gst.supp: Add a suppression for GLib caching the tmp dir seen on an Ubuntu Feisty system. 2007-07-13 Jan Schmidt * m4/gst-feature.m4: If we want to use 'echo -e', call /bin/echo instead of the shell's since -e is a bash extension, and our /bin/sh might not be being provided by bash. 2007-07-01 Thomas Vander Stichele * po.mak: Translation project has moved. Also, no idea how this used to work given that we weren't downloading a .po file. 2007-06-25 Stefan Kost * gst-xmlinspect.py: * plugins.xsl: Also extract element caps for plugin-docs. Fixes parts of #117692. 2007-06-21 Tim-Philipp Müller Patch by: Andreas Schwab * m4/gst-feature.m4: Fix quoting (#449493). 2007-06-10 Sebastian Dröge * m4/gst-parser.m4: Only generate the parser if bison >= 1.875 _and_ flex >= 2.5.31 is installed and use pre-generated sources otherwise. Fixes bug #444820. 2007-05-11 Michael Smith * gst.supp: Suppression variant for our good friend the TLS leak, this time for Ubuntu Feisty/x86. 2007-05-09 Tim-Philipp Müller * gtk-doc-plugins.mak: Fix make distcheck again; change some spaces to tabs in makefile. 2007-04-29 Thomas Vander Stichele * gtk-doc-plugins.mak (-module): Error out when the html build step gives warnings, so they get fixed properly. 2007-04-23 Stefan Kost * m4/gst-feature.m4: Add macro AG_GST_PARSE_SUBSYSTEM_DISABLES that checks the defines in the configuration header and AC_DEFINES the setings. 2007-04-19 Sebastian Dröge Patch by: Vincent Torri * m4/gst-parser.m4: Put the AC_MSG_RESULT output in brackets to get it properly written to the terminal. 2007-04-18 Sebastian Dröge * m4/gst-parser.m4: Check for flex >= 2.5.31 and set GENERATE_PARSER if we have at least that version. Otherwise use pre-generated parser sources as we can't raise the required flex version. HAVE_MT_SAVE_FLEX is obsolete now as we use a new enough flex version anyway. First part of #349180 2007-04-10 Thomas Vander Stichele * m4/gst-check.m4: Allow pre-setting the GST(PB)_TOOLS/PLUGINS_DIR variables to help builds against older GStreamer. 2007-03-25 Sebastian Dröge * m4/gst-parser.m4: Fix the flex version check. It ignored the micro version before. 2007-03-09 Jan Schmidt * check.mak: Use the same timeout when generating valgrind suppressions as running the valgrind test. * gst.supp: Add some more suppressions and stuff. 2007-03-08 Jan Schmidt * check.mak: Make sure GSlice is disabled when building suppressions too. * gst.supp: Add around *850* lines of suppressions for one-time initialisations inside libasound and gconf/bonobo/ORBit. I feel so dirty. 2007-03-07 Jan Schmidt * gst.supp: add a suppression for this GConf flup on the FC5 buildbot. 2007-03-06 Jan Schmidt * gst.supp: Make the suppression a little more generic, to catch the FC5 backtrace too. 2007-03-06 Jan Schmidt * gst.supp: Add a suppression for libcdio 0.76. It leaks an internal struct when the CD-ROM device is not accessible. 2007-02-28 Thomas Vander Stichele * m4/gst-arch.m4: Move a line that was in the wrong macro 2007-02-28 Thomas Vander Stichele * m4/gst.m4: Add * m4/gst-arch.m4: * m4/gst-args.m4: * m4/gst-check.m4: * m4/gst-debuginfo.m4: * m4/gst-default.m4: * m4/gst-doc.m4: * m4/gst-error.m4: * m4/gst-feature.m4: * m4/gst-function.m4: * m4/gst-gettext.m4: * m4/gst-glib2.m4: * m4/gst-libxml2.m4: * m4/gst-parser.m4: * m4/gst-plugin-docs.m4: * m4/gst-plugindir.m4: * m4/gst-valgrind.m4: * m4/gst-x11.m4: Convert all macros to use AG_GST style so we can properly warn when they're missing if configure.ac calls AG_GST_INIT Will require update in all GStreamer modules. 2007-02-11 Stefan Kost * m4/gst-args.m4: Remove 'enable' from configure switch description as this leads to confusing lines like "disable enable builing ...". * m4/gst-feature.m4: Fix comment to sound less horrible. 2007-02-07 Tim-Philipp Müller Patch by: Will Newton * m4/gst-check.m4: Use $PKG_CONFIG rather than pkg-config directly, the one in our path might not be the one we want, like when cross-compiling. Also, other macros such as PKG_CHECK_MODULES use $PKG_CONFIG, so we should probably too just for consistency. Fixes #405288. 2007-01-08 Tim-Philipp Müller * m4/gst-parser.m4: Need to use double square brackets again so m4 doesn't remove them (fixes #378931). * m4/gst-args.m4: Use double square brackets here as well, for the same reason. 2007-01-05 Tim-Philipp Müller * m4/gst-parser.m4: Use 'sed' rather than 'tr' to strip trailing letters from version numbers, since 'tr' might not be available and we know sed is (#378931). 2006-10-21 Tim-Philipp Müller * check.mak: Increase default timeout under valgrind, 60 is just too short and some tests take a bit longer these days and not everyone has a beefy machine. 2006-09-29 Michael Smith * gst.supp: More suppressions for edgy. 2006-09-28 Jan Schmidt * m4/gst-glib2.m4: Use gmodule-no-export-2.0.pc instead of gmodule-2.0.pc - we neither want nor need --export-dynamic (which ends up making us export a bunch of unneeded symbols) 2006-09-14 Tim-Philipp Müller * gst.supp: Some suppressions for the more recent ld.so in ubuntu edgy. 2006-08-23 Tim-Philipp Müller * gst.supp: Shorten function trail so the suppression works on my ubuntu dapper system with core cvs as well. 2006-07-28 Jan Schmidt * gst.supp: Extra suppressions from my Ubuntu x86_64 machine 2006-07-24 Tim-Philipp Müller Patch by: Frederic Peters * m4/gst-parser.m4: Need to double square brackets in .m4 files. Should fix bison version detection with version numbers like 1.23a (#348354). 2006-07-24 Jan Schmidt * check.mak: Valgrind fails to find tests written in tests/check/ directly (rather than a subdir) - because valgrind gets run with a filename that doesn't contain a relative path, it goes searching /usr/bin instead. Run with ./.... to make things work either way. * gtk-doc-plugins.mak: Add $(top_builddir)/src as a place to look for plugins when building too, since that's where gst-template keeps things 2006-07-23 Stefan Kost Patch by: Frederic Peters * m4/gst-parser.m4: Fix bison detection (#348354) 2006-07-21 Stefan Kost * m4/gst-parser.m4: check for bison and flex 2006-07-13 Thomas Vander Stichele * m4/gst-plugin-docs.m4: remove the configure argument for enabling plugin doc build; having gtk-doc enabled and pyxml present is enough of a trigger 2006-07-03 Thomas Vander Stichele * coverage/lcov.mak: fix up rules to work with gst-python as well run "make lcov" to test and generate the reports run "make lcov-reset" to redo it after that 2006-07-02 Thomas Vander Stichele * Makefile.am: * check.mak: add an inspect target that inspects every element feature, so we can have that added for coverage * coverage/lcov.mak: add support for lcov 2006-07-02 Thomas Vander Stichele * m4/gst-args.m4: when building with gcov, reset CFLAGS and friends to O0 2006-07-02 Thomas Vander Stichele * m4/gst-args.m4: Find the gcov that matches the gcc version Only allow gcov if we use gcc 2006-07-02 Thomas Vander Stichele * Makefile.am: * coverage/coverage-report-entry.pl: * coverage/coverage-report.pl: * coverage/coverage-report.xsl: copy coverage reporting files from dbus 2006-07-01 Thomas Vander Stichele * m4/gst-args.m4: libtool strips gcov's -f flags, so libgcov does not get linked in. Setting GCOV_LIBS with -lgcov fixes libtool's stripping also show what pkg-config-path we set 2006-06-22 Tim-Philipp Müller Patch by: Peter Kjellerstedt * m4/gst-feature.m4: Show list of plugins without external dependencies that will not be built as well (#344136). 2006-06-15 Tim-Philipp Müller * m4/gst-plugin-docs.m4: add GST_PLUGIN_DOCS, which checks for everything needed to build the plugin docs (namely gtk-doc and pyxml); also adds a new --enable-plugin-docs configure switch; will set ENABLE_PLUGIN_DOCS conditional for use in Makefile.am files (see #344039). 2006-06-11 Thomas Vander Stichele * m4/gst-check.m4: add GST_PKG_CHECK_MODULES, which in the normal case of checking for a dependency lib for a plug-in only needs two arguments to do the right thing. * m4/gst-feature.m4: clean up output a little of feature checking; also deal with non-plug-in feature checks * m4/Makefile.am: * m4/gst-gstreamer.m4: remove this file; it's a useless check 2006-06-06 Thomas Vander Stichele * m4/gst-arch.m4: add PPC64 so we can have separate structure sizes for it 2006-06-05 Edward Hervey * gtk-doc.mak: Check for the proper .devhelp2 file to remove. 2006-05-31 Thomas Vander Stichele * gtk-doc.mak: allow a magic variable to suppress errors from docbuilding 2006-05-30 Thomas Vander Stichele * gtk-doc.mak: error out if gtkdoc-mktmpl finds unused declarations 2006-05-28 Edward Hervey * gst.supp: Reverting previous commit. That's good to know, Edward, but why ? 2006-05-28 Edward Hervey * gst.supp: Added suppresion for memleak in g_option_context_parse on fc5-64 2006-05-19 Thomas Vander Stichele * m4/gst-check.m4: set GSTPB_PLUGINS_DIR just like GST_PLUGINS_DIR 2006-05-18 Tim-Philipp Müller * check.mak: Fix 'make help' in check directories, it should be 'valgrind.gen-suppressions' not 'valgrind-gen-suppressions' (not changing target to match help string on purpose to keep scripts etc. functional). 2006-05-18 Thomas Vander Stichele Patch by: Peter Kjellerstedt * m4/gst-arch.m4: add support for CRIS and CRISv32. 2006-05-17 Jan Schmidt * m4/gst-args.m4: Fix the macros for command-line supplied package and origin names so they don't end up being configure as "" (Fixes #341479) 2006-05-14 Jan Schmidt * gtk-doc.mak: Add uninstall rule to remove .devhelp2 files. 2006-05-09 Edward Hervey * gst.supp: Add suppression for GSlice version of g_type_init calloc leak 2006-04-05 Michael Smith * gst.supp: Delete a bogus suppression for the registry code. Generalise a suppression for a glib bug (see #337404) 2006-04-04 Michael Smith * gst.supp: Add a leak suppression: the existing glibc-doesn't-free-TLS one wasn't triggering here. 2006-04-04 Michael Smith * gst.supp: Add some minimally-neccesary suppressions for my x86/dapper system. 2006-04-01 Thomas Vander Stichele * plugins.xsl: Do not display an origin link if origin does not start with http See #323798 2006-04-01 Thomas Vander Stichele * m4/gst-args.m4: * m4/gst-feature.m4: add more macros * m4/gst-x11.m4: X11-related checks 2006-04-01 Thomas Vander Stichele * m4/as-version.m4: newer version * m4/gst-args.m4: * m4/gst-doc.m4: update and add other macros to be shared across projects 2006-03-24 Thomas Vander Stichele * gst.supp: add a suppression for g_parse_debug_string 2006-03-23 Stefan Kost * gstdoc-scangobj: sync fully with gtkdoc-0.15 2006-03-23 Stefan Kost * gstdoc-scangobj: * gtk-doc.mak: sync a little with gtk-doc mainline 2006-03-17 Wim Taymans * gst.supp: add another clone suppression change all glibc suppressions to match 2.3.* 2006-03-09 Thomas Vander Stichele * m4/check.m4: fix test so it actually works when the normal check is used over debian's/ubuntu's 2006-03-08 Jan Schmidt * check.mak: Set G_SLICE=always-malloc when valgrinding tests (closes #333272) 2006-02-21 Jan Schmidt * m4/gst-glib2.m4: Fix debug output when the GLib version prerequisite is not found 2006-02-13 Andy Wingo * m4/check.m4: Hack around Debian/Ubuntu's broken installation of the PIC version of check as libcheck_pic.a. Should work with cross-compilation too. Grr. 2006-02-06 Thomas Vander Stichele * m4/gst-default.m4: switch to auto* sinks for defaults 2006-02-02 Wim Taymans * check.mak: add a .valgrind.gen-suppressions target to aid in generating suppressions * gst.supp: add more repressions from my debian glibc as of today 2006-02-02 Thomas Vander Stichele * gtk-doc-plugins.mak: only add srcdir/gst if it exists 2006-01-30 Thomas Vander Stichele * release.mak: don't complain about disted enums in win32 2006-01-20 Thomas Vander Stichele * m4/gst-check.m4: AC_SUBST CFLAGS and LIBS do a non-command because something is stripping out our AC_SUBST 2006-01-20 Thomas Vander Stichele * m4/gst-args.m4: * m4/gst-valgrind.m4: properly give a "no" result manually when providing a not-found action to fix configure output 2006-01-20 Thomas Vander Stichele * m4/pkg.m4: update with a more recent version 2006-01-07 Thomas Vander Stichele * gettext.patch: make Makefile depend on LINGUAS, so rebuilds work when adding a language 2006-01-03 Michael Smith * check.mak: Clarify error message from valgrind test runs. 2005-12-16 Thomas Vander Stichele * m4/gst-arch.m4: define HOST_CPU 2005-11-29 Thomas Vander Stichele * check.mak: add a valgrind-forever target for tests 2005-11-28 Thomas Vander Stichele * check.mak: when a "make test.check" run fails, make it rerun the test with at least debug level 2 2005-11-14 Thomas Vander Stichele * m4/Makefile.am: * m4/gst-check.m4: fix check for base plugins * m4/gst-default.m4: add m4 to set default elements 2005-10-18 Thomas Vander Stichele * m4/gst-check.m4: check for tools correctly 2005-10-18 Thomas Vander Stichele * gtk-doc.mak: only enable breaking on new API when make distcheck passes, not before 2005-10-18 Thomas Vander Stichele * m4/gst-check.m4: Resurrect Julien's dead body and wipe his mind clean 2005-10-18 Thomas Vander Stichele * m4/gst-check.m4: Kill Julien 2005-10-17 Julien MOUTTE * m4/gst-check.m4: I know Thomas will kill me but this ifelse statement seems incorrect as it is always setting required to "yes". With this one it seems to work. Fixes build of gst-plugins-base on my setup where gstreamer-check is definitely not present/required. 2005-10-18 Stefan Kost * gtk-doc.mak: make build break on new api that has not been added to the sections file 2005-10-17 Thomas Vander Stichele * m4/gst-glib2.m4: * m4/Makefile.am: * m4/gst-check.m4: add macro for easy checks for GStreamer libs 2005-10-16 Thomas Vander Stichele * m4/gst-glib2.m4: update, warn in error cases 2005-10-16 Thomas Vander Stichele * m4/gst-error.m4: add GST_SET_DEFAULT_LEVEL 2005-10-16 Thomas Vander Stichele * m4/Makefile.am: * m4/gst-gettext.m4: remove the AM_GNU_GETTEXT* calls, they need to be in configure.ac * m4/gst-glib2.m4: clean up and re-use in core soon * m4/gst-plugindir.m4: macro to set up PLUGINDIR and plugindir define/var 2005-10-15 Thomas Vander Stichele * m4/Makefile.am: * m4/gst-gettext.m4: add macro for setting up gettext 2005-10-15 Thomas Vander Stichele * m4/gst-args.m4: add some .m4's for argument checking that can be shared among modules 2005-10-15 Thomas Vander Stichele * m4/as-libtool.m4: set _LT_LDFLAGS * m4/gst-libxml2.m4: document 2005-10-15 Thomas Vander Stichele * m4/gst-arch.m4: indent a little add AC_REQUIRE * m4/gst-error.m4: clean up 2005-10-12 Thomas Vander Stichele * gst-autogen.sh: update version detection expression to catch stuff like Libtool (libtool15) 1.5.0 2005-10-11 Thomas Vander Stichele * gst.supp: commit 6 new suppressions related to g_module_open; can these really not be folded into one ? 2005-10-11 Edward Hervey * gst.supp: made the suppression more generic Added pthread memleak suppresions Added nss_parse_* memleak suppresion (used by g_option_context_parse) 2005-10-11 Thomas Vander Stichele * check.mak: be more strict, more leak resolution * gst.supp: clean up the g_type_init suppressions 2005-10-07 Thomas Vander Stichele * m4/Makefile.am: * m4/gst-valgrind.m4: put the valgrind detection in an .m4 2005-09-29 Thomas Vander Stichele * check.mak: add some more targets, like "help", but also more intensive tests 2005-09-23 Thomas Vander Stichele * gtk-doc.mak: make certain doc warnings fatal so people maintain docs again 2005-09-23 Thomas Vander Stichele * Makefile.am: * gtk-doc-plugins.mak: * scangobj-merge.py: merge additions from the .signals.new and .args.new file in the original ones, only updating if necessary 2005-09-23 Thomas Vander Stichele * gst-xmlinspect.py: * gstdoc-scangobj: * gtk-doc-plugins.mak: fix properly for new API; make update in plugins dir now works 2005-09-20 Thomas Vander Stichele * gst-xmlinspect.py: * gstdoc-scangobj: some fixes for new API * gtk-doc-plugins.mak: set environment properly 2005-09-17 David Schleef * gtk-doc-plugins.mak: Use new environment variables. 2005-09-16 Michael Smith * gstdoc-scangobj: Make the scanobj code reflect registry/plugin API changes 2005-09-15 Thomas Vander Stichele * gtk-doc-plugins.mak: split out scanobj step (which will be run by doc maintainer) from scan step (which will be run on every build) clean up some of the commands for make distcheck 2005-09-15 Thomas Vander Stichele * gtk-doc-plugins.mak: * mangle-tmpl.py: first stab at reorganizing the plugins build so we can maintain element docs 2005-09-14 David Schleef * as-libtool.mak: Remove * m4/as-libtool.m4: The libtool bug that this worked around has been fixed. * m4/as-version.m4: Don't define GST_RELEASE, since it causes config.h to be regenerated needlessly, and we don't use it. 2005-09-14 Thomas Vander Stichele * gtk-doc-plugins.mak: error out on inspect failure 2005-09-14 Michael Smith * glib-gen.mak: Don't call glib-mkenums with arguments that confuse/break MinGW, fixes 316155. 2005-09-03 Thomas Vander Stichele * gtk-doc-plugins.mak: * gtk-doc.mak: * m4/gst-doc.m4: separate out gtk-doc and docbook stuff have two separate --enable configure flags 2005-08-26 Thomas Vander Stichele * check.mak: add a .gdb target; rebuild registry for each target, otherwise a code rebuild always triggers a reg rebuild, and it's just too annoying * gstdoc-scangobj: 2005-08-21 Thomas Vander Stichele * check.mak: separate out REGISTRY_ENVIRONMENT; we want to use that from our valgrind runs, but we also want TESTS_ENVIRONMENT to contain everything that the first test, gst-register, needs 2005-08-21 Thomas Vander Stichele * check.mak: parse output of valgrind and check for definitely lost, and error out; somehow I was led to believe valgrind returns non-zero for leaks, but I can't make it do that, so let's parse 2005-08-20 Thomas Vander Stichele * check.mak: for some weird reason valgrind does not report actual memleaks if GST_PLUGIN_PATH is set to anything but the core gstreamer dir while valgrind is running. Since the registry is going to go anyway, I don't want to waste any more time on this; I just run valgrind without GST_PLUGIN_PATH set. Since the registry loading doesn't check if GST_PLUGIN_PATH got changed as a reason to rebuild the registry, that's actually fine. 2005-08-15 Thomas Vander Stichele * mangle-tmpl.py: keep original Long_Description; only insert an include if it's not already the first line in there * plugins.xsl: output more information for plugins, including an origin hyperlink 2005-08-15 Thomas Vander Stichele * gst-xmlinspect.py: a first stab at inspecting plugins and outputting an xml description * gtk-doc-plugins.mak: a gtk-doc using snippet for plugins documentation * plugins.xsl: a stylesheet to convert gst-xmlinspect.py output to docbook output for inclusion in the gtk-doc stuff 2005-07-20 Ronald S. Bultje * m4/gst-doc.m4: s/pdf/eps/ in test for whether we output EPS images (#309379). 2005-07-18 Andy Wingo * m4/as-libtool-tags.m4: Ooh, backported from libtool 1.6. Much better. Thanks, Paolo Bonzini! * m4/Makefile.am (EXTRA_DIST): * m4/as-libtool-tags.m4: New file, tries to disable some CXX and fortran checks. 2005-07-08 Thomas Vander Stichele * m4/gst-error.m4: add macro to set ERROR_CFLAGS 2005-06-30 Jan Schmidt * gst-autogen.sh: Remove the old autoregen.sh if it exists before recreating it, to prevent confusing any shell process that might be reading it currently. 2005-06-29 Thomas Vander Stichele * m4/gtk-doc.m4: added 2005-06-03 Stefan Kost * gst-autogen.sh: create autoregen.sh *before* shifting the options 2005-05-17 Thomas Vander Stichele * gst-autogen.sh: only update autoregen.sh on actual runs 2005-03-11 Thomas Vander Stichele * m4/check.m4: m4 from the check unit test suite 2004-12-14 David Schleef * m4/gst-arch.m4: remove MMX stuff, since it doesn't work and isn't needed anywhere 2004-12-08 Thomas Vander Stichele * gst-autogen.sh: allow failure command to be run so we can clean upfrom autopoint 2004-09-03 Zeeshan Ali Khattak * m4/gst-feature.m4: Trying to correct the GST_CHECK_CONFIGPROG macro 2004-07-21 Benjamin Otte * m4/.cvsignore: exciting updates for libtool m4 files 2004-07-12 David Schleef * m4/as-objc.m4: Add a macro to test for objective C 2004-06-12 Thomas Vander Stichele * m4/gst-feature.m4: not all of them support --plugin-libs, so redirect stderr 2004-06-12 Thomas Vander Stichele * m4/as-scrub-include.m4: sync with upstream to 0.1.4. Fixes #132440 2004-06-07 Benjamin Otte * m4/gst-feature.m4: write a big marker into configure output when checking next plugin to allow easier parsing of why plugins are(n't) built. 2004-06-01 Thomas Vander Stichele * m4/as-compiler-flag.m4: * m4/as-compiler.m4: * m4/as-libtool.m4: * m4/as-version.m4: sync with upstream, change sticky options to -ko 2004-05-24 Thomas Vander Stichele * m4/as-scrub-include.m4: synced with upstream 2004-05-03 Thomas Vander Stichele * po.mak: snippet for updating .po files 2004-03-18 Thomas Vander Stichele * Makefile.am: * m4/Makefile.am: integrate these with the dist 2004-03-17 Thomas Vander Stichele * release.mak: add a release target 2004-03-09 Thomas Vander Stichele patch by: Stephane Loeuillet * m4/ax_create_stdint_h.m4: use head -n instead of head - (#136500) 2004-03-05 Thomas Vander Stichele * m4/gst-doc.m4: don't build PS without dvips binary 2004-02-22 Julio M. Merino Vidal reviewed by: Benjamin Otte * m4/as-docbook.m4: don't use == operator with test(1) (fixes #135115) 2004-02-16 Thomas Vander Stichele * common/m4/gst-arch.m4: x86_64 is x86 too (clue from Fedora 2 test) 2004-02-13 Thomas Vander Stichele * m4/gst-feature.m4: remove AM_CONDITIONAL for the subsystem since automake 1.6.x requires that call be in configure.ac 2004-02-13 Thomas Vander Stichele * m4/gst-libxml2.m4: take required version as argument, and default to 2.4.9 if not specified 2004-02-12 Thomas Vander Stichele * m4/gst-feature.m4: rename and fix up GST_CHECK_DISABLE_SUBSYSTEM 2004-02-11 Thomas Vander Stichele * common/m4/as-ac-expand.m4: * common/m4/as-auto-alt.m4: * common/m4/as-compiler-flag.m4: * common/m4/as-compiler.m4: * common/m4/as-docbook.m4: * common/m4/as-libtool.m4: * common/m4/as-scrub-include.m4: * common/m4/as-version.m4: * common/m4/glib-gettext.m4: * common/m4/gst-arch.m4: * common/m4/gst-debuginfo.m4: * common/m4/gst-doc.m4: * common/m4/gst-feature.m4: * common/m4/gst-function.m4: * common/m4/gst-glib2.m4: * common/m4/gst-gstreamer.m4: * common/m4/gst-libxml2.m4: * common/m4/gst-makecontext.m4: * common/m4/gst-mcsc.m4: * common/m4/pkg.m4: fix underquoted macros as reported by automake 1.8.x (#133800) 2004-02-11 Johan Dahlin * gst-autogen.sh: Use A-Z instead of A-z in sed expression to avoid a warning 2004-02-05 Thomas Vander Stichele * m4/gst-doc.m4: we use --output-format=xml and --ingnore-files options to gtkdoc-mkdb, which got added between 0.9 and 1.0 2004-02-04 Thomas Vander Stichele * m4/as-libtool.m4: remove AM_PROG_LIBTOOL so it can move back to configure.ac to shut up libtoolize 2004-02-03 Thomas Vander Stichele * glib-gen.mak: added; used to generate enums and marshal code 2004-01-13 Thomas Vander Stichele * gettext.patch: added; used by autogen.sh to make sure GETTEXT_PACKAGE is understood from po/Makefile.in.in -> po/Makefile.in farstream-0.2.7/common/gst.supp0000664000076400007640000021354411710557061013451 00000000000000### this file contains suppressions for valgrind when running ### the gstreamer unit tests ### it might be useful for wider use as well ### syscall suppressions { Memcheck:Param clone(parent_tidptr) fun:clone fun:clone } { Memcheck:Param clone(child_tidptr) fun:clone fun:clone } { Memcheck:Param clone(tlsinfo) fun:clone fun:clone } ### glibc suppressions { Memcheck:Cond obj:/lib/ld-2.*.so fun:dl_open_worker obj:/lib/ld-2.*.so fun:_dl_open fun:dlopen_doit obj:/lib/ld-2.*.so fun:_dlerror_run fun:dlopen fun:g_module_open fun:gst_plugin_load_file } { Memcheck:Cond fun:strlen fun:fillin_rpath fun:_dl_init_paths fun:dl_main fun:_dl_sysdep_start fun:_dl_start obj:/lib64/ld-2.*.so obj:* obj:* } { Memcheck:Cond fun:_dl_relocate_object fun:dl_main fun:_dl_sysdep_start fun:_dl_start } { Memcheck:Cond fun:* fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 } # glibc does not deallocate thread-local storage { Memcheck:Leak fun:calloc fun:_dl_allocate_tls fun:pthread_create@@* } # I get an extra stack entry on x86/dapper { Memcheck:Leak fun:calloc obj:/lib/ld-2.3.*.so fun:_dl_allocate_tls fun:pthread_create@@* } { Memcheck:Cond fun:strstr fun:__pthread_initialize_minimal obj:/lib/libpthread-*.so obj:/lib/libpthread-*.so fun:call_init fun:_dl_init obj:/lib/ld-*.so } # a thread-related free problem in glibc from Edgard { __libc_freeres_rw_acess Memcheck:Addr4 obj:* obj:* obj:* obj:* obj:* fun:__libc_freeres } { Memcheck:Cond obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so } # g_module_open-related problems { Memcheck:Addr2 fun:memcpy fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open fun:gst_plugin_load_file fun:gst_registry_scan_path_level fun:gst_registry_scan_path_level fun:gst_registry_scan_path_level fun:init_post fun:g_option_context_parse fun:gst_init_check fun:gst_init fun:gst_check_init fun:main } { Memcheck:Addr4 fun:memcpy fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open fun:gst_plugin_load_file fun:gst_registry_scan_path_level fun:gst_registry_scan_path_level fun:gst_registry_scan_path_level fun:init_post fun:g_option_context_parse fun:gst_init_check fun:gst_init fun:gst_check_init fun:main } { Memcheck:Cond obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so fun:do_sym fun:_dl_sym fun:dlsym_doit obj:/lib/ld-2.3.*.so fun:_dlerror_run fun:dlsym fun:g_module_symbol fun:g_module_open fun:gst_plugin_load_file } { Memcheck:Cond obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so fun:dl_open_worker obj:/lib/ld-2.3.*.so fun:_dl_open fun:dlopen_doit obj:/lib/ld-2.3.*.so fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open fun:gst_plugin_load_file } { Memcheck:Cond obj:/lib/ld-2.3.*.so fun:dl_open_worker obj:/lib/ld-2.3.*.so fun:_dl_open fun:dlopen_doit obj:/lib/ld-2.3.*.so fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open fun:gst_plugin_load_file fun:gst_plugin_load_by_name fun:gst_plugin_feature_load } { Memcheck:Leak fun:malloc obj:/lib/ld-2.3.*.so fun:dl_open_worker obj:/lib/ld-2.3.*.so fun:_dl_open fun:dlopen_doit obj:/lib/ld-2.3.*.so fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open fun:gst_plugin_load_file fun:gst_plugin_load_by_name } { Memcheck:Addr4 obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so fun:dl_open_worker obj:/lib/ld-2.3.*.so fun:_dl_open fun:dlopen_doit obj:/lib/ld-2.3.*.so } { Memcheck:Addr4 obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so fun:dl_open_worker obj:/lib/ld-2.3.*.so fun:_dl_open fun:dlopen_doit obj:/lib/ld-2.3.*.so fun:_dlerror_run } { Memcheck:Addr4 obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so fun:dl_open_worker obj:/lib/ld-2.3.*.so fun:_dl_open fun:dlopen_doit obj:/lib/ld-2.3.*.so fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open } { Memcheck:Addr4 obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so fun:dl_open_worker obj:/lib/ld-2.3.*.so fun:_dl_open fun:dlopen_doit obj:/lib/ld-2.3.*.so fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open } { Memcheck:Addr4 obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so fun:do_sym fun:_dl_sym fun:dlsym_doit obj:/lib/ld-2.3.*.so fun:_dlerror_run fun:dlsym fun:g_module_symbol fun:g_module_open } { Memcheck:Param futex(uaddr2) fun:pthread_once obj:/lib/libc-2.3.*.so obj:/lib/libc-2.3.*.so fun:mbsnrtowcs fun:vfprintf fun:vsprintf fun:sprintf obj:/lib/libc-2.3.*.so fun:tmpfile fun:setup_pipe fun:setup_messaging_with_key fun:setup_messaging } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libc-2.7.so fun:_dl_sym obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlsym fun:g_module_symbol fun:g_module_open } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode obj:/lib/i686/cmov/libc-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/i686/cmov/libc-2.7.so fun:iconv_open } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode obj:/lib/i686/cmov/libc-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/i686/cmov/libc-2.7.so obj:/lib/i686/cmov/libc-2.7.so fun:iconv_open } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode obj:/lib/libc-2.7.so obj:/lib/libc-2.7.so obj:/lib/libc-2.7.so obj:/lib/libc-2.7.so obj:/lib/libc-2.7.so fun:iconv_open } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode obj:/lib/libc-2.7.so obj:/lib/libc-2.7.so obj:/lib/libc-2.7.so obj:/lib/libc-2.7.so obj:/lib/libc-2.7.so fun:iconv_open } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode } { Memcheck:Cond obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Cond obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Cond obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Cond obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Cond obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Cond obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/i686/cmov/libdl-2.7.so fun:dlopen } # suppression for a glibc bug: # http://valgrind.org/docs/manual/faq.html#faq.exit_errors> { Memcheck:Free fun:free obj:*libc-*.so fun:__libc_freeres fun:* fun:_Exit } # same as above, just so it works for tpm on gutsy/x86-64 { Memcheck:Free fun:free fun:free_mem fun:__libc_freeres } # valgrind doesn't allow me to specify a suppression for Addr1, Addr2, Addr4 # as Addr*, so 3 copies for that; and then 2 of each for that pesky memcpy { Memcheck:Addr1 fun:_dl_signal_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open } { Memcheck:Addr2 fun:_dl_signal_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open } { Memcheck:Addr4 fun:_dl_signal_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open } { Memcheck:Addr1 fun:memcpy fun:_dl_signal_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open } { Memcheck:Addr2 fun:memcpy fun:_dl_signal_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open } { Memcheck:Addr4 fun:memcpy fun:_dl_signal_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.1 fun:g_module_open } { Memcheck:Addr8 obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/libc-2.3.*.so obj:/lib/ld-2.3.*.so fun:_dl_open obj:/lib/libdl-2.3.*.so obj:/lib/ld-2.3.*.so } { Memcheck:Cond obj:/lib/ld-2.3.*.so obj:/lib/libc-2.3.*.so obj:/lib/ld-2.3.*.so fun:_dl_open obj:/lib/libdl-2.3.*.so obj:/lib/ld-2.3.*.so obj:/lib/libdl-2.3.*.so fun:dlopen fun:g_module_open fun:gst_plugin_load_file fun:gst_plugin_load_by_name fun:gst_plugin_feature_load } { Memcheck:Addr4 obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/tls/i686/cmov/libc-2.3.6.so obj:/lib/ld-2.3.6.so fun:_dl_open obj:/lib/tls/i686/cmov/libdl-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/tls/i686/cmov/libdl-2.3.6.so fun:dlopen } { Memcheck:Cond obj:/lib/ld-2.3.6.so obj:/lib/tls/i686/cmov/libc-2.3.6.so obj:/lib/ld-2.3.6.so fun:_dl_open obj:/lib/tls/i686/cmov/libdl-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/tls/i686/cmov/libdl-2.3.6.so fun:dlopen } { Memcheck:Cond obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/tls/i686/cmov/libc-2.3.6.so obj:/lib/ld-2.3.6.so fun:_dl_open obj:/lib/tls/i686/cmov/libdl-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/tls/i686/cmov/libdl-2.3.6.so fun:dlopen } ### glib suppressions { Memcheck:Cond fun:g_parse_debug_string obj:/usr/lib*/libglib-2.0.so.* fun:g_slice_alloc fun:g_slice_alloc0 } { Memcheck:Leak fun:*alloc ... fun:g_type_init* fun:init_pre* } { Memcheck:Leak fun:*alloc ... fun:g_type_register_fundamental } { Memcheck:Leak fun:malloc fun:realloc fun:g_realloc fun:type_node_any_new_W } { Memcheck:Leak fun:realloc fun:g_realloc fun:type_node_any_new_W } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:g_type_class_ref } { Memcheck:Leak fun:malloc fun:realloc fun:g_realloc fun:type_add_flags_W } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:type_add_flags_W } #pthread memleaks { Thread creation leak Memcheck:Leak fun:calloc fun:allocate_dtv fun:_dl_allocate* fun:_dl_allocate* fun:__pthread_initialize_minimal } { Thread management leak Memcheck:Leak fun:calloc fun:allocate_dtv fun:_dl_allocate* fun:_dl_allocate* fun:__pthread_* } { Thread management leak 2 Memcheck:Leak fun:memalign fun:_dl_allocate* fun:_dl_allocate* fun:__pthread_* } { pthread_create Syscall param write(buf) points to uninitialised byte(s) Memcheck:Param write(buf) fun:pthread_create@@GLIBC_2.2.5 fun:g_thread_create* } # nss_parse_* memleak (used by g_option_context_parse) { nss_parse_* memleak Memcheck:Leak fun:malloc fun:nss_parse_service_list fun:__nss_database_lookup } # liboil suppressions { Memcheck:Value8 obj:/usr/lib/liboil-0.3.so.0.1.0 obj:/usr/lib/liboil-0.3.so.0.1.0 obj:/usr/lib/liboil-0.3.so.0.1.0 fun:oil_cpu_fault_check_try fun:oil_test_check_impl fun:oil_class_optimize fun:oil_optimize_all fun:oil_init } { Memcheck:Addr8 obj:/lib/ld-2.3.6.so } { Memcheck:Param futex(uaddr2) fun:pthread_once obj:/lib/libc-2.3.6.so obj:/lib/libc-2.3.6.so fun:setlocale fun:init_pre fun:g_option_context_parse fun:gst_init_check fun:gst_init fun:gst_check_init fun:main } { Memcheck:Cond obj:/lib/ld-2.3.6.so obj:/lib/ld-2.3.6.so fun:_dl_open obj:/lib/libdl-2.3.6.so obj:/lib/ld-2.3.6.so obj:/lib/libdl-2.3.6.so fun:dlopen fun:g_module_open fun:gst_plugin_load_file } # this exists in a bunch of different variations, hence the short tail/trace { Memcheck:Addr4 obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so } { Memcheck:Addr8 obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so } # More edgy suppressions (Mike) { Memcheck:Cond obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so fun:dlopen_doit obj:/lib/ld-2.4.so fun:_dlerror_run fun:dlopen@@GLIBC_2.1 } { Memcheck:Cond obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so fun:dlopen_doit obj:/lib/ld-2.4.so fun:_dlerror_run fun:dlopen@@GLIBC_2.1 } { Memcheck:Cond obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so fun:do_sym fun:_dl_sym } # This one's overly general, but there's zero other information in the stack # trace - just these five lines! { Memcheck:Cond obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so } { Memcheck:Leak fun:calloc obj:/lib/ld-2.4.so fun:_dl_allocate_tls fun:pthread_create@@GLIBC_2.1 } # TLS leaks for feisty/x86 { Memcheck:Leak fun:calloc fun:allocate_dtv fun:_dl_allocate_tls fun:pthread_create@@GLIBC_2.1 } { Memcheck:Leak fun:calloc obj:/usr/lib/libcdio.so.6.0.1 fun:cdio_open_am_linux obj:/usr/lib/libcdio.so.6.0.1 fun:cdio_open_am } { Memcheck:Addr8 obj:/lib/ld-2.5.so } { Memcheck:Cond fun:snd_pcm_direct_shm_create_or_connect fun:snd_pcm_dsnoop_open fun:_snd_pcm_dsnoop_open obj:/*lib/libasound.so.2.0.0 obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_open_slave fun:_snd_pcm_plug_open obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_open_slave fun:_snd_pcm_asym_open obj:/*lib/libasound.so.2.0.0 obj:/*lib/libasound.so.2.0.0 } { Memcheck:Cond fun:snd*_pcm_hw_param_set_near } { Memcheck:Cond ... fun:snd*_pcm_hw_param_set_near } { Memcheck:Cond obj:/*lib/libasound.so.2.0.0 obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_close obj:/*lib/libasound.so.2.0.0 } { Memcheck:Cond fun:snd_pcm_direct_shm_create_or_connect fun:snd_pcm_dmix_open fun:_snd_pcm_dmix_open obj:/*lib/libasound.so.2.0.0 obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_open_slave fun:_snd_pcm_softvol_open obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_open_slave fun:_snd_pcm_plug_open obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_open_slave fun:_snd_pcm_asym_open obj:/*lib/libasound.so.2.0.0 obj:/*lib/libasound.so.2.0.0 } { Memcheck:Leak fun:malloc fun:strdup fun:snd_dlobj_cache_add obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_open_slave fun:snd_pcm_dsnoop_open fun:_snd_pcm_dsnoop_open obj:/*lib/libasound.so.2.0.0 obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_open_slave fun:_snd_pcm_plug_open obj:/*lib/libasound.so.2.0.0 fun:snd_pcm_open_slave fun:_snd_pcm_asym_open obj:/*lib/libasound.so.2.0.0 obj:/*lib/libasound.so.2.0.0 } # Catch about 15 variations on inserting info into an ALSA # internal cache { Memcheck:Leak fun:malloc ... fun:snd*_dlobj_cache_add obj:/*lib*/libasound.so.2.0.0 } { Memcheck:Leak fun:*alloc ... fun:snd_pcm_open_conf } { Memcheck:Leak fun:*alloc obj:/*lib*/libasound.so.2.0.0 ... fun:snd_config_hook_load } { Memcheck:Leak fun:*alloc obj:/*lib*/libasound.so.2.0.0 ... fun:snd_config_update_r fun:snd_config_update } { Memcheck:Leak fun:*alloc fun:strdup ... fun:snd_config_update_r fun:snd_config_update } { Memcheck:Leak fun:malloc obj:/lib/libc*.so fun:__nss_database_lookup obj:* obj:* fun:getgrnam_r fun:getgrnam fun:snd_pcm_direct_parse_open_conf } { Memcheck:Leak fun:calloc fun:_XCBInitDisplayLock fun:XOpenDisplay } # GConf internal initialisations related to getting the default client. { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc_tcval obj:/usr/lib/libORBit-2.so.* fun:ORBit_demarshal_IOR fun:ORBit_demarshal_object fun:CORBA_ORB_string_to_object obj:/usr/lib/libgconf-2.so.* fun:gconf_get_current_lock_holder fun:gconf_activate_server obj:/usr/lib/libgconf-2.so.* obj:/usr/lib/libgconf-2.so.* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc_tcval obj:* fun:PortableServer_POA_servant_to_reference fun:* fun:* fun:* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc_tcval obj:/usr/lib/libORBit-2.so.* fun:ORBit_demarshal_IOR fun:ORBit_demarshal_object fun:CORBA_ORB_string_to_object obj:/usr/lib/libgconf-2.so.* fun:gconf_get_current_lock_holder fun:gconf_activate_server obj:/usr/lib/libgconf-2.so.* obj:/usr/lib/libgconf-2.so.* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:* fun:ORBit_demarshal_IOR fun:ORBit_demarshal_object fun:ORBit_demarshal_value fun:* fun:ORBit_small_invoke_stub fun:ConfigServer_get_default_database fun:* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:* fun:IOP_generate_profiles fun:ORBit_marshal_object fun:ORBit_marshal_value fun:* fun:ORBit_small_invoke_stub fun:ConfigServer_add_client fun:* fun:* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc_by_tc fun:* fun:PortableServer_POA_servant_to_reference fun:* fun:* fun:* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc_by_tc obj:/usr/lib/libORBit-2.so.* fun:ORBit_demarshal_IOR fun:ORBit_demarshal_object fun:CORBA_ORB_string_to_object obj:/usr/lib/libgconf-2.so.* fun:gconf_get_current_lock_holder fun:gconf_activate_server obj:/usr/lib/libgconf-2.so.* obj:/usr/lib/libgconf-2.so.* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:* fun:ORBit_demarshal_IOR fun:ORBit_demarshal_object fun:* fun:* fun:gconf_activate_server } # Some libORBit/bonobo initialisation stuff { Memcheck:Leak fun:malloc fun:g_malloc fun:ORBit_alloc_string fun:CORBA_string_dup fun:Bonobo_ActivationEnvValue_set fun:bonobo_activation_init_activation_env fun:bonobo_activation_orb_init fun:bonobo_activation_init } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:ORBit_small_alloc* obj:/usr/lib/libORBit-2.so* fun:PortableServer_POA_servant_to_reference obj:/usr/lib/libbonobo-2.so* } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc_tcval fun:ORBit_small_allocbuf fun:ORBit_adaptor_setup obj:/usr/lib/libORBit-2.so* fun:ORBit_POA_setup_root fun:ORBit_init_internals fun:CORBA_ORB_init } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc_tcval fun:ORBit_adaptor_setup fun:* fun:ORBit_POA_setup_root fun:ORBit_init_internals fun:CORBA_ORB_init } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:ORBit_small_allocbuf fun:bonobo_activation_init_activation_env fun:bonobo_activation_orb_init fun:bonobo_activation_init } # More GConf stuff from the FC5 buildbot, mostly variations on the # above stack traces { Memcheck:Param writev(vector[...]) fun:writev obj:/usr/lib/libORBit-2.so* fun:link_connection_writev fun:giop_send_buffer_write obj:/usr/lib/libORBit-2.so* fun:ORBit_small_invoke_stub fun:ORBit_small_invoke_stub_n fun:ORBit_c_stub_invoke fun:ConfigServer_ping fun:gconf_activate_server obj:/usr/lib/libgconf-2.so* obj:/usr/lib/libgconf-2.so* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:ORBit_small_alloc* obj:/usr/lib/libORBit-2.so* fun:PortableServer_POA_servant_to_reference obj:/usr/lib/libgconf-2.so* obj:/usr/lib/libgconf-2.so* obj:/usr/lib/libgconf-2.so* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:ORBit_small_alloc obj:/usr/lib/libORBit-2.so* fun:ORBit_demarshal_IOR fun:ORBit_demarshal_object fun:CORBA_ORB_string_to_object obj:/usr/lib/libgconf-2.so* fun:gconf_get_current_lock_holder fun:gconf_activate_server obj:/usr/lib/libgconf-2.so* obj:/usr/lib/libgconf-2.so* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:ORBit_small_alloc* obj:/usr/lib/libORBit-2.so* fun:ORBit_demarshal_IOR fun:ORBit_demarshal_object fun:CORBA_ORB_string_to_object obj:/usr/lib/libgconf-2.so* fun:gconf_get_current_lock_holder fun:gconf_activate_server obj:/usr/lib/libgconf-2.so* obj:/usr/lib/libgconf-2.so* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:ORBit_small_alloc* obj:/usr/lib/libORBit-2.so* fun:ORBit_demarshal_IOR fun:ORBit_demarshal_object fun:ORBit_demarshal_value obj:/usr/lib/libORBit-2.so* fun:ORBit_small_invoke_stub fun:ORBit_small_invoke_stub_n fun:ORBit_c_stub_invoke fun:ConfigServer_get_default_database obj:/usr/lib/libgconf-2.so* fun:gconf_engine_get_default } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:ORBit_alloc* fun:ORBit_small_alloc* obj:/usr/lib/libORBit-2.so* fun:ORBit_OAObject_object_to_objkey fun:IOP_generate_profiles fun:ORBit_marshal_object fun:ORBit_marshal_value obj:/usr/lib/libORBit-2.so* fun:ORBit_small_invoke_stub fun:ORBit_small_invoke_stub_n fun:ORBit_c_stub_invoke fun:ConfigServer_add_client obj:/usr/lib/libgconf-2.so* obj:/usr/lib/libgconf-2.so* fun:gconf_engine_get_default } { Memcheck:Leak fun:malloc obj:*libc-*.so fun:__nss_database_lookup obj:* obj:* fun:getpwnam_r obj:/usr/lib*/libglib-2.0.so.* fun:g_get_home_dir } { Memcheck:Leak fun:malloc obj:*libc-*.so fun:__nss_database_lookup obj:* obj:* fun:getpwnam_r obj:/usr/lib*/libglib-2.0.so.* fun:g_get_user_name } { Memcheck:Leak fun:malloc obj:*libc-*.so fun:__nss_database_lookup obj:* obj:* fun:getpwnam_r obj:/usr/lib*/libglib-2.0.so.* fun:g_get_tmp_dir } { Memcheck:Leak fun:malloc obj:*libc-*.so fun:__nss_database_lookup obj:* obj:* fun:getpwnam_r obj:/usr/lib*/libglib-2.0.so.0.* fun:g_get_host_name } ## Some Fontconfig errors. { Memcheck:Leak fun:malloc fun:FcPatternObjectInsertElt fun:FcPatternObjectAddWithBinding fun:FcPatternAppend fun:FcEndElement obj:/usr/lib/libexpat.so.* obj:/usr/lib/libexpat.so.* obj:/usr/lib/libexpat.so.* obj:/usr/lib/libexpat.so.* fun:XML_ParseBuffer fun:FcConfigParseAndLoad fun:FcConfigParseAndLoad fun:FcParseInclude fun:FcEndElement obj:/usr/lib/libexpat.so.* obj:/usr/lib/libexpat.so.* obj:/usr/lib/libexpat.so.* obj:/usr/lib/libexpat.so.* fun:XML_ParseBuffer fun:FcConfigParseAndLoad } { Memcheck:Leak fun:*alloc ... fun:FcInitLoadConfig } # Issues with ubuntu Hardy, same crack as for previous ubuntus { Memcheck:Leak fun:calloc obj:* fun:_dl_allocate_tls fun:pthread_create@@* obj:/usr/lib/libgthread* fun:g_thread_* } # I've made this version generic, so that it covers future modifications # of library names { Memcheck:Leak fun:calloc obj:* fun:_dl_allocate_tls fun:pthread_create@@* fun:g_thread_* } # series of invalid read of size 4 in g_module_open for ubuntu # hardy x86/32bit { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open fun:gst_plugin_load_* } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open fun:gst_plugin_load_* } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open fun:gst_plugin_load_* } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open fun:gst_plugin_load_* } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so fun:dlopen fun:g_module_open fun:gst_plugin_load* } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libc-2.7.so fun:_dl_sym obj:/lib/tls/i686/cmov/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libdl-2.7.so fun:dlsym fun:g_module_symbol fun:g_module_open fun:gst_plugin_load_* } # series of invalid read of size 8 in g_module_open for ubuntu # hardy x86/64bit { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so fun:dlopen fun:g_module_open } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libc-2.7.so obj:/lib/libdl-2.7.so obj:/lib/ld-2.7.so obj:/lib/libdl-2.7.so fun:dlsym fun:g_module_symbol fun:g_module_open } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode fun:__nss_lookup_function obj:/lib/tls/i686/cmov/libc-2.7.so fun:__nss_passwd_lookup fun:getpwnam_r } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode fun:__nss_lookup_function obj:/lib/tls/i686/cmov/libc-2.7.so fun:__nss_passwd_lookup fun:getpwnam_r } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode fun:__nss_lookup_function obj:/lib/tls/i686/cmov/libnss_compat-2.7.so fun:_nss_compat_getpwnam_r fun:getpwnam_r } { Memcheck:Addr4 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/tls/i686/cmov/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode fun:__nss_lookup_function obj:/lib/tls/i686/cmov/libnss_compat-2.7.so fun:_nss_compat_getpwnam_r fun:getpwnam_r } { Memcheck:Addr8 obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/ld-2.7.so obj:/lib/libc-2.7.so obj:/lib/ld-2.7.so fun:__libc_dlopen_mode fun:__nss_lookup_function obj:/lib/libc-2.7.so fun:getpwnam_r } ## Leaks in ALSA (variations of leak from snd_config_load1) { Memcheck:Leak fun:calloc fun:_snd_config_make fun:_snd_config_make_add fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:calloc fun:_snd_config_make fun:_snd_config_make_add fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:calloc fun:_snd_config_make fun:_snd_config_make_add fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:calloc fun:_snd_config_make fun:_snd_config_make_add fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:calloc fun:_snd_config_make fun:_snd_config_make_add fun:* fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:calloc fun:_snd_config_make fun:_snd_config_make_add fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:calloc fun:_snd_config_make fun:_snd_config_make_add fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:malloc fun:snd1_dlobj_cache_add fun:snd_ctl_open_noupdate } { Memcheck:Leak fun:malloc fun:* fun:snd1_dlobj_cache_add fun:snd_ctl_open_noupdate } { Memcheck:Leak fun:*alloc fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:*alloc fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:*alloc fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:*alloc fun:* fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:*alloc fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:*alloc fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:*alloc fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } { Memcheck:Leak fun:*alloc fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:snd_config_load1 } # The following are leaks of caps that need to be created dynamically # in the type registration of the plugin (used for pad templates). { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_caps_new_simple fun:* fun:g_type_class_ref fun:gst_element_register } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:* fun:* fun:g_type_class_ref fun:gst_element_register fun:gst_ogm_parse_plugin_init fun:plugin_init } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_caps_copy fun:gst_video_test_src_base_init fun:g_type_class_ref fun:gst_element_register } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_caps_copy fun:gst_video_test_src_getcaps fun:gst_video_test_src_base_init fun:g_type_class_ref fun:gst_element_register } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_ffmpegcsp_codectype_to_caps fun:gst_ffmpegcolorspace_register fun:plugin_init } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_caps_copy fun:gst_ffmpegcolorspace_register fun:plugin_init } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_caps_new_any fun:gst_ffmpegdemux_register fun:plugin_init } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_caps_copy fun:gst_audio_filter_class_add_pad_templates } { Memcheck:Leak fun:realloc fun:g_realloc fun:g_ptr_array_maybe_expand fun:g_ptr_array_add fun:gst_caps_append fun:gst_audio_filter_class_add_pad_templates } { Memcheck:Leak fun:malloc fun:realloc fun:g_realloc fun:g_ptr_array_maybe_expand fun:g_ptr_array_add fun:gst_caps_append fun:gst_audio_filter_class_add_pad_templates } { Memcheck:Leak fun:malloc fun:realloc fun:g_realloc fun:g_ptr_array_maybe_expand fun:g_ptr_array_add fun:gst_caps_copy fun:gst_audio_filter_class_add_pad_templates } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:g_ptr_array_sized_new fun:gst_caps_new_empty fun:gst_caps_copy fun:gst_audio_filter_class_add_pad_templates } { Memcheck:Leak fun:malloc fun:realloc fun:g_realloc fun:g_array_maybe_expand fun:g_array_sized_new fun:* fun:* fun:* fun:gst_value_init_and_copy fun:gst_structure_copy fun:gst_caps_copy fun:gst_audio_filter_class_add_pad_templates } { Memcheck:Leak fun:malloc fun:realloc fun:g_realloc fun:g_array_maybe_expand fun:g_array_sized_new fun:* fun:gst_structure_copy fun:gst_caps_copy fun:gst_audio_filter_class_add_pad_templates } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:g_array_sized_new fun:* fun:gst_structure_copy fun:gst_caps_copy fun:gst_audio_filter_class_add_pad_templates } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_riff_create_*_template_caps } { Memcheck:Leak fun:malloc fun:realloc fun:g_realloc fun:* fun:* fun:* fun:gst_structure_copy fun:gst_caps_copy fun:gst_caps_append fun:gst_riff_create_*_template_caps } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:g_array_sized_new fun:* fun:gst_structure_copy fun:gst_caps_copy fun:gst_caps_append fun:gst_riff_create_*_template_caps } ## Leaks in pango (bilboed: gentoo unstable amd64) { Memcheck:Leak fun:*alloc ... fun:pango_layout_get_pixel_extents } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:pango_language_from_string fun:pango_language_get_default fun:pango_context_init fun:g_type_create_instance fun:g_object_constructor fun:g_object_newv fun:g_object_new_valist fun:g_object_new fun:pango_font_map_create_context } { Memcheck:Leak fun:calloc fun:g_malloc0 fun:pango_language_from_string } ## Leak of property_list in gstffmpegcfg.c ## This list is created in gst_ffmpegcsp_init(), called from ## gst_ffmpegenc_register. { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:g_datalist_id_set_data_full fun:gst_ffmpeg_cfg_init fun:gst_ffmpegenc_register fun:plugin_init } { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:g_datalist_id_set_data_full fun:g_param_spec_set_qdata_full fun:gst_ffmpeg_cfg_init fun:gst_ffmpegenc_register fun:plugin_init } { Memcheck:Leak fun:*alloc fun:* fun:gst_ffmpeg_cfg_init fun:gst_ffmpegenc_register } ## Leak of GIO module through gnomevfs { Memcheck:Leak fun:malloc fun:g_malloc fun:* fun:* fun:g_type_create_instance fun:* fun:* fun:* fun:* fun:g_io_module_new fun:g_io_modules_load_all_in_directory fun:* fun:get_default_vfs } ## Conditional jump in getaddrinfo (bilboed, gentoo ~amd64, Dec 13 2008) { Memcheck:Cond fun:gaih_inet fun:getaddrinfo } ## Dynamic pad templates in mxfmux { Memcheck:Leak fun:malloc fun:g_malloc fun:g_slice_alloc fun:gst_caps_new_empty fun:gst_caps_from_string fun:mxf_*_init fun:plugin_init } ## We don't know if ffmpeg frees this or not and better pass a copy for safety { Memcheck:Leak fun:malloc fun:g_malloc fun:g_strdup fun:gst_ffmpeg_cfg_fill_context fun:gst_ffmpegenc_setcaps fun:gst_pad_set_caps } ## Leak/overreads with glibc-2.10 { Memcheck:Value8 fun:do_sym fun:dlsym_doit fun:_dl_catch_error fun:_dlerror_run fun:dlsym } { Memcheck:Cond fun:do_sym fun:dlsym_doit fun:_dl_catch_error fun:_dlerror_run fun:dlsym } { Memcheck:Value8 fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Value8 fun:_dl_relocate_object fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Value8 fun:_dl_check_map_versions fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Cond fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Cond fun:_dl_relocate_object fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Cond fun:_dl_check_map_versions fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Cond fun:_dl_map_object* fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Value8 fun:_dl_map_object* fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Value8 fun:_dl_check_caller fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Cond fun:_dl_check_caller fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen* } { Memcheck:Value8 obj:/lib*/libc-2.10.*.so obj:/lib*/libc-2.10.*.so fun:_vgnU_freeres } { Memcheck:Cond obj:/lib*/libc-2.10.*.so obj:/lib*/libc-2.10.*.so fun:_vgnU_freeres } { Memcheck:Free fun:free obj:/lib*/libc-2.10.*.so obj:/lib*/libc-2.10.*.so fun:_vgnU_freeres } { Memcheck:Value8 fun:_dl_fini fun:__run_exit_handlers fun:exit } { Memcheck:Cond fun:_dl_fini fun:__run_exit_handlers fun:exit } { Memcheck:Value8 fun:_dl_sort_fini fun:_dl_fini fun:__run_exit_handlers fun:exit } { Memcheck:Cond fun:_dl_sort_fini fun:_dl_fini fun:__run_exit_handlers fun:exit } # glibc-2.10 dl overreads { Memcheck:Value8 fun:_dl_fixup fun:_dl_runtime_resolve } { Memcheck:Cond fun:_dl_fixup fun:_dl_runtime_resolve } { Memcheck:Value8 fun:_dl_lookup_symbol_x fun:_dl_fixup fun:_dl_runtime_resolve } { Memcheck:Cond fun:_dl_lookup_symbol_x fun:_dl_fixup fun:_dl_runtime_resolve } { Memcheck:Value8 fun:call_init fun:_dl_init } { Memcheck:Value8 fun:_dl_init } { Memcheck:Value8 fun:do_lookup_x fun:_dl_lookup_symbol_x fun:_dl_relocate_object fun:dl_main } { Memcheck:Cond fun:do_lookup_x fun:_dl_lookup_symbol_x fun:_dl_relocate_object fun:dl_main } { Memcheck:Value8 fun:_dl_lookup_symbol_x fun:_dl_relocate_object fun:dl_main } { Memcheck:Value8 fun:_dl_relocate_object fun:dl_main } { Memcheck:Value8 fun:dl_main fun:_dl_sysdep_start fun:_dl_start } { Memcheck:Cond fun:dl_main fun:_dl_sysdep_start fun:_dl_start } { Memcheck:Cond fun:* fun:do_lookup_x fun:_dl_lookup_symbol_x fun:_dl_relocate_object fun:dl_main } { Memcheck:Value8 fun:* fun:do_lookup_x fun:_dl_lookup_symbol_x fun:_dl_relocate_object fun:dl_main } { Memcheck:Value8 fun:_dl_check_map_versions fun:_dl_check_all_versions fun:version_check_doit fun:_dl_receive_error fun:dl_main } { Memcheck:Cond fun:_dl_check_map_versions fun:_dl_check_all_versions fun:version_check_doit fun:_dl_receive_error fun:dl_main } { Memcheck:Value8 fun:_dl_check_all_versions fun:version_check_doit fun:_dl_receive_error fun:dl_main } { Memcheck:Cond fun:_dl_check_all_versions fun:version_check_doit fun:_dl_receive_error fun:dl_main } { Memcheck:Value8 fun:* fun:_dl_check_map_versions fun:_dl_check_all_versions fun:version_check_doit fun:_dl_receive_error fun:dl_main } { Memcheck:Cond fun:* fun:_dl_check_map_versions fun:_dl_check_all_versions fun:version_check_doit fun:_dl_receive_error fun:dl_main } { Memcheck:Value8 fun:init_tls fun:dl_main } { Memcheck:Cond fun:init_tls fun:dl_main } { Memcheck:Cond fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:_dl_protect_relro fun:_dl_relocate_object fun:dl_main } { Memcheck:Value8 fun:* fun:do_lookup_x fun:_dl_lookup_symbol_x fun:_dl_relocate_object fun:dl_main } { Memcheck:Value8 fun:_dl_setup_hash fun:_dl_map_object_from_fd fun:_dl_map_object } { Memcheck:Value8 fun:* fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object } { Memcheck:Cond fun:* fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object } { Memcheck:Value8 fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:* fun:_dl_map_object } { Memcheck:Cond fun:* fun:_dl_map_object } { Memcheck:Cond fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_main } { Memcheck:Cond fun:* fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:* fun:open_path fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_main } { Memcheck:Cond fun:* fun:open_path fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:_dl_map_object_from_fd fun:_dl_map_object } { Memcheck:Cond fun:_dl_map_object_from_fd fun:_dl_map_object } { Memcheck:Value8 fun:* fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object } { Memcheck:Value8 fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object } { Memcheck:Cond fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object } { Memcheck:Value8 fun:* fun:_dl_name_match_p fun:_dl_map_object } { Memcheck:Cond fun:* fun:* fun:_dl_map_object } { Memcheck:Value8 fun:* fun:_dl_name_match_p fun:_dl_check_map_versions fun:_dl_check_all_versions } { Memcheck:Value8 fun:* fun:* fun:do_lookup_x fun:_dl_lookup_symbol_x } { Memcheck:Cond fun:do_lookup_x fun:_dl_lookup_symbol_x } { Memcheck:Value8 fun:do_lookup_x fun:_dl_lookup_symbol_x } { Memcheck:Value8 fun:* fun:do_lookup_x fun:_dl_lookup_symbol_x } { Memcheck:Cond fun:* fun:do_lookup_x fun:_dl_lookup_symbol_x } { Memcheck:Value8 fun:_dl_name_match_p fun:_dl_map_object fun:dl_open_worker } { Memcheck:Cond fun:_dl_name_match_p fun:_dl_map_object fun:dl_open_worker } { Memcheck:Value8 fun:* fun:_dl_name_match_p fun:_dl_map_object fun:dl_open_worker } { Memcheck:Cond fun:* fun:_dl_name_match_p fun:_dl_map_object fun:dl_open_worker } { Memcheck:Value8 fun:_dl_lookup_symbol_x fun:_dl_relocate_object } { Memcheck:Cond fun:_dl_lookup_symbol_x fun:_dl_relocate_object } { Memcheck:Value8 fun:* fun:* fun:_dl_check_map_versions } { Memcheck:Value8 fun:* fun:_dl_check_map_versions } { Memcheck:Cond fun:* fun:* fun:_dl_check_map_versions } { Memcheck:Cond fun:* fun:_dl_check_map_versions } { Memcheck:Value8 fun:openaux } { Memcheck:Value8 fun:_dl_name_match_p fun:_dl_map_object } { Memcheck:Cond fun:_dl_close_worker fun:_dl_close fun:_dl_catch_error fun:dlerror_run } { Memcheck:Value8 fun:_dl_close_worker fun:_dl_close fun:_dl_catch_error fun:dlerror_run } { Memcheck:Cond fun:* fun:_dl_close_worker fun:_dl_close fun:_dl_catch_error fun:dlerror_run } { Memcheck:Value8 fun:* fun:_dl_close_worker fun:_dl_close fun:_dl_catch_error fun:dlerror_run } { Memcheck:Cond fun:fillin_rpath fun:_dl_init_paths fun:dl_main } { Memcheck:Value8 fun:fillin_rpath fun:_dl_init_paths fun:dl_main } { Memcheck:Cond fun:* fun:fillin_rpath fun:_dl_init_paths fun:dl_main } { Memcheck:Value8 fun:* fun:fillin_rpath fun:_dl_init_paths fun:dl_main } { Memcheck:Cond fun:_dl_map_object fun:map_doit fun:_dl_catch_error fun:do_preload fun:dl_main } { Memcheck:Value8 fun:_dl_map_object fun:map_doit fun:_dl_catch_error fun:do_preload fun:dl_main } { Memcheck:Param open(filename) fun:open fun:open_verify fun:_dl_map_object fun:map_doit fun:_dl_catch_error fun:do_preload fun:dl_main } { Memcheck:Param stat(file_name) fun:_xstat fun:open_path fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_open_worker } { Memcheck:Cond fun:* fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:* fun:_dl_map_object_deps fun:dl_main } { Memcheck:Value8 fun:* fun:* fun:_dl_map_object_deps fun:dl_main } # glibc-2.10 tls issues { Memcheck:Cond fun:* fun:init_tls fun:dl_main } { Memcheck:Value8 fun:* fun:init_tls fun:dl_main } { Memcheck:Cond fun:* fun:* fun:init_tls fun:dl_main } { Memcheck:Value8 fun:* fun:* fun:init_tls fun:dl_main } { Memcheck:Cond fun:_dl_allocate_tls_init fun:dl_main } { Memcheck:Value8 fun:_dl_allocate_tls_init fun:dl_main } { Memcheck:Cond fun:* fun:_dl_allocate_tls_init fun:dl_main } { Memcheck:Value8 fun:* fun:_dl_allocate_tls_init fun:dl_main } { Memcheck:Cond fun:__tls* obj:* obj:* fun:_vgnU_freeres } { Memcheck:Param arch_prctl(arg2) fun:init_tls } # GLib caching tmp/home directories (glibc-2.10 variants) { Memcheck:Cond fun:* fun:dl_open_worker fun:* fun:* fun:* fun:_dl_catch_error fun:dlerror_run fun:* fun:__nss_lookup_function fun:__nss_lookup fun:getpwnam* } { Memcheck:Value8 fun:* fun:dl_open_worker fun:* fun:* fun:* fun:_dl_catch_error fun:dlerror_run fun:* fun:__nss_lookup_function fun:__nss_lookup fun:getpwnam* } { Memcheck:Cond fun:dl_open_worker fun:* fun:* fun:do_dlopen fun:* fun:dlerror_run fun:* fun:__nss_lookup_function fun:__nss_lookup fun:getpwnam* } { Memcheck:Value8 fun:dl_open_worker fun:* fun:* fun:do_dlopen fun:* fun:dlerror_run fun:* fun:__nss_lookup_function fun:__nss_lookup fun:getpwnam* } { Memcheck:Value8 fun:_dl_add_to_slotinfo fun:dl_main } { Memcheck:Param open(filename) fun:open fun:open_verify fun:open_path fun:_dl_map_object } # GModule issues with glibc-2.10 { Memcheck:Value8 fun:* fun:* fun:dlsym fun:g_module_symbol } { Memcheck:Value8 fun:g_module_* fun:gst_plugin* } { Memcheck:Value8 fun:* fun:g_module_* fun:gst_plugin* } { Memcheck:Value8 fun:* fun:* fun:dlopen* fun:g_module_open } { Memcheck:Value8 fun:* fun:* fun:* fun:* fun:* fun:* fun:* fun:dlsym fun:g_module_symbol } { Memcheck:Value8 fun:* fun:* fun:* fun:* fun:* fun:dlopen* fun:g_module_open } # Leak in GSlice { Memcheck:Value8 fun:g_parse_debug_string fun:slice_config_init fun:g_slice_init_nomessage fun:_g_slice_thread_init_nomessage fun:g_thread_init_glib } # 2.10 pthread issues { Memcheck:Value8 fun:__pthread_initialize_minimal } # glibc 2.11 conditional { Memcheck:Cond fun:_dl_relocate_object fun:dl_main fun:_dl_sysdep_start fun:_dl_start obj:/lib64/ld-2.11.so } # glibc 2.11 Leak { Memcheck:Leak fun:*alloc fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 } { Memcheck:Leak fun:*alloc fun:_dl_* fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 } { Memcheck:Leak fun:*alloc fun:_dl_* fun:_dl_* fun:_dl_* fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 } { Memcheck:Leak fun:*alloc fun:* fun:_dl_* fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 } { Memcheck:Leak fun:*alloc fun:* fun:_dl_map_object fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 } { Memcheck:Leak fun:*alloc fun:_dl_new_object fun:_dl_map_object_from_fd fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 } { Memcheck:Leak fun:*alloc fun:* fun:_dl_* fun:_dl_* fun:_dl_* fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:dlopen@@GLIBC_2.2.5 } # glib type leaks { Memcheck:Leak fun:*alloc ... fun:g_type_register_static } # new registry system # all of this will only be created once when loading registry. { Memcheck:Leak fun:*alloc ... fun:_priv_gst_registry_chunks_load_plugin } # system-wide tags # these tags are registered once { Memcheck:Leak fun:*alloc fun:* fun:* fun:gst_tag_register fun:_gst_tag_initialize } # system-wide type classes that we keep referenced { Memcheck:Leak fun:*alloc ... fun:g_type_class_ref } # leaking cached queries which are only initialized once { Memcheck:Leak fun:*alloc ... fun:_gst_query_initialize fun:init_post } # macosx (leopard) library loader leak { Memcheck:Leak fun:_Znwm fun:_ZNSs4_Rep9_S_createEmmRKSaIcE fun:_ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag fun:_ZNSsC2EPKcRKSaIcE fun:_Z41__static_initialization_and_destruction_0ii fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE } # GObject type registration { Memcheck:Leak fun:*alloc ... fun:_g_atomic_array_copy } { Memcheck:Leak fun:*alloc fun:getdelim obj:*libselinux* } { Memcheck:Leak fun:*alloc ... obj:*/sed } { Memcheck:Addr8 ... obj:*/sed } # GLib 2.23 interface vtable { Memcheck:Leak fun:*alloc ... fun:g_type_add_interface_static } { Memcheck:Leak fun:*alloc obj:*/dash } # libtool/gentoo fake leak # it actually runs bash and valgrind complains { Memcheck:Leak fun:*alloc obj:/bin/bash } { Memcheck:Leak fun:*alloc ... fun:_gst_plugin_loader_client_run fun:main } { Memcheck:Cond fun:*strcasecmp* ... fun:__dcigettext } { Memcheck:Value8 fun:*strcasecmp* ... fun:__dcigettext } { Memcheck:Leak fun:malloc ... fun:gst_poll_new fun:gst_poll_new_timer fun:gst_system_clock_init } farstream-0.2.7/common/check.mak0000664000076400007640000001351712406633262013511 00000000000000# keep target around, since it's referenced in the modules' Makefiles clean-local-check: @echo if HAVE_VALGRIND # hangs spectacularly on some machines, so let's not do this by default yet check-valgrind: $(MAKE) valgrind else check-valgrind: @true endif LOOPS = 10 # run any given test by running make test.check # if the test fails, run it again at at least debug level 2 %.check: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || \ $(TESTS_ENVIRONMENT) \ GST_DEBUG=$$GST_DEBUG,*:2 \ CK_DEFAULT_TIMEOUT=20 \ $* # just like 'check', but don't run it again if it fails (useful for debugging) %.check-norepeat: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* # run any given test in a loop %.torture: % @for i in `seq 1 $(LOOPS)`; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $*; done # run any given test in an infinite loop %.forever: % @while true; do \ $(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=20 \ $* || break; done # valgrind any given test by running make test.valgrind %.valgrind: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ ./$* 2>&1 | tee valgrind.log @if grep "==" valgrind.log > /dev/null 2>&1; then \ rm valgrind.log; \ exit 1; \ fi @rm valgrind.log # valgrind any given test and generate suppressions for it %.valgrind.gen-suppressions: % @$(TESTS_ENVIRONMENT) \ CK_DEFAULT_TIMEOUT=360 \ G_SLICE=always-malloc \ $(LIBTOOL) --mode=execute \ $(VALGRIND_PATH) -q \ $(foreach s,$(SUPPRESSIONS),--suppressions=$(s)) \ --tool=memcheck --leak-check=full --trace-children=yes \ --leak-resolution=high --num-callers=20 \ --gen-suppressions=all \ ./$* 2>&1 | tee suppressions.log # valgrind any given test until failure by running make test.valgrind-forever %.valgrind-forever: % @while $(MAKE) $*.valgrind; do \ true; done # gdb any given test by running make test.gdb %.gdb: % @$(TESTS_ENVIRONMENT) \ CK_FORK=no \ $(LIBTOOL) --mode=execute \ gdb $* # torture tests torture: $(TESTS) -rm test-registry.xml @echo "Torturing tests ..." @for i in `seq 1 $(LOOPS)`; do \ $(MAKE) check || \ (echo "Failure after $$i runs"; exit 1) || \ exit 1; \ done @banner="All $(LOOPS) loops passed"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo $$dashes; echo $$banner; echo $$dashes # forever tests forever: $(TESTS) -rm test-registry.xml @echo "Forever tests ..." @while true; do \ $(MAKE) check || \ (echo "Failure"; exit 1) || \ exit 1; \ done # valgrind all tests valgrind: $(TESTS) @echo "Valgrinding tests ..." @failed=0; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ $(MAKE) $$t.valgrind; \ if test "$$?" -ne 0; then \ echo "Valgrind error for test $$t"; \ failed=`expr $$failed + 1`; \ whicht="$$whicht $$t"; \ fi; \ done; \ if test "$$failed" -ne 0; then \ echo "$$failed tests had leaks or errors under valgrind:"; \ echo "$$whicht"; \ false; \ fi # valgrind all tests and generate suppressions valgrind.gen-suppressions: $(TESTS) @echo "Valgrinding tests ..." @failed=0; \ for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \ $(MAKE) $$t.valgrind.gen-suppressions; \ if test "$$?" -ne 0; then \ echo "Valgrind error for test $$t"; \ failed=`expr $$failed + 1`; \ whicht="$$whicht $$t"; \ fi; \ done; \ if test "$$failed" -ne 0; then \ echo "$$failed tests had leaks or errors under valgrind:"; \ echo "$$whicht"; \ false; \ fi # inspect every plugin feature GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_API_VERSION) inspect: @echo "Inspecting features ..." @for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 \ | cut -d: -f2`; \ do echo Inspecting $$e; \ $(GST_INSPECT) $$e > /dev/null 2>&1; done help: @echo @echo "make check -- run all checks" @echo "make torture -- run all checks $(LOOPS) times" @echo "make (dir)/(test).check -- run the given check once, repeat with GST_DEBUG=*:2 if it fails" @echo "make (dir)/(test).check-norepeat -- run the given check once, but don't run it again if it fails" @echo "make (dir)/(test).forever -- run the given check forever" @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times" @echo @echo "make (dir)/(test).gdb -- start up gdb for the given test" @echo @echo "make valgrind -- valgrind all tests" @echo "make valgrind.gen-suppressions -- generate suppressions for all tests" @echo " and save to suppressions.log" @echo "make (dir)/(test).valgrind -- valgrind the given test" @echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever" @echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions" @echo " and save to suppressions.log" @echo "make inspect -- inspect all plugin features" @echo @echo @echo "Additionally, you can use the GST_CHECKS environment variable to" @echo "specify which test(s) should be run. This is useful if you are" @echo "debugging a failure in one particular test, or want to reproduce" @echo "a race condition in a single test." @echo @echo "Examples:" @echo @echo " GST_CHECKS=test_this,test_that make element/foobar.check" @echo " GST_CHECKS=test_many_threads make element/foobar.forever" @echo farstream-0.2.7/common/upload-doc.mak0000664000076400007640000000567611710041611014456 00000000000000# this snippet is to be included by both our docbook manuals # and gtk-doc API references # it adds an upload target to each of these dir's Makefiles # each Makefile.am should define the following variables: # - DOC: the base name of the documentation # (faq, manual, pwg, gstreamer, gstreamer-libs) # - FORMATS: the formats in which DOC is output # (html ps pdf) # if you want to use it, make sure your $HOME/.ssh/config file contains the # correct User entry for the Host entry for the DOC_SERVER # these variables define the location of the online docs DOC_SERVER = gstreamer.freedesktop.org DOC_BASE = /srv/gstreamer.freedesktop.org/www/data/doc DOC_URL = $(DOC_SERVER):$(DOC_BASE) upload: $(FORMATS) @if echo $(FORMATS) | grep html > /dev/null; then \ echo "Preparing docs for upload (rebasing cross-references) ..." ; \ if test x$(builddir) != x$(srcdir); then \ echo "make upload can only be used if srcdir == builddir"; \ exit 1; \ fi; \ # gtkdoc-rebase sometimes gets confused, so reset everything to \ # local links before rebasing to online links \ gtkdoc-rebase --html-dir=$(builddir)/html 2>/dev/null 2>/dev/null ; \ rebase=`gtkdoc-rebase --verbose --online --html-dir=$(builddir)/html` ; \ echo "$$rebase" | grep -e "On-*line"; \ for req in glib gobject gstreamer gstreamer-libs gst-plugins-base-libs; do \ if ! ( echo "$$rebase" | grep -i -e "On-*line.*/$$req/" ); then \ echo "===============================================================================" ; \ echo " Could not determine online location for $$req docs. Cross-referencing will be " ; \ echo " broken, so not uploading. Make sure the library's gtk-doc documentation is " ; \ echo " installed somewhere in /usr/share/gtk-doc. " ; \ echo "===============================================================================" ; \ exit 1; \ fi; \ done; \ export SRC="$$SRC html"; \ fi; \ if echo $(FORMATS) | grep ps > /dev/null; then export SRC="$$SRC $(DOC).ps"; fi; \ if echo $(FORMATS) | grep pdf > /dev/null; then export SRC="$$SRC $(DOC).pdf"; fi; \ \ # upload releases to both 0.10.X/ and head/ subdirectories \ if test "x$(PACKAGE_VERSION_NANO)" = x0; then \ export DIR=$(DOC_BASE)/gstreamer/$(VERSION)/$(DOC); \ echo Uploading $$SRC to $(DOC_SERVER):$$DIR; \ ssh $(DOC_SERVER) mkdir -p $$DIR; \ rsync -rv -e ssh --delete $$SRC $(DOC_SERVER):$$DIR; \ ssh $(DOC_SERVER) chmod -R g+w $$DIR; \ fi; \ \ export DIR=$(DOC_BASE)/gstreamer/head/$(DOC); \ echo Uploading $$SRC to $(DOC_SERVER):$$DIR; \ ssh $(DOC_SERVER) mkdir -p $$DIR; \ rsync -rv -e ssh --delete $$SRC $(DOC_SERVER):$$DIR; \ ssh $(DOC_SERVER) chmod -R g+w $$DIR; \ \ if echo $(FORMATS) | grep html > /dev/null; then \ echo "Un-preparing docs for upload (rebasing cross-references) ..." ; \ gtkdoc-rebase --html-dir=$(builddir)/html ; \ fi; \ echo Done farstream-0.2.7/common/extract-release-date-from-doap-file0000775000076400007640000000132711710041611020452 00000000000000#!/bin/sh # Shell script to extract the date given a release version and a .doap file if test "x$1" = "x" -o "x$2" = "x" -o ! -s "$2"; then echo "Usage: $0 RELEASE-VERSION-NUMBER DOAP-FILE" >&2; exit 1 fi if ! grep '/dev/null ; then echo "$2 does not look lika a .doap file" >&2; exit 1 fi if ! grep "$1" "$2" >/dev/null ; then echo "$2 contains no reference to a version $1" >&2; exit 1 fi awk 'BEGIN {x=0} { if ($0~"") {x=1; chunk=""} if (x==1) { if ($0~"") { chunk = chunk $0 } if ($0~"") { chunk = chunk $0 } } if ($0~"") {x=0; print chunk} }' < "$2" | \ \ grep ''"$1"'' | \ \ sed -e 's/^.*//' -e 's/<\/created>.*$//' farstream-0.2.7/common/release.mak0000664000076400007640000000151112406633262014043 00000000000000# include this snippet to add a common release: target by using # include $(top_srcdir)/common/release.mak release: dist $(MAKE) $(PACKAGE)-$(VERSION).tar.xz.md5 # generate md5 sum files %.md5: % md5sum $< > $@ # check that no marshal or enumtypes files are included # this in turn ensures that distcheck fails for missing .list files which is currently # shadowed when the corresponding .c and .h files are included. distcheck-hook: @test "x" = "x`find $(distdir) -name \*-enumtypes.[ch] | grep -v win32`" && \ test "x" = "x`find $(distdir) -name \*-marshal.[ch]`" || \ ( $(ECHO) "*** Leftover enumtypes or marshal files in the tarball." && \ $(ECHO) "*** Make sure the following files are not disted:" && \ find $(distdir) -name \*-enumtypes.[ch] | grep -v win32 && \ find $(distdir) -name \*-marshal.[ch] && \ false ) farstream-0.2.7/common/gstdoc-scangobj0000775000076400007640000013175512406633262014744 00000000000000#!/usr/bin/env perl # -*- cperl -*- # # gtk-doc - GTK DocBook documentation generator. # Copyright (C) 1998 Damon Chaplin # # 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. # # # This gets information about object hierarchies and signals # by compiling a small C program. CFLAGS and LDFLAGS must be # set appropriately before running this script. # use Getopt::Long; my $GTK_DOC_PREFIX=`pkg-config --variable prefix gtk-doc`; if ($GTK_DOC_PREFIX) { chomp $GTK_DOC_PREFIX; #print "Adding $GTK_DOC_PREFIX/share/gtk-doc/data to \@INC\n"; unshift @INC, "$GTK_DOC_PREFIX/share/gtk-doc/data"; } else { unshift @INC, '/usr/share/gtk-doc/data'; } require "gtkdoc-common.pl"; # Options # name of documentation module my $MODULE; my $OUTPUT_DIR; my $INSPECT_DIR; my $VERBOSE; my $PRINT_VERSION; my $PRINT_HELP; my $TYPE_INIT_FUNC="g_type_init ()"; # --nogtkinit is deprecated, as it is the default now anyway. %optctl = (module => \$MODULE, source => \$SOURCE, types => \$TYPES_FILE, nogtkinit => \$NO_GTK_INIT, 'type-init-func' => \$TYPE_INIT_FUNC, 'output-dir' => \$OUTPUT_DIR, 'inspect-dir' => \$INSPECT_DIR, 'verbose' => \$VERBOSE, 'version' => \$PRINT_VERSION, 'help' => \$PRINT_HELP); GetOptions(\%optctl, "module=s", "source=s", "types:s", "output-dir:s", "inspect-dir:s", "nogtkinit", "type-init-func:s", "verbose", "version", "help"); if ($NO_GTK_INIT) { # Do nothing. This just avoids a warning. # the option is not used anymore } if ($PRINT_VERSION) { print "1.5\n"; exit 0; } if (!$MODULE) { $PRINT_HELP = 1; } if ($PRINT_HELP) { print <$MODULE-scan.c") || die "Cannot open $MODULE-scan.c: $!\n"; my $old_signals_filename = "$OUTPUT_DIR/$MODULE.signals"; my $new_signals_filename = "$OUTPUT_DIR/$MODULE.signals.new"; my $old_hierarchy_filename = "$OUTPUT_DIR/$MODULE.hierarchy"; my $new_hierarchy_filename = "$OUTPUT_DIR/$MODULE.hierarchy.new"; my $old_interfaces_filename = "$OUTPUT_DIR/$MODULE.interfaces"; my $new_interfaces_filename = "$OUTPUT_DIR/$MODULE.interfaces.new"; my $old_prerequisites_filename = "$OUTPUT_DIR/$MODULE.prerequisites"; my $new_prerequisites_filename = "$OUTPUT_DIR/$MODULE.prerequisites.new"; my $old_args_filename = "$OUTPUT_DIR/$MODULE.args"; my $new_args_filename = "$OUTPUT_DIR/$MODULE.args.new"; my $debug_log="g_message"; if (!defined($VERBOSE) or $VERBOSE eq "0") { $debug_log="//$debug_log"; } # write a C program to scan the types $includes = ""; @types = (); @impl_types = (); for () { if (/^#include/) { $includes .= $_; } elsif (/^%/) { next; } elsif (/^\s*$/) { next; } elsif (/^type:(.*)$/) { $t = $1; chomp $t; push @impl_types, $t; } else { chomp; push @types, $_; } } $ntypes = @types + @impl_types + 1; print OUTPUT < #include #include #include $includes #ifdef GTK_IS_WIDGET_CLASS #include #endif static GType *object_types = NULL; static GString *xmlstr = NULL; static const gchar* xmlprint (gint indent, const gchar *tag, const gchar *data) { const gchar indent_str[] = " "; /* reset */ g_string_truncate (xmlstr, 0); g_string_append_len (xmlstr, indent_str, MIN (indent, strlen (indent_str))); g_string_append_printf (xmlstr, "<%s>", tag); if (data) { gchar *s; s = g_markup_escape_text (data, -1); g_string_append (xmlstr, s); g_free (s); } g_string_append_printf (xmlstr, "\\n", tag); return xmlstr->str; } static gint gst_feature_sort_compare (gconstpointer a, gconstpointer b) { const gchar *name_a = gst_plugin_feature_get_name ((GstPluginFeature *) a); const gchar *name_b = gst_plugin_feature_get_name ((GstPluginFeature *) b); return strcmp (name_a, name_b); } static gint static_pad_template_compare (gconstpointer a, gconstpointer b) { GstStaticPadTemplate *spt_a = (GstStaticPadTemplate *) a; GstStaticPadTemplate *spt_b = (GstStaticPadTemplate *) b; /* we want SINK before SRC (enum is UNKNOWN, SRC, SINK) */ if (spt_a->direction != spt_b->direction) return spt_b->direction - spt_a->direction; /* we want ALWAYS first, SOMETIMES second, REQUEST last * (enum is ALWAYS, SOMETIMES, REQUEST) */ if (spt_a->presence != spt_b->presence) return spt_a->presence - spt_b->presence; return strcmp (spt_a->name_template, spt_b->name_template); } static GType * get_object_types (void) { gpointer g_object_class; GList *plugins = NULL; GList *factories = NULL; GList *l; GstElementFactory *factory = NULL; GType type; gint i = 0; gboolean reinspect; /* get a list of features from plugins in our source module */ plugins = gst_registry_get_plugin_list (gst_registry_get ()); xmlstr = g_string_new (""); reinspect = !g_file_test ("scanobj-build.stamp", G_FILE_TEST_EXISTS); while (plugins) { GList *features; GstPlugin *plugin; const gchar *source; FILE *inspect = NULL; gchar *inspect_name; plugin = (GstPlugin *) (plugins->data); plugins = g_list_next (plugins); source = gst_plugin_get_source (plugin); if (!source || strcmp (source, "$SOURCE") != 0) { continue; } /* skip static coreelements plugin with pipeline and bin element factory */ if (gst_plugin_get_filename (plugin) == NULL) continue; $debug_log ("plugin: %s source: %s", gst_plugin_get_name (plugin), source); if (reinspect) { gchar *basename; inspect_name = g_strdup_printf ("$INSPECT_DIR" G_DIR_SEPARATOR_S "plugin-%s.xml", gst_plugin_get_name (plugin)); inspect = fopen (inspect_name, "w"); if (inspect == NULL) { g_error ("Could not open %s for writing: %s\\n", inspect_name, g_strerror (errno)); } g_free (inspect_name); basename = g_path_get_basename (gst_plugin_get_filename (plugin)); /* output plugin data */ fputs ("\\n",inspect); fputs (xmlprint(2, "name", gst_plugin_get_name (plugin)),inspect); fputs (xmlprint(2, "description", gst_plugin_get_description (plugin)),inspect); fputs (xmlprint(2, "filename", gst_plugin_get_filename (plugin)),inspect); fputs (xmlprint(2, "basename", basename),inspect); fputs (xmlprint(2, "version", gst_plugin_get_version (plugin)),inspect); fputs (xmlprint(2, "license", gst_plugin_get_license (plugin)),inspect); fputs (xmlprint(2, "source", gst_plugin_get_source (plugin)),inspect); fputs (xmlprint(2, "package", gst_plugin_get_package (plugin)),inspect); fputs (xmlprint(2, "origin", gst_plugin_get_origin (plugin)),inspect); fputs (" \\n", inspect); g_free (basename); } features = gst_registry_get_feature_list_by_plugin (gst_registry_get (), gst_plugin_get_name (plugin)); /* sort factories by feature->name */ features = g_list_sort (features, gst_feature_sort_compare); while (features) { GstPluginFeature *feature; feature = GST_PLUGIN_FEATURE (features->data); feature = gst_plugin_feature_load (feature); if (!feature) { g_warning ("Could not load plugin feature %s", gst_plugin_feature_get_name (feature)); } if (GST_IS_ELEMENT_FACTORY (feature)) { const gchar *pad_dir[] = { "unknown","source","sink" }; const gchar *pad_pres[] = { "always","sometimes","request" }; GList *pads, *pad; $debug_log (" feature: %s", gst_plugin_feature_get_name (feature)); factory = GST_ELEMENT_FACTORY (feature); factories = g_list_prepend (factories, factory); if (reinspect) { /* output element data */ fputs (" \\n", inspect); fputs (xmlprint(6, "name", gst_plugin_feature_get_name (feature)),inspect); fputs (xmlprint(6, "longname", gst_element_factory_get_longname (factory)),inspect); fputs (xmlprint(6, "class", gst_element_factory_get_klass (factory)),inspect); fputs (xmlprint(6, "description", gst_element_factory_get_description (factory)),inspect); fputs (xmlprint(6, "author", gst_element_factory_get_author (factory)),inspect); fputs (" \\n", inspect); /* output pad-template data */ pads = g_list_copy ((GList *) gst_element_factory_get_static_pad_templates (factory)); pads = g_list_sort (pads, static_pad_template_compare); for (pad = pads; pad != NULL; pad = pad->next) { GstStaticPadTemplate *pt = pad->data; fputs (" \\n", inspect); fputs (xmlprint(10, "name", pt->name_template),inspect); fputs (xmlprint(10, "direction", pad_dir[pt->direction]),inspect); fputs (xmlprint(10, "presence", pad_pres[pt->presence]),inspect); fputs (xmlprint(10, "details", pt->static_caps.string),inspect); fputs (" \\n", inspect); } g_list_free (pads); fputs (" \\n \\n", inspect); } } features = g_list_next (features); } if (reinspect) { fputs (" \\n", inspect); fclose (inspect); } } g_string_free (xmlstr, TRUE); $debug_log ("number of element factories: %d", g_list_length (factories)); /* allocate the object_types array to hold them */ object_types = g_new0 (GType, g_list_length (factories)+$ntypes+1); l = factories; i = 0; /* fill it */ while (l) { factory = GST_ELEMENT_FACTORY (l->data); type = gst_element_factory_get_element_type (factory); if (type != 0) { $debug_log ("adding type for factory %s", gst_element_factory_get_longname (factory)); object_types[i++] = type; } else { g_message ("type info for factory %s not found", gst_element_factory_get_longname (factory)); } l = g_list_next (l); } EOT # get_type functions: for (@types) { print OUTPUT < uppercase with '_' * GFileMonitor -> file_monitor * GIOExtensionPoint -> extension_point * GtkTreeView -> tree_view * if 2nd char is upper case too * search for first lower case and go back one char * else * search for next upper case */ if (!strncmp (object_name, "Gtk", 3)) object_arg = object_name + 3; else if (!strncmp (object_name, "Gnome", 5)) object_arg = object_name + 5; else object_arg = object_name; object_arg_lower = g_ascii_strdown (object_arg, -1); sprintf (pos, "*%s\\n", object_arg_lower); pos += strlen (pos); if (!strncmp (object_arg_lower, "widget", 6)) widget_num = 2; g_free(object_arg_lower); /* Convert signal name to use underscores rather than dashes '-'. */ strncpy (signal_name, query_info.signal_name, 127); signal_name[127] = '\\0'; for (i = 0; signal_name[i]; i++) { if (signal_name[i] == '-') signal_name[i] = '_'; } /* Output the signal parameters. */ for (param = 0; param < query_info.n_params; param++) { type_name = get_type_name (query_info.param_types[param] & ~G_SIGNAL_TYPE_STATIC_SCOPE, &is_pointer); /* Most arguments to the callback are called "arg1", "arg2", etc. GtkWidgets are called "widget", "widget2", ... GtkCallbacks are called "callback", "callback2", ... */ if (!strcmp (type_name, "GtkWidget")) { arg_name = "widget"; arg_num = &widget_num; } else if (!strcmp (type_name, "GtkCallback") || !strcmp (type_name, "GtkCCallback")) { arg_name = "callback"; arg_num = &callback_num; } else { arg_name = "arg"; arg_num = ¶m_num; } sprintf (pos, "%s ", type_name); pos += strlen (pos); if (!arg_num || *arg_num == 0) sprintf (pos, "%s%s\\n", is_pointer ? "*" : " ", arg_name); else sprintf (pos, "%s%s%i\\n", is_pointer ? "*" : " ", arg_name, *arg_num); pos += strlen (pos); if (arg_num) { if (*arg_num == 0) *arg_num = 2; else *arg_num += 1; } } pos = flags; /* We use one-character flags for simplicity. */ if (query_info.signal_flags & G_SIGNAL_RUN_FIRST) *pos++ = 'f'; if (query_info.signal_flags & G_SIGNAL_RUN_LAST) *pos++ = 'l'; if (query_info.signal_flags & G_SIGNAL_RUN_CLEANUP) *pos++ = 'c'; if (query_info.signal_flags & G_SIGNAL_NO_RECURSE) *pos++ = 'r'; if (query_info.signal_flags & G_SIGNAL_DETAILED) *pos++ = 'd'; if (query_info.signal_flags & G_SIGNAL_ACTION) *pos++ = 'a'; if (query_info.signal_flags & G_SIGNAL_NO_HOOKS) *pos++ = 'h'; *pos = 0; /* Output the return type and function name. */ ret_type = get_type_name (query_info.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE, &is_pointer); fprintf (fp, "\\n%s::%s\\n%s%s\\n%s\\n%s\\n\\n", object_name, query_info.signal_name, ret_type, is_pointer ? "*" : "", flags, buffer); } /* Returns the type name to use for a signal argument or return value, given the GtkType from the signal info. It also sets is_pointer to TRUE if the argument needs a '*' since it is a pointer. */ static const gchar * get_type_name (GType type, gboolean * is_pointer) { const gchar *type_name; *is_pointer = FALSE; type_name = g_type_name (type); switch (type) { case G_TYPE_NONE: case G_TYPE_CHAR: case G_TYPE_UCHAR: case G_TYPE_BOOLEAN: case G_TYPE_INT: case G_TYPE_UINT: case G_TYPE_LONG: case G_TYPE_ULONG: case G_TYPE_FLOAT: case G_TYPE_DOUBLE: case G_TYPE_POINTER: /* These all have normal C type names so they are OK. */ return type_name; case G_TYPE_STRING: /* A GtkString is really a gchar*. */ *is_pointer = TRUE; return "gchar"; case G_TYPE_ENUM: case G_TYPE_FLAGS: /* We use a gint for both of these. Hopefully a subtype with a decent name will be registered and used instead, as GTK+ does itself. */ return "gint"; case G_TYPE_BOXED: /* The boxed type shouldn't be used itself, only subtypes. Though we return 'gpointer' just in case. */ return "gpointer"; case G_TYPE_PARAM: /* A GParam is really a GParamSpec*. */ *is_pointer = TRUE; return "GParamSpec"; #if GLIB_CHECK_VERSION (2, 25, 9) case G_TYPE_VARIANT: *is_pointer = TRUE; return "GVariant"; #endif default: break; } /* For all GObject subclasses we can use the class name with a "*", e.g. 'GtkWidget *'. */ if (g_type_is_a (type, G_TYPE_OBJECT)) *is_pointer = TRUE; /* Also catch non GObject root types */ if (G_TYPE_IS_CLASSED (type)) *is_pointer = TRUE; /* All boxed subtypes will be pointers as well. */ /* Exception: GStrv */ if (g_type_is_a (type, G_TYPE_BOXED) && !g_type_is_a (type, G_TYPE_STRV)) *is_pointer = TRUE; /* All pointer subtypes will be pointers as well. */ if (g_type_is_a (type, G_TYPE_POINTER)) *is_pointer = TRUE; /* But enums are not */ if (g_type_is_a (type, G_TYPE_ENUM) || g_type_is_a (type, G_TYPE_FLAGS)) *is_pointer = FALSE; return type_name; } /* This outputs the hierarchy of all objects which have been initialized, i.e. by calling their XXX_get_type() initialization function. */ static void output_object_hierarchy (void) { FILE *fp; gint i,j; GType root, type; GType root_types[$ntypes] = { G_TYPE_INVALID, }; fp = fopen (hierarchy_filename, "w"); if (fp == NULL) { g_warning ("Couldn't open output file: %s : %s", hierarchy_filename, g_strerror(errno)); return; } output_hierarchy (fp, G_TYPE_OBJECT, 0); output_hierarchy (fp, G_TYPE_INTERFACE, 0); for (i=0; object_types[i]; i++) { root = object_types[i]; while ((type = g_type_parent (root))) { root = type; } if ((root != G_TYPE_OBJECT) && (root != G_TYPE_INTERFACE)) { for (j=0; root_types[j]; j++) { if (root == root_types[j]) { root = G_TYPE_INVALID; break; } } if(root) { root_types[j] = root; output_hierarchy (fp, root, 0); } } } fclose (fp); } static int compare_types (const void *a, const void *b) { const char *na = g_type_name (*((GType *)a)); const char *nb = g_type_name (*((GType *)b)); return g_strcmp0 (na, nb); } /* This is called recursively to output the hierarchy of a object. */ static void output_hierarchy (FILE *fp, GType type, guint level) { guint i; GType *children; guint n_children; if (!type) return; for (i = 0; i < level; i++) fprintf (fp, " "); fprintf (fp, "%s\\n", g_type_name (type)); children = g_type_children (type, &n_children); qsort (children, n_children, sizeof (GType), compare_types); for (i=0; i < n_children; i++) output_hierarchy (fp, children[i], level + 1); g_free (children); } static void output_object_interfaces (void) { guint i; FILE *fp; fp = fopen (interfaces_filename, "w"); if (fp == NULL) { g_warning ("Couldn't open output file: %s : %s", interfaces_filename, g_strerror(errno)); return; } output_interfaces (fp, G_TYPE_OBJECT); for (i = 0; object_types[i]; i++) { if (!g_type_parent (object_types[i]) && (object_types[i] != G_TYPE_OBJECT) && G_TYPE_IS_INSTANTIATABLE (object_types[i])) { output_interfaces (fp, object_types[i]); } } fclose (fp); } static void output_interfaces (FILE *fp, GType type) { guint i; GType *children, *interfaces; guint n_children, n_interfaces; if (!type) return; interfaces = g_type_interfaces (type, &n_interfaces); if (n_interfaces > 0) { fprintf (fp, "%s", g_type_name (type)); for (i=0; i < n_interfaces; i++) fprintf (fp, " %s", g_type_name (interfaces[i])); fprintf (fp, "\\n"); } g_free (interfaces); children = g_type_children (type, &n_children); for (i=0; i < n_children; i++) output_interfaces (fp, children[i]); g_free (children); } static void output_interface_prerequisites (void) { FILE *fp; fp = fopen (prerequisites_filename, "w"); if (fp == NULL) { g_warning ("Couldn't open output file: %s : %s", prerequisites_filename, g_strerror(errno)); return; } output_prerequisites (fp, G_TYPE_INTERFACE); fclose (fp); } static void output_prerequisites (FILE *fp, GType type) { #if GLIB_CHECK_VERSION(2,1,0) guint i; GType *children, *prerequisites; guint n_children, n_prerequisites; if (!type) return; prerequisites = g_type_interface_prerequisites (type, &n_prerequisites); if (n_prerequisites > 0) { fprintf (fp, "%s", g_type_name (type)); for (i=0; i < n_prerequisites; i++) fprintf (fp, " %s", g_type_name (prerequisites[i])); fprintf (fp, "\\n"); } g_free (prerequisites); children = g_type_children (type, &n_children); for (i=0; i < n_children; i++) output_prerequisites (fp, children[i]); g_free (children); #endif } static void output_args (void) { FILE *fp; gint i; fp = fopen (args_filename, "w"); if (fp == NULL) { g_warning ("Couldn't open output file: %s : %s", args_filename, g_strerror(errno)); return; } for (i = 0; object_types[i]; i++) { output_object_args (fp, object_types[i]); } fclose (fp); } static gint compare_param_specs (const void *a, const void *b) { GParamSpec *spec_a = *(GParamSpec **)a; GParamSpec *spec_b = *(GParamSpec **)b; return strcmp (g_param_spec_get_name (spec_a), g_param_spec_get_name (spec_b)); } /* Its common to have unsigned properties restricted * to the signed range. Therefore we make this look * a bit nicer by spelling out the max constants. */ /* Don't use "==" with floats, it might trigger a gcc warning. */ #define GTKDOC_COMPARE_FLOAT(x, y) (x <= y && x >= y) static gchar* describe_double_constant (gdouble value) { gchar *desc; if (GTKDOC_COMPARE_FLOAT (value, G_MAXDOUBLE)) desc = g_strdup ("G_MAXDOUBLE"); else if (GTKDOC_COMPARE_FLOAT (value, G_MINDOUBLE)) desc = g_strdup ("G_MINDOUBLE"); else if (GTKDOC_COMPARE_FLOAT (value, -G_MAXDOUBLE)) desc = g_strdup ("-G_MAXDOUBLE"); else if (GTKDOC_COMPARE_FLOAT (value, G_MAXFLOAT)) desc = g_strdup ("G_MAXFLOAT"); else if (GTKDOC_COMPARE_FLOAT (value, G_MINFLOAT)) desc = g_strdup ("G_MINFLOAT"); else if (GTKDOC_COMPARE_FLOAT (value, -G_MAXFLOAT)) desc = g_strdup ("-G_MAXFLOAT"); else{ /* make sure floats are output with a decimal dot irrespective of * current locale. Use formatd since we want human-readable numbers * and do not need the exact same bit representation when deserialising */ desc = g_malloc0 (G_ASCII_DTOSTR_BUF_SIZE); g_ascii_formatd (desc, G_ASCII_DTOSTR_BUF_SIZE, "%g", value); } return desc; } static gchar* describe_signed_constant (gsize size, gint64 value) { gchar *desc = NULL; switch (size) { case 8: if (value == G_MAXINT64) desc = g_strdup ("G_MAXINT64"); else if (value == G_MININT64) desc = g_strdup ("G_MININT64"); /* fall through */ case 4: if (sizeof (int) == 4) { if (value == G_MAXINT) desc = g_strdup ("G_MAXINT"); else if (value == G_MININT) desc = g_strdup ("G_MININT"); else if (value == (gint64)G_MAXUINT) desc = g_strdup ("G_MAXUINT"); } if (value == G_MAXLONG) desc = g_strdup ("G_MAXLONG"); else if (value == G_MINLONG) desc = g_strdup ("G_MINLONG"); else if (value == (gint64)G_MAXULONG) desc = g_strdup ("G_MAXULONG"); /* fall through */ case 2: if (sizeof (int) == 2) { if (value == G_MAXINT) desc = g_strdup ("G_MAXINT"); else if (value == G_MININT) desc = g_strdup ("G_MININT"); else if (value == (gint64)G_MAXUINT) desc = g_strdup ("G_MAXUINT"); } break; default: break; } if (!desc) desc = g_strdup_printf ("%" G_GINT64_FORMAT, value); return desc; } static gchar* describe_unsigned_constant (gsize size, guint64 value) { gchar *desc = NULL; switch (size) { case 8: if (value == G_MAXINT64) desc = g_strdup ("G_MAXINT64"); else if (value == G_MAXUINT64) desc = g_strdup ("G_MAXUINT64"); /* fall through */ case 4: if (sizeof (int) == 4) { if (value == (guint64)G_MAXINT) desc = g_strdup ("G_MAXINT"); else if (value == G_MAXUINT) desc = g_strdup ("G_MAXUINT"); } if (value == (guint64)G_MAXLONG) desc = g_strdup ("G_MAXLONG"); else if (value == G_MAXULONG) desc = g_strdup ("G_MAXULONG"); /* fall through */ case 2: if (sizeof (int) == 2) { if (value == (guint64)G_MAXINT) desc = g_strdup ("G_MAXINT"); else if (value == G_MAXUINT) desc = g_strdup ("G_MAXUINT"); } break; default: break; } if (!desc) desc = g_strdup_printf ("%" G_GUINT64_FORMAT, value); return desc; } static gchar* describe_type (GParamSpec *spec) { gchar *desc; gchar *lower; gchar *upper; if (G_IS_PARAM_SPEC_CHAR (spec)) { GParamSpecChar *pspec = G_PARAM_SPEC_CHAR (spec); lower = describe_signed_constant (sizeof(gchar), pspec->minimum); upper = describe_signed_constant (sizeof(gchar), pspec->maximum); if (pspec->minimum == G_MININT8 && pspec->maximum == G_MAXINT8) desc = g_strdup (""); else if (pspec->minimum == G_MININT8) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXINT8) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_UCHAR (spec)) { GParamSpecUChar *pspec = G_PARAM_SPEC_UCHAR (spec); lower = describe_unsigned_constant (sizeof(guchar), pspec->minimum); upper = describe_unsigned_constant (sizeof(guchar), pspec->maximum); if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT8) desc = g_strdup (""); else if (pspec->minimum == 0) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXUINT8) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_INT (spec)) { GParamSpecInt *pspec = G_PARAM_SPEC_INT (spec); lower = describe_signed_constant (sizeof(gint), pspec->minimum); upper = describe_signed_constant (sizeof(gint), pspec->maximum); if (pspec->minimum == G_MININT && pspec->maximum == G_MAXINT) desc = g_strdup (""); else if (pspec->minimum == G_MININT) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXINT) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_UINT (spec)) { GParamSpecUInt *pspec = G_PARAM_SPEC_UINT (spec); lower = describe_unsigned_constant (sizeof(guint), pspec->minimum); upper = describe_unsigned_constant (sizeof(guint), pspec->maximum); if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT) desc = g_strdup (""); else if (pspec->minimum == 0) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXUINT) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_LONG (spec)) { GParamSpecLong *pspec = G_PARAM_SPEC_LONG (spec); lower = describe_signed_constant (sizeof(glong), pspec->minimum); upper = describe_signed_constant (sizeof(glong), pspec->maximum); if (pspec->minimum == G_MINLONG && pspec->maximum == G_MAXLONG) desc = g_strdup (""); else if (pspec->minimum == G_MINLONG) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXLONG) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_ULONG (spec)) { GParamSpecULong *pspec = G_PARAM_SPEC_ULONG (spec); lower = describe_unsigned_constant (sizeof(gulong), pspec->minimum); upper = describe_unsigned_constant (sizeof(gulong), pspec->maximum); if (pspec->minimum == 0 && pspec->maximum == G_MAXULONG) desc = g_strdup (""); else if (pspec->minimum == 0) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXULONG) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_INT64 (spec)) { GParamSpecInt64 *pspec = G_PARAM_SPEC_INT64 (spec); lower = describe_signed_constant (sizeof(gint64), pspec->minimum); upper = describe_signed_constant (sizeof(gint64), pspec->maximum); if (pspec->minimum == G_MININT64 && pspec->maximum == G_MAXINT64) desc = g_strdup (""); else if (pspec->minimum == G_MININT64) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXINT64) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_UINT64 (spec)) { GParamSpecUInt64 *pspec = G_PARAM_SPEC_UINT64 (spec); lower = describe_unsigned_constant (sizeof(guint64), pspec->minimum); upper = describe_unsigned_constant (sizeof(guint64), pspec->maximum); if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT64) desc = g_strdup (""); else if (pspec->minimum == 0) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXUINT64) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_FLOAT (spec)) { GParamSpecFloat *pspec = G_PARAM_SPEC_FLOAT (spec); lower = describe_double_constant (pspec->minimum); upper = describe_double_constant (pspec->maximum); if (GTKDOC_COMPARE_FLOAT (pspec->minimum, -G_MAXFLOAT)) { if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXFLOAT)) desc = g_strdup (""); else desc = g_strdup_printf ("<= %s", upper); } else if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXFLOAT)) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_DOUBLE (spec)) { GParamSpecDouble *pspec = G_PARAM_SPEC_DOUBLE (spec); lower = describe_double_constant (pspec->minimum); upper = describe_double_constant (pspec->maximum); if (GTKDOC_COMPARE_FLOAT (pspec->minimum, -G_MAXDOUBLE)) { if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXDOUBLE)) desc = g_strdup (""); else desc = g_strdup_printf ("<= %s", upper); } else if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXDOUBLE)) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } #if GLIB_CHECK_VERSION (2, 12, 0) else if (G_IS_PARAM_SPEC_GTYPE (spec)) { GParamSpecGType *pspec = G_PARAM_SPEC_GTYPE (spec); gboolean is_pointer; desc = g_strdup (get_type_name (pspec->is_a_type, &is_pointer)); } #endif #if GLIB_CHECK_VERSION (2, 25, 9) else if (G_IS_PARAM_SPEC_VARIANT (spec)) { GParamSpecVariant *pspec = G_PARAM_SPEC_VARIANT (spec); gchar *variant_type; variant_type = g_variant_type_dup_string (pspec->type); desc = g_strdup_printf ("GVariant<%s>", variant_type); g_free (variant_type); } #endif else { desc = g_strdup (""); } return desc; } static gchar* describe_default (GParamSpec *spec) { gchar *desc; if (G_IS_PARAM_SPEC_CHAR (spec)) { GParamSpecChar *pspec = G_PARAM_SPEC_CHAR (spec); desc = g_strdup_printf ("%d", pspec->default_value); } else if (G_IS_PARAM_SPEC_UCHAR (spec)) { GParamSpecUChar *pspec = G_PARAM_SPEC_UCHAR (spec); desc = g_strdup_printf ("%u", pspec->default_value); } else if (G_IS_PARAM_SPEC_BOOLEAN (spec)) { GParamSpecBoolean *pspec = G_PARAM_SPEC_BOOLEAN (spec); desc = g_strdup_printf ("%s", pspec->default_value ? "TRUE" : "FALSE"); } else if (G_IS_PARAM_SPEC_INT (spec)) { GParamSpecInt *pspec = G_PARAM_SPEC_INT (spec); desc = g_strdup_printf ("%d", pspec->default_value); } else if (G_IS_PARAM_SPEC_UINT (spec)) { GParamSpecUInt *pspec = G_PARAM_SPEC_UINT (spec); desc = g_strdup_printf ("%u", pspec->default_value); } else if (G_IS_PARAM_SPEC_LONG (spec)) { GParamSpecLong *pspec = G_PARAM_SPEC_LONG (spec); desc = g_strdup_printf ("%ld", pspec->default_value); } else if (G_IS_PARAM_SPEC_LONG (spec)) { GParamSpecULong *pspec = G_PARAM_SPEC_ULONG (spec); desc = g_strdup_printf ("%lu", pspec->default_value); } else if (G_IS_PARAM_SPEC_INT64 (spec)) { GParamSpecInt64 *pspec = G_PARAM_SPEC_INT64 (spec); desc = g_strdup_printf ("%" G_GINT64_FORMAT, pspec->default_value); } else if (G_IS_PARAM_SPEC_UINT64 (spec)) { GParamSpecUInt64 *pspec = G_PARAM_SPEC_UINT64 (spec); desc = g_strdup_printf ("%" G_GUINT64_FORMAT, pspec->default_value); } else if (G_IS_PARAM_SPEC_UNICHAR (spec)) { GParamSpecUnichar *pspec = G_PARAM_SPEC_UNICHAR (spec); if (g_unichar_isprint (pspec->default_value)) desc = g_strdup_printf ("'%c'", pspec->default_value); else desc = g_strdup_printf ("%u", pspec->default_value); } else if (G_IS_PARAM_SPEC_ENUM (spec)) { GParamSpecEnum *pspec = G_PARAM_SPEC_ENUM (spec); GEnumValue *value = g_enum_get_value (pspec->enum_class, pspec->default_value); if (value) desc = g_strdup_printf ("%s", value->value_name); else desc = g_strdup_printf ("%d", pspec->default_value); } else if (G_IS_PARAM_SPEC_FLAGS (spec)) { GParamSpecFlags *pspec = G_PARAM_SPEC_FLAGS (spec); guint default_value; GString *acc; default_value = pspec->default_value; acc = g_string_new (""); while (default_value) { GFlagsValue *value = g_flags_get_first_value (pspec->flags_class, default_value); if (!value) break; if (acc->len > 0) g_string_append (acc, "|"); g_string_append (acc, value->value_name); default_value &= ~value->value; } if (default_value == 0) desc = g_string_free (acc, FALSE); else { desc = g_strdup_printf ("%d", pspec->default_value); g_string_free (acc, TRUE); } } else if (G_IS_PARAM_SPEC_FLOAT (spec)) { GParamSpecFloat *pspec = G_PARAM_SPEC_FLOAT (spec); /* make sure floats are output with a decimal dot irrespective of * current locale. Use formatd since we want human-readable numbers * and do not need the exact same bit representation when deserialising */ desc = g_malloc0 (G_ASCII_DTOSTR_BUF_SIZE); g_ascii_formatd (desc, G_ASCII_DTOSTR_BUF_SIZE, "%g", pspec->default_value); } else if (G_IS_PARAM_SPEC_DOUBLE (spec)) { GParamSpecDouble *pspec = G_PARAM_SPEC_DOUBLE (spec); /* make sure floats are output with a decimal dot irrespective of * current locale. Use formatd since we want human-readable numbers * and do not need the exact same bit representation when deserialising */ desc = g_malloc0 (G_ASCII_DTOSTR_BUF_SIZE); g_ascii_formatd (desc, G_ASCII_DTOSTR_BUF_SIZE, "%g", pspec->default_value); } else if (G_IS_PARAM_SPEC_STRING (spec)) { GParamSpecString *pspec = G_PARAM_SPEC_STRING (spec); if (pspec->default_value) { gchar *esc = g_strescape (pspec->default_value, NULL); desc = g_strdup_printf ("\\"%s\\"", esc); g_free (esc); } else desc = g_strdup_printf ("NULL"); } else { desc = g_strdup (""); } return desc; } static void output_object_args (FILE *fp, GType object_type) { gpointer class; const gchar *object_class_name; guint arg; gchar flags[16], *pos; GParamSpec **properties; guint n_properties; gboolean child_prop; gboolean style_prop; gboolean is_pointer; const gchar *type_name; gchar *type_desc; gchar *default_value; if (G_TYPE_IS_OBJECT (object_type)) { class = g_type_class_peek (object_type); if (!class) return; properties = g_object_class_list_properties (class, &n_properties); } #if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 3) else if (G_TYPE_IS_INTERFACE (object_type)) { class = g_type_default_interface_ref (object_type); if (!class) return; properties = g_object_interface_list_properties (class, &n_properties); } #endif else return; object_class_name = g_type_name (object_type); child_prop = FALSE; style_prop = FALSE; while (TRUE) { qsort (properties, n_properties, sizeof (GParamSpec *), compare_param_specs); for (arg = 0; arg < n_properties; arg++) { GParamSpec *spec = properties[arg]; const gchar *nick, *blurb, *dot; if (spec->owner_type != object_type) continue; pos = flags; /* We use one-character flags for simplicity. */ if (child_prop && !style_prop) *pos++ = 'c'; if (style_prop) *pos++ = 's'; if (spec->flags & G_PARAM_READABLE) *pos++ = 'r'; if (spec->flags & G_PARAM_WRITABLE) *pos++ = 'w'; if (spec->flags & G_PARAM_CONSTRUCT) *pos++ = 'x'; if (spec->flags & G_PARAM_CONSTRUCT_ONLY) *pos++ = 'X'; *pos = 0; nick = g_param_spec_get_nick (spec); blurb = g_param_spec_get_blurb (spec); dot = ""; if (blurb) { int str_len = strlen (blurb); if (str_len > 0 && blurb[str_len - 1] != '.') dot = "."; } type_desc = describe_type (spec); default_value = describe_default (spec); type_name = get_type_name (spec->value_type, &is_pointer); fprintf (fp, "\\n%s::%s\\n%s%s\\n%s\\n%s\\n%s\\n%s%s\\n%s\\n\\n\\n", object_class_name, g_param_spec_get_name (spec), type_name, is_pointer ? "*" : "", type_desc, flags, nick ? nick : "(null)", blurb ? blurb : "(null)", dot, default_value); g_free (type_desc); g_free (default_value); } g_free (properties); #ifdef GTK_IS_CONTAINER_CLASS if (!child_prop && GTK_IS_CONTAINER_CLASS (class)) { properties = gtk_container_class_list_child_properties (class, &n_properties); child_prop = TRUE; continue; } #endif #ifdef GTK_IS_CELL_AREA_CLASS if (!child_prop && GTK_IS_CELL_AREA_CLASS (class)) { properties = gtk_cell_area_class_list_cell_properties (class, &n_properties); child_prop = TRUE; continue; } #endif #ifdef GTK_IS_WIDGET_CLASS #if GTK_CHECK_VERSION(2,1,0) if (!style_prop && GTK_IS_WIDGET_CLASS (class)) { properties = gtk_widget_class_list_style_properties (GTK_WIDGET_CLASS (class), &n_properties); style_prop = TRUE; continue; } #endif #endif break; } } EOT close OUTPUT; # Compile and run our file $CC = $ENV{CC} ? $ENV{CC} : "gcc"; $LD = $ENV{LD} ? $ENV{LD} : $CC; $CFLAGS = $ENV{CFLAGS} ? "$ENV{CFLAGS}" : ""; $LDFLAGS = $ENV{LDFLAGS} ? $ENV{LDFLAGS} : ""; my $o_file; if ($CC =~ /libtool/) { $o_file = "$MODULE-scan.lo" } else { $o_file = "$MODULE-scan.o" } my $stdout=""; if (!defined($VERBOSE) or $VERBOSE eq "0") { $stdout=">/dev/null"; } # Compiling scanner $command = "$CC $stdout $CFLAGS -c -o $o_file $MODULE-scan.c"; system("($command)") == 0 or die "Compilation of scanner failed: $!\n"; # Linking scanner $command = "$LD $stdout -o $MODULE-scan $o_file $LDFLAGS"; system($command) == 0 or die "Linking of scanner failed: $!\n"; # Running scanner $MODULE-scan "; system("sh -c ./$MODULE-scan") == 0 or die "Scan failed: $!\n"; if (!defined($ENV{"GTK_DOC_KEEP_INTERMEDIATE"})) { unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan"; } &UpdateFileIfChanged ($old_hierarchy_filename, $new_hierarchy_filename, 0); # we will merge these in scangobj-merge.py #&UpdateFileIfChanged ($old_interfaces_filename, $new_interfaces_filename, 0); #&UpdateFileIfChanged ($old_prerequisites_filename, $new_prerequisites_filename, 0); #&UpdateFileIfChanged ($old_signals_filename, $new_signals_filename, 0); #&UpdateFileIfChanged ($old_args_filename, $new_args_filename, 0); farstream-0.2.7/common/plugins.xsl0000664000076400007640000001774111710041611014142 00000000000000 -plugins- Element Information plugin plugin- author class Element Pads name direction presence details -plugins-plugin- 3 FIXME Library plugin- Plugin Information filename version run-time license package origin Elements farstream-0.2.7/common/mangle-tmpl.py0000664000076400007640000001162411710557061014525 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 """ use the output from gst-xmlinspect.py to mangle tmpl/*.sgml and insert/overwrite Short Description and Long Description """ # FIXME: right now it uses pygst and scans on its own; # we really should use inspect/*.xml instead since the result of # gst-xmlinspect.py is committed by the docs maintainer, who can be # expected to have pygst, but this step should be done for every docs build, # so no pygst allowed # read in inspect/*.xml # for every tmpl/element-(name).xml: mangle with details from element import glob import re import sys import os class Tmpl: def __init__(self, filename): self.filename = filename self._sectionids = [] self._sections = {} def read(self): """ Read and parse the sections from the given file. """ lines = open(self.filename).readlines() matcher = re.compile("\n") id = None for line in lines: match = matcher.search(line) if match: id = match.expand("\\1") self._sectionids.append(id) self._sections[id] = [] else: if not id: sys.stderr.write( "WARNING: line before a SECTION header: %s" % line) else: self._sections[id].append(line) def get_section(self, id): """ Get the content from the given section. """ return self._sections[id] def set_section(self, id, content): """ Replace the given section id with the given content. """ self._sections[id] = content def output(self): """ Return the output of the current template in the tmpl/*.sgml format. """ lines = [] for id in self._sectionids: lines.append("\n" % id) for line in self._sections[id]: lines.append(line) return "".join(lines) def write(self, backup=False): """ Write out the template file again, backing up the previous one. """ if backup: target = self.filename + ".mangle.bak" os.rename(self.filename, target) handle = open(self.filename, "w") handle.write(self.output()) handle.close() import xml.dom.minidom def get_elements(file): elements = {} doc = xml.dom.minidom.parse(file) elem = None for e in doc.childNodes: if e.nodeType == e.ELEMENT_NODE and e.localName == 'plugin': elem = e break if elem == None: return None elem2 = None for e in elem.childNodes: if e.nodeType == e.ELEMENT_NODE and e.localName == 'elements': elem2 = e break if elem2 == None: return None elem = elem2 for e in elem.childNodes: if e.nodeType == e.ELEMENT_NODE and e.localName == 'element': name = None description = None for e2 in e.childNodes: if e2.nodeType == e2.ELEMENT_NODE and e2.localName == 'name': name = e2.childNodes[0].nodeValue.encode("UTF-8") elif e2.nodeType == e2.ELEMENT_NODE and e2.localName == 'description': if e2.childNodes: description = e2.childNodes[0].nodeValue.encode("UTF-8") else: description = 'No description' if name != None and description != None: elements[name] = {'description': description} return elements def main(): if not len(sys.argv) == 3: sys.stderr.write('Please specify the inspect/ dir and the tmpl/ dir') sys.exit(1) inspectdir = sys.argv[1] tmpldir = sys.argv[2] # parse all .xml files; build map of element name -> short desc #for file in glob.glob("inspect/plugin-*.xml"): elements = {} for file in glob.glob("%s/plugin-*.xml" % inspectdir): elements.update(get_elements(file)) for file in glob.glob("%s/element-*.sgml" % tmpldir): base = os.path.basename(file) element = base[len("element-"):-len(".sgml")] tmpl = Tmpl(file) tmpl.read() if element in elements.keys(): description = elements[element]['description'] tmpl.set_section("Short_Description", "%s\n\n" % description) # put in an include if not yet there line = '' + \ '' + \ '\n' section = tmpl.get_section("Long_Description") if not section[0] == line: section.insert(0, line) tmpl.set_section("Long_Description", section) tmpl.write() main() farstream-0.2.7/common/check-exports0000775000076400007640000000214412406633262014441 00000000000000#!/bin/sh # check-exports # # quick'n'dirty script that retrieves the list of exported symbols of a given # library using 'nm', and compares that against the list of symbols-to-export # of our win32/common/libfoo.def files. if [ $# -ne 2 ]; then echo "Usage: $0 library.def library.so" exit 1 fi def_path="$1" def_name="$(basename $def_path)" lib_path="$2" lib_result="`mktemp /tmp/defname.XXXXXX`" LC_ALL=C export LC_ALL # On Solaris, add -p to get the correct output format NMARGS= if nm -V 2>&1 |grep Solaris > /dev/null; then NMARGS=-p fi # _end is special cased because for some reason it is reported as an exported # BSS symbol, unlike on linux where it's a local absolute symbol. nm $NMARGS $lib_path | awk \ '{ if ($3 ~ /^[_]?(gst_|Gst|GST_).*/) { if ($2 ~ /^[BSDG]$/) print "\t" $3 " DATA" else if ($2 == "T") print "\t" $3 } }' | sort | awk '{ if (NR == 1) print "EXPORTS"; print $0; }' \ > $lib_result diffoutput=`diff -u $def_path $lib_result` diffresult=$? rm $lib_result if test "$diffresult" -eq 0; then exit 0; else echo -n "$diffoutput" >&2 echo >&2 exit 1; fi farstream-0.2.7/common/m4/0000775000076400007640000000000012462323001012320 500000000000000farstream-0.2.7/common/m4/gst-error.m40000664000076400007640000002443112406633262014445 00000000000000dnl handle various error-related things dnl Thomas Vander Stichele dnl Tim-Philipp Müller dnl Last modification: 2008-02-18 dnl AG_GST_SET_ERROR_CFLAGS([ADD-WERROR], [MORE_FLAGS]) dnl AG_GST_SET_ERROR_CXXFLAGS([ADD-WERROR], [MORE_FLAGS]) dnl AG_GST_SET_LEVEL_DEFAULT([IS-GIT-VERSION]) dnl Sets WARNING_CFLAGS and ERROR_CFLAGS to something the compiler dnl will accept and AC_SUBST them so they are available in Makefile dnl dnl WARNING_CFLAGS will contain flags to make the compiler emit more dnl warnings. dnl ERROR_CFLAGS will contain flags to make those warnings fatal, dnl unless ADD-WERROR is set to "no" dnl dnl If MORE_FLAGS is set, tries to add each of the given flags dnl to WARNING_CFLAGS if the compiler supports them. Each flag is dnl tested separately. dnl dnl These flags can be overridden at make time: dnl make ERROR_CFLAGS= AC_DEFUN([AG_GST_SET_ERROR_CFLAGS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AS_COMPILER_FLAG]) WARNING_CFLAGS="" ERROR_CFLAGS="" dnl if we support -Wall, set it unconditionally AS_COMPILER_FLAG(-Wall, WARNING_CFLAGS="$WARNING_CFLAGS -Wall") dnl Warn if declarations after statements are used (C99 extension) AS_COMPILER_FLAG(-Wdeclaration-after-statement, WARNING_CFLAGS="$WARNING_CFLAGS -Wdeclaration-after-statement") dnl Warn if variable length arrays are used (C99 extension) AS_COMPILER_FLAG(-Wvla, WARNING_CFLAGS="$WARNING_CFLAGS -Wvla") dnl Warn for invalid pointer arithmetic AS_COMPILER_FLAG(-Wpointer-arith, WARNING_CFLAGS="$WARNING_CFLAGS -Wpointer-arith") dnl if asked for, add -Werror if supported if test "x$1" != "xno" then AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="$ERROR_CFLAGS -Werror") dnl if -Werror isn't suported, try -errwarn=%all (Sun Forte case) if test "x$ERROR_CFLAGS" = "x" then AS_COMPILER_FLAG([-errwarn=%all], [ ERROR_CFLAGS="-errwarn=%all" dnl try -errwarn=%all,no%E_EMPTY_DECLARATION, dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH, dnl no%E_MACRO_REDEFINED (Sun Forte case) dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon dnl "statement not reached" disabled because there is g_assert_not_reached () in some places dnl "macro redefined" because of gst/gettext.h dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'? for f in 'no%E_EMPTY_DECLARATION' \ 'no%E_STATEMENT_NOT_REACHED' \ 'no%E_ARGUEMENT_MISMATCH' \ 'no%E_MACRO_REDEFINED' \ 'no%E_LOOP_NOT_ENTERED_AT_TOP' do AS_COMPILER_FLAG([-errwarn=%all,$f], [ ERROR_CFLAGS="$ERROR_CFLAGS,$f" ]) done ]) else dnl Add -fno-strict-aliasing for GLib versions before 2.19.8 dnl as before G_LOCK and friends caused strict aliasing compiler dnl warnings. PKG_CHECK_EXISTS([glib-2.0 < 2.19.8], [ AS_COMPILER_FLAG(-fno-strict-aliasing, ERROR_CFLAGS="$ERROR_CFLAGS -fno-strict-aliasing") ]) fi fi if test "x$2" != "x" then UNSUPPORTED="" list="$2" for each in $list do AS_COMPILER_FLAG($each, WARNING_CFLAGS="$WARNING_CFLAGS $each", UNSUPPORTED="$UNSUPPORTED $each") done if test "X$UNSUPPORTED" != X ; then AC_MSG_NOTICE([unsupported compiler flags: $UNSUPPORTED]) fi fi AC_SUBST(WARNING_CFLAGS) AC_SUBST(ERROR_CFLAGS) AC_MSG_NOTICE([set WARNING_CFLAGS to $WARNING_CFLAGS]) AC_MSG_NOTICE([set ERROR_CFLAGS to $ERROR_CFLAGS]) ]) dnl Sets WARNING_CXXFLAGS and ERROR_CXXFLAGS to something the compiler dnl will accept and AC_SUBST them so they are available in Makefile dnl dnl WARNING_CXXFLAGS will contain flags to make the compiler emit more dnl warnings. dnl ERROR_CXXFLAGS will contain flags to make those warnings fatal, dnl unless ADD-WERROR is set to "no" dnl dnl If MORE_FLAGS is set, tries to add each of the given flags dnl to WARNING_CFLAGS if the compiler supports them. Each flag is dnl tested separately. dnl dnl These flags can be overridden at make time: dnl make ERROR_CXXFLAGS= AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS], [ AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AS_CXX_COMPILER_FLAG]) ERROR_CXXFLAGS="" WARNING_CXXFLAGS="" dnl if we support -Wall, set it unconditionally AS_CXX_COMPILER_FLAG(-Wall, WARNING_CXXFLAGS="$WARNING_CXXFLAGS -Wall") dnl if asked for, add -Werror if supported if test "x$1" != "xno" then AS_CXX_COMPILER_FLAG(-Werror, ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror") if test "x$ERROR_CXXFLAGS" != "x" then dnl add exceptions AS_CXX_COMPILER_FLAG([-Wno-non-virtual-dtor], ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Wno-non-virtual-dtor") dnl Add -fno-strict-aliasing for GLib versions before 2.19.8 dnl as before G_LOCK and friends caused strict aliasing compiler dnl warnings. PKG_CHECK_EXISTS([glib-2.0 < 2.19.8], [ AS_CXX_COMPILER_FLAG([-fno-strict-aliasing], ERROR_CXXFLAGS="$ERROR_CXXFLAGS -fno-strict-aliasing") ]) else dnl if -Werror isn't suported, try -errwarn=%all AS_CXX_COMPILER_FLAG([-errwarn=%all], ERROR_CXXFLAGS="$ERROR_CXXFLAGS -errwarn=%all") if test "x$ERROR_CXXFLAGS" != "x"; then dnl try -errwarn=%all,no%E_EMPTY_DECLARATION, dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH, dnl no%E_MACRO_REDEFINED (Sun Forte case) dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon dnl "statement not reached" disabled because there is g_assert_not_reached () in some places dnl "macro redefined" because of gst/gettext.h dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'? dnl FIXME: do any of these work with the c++ compiler? if not, why dnl do we check at all? for f in 'no%E_EMPTY_DECLARATION' \ 'no%E_STATEMENT_NOT_REACHED' \ 'no%E_ARGUEMENT_MISMATCH' \ 'no%E_MACRO_REDEFINED' \ 'no%E_LOOP_NOT_ENTERED_AT_TOP' do AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f") done fi fi fi if test "x$2" != "x" then UNSUPPORTED="" list="$2" for each in $list do AS_CXX_COMPILER_FLAG($each, WARNING_CXXFLAGS="$WARNING_CXXFLAGS $each", UNSUPPORTED="$UNSUPPORTED $each") done if test "X$UNSUPPORTED" != X ; then AC_MSG_NOTICE([unsupported compiler flags: $UNSUPPORTED]) fi fi AC_SUBST(WARNING_CXXFLAGS) AC_SUBST(ERROR_CXXFLAGS) AC_MSG_NOTICE([set WARNING_CXXFLAGS to $WARNING_CXXFLAGS]) AC_MSG_NOTICE([set ERROR_CXXFLAGS to $ERROR_CXXFLAGS]) ]) dnl Sets WARNING_OBJCFLAGS and ERROR_OBJCFLAGS to something the compiler dnl will accept and AC_SUBST them so they are available in Makefile dnl dnl WARNING_OBJCFLAGS will contain flags to make the compiler emit more dnl warnings. dnl ERROR_OBJCFLAGS will contain flags to make those warnings fatal, dnl unless ADD-WERROR is set to "no" dnl dnl If MORE_FLAGS is set, tries to add each of the given flags dnl to WARNING_CFLAGS if the compiler supports them. Each flag is dnl tested separately. dnl dnl These flags can be overridden at make time: dnl make ERROR_OBJCFLAGS= AC_DEFUN([AG_GST_SET_ERROR_OBJCFLAGS], [ AC_REQUIRE([AC_PROG_OBJC]) AC_REQUIRE([AS_OBJC_COMPILER_FLAG]) ERROR_OBJCFLAGS="" WARNING_OBJCFLAGS="" dnl if we support -Wall, set it unconditionally AS_OBJC_COMPILER_FLAG(-Wall, WARNING_OBJCFLAGS="$WARNING_OBJCFLAGS -Wall") dnl if asked for, add -Werror if supported if test "x$1" != "xno" then AS_OBJC_COMPILER_FLAG(-Werror, ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -Werror") if test "x$ERROR_OBJCFLAGS" != "x" then dnl Add -fno-strict-aliasing for GLib versions before 2.19.8 dnl as before G_LOCK and friends caused strict aliasing compiler dnl warnings. PKG_CHECK_EXISTS([glib-2.0 < 2.19.8], [ AS_OBJC_COMPILER_FLAG([-fno-strict-aliasing], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -fno-strict-aliasing") ]) else dnl if -Werror isn't suported, try -errwarn=%all AS_OBJC_COMPILER_FLAG([-errwarn=%all], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -errwarn=%all") if test "x$ERROR_OBJCFLAGS" != "x"; then dnl try -errwarn=%all,no%E_EMPTY_DECLARATION, dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH, dnl no%E_MACRO_REDEFINED (Sun Forte case) dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon dnl "statement not reached" disabled because there is g_assert_not_reached () in some places dnl "macro redefined" because of gst/gettext.h dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'? dnl FIXME: do any of these work with the c++ compiler? if not, why dnl do we check at all? for f in 'no%E_EMPTY_DECLARATION' \ 'no%E_STATEMENT_NOT_REACHED' \ 'no%E_ARGUEMENT_MISMATCH' \ 'no%E_MACRO_REDEFINED' \ 'no%E_LOOP_NOT_ENTERED_AT_TOP' do AS_OBJC_COMPILER_FLAG([-errwarn=%all,$f], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS,$f") done fi fi fi if test "x$2" != "x" then UNSUPPORTED="" list="$2" for each in $list do AS_OBJC_COMPILER_FLAG($each, WARNING_OBJCFLAGS="$WARNING_OBJCFLAGS $each", UNSUPPORTED="$UNSUPPORTED $each") done if test "X$UNSUPPORTED" != X ; then AC_MSG_NOTICE([unsupported compiler flags: $UNSUPPORTED]) fi fi AC_SUBST(WARNING_OBJCFLAGS) AC_SUBST(ERROR_OBJCFLAGS) AC_MSG_NOTICE([set WARNING_OBJCFLAGS to $WARNING_OBJCFLAGS]) AC_MSG_NOTICE([set ERROR_OBJCFLAGS to $ERROR_OBJCFLAGS]) ]) dnl Sets the default error level for debugging messages AC_DEFUN([AG_GST_SET_LEVEL_DEFAULT], [ dnl define correct errorlevel for debugging messages. We want to have dnl GST_ERROR messages printed when running cvs builds if test "x[$1]" = "xyes"; then GST_LEVEL_DEFAULT=GST_LEVEL_ERROR else GST_LEVEL_DEFAULT=GST_LEVEL_NONE fi AC_DEFINE_UNQUOTED(GST_LEVEL_DEFAULT, $GST_LEVEL_DEFAULT, [Default errorlevel to use]) dnl AC_SUBST so we can use it for win32/common/config.h AC_SUBST(GST_LEVEL_DEFAULT) ]) farstream-0.2.7/common/m4/as-version.m40000664000076400007640000000414111710041611014567 00000000000000dnl as-version.m4 0.2.0 dnl autostars m4 macro for versioning dnl Thomas Vander Stichele dnl $Id: as-version.m4,v 1.15 2006/04/01 09:40:24 thomasvs Exp $ dnl AS_VERSION dnl example dnl AS_VERSION dnl this macro 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 correctly dnl dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h dnl if you use acconfig.h AC_DEFUN([AS_VERSION], [ 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-NANO-NON-NULL, [ACTION-IF-NANO-NULL]) 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-NANO-NON-NULL or ACTION-IF-NANO-NULL 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_RESULT($NANO) PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S` if test "x$NANO" != "x1" ; then ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi fi PACKAGE_VERSION_NANO=$NANO AC_SUBST(PACKAGE_VERSION_NANO) AC_SUBST(PACKAGE_VERSION_RELEASE) ]) farstream-0.2.7/common/m4/check.m40000664000076400007640000001333511710041611013563 00000000000000dnl _AM_TRY_CHECK(MINIMUM-VERSION, EXTRA-CFLAGS, EXTRA-LIBS, CHECK-LIB-NAME dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS dnl Done this way because of the brokenness that is dnl https://launchpad.net/distros/ubuntu/+source/check/+bug/5840 dnl AC_DEFUN([_AM_TRY_CHECK], [ min_check_version=$1 extra_cflags=$2 extra_libs=$3 check_lib_name=$4 CHECK_CFLAGS="$extra_cflags" CHECK_LIBS="$extra_libs -l$check_lib_name" ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" AC_MSG_CHECKING(for check named $check_lib_name - version >= $min_check_version) rm -f conf.check-test dnl unset no_check, since in our second run it would have been set to yes dnl before no_check= AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.check-test"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = strdup("$min_check_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_check_version"); return 1; } if ((CHECK_MAJOR_VERSION != check_major_version) || (CHECK_MINOR_VERSION != check_minor_version) || (CHECK_MICRO_VERSION != check_micro_version)) { printf("\n*** The check header file (version %d.%d.%d) does not match\n", CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION); printf("*** the check library (version %d.%d.%d).\n", check_major_version, check_minor_version, check_micro_version); return 1; } if ((check_major_version > major) || ((check_major_version == major) && (check_minor_version > minor)) || ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of check (%d.%d.%d) was found.\n", check_major_version, check_minor_version, check_micro_version); printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the check library and header\n"); printf("*** file is being found. Rerun configure with the --with-check=PATH option\n"); printf("*** to specify the prefix where the correct version was installed.\n"); } return 1; } ],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" if test "x$no_check" = x ; then AC_MSG_RESULT(yes) ifelse([$5], , :, [$5]) else AC_MSG_RESULT(no) if test -f conf.check-test ; then : else echo "*** Could not run check test program, checking why..." CFLAGS="$CFLAGS $CHECK_CFLAGS" LIBS="$CHECK_LIBS $LIBS" AC_TRY_LINK([ #include #include #include ], , [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding check. You'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for" echo "*** the exact error that occured." ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi CHECK_CFLAGS="" CHECK_LIBS="" rm -f conf.check-test ifelse([$6], , AC_MSG_ERROR([check not found]), [$6]) fi ]) dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS dnl AC_DEFUN([AM_PATH_CHECK], [ AC_ARG_WITH(check, [ --with-check=PATH prefix where check is installed [default=auto]]) AC_ARG_WITH(checklibname, AC_HELP_STRING([--with-check-lib-name=NAME], [name of the PIC check library (default=check)])) min_check_version=ifelse([$1], ,0.8.2,$1) if test x$with_check = xno; then AC_MSG_RESULT(disabled) ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3]) else if test "x$with_check" != x; then CHECK_EXTRA_CFLAGS="-I$with_check/include" CHECK_EXTRA_LIBS="-L$with_check/lib" else CHECK_EXTRA_CFLAGS="" CHECK_EXTRA_LIBS="" fi if test x$with_checklibname = x; then _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS, check_pic, [have_check=true], [have_check=false]) if test x$have_check = xtrue; then ifelse([$2], , :, [$2]) else _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS, check, [have_check=true], [have_check=false]) if test x$have_check = xtrue; then ifelse([$2], , :, [$2]) else ifelse([$3], , AC_MSG_ERROR([check not found]), [$3]) fi fi else _AM_TRY_CHECK($min_check_version, $CHECK_EXTRA_CFLAGS, $CHECK_EXTRA_LIBS, $with_checklibname, [have_check=true], [have_check=false]) if test x$have_check = xtrue; then ifelse([$2], , :, [$2]) else ifelse([$3], , AC_MSG_ERROR([check not found]), [$3]) fi fi AC_SUBST(CHECK_CFLAGS) AC_SUBST(CHECK_LIBS) rm -f conf.check-test fi ]) farstream-0.2.7/common/m4/gtk-doc.m40000664000076400007640000000501112406633262014042 00000000000000dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl check for tools we added during development AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) dnl don't check for glib if we build glib if test "x$PACKAGE_NAME" != "xglib"; then dnl don't fail if someone does not have glib PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,) fi dnl don't rely on sed being pulled in implicitly. Fixes Solaris build. if test -z "$SED"; then AC_PROG_SED fi fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], [build documentation in html format [[default=yes]]]),, [enable_gtk_doc_html=yes]) AC_ARG_ENABLE([gtk-doc-pdf], AS_HELP_STRING([--enable-gtk-doc-pdf], [build documentation in pdf format [[default=no]]]),, [enable_gtk_doc_pdf=no]) if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) ]) farstream-0.2.7/common/m4/Makefile.in0000664000076400007640000004033012462321046014314 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = common/m4 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ README \ as-ac-expand.m4 \ as-auto-alt.m4 \ as-compiler-flag.m4 \ as-compiler.m4 \ as-docbook.m4 \ as-gcc-inline-assembly.m4 \ as-libtool.m4 \ as-libtool-tags.m4 \ as-python.m4 \ as-scrub-include.m4 \ as-version.m4 \ ax_create_stdint_h.m4 \ glib-gettext.m4 \ gst-arch.m4 \ gst-args.m4 \ gst-check.m4 \ gst-debuginfo.m4 \ gst-default.m4 \ gst-doc.m4 \ gst-dowhile.m4 \ gst-error.m4 \ gst-feature.m4 \ gst-function.m4 \ gst-gettext.m4 \ gst-glib2.m4 \ gst-libxml2.m4 \ gst-parser.m4 \ gst-package-release-datetime.m4 \ gst-platform.m4 \ gst-plugindir.m4 \ gst-plugin-docs.m4 \ gst-valgrind.m4 \ gst-x11.m4 \ gst.m4 \ gtk-doc.m4 \ introspection.m4 \ pkg.m4 \ check.m4 \ orc.m4 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 common/m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/m4/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 tags TAGS: ctags CTAGS: cscope cscopelist: 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 installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-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: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am 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-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 \ tags-am uninstall uninstall-am # 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: farstream-0.2.7/common/m4/gst.m40000664000076400007640000000253212406633262013314 00000000000000dnl AG_GST_INIT dnl sets up use of GStreamer configure.ac macros dnl all GStreamer autoconf macros are prefixed dnl with AG_GST_ for public macros dnl with _AG_GST_ for private macros dnl dnl We call AC_CANONICAL_TARGET and AC_CANONICAL_HOST so that dnl it is valid before AC_ARG_PROGRAM is called AC_DEFUN([AG_GST_INIT], [ m4_pattern_forbid(^_?AG_GST_) AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use host_ variables AC_REQUIRE([AC_CANONICAL_TARGET]) dnl we use target_ variables ]) dnl AG_GST_PKG_CONFIG_PATH dnl dnl sets up a GST_PKG_CONFIG_PATH variable for use in Makefile.am dnl which contains the path of the in-tree pkgconfig directory first dnl and then any paths specified in PKG_CONFIG_PATH. dnl dnl We do this mostly so we don't have to use unportable shell constructs dnl such as ${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} in Makefile.am to handle dnl the case where the environment variable is not set, but also in order dnl to avoid a trailing ':' in the PKG_CONFIG_PATH which apparently causes dnl problems with pkg-config on windows with msys/mingw. AC_DEFUN([AG_GST_PKG_CONFIG_PATH], [ GST_PKG_CONFIG_PATH="\$(top_builddir)/pkgconfig" if test "x$PKG_CONFIG_PATH" != "x"; then GST_PKG_CONFIG_PATH="$GST_PKG_CONFIG_PATH:$PKG_CONFIG_PATH" fi AC_SUBST([GST_PKG_CONFIG_PATH]) AC_MSG_NOTICE([Using GST_PKG_CONFIG_PATH = $GST_PKG_CONFIG_PATH]) ]) farstream-0.2.7/common/m4/Makefile.am0000664000076400007640000000133112406633262014305 00000000000000EXTRA_DIST = \ README \ as-ac-expand.m4 \ as-auto-alt.m4 \ as-compiler-flag.m4 \ as-compiler.m4 \ as-docbook.m4 \ as-gcc-inline-assembly.m4 \ as-libtool.m4 \ as-libtool-tags.m4 \ as-python.m4 \ as-scrub-include.m4 \ as-version.m4 \ ax_create_stdint_h.m4 \ glib-gettext.m4 \ gst-arch.m4 \ gst-args.m4 \ gst-check.m4 \ gst-debuginfo.m4 \ gst-default.m4 \ gst-doc.m4 \ gst-dowhile.m4 \ gst-error.m4 \ gst-feature.m4 \ gst-function.m4 \ gst-gettext.m4 \ gst-glib2.m4 \ gst-libxml2.m4 \ gst-parser.m4 \ gst-package-release-datetime.m4 \ gst-platform.m4 \ gst-plugindir.m4 \ gst-plugin-docs.m4 \ gst-valgrind.m4 \ gst-x11.m4 \ gst.m4 \ gtk-doc.m4 \ introspection.m4 \ pkg.m4 \ check.m4 \ orc.m4 farstream-0.2.7/common/m4/gst-glib2.m40000664000076400007640000000535312406633262014315 00000000000000dnl check for a minimum version of GLib dnl AG_GST_GLIB_CHECK([minimum-version-required]) AC_DEFUN([AG_GST_GLIB_CHECK], [ AC_REQUIRE([AS_NANO]) dnl Minimum required version of GLib GLIB_REQ=[$1] if test "x$GLIB_REQ" = "x" then AC_MSG_ERROR([Please specify a required version for GLib 2.0]) fi AC_SUBST(GLIB_REQ) dnl Check for glib with everything AG_GST_PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQ gobject-2.0 gthread-2.0 gmodule-no-export-2.0) if test "x$HAVE_GLIB" = "xno"; then AC_MSG_ERROR([This package requires GLib >= $GLIB_REQ to compile.]) fi dnl Add define to tell GLib that threading is always enabled within GStreamer dnl code (optimisation, bypasses checks if the threading system is enabled dnl when using threading primitives) GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_THREADS_MANDATORY" dnl Define G_DISABLE_DEPRECATED for GIT versions if test "x$PACKAGE_VERSION_NANO" = "x1"; then GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_DEPRECATED" fi AC_ARG_ENABLE(gobject-cast-checks, AS_HELP_STRING([--enable-gobject-cast-checks[=@<:@no/auto/yes@:>@]], [Enable GObject cast checks]),, [enable_gobject_cast_checks=auto]) if test "x$enable_gobject_cast_checks" = "xauto"; then dnl For releases, turn off the cast checks if test "x$PACKAGE_VERSION_NANO" = "x1"; then enable_gobject_cast_checks=yes else enable_gobject_cast_checks=no fi fi if test "x$enable_gobject_cast_checks" = "xno"; then GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_CAST_CHECKS" fi AC_ARG_ENABLE(glib-asserts, AS_HELP_STRING([--enable-glib-asserts[=@<:@no/auto/yes@:>@]], [Enable GLib assertion]),, [enable_glib_assertions=auto]) if test "x$enable_glib_assertions" = "xauto"; then dnl For releases, turn off the assertions if test "x$PACKAGE_VERSION_NANO" = "x1"; then enable_glib_assertions=yes else enable_glib_assertions=no fi fi if test "x$enable_glib_assertions" = "xno"; then GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_ASSERT" fi dnl for the poor souls who for example have glib in /usr/local AS_SCRUB_INCLUDE(GLIB_CFLAGS) AC_SUBST(GLIB_EXTRA_CFLAGS) dnl Now check for GIO PKG_CHECK_MODULES(GIO, gio-2.0 >= $GLIB_REQ) if test "x$HAVE_GIO" = "xno"; then AC_MSG_ERROR([This package requires GIO >= $GLIB_REQ to compile.]) fi GIO_MODULE_DIR="`$PKG_CONFIG --variable=giomoduledir gio-2.0`" AC_DEFINE_UNQUOTED(GIO_MODULE_DIR, "$GIO_MODULE_DIR", [The GIO modules directory.]) GIO_LIBDIR="`$PKG_CONFIG --variable=libdir gio-2.0`" AC_DEFINE_UNQUOTED(GIO_LIBDIR, "$GIO_LIBDIR", [The GIO library directory.]) AC_SUBST(GIO_CFLAGS) AC_SUBST(GIO_LIBS) AC_SUBST(GIO_LDFLAGS) ]) farstream-0.2.7/common/m4/gst-function.m40000664000076400007640000000402711710041611015124 00000000000000dnl dnl Check for compiler mechanism to show functions in debugging dnl copied from an Ali patch floating on the internet dnl AC_DEFUN([AG_GST_CHECK_FUNCTION],[ dnl #1: __PRETTY_FUNCTION__ AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__) AC_CACHE_VAL(gst_cv_have_pretty_function,[ AC_TRY_LINK([#include ], [printf("%s", __PRETTY_FUNCTION__);], gst_cv_have_pretty_function=yes, gst_cv_have_pretty_function=no) ]) AC_MSG_RESULT($gst_cv_have_pretty_function) if test "$gst_cv_have_pretty_function" = yes; then AC_DEFINE(HAVE_PRETTY_FUNCTION, 1, [defined if the compiler implements __PRETTY_FUNCTION__]) fi dnl #2: __FUNCTION__ AC_MSG_CHECKING(whether $CC implements __FUNCTION__) AC_CACHE_VAL(gst_cv_have_function,[ AC_TRY_LINK([#include ], [printf("%s", __FUNCTION__);], gst_cv_have_function=yes, gst_cv_have_function=no) ]) AC_MSG_RESULT($gst_cv_have_function) if test "$gst_cv_have_function" = yes; then AC_DEFINE(HAVE_FUNCTION, 1, [defined if the compiler implements __FUNCTION__]) fi dnl #3: __func__ AC_MSG_CHECKING(whether $CC implements __func__) AC_CACHE_VAL(gst_cv_have_func,[ AC_TRY_LINK([#include ], [printf("%s", __func__);], gst_cv_have_func=yes, gst_cv_have_func=no) ]) AC_MSG_RESULT($gst_cv_have_func) if test "$gst_cv_have_func" = yes; then AC_DEFINE(HAVE_FUNC, 1, [defined if the compiler implements __func__]) fi dnl now define FUNCTION to whatever works, and fallback to "" if test "$gst_cv_have_pretty_function" = yes; then function=__PRETTY_FUNCTION__ else if test "$gst_cv_have_function" = yes; then function=__FUNCTION__ else if test "$gst_cv_have_func" = yes; then function=__func__ else function=\"\" fi fi fi AC_DEFINE_UNQUOTED(GST_FUNCTION, $function, [macro to use to show function name]) ]) farstream-0.2.7/common/m4/as-libtool.m40000664000076400007640000000220312406633262014557 00000000000000dnl as-libtool.m4 0.1.4 dnl autostars m4 macro for libtool versioning dnl Thomas Vander Stichele dnl $Id: as-libtool.m4,v 1.10 2005/10/15 13:44:23 thomasvs Exp $ dnl AS_LIBTOOL(PREFIX, CURRENT, REVISION, AGE, [RELEASE]) dnl example dnl AS_LIBTOOL(GST, 2, 0, 0) dnl this macro dnl - defines [$PREFIX]_CURRENT, REVISION and AGE dnl - defines [$PREFIX]_LIBVERSION dnl - defines [$PREFIX]_LT_LDFLAGS to set versioning dnl - AC_SUBST's them all dnl if RELEASE is given, then add a -release option to the LDFLAGS dnl with the given release version dnl then use [$PREFIX]_LT_LDFLAGS in the relevant Makefile.am's dnl call AM_PROG_LIBTOOL after this call AC_DEFUN([AS_LIBTOOL], [ [$1]_CURRENT=[$2] [$1]_REVISION=[$3] [$1]_AGE=[$4] [$1]_LIBVERSION=[$2]:[$3]:[$4] AC_SUBST([$1]_CURRENT) AC_SUBST([$1]_REVISION) AC_SUBST([$1]_AGE) AC_SUBST([$1]_LIBVERSION) [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -version-info $[$1]_LIBVERSION" if test ! -z "[$5]" then [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -release [$5]" fi AC_SUBST([$1]_LT_LDFLAGS) LT_PREREQ([2.2.6]) LT_INIT([dlopen win32-dll disable-static]) ]) farstream-0.2.7/common/m4/as-scrub-include.m40000664000076400007640000000221411710041611015640 00000000000000dnl as-scrub-include.m4 0.0.4 dnl autostars m4 macro for scrubbing CFLAGS of system include dirs dnl because gcc 3.x complains about including system including dirs dnl Thomas Vander Stichele dnl $Id: as-scrub-include.m4,v 1.7 2004/06/12 08:30:20 thomasvs Exp $ dnl This macro uses output of cpp -v and expects it to contain text that dnl looks a little bit like this: dnl #include <...> search starts here: dnl /usr/local/include dnl /usr/lib/gcc-lib/i386-redhat-linux/3.2/include dnl /usr/include dnl End of search list. dnl AS_SCRUB_INCLUDE(VAR) dnl example dnl AS_SCRUB_INCLUDE(CFLAGS) dnl will remove all system include dirs from the given CFLAGS AC_DEFUN([AS_SCRUB_INCLUDE], [ GIVEN_CFLAGS=$[$1] INCLUDE_DIRS=`echo | cpp -v 2>&1` dnl remove everything from this output between the "starts here" and "End of" dnl line INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'` for dir in $INCLUDE_DIRS; do dnl use "" as the sed script so $dir gets expanded GIVEN_CFLAGS=`echo $GIVEN_CFLAGS | sed -e "s#-I$dir ##"` done [$1]=$GIVEN_CFLAGS ]) farstream-0.2.7/common/m4/gst-feature.m40000664000076400007640000002270012406633262014744 00000000000000dnl Perform a check for a feature for GStreamer dnl Richard Boulton dnl Thomas Vander Stichele added useful stuff dnl Last modification: 25/06/2001 dnl dnl AG_GST_CHECK_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, dnl DEPENDENT-PLUGINS, TEST-FOR-FEATURE, dnl DISABLE-BY-DEFAULT, ACTION-IF-USE, ACTION-IF-NOTUSE) dnl dnl This macro adds a command line argument to allow the user to enable dnl or disable a feature, and if the feature is enabled, performs a supplied dnl test to check if the feature is available. dnl dnl The test should define HAVE_ to "yes" or "no" depending dnl on whether the feature is available. dnl dnl The macro will set USE_ to "yes" or "no" depending on dnl whether the feature is to be used. dnl Thomas changed this, so that when USE_ was already set dnl to no, then it stays that way. dnl dnl The macro will call AM_CONDITIONAL(USE_, ...) to allow dnl the feature to control what is built in Makefile.ams. If you want dnl additional actions resulting from the test, you can add them with the dnl ACTION-IF-USE and ACTION-IF-NOTUSE parameters. dnl dnl FEATURE-NAME is the name of the feature, and should be in dnl purely upper case characters. dnl FEATURE-DESCRIPTION is used to describe the feature in help text for dnl the command line argument. dnl DEPENDENT-PLUGINS lists any plug-ins which depend on this feature. dnl TEST-FOR-FEATURE is a test which sets HAVE_ to "yes" dnl or "no" depending on whether the feature is dnl available. dnl DISABLE-BY-DEFAULT if "disabled", the feature is disabled by default, dnl if any other value, the feature is enabled by default. dnl ACTION-IF-USE any extra actions to perform if the feature is to be dnl used. dnl ACTION-IF-NOTUSE any extra actions to perform if the feature is not to dnl be used. dnl dnl dnl thomas : dnl we also added a history. dnl GST_PLUGINS_YES will contain all plugins to be built dnl that were checked through AG_GST_CHECK_FEATURE dnl GST_PLUGINS_NO will contain those that won't be built AC_DEFUN([AG_GST_CHECK_FEATURE], [echo AC_MSG_NOTICE(*** checking feature: [$2] ***) if test "x[$3]" != "x" then AC_MSG_NOTICE(*** for plug-ins: [$3] ***) fi dnl builtin(define, [gst_endisable], ifelse($5, [disabled], [enable], [disable]))dnl dnl if it is set to NO, then don't even consider it for building NOUSE= if test "x$USE_[$1]" = "xno"; then NOUSE="yes" fi AC_ARG_ENABLE(translit([$1], A-Z, a-z), [ ]builtin(format, --%-26s gst_endisable %s, gst_endisable-translit([$1], A-Z, a-z), [$2]ifelse([$3],,,: [$3])), [ case "${enableval}" in yes) USE_[$1]=yes;; no) USE_[$1]=no;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;; esac], [ USE_$1=]ifelse($5, [disabled], [no], [yes])) dnl DEFAULT dnl *** set it back to no if it was preset to no if test "x$NOUSE" = "xyes"; then USE_[$1]="no" AC_MSG_WARN(*** $3 pre-configured not to be built) fi NOUSE= dnl *** Check if it is ported or not if echo " [$GST_PLUGINS_NONPORTED] " | tr , ' ' | grep -i " [$1] " > /dev/null; then USE_[$1]="no" AC_MSG_WARN(*** $3 not ported) fi dnl *** If it's enabled if test x$USE_[$1] = xyes; then dnl save compile variables before the test gst_check_save_LIBS=$LIBS gst_check_save_LDFLAGS=$LDFLAGS gst_check_save_CFLAGS=$CFLAGS gst_check_save_CPPFLAGS=$CPPFLAGS gst_check_save_CXXFLAGS=$CXXFLAGS HAVE_[$1]=no dnl TEST_FOR_FEATURE $4 LIBS=$gst_check_save_LIBS LDFLAGS=$gst_check_save_LDFLAGS CFLAGS=$gst_check_save_CFLAGS CPPFLAGS=$gst_check_save_CPPFLAGS CXXFLAGS=$gst_check_save_CXXFLAGS dnl If it isn't found, unset USE_[$1] if test x$HAVE_[$1] = xno; then USE_[$1]=no else ifelse([$3], , :, [AC_MSG_NOTICE(*** These plugins will be built: [$3])]) fi fi dnl *** Warn if it's disabled or not found if test x$USE_[$1] = xyes; then ifelse([$6], , :, [$6]) if test "x$3" != "x"; then GST_PLUGINS_YES="\t[$3]\n$GST_PLUGINS_YES" fi AC_DEFINE(HAVE_[$1], , [Define to enable $2]ifelse($3,,, [ (used by $3)]).) else ifelse([$3], , :, [AC_MSG_NOTICE(*** These plugins will not be built: [$3])]) if test "x$3" != "x"; then GST_PLUGINS_NO="\t[$3]\n$GST_PLUGINS_NO" fi ifelse([$7], , :, [$7]) fi dnl *** Define the conditional as appropriate AM_CONDITIONAL(USE_[$1], test x$USE_[$1] = xyes) ]) dnl Use AC_CHECK_LIB and AC_CHECK_HEADER to do both tests at once dnl sets HAVE_module if we have it dnl Richard Boulton dnl Last modification: 26/06/2001 dnl AG_GST_CHECK_LIBHEADER(FEATURE-NAME, LIB NAME, LIB FUNCTION, EXTRA LD FLAGS, dnl HEADER NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) dnl dnl This check was written for GStreamer: it should be renamed and checked dnl for portability if you decide to use it elsewhere. dnl AC_DEFUN([AG_GST_CHECK_LIBHEADER], [ AC_CHECK_LIB([$2], [$3], HAVE_[$1]=yes, HAVE_[$1]=no,[$4]) if test "x$HAVE_[$1]" = "xyes"; then AC_CHECK_HEADER([$5], :, HAVE_[$1]=no) if test "x$HAVE_[$1]" = "xyes"; then dnl execute what needs to be ifelse([$6], , :, [$6]) else ifelse([$7], , :, [$7]) fi else ifelse([$7], , :, [$7]) fi AC_SUBST(HAVE_[$1]) ] ) dnl 2004-02-14 Thomas - changed to get set properly and use proper output dnl 2003-06-27 Benjamin Otte - changed to make this work with gstconfig.h dnl dnl Add a subsystem --disable flag and all the necessary symbols and substitions dnl dnl AG_GST_CHECK_SUBSYSTEM_DISABLE(SYSNAME, [subsystem name]) dnl AC_DEFUN([AG_GST_CHECK_SUBSYSTEM_DISABLE], [ dnl this define will replace each literal subsys_def occurrence with dnl the lowercase hyphen-separated subsystem dnl e.g. if $1 is GST_DEBUG then subsys_def will be a macro with gst-debug define([subsys_def],translit([$1], _A-Z, -a-z)) AC_ARG_ENABLE(subsys_def, AC_HELP_STRING(--disable-subsys_def, [disable $2]), [ case "${enableval}" in yes) GST_DISABLE_[$1]=no ;; no) GST_DISABLE_[$1]=yes ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-subsys_def]) ;; esac ], [GST_DISABLE_[$1]=no]) dnl Default value if test x$GST_DISABLE_[$1] = xyes; then AC_MSG_NOTICE([disabled subsystem [$2]]) GST_DISABLE_[$1]_DEFINE="#define GST_DISABLE_$1 1" else GST_DISABLE_[$1]_DEFINE="/* #undef GST_DISABLE_$1 */" fi AC_SUBST(GST_DISABLE_[$1]_DEFINE) undefine([subsys_def]) ]) dnl Parse gstconfig.h for feature and defines add the symbols and substitions dnl dnl AG_GST_PARSE_SUBSYSTEM_DISABLE(GST_CONFIGPATH, FEATURE) dnl AC_DEFUN([AG_GST_PARSE_SUBSYSTEM_DISABLE], [ grep >/dev/null "#undef GST_DISABLE_$2" $1 if test $? = 0; then GST_DISABLE_[$2]=0 else GST_DISABLE_[$2]=1 fi AC_SUBST(GST_DISABLE_[$2]) ]) dnl Parse gstconfig.h and defines add the symbols and substitions dnl dnl GST_CONFIGPATH=`$PKG_CONFIG --variable=includedir gstreamer-0.10`"/gst/gstconfig.h" dnl AG_GST_PARSE_SUBSYSTEM_DISABLES(GST_CONFIGPATH) dnl AC_DEFUN([AG_GST_PARSE_SUBSYSTEM_DISABLES], [ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,GST_DEBUG) AG_GST_PARSE_SUBSYSTEM_DISABLE($1,LOADSAVE) AG_GST_PARSE_SUBSYSTEM_DISABLE($1,PARSE) AG_GST_PARSE_SUBSYSTEM_DISABLE($1,TRACE) AG_GST_PARSE_SUBSYSTEM_DISABLE($1,ALLOC_TRACE) AG_GST_PARSE_SUBSYSTEM_DISABLE($1,REGISTRY) AG_GST_PARSE_SUBSYSTEM_DISABLE($1,PLUGIN) AG_GST_PARSE_SUBSYSTEM_DISABLE($1,XML) ]) dnl AG_GST_CHECK_GST_DEBUG_DISABLED(ACTION-IF-DISABLED, ACTION-IF-NOT-DISABLED) dnl dnl Checks if the GStreamer debugging system is disabled in the core version dnl we are compiling against (by checking gstconfig.h) dnl AC_DEFUN([AG_GST_CHECK_GST_DEBUG_DISABLED], [ AC_REQUIRE([AG_GST_CHECK_GST]) AC_MSG_CHECKING([whether the GStreamer debugging system is enabled]) AC_LANG_PUSH([C]) save_CFLAGS="$CFLAGS" CFLAGS="$GST_CFLAGS $CFLAGS" AC_COMPILE_IFELSE([ AC_LANG_SOURCE([[ #include #ifdef GST_DISABLE_GST_DEBUG #error "debugging disabled, make compiler fail" #endif]])], [ debug_system_enabled=yes], [debug_system_enabled=no]) CFLAGS="$save_CFLAGS" AC_LANG_POP([C]) AC_MSG_RESULT([$debug_system_enabled]) if test "x$debug_system_enabled" = "xyes" ; then $2 true else $1 true fi ]) dnl relies on GST_PLUGINS_ALL, GST_PLUGINS_SELECTED, GST_PLUGINS_YES, dnl GST_PLUGINS_NO, and BUILD_EXTERNAL AC_DEFUN([AG_GST_OUTPUT_PLUGINS], [ printf "configure: *** Plug-ins without external dependencies that will be built:\n" ( for i in $GST_PLUGINS_SELECTED; do printf '\t'$i'\n'; done ) | sort printf "\n" printf "configure: *** Plug-ins without external dependencies that will NOT be built:\n" ( for i in $GST_PLUGINS_ALL; do case " $GST_PLUGINS_SELECTED " in *\ $i\ *) ;; *) printf '\t'$i'\n' ;; esac done ) | sort printf "\n" printf "configure: *** Plug-ins that have NOT been ported:\n" ( for i in $GST_PLUGINS_NONPORTED; do printf '\t'$i'\n' done ) | sort printf "\n" if test "x$BUILD_EXTERNAL" = "xno"; then printf "configure: *** No plug-ins with external dependencies will be built\n" else printf "configure: *** Plug-ins with dependencies that will be built:" printf "$GST_PLUGINS_YES\n" | sort printf "\n" printf "configure: *** Plug-ins with dependencies that will NOT be built:" printf "$GST_PLUGINS_NO\n" | sort printf "\n" fi ]) farstream-0.2.7/common/m4/gst-platform.m40000664000076400007640000000427011710557061015136 00000000000000dnl AG_GST_PLATFORM dnl Check for platform specific features and define some variables dnl dnl GST_EXTRA_MODULE_SUFFIX: contains a platform specific dnl extra module suffix additional to G_MODULE_SUFFIX dnl dnl HAVE_OSX: Defined if compiling for OS X dnl dnl GST_HAVE_UNSAFE_FORK: Defined if fork is unsafe (Windows) dnl dnl HAVE_WIN32: Defined if compiling on Win32 dnl AC_DEFUN([AG_GST_PLATFORM], [ AC_REQUIRE([AC_CANONICAL_HOST]) case $host_os in rhapsody*) AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix]) ;; darwin*) AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix]) AC_DEFINE_UNQUOTED(HAVE_OSX, 1, [Defined if compiling for OSX]) ;; cygwin*) AC_DEFINE_UNQUOTED(GST_HAVE_UNSAFE_FORK, 1, [Defined when registry scanning through fork is unsafe]) ;; mingw* | msvc* | mks*) dnl HAVE_WIN32 currently means "disable POSIXisms". AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows]) dnl define __MSVCRT_VERSION__ version if not set already by the dnl compiler (ie. mostly for mingw). This is needed for things like dnl __stat64 to be available. If set by the compiler, ensure it's dnl new enough - we need at least WinXP SP2. AC_TRY_COMPILE([ ], [ return __MSVCRT_VERSION__; ], [ AC_TRY_COMPILE([ ], [ #if __MSVCRT_VERSION__ < 0x0601 #error "MSVCRT too old" #endif ], [ AC_MSG_NOTICE([MSVCRT version looks ok]) ], [ AC_MSG_ERROR([MSVCRT version too old, need at least WinXP SP2]) ]) ], [ AC_MSG_NOTICE([Setting MSVCRT version to 0x0601]) AC_DEFINE_UNQUOTED(__MSVCRT_VERSION__, 0x0601, [We need at least WinXP SP2 for __stat64]) ]) ;; *) ;; esac ]) AC_DEFUN([AG_GST_LIBTOOL_PREPARE], [ dnl Persuade libtool to also link (-l) a 'pure' (DirectX) static lib, dnl i.e. as opposed to only import lib with dll counterpart. dnl Needs to be tweaked before libtool's checks. case $host_os in cygwin* | mingw*) lt_cv_deplibs_check_method=pass_all ;; esac ])farstream-0.2.7/common/m4/gst-args.m40000664000076400007640000002537712406633262014262 00000000000000dnl configure-time options shared among gstreamer modules dnl AG_GST_ARG_DEBUG dnl AG_GST_ARG_PROFILING dnl AG_GST_ARG_VALGRIND dnl AG_GST_ARG_GCOV dnl AG_GST_ARG_EXAMPLES dnl AG_GST_ARG_WITH_PKG_CONFIG_PATH dnl AG_GST_ARG_WITH_PACKAGE_NAME dnl AG_GST_ARG_WITH_PACKAGE_ORIGIN dnl AG_GST_ARG_WITH_PLUGINS dnl AG_GST_CHECK_PLUGIN dnl AG_GST_DISABLE_PLUGIN dnl AG_GST_ARG_ENABLE_EXTERNAL dnl AG_GST_ARG_ENABLE_EXPERIMENTAL dnl AG_GST_ARG_ENABLE_BROKEN dnl AG_GST_ARG_DISABLE_FATAL_WARNINGS AC_DEFUN([AG_GST_ARG_DEBUG], [ dnl debugging stuff AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]), [ case "${enableval}" in yes) USE_DEBUG=yes ;; no) USE_DEBUG=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac ], [USE_DEBUG=yes]) dnl Default value ]) AC_DEFUN([AG_GST_ARG_PROFILING], [ AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling], [adds -pg to compiler commandline, for profiling]), [ case "${enableval}" in yes) USE_PROFILING=yes ;; no) USE_PROFILING=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;; esac ], [USE_PROFILING=no]) dnl Default value ]) AC_DEFUN([AG_GST_ARG_VALGRIND], [ dnl valgrind inclusion AC_ARG_ENABLE(valgrind, AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]), [ case "${enableval}" in yes) USE_VALGRIND="$USE_DEBUG" ;; no) USE_VALGRIND=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;; esac ], [USE_VALGRIND="$USE_DEBUG"]) dnl Default value VALGRIND_REQ="3.0" if test "x$USE_VALGRIND" = xyes; then PKG_CHECK_MODULES(VALGRIND, valgrind >= $VALGRIND_REQ, USE_VALGRIND="yes", USE_VALGRIND="no") fi if test "x$USE_VALGRIND" = xyes; then AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used]) AC_MSG_NOTICE(Using extra code paths for valgrind) fi ]) AC_DEFUN([AG_GST_ARG_GCOV], [ AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov], [compile with coverage profiling instrumentation (gcc only)]), enable_gcov=$enableval, enable_gcov=no) if test x$enable_gcov = xyes ; then if test "x$GCC" != "xyes" then AC_MSG_ERROR([gcov only works if gcc is used]) fi AS_COMPILER_FLAG(["-fprofile-arcs"], [GCOV_CFLAGS="$GCOV_CFLAGS -fprofile-arcs"], true) AS_COMPILER_FLAG(["-ftest-coverage"], [GCOV_CFLAGS="$GCOV_CFLAGS -ftest-coverage"], true) dnl remove any -O flags - FIXME: is this needed ? GCOV_CFLAGS=`echo "$GCOV_CFLAGS" | sed -e 's/-O[[0-9]]*//g'` dnl libtool 1.5.22 and lower strip -fprofile-arcs from the flags dnl passed to the linker, which is a bug; -fprofile-arcs implicitly dnl links in -lgcov, so we do it explicitly here for the same effect GCOV_LIBS=-lgcov AC_SUBST(GCOV_CFLAGS) AC_SUBST(GCOV_LIBS) GCOV=`echo $CC | sed s/gcc/gcov/g` AC_SUBST(GCOV) GST_GCOV_ENABLED=yes AC_DEFINE_UNQUOTED(GST_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing]) dnl if gcov is used, we do not want default -O2 CFLAGS if test "x$GST_GCOV_ENABLED" = "xyes" then CFLAGS="$CFLAGS -O0" AC_SUBST(CFLAGS) CXXFLAGS="$CXXFLAGS -O0" AC_SUBST(CXXFLAGS) FFLAGS="$FFLAGS -O0" AC_SUBST(FFLAGS) CCASFLAGS="$CCASFLAGS -O0" AC_SUBST(CCASFLAGS) AC_MSG_NOTICE([gcov enabled, setting CFLAGS and friends to $CFLAGS]) fi fi AM_CONDITIONAL(GST_GCOV_ENABLED, test x$enable_gcov = xyes) ]) AC_DEFUN([AG_GST_ARG_EXAMPLES], [ AC_ARG_ENABLE(examples, AC_HELP_STRING([--disable-examples], [disable building examples]), [ case "${enableval}" in yes) BUILD_EXAMPLES=yes ;; no) BUILD_EXAMPLES=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;; esac ], [BUILD_EXAMPLES=yes]) dnl Default value AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes") ]) AC_DEFUN([AG_GST_ARG_WITH_PKG_CONFIG_PATH], [ dnl possibly modify pkg-config path AC_ARG_WITH(pkg-config-path, AC_HELP_STRING([--with-pkg-config-path], [colon-separated list of pkg-config(1) dirs]), [ export PKG_CONFIG_PATH=${withval} AC_MSG_NOTICE(Set PKG_CONFIG_PATH to $PKG_CONFIG_PATH) ]) ]) dnl This macro requires that GST_GIT or GST_CVS is set to yes or no (release) AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_NAME], [ dnl package name in plugins AC_ARG_WITH(package-name, AC_HELP_STRING([--with-package-name], [specify package name to use in plugins]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;; *) GST_PACKAGE_NAME="${withval}" ;; esac ], [ P=$1 if test "x$P" = "x" then P=$PACKAGE_NAME fi if test "x$PACKAGE_VERSION_NANO" = "x0" then GST_PACKAGE_NAME="$P source release" else if test "x$PACKAGE_VERSION_NANO" = "x1" then GST_PACKAGE_NAME="$P git" else GST_PACKAGE_NAME="$P prerelease" fi fi ] ) AC_MSG_NOTICE(Using $GST_PACKAGE_NAME as package name) AC_DEFINE_UNQUOTED(GST_PACKAGE_NAME, "$GST_PACKAGE_NAME", [package name in plugins]) AC_SUBST(GST_PACKAGE_NAME) ]) AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_ORIGIN], [ dnl package origin URL AC_ARG_WITH(package-origin, AC_HELP_STRING([--with-package-origin], [specify package origin URL to use in plugins]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;; *) GST_PACKAGE_ORIGIN="${withval}" ;; esac ], [GST_PACKAGE_ORIGIN="[Unknown package origin]"] dnl Default value ) AC_MSG_NOTICE(Using $GST_PACKAGE_ORIGIN as package origin) AC_DEFINE_UNQUOTED(GST_PACKAGE_ORIGIN, "$GST_PACKAGE_ORIGIN", [package origin]) AC_SUBST(GST_PACKAGE_ORIGIN) ]) dnl sets WITH_PLUGINS to the list of plug-ins given as an argument dnl also clears GST_PLUGINS_ALL and GST_PLUGINS_SELECTED AC_DEFUN([AG_GST_ARG_WITH_PLUGINS], [ AC_ARG_WITH(plugins, AC_HELP_STRING([--with-plugins], [comma-separated list of dependencyless plug-ins to compile]), [WITH_PLUGINS=$withval], [WITH_PLUGINS=]) GST_PLUGINS_ALL="" GST_PLUGINS_SELECTED="" GST_PLUGINS_NONPORTED="" AC_SUBST(GST_PLUGINS_ALL) AC_SUBST(GST_PLUGINS_SELECTED) AC_SUBST(GST_PLUGINS_NONPORTED) ]) dnl AG_GST_CHECK_PLUGIN(PLUGIN-NAME) dnl dnl This macro adds the plug-in to GST_PLUGINS_ALL. Then it dnl checks if WITH_PLUGINS is empty or the plugin is present in WITH_PLUGINS, dnl and if so adds it to GST_PLUGINS_SELECTED. Then it checks if the plugin dnl is present in WITHOUT_PLUGINS (ie. was disabled specifically) and if so dnl removes it from GST_PLUGINS_SELECTED. dnl dnl The macro will call AM_CONDITIONAL(USE_PLUGIN_, ...) to allow dnl control of what is built in Makefile.ams. AC_DEFUN([AG_GST_CHECK_PLUGIN], [ GST_PLUGINS_ALL="$GST_PLUGINS_ALL [$1]" define([pname_def],translit([$1], -a-z, _a-z)) AC_ARG_ENABLE([$1], AC_HELP_STRING([--disable-[$1]], [disable dependency-less $1 plugin]), [ case "${enableval}" in yes) [gst_use_]pname_def=yes ;; no) [gst_use_]pname_def=no ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-$1]) ;; esac ], [[gst_use_]pname_def=yes]) dnl Default value if test x$[gst_use_]pname_def = xno; then AC_MSG_NOTICE(disabling dependency-less plugin $1) WITHOUT_PLUGINS="$WITHOUT_PLUGINS [$1]" fi undefine([pname_def]) dnl First check inclusion if [[ -z "$WITH_PLUGINS" ]] || echo " [$WITH_PLUGINS] " | tr , ' ' | grep -i " [$1] " > /dev/null; then GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED [$1]" fi dnl Then check exclusion if echo " [$WITHOUT_PLUGINS] " | tr , ' ' | grep -i " [$1] " > /dev/null; then GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ [$1] / /'` fi dnl Finally check if the plugin is ported or not if echo " [$GST_PLUGINS_NONPORTED] " | tr , ' ' | grep -i " [$1] " > /dev/null; then GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ [$1] / /'` fi AM_CONDITIONAL([USE_PLUGIN_]translit([$1], a-z, A-Z), echo " $GST_PLUGINS_SELECTED " | grep -i " [$1] " > /dev/null) ]) dnl AG_GST_DISABLE_PLUGIN(PLUGIN-NAME) dnl dnl This macro disables the plug-in by removing it from dnl GST_PLUGINS_SELECTED. AC_DEFUN([AG_GST_DISABLE_PLUGIN], [ GST_PLUGINS_SELECTED=`echo " $GST_PLUGINS_SELECTED " | $SED -e 's/ [$1] / /'` AM_CONDITIONAL([USE_PLUGIN_]translit([$1], a-z, A-Z), false) ]) AC_DEFUN([AG_GST_ARG_ENABLE_EXTERNAL], [ AG_GST_CHECK_FEATURE(EXTERNAL, [building of plug-ins with external deps],, HAVE_EXTERNAL=yes, enabled, [ AC_MSG_NOTICE(building external plug-ins) BUILD_EXTERNAL="yes" ],[ AC_MSG_WARN(all plug-ins with external dependencies will not be built) BUILD_EXTERNAL="no" ]) # make BUILD_EXTERNAL available to Makefile.am AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes") ]) dnl experimental plug-ins; stuff that hasn't had the dust settle yet dnl read 'builds, but might not work' AC_DEFUN([AG_GST_ARG_ENABLE_EXPERIMENTAL], [ AG_GST_CHECK_FEATURE(EXPERIMENTAL, [building of experimental plug-ins],, HAVE_EXPERIMENTAL=yes, disabled, [ AC_MSG_WARN(building experimental plug-ins) BUILD_EXPERIMENTAL="yes" ],[ AC_MSG_NOTICE(not building experimental plug-ins) BUILD_EXPERIMENTAL="no" ]) # make BUILD_EXPERIMENTAL available to Makefile.am AM_CONDITIONAL(BUILD_EXPERIMENTAL, test "x$BUILD_EXPERIMENTAL" = "xyes") ]) dnl broken plug-ins; stuff that doesn't seem to build at the moment AC_DEFUN([AG_GST_ARG_ENABLE_BROKEN], [ AG_GST_CHECK_FEATURE(BROKEN, [building of broken plug-ins],, HAVE_BROKEN=yes, disabled, [ AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches ...]) ],[ AC_MSG_NOTICE([not building broken plug-ins]) ]) ]) dnl allow people (or build tools) to override default behaviour dnl for fatal compiler warnings AC_DEFUN([AG_GST_ARG_DISABLE_FATAL_WARNINGS], [ AC_ARG_ENABLE(fatal-warnings, AC_HELP_STRING([--disable-fatal-warnings], [Don't turn compiler warnings into fatal errors]), [ case "${enableval}" in yes) FATAL_WARNINGS=yes ;; no) FATAL_WARNINGS=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-fatal-warnings) ;; esac ], [FATAL_WARNINGS=$GST_GIT]) dnl Default value ]) farstream-0.2.7/common/m4/glib-gettext.m40000664000076400007640000003250311710041611015103 00000000000000# Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) farstream-0.2.7/common/m4/gst-default.m40000664000076400007640000000776411710041611014736 00000000000000dnl default elements used for tests and such dnl AG_GST_DEFAULT_ELEMENTS AC_DEFUN([AG_GST_DEFAULT_ELEMENTS], [ dnl decide on default elements dnl FIXME: describe where exactly this gets used dnl FIXME: decide if it's a problem that this could point to sinks from dnl depending plugin modules dnl FIXME: when can we just use autoaudiosrc and autovideosrc? DEFAULT_AUDIOSINK="autoaudiosink" DEFAULT_VIDEOSINK="autovideosink" DEFAULT_AUDIOSRC="alsasrc" DEFAULT_VIDEOSRC="v4l2src" DEFAULT_VISUALIZER="goom" case "$host" in *-sun-* | *pc-solaris* ) DEFAULT_AUDIOSRC="sunaudiosrc" ;; *-darwin* ) DEFAULT_AUDIOSRC="osxaudiosrc" ;; esac dnl Default audio sink AC_ARG_WITH(default-audiosink, AC_HELP_STRING([--with-default-audiosink], [specify default audio sink]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-default-audiosink) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-default-audiosink) ;; *) DEFAULT_AUDIOSINK="${withval}" ;; esac ], [ DEFAULT_AUDIOSINK="$DEFAULT_AUDIOSINK" ] dnl Default value as determined above ) AC_MSG_NOTICE(Using $DEFAULT_AUDIOSINK as default audio sink) AC_SUBST(DEFAULT_AUDIOSINK) AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK, "$DEFAULT_AUDIOSINK", [Default audio sink]) dnl Default audio source AC_ARG_WITH(default-audiosrc, AC_HELP_STRING([--with-default-audiosrc], [specify default audio source]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-default-audiosrc) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-default-audiosrc) ;; *) DEFAULT_AUDIOSRC="${withval}" ;; esac ], [ DEFAULT_AUDIOSRC="$DEFAULT_AUDIOSRC" ] dnl Default value as determined above ) AC_MSG_NOTICE(Using $DEFAULT_AUDIOSRC as default audio source) AC_SUBST(DEFAULT_AUDIOSRC) AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC, "$DEFAULT_AUDIOSRC", [Default audio source]) dnl Default video sink AC_ARG_WITH(default-videosink, AC_HELP_STRING([--with-default-videosink], [specify default video sink]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-default-videosink) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-default-videosink) ;; *) DEFAULT_VIDEOSINK="${withval}" ;; esac ], [ DEFAULT_VIDEOSINK="$DEFAULT_VIDEOSINK" ] dnl Default value as determined above ) AC_MSG_NOTICE(Using $DEFAULT_VIDEOSINK as default video sink) AC_SUBST(DEFAULT_VIDEOSINK) AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK, "$DEFAULT_VIDEOSINK", [Default video sink]) dnl Default video source AC_ARG_WITH(default-videosrc, AC_HELP_STRING([--with-default-videosrc], [specify default video source]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-default-videosrc) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-default-videosrc) ;; *) DEFAULT_VIDEOSRC="${withval}" ;; esac ], [ DEFAULT_VIDEOSRC="$DEFAULT_VIDEOSRC" ] dnl Default value as determined above ) AC_MSG_NOTICE(Using $DEFAULT_VIDEOSRC as default video source) AC_SUBST(DEFAULT_VIDEOSRC) AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC, "$DEFAULT_VIDEOSRC", [Default video source]) dnl Default visualizer AC_ARG_WITH(default-visualizer, AC_HELP_STRING([--with-default-visualizer], [specify default visualizer]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-default-visualizer) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-default-visualizer) ;; *) DEFAULT_VISUALIZER="${withval}" ;; esac ], [ DEFAULT_VISUALIZER="$DEFAULT_VISUALIZER" ] dnl Default value as determined above ) AC_MSG_NOTICE(Using $DEFAULT_VISUALIZER as default visualizer) AC_SUBST(DEFAULT_VISUALIZER) AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER, "$DEFAULT_VISUALIZER", [Default visualizer]) ]) farstream-0.2.7/common/m4/gst-libxml2.m40000664000076400007640000000317311710041611014651 00000000000000dnl call this macro with the minimum required version as an argument dnl this macro sets and AC_SUBSTs XML_CFLAGS and XML_LIBS dnl it also sets LIBXML_PKG, used for the pkg-config file AC_DEFUN([AG_GST_LIBXML2_CHECK], [ dnl Minimum required version of libxml2 dnl default to 2.4.9 if not specified LIBXML2_REQ=ifelse([$1],,2.4.9,[$1]) AC_SUBST(LIBXML2_REQ) dnl check for libxml2 PKG_CHECK_MODULES(XML, libxml-2.0 >= $LIBXML2_REQ, HAVE_LIBXML2=yes, [ AC_MSG_RESULT(no) HAVE_LIBXML2=no ]) if test "x$HAVE_LIBXML2" = "xyes"; then AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 is available]) else AC_MSG_ERROR([ Need libxml2 and development headers/files to build GStreamer. You can do without libxml2 if you pass --disable-loadsave to configure, but that breaks ABI, so don't do that unless you are building for an embedded setup and know what you are doing. ]) fi dnl this is for the .pc file LIBXML_PKG=', libxml-2.0' AC_SUBST(LIBXML_PKG) AC_SUBST(XML_LIBS) AC_SUBST(XML_CFLAGS) dnl XML_LIBS might pull in -lz without zlib actually being on the system, so dnl try linking with these LIBS and CFLAGS ac_save_CFLAGS=$CFLAGS ac_save_LIBS=$LIBS CFLAGS="$CFLAGS $XML_CFLAGS" LIBS="$LIBS $XML_LIBS" AC_TRY_LINK([ #include #include ],[ /* function body */ ], AC_MSG_NOTICE([Test xml2 program linked]), AC_MSG_ERROR([Could not link libxml2 test program. Check if you have the necessary dependencies.]) ) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" ]) farstream-0.2.7/common/m4/gst-parser.m40000664000076400007640000000356012406633262014610 00000000000000AC_DEFUN([AG_GST_BISON_CHECK], [ dnl FIXME: check if AC_PROG_YACC is suitable here dnl FIXME: make precious AC_PATH_PROG(BISON_PATH, bison, no) if test x$BISON_PATH = xno; then AC_MSG_ERROR(Could not find bison) fi dnl check bison version dnl we need version >= 1.875 for the reentrancy support dnl in the parser. dnl First lines observed: 'bison (GNU Bison) 2.3' or 'GNU Bison version 1.28' bison_min_version=1.875 bison_version=`$BISON_PATH --version | head -n 1 | sed 's/^[[^0-9]]*//' | sed 's/[[^0-9]]*$//' | cut -d' ' -f1` AC_MSG_CHECKING([bison version $bison_version >= $bison_min_version]) if perl -we "exit ((v$bison_version ge v$bison_min_version) ? 0 : 1)"; then AC_MSG_RESULT([yes]) else AC_MSG_ERROR([no]) fi ]) AC_DEFUN([AG_GST_FLEX_CHECK], [ dnl we require flex for building the parser AC_PATH_PROG(FLEX_PATH, flex, no) if test x$FLEX_PATH = xno; then AC_MSG_ERROR(Could not find flex) fi dnl check flex version dnl we need version >= 2.5.31 for the reentrancy support dnl in the parser. flex_min_version=2.5.31 flex_version=`$FLEX_PATH --version | head -n 1 | awk '{print $2}'` AC_MSG_CHECKING([flex version $flex_version >= $flex_min_version]) if perl -w < \$min_version_major) || ((\$flex_version_major == \$min_version_major) && (\$flex_version_minor > \$min_version_minor)) || ((\$flex_version_major == \$min_version_major) && (\$flex_version_minor == \$min_version_minor) && (\$flex_version_micro >= \$min_version_micro))) ? 0 : 1); EOF then AC_MSG_RESULT(yes) else AC_MSG_ERROR([no]) fi ]) farstream-0.2.7/common/m4/pkg.m40000664000076400007640000001214111710041611013261 00000000000000# 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 farstream-0.2.7/common/m4/gst-plugin-docs.m40000664000076400007640000000123011710041611015514 00000000000000dnl AG_GST_PLUGIN_DOCS([MINIMUM-GTK-DOC-VERSION],[MINIMUM-PYTHON-VERSION]) dnl dnl checks for prerequisites for the common/mangle-tmpl.py script dnl used when building the plugin documentation AC_DEFUN([AG_GST_PLUGIN_DOCS], [ AC_BEFORE([GTK_DOC_CHECK],[$0])dnl check for gtk-doc first AC_BEFORE([AS_PATH_PYTHON],[$1])dnl find python first build_plugin_docs=no AC_MSG_CHECKING([whether to build plugin documentation]) if test x$enable_gtk_doc = xyes; then build_plugin_docs=yes AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no (gtk-doc disabled or not available)]) fi AM_CONDITIONAL(ENABLE_PLUGIN_DOCS, test x$build_plugin_docs = xyes) ]) farstream-0.2.7/common/m4/gst-plugindir.m40000664000076400007640000000113212406633262015302 00000000000000dnl AG_GST_SET_PLUGINDIR dnl AC_DEFINE PLUGINDIR to the full location where plug-ins will be installed dnl AC_SUBST plugindir, to be used in Makefile.am's AC_DEFUN([AG_GST_SET_PLUGINDIR], [ dnl define location of plugin directory AS_AC_EXPAND(PLUGINDIR, ${libdir}/gstreamer-$GST_API_VERSION) AC_DEFINE_UNQUOTED(PLUGINDIR, "$PLUGINDIR", [directory where plugins are located]) AC_MSG_NOTICE([Using $PLUGINDIR as the plugin install location]) dnl plugin directory configure-time variable for use in Makefile.am plugindir="\$(libdir)/gstreamer-$GST_API_VERSION" AC_SUBST(plugindir) ]) farstream-0.2.7/common/m4/as-compiler.m40000664000076400007640000000141411710041611014714 00000000000000dnl as-compiler.m4 0.1.0 dnl autostars m4 macro for detection of compiler flavor dnl Thomas Vander Stichele dnl $Id: as-compiler.m4,v 1.4 2004/06/01 09:44:19 thomasvs Exp $ dnl AS_COMPILER(COMPILER) dnl will set variable COMPILER to dnl - gcc dnl - forte dnl - (empty) if no guess could be made AC_DEFUN([AS_COMPILER], [ as_compiler= AC_MSG_CHECKING(for compiler flavour) dnl is it gcc ? if test "x$GCC" = "xyes"; then as_compiler="gcc" fi dnl is it forte ? AC_TRY_RUN([ int main (int argc, char *argv[]) { #ifdef __sun return 0; #else return 1; #endif } ], as_compiler="forte", ,) if test "x$as_compiler" = "x"; then AC_MSG_RESULT([unknown !]) else AC_MSG_RESULT($as_compiler) fi [$1]=$as_compiler ]) farstream-0.2.7/common/m4/as-docbook.m40000664000076400007640000000371511710041611014530 00000000000000dnl AS_DOCBOOK([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl checks if xsltproc can build docbook documentation dnl (which is possible if the catalog is set up properly dnl I also tried checking for a specific version and type of docbook dnl but xsltproc seemed to happily run anyway, so we can't check for that dnl and version dnl this macro takes inspiration from dnl http://www.movement.uklinux.net/docs/docbook-autotools/configure.html AC_DEFUN([AS_DOCBOOK], [ XSLTPROC_FLAGS=--nonet DOCBOOK_ROOT= TYPE_LC=xml TYPE_UC=XML DOCBOOK_VERSION=4.1.2 if test ! -f /etc/xml/catalog; then for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/ /usr/local/share/xsl/docbook ; do if test -d "$i"; then DOCBOOK_ROOT=$i fi done else XML_CATALOG=/etc/xml/catalog CAT_ENTRY_START='' fi dnl We need xsltproc to process the test AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,) XSLTPROC_WORKS=no if test -n "$XSLTPROC"; then AC_MSG_CHECKING([whether xsltproc docbook processing works]) if test -n "$XML_CATALOG"; then DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" else DB_FILE="$DOCBOOK_ROOT/xhtml/docbook.xsl" fi $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END END if test "$?" = 0; then XSLTPROC_WORKS=yes fi AC_MSG_RESULT($XSLTPROC_WORKS) fi if test "x$XSLTPROC_WORKS" = "xyes"; then dnl execute ACTION-IF-FOUND ifelse([$1], , :, [$1]) else dnl execute ACTION-IF-NOT-FOUND ifelse([$2], , :, [$2]) fi AC_SUBST(XML_CATALOG) AC_SUBST(XSLTPROC_FLAGS) AC_SUBST(DOCBOOK_ROOT) AC_SUBST(CAT_ENTRY_START) AC_SUBST(CAT_ENTRY_END) ]) farstream-0.2.7/common/m4/gst-package-release-datetime.m40000664000076400007640000000733211710557061020117 00000000000000dnl macros to set GST_PACKAGE_RELEASE_DATETIME dnl =========================================================================== dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME dnl dnl Usage: dnl dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME() dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no]...) dnl sets the release datetime to the current date dnl (no = this is not a release, but git or prerelease) dnl dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([YYYY-MM-DD]) dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes], [YYYY-MM-DD]) dnl sets the release datetime to the specified date (and time, if given) dnl (yes = this is a release, not git or prerelease) dnl dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes], [DOAP-FILE], [RELEASE-VERSION]) dnl sets the release date to the release date associated with version dnl RELEASE-VERSION in the .doap file DOAP-FILE dnl (yes = this is a release, not git or prerelease) dnl dnl We need to treat pre-releases like git because there won't be an entry dnl in the .doap file for pre-releases yet, and we don't want to use the dnl date of the last release either. dnl =========================================================================== AC_DEFUN([AG_GST_SET_PACKAGE_RELEASE_DATETIME], [ dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME() dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes]...) if test "x$1" = "xno" -o "x$1" = "x"; then GST_PACKAGE_RELEASE_DATETIME=`date -u "+%Y-%m-%dT%H:%MZ"` elif test "x$1" = "xyes"; then dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no], ["YYYY-MM-DD"]) dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no], [DOAP-FILE], [RELEASE-VERSION]) if ( echo $1 | grep -e '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then GST_PACKAGE_RELEASE_DATETIME=$1 else dnl we assume the .doap file contains the date as YYYY-MM-DD YYYY_MM_DD=`sh "${srcdir}/common/extract-release-date-from-doap-file" $3 $2`; if test "x$YYYY_MM_DD" != "x"; then GST_PACKAGE_RELEASE_DATETIME=$YYYY_MM_DD else AC_MSG_ERROR([SET_PACKAGE_RELEASE_DATETIME: could not extract release date for release version $3 from $2]) GST_PACKAGE_RELEASE_DATETIME="" fi fi dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([YYYY-MM-DD]) elif ( echo $1 | grep -e '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then GST_PACKAGE_RELEASE_DATETIME=$1 else AC_MSG_WARN([SET_PACKAGE_RELEASE_DATETIME: invalid first argument]) GST_PACKAGE_RELEASE_DATETIME="" fi if test "x$GST_PACKAGE_RELEASE_DATETIME" = "x"; then AC_MSG_WARN([Invalid package release date time: $GST_PACKAGE_RELEASE_DATETIME]) else AC_MSG_NOTICE([Setting GST_PACKAGE_RELEASE_DATETIME to $GST_PACKAGE_RELEASE_DATETIME]) AC_DEFINE_UNQUOTED([GST_PACKAGE_RELEASE_DATETIME], ["$GST_PACKAGE_RELEASE_DATETIME"], [GStreamer package release date/time for plugins as YYYY-MM-DD]) fi ]) dnl =========================================================================== dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO dnl dnl Usage: dnl dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([NANO-VERSION], [DOAP-FILE], [RELEASE-VERSION]) dnl if NANO-VERSION is 0, sets the release date to the release date associated dnl with version RELEASE-VERSION in the .doap file DOAP-FILE, otherwise sets dnl the release date and time to the current date/time. dnl dnl We need to treat pre-releases like git because there won't be an entry dnl in the .doap file for pre-releases yet, and we don't want to use the dnl date of the last release either. dnl =========================================================================== AC_DEFUN([AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO], [ if test "x$1" = "x0"; then AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes], [ $2 ], [ $3 ]) else AG_GST_SET_PACKAGE_RELEASE_DATETIME([no]) fi ]) farstream-0.2.7/common/m4/as-python.m40000664000076400007640000001175011710041611014427 00000000000000## ------------------------ ## Python file handling ## From Andrew Dalke ## Updated by James Henstridge ## Updated by Andy Wingo to loop through possible pythons ## ------------------------ # AS_PATH_PYTHON([MINIMUM-VERSION]) # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # If the MINIMUM-VERSION argument is passed, AS_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. # Updated to loop over all possible python binaries by Andy Wingo # # Updated to only warn and unset PYTHON if no good one is found AC_DEFUN([AS_PATH_PYTHON], [ dnl Find a version of Python. I could check for python versions 1.4 dnl or earlier, but the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5, and I don't want to maintain that logic. dnl should we do the version check? PYTHON_CANDIDATES="python python2.2 python2.1 python2.0 python2 \ python1.6 python1.5" ifelse([$1],[], [AC_PATH_PROG(PYTHON, $PYTHON_CANDIDATES)], [ AC_MSG_NOTICE(Looking for Python version >= $1) changequote(<<, >>)dnl prog=" import sys, string minver = '$1' # split string by '.' and convert to numeric minver_info = map(string.atoi, string.split(minver, '.')) # we can now do comparisons on the two lists: if sys.version_info >= tuple(minver_info): sys.exit(0) else: sys.exit(1)" changequote([, ])dnl python_good=false for python_candidate in $PYTHON_CANDIDATES; do unset PYTHON AC_PATH_PROG(PYTHON, $python_candidate) 1> /dev/null 2> /dev/null if test "x$PYTHON" = "x"; then continue; fi if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC; then AC_MSG_CHECKING(["$PYTHON":]) AC_MSG_RESULT([okay]) python_good=true break; else dnl clear the cache val unset ac_cv_path_PYTHON fi done ]) if test "$python_good" != "true"; then AC_MSG_WARN([No suitable version of python found]) PYTHON= else AC_MSG_CHECKING([local Python configuration]) dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. Need to change quote character because of [:3] AC_SUBST(PYTHON_VERSION) changequote(<<, >>)dnl PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` changequote([, ])dnl dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST(PYTHON_PREFIX) PYTHON_PREFIX='${prefix}' AC_SUBST(PYTHON_EXEC_PREFIX) PYTHON_EXEC_PREFIX='${exec_prefix}' dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_SUBST(PYTHON_PLATFORM) PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"` dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behaviour dnl is more consistent with lispdir.m4 for example. dnl dnl Also, if the package prefix isn't the same as python's prefix, dnl then the old $(pythondir) was pretty useless. AC_SUBST(pythondir) pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. dnl Maybe this should be put in python.am? AC_SUBST(pkgpythondir) pkgpythondir=\${pythondir}/$PACKAGE dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) Was PYTHON_SITE_EXEC in previous betas. AC_SUBST(pyexecdir) pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) dnl Maybe this should be put in python.am? AC_SUBST(pkgpyexecdir) pkgpyexecdir=\${pyexecdir}/$PACKAGE AC_MSG_RESULT([looks good]) fi ]) farstream-0.2.7/common/m4/gst-check.m40000664000076400007640000002633012406633262014371 00000000000000dnl pkg-config-based checks for GStreamer modules and dependency modules dnl generic: dnl AG_GST_PKG_CHECK_MODULES([PREFIX], [WHICH], [REQUIRED]) dnl sets HAVE_[$PREFIX], [$PREFIX]_* dnl AG_GST_CHECK_MODULES([PREFIX], [MODULE], [MINVER], [NAME], [REQUIRED]) dnl sets HAVE_[$PREFIX], [$PREFIX]_* dnl specific: dnl AG_GST_CHECK_GST([MAJMIN], [MINVER], [REQUIRED]) dnl also sets/ACSUBSTs GST_TOOLS_DIR and GST_PLUGINS_DIR dnl AG_GST_CHECK_GST_BASE([MAJMIN], [MINVER], [REQUIRED]) dnl AG_GST_CHECK_GST_CONTROLLER([MAJMIN], [MINVER], [REQUIRED]) dnl AG_GST_CHECK_GST_NET([MAJMIN], [MINVER], [REQUIRED]) dnl AG_GST_CHECK_GST_CHECK([MAJMIN], [MINVER], [REQUIRED]) dnl AG_GST_CHECK_GST_PLUGINS_BASE([MAJMIN], [MINVER], [REQUIRED]) dnl also sets/ACSUBSTs GSTPB_PLUGINS_DIR AC_DEFUN([AG_GST_PKG_CHECK_MODULES], [ which="[$2]" dnl not required by default, since we use this mostly for plugin deps required=ifelse([$3], , "no", [$3]) PKG_CHECK_MODULES([$1], $which, [ HAVE_[$1]="yes" ], [ HAVE_[$1]="no" if test "x$required" = "xyes"; then AC_MSG_ERROR($[$1]_PKG_ERRORS) else AC_MSG_NOTICE($[$1]_PKG_ERRORS) fi ]) dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7 dnl It gets done automatically in automake >= 1.7, which we now require ])) AC_DEFUN([AG_GST_CHECK_MODULES], [ module=[$2] minver=[$3] name="[$4]" required=ifelse([$5], , "yes", [$5]) dnl required by default PKG_CHECK_MODULES([$1], $module >= $minver, [ HAVE_[$1]="yes" ], [ HAVE_[$1]="no" AC_MSG_NOTICE($[$1]_PKG_ERRORS) if test "x$required" = "xyes"; then AC_MSG_ERROR([no $module >= $minver ($name) found]) else AC_MSG_NOTICE([no $module >= $minver ($name) found]) fi ]) dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7 dnl It gets done automatically in automake >= 1.7, which we now require ])) AC_DEFUN([AG_GST_CHECK_GST], [ AG_GST_CHECK_MODULES(GST, gstreamer-[$1], [$2], [GStreamer], [$3]) dnl allow setting before calling this macro to override if test -z $GST_TOOLS_DIR; then GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-[$1]` if test -z $GST_TOOLS_DIR; then AC_MSG_ERROR( [no tools dir set in GStreamer pkg-config file, core upgrade needed.]) fi fi AC_MSG_NOTICE([using GStreamer tools in $GST_TOOLS_DIR]) AC_SUBST(GST_TOOLS_DIR) dnl check for where core plug-ins got installed dnl this is used for unit tests dnl allow setting before calling this macro to override if test -z $GST_PLUGINS_DIR; then GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-[$1]` if test -z $GST_PLUGINS_DIR; then AC_MSG_ERROR( [no pluginsdir set in GStreamer pkg-config file, core upgrade needed.]) fi fi AC_MSG_NOTICE([using GStreamer plug-ins in $GST_PLUGINS_DIR]) AC_SUBST(GST_PLUGINS_DIR) ]) AC_DEFUN([AG_GST_CHECK_GST_BASE], [ AG_GST_CHECK_MODULES(GST_BASE, gstreamer-base-[$1], [$2], [GStreamer Base Libraries], [$3]) ]) AC_DEFUN([AG_GST_CHECK_GST_CONTROLLER], [ AG_GST_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-[$1], [$2], [GStreamer Controller Library], [$3]) ]) AC_DEFUN([AG_GST_CHECK_GST_NET], [ AG_GST_CHECK_MODULES(GST_NET, gstreamer-net-[$1], [$2], [GStreamer Network Library], [$3]) ]) AC_DEFUN([AG_GST_CHECK_GST_CHECK], [ AG_GST_CHECK_MODULES(GST_CHECK, gstreamer-check-[$1], [$2], [GStreamer Check unittest Library], [$3]) ]) dnl =========================================================================== dnl AG_GST_CHECK_UNINSTALLED_SETUP([ACTION-IF-UNINSTALLED], [ACTION-IF-NOT]) dnl dnl ACTION-IF-UNINSTALLED (optional) extra actions to perform if the setup dnl is an uninstalled setup dnl ACTION-IF-NOT (optional) extra actions to perform if the setup dnl is not an uninstalled setup dnl =========================================================================== AC_DEFUN([AG_GST_CHECK_UNINSTALLED_SETUP], [ AC_MSG_CHECKING([whether this is an uninstalled GStreamer setup]) AC_CACHE_VAL(gst_cv_is_uninstalled_setup,[ gst_cv_is_uninstalled_setup=no if (set -u; : $GST_PLUGIN_SYSTEM_PATH) 2>/dev/null ; then if test -z "$GST_PLUGIN_SYSTEM_PATH" \ -a -n "$GST_PLUGIN_SCANNER" \ -a -n "$GST_PLUGIN_PATH" \ -a -n "$GST_REGISTRY" \ -a -n "$DYLD_LIBRARY_PATH" \ -a -n "$LD_LIBRARY_PATH"; then gst_cv_is_uninstalled_setup=yes; fi fi ]) AC_MSG_RESULT($gst_cv_is_uninstalled_setup) if test "x$gst_cv_is_uninstalled_setup" = "xyes"; then ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi ]) dnl =========================================================================== dnl AG_GST_CHECK_GST_PLUGINS_BASE([GST-API_VERSION], [MIN-VERSION], [REQUIRED]) dnl dnl Sets GST_PLUGINS_BASE_CFLAGS and GST_PLUGINS_BASE_LIBS. dnl dnl Also sets GSTPB_PLUGINS_DIR (and for consistency also GST_PLUGINS_BASE_DIR) dnl for use in Makefile.am. This is only really needed/useful in uninstalled dnl setups, since in an installed setup all plugins will be found in dnl GST_PLUGINS_DIR anyway. dnl =========================================================================== AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_BASE], [ AG_GST_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-[$1], [$2], [GStreamer Base Plugins], [$3]) if test "x$HAVE_GST_PLUGINS_BASE" = "xyes"; then dnl check for where base plugins got installed dnl this is used for unit tests dnl allow setting before calling this macro to override if test -z $GSTPB_PLUGINS_DIR; then GSTPB_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-base-[$1]` if test -z $GSTPB_PLUGINS_DIR; then AC_MSG_ERROR( [no pluginsdir set in GStreamer Base Plugins pkg-config file]) fi fi AC_MSG_NOTICE([using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR]) GST_PLUGINS_BASE_DIR="$GSTPB_PLUGINS_DIR/gst:$GSTPB_PLUGINS_DIR/sys:$GSTPB_PLUGINS_DIR/ext" AC_SUBST(GST_PLUGINS_BASE_DIR) AC_SUBST(GSTPB_PLUGINS_DIR) fi ]) dnl =========================================================================== dnl AG_GST_CHECK_GST_PLUGINS_GOOD([GST-API_VERSION], [MIN-VERSION]) dnl dnl Will set GST_PLUGINS_GOOD_DIR for use in Makefile.am. Note that this will dnl only be set in an uninstalled setup, since -good ships no .pc file and in dnl an installed setup all plugins will be found in GST_PLUGINS_DIR anyway. dnl =========================================================================== AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_GOOD], [ AG_GST_CHECK_MODULES(GST_PLUGINS_GOOD, gstreamer-plugins-good-[$1], [$2], [GStreamer Good Plugins], [no]) if test "x$HAVE_GST_PLUGINS_GOOD" = "xyes"; then dnl check for where good plugins got installed dnl this is used for unit tests dnl allow setting before calling this macro to override if test -z $GST_PLUGINS_GOOD_DIR; then GST_PLUGINS_GOOD_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-good-[$1]` if test -z $GST_PLUGINS_GOOD_DIR; then AC_MSG_ERROR([no pluginsdir set in GStreamer Good Plugins pkg-config file]) fi fi AC_MSG_NOTICE([using GStreamer Good Plugins in $GST_PLUGINS_GOOD_DIR]) GST_PLUGINS_GOOD_DIR="$GST_PLUGINS_GOOD_DIR/gst:$GST_PLUGINS_GOOD_DIR/sys:$GST_PLUGINS_GOOD_DIR/ext" AC_SUBST(GST_PLUGINS_GOOD_DIR) fi ]) dnl =========================================================================== dnl AG_GST_CHECK_GST_PLUGINS_UGLY([GST-API_VERSION], [MIN-VERSION]) dnl dnl Will set GST_PLUGINS_UGLY_DIR for use in Makefile.am. Note that this will dnl only be set in an uninstalled setup, since -bad ships no .pc file and in dnl an installed setup all plugins will be found in GST_PLUGINS_DIR anyway. dnl =========================================================================== AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_UGLY], [ AG_GST_CHECK_MODULES(GST_PLUGINS_UGLY, gstreamer-plugins-ugly-[$1], [$2], [GStreamer Ugly Plugins], [no]) if test "x$HAVE_GST_PLUGINS_UGLY" = "xyes"; then dnl check for where ugly plugins got installed dnl this is used for unit tests dnl allow setting before calling this macro to override if test -z $GST_PLUGINS_UGLY_DIR; then GST_PLUGINS_UGLY_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-ugly-[$1]` if test -z $GST_PLUGINS_UGLY_DIR; then AC_MSG_ERROR([no pluginsdir set in GStreamer Ugly Plugins pkg-config file]) fi fi AC_MSG_NOTICE([using GStreamer Ugly Plugins in $GST_PLUGINS_UGLY_DIR]) GST_PLUGINS_UGLY_DIR="$GST_PLUGINS_UGLY_DIR/gst:$GST_PLUGINS_UGLY_DIR/sys:$GST_PLUGINS_UGLY_DIR/ext" AC_SUBST(GST_PLUGINS_UGLY_DIR) fi ]) dnl =========================================================================== dnl AG_GST_CHECK_GST_PLUGINS_BAD([GST-API_VERSION], [MIN-VERSION]) dnl dnl Will set GST_PLUGINS_BAD_DIR for use in Makefile.am. Note that this will dnl only be set in an uninstalled setup, since -ugly ships no .pc file and in dnl an installed setup all plugins will be found in GST_PLUGINS_DIR anyway. dnl =========================================================================== AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_BAD], [ AG_GST_CHECK_MODULES(GST_PLUGINS_BAD, gstreamer-plugins-bad-[$1], [$2], [GStreamer Bad Plugins], [no]) if test "x$HAVE_GST_PLUGINS_BAD" = "xyes"; then dnl check for where bad plugins got installed dnl this is used for unit tests dnl allow setting before calling this macro to override if test -z $GST_PLUGINS_BAD_DIR; then GST_PLUGINS_BAD_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-bad-[$1]` if test -z $GST_PLUGINS_BAD_DIR; then AC_MSG_ERROR([no pluginsdir set in GStreamer Bad Plugins pkg-config file]) fi fi AC_MSG_NOTICE([using GStreamer Bad Plugins in $GST_PLUGINS_BAD_DIR]) GST_PLUGINS_BAD_DIR="$GST_PLUGINS_BAD_DIR/gst:$GST_PLUGINS_BAD_DIR/sys:$GST_PLUGINS_BAD_DIR/ext" AC_SUBST(GST_PLUGINS_BAD_DIR) fi ]) dnl =========================================================================== dnl AG_GST_CHECK_GST_PLUGINS_FFMPEG([GST-API_VERSION], [MIN-VERSION]) dnl dnl Will set GST_PLUGINS_FFMPEG_DIR for use in Makefile.am. Note that this will dnl only be set in an uninstalled setup, since -ffmpeg ships no .pc file and in dnl an installed setup all plugins will be found in GST_PLUGINS_DIR anyway. dnl =========================================================================== AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_FFMPEG], [ AG_GST_CHECK_MODULES(GST_PLUGINS_FFMPEG, gstreamer-plugins-ffmpeg-[$1], [$2], [GStreamer FFmpeg Plugins], [no]) if test "x$HAVE_GST_PLUGINS_FFMPEG" = "xyes"; then dnl check for where ffmpeg plugins got installed dnl this is used for unit tests dnl allow setting before calling this macro to override if test -z $GST_PLUGINS_FFMPEG_DIR; then GST_PLUGINS_FFMPEG_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-ffmpeg-[$1]` if test -z $GST_PLUGINS_FFMPEG_DIR; then AC_MSG_ERROR([no pluginsdir set in GStreamer FFmpeg Plugins pkg-config file]) fi fi GST_PLUGINS_FFMPEG_DIR="$GST_PLUGINS_FFMPEG_DIR/ext/ffmpeg" AC_MSG_NOTICE([using GStreamer FFmpeg Plugins in $GST_PLUGINS_FFMPEG_DIR]) AC_SUBST(GST_PLUGINS_FFMPEG_DIR) fi ]) farstream-0.2.7/common/m4/gst-dowhile.m40000664000076400007640000000152511710041611014732 00000000000000dnl dnl Check for working do while(0) macros. This is used by G_STMT_START dnl and G_STMT_END in glib/gmacros.h. Without having this defined we dnl get "ambigious if-else" compiler warnings when compling C++ code. dnl dnl Copied from GLib's configure.in dnl AC_DEFUN([AG_GST_CHECK_DOWHILE_MACROS],[ dnl *** check for working do while(0) macros *** AC_CACHE_CHECK([for working do while(0) macros], _cv_g_support_dowhile_macros, [ AC_TRY_COMPILE([],[ #define STMT_START do #define STMT_END while(0) #define STMT_TEST STMT_START { i = 0; } STMT_END int main(void) { int i = 1; STMT_TEST; return i; }], [_cv_g_support_dowhile_macros=yes], [_cv_g_support_dowhile_macros=no], [_cv_g_support_dowhile_macros=yes]) ]) if test x$_cv_g_support_dowhile_macros = xyes; then AC_DEFINE(HAVE_DOWHILE_MACROS, 1, [define for working do while(0) macros]) fi ]) farstream-0.2.7/common/m4/ax_create_stdint_h.m40000664000076400007640000006151511710041611016340 00000000000000##### http://autoconf-archive.cryp.to/ax_create_stdint_h.html # # SYNOPSIS # # AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] # # DESCRIPTION # # the "ISO C9X: 7.18 Integer types " section requires the # existence of an include file that defines a set of # typedefs, especially uint8_t,int32_t,uintptr_t. Many older # installations will not provide this file, but some will have the # very same definitions in . In other enviroments we can # use the inet-types in which would define the typedefs # int8_t and u_int8_t respectivly. # # This macros will create a local "_stdint.h" or the headerfile given # as an argument. In many cases that file will just "#include # " or "#include ", while in other environments # it will provide the set of basic 'stdint's definitions/typedefs: # # int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t # int_least32_t.. int_fast32_t.. intmax_t # # which may or may not rely on the definitions of other files, or # using the AC_CHECK_SIZEOF macro to determine the actual sizeof each # type. # # if your header files require the stdint-types you will want to # create an installable file mylib-int.h that all your other # installable header may include. So if you have a library package # named "mylib", just use # # AX_CREATE_STDINT_H(mylib-int.h) # # in configure.ac and go to install that very header file in # Makefile.am along with the other headers (mylib.h) - and the # mylib-specific headers can simply use "#include " to # obtain the stdint-types. # # Remember, if the system already had a valid , the # generated file will include it directly. No need for fuzzy # HAVE_STDINT_H things... (oops, GCC 4.2.x has deliberatly disabled # its stdint.h for non-c99 compilation and the c99-mode is not the # default. Therefore this macro will not use the compiler's stdint.h # - please complain to the GCC developers). # # LAST MODIFICATION # # 2007-06-27 # # COPYLEFT # # Copyright (c) 2007 Guido U. Draheim # # 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, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([AX_CHECK_DATA_MODEL],[ AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(void*) ac_cv_char_data_model="" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" ac_cv_long_data_model="" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" AC_MSG_CHECKING([data model]) case "$ac_cv_char_data_model/$ac_cv_long_data_model" in 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; 222/*|333/*|444/*|666/*|888/*) : ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; *) ac_cv_data_model="none" ; n="very unusual model" ;; esac AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) ]) dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) AC_MSG_RESULT([(..)]) for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h]) do unset ac_cv_type_uintptr_t unset ac_cv_type_uint64_t AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$2],[$2]) break done AC_MSG_CHECKING([for stdint uintptr_t]) ]) ]) AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) AC_MSG_RESULT([(..)]) for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h]) do unset ac_cv_type_uint32_t unset ac_cv_type_uint64_t AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$2],[$2]) break break; done AC_MSG_CHECKING([for stdint uint32_t]) ]) ]) AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) AC_MSG_RESULT([(..)]) for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do unset ac_cv_type_u_int32_t unset ac_cv_type_u_int64_t AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$2],[$2]) break break; done AC_MSG_CHECKING([for stdint u_int32_t]) ]) ]) AC_DEFUN([AX_CREATE_STDINT_H], [# ------ AX CREATE STDINT H ------------------------------------- AC_MSG_CHECKING([for stdint types]) ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` # try to shortcircuit - if the default include path of the compiler # can find a "stdint.h" header then we assume that all compilers can. AC_CACHE_VAL([ac_cv_header_stdint_t],[ old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" old_CFLAGS="$CFLAGS" ; CFLAGS="" AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], [ac_cv_stdint_result="(assuming C99 compatible system)" ac_cv_header_stdint_t="stdint.h"; ], [ac_cv_header_stdint_t=""]) if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then CFLAGS="-std=c99" AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], [AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)]) fi CXXFLAGS="$old_CXXFLAGS" CPPFLAGS="$old_CPPFLAGS" CFLAGS="$old_CFLAGS" ]) v="... $ac_cv_header_stdint_h" if test "$ac_stdint_h" = "stdint.h" ; then AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) elif test "$ac_stdint_h" = "inttypes.h" ; then AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) elif test "_$ac_cv_header_stdint_t" = "_" ; then AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) else ac_cv_header_stdint="$ac_cv_header_stdint_t" AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) fi if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. dnl .....intro message done, now do a few system checks..... dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW dnl instead that is triggered with 3 or more arguments (see types.m4) inttype_headers=`echo $2 | sed -e 's/,/ /g'` ac_cv_stdint_result="(no helpful system typedefs seen)" AX_CHECK_HEADER_STDINT_X(dnl stdint.h inttypes.h sys/inttypes.h $inttype_headers, ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") if test "_$ac_cv_header_stdint_x" = "_" ; then AX_CHECK_HEADER_STDINT_O(dnl, inttypes.h sys/inttypes.h stdint.h $inttype_headers, ac_cv_stdint_result="(seen uint32_t$and64 in $i)") fi if test "_$ac_cv_header_stdint_x" = "_" ; then if test "_$ac_cv_header_stdint_o" = "_" ; then AX_CHECK_HEADER_STDINT_U(dnl, sys/types.h inttypes.h sys/inttypes.h $inttype_headers, ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") fi fi dnl if there was no good C99 header file, do some typedef checks... if test "_$ac_cv_header_stdint_x" = "_" ; then AC_MSG_CHECKING([for stdint datatype model]) AC_MSG_RESULT([(..)]) AX_CHECK_DATA_MODEL fi if test "_$ac_cv_header_stdint_x" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_x" elif test "_$ac_cv_header_stdint_o" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_o" elif test "_$ac_cv_header_stdint_u" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_u" else ac_cv_header_stdint="stddef.h" fi AC_MSG_CHECKING([for extra inttypes in chosen header]) AC_MSG_RESULT([($ac_cv_header_stdint)]) dnl see if int_least and int_fast types are present in _this_ header. unset ac_cv_type_int_least32_t unset ac_cv_type_int_fast32_t AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) fi # shortcircut to system "stdint.h" # ------------------ PREPARE VARIABLES ------------------------------ if test "$GCC" = "yes" ; then ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` else ac_cv_stdint_message="using $CC" fi AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl $ac_cv_stdint_result]) dnl ----------------------------------------------------------------- # ----------------- DONE inttypes.h checks START header ------------- AC_CONFIG_COMMANDS([$ac_stdint_h],[ AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) ac_stdint=$tmp/_stdint.h echo "#ifndef" $_ac_stdint_h >$ac_stdint echo "#define" $_ac_stdint_h "1" >>$ac_stdint echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint if test "_$ac_cv_header_stdint_t" != "_" ; then echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint echo "#include " >>$ac_stdint echo "#endif" >>$ac_stdint echo "#endif" >>$ac_stdint else cat >>$ac_stdint < #else #include /* .................... configured part ............................ */ STDINT_EOF echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint if test "_$ac_cv_header_stdint_x" != "_" ; then ac_header="$ac_cv_header_stdint_x" echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint fi echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint if test "_$ac_cv_header_stdint_o" != "_" ; then ac_header="$ac_cv_header_stdint_o" echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint fi echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint if test "_$ac_cv_header_stdint_u" != "_" ; then ac_header="$ac_cv_header_stdint_u" echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint fi echo "" >>$ac_stdint if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then echo "#include <$ac_header>" >>$ac_stdint echo "" >>$ac_stdint fi fi echo "/* which 64bit typedef has been found */" >>$ac_stdint if test "$ac_cv_type_uint64_t" = "yes" ; then echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint fi if test "$ac_cv_type_u_int64_t" = "yes" ; then echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint fi echo "" >>$ac_stdint echo "/* which type model has been detected */" >>$ac_stdint if test "_$ac_cv_char_data_model" != "_" ; then echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint else echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint fi echo "" >>$ac_stdint echo "/* whether int_least types were detected */" >>$ac_stdint if test "$ac_cv_type_int_least32_t" = "yes"; then echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint fi echo "/* whether int_fast types were detected */" >>$ac_stdint if test "$ac_cv_type_int_fast32_t" = "yes"; then echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint fi echo "/* whether intmax_t type was detected */" >>$ac_stdint if test "$ac_cv_type_intmax_t" = "yes"; then echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint fi echo "" >>$ac_stdint cat >>$ac_stdint <= 199901L #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef long long int64_t; typedef unsigned long long uint64_t; #elif !defined __STRICT_ANSI__ #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ #define _HAVE_UINT64_T typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ /* note: all ELF-systems seem to have loff-support which needs 64-bit */ #if !defined _NO_LONGLONG #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef long long int64_t; typedef unsigned long long uint64_t; #endif #elif defined __alpha || (defined __mips && defined _ABIN32) #if !defined _NO_LONGLONG typedef long int64_t; typedef unsigned long uint64_t; #endif /* compiler/cpu type to define int64_t */ #endif #endif #endif #if defined _STDINT_HAVE_U_INT_TYPES /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; /* glibc compatibility */ #ifndef __int8_t_defined #define __int8_t_defined #endif #endif #ifdef _STDINT_NEED_INT_MODEL_T /* we must guess all the basic types. Apart from byte-adressable system, */ /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ /* (btw, those nibble-addressable systems are way off, or so we assume) */ dnl /* have a look at "64bit and data size neutrality" at */ dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ dnl /* (the shorthand "ILP" types always have a "P" part) */ #if defined _STDINT_BYTE_MODEL #if _STDINT_LONG_MODEL+0 == 242 /* 2:4:2 = IP16 = a normal 16-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef long int32_t; #endif #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 /* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ /* 4:4:4 = ILP32 = a normal 32-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif #elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 /* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ /* 4:8:8 = LP64 = a normal 64-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif /* this system has a "long" of 64bit */ #ifndef _HAVE_UINT64_T #define _HAVE_UINT64_T typedef unsigned long uint64_t; typedef long int64_t; #endif #elif _STDINT_LONG_MODEL+0 == 448 /* LLP64 a 64-bit system derived from a 32-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif /* assuming the system has a "long long" */ #ifndef _HAVE_UINT64_T #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef unsigned long long uint64_t; typedef long long int64_t; #endif #else #define _STDINT_NO_INT32_T #endif #else #define _STDINT_NO_INT8_T #define _STDINT_NO_INT32_T #endif #endif /* * quote from SunOS-5.8 sys/inttypes.h: * Use at your own risk. As of February 1996, the committee is squarely * behind the fixed sized types; the "least" and "fast" types are still being * discussed. The probability that the "fast" types may be removed before * the standard is finalized is high enough that they are not currently * implemented. */ #if defined _STDINT_NEED_INT_LEAST_T typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; #ifdef _HAVE_UINT64_T typedef int64_t int_least64_t; #endif typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; #ifdef _HAVE_UINT64_T typedef uint64_t uint_least64_t; #endif /* least types */ #endif #if defined _STDINT_NEED_INT_FAST_T typedef int8_t int_fast8_t; typedef int int_fast16_t; typedef int32_t int_fast32_t; #ifdef _HAVE_UINT64_T typedef int64_t int_fast64_t; #endif typedef uint8_t uint_fast8_t; typedef unsigned uint_fast16_t; typedef uint32_t uint_fast32_t; #ifdef _HAVE_UINT64_T typedef uint64_t uint_fast64_t; #endif /* fast types */ #endif #ifdef _STDINT_NEED_INTMAX_T #ifdef _HAVE_UINT64_T typedef int64_t intmax_t; typedef uint64_t uintmax_t; #else typedef long intmax_t; typedef unsigned long uintmax_t; #endif #endif #ifdef _STDINT_NEED_INTPTR_T #ifndef __intptr_t_defined #define __intptr_t_defined /* we encourage using "long" to store pointer values, never use "int" ! */ #if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 typedef unsigned int uintptr_t; typedef int intptr_t; #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 typedef unsigned long uintptr_t; typedef long intptr_t; #elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T typedef uint64_t uintptr_t; typedef int64_t intptr_t; #else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ typedef unsigned long uintptr_t; typedef long intptr_t; #endif #endif #endif /* The ISO C99 standard specifies that in C++ implementations these should only be defined if explicitly requested. */ #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS #ifndef UINT32_C /* Signed. */ # define INT8_C(c) c # define INT16_C(c) c # define INT32_C(c) c # ifdef _HAVE_LONGLONG_UINT64_T # define INT64_C(c) c ## L # else # define INT64_C(c) c ## LL # endif /* Unsigned. */ # define UINT8_C(c) c ## U # define UINT16_C(c) c ## U # define UINT32_C(c) c ## U # ifdef _HAVE_LONGLONG_UINT64_T # define UINT64_C(c) c ## UL # else # define UINT64_C(c) c ## ULL # endif /* Maximal type. */ # ifdef _HAVE_LONGLONG_UINT64_T # define INTMAX_C(c) c ## L # define UINTMAX_C(c) c ## UL # else # define INTMAX_C(c) c ## LL # define UINTMAX_C(c) c ## ULL # endif /* literalnumbers */ #endif #endif /* These limits are merily those of a two complement byte-oriented system */ /* Minimum of signed integral types. */ # define INT8_MIN (-128) # define INT16_MIN (-32767-1) # define INT32_MIN (-2147483647-1) # define INT64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types. */ # define INT8_MAX (127) # define INT16_MAX (32767) # define INT32_MAX (2147483647) # define INT64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types. */ # define UINT8_MAX (255) # define UINT16_MAX (65535) # define UINT32_MAX (4294967295U) # define UINT64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of signed integral types having a minimum size. */ # define INT_LEAST8_MIN INT8_MIN # define INT_LEAST16_MIN INT16_MIN # define INT_LEAST32_MIN INT32_MIN # define INT_LEAST64_MIN INT64_MIN /* Maximum of signed integral types having a minimum size. */ # define INT_LEAST8_MAX INT8_MAX # define INT_LEAST16_MAX INT16_MAX # define INT_LEAST32_MAX INT32_MAX # define INT_LEAST64_MAX INT64_MAX /* Maximum of unsigned integral types having a minimum size. */ # define UINT_LEAST8_MAX UINT8_MAX # define UINT_LEAST16_MAX UINT16_MAX # define UINT_LEAST32_MAX UINT32_MAX # define UINT_LEAST64_MAX UINT64_MAX /* shortcircuit*/ #endif /* once */ #endif #endif STDINT_EOF fi if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then AC_MSG_NOTICE([$ac_stdint_h is unchanged]) else ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` AS_MKDIR_P(["$ac_dir"]) rm -f $ac_stdint_h mv $ac_stdint $ac_stdint_h fi ],[# variables for create stdint.h replacement PACKAGE="$PACKAGE" VERSION="$VERSION" ac_stdint_h="$ac_stdint_h" _ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) ac_cv_stdint_message="$ac_cv_stdint_message" ac_cv_header_stdint_t="$ac_cv_header_stdint_t" ac_cv_header_stdint_x="$ac_cv_header_stdint_x" ac_cv_header_stdint_o="$ac_cv_header_stdint_o" ac_cv_header_stdint_u="$ac_cv_header_stdint_u" ac_cv_type_uint64_t="$ac_cv_type_uint64_t" ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" ac_cv_char_data_model="$ac_cv_char_data_model" ac_cv_long_data_model="$ac_cv_long_data_model" ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" ac_cv_type_intmax_t="$ac_cv_type_intmax_t" ]) ]) farstream-0.2.7/common/m4/gst-valgrind.m40000664000076400007640000000173311710041611015106 00000000000000AC_DEFUN([AG_GST_VALGRIND_CHECK], [ dnl valgrind inclusion AC_ARG_ENABLE(valgrind, AC_HELP_STRING([--disable-valgrind], [disable run-time valgrind detection]), [ case "${enableval}" in yes) USE_VALGRIND="$USE_DEBUG" ;; no) USE_VALGRIND=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;; esac], [ USE_VALGRIND="$USE_DEBUG" ]) dnl Default value VALGRIND_REQ="3.0" if test "x$USE_VALGRIND" = xyes; then PKG_CHECK_MODULES(VALGRIND, valgrind >= $VALGRIND_REQ, USE_VALGRIND="yes", [ USE_VALGRIND="no" AC_MSG_RESULT([no]) ]) fi if test "x$USE_VALGRIND" = xyes; then AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used]) AC_MSG_NOTICE(Using extra code paths for valgrind) fi AC_SUBST(VALGRIND_CFLAGS) AC_SUBST(VALGRIND_LIBS) AC_PATH_PROG(VALGRIND_PATH, valgrind, no) AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno") ]) farstream-0.2.7/common/m4/gst-doc.m40000664000076400007640000001221012406633262014051 00000000000000AC_DEFUN([AG_GST_DOCBOOK_CHECK], [ dnl choose a location to install docbook docs in if test "x$PACKAGE_TARNAME" = "x" then AC_MSG_ERROR([Internal error - PACKAGE_TARNAME not set]) fi docdir="\$(datadir)/doc/$PACKAGE_TARNAME-$GST_API_VERSION" dnl enable/disable docbook documentation building AC_ARG_ENABLE(docbook, AC_HELP_STRING([--enable-docbook], [use docbook to build documentation [default=no]]),, enable_docbook=no) have_docbook=no if test x$enable_docbook = xyes; then dnl check if we actually have everything we need dnl check for docbook tools AC_CHECK_PROG(HAVE_DOCBOOK2PS, docbook2ps, yes, no) AC_CHECK_PROG(HAVE_DOCBOOK2HTML, docbook2html, yes, no) AC_CHECK_PROG(HAVE_JADETEX, jadetex, yes, no) AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, yes, no) # -V option appeared in 0.6.10 docbook2html_min_version=0.6.10 if test "x$HAVE_DOCBOOK2HTML" != "xno"; then docbook2html_version=`docbook2html --version` AC_MSG_CHECKING([docbook2html version ($docbook2html_version) >= $docbook2html_min_version]) if perl -w < \$min_version_major) || ((\$docbook2html_version_major == \$min_version_major) && (\$docbook2html_version_minor >= \$min_version_minor)) || ((\$docbook2html_version_major == \$min_version_major) && (\$docbook2html_version_minor >= \$min_version_minor) && (\$docbook2html_version_micro >= \$min_version_micro))) ? 0 : 1); EOF then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) HAVE_DOCBOOK2HTML=no fi fi dnl check if we can process docbook stuff AS_DOCBOOK(have_docbook=yes, have_docbook=no) dnl check for extra tools AC_CHECK_PROG(HAVE_DVIPS, dvips, yes, no) AC_CHECK_PROG(HAVE_XMLLINT, xmllint, yes, no) dnl check for image conversion tools AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, yes, no) if test "x$HAVE_FIG2DEV" = "xno" ; then AC_MSG_WARN([Did not find fig2dev (from xfig), images will not be generated.]) fi dnl The following is a hack: if fig2dev doesn't display an error message dnl for the desired type, we assume it supports it. HAVE_FIG2DEV_EPS=no if test "x$HAVE_FIG2DEV" = "xyes" ; then fig2dev_quiet=`fig2dev -L eps &1 >/dev/null` if test "x$fig2dev_quiet" = "x" ; then HAVE_FIG2DEV_EPS=yes fi fi HAVE_FIG2DEV_PNG=no if test "x$HAVE_FIG2DEV" = "xyes" ; then fig2dev_quiet=`fig2dev -L png &1 >/dev/null` if test "x$fig2dev_quiet" = "x" ; then HAVE_FIG2DEV_PNG=yes fi fi HAVE_FIG2DEV_PDF=no if test "x$HAVE_FIG2DEV" = "xyes" ; then fig2dev_quiet=`fig2dev -L pdf &1 >/dev/null` if test "x$fig2dev_quiet" = "x" ; then HAVE_FIG2DEV_PDF=yes fi fi AC_CHECK_PROG(HAVE_PNGTOPNM, pngtopnm, yes, no) AC_CHECK_PROG(HAVE_PNMTOPS, pnmtops, yes, no) AC_CHECK_PROG(HAVE_EPSTOPDF, epstopdf, yes, no) dnl check if we can generate HTML if test "x$HAVE_DOCBOOK2HTML" = "xyes" && \ test "x$enable_docbook" = "xyes" && \ test "x$HAVE_XMLLINT" = "xyes" && \ test "x$HAVE_FIG2DEV_PNG" = "xyes"; then DOC_HTML=yes AC_MSG_NOTICE(Will output HTML documentation) else DOC_HTML=no AC_MSG_NOTICE(Will not output HTML documentation) fi dnl check if we can generate PS if test "x$HAVE_DOCBOOK2PS" = "xyes" && \ test "x$enable_docbook" = "xyes" && \ test "x$HAVE_XMLLINT" = "xyes" && \ test "x$HAVE_JADETEX" = "xyes" && \ test "x$HAVE_FIG2DEV_EPS" = "xyes" && \ test "x$HAVE_DVIPS" = "xyes" && \ test "x$HAVE_PNGTOPNM" = "xyes" && \ test "x$HAVE_PNMTOPS" = "xyes"; then DOC_PS=yes AC_MSG_NOTICE(Will output PS documentation) else DOC_PS=no AC_MSG_NOTICE(Will not output PS documentation) fi dnl check if we can generate PDF - using only ps2pdf if test "x$DOC_PS" = "xyes" && \ test "x$enable_docbook" = "xyes" && \ test "x$HAVE_XMLLINT" = "xyes" && \ test "x$HAVE_PS2PDF" = "xyes"; then DOC_PDF=yes AC_MSG_NOTICE(Will output PDF documentation) else DOC_PDF=no AC_MSG_NOTICE(Will not output PDF documentation) fi dnl if we don't have everything, we should disable if test "x$have_docbook" != "xyes"; then enable_docbook=no fi fi dnl if we're going to install documentation, tell us where if test "x$have_docbook" = "xyes"; then AC_MSG_NOTICE(Installing documentation in $docdir) AC_SUBST(docdir) fi AM_CONDITIONAL(ENABLE_DOCBOOK, test x$enable_docbook = xyes) AM_CONDITIONAL(DOC_HTML, test x$DOC_HTML = xyes) AM_CONDITIONAL(DOC_PDF, test x$DOC_PDF = xyes) AM_CONDITIONAL(DOC_PS, test x$DOC_PS = xyes) ]) farstream-0.2.7/common/m4/as-ac-expand.m40000664000076400007640000000210511710041611014740 00000000000000dnl as-ac-expand.m4 0.2.0 dnl autostars m4 macro for expanding directories using configure's prefix dnl thomas@apestaart.org dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) dnl example dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local AC_DEFUN([AS_AC_EXPAND], [ EXP_VAR=[$1] FROM_VAR=[$2] dnl first expand prefix and exec_prefix if necessary prefix_save=$prefix exec_prefix_save=$exec_prefix dnl if no prefix given, then use /usr/local, the default prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi dnl if no exec_prefix given, then use prefix if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" dnl loop until it doesn't change anymore while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done dnl clean up full_var=$new_full_var AC_SUBST([$1], "$full_var") dnl restore prefix and exec_prefix prefix=$prefix_save exec_prefix=$exec_prefix_save ]) farstream-0.2.7/common/m4/README0000664000076400007640000000032611710041611013120 00000000000000All aclocal .m4 files we need are put here and cat'd to acinclude.m4 in the source root. Official ones (taken from the relevant devel packages) are named as-is, unofficial ones (or changed ones) get a gst-prefix. farstream-0.2.7/common/m4/gst-arch.m40000664000076400007640000001206212406633262014226 00000000000000dnl AG_GST_ARCH dnl sets up defines and automake conditionals for host architecture dnl checks endianness dnl defines HOST_CPU AC_DEFUN([AG_GST_ARCH], [ dnl Determine CPU case "x${target_cpu}" in xi?86 | xk? | xi?86_64) case $target_os in solaris*) AC_CHECK_DECL([__i386], [I386_ABI="yes"], [I386_ABI="no"]) AC_CHECK_DECL([__amd64], [AMD64_ABI="yes"], [AMD64_ABI="no"]) if test "x$I386_ABI" = "xyes" ; then HAVE_CPU_I386=yes AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86]) fi if test "x$AMD64_ABI" = "xyes" ; then HAVE_CPU_X86_64=yes AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a x86_64]) fi ;; *) HAVE_CPU_I386=yes AC_DEFINE(HAVE_CPU_I386, 1, [Define if the target CPU is an x86]) dnl FIXME could use some better detection dnl (ie CPUID) case "x${target_cpu}" in xi386 | xi486) ;; *) AC_DEFINE(HAVE_RDTSC, 1, [Define if RDTSC is available]) ;; esac ;; esac ;; xpowerpc) HAVE_CPU_PPC=yes AC_DEFINE(HAVE_CPU_PPC, 1, [Define if the target CPU is a PowerPC]) ;; xpowerpc64) HAVE_CPU_PPC64=yes AC_DEFINE(HAVE_CPU_PPC64, 1, [Define if the target CPU is a 64 bit PowerPC]) ;; xalpha*) HAVE_CPU_ALPHA=yes AC_DEFINE(HAVE_CPU_ALPHA, 1, [Define if the target CPU is an Alpha]) ;; xarm*) HAVE_CPU_ARM=yes AC_DEFINE(HAVE_CPU_ARM, 1, [Define if the target CPU is an ARM]) ;; xsparc*) HAVE_CPU_SPARC=yes AC_DEFINE(HAVE_CPU_SPARC, 1, [Define if the target CPU is a SPARC]) ;; xmips*) HAVE_CPU_MIPS=yes AC_DEFINE(HAVE_CPU_MIPS, 1, [Define if the target CPU is a MIPS]) ;; xhppa*) HAVE_CPU_HPPA=yes AC_DEFINE(HAVE_CPU_HPPA, 1, [Define if the target CPU is a HPPA]) ;; xs390*) HAVE_CPU_S390=yes AC_DEFINE(HAVE_CPU_S390, 1, [Define if the target CPU is a S390]) ;; xia64*) HAVE_CPU_IA64=yes AC_DEFINE(HAVE_CPU_IA64, 1, [Define if the target CPU is a IA64]) ;; xm68k*) HAVE_CPU_M68K=yes AC_DEFINE(HAVE_CPU_M68K, 1, [Define if the target CPU is a M68K]) ;; xx86_64) HAVE_CPU_X86_64=yes AC_DEFINE(HAVE_CPU_X86_64, 1, [Define if the target CPU is a x86_64]) ;; xcris) HAVE_CPU_CRIS=yes AC_DEFINE(HAVE_CPU_CRIS, 1, [Define if the target CPU is a CRIS]) ;; xcrisv32) HAVE_CPU_CRISV32=yes AC_DEFINE(HAVE_CPU_CRISV32, 1, [Define if the target CPU is a CRISv32]) ;; esac dnl Determine endianness AC_C_BIGENDIAN AM_CONDITIONAL(HAVE_CPU_I386, test "x$HAVE_CPU_I386" = "xyes") AM_CONDITIONAL(HAVE_CPU_PPC, test "x$HAVE_CPU_PPC" = "xyes") AM_CONDITIONAL(HAVE_CPU_PPC64, test "x$HAVE_CPU_PPC64" = "xyes") AM_CONDITIONAL(HAVE_CPU_ALPHA, test "x$HAVE_CPU_ALPHA" = "xyes") AM_CONDITIONAL(HAVE_CPU_ARM, test "x$HAVE_CPU_ARM" = "xyes") AM_CONDITIONAL(HAVE_CPU_SPARC, test "x$HAVE_CPU_SPARC" = "xyes") AM_CONDITIONAL(HAVE_CPU_HPPA, test "x$HAVE_CPU_HPPA" = "xyes") AM_CONDITIONAL(HAVE_CPU_MIPS, test "x$HAVE_CPU_MIPS" = "xyes") AM_CONDITIONAL(HAVE_CPU_S390, test "x$HAVE_CPU_S390" = "xyes") AM_CONDITIONAL(HAVE_CPU_IA64, test "x$HAVE_CPU_IA64" = "xyes") AM_CONDITIONAL(HAVE_CPU_M68K, test "x$HAVE_CPU_M68K" = "xyes") AM_CONDITIONAL(HAVE_CPU_X86_64, test "x$HAVE_CPU_X86_64" = "xyes") AM_CONDITIONAL(HAVE_CPU_CRIS, test "x$HAVE_CPU_CRIS" = "xyes") AM_CONDITIONAL(HAVE_CPU_CRISV32, test "x$HAVE_CPU_CRISV32" = "xyes") AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu", [the host CPU]) AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu", [the target CPU]) ]) dnl check if unaligned memory access works correctly AC_DEFUN([AG_GST_UNALIGNED_ACCESS], [ AC_MSG_CHECKING([if unaligned memory access works correctly]) if test x"$as_cv_unaligned_access" = x ; then case $host in alpha*|arm*|hp*|mips*|sh*|sparc*|ia64*) _AS_ECHO_N([(blacklisted) ]) as_cv_unaligned_access=no ;; i?86*|x86_64*|amd64*|powerpc*|m68k*|cris*) _AS_ECHO_N([(whitelisted) ]) as_cv_unaligned_access=yes ;; esac else _AS_ECHO_N([(cached) ]) fi if test x"$as_cv_unaligned_access" = x ; then AC_TRY_RUN([ int main(int argc, char **argv) { char array[] = "ABCDEFGH"; unsigned int iarray[2]; memcpy(iarray,array,8); #define GET(x) (*(unsigned int *)((char *)iarray + (x))) if(GET(0) != 0x41424344 && GET(0) != 0x44434241) return 1; if(GET(1) != 0x42434445 && GET(1) != 0x45444342) return 1; if(GET(2) != 0x43444546 && GET(2) != 0x46454443) return 1; if(GET(3) != 0x44454647 && GET(3) != 0x47464544) return 1; return 0; } ], as_cv_unaligned_access="yes", as_cv_unaligned_access="no") fi AC_MSG_RESULT($as_cv_unaligned_access) if test "$as_cv_unaligned_access" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_UNALIGNED_ACCESS, 1, [defined if unaligned memory access works correctly]) fi ]) farstream-0.2.7/common/m4/introspection.m40000664000076400007640000000661411710557061015423 00000000000000dnl -*- mode: autoconf -*- dnl Copyright 2009 Johan Dahlin dnl dnl This file is free software; the author(s) gives unlimited dnl permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl # serial 1 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([LT_INIT],[$0])dnl setup libtool first dnl enable/disable introspection m4_if([$2], [require], [dnl enable_introspection=yes ],[dnl AC_ARG_ENABLE(introspection, AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], [Enable introspection for this build]),, [enable_introspection=auto]) ])dnl AC_MSG_CHECKING([for gobject-introspection]) dnl presence/version checking AS_CASE([$enable_introspection], [no], [dnl found_introspection="no (disabled, use --enable-introspection to enable)" ],dnl [yes],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0],, AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) ],dnl [auto],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) ],dnl [dnl AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) ])dnl AC_MSG_RESULT([$found_introspection]) INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi AC_SUBST(INTROSPECTION_SCANNER) AC_SUBST(INTROSPECTION_COMPILER) AC_SUBST(INTROSPECTION_GENERATE) AC_SUBST(INTROSPECTION_GIRDIR) AC_SUBST(INTROSPECTION_TYPELIBDIR) AC_SUBST(INTROSPECTION_CFLAGS) AC_SUBST(INTROSPECTION_LIBS) AC_SUBST(INTROSPECTION_MAKEFILE) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") ]) dnl Usage: dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) ]) dnl Usage: dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) ]) farstream-0.2.7/common/m4/gst-x11.m40000664000076400007640000000433611710041611013713 00000000000000dnl macros for X-related detections dnl AC_SUBST's HAVE_X, X_CFLAGS, X_LIBS AC_DEFUN([AG_GST_CHECK_X], [ AC_PATH_XTRA ac_cflags_save="$CFLAGS" ac_cppflags_save="$CPPFLAGS" CFLAGS="$CFLAGS $X_CFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" dnl now try to find the HEADER AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") if test "x$HAVE_X" = "xno" then AC_MSG_NOTICE([cannot find X11 development files]) else dnl this is much more than we want X_LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS" dnl AC_PATH_XTRA only defines the path needed to find the X libs, dnl it does not add the libs; therefore we add them here X_LIBS="$X_LIBS -lX11" AC_SUBST(X_CFLAGS) AC_SUBST(X_LIBS) fi AC_SUBST(HAVE_X) CFLAGS="$ac_cflags_save" CPPFLAGS="$ac_cppflags_save" ]) dnl *** XVideo *** dnl Look for the PIC library first, Debian requires it. dnl Check debian-devel archives for gory details. dnl 20020110: dnl At the moment XFree86 doesn't distribute shared libXv due dnl to unstable API. On many platforms you CAN NOT link a shared dnl lib to a static non-PIC lib. This is what the xvideo GStreamer dnl plug-in wants to do. So Debian distributes a PIC compiled dnl version of the static lib for plug-ins to link to when it is dnl inappropriate to link the main application to libXv directly. dnl FIXME: add check if this platform can support linking to a dnl non-PIC libXv, if not then don not use Xv. dnl FIXME: perhaps warn user if they have a shared libXv since dnl this is an error until XFree86 starts shipping one AC_DEFUN([AG_GST_CHECK_XV], [ if test x$HAVE_X = xyes; then AC_CHECK_LIB(Xv_pic, XvQueryExtension, HAVE_XVIDEO="yes", HAVE_XVIDEO="no", $X_LIBS -lXext) if test x$HAVE_XVIDEO = xyes; then XVIDEO_LIBS="-lXv_pic -lXext" AC_SUBST(XVIDEO_LIBS) else dnl try again using something else if we didn't find it first if test x$HAVE_XVIDEO = xno; then AC_CHECK_LIB(Xv, XvQueryExtension, HAVE_XVIDEO="yes", HAVE_XVIDEO="no", $X_LIBS -lXext) if test x$HAVE_XVIDEO = xyes; then XVIDEO_LIBS="-lXv -lXext" AC_SUBST(XVIDEO_LIBS) fi fi fi fi ]) farstream-0.2.7/common/m4/orc.m40000664000076400007640000000415011710557061013277 00000000000000dnl pkg-config-based checks for Orc dnl specific: dnl ORC_CHECK([REQUIRED_VERSION]) AC_DEFUN([ORC_CHECK], [ ORC_REQ=ifelse([$1], , "0.4.6", [$1]) AC_ARG_ENABLE(orc, AC_HELP_STRING([--enable-orc],[use Orc if installed]), [case "${enableval}" in auto) enable_orc=auto ;; yes) enable_orc=yes ;; no) enable_orc=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;; esac ], [enable_orc=auto]) dnl Default value if test "x$enable_orc" != "xno" ; then PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [ AC_DEFINE(HAVE_ORC, 1, [Use Orc]) HAVE_ORC=yes if test "x$ORCC" = "x" ; then AC_MSG_CHECKING(for usable orcc) ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` dnl check whether the orcc found by pkg-config can be run from the build environment dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`]) AC_MSG_RESULT($ORCC) fi AC_SUBST(ORCC) ORCC_FLAGS="--compat $ORC_REQ" AC_SUBST(ORCC_FLAGS) AS_IF([test "x$ORCC" = "x"], [HAVE_ORCC=no], [HAVE_ORCC=yes]) ], [ if test "x$enable_orc" = "xyes" ; then AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found]) fi AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) HAVE_ORC=no HAVE_ORCC=no ]) else AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) HAVE_ORC=no HAVE_ORCC=no fi AM_CONDITIONAL(HAVE_ORC, [test "x$HAVE_ORC" = "xyes"]) AM_CONDITIONAL(HAVE_ORCC, [test "x$HAVE_ORCC" = "xyes"]) ])) AC_DEFUN([ORC_OUTPUT], [ if test "$HAVE_ORC" = yes ; then printf "configure: *** Orc acceleration enabled.\n" else if test "x$enable_orc" = "xno" ; then printf "configure: *** Orc acceleration disabled by --disable-orc. Slower code paths\n" printf " will be used.\n" else printf "configure: *** Orc acceleration disabled. Requires Orc >= $ORC_REQ, which was\n" printf " not found. Slower code paths will be used.\n" fi fi printf "\n" ]) farstream-0.2.7/common/m4/as-libtool-tags.m40000664000076400007640000000476511710041611015516 00000000000000dnl as-libtool-tags.m4 0.1.4 dnl autostars m4 macro for selecting libtool "tags" (languages) dnl Andy Wingo does not claim credit for this macro dnl backported from libtool 1.6 by Paolo Bonzini dnl see http://lists.gnu.org/archive/html/libtool/2003-12/msg00007.html dnl $Id$ dnl AS_LIBTOOL_TAGS([tags...]) dnl example dnl AS_LIBTOOL_TAGS([]) for only C (no fortran, etc) dnl When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG dnl to be more similar to the libtool 1.6 implementation, which dnl uses an m4 loop and m4 case instead of a shell loop. This dnl way the CXX/GCJ/F77/RC tests are not always expanded. dnl AS_LIBTOOL_TAGS dnl --------------- dnl tags to enable AC_DEFUN([AS_LIBTOOL_TAGS], [m4_define([_LT_TAGS],[$1]) m4_define([_LT_AC_TAGCONFIG], [ # redefined LT AC TAGCONFIG if test -f "$ltmain"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi AC_FOREACH([_LT_TAG], _LT_TAGS, echo THOMAS: tag _LT_TAG [m4_case(_LT_TAG, [CXX], [ if test -n "$CXX" && test "X$CXX" != "Xno"; then echo "THOMAS: YAY CXX" AC_LIBTOOL_LANG_CXX_CONFIG available_tags="$available_tags _LT_TAG" fi], [F77], [ if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG available_tags="$available_tags _LT_TAG" fi], [GCJ], [ if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG available_tags="$available_tags _LT_TAG" fi], [RC], [ if test -n "$RC" && test "X$RC" != "Xno"; then AC_LIBTOOL_LANG_RC_CONFIG available_tags="$available_tags _LT_TAG" fi], [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG") m4_exit(1)]) ]) echo THOMAS: available tags: $available_tags fi # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" AC_MSG_NOTICE([updated available libtool tags with $available_tags.]) else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi ])dnl _LT_AC_TAG_CONFIG ]) farstream-0.2.7/common/m4/gst-gettext.m40000664000076400007640000000102611710041611014757 00000000000000dnl gettext setup dnl AG_GST_GETTEXT([gettext-package]) dnl defines GETTEXT_PACKAGE and LOCALEDIR AC_DEFUN([AG_GST_GETTEXT], [ if test "$USE_NLS" = "yes"; then GETTEXT_PACKAGE=[$1] else GETTEXT_PACKAGE=[NULL] fi AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [gettext package name]) dnl define LOCALEDIR in config.h AS_AC_EXPAND(LOCALEDIR, $datadir/locale) AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR", [gettext locale dir]) ]) farstream-0.2.7/common/m4/as-gcc-inline-assembly.m40000664000076400007640000000212411710041611016726 00000000000000dnl as-gcc-inline-assembly.m4 0.1.0 dnl autostars m4 macro for detection of gcc inline assembly dnl David Schleef dnl $Id$ dnl AS_COMPILER_FLAG(ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_GCC_INLINE_ASSEMBLY], [ AC_MSG_CHECKING([if compiler supports gcc-style inline assembly]) AC_TRY_COMPILE([], [ #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004 #error GCC before 3.4 has critical bugs compiling inline assembly #endif #endif __asm__ (""::) ], [flag_ok=yes], [flag_ok=no]) if test "X$flag_ok" = Xyes ; then $1 true else $2 true fi AC_MSG_RESULT([$flag_ok]) ]) AC_DEFUN([AS_GCC_ASM_POWERPC_FPU], [ AC_MSG_CHECKING([if compiler supports FPU instructions on PowerPC]) AC_TRY_COMPILE([], [__asm__ ("fadd 0,0,0"::) ], [flag_ok=yes], [flag_ok=no]) if test "X$flag_ok" = Xyes ; then $1 true else $2 true fi AC_MSG_RESULT([$flag_ok]) ]) farstream-0.2.7/common/m4/as-compiler-flag.m40000664000076400007640000000403612406633262015642 00000000000000dnl as-compiler-flag.m4 0.1.0 dnl autostars m4 macro for detection of compiler flags dnl David Schleef dnl Tim-Philipp Müller dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_COMPILER_FLAG], [ AC_MSG_CHECKING([to see if compiler understands $1]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_CXX_COMPILER_FLAG(CPPFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CPPFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_CXX_COMPILER_FLAG], [ AC_REQUIRE([AC_PROG_CXX]) AC_MSG_CHECKING([to see if c++ compiler understands $1]) save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $1" AC_LANG_PUSH(C++) AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) CPPFLAGS="$save_CPPFLAGS" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_LANG_POP(C++) AC_MSG_RESULT([$flag_ok]) ]) dnl AS_OBJC_COMPILER_FLAG(CPPFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CPPFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_OBJC_COMPILER_FLAG], [ AC_REQUIRE([AC_PROG_OBJC]) AC_MSG_CHECKING([to see if Objective C compiler understands $1]) save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $1" AC_LANG_PUSH([Objective C]) AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) CPPFLAGS="$save_CPPFLAGS" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_LANG_POP([Objective C]) AC_MSG_RESULT([$flag_ok]) ]) farstream-0.2.7/common/m4/gst-debuginfo.m40000664000076400007640000000306311710041611015240 00000000000000AC_DEFUN([AG_GST_DEBUGINFO], [ AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]), [case "${enableval}" in yes) USE_DEBUG=yes ;; no) USE_DEBUG=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac], [USE_DEBUG=yes]) dnl Default value AC_ARG_ENABLE(DEBUG, AC_HELP_STRING([--disable-DEBUG],[disables compilation of debugging messages]), [case "${enableval}" in yes) ENABLE_DEBUG=yes ;; no) ENABLE_DEBUG=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;; esac], [ENABLE_DEBUG=yes]) dnl Default value if test x$ENABLE_DEBUG = xyes; then AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in]) fi AC_ARG_ENABLE(INFO, AC_HELP_STRING([--disable-INFO],[disables compilation of informational messages]), [case "${enableval}" in yes) ENABLE_INFO=yes ;; no) ENABLE_INFO=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;; esac], [ENABLE_INFO=yes]) dnl Default value if test x$ENABLE_INFO = xyes; then AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in]) fi AC_ARG_ENABLE(debug-color, AC_HELP_STRING([--disable-debug-color],[disables color output of DEBUG and INFO output]), [case "${enableval}" in yes) ENABLE_DEBUG_COLOR=yes ;; no) ENABLE_DEBUG_COLOR=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;; esac], [ENABLE_DEBUG_COLOR=yes]) dnl Default value if test "x$ENABLE_DEBUG_COLOR" = xyes; then AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized]) fi ]) farstream-0.2.7/common/m4/as-auto-alt.m40000664000076400007640000000300411710041611014625 00000000000000dnl as-auto-alt.m4 0.0.2 dnl autostars m4 macro for supplying alternate autotools versions to configure dnl thomas@apestaart.org dnl dnl AS_AUTOTOOLS_ALTERNATE() dnl dnl supplies --with arguments for autoconf, autoheader, automake, aclocal AC_DEFUN([AS_AUTOTOOLS_ALTERNATE], [ dnl allow for different autoconf version AC_ARG_WITH(autoconf, AC_HELP_STRING([--with-autoconf], [use a different autoconf for regeneration of Makefiles]), [ unset AUTOCONF AM_MISSING_PROG(AUTOCONF, ${withval}) AC_MSG_NOTICE([Using $AUTOCONF as autoconf]) ]) dnl allow for different autoheader version AC_ARG_WITH(autoheader, AC_HELP_STRING([--with-autoheader], [use a different autoheader for regeneration of Makefiles]), [ unset AUTOHEADER AM_MISSING_PROG(AUTOHEADER, ${withval}) AC_MSG_NOTICE([Using $AUTOHEADER as autoheader]) ]) dnl allow for different automake version AC_ARG_WITH(automake, AC_HELP_STRING([--with-automake], [use a different automake for regeneration of Makefiles]), [ unset AUTOMAKE AM_MISSING_PROG(AUTOMAKE, ${withval}) AC_MSG_NOTICE([Using $AUTOMAKE as automake]) ]) dnl allow for different aclocal version AC_ARG_WITH(aclocal, AC_HELP_STRING([--with-aclocal], [use a different aclocal for regeneration of Makefiles]), [ unset ACLOCAL AM_MISSING_PROG(ACLOCAL, ${withval}) AC_MSG_NOTICE([Using $ACLOCAL as aclocal]) ]) ]) farstream-0.2.7/common/scangobj-merge.py0000775000076400007640000002241311710557061015174 00000000000000#!/usr/bin/python # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 """ parse, merge and write gstdoc-scanobj files """ import sys import os def debug(*args): pass # OrderedDict class based on # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747 # Licensed under the Python License class OrderedDict(dict): def __init__(self): self._keys = [] dict.__init__(self) def __delitem__(self, key): dict.__delitem__(self, key) self._keys.remove(key) def __setitem__(self, key, item): dict.__setitem__(self, key, item) if key not in self._keys: self._keys.append(key) def clear(self): dict.clear(self) self._keys = [] def copy(self): dict = dict.copy(self) dict._keys = self._keys[:] return dict def items(self): return zip(self._keys, self.values()) def keys(self): return self._keys def popitem(self): try: key = self._keys[-1] except IndexError: raise KeyError('dictionary is empty') val = self[key] del self[key] return (key, val) def setdefault(self, key, failobj = None): dict.setdefault(self, key, failobj) if key not in self._keys: self._keys.append(key) def update(self, dict): dict.update(self, dict) for key in dict.keys(): if key not in self._keys: self._keys.append(key) def values(self): return map(self.get, self._keys) class Object: def __init__(self, name): self._signals = OrderedDict() self._args = OrderedDict() self.name = name def __repr__(self): return "" % self.name def add_signal(self, signal, overwrite=True): if not overwrite and self._signals.has_key(signal.name): raise IndexError, "signal %s already in %r" % (signal.name, self) self._signals[signal.name] = signal def add_arg(self, arg, overwrite=True): if not overwrite and self._args.has_key(arg.name): raise IndexError, "arg %s already in %r" % (arg.name, self) self._args[arg.name] = arg class Docable: def __init__(self, **kwargs): for key in self.attrs: setattr(self, key, kwargs[key]) self.dict = kwargs def __repr__(self): return "<%r %s>" % (str(self.__class__), self.name) class Signal(Docable): attrs = ['name', 'returns', 'args'] class Arg(Docable): attrs = ['name', 'type', 'range', 'flags', 'nick', 'blurb', 'default'] class GDoc: def load_file(self, filename): try: lines = open(filename).readlines() self.load_data("".join(lines)) except IOError: print "WARNING - could not read from %s" % filename def save_file(self, filename, backup=False): """ Save the information to the given file if the file content changed. """ olddata = None try: lines = open(filename).readlines() olddata = "".join(lines) except IOError: print "WARNING - could not read from %s" % filename newdata = self.get_data() if olddata and olddata == newdata: return if olddata: if backup: os.rename(filename, filename + '.bak') handle = open(filename, "w") handle.write(newdata) handle.close() class Signals(GDoc): def __init__(self): self._objects = OrderedDict() def load_data(self, data): """ Load the .signals lines, creating our list of objects and signals. """ import re smatcher = re.compile( '(?s)' # make . match \n '\n(.*?)\n' ) nmatcher = re.compile( '' '(?P\S*)' # store object '::' '(?P\S*)' # store signal '' ) rmatcher = re.compile( '(?s)' # make . match \n '(?P\S*)\n' # store returns '(?P.*)' # store args ) for block in smatcher.findall(data): nmatch = nmatcher.search(block) if nmatch: o = nmatch.group('object') debug("Found object", o) debug("Found signal", nmatch.group('signal')) if not self._objects.has_key(o): object = Object(o) self._objects[o] = object rmatch = rmatcher.search(block) if rmatch: dict = rmatch.groupdict().copy() dict['name'] = nmatch.group('signal') signal = Signal(**dict) self._objects[o].add_signal(signal) def get_data(self): lines = [] for o in self._objects.values(): for s in o._signals.values(): block = """ %(object)s::%(name)s %(returns)s %(args)s """ d = s.dict.copy() d['object'] = o.name lines.append(block % d) return "\n".join(lines) + '\n' class Args(GDoc): def __init__(self): self._objects = OrderedDict() def load_data(self, data): """ Load the .args lines, creating our list of objects and args. """ import re amatcher = re.compile( '(?s)' # make . match \n '\n(.*?)\n' ) nmatcher = re.compile( '' '(?P\S*)' # store object '::' '(?P\S*)' # store arg '' ) rmatcher = re.compile( '(?s)' # make . match \n '(?P\S*)\n' # store type '(?P.*?)\n' # store range '(?P\S*)\n' # store flags '(?P.*?)\n' # store nick '(?P.*?)\n' # store blurb '(?P.*?)\n' # store default ) for block in amatcher.findall(data): nmatch = nmatcher.search(block) if nmatch: o = nmatch.group('object') debug("Found object", o) debug("Found arg", nmatch.group('arg')) if not self._objects.has_key(o): object = Object(o) self._objects[o] = object rmatch = rmatcher.search(block) if rmatch: dict = rmatch.groupdict().copy() dict['name'] = nmatch.group('arg') arg = Arg(**dict) self._objects[o].add_arg(arg) else: print "ERROR: could not match arg from block %s" % block def get_data(self): lines = [] for o in self._objects.values(): for a in o._args.values(): block = """ %(object)s::%(name)s %(type)s %(range)s %(flags)s %(nick)s %(blurb)s %(default)s """ d = a.dict.copy() d['object'] = o.name lines.append(block % d) return "\n".join(lines) + '\n' class SingleLine(GDoc): def __init__(self): self._objects = [] def load_data(self, data): """ Load the .interfaces/.prerequisites lines, merge duplicates """ # split data on '\n' lines = data.splitlines(); # merge them into self._objects for line in lines: if line not in self._objects: self._objects.append(line) def get_data(self): lines = sorted(self._objects) return "\n".join(lines) + '\n' def main(argv): modulename = None try: modulename = argv[1] except IndexError: sys.stderr.write('Please provide a documentation module name\n') sys.exit(1) signals = Signals() signals.load_file(modulename + '.signals') signals.load_file(modulename + '.signals.new') signals.save_file(modulename + '.signals', backup=True) os.unlink(modulename + '.signals.new') args = Args() args.load_file(modulename + '.args') args.load_file(modulename + '.args.new') args.save_file(modulename + '.args', backup=True) os.unlink(modulename + '.args.new') ifaces = SingleLine() ifaces.load_file(modulename + '.interfaces') ifaces.load_file(modulename + '.interfaces.new') ifaces.save_file(modulename + '.interfaces', backup=True) os.unlink(modulename + '.interfaces.new') prereq = SingleLine() prereq.load_file(modulename + '.prerequisites') prereq.load_file(modulename + '.prerequisites.new') prereq.save_file(modulename + '.prerequisites', backup=True) os.unlink(modulename + '.prerequisites.new') main(sys.argv) farstream-0.2.7/common/cruft.mak0000664000076400007640000000312211710041611013532 00000000000000# checks for left-over files in the (usually uninstalled) tree, ie. for # stuff that best be deleted to avoid problems like having old plugin binaries # lying around. # # set CRUFT_FILES and/or CRUFT_DIRS in your Makefile.am when you include this check-cruft: @cruft_files=""; cruft_dirs=""; \ for f in $(CRUFT_FILES); do \ if test -e $$f; then \ cruft_files="$$cruft_files $$f"; \ fi \ done; \ for d in $(CRUFT_DIRS); do \ if test -e $$d; then \ cruft_dirs="$$cruft_dirs $$d"; \ fi \ done; \ if test "x$$cruft_files$$cruft_dirs" != x; then \ echo; \ echo "**** CRUFT ALERT *****"; \ echo; \ echo "The following files and directories may not be needed any "; \ echo "longer (usually because a plugin has been merged into "; \ echo "another plugin, moved to a different module, or been "; \ echo "renamed), and you probably want to clean them up if you "; \ echo "don't have local changes: "; \ echo; \ for f in $$cruft_files; do echo "file $$f"; done; \ echo; \ for d in $$cruft_dirs; do echo "directory $$d"; done; \ echo; \ echo "'make clean-cruft' will remove these for you."; \ echo; \ fi clean-cruft-dirs: @for d in $(CRUFT_DIRS); do \ if test -e $$d; then \ rm -r "$$d" && echo "Removed directory $$d"; \ fi \ done clean-cruft-files: @for f in $(CRUFT_FILES); do \ if test -e $$f; then \ rm "$$f" && echo "Removed file $$f"; \ fi \ done clean-cruft: clean-cruft-dirs clean-cruft-files # also might want to add this to your Makefile.am: # # all-local: check-cruft farstream-0.2.7/common/c-to-xml.py0000664000076400007640000000146011710041611013732 00000000000000# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 """ Convert a C program to valid XML to be included in docbook """ import sys import os from xml.sax import saxutils def main(): if len(sys.argv) == 1: sys.stderr.write("Please specify a source file to convert") sys.exit(1) source = sys.argv[1] if not os.path.exists(source): sys.stderr.write("%s does not exist.\n" % source) sys.exit(1) content = open(source, "r").read() # print header print '' print '' print print '' # print content print saxutils.escape(content).encode('UTF-8') print '' main() farstream-0.2.7/common/download-translations0000775000076400007640000001130111710041611016167 00000000000000#!/bin/sh # Shell script to download the latest translations for a given GStreamer # package from translationproject.org # DOMAINS based on http://translationproject.org/extra/matrix.html # We need to check all domains, not only po/LINGUAS, since there might be # new translations DOMAINS=\ "af am ar az be bg pt_BR bs ca zh_CN cs cy da de el eo es et eu fa fi fr "\ "ga en_GB gl gu he hi zh_HK hr hu id is it ja ko ku ky lg lt lv mk mn ms "\ "mt nb ne nl nn or pa pl pt rm ro ru rw sk sl sq sr sv ta tq th tk "\ "tr zh_TW uk ven vi wa xh zu" # for testing/debugging: #DOMAINS="es fr hu sv pl xx" # check for 'diff' program diff --version 2>/dev/null >/dev/null if [ ! $? ]; then echo "==== You must have the 'diff' program installed for this script ====" exit 1 fi # check for 'wget' program wget --version 2>/dev/null >/dev/null if [ ! $? ]; then echo "==== You must have the 'wget' program installed for this script ====" exit 1 fi # make sure we're in the top-level directory if [ ! -d ./po ]; then echo "==== No ./po directory in the current working directory ====" exit 1 fi # make sure a package argument was passed to us if [ -z "$1" ]; then echo "Usage: $0 PACKAGE, e.g. $0 gst-plugins-good" exit 1 fi if test "$1" != "gstreamer" -a \ "$1" != "gst-plugins-base" -a \ "$1" != "gst-plugins-good" -a \ "$1" != "gst-plugins-ugly" -a \ "$1" != "gst-plugins-bad"; then echo "Unexpected package '$1' ?!" exit 1 fi PACKAGE="$1" DOMAINS_TO_ADD="" DOMAINS_UPDATED="" DOMAINS_NOT_IN_LINGUAS="" echo "Downloading latest translation files for package $PACKAGE ..." echo for d in $DOMAINS do PACKAGE_PO_URL_BASE="http://translationproject.org/latest/$PACKAGE" PO_URL="$PACKAGE_PO_URL_BASE/$d.po" PO_FILENAME="$PACKAGE.$d.po" if wget -q -nc -O $PO_FILENAME $PO_URL; then # we want all .po files in UTF-8 format really, so convert if needed.. CHARSET=`grep Content-Type $PO_FILENAME | sed -e 's/.*charset=\(.*\)\\\\n.*/\1/'` if test "x$CHARSET" != "xUTF-8" -a "x$CHARSET" != "xutf-8"; then # note: things like the bugs address will be added back by make update-po if msguniq $PO_FILENAME --no-location \ --output-file=$PO_FILENAME.utf8 \ --to-code=UTF-8; then mv $PO_FILENAME.utf8 $PO_FILENAME else echo "**** $d: conversion from $CHARSET to UTF-8 failed ****" fi fi if [ -f "po/$d.po" ]; then # ./po/foo.po exists, so let's check if ours matches the latest from the # translation project website REVDATE_NEW=`grep PO-Revision-Date $PO_FILENAME`; REVDATE_OLD=`grep PO-Revision-Date po/$d.po`; CHARSET_OLD=`grep Content-Type po/$d.po | sed -e 's/.*charset=\(.*\)\\\\n.*/\1/'` if test "x$REVDATE_NEW" = "x$REVDATE_OLD" -a "x$CHARSET_OLD" = "xUTF-8"; then # note: source code line markers will be removed later by make upload-po echo "$d.po: up-to-date" rm -f $PO_FILENAME else mv $PO_FILENAME "po/$d.po" if test "x$CHARSET_OLD" != "xUTF-8" -a "x$CHARSET_OLD" != "xutf-8"; then echo "$d.po: update (and charset converted from $CHARSET_OLD to UTF-8)" else echo "$d.po: updated" fi DOMAINS_UPDATED="$DOMAINS_UPDATED $d" fi # make sure domain is listed in LINGUAS if ! grep $d "po/LINGUAS" >/dev/null 2>/dev/null; then DOMAINS_NOT_IN_LINGUAS="$DOMAINS_NOT_IN_LINGUAS $d" fi else # ./po/foo.po doesn't exist, but foo.po exists on the translation project # website, so it's probably a new translation echo "$d.po: new language" mv $PO_FILENAME "po/$d.po" DOMAINS_UPDATED="$DOMAINS_UPDATED $d" DOMAINS_TO_ADD="$DOMAINS_TO_ADD $d" fi else rm -f $PO_FILENAME echo "$d.po: failure (does probably not exist)" fi done if [ -n "$DOMAINS_UPDATED" ]; then echo "====================================================================" echo echo "Language domains updated :$DOMAINS_UPDATED" echo "Language domains to git add :$DOMAINS_TO_ADD" echo echo "Source: http://translationproject.org/latest/$PACKAGE/" echo if [ -n "$DOMAINS_TO_ADD" ]; then CMD_STRING="git add" for d in $DOMAINS_TO_ADD; do CMD_STRING="$CMD_STRING po/$d.po" done echo "Please run" echo echo " $CMD_STRING" echo echo "now and add the following domains to the po/LINGUAS file:" echo echo " $DOMAINS_TO_ADD" echo echo fi echo "====================================================================" fi if [ -n "$DOMAINS_NOT_IN_LINGUAS" ]; then echo echo "Existing domains missing from the po/LINGUAS file:" echo echo " $DOMAINS_NOT_IN_LINGUAS" echo echo fi farstream-0.2.7/common/win32.mak0000664000076400007640000000473012406633262013373 00000000000000# various tests to make sure we dist the win32 stuff (for MSVC builds) right # the MANIFEST contains all win32 related files that should be disted win32 = $(shell cat $(top_srcdir)/win32/MANIFEST) # wildcard is apparently not portable to other makes, hence the use of find # these are library .def files with the symbols to export win32defs = $(shell find $(top_srcdir)/win32/common -name '*.def') # wildcard is apparently not portable to other makes, hence the use of find # these are files that need to be disted with CRLF line endings: win32crlf = $(shell find $(top_srcdir)/win32 -name '*.dsw' -o -name '*.dsp') win32-debug: @echo; \ echo win32 = $(win32); \ echo; \ echo win32defs = $(win32defs); \ echo; \ echo win32crlf = $(win32crlf); \ echo win32-check-crlf: @echo Checking win32 files for CR LF line endings ...; \ fail=0 ; \ for each in $(win32crlf) ; do \ result=`perl -e 'print grep(/\r\n/,<>)' "$$each" | wc -l`; \ if test "$$result" = 0 ; then \ echo $$each must be fixed to have CRLF line endings ; \ fail=1; \ fi ; \ done ; \ exit $$fail # make sure all symbols we export on linux are defined in the win32 .def too # (don't care about other unixes for now, it's enough if it works on one of # the linux build bots; we assume .so ) check-exports: @fail=0 ; \ for l in $(win32defs); do \ libbase=`basename "$$l" ".def"`; \ libso=`find "$(top_builddir)" -name "$$libbase-@GST_API_VERSION@.so" | grep -v /_build/ | head -n1`; \ libdef="$(top_srcdir)/win32/common/$$libbase.def"; \ if test "x$$libso" != "x"; then \ echo Checking symbols in $$libso; \ if ! ($(top_srcdir)/common/check-exports $$libdef $$libso) ; then \ fail=1; \ fi; \ fi; \ done ; \ if test $$fail != 0; then \ echo '-----------------------------------------------------------'; \ echo 'Run this to update the .def files:'; \ echo 'make check-exports 2>&1 | patch -p1'; \ echo '-----------------------------------------------------------'; \ fi; \ exit $$fail # complain about nonportable printf format strings (%lld, %llu, %zu etc.) check-nonportable-print-format: @fail=0 ; \ loc=`find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[udx]' -e '%[0-9]*z[udx]'`; \ if test "x$$loc" != "x"; then \ echo "Please fix the following print format strings:" ; \ find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[udx]' -e '%[0-9]*z[udx]'; \ fail=1; \ fi; \ exit $$fail dist-hook: check-exports win32-check-crlf farstream-0.2.7/common/glib-gen.mak0000664000076400007640000000422511710041611014100 00000000000000# these are the variables your Makefile.am should set # the example is based on the colorbalance interface #glib_enum_headers=$(colorbalance_headers) #glib_enum_define=GST_COLOR_BALANCE #glib_enum_prefix=gst_color_balance enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") # these are all the rules generating the relevant files %-marshal.h: %-marshal.list $(AM_V_GEN)glib-genmarshal --header --prefix=$(glib_enum_prefix)_marshal $^ > $*-marshal.h.tmp && \ mv $*-marshal.h.tmp $*-marshal.h %-marshal.c: %-marshal.list $(AM_V_GEN)echo "#include \"$*-marshal.h\"" >> $*-marshal.c.tmp && \ glib-genmarshal --body --prefix=$(glib_enum_prefix)_marshal $^ >> $*-marshal.c.tmp && \ mv $*-marshal.c.tmp $*-marshal.c %-enumtypes.h: $(glib_enum_headers) $(AM_V_GEN)glib-mkenums \ --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "\n/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \ $^ > $@ %-enumtypes.c: $(glib_enum_headers) @if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi $(AM_V_GEN)glib-mkenums \ --fhead "#include \"$*-enumtypes.h\"\n$(enum_headers)" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n" \ $^ > $@ # a hack rule to make sure .Plo files exist because they get include'd # from Makefile's .deps/%-marshal.Plo: @touch $@ .deps/%-enumtypes.Plo: @touch $@ farstream-0.2.7/common/gst-autogen.sh0000664000076400007640000002265412406633262014535 00000000000000# a silly hack that generates autoregen.sh but it's handy # Remove the old autoregen.sh first to create a new file, # as the current one may be being read by the shell executing # this script. if [ -f "autoregen.sh" ]; then rm autoregen.sh fi echo "#!/bin/sh" > autoregen.sh echo "./autogen.sh $@ \$@" >> autoregen.sh chmod +x autoregen.sh # helper functions for autogen.sh debug () # print out a debug message if DEBUG is a defined variable { if test ! -z "$DEBUG" then echo "DEBUG: $1" fi } version_get () # based on the command's version output, set variables # _MAJOR, _MINOR, _MICRO, _VERSION, using the given prefix as variable prefix # # arg 1: command binary name # arg 2: (uppercased) variable name prefix { COMMAND=$1 VARPREFIX=`echo $2 | tr .,- _` # strip everything that's not a digit, then use cut to get the first field pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*)[^0-9]*//'|cut -d' ' -f1` debug "pkg_version $pkg_version" # remove any non-digit characters from the version numbers to permit numeric # comparison pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g` pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g` pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g` test -z "$pkg_major" && pkg_major=0 test -z "$pkg_minor" && pkg_minor=0 test -z "$pkg_micro" && pkg_micro=0 debug "found major $pkg_major minor $pkg_minor micro $pkg_micro" eval ${VARPREFIX}_MAJOR=$pkg_major eval ${VARPREFIX}_MINOR=$pkg_minor eval ${VARPREFIX}_MICRO=$pkg_micro eval ${VARPREFIX}_VERSION=$pkg_version } version_compare () # Checks whether the version of VARPREFIX is equal to or # newer than the requested version # arg1: VARPREFIX # arg2: MAJOR # arg3: MINOR # arg4: MICRO { VARPREFIX=`echo $1 | tr .,- _` MAJOR=$2 MINOR=$3 MICRO=$4 eval pkg_major=\$${VARPREFIX}_MAJOR; eval pkg_minor=\$${VARPREFIX}_MINOR; eval pkg_micro=\$${VARPREFIX}_MICRO; #start checking the version debug "version_compare: $VARPREFIX against $MAJOR.$MINOR.$MICRO" # reset check WRONG= if [ ! "$pkg_major" -gt "$MAJOR" ]; then debug "major: $pkg_major <= $MAJOR" if [ "$pkg_major" -lt "$MAJOR" ]; then debug "major: $pkg_major < $MAJOR" WRONG=1 elif [ ! "$pkg_minor" -gt "$MINOR" ]; then debug "minor: $pkg_minor <= $MINOR" if [ "$pkg_minor" -lt "$MINOR" ]; then debug "minor: $pkg_minor < $MINOR" WRONG=1 elif [ "$pkg_micro" -lt "$MICRO" ]; then debug "micro: $pkg_micro < $MICRO" WRONG=1 fi fi fi if test ! -z "$WRONG"; then debug "version_compare: $VARPREFIX older than $MAJOR.$MINOR.$MICRO" return 1 fi debug "version_compare: $VARPREFIX equal to/newer than $MAJOR.$MINOR.$MICRO" return 0 } version_check () # check the version of a package # first argument : package name (executable) # second argument : optional path where to look for it instead # third argument : source download url # rest of arguments : major, minor, micro version # all consecutive ones : suggestions for binaries to use # (if not specified in second argument) { PACKAGE=$1 PKG_PATH=$2 URL=$3 MAJOR=$4 MINOR=$5 MICRO=$6 # for backwards compatibility, we let PKG_PATH=PACKAGE when PKG_PATH null if test -z "$PKG_PATH"; then PKG_PATH=$PACKAGE; fi debug "major $MAJOR minor $MINOR micro $MICRO" VERSION=$MAJOR if test ! -z "$MINOR"; then VERSION=$VERSION.$MINOR; else MINOR=0; fi if test ! -z "$MICRO"; then VERSION=$VERSION.$MICRO; else MICRO=0; fi debug "major $MAJOR minor $MINOR micro $MICRO" for SUGGESTION in $PKG_PATH; do COMMAND="$SUGGESTION" # don't check if asked not to test -z "$NOCHECK" && { printf " checking for $COMMAND >= $VERSION ... " } || { # we set a var with the same name as the package, but stripped of # unwanted chars VAR=`echo $PACKAGE | sed 's/-//g'` debug "setting $VAR" eval $VAR="$COMMAND" return 0 } which $COMMAND > /dev/null 2>&1 if test $? -eq 1; then debug "$COMMAND not found" continue fi VARPREFIX=`echo $COMMAND | sed 's/-//g' | tr [:lower:] [:upper:]` version_get $COMMAND $VARPREFIX version_compare $VARPREFIX $MAJOR $MINOR $MICRO if test $? -ne 0; then echo "found $pkg_version, not ok !" continue else echo "found $pkg_version, ok." # we set a var with the same name as the package, but stripped of # unwanted chars VAR=`echo $PACKAGE | sed 's/-//g'` debug "setting $VAR" eval $VAR="$COMMAND" return 0 fi done echo "$PACKAGE not found !" echo "You must have $PACKAGE installed to compile $package." echo "Download the appropriate package for your distribution," echo "or get the source tarball at $URL" return 1; } aclocal_check () { # normally aclocal is part of automake # so we expect it to be in the same place as automake # so if a different automake is supplied, we need to adapt as well # so how's about replacing automake with aclocal in the set var, # and saving that in $aclocal ? # note, this will fail if the actual automake isn't called automake* # or if part of the path before it contains it if [ -z "$automake" ]; then echo "Error: no automake variable set !" return 1 else aclocal=`echo $automake | sed s/automake/aclocal/` debug "aclocal: $aclocal" if [ "$aclocal" != "aclocal" ]; then CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-aclocal=$aclocal" fi if [ ! -x `which $aclocal` ]; then echo "Error: cannot execute $aclocal !" return 1 fi fi } autoheader_check () { # same here - autoheader is part of autoconf # use the same voodoo if [ -z "$autoconf" ]; then echo "Error: no autoconf variable set !" return 1 else autoheader=`echo $autoconf | sed s/autoconf/autoheader/` debug "autoheader: $autoheader" if [ "$autoheader" != "autoheader" ]; then CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoheader=$autoheader" fi if [ ! -x `which $autoheader` ]; then echo "Error: cannot execute $autoheader !" return 1 fi fi } die_check () { # call with $DIE # if set to 1, we need to print something helpful then die DIE=$1 if test "x$DIE" = "x1"; then echo echo "- Please get the right tools before proceeding." echo "- Alternatively, if you're sure we're wrong, run with --nocheck." exit 1 fi } autogen_options () { if test "x$1" = "x"; then return 0 fi while test "x$1" != "x" ; do optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` case "$1" in --noconfigure) NOCONFIGURE=defined AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --noconfigure" echo "+ configure run disabled" shift ;; --nocheck) AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --nocheck" NOCHECK=defined echo "+ autotools version check disabled" shift ;; -d|--debug) DEBUG=defined AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --debug" echo "+ debug output enabled" shift ;; -h|--help) echo "autogen.sh (autogen options) -- (configure options)" echo "autogen.sh help options: " echo " --noconfigure don't run the configure script" echo " --nocheck don't do version checks" echo " --debug debug the autogen process" echo echo " --with-autoconf PATH use autoconf in PATH" echo " --with-automake PATH use automake in PATH" echo echo "Any argument either not in the above list or after a '--' will be " echo "passed to ./configure." exit 1 ;; --with-automake=*) AUTOMAKE=$optarg echo "+ using alternate automake in $optarg" CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-automake=$AUTOMAKE" shift ;; --with-autoconf=*) AUTOCONF=$optarg echo "+ using alternate autoconf in $optarg" CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoconf=$AUTOCONF" shift ;; --) shift ; break ;; *) echo "+ passing argument $1 to configure" CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $1" shift ;; esac done for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done if test ! -z "$CONFIGURE_EXT_OPT" then echo "+ options passed to configure: $CONFIGURE_EXT_OPT" fi } toplevel_check () { srcfile=$1 test -f $srcfile || { echo "You must run this script in the top-level $package directory" exit 1 } } tool_run () { tool=$1 options=$2 run_if_fail=$3 echo "+ running $tool $options..." $tool $options || { echo echo $tool failed eval $run_if_fail exit 1 } } install_git_hooks () { if test -d .git; then # install pre-commit hook for doing clean commits for hook in pre-commit; do if test ! \( -x .git/hooks/$hook -a -L .git/hooks/$hook \); then echo "+ Installing git $hook hook" rm -f .git/hooks/$hook ln -s ../../common/hooks/$hook.hook .git/hooks/$hook || { # if we couldn't create a symbolic link, try doing a plain cp if cp common/hooks/pre-commit.hook .git/hooks/pre-commit; then chmod +x .git/hooks/pre-commit; else echo "********** Couldn't install git $hook hook **********"; fi } fi done fi } farstream-0.2.7/common/gettext.patch0000664000076400007640000000047511710041611014432 00000000000000--- po/Makefile.in.in.orig 2006-01-07 12:03:45.000000000 +0100 +++ po/Makefile.in.in 2006-01-07 12:04:23.000000000 +0100 @@ -11,6 +11,9 @@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ +# thomas: add GETTEXT_PACKAGE substitution as used in Makevars +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ + SHELL = /bin/sh @SET_MAKE@ farstream-0.2.7/common/gst-glib-gen.mak0000664000076400007640000000470611710041611014677 00000000000000# these are the variables your Makefile.am should set # the example is based on the colorbalance interface #glib_enum_headers=$(colorbalance_headers) #glib_enum_define=GST_COLOR_BALANCE #glib_gen_prefix=gst_color_balance #glib_gen_basename=colorbalance enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") # these are all the rules generating the relevant files $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list $(AM_V_GEN)glib-genmarshal --header --prefix=$(glib_gen_prefix)_marshal $^ > $(glib_gen_basename)-marshal.h.tmp && \ mv $(glib_gen_basename)-marshal.h.tmp $(glib_gen_basename)-marshal.h $(glib_gen_basename)-marshal.c: $(glib_gen_basename)-marshal.list $(AM_V_GEN)echo "#include \"$(glib_gen_basename)-marshal.h\"" >> $(glib_gen_basename)-marshal.c.tmp && \ glib-genmarshal --body --prefix=$(glib_gen_prefix)_marshal $^ >> $(glib_gen_basename)-marshal.c.tmp && \ mv $(glib_gen_basename)-marshal.c.tmp $(glib_gen_basename)-marshal.c $(glib_gen_basename)-enumtypes.h: $(glib_enum_headers) $(AM_V_GEN)glib-mkenums \ --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "\n/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \ $^ > $@ $(glib_gen_basename)-enumtypes.c: $(glib_enum_headers) @if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi $(AM_V_GEN)glib-mkenums \ --fhead "#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n" \ $^ > $@ # a hack rule to make sure .Plo files exist because they get include'd # from Makefile's .deps/%-marshal.Plo: @touch $@ .deps/%-enumtypes.Plo: @touch $@ farstream-0.2.7/common/coverage/0000775000076400007640000000000012462323001013573 500000000000000farstream-0.2.7/common/coverage/coverage-report.pl0000664000076400007640000001042711710041611017157 00000000000000#!/usr/bin/perl # # Copyright (C) 2006 Daniel Berrange # # 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 use warnings; use strict; my %coverage = ( functions => {}, files => {} ); my %filemap; my $type; my $name; my @functions; while (<>) { if (/^Function '(.*)'\s*$/) { $type = "function"; $name = $1; $coverage{$type}->{$name} = {}; push @functions, $name; } elsif (/^File '(.*?)'\s*$/) { $type = "file"; $name = $1; $coverage{$type}->{$name} = {}; foreach my $func (@functions) { $coverage{"function"}->{$func}->{file} = $name; } @functions = (); } elsif (/^Lines executed:(.*)%\s*of\s*(\d+)\s*$/) { $coverage{$type}->{$name}->{lines} = $2; $coverage{$type}->{$name}->{linesCoverage} = $1; } elsif (/^Branches executed:(.*)%\s*of\s*(\d+)\s*$/) { $coverage{$type}->{$name}->{branches} = $2; $coverage{$type}->{$name}->{branchesCoverage} = $1; } elsif (/^Taken at least once:(.*)%\s*of\s*(\d+)\s*$/) { $coverage{$type}->{$name}->{conds} = $2; $coverage{$type}->{$name}->{condsCoverage} = $1; } elsif (/^Calls executed:(.*)%\s*of\s*(\d+)\s*$/) { $coverage{$type}->{$name}->{calls} = $2; $coverage{$type}->{$name}->{callsCoverage} = $1; } elsif (/^No branches$/) { $coverage{$type}->{$name}->{branches} = 0; $coverage{$type}->{$name}->{branchesCoverage} = "100.00"; $coverage{$type}->{$name}->{conds} = 0; $coverage{$type}->{$name}->{condsCoverage} = "100.00"; } elsif (/^No calls$/) { $coverage{$type}->{$name}->{calls} = 0; $coverage{$type}->{$name}->{callsCoverage} = "100.00"; } elsif (/^\s*(.*):creating '(.*)'\s*$/) { $filemap{$1} = $2; } elsif (/^\s*$/) { # nada } else { warn "Shit [$_]\n"; } } my %summary; foreach my $type ("function", "file") { $summary{$type} = {}; foreach my $m ("lines", "branches", "conds", "calls") { my $totalGot = 0; my $totalMiss = 0; my $count = 0; foreach my $func (keys %{$coverage{function}}) { $count++; my $got = $coverage{function}->{$func}->{$m}; $totalGot += $got; my $miss = $got * $coverage{function}->{$func}->{$m ."Coverage"} / 100; $totalMiss += $miss; } $summary{$type}->{$m} = sprintf("%d", $totalGot); $summary{$type}->{$m . "Coverage"} = sprintf("%.2f", $totalMiss / $totalGot * 100); } } print "\n"; foreach my $type ("function", "file") { printf "<%ss>\n", $type; foreach my $name (sort { $a cmp $b } keys %{$coverage{$type}}) { my $rec = $coverage{$type}->{$name}; printf " \n", $name, ($type eq "file" ? $filemap{$name} : $filemap{$rec->{file}}); printf " \n", $rec->{lines}, $rec->{linesCoverage}; if (exists $rec->{branches}) { printf " \n", $rec->{branches}, $rec->{branchesCoverage}; } if (exists $rec->{conds}) { printf " \n", $rec->{conds}, $rec->{condsCoverage}; } if (exists $rec->{calls}) { printf " \n", $rec->{calls}, $rec->{callsCoverage}; } print " \n"; } printf " \n"; printf " \n", $summary{$type}->{lines}, $summary{$type}->{linesCoverage}; printf " \n", $summary{$type}->{branches}, $summary{$type}->{branchesCoverage}; printf " \n", $summary{$type}->{conds}, $summary{$type}->{condsCoverage}; printf " \n", $summary{$type}->{calls}, $summary{$type}->{callsCoverage}; printf " \n"; printf "\n", $type; } print "\n"; farstream-0.2.7/common/coverage/coverage-report.xsl0000664000076400007640000001551611710041611017356 00000000000000 Coverage report

Coverage report

Function coverage

File coverage

odd even odd even
Name Lines Branches Conditions Calls
Summary perfect excellant good poor bad terrible % of
farstream-0.2.7/common/coverage/coverage-report-entry.pl0000664000076400007640000000360211710041611020313 00000000000000#!/usr/bin/perl # # Copyright (C) 2006 Daniel Berrange # # 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 print < Coverage report for $ARGV[0]

Coverage report for $ARGV[0]

EOF


while (<>) {
    s/&/&/g;
    s//>/g;

    if (/^\s*function (\S+) called (\d+) returned \d+% blocks executed \d+%/) {
	my $class = $2 > 0 ? "perfect" : "terrible";
	$_ = "$_";
    } elsif (/^\s*branch\s+\d+\s+taken\s+(\d+)%\s+.*$/) {
	my $class = $1 > 0 ? "perfect" : "terrible";
	$_ = "$_";
    } elsif (/^\s*branch\s+\d+\s+never executed.*$/) {
	my $class = "terrible";
	$_ = "$_";
    } elsif (/^\s*call\s+\d+\s+never executed.*$/) {
	my $class = "terrible";
	$_ = "$_";
    } elsif (/^\s*call\s+\d+\s+returned\s+(\d+)%.*$/) {
	my $class = $1 > 0 ? "perfect" : "terrible";
	$_ = "$_";
    }

    print;
}

print <


EOF
farstream-0.2.7/common/coverage/lcov.mak0000664000076400007640000000251611710557061015166 00000000000000## .PHONY so it always rebuilds it
.PHONY: lcov-reset lcov lcov-run lcov-report lcov-upload

# run lcov from scratch, always
lcov-reset:
	$(MAKE) lcov-run
	$(MAKE) lcov-report

# run lcov from scratch if the dir is not there
lcov:
	$(MAKE) lcov-reset

if GST_GCOV_ENABLED
# reset run coverage tests
lcov-run:
	@-rm -rf lcov
	lcov --directory . --zerocounters
	-if test -d tests/check; then $(MAKE) -C tests/check inspect; fi
	-$(MAKE) check

# generate report based on current coverage data
lcov-report:
	mkdir lcov
	lcov --compat-libtool --directory . --capture --output-file lcov/lcov.info
	lcov --list-full-path -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d\| -f1 > lcov/remove
	lcov --list-full-path -l lcov/lcov.info | grep "tests/check/" | cut -d\| -f1 >> lcov/remove
	lcov --list-full-path -l lcov/lcov.info | grep "docs/plugins/" | cut -d\| -f1 >> lcov/remove
	lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
	rm lcov/remove
	mv lcov/lcov.cleaned.info lcov/lcov.info
	genhtml -t "$(PACKAGE_STRING)" -o lcov --num-spaces 2 lcov/lcov.info

lcov-upload: lcov
	rsync -rvz -e ssh --delete lcov/* gstreamer.freedesktop.org:/srv/gstreamer.freedesktop.org/www/data/coverage/lcov/$(PACKAGE)

else
lcov-run:
	echo "Need to reconfigure with --enable-gcov"

lcov-report:
	echo "Need to reconfigure with --enable-gcov"
endif

farstream-0.2.7/INSTALL0000664000076400007640000002243212074130566011477 00000000000000Installation Instructions
*************************

Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.

This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.

Basic Installation
==================

These are generic installation instructions.

   The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation.  It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions.  Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').

   It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring.  (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)

   If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release.  If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.

   The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'.  You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.

The simplest way to compile this package is:

  1. `cd' to the directory containing the package's source code and type
     `./configure' to configure the package for your system.  If you're
     using `csh' on an old version of System V, you might need to type
     `sh ./configure' instead to prevent `csh' from trying to execute
     `configure' itself.

     Running `configure' takes awhile.  While running, it prints some
     messages telling which features it is checking for.

  2. Type `make' to compile the package.

  3. Optionally, type `make check' to run any self-tests that come with
     the package.

  4. Type `make install' to install the programs and any data files and
     documentation.

  5. You can remove the program binaries and object files from the
     source code directory by typing `make clean'.  To also remove the
     files that `configure' created (so you can compile the package for
     a different kind of computer), type `make distclean'.  There is
     also a `make maintainer-clean' target, but that is intended mainly
     for the package's developers.  If you use it, you may have to get
     all sorts of other programs in order to regenerate files that came
     with the distribution.

Compilers and Options
=====================

Some systems require unusual options for compilation or linking that the
`configure' script does not know about.  Run `./configure --help' for
details on some of the pertinent environment variables.

   You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment.  Here
is an example:

     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix

   *Note Defining Variables::, for more details.

Compiling For Multiple Architectures
====================================

You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory.  To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'.  `cd' to the
directory where you want the object files and executables to go and run
the `configure' script.  `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.

   If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory.  After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.

Installation Names
==================

By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc.  You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.

   You can specify separate installation prefixes for
architecture-specific files and architecture-independent files.  If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.

   In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files.  Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.

   If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.

Optional Features
=================

Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System).  The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.

   For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.

Specifying the System Type
==========================

There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option.  TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:

     CPU-COMPANY-SYSTEM

where SYSTEM can have one of these forms:

     OS KERNEL-OS

   See the file `config.sub' for the possible values of each field.  If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.

   If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.

   If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.

Sharing Defaults
================

If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists.  Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.

Defining Variables
==================

Variables not defined in a site shell script can be set in the
environment passed to `configure'.  However, some packages may run
configure again during the build, and the customized values of these
variables may be lost.  In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'.  For example:

     ./configure CC=/usr/local2/bin/gcc

causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).  Here is a another example:

     /bin/bash ./configure CONFIG_SHELL=/bin/bash

Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.

`configure' Invocation
======================

`configure' recognizes the following options to control how it operates.

`--help'
`-h'
     Print a summary of the options to `configure', and exit.

`--version'
`-V'
     Print the version of Autoconf used to generate the `configure'
     script, and exit.

`--cache-file=FILE'
     Enable the cache: use and save the results of the tests in FILE,
     traditionally `config.cache'.  FILE defaults to `/dev/null' to
     disable caching.

`--config-cache'
`-C'
     Alias for `--cache-file=config.cache'.

`--quiet'
`--silent'
`-q'
     Do not print messages saying which checks are being made.  To
     suppress all normal output, redirect it to `/dev/null' (any error
     messages will still be shown).

`--srcdir=DIR'
     Look for the package's source code in directory DIR.  Usually
     `configure' can determine that directory automatically.

`configure' also accepts some other, not widely useful, options.  Run
`configure --help' for more details.

farstream-0.2.7/tests/0000775000076400007640000000000012462323000011651 500000000000000farstream-0.2.7/tests/Makefile.in0000664000076400007640000005350012462321046013651 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 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@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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@
target_triplet = @target@
@HAVE_GST_CHECK_TRUE@am__append_1 = check
subdir = tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
	$(top_srcdir)/common/m4/as-auto-alt.m4 \
	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
	$(top_srcdir)/common/m4/as-libtool.m4 \
	$(top_srcdir)/common/m4/as-python.m4 \
	$(top_srcdir)/common/m4/as-scrub-include.m4 \
	$(top_srcdir)/common/m4/as-version.m4 \
	$(top_srcdir)/common/m4/gst-arch.m4 \
	$(top_srcdir)/common/m4/gst-args.m4 \
	$(top_srcdir)/common/m4/gst-check.m4 \
	$(top_srcdir)/common/m4/gst-error.m4 \
	$(top_srcdir)/common/m4/gst-glib2.m4 \
	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
	$(top_srcdir)/common/m4/gst-plugindir.m4 \
	$(top_srcdir)/common/m4/gst.m4 \
	$(top_srcdir)/common/m4/gtk-doc.m4 \
	$(top_srcdir)/common/m4/pkg.m4 \
	$(top_srcdir)/m4/introspection.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
	ctags-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 \
	tags-recursive uninstall-recursive
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
  distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
  $(RECURSIVE_TARGETS) \
  $(RECURSIVE_CLEAN_TARGETS) \
  $(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
	distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
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@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ERROR_CFLAGS = @ERROR_CFLAGS@
EXEEXT = @EXEEXT@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FS_AGE = @FS_AGE@
FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@
FS_APIVERSION = @FS_APIVERSION@
FS_API_VERSION = @FS_API_VERSION@
FS_CFLAGS = @FS_CFLAGS@
FS_CURRENT = @FS_CURRENT@
FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@
FS_LIBS = @FS_LIBS@
FS_LIBVERSION = @FS_LIBVERSION@
FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@
FS_LICENSE = @FS_LICENSE@
FS_LT_LDFLAGS = @FS_LT_LDFLAGS@
FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@
FS_PLUGINS_ALL = @FS_PLUGINS_ALL@
FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@
FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@
FS_PLUGIN_PATH = @FS_PLUGIN_PATH@
FS_PREFIX = @FS_PREFIX@
FS_REVISION = @FS_REVISION@
FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@
FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@
GCOV = @GCOV@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LDFLAGS = @GIO_LDFLAGS@
GIO_LIBS = @GIO_LIBS@
GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_PREFIX = @GLIB_PREFIX@
GLIB_REQ = @GLIB_REQ@
GREP = @GREP@
GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
GST_API_VERSION = @GST_API_VERSION@
GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
GST_BASE_LIBS = @GST_BASE_LIBS@
GST_CFLAGS = @GST_CFLAGS@
GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
GST_CHECK_LIBS = @GST_CHECK_LIBS@
GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@
GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
GST_LIBS = @GST_LIBS@
GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
GST_TOOLS_DIR = @GST_TOOLS_DIR@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GUPNP_CFLAGS = @GUPNP_CFLAGS@
GUPNP_LIBS = @GUPNP_LIBS@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NICE_CFLAGS = @NICE_CFLAGS@
NICE_LIBS = @NICE_LIBS@
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@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VALGRIND_PATH = @VALGRIND_PATH@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
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@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS_CHECK = $(am__append_1)
SUBDIRS = $(SUBDIRS_CHECK) rtp
DIST_SUBDIRS = check rtp
all: all-recursive

.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 tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu tests/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

# 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.
$(am__recursive_targets):
	@fail=; \
	if $(am__make_keepgoing); then \
	  failcom='fail=yes'; \
	else \
	  failcom='exit 1'; \
	fi; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	case "$@" in \
	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
	  *) list='$(SUBDIRS)' ;; \
	esac; \
	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"

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	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; \
	$(am__define_uniq_tagged_files); \
	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-recursive

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	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"
cscopelist: cscopelist-recursive

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

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 \
	    $(am__make_dryrun) \
	      || test -d "$(distdir)/$$subdir" \
	      || $(MKDIR_P) "$(distdir)/$$subdir" \
	      || exit 1; \
	    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
installdirs: installdirs-recursive
installdirs-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-recursive
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
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 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-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:

.MAKE: $(am__recursive_targets) install-am install-strip

.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
	check-am clean clean-generic clean-libtool cscopelist-am ctags \
	ctags-am 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-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-am uninstall uninstall-am


# 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:
farstream-0.2.7/tests/Makefile.am0000664000076400007640000000017211710041462013631 00000000000000SUBDIRS_CHECK =

if HAVE_GST_CHECK
SUBDIRS_CHECK += check
endif

SUBDIRS = $(SUBDIRS_CHECK) rtp

DIST_SUBDIRS = check rtp
farstream-0.2.7/tests/rtp/0000775000076400007640000000000012462323000012456 500000000000000farstream-0.2.7/tests/rtp/codec-discovery.c0000664000076400007640000001017012461773672015652 00000000000000/* Farstream ad-hoc test for the rtp codec discovery
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#include 

#include 

#include "fs-rtp-discover-codecs.h"
#include "fs-rtp-conference.h"


static void
debug_pipeline (const gchar *prefix, GList *pipeline)
{
  GList *walk;
  GString *str;
  gboolean first = FALSE;

  str = g_string_new (prefix);

  for (walk = pipeline; walk; walk = g_list_next (walk))
  {
    GList *walk2;
    gboolean first_alt = TRUE;

    if (!first)
      g_string_append (str, " ->");
    first = FALSE;

    for (walk2 = g_list_first (walk->data); walk2; walk2 = g_list_next (walk2))
    {
      if (first_alt)
        g_string_append_printf (str, " %s",
            gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (walk2->data)));
      else
        g_string_append_printf (str, " | %s",
            gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (walk2->data)));

      first_alt = FALSE;
    }
  }
  g_print ("%s\n", str->str);
  g_string_free (str, TRUE);
}

static void
debug_blueprint (CodecBlueprint *blueprint)
{
  gchar *str;

  str = fs_codec_to_string (blueprint->codec);
  g_print ("Codec: %s\n", str);
  g_free (str);

  str = gst_caps_to_string (blueprint->media_caps);
  g_print ("media_caps: %s\n", str);
  g_free (str);

  str = gst_caps_to_string (blueprint->rtp_caps);
  g_print ("rtp_caps: %s\n", str);
  g_free (str);

  str = gst_caps_to_string (blueprint->input_caps);
  g_print ("input_caps: %s\n", str);
  g_free (str);

  str = gst_caps_to_string (blueprint->output_caps);
  g_print ("output_caps: %s\n", str);
  g_free (str);

  debug_pipeline ("send pipeline:", blueprint->send_pipeline_factory);

  debug_pipeline ("recv pipeline:", blueprint->receive_pipeline_factory);

  g_print ("================================\n");
}

int main (int argc, char **argv)
{
  GList *elements = NULL;
  GError *error = NULL;

  gst_init (&argc, &argv);

  GST_DEBUG_CATEGORY_INIT (fsrtpconference_debug, "fsrtpconference", 0,
      "Farstream RTP Conference Element");
  GST_DEBUG_CATEGORY_INIT (fsrtpconference_disco, "fsrtpconference_disco",
      0, "Farstream RTP Codec Discovery");
  GST_DEBUG_CATEGORY_INIT (fsrtpconference_nego, "fsrtpconference_nego",
      0, "Farstream RTP Codec Negotiation");

  gst_debug_set_default_threshold (GST_LEVEL_WARNING);

  g_print ("AUDIO STARTING!!\n");

  elements = fs_rtp_blueprints_get (FS_MEDIA_TYPE_AUDIO, &error);

  if (error)
    g_printerr ("Error: %s\n", error->message);
  else
    g_list_foreach (elements, (GFunc) debug_blueprint, NULL);

  g_clear_error (&error);

  fs_rtp_blueprints_unref (FS_MEDIA_TYPE_AUDIO);

  g_print ("AUDIO FINISHED!!\n");


  g_print ("VIDEO STARTING!!\n");

  elements = fs_rtp_blueprints_get (FS_MEDIA_TYPE_VIDEO, &error);

  if (error)
    g_printerr ("Error: %s\n", error->message);
  else
    g_list_foreach (elements, (GFunc) debug_blueprint, NULL);

  g_clear_error (&error);

  fs_rtp_blueprints_unref (FS_MEDIA_TYPE_VIDEO);

  g_print ("VIDEO FINISHED!!\n");


  g_print ("APPLICATION STARTING!!\n");

  elements = fs_rtp_blueprints_get (FS_MEDIA_TYPE_APPLICATION, &error);

  if (error)
    g_printerr ("Error: %s\n", error->message);
  else
    g_list_foreach (elements, (GFunc) debug_blueprint, NULL);

  g_clear_error (&error);

  fs_rtp_blueprints_unref (FS_MEDIA_TYPE_APPLICATION);

  g_print ("APPLICATION FINISHED!!\n");



  return 0;
}
farstream-0.2.7/tests/rtp/Makefile.in0000664000076400007640000006024312462321046014460 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 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@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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@
target_triplet = @target@
noinst_PROGRAMS = codec-discovery$(EXEEXT)
subdir = tests/rtp
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
	$(top_srcdir)/common/m4/as-auto-alt.m4 \
	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
	$(top_srcdir)/common/m4/as-libtool.m4 \
	$(top_srcdir)/common/m4/as-python.m4 \
	$(top_srcdir)/common/m4/as-scrub-include.m4 \
	$(top_srcdir)/common/m4/as-version.m4 \
	$(top_srcdir)/common/m4/gst-arch.m4 \
	$(top_srcdir)/common/m4/gst-args.m4 \
	$(top_srcdir)/common/m4/gst-check.m4 \
	$(top_srcdir)/common/m4/gst-error.m4 \
	$(top_srcdir)/common/m4/gst-glib2.m4 \
	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
	$(top_srcdir)/common/m4/gst-plugindir.m4 \
	$(top_srcdir)/common/m4/gst.m4 \
	$(top_srcdir)/common/m4/gtk-doc.m4 \
	$(top_srcdir)/common/m4/pkg.m4 \
	$(top_srcdir)/m4/introspection.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_codec_discovery_OBJECTS =  \
	codec_discovery-codec-discovery.$(OBJEXT)
codec_discovery_OBJECTS = $(am_codec_discovery_OBJECTS)
codec_discovery_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
codec_discovery_DEPENDENCIES = $(top_builddir)/gst/fsrtpconference/libfsrtpconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
codec_discovery_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(codec_discovery_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
	-o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(codec_discovery_SOURCES)
DIST_SOURCES = $(codec_discovery_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ERROR_CFLAGS = @ERROR_CFLAGS@
EXEEXT = @EXEEXT@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FS_AGE = @FS_AGE@
FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@
FS_APIVERSION = @FS_APIVERSION@
FS_API_VERSION = @FS_API_VERSION@
FS_CFLAGS = @FS_CFLAGS@
FS_CURRENT = @FS_CURRENT@
FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@
FS_LIBS = @FS_LIBS@
FS_LIBVERSION = @FS_LIBVERSION@
FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@
FS_LICENSE = @FS_LICENSE@
FS_LT_LDFLAGS = @FS_LT_LDFLAGS@
FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@
FS_PLUGINS_ALL = @FS_PLUGINS_ALL@
FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@
FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@
FS_PLUGIN_PATH = @FS_PLUGIN_PATH@
FS_PREFIX = @FS_PREFIX@
FS_REVISION = @FS_REVISION@
FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@
FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@
GCOV = @GCOV@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LDFLAGS = @GIO_LDFLAGS@
GIO_LIBS = @GIO_LIBS@
GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_PREFIX = @GLIB_PREFIX@
GLIB_REQ = @GLIB_REQ@
GREP = @GREP@
GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
GST_API_VERSION = @GST_API_VERSION@
GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
GST_BASE_LIBS = @GST_BASE_LIBS@
GST_CFLAGS = @GST_CFLAGS@
GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
GST_CHECK_LIBS = @GST_CHECK_LIBS@
GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@
GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
GST_LIBS = @GST_LIBS@
GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
GST_TOOLS_DIR = @GST_TOOLS_DIR@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GUPNP_CFLAGS = @GUPNP_CFLAGS@
GUPNP_LIBS = @GUPNP_LIBS@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NICE_CFLAGS = @NICE_CFLAGS@
NICE_LIBS = @NICE_LIBS@
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@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VALGRIND_PATH = @VALGRIND_PATH@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
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@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
codec_discovery_SOURCES = codec-discovery.c
codec_discovery_CFLAGS = \
	-I$(top_srcdir)/gst/fsrtpconference/ \
	-I$(top_builddir)/gst/fsrtpconference/ \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_CFLAGS) \
	$(CFLAGS)

LDADD = \
	$(top_builddir)/gst/fsrtpconference/libfsrtpconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(GST_CHECK_LIBS) \
	$(GST_PLUGINS_BASE_LIBS) \
	$(GST_LIBS) \
	-lgstrtp-@GST_API_VERSION@

all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(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 tests/rtp/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu tests/rtp/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):

clean-noinstPROGRAMS:
	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
	echo " rm -f" $$list; \
	rm -f $$list || exit $$?; \
	test -n "$(EXEEXT)" || exit 0; \
	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
	echo " rm -f" $$list; \
	rm -f $$list

codec-discovery$(EXEEXT): $(codec_discovery_OBJECTS) $(codec_discovery_DEPENDENCIES) $(EXTRA_codec_discovery_DEPENDENCIES) 
	@rm -f codec-discovery$(EXEEXT)
	$(AM_V_CCLD)$(codec_discovery_LINK) $(codec_discovery_OBJECTS) $(codec_discovery_LDADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codec_discovery-codec-discovery.Po@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

codec_discovery-codec-discovery.o: codec-discovery.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(codec_discovery_CFLAGS) $(CFLAGS) -MT codec_discovery-codec-discovery.o -MD -MP -MF $(DEPDIR)/codec_discovery-codec-discovery.Tpo -c -o codec_discovery-codec-discovery.o `test -f 'codec-discovery.c' || echo '$(srcdir)/'`codec-discovery.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/codec_discovery-codec-discovery.Tpo $(DEPDIR)/codec_discovery-codec-discovery.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='codec-discovery.c' object='codec_discovery-codec-discovery.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(codec_discovery_CFLAGS) $(CFLAGS) -c -o codec_discovery-codec-discovery.o `test -f 'codec-discovery.c' || echo '$(srcdir)/'`codec-discovery.c

codec_discovery-codec-discovery.obj: codec-discovery.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(codec_discovery_CFLAGS) $(CFLAGS) -MT codec_discovery-codec-discovery.obj -MD -MP -MF $(DEPDIR)/codec_discovery-codec-discovery.Tpo -c -o codec_discovery-codec-discovery.obj `if test -f 'codec-discovery.c'; then $(CYGPATH_W) 'codec-discovery.c'; else $(CYGPATH_W) '$(srcdir)/codec-discovery.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/codec_discovery-codec-discovery.Tpo $(DEPDIR)/codec_discovery-codec-discovery.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='codec-discovery.c' object='codec_discovery-codec-discovery.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(codec_discovery_CFLAGS) $(CFLAGS) -c -o codec_discovery-codec-discovery.obj `if test -f 'codec-discovery.c'; then $(CYGPATH_W) 'codec-discovery.c'; else $(CYGPATH_W) '$(srcdir)/codec-discovery.c'; fi`

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	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-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	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"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

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 $(PROGRAMS)
installdirs:
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:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
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-noinstPROGRAMS \
	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-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:

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
	ctags-am 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-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 tags-am uninstall uninstall-am


# 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:
farstream-0.2.7/tests/rtp/Makefile.am0000664000076400007640000000101512401500475014435 00000000000000
noinst_PROGRAMS = codec-discovery

codec_discovery_SOURCES = codec-discovery.c
codec_discovery_CFLAGS = \
	-I$(top_srcdir)/gst/fsrtpconference/ \
	-I$(top_builddir)/gst/fsrtpconference/ \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_CFLAGS) \
	$(CFLAGS)

LDADD = \
	$(top_builddir)/gst/fsrtpconference/libfsrtpconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(GST_CHECK_LIBS) \
	$(GST_PLUGINS_BASE_LIBS) \
	$(GST_LIBS) \
	-lgstrtp-@GST_API_VERSION@
farstream-0.2.7/tests/check/0000775000076400007640000000000012462323000012726 500000000000000farstream-0.2.7/tests/check/upnp/0000775000076400007640000000000012462323000013710 500000000000000farstream-0.2.7/tests/check/upnp/WANIPConnection.xml0000664000076400007640000003244411710041463017264 00000000000000

  
    1
    0
  
  
   
    SetConnectionType
      
        
          NewConnectionType
          in
          ConnectionType
        
      
    
    
    GetConnectionTypeInfo
      
        
          NewConnectionType
          out
          ConnectionType
        
        
          NewPossibleConnectionTypes
          out
PossibleConnectionTypes
        
      
    
    
    RequestConnection
    
    
    RequestTermination
    
    
    ForceTermination
    
    
    SetAutoDisconnectTime
      
        
          NewAutoDisconnectTime
          in
         AutoDisconnectTime
        
      
    
    
    SetIdleDisconnectTime
  
    
      NewIdleDisconnectTime
      in
     IdleDisconnectTime
    
  


SetWarnDisconnectDelay
  
    
      NewWarnDisconnectDelay
      in
    WarnDisconnectDelay
    
  


GetStatusInfo
  
    
      NewConnectionStatus
      out
      ConnectionStatus
    
    
      NewLastConnectionError
      out
    LastConnectionError
    
    
      NewUptime
      out
      Uptime
    
  


GetAutoDisconnectTime
  
    
      NewAutoDisconnectTime
      out
     AutoDisconnectTime
    
  


GetIdleDisconnectTime
  
    
      NewIdleDisconnectTime
      out
     IdleDisconnectTime
    
      
    
    
    GetWarnDisconnectDelay
      
        
          NewWarnDisconnectDelay
          out
        WarnDisconnectDelay
        
      
    
    
    GetNATRSIPStatus
      
        
          NewRSIPAvailable
          out
          RSIPAvailable
        
        
          NewNATEnabled
          out
          NATEnabled
        
      
    
    
    GetGenericPortMappingEntry
      
        
          NewPortMappingIndex
          in
PortMappingNumberOfEntries
        
        
          NewRemoteHost
          out
          RemoteHost
        
        
          NewExternalPort
          out
          ExternalPort
        
        
          NewProtocol
          out
        PortMappingProtocol
        
        
          NewInternalPort
          out
          InternalPort
        
        
          NewInternalClient
          out
          InternalClient
        
        
          NewEnabled
          out
PortMappingEnabled
        
        
          NewPortMappingDescription
          out
     PortMappingDescription
        
        
          NewLeaseDuration
          out
PortMappingLeaseDuration
        
      
    
    
    GetSpecificPortMappingEntry 
      
        
          NewRemoteHost
          in
          RemoteHost
        
        
          NewExternalPort
          in
          ExternalPort
        
        
          NewProtocol
          in
        PortMappingProtocol
        
        
          NewInternalPort
          out
          InternalPort
        
        
          NewInternalClient
          out
          InternalClient
        
        
          NewEnabled
          out
         PortMappingEnabled
        
        
          NewPortMappingDescription
          out
     PortMappingDescription
        
        
          NewLeaseDuration
          out
   PortMappingLeaseDuration
        
      
    
    
    AddPortMapping
      
        
          NewRemoteHost
          in
          RemoteHost
        
        
          NewExternalPort
          in
          ExternalPort
        
        
          NewProtocol
          in
        PortMappingProtocol
        
        
          NewInternalPort
          in
          InternalPort
        
        
          NewInternalClient
          in
          InternalClient
        
        
          NewEnabled
          in
         PortMappingEnabled
        
        
          NewPortMappingDescription
          in
PortMappingDescription
        
        
          NewLeaseDuration
          in
PortMappingLeaseDuration
        
      
    
    
    DeletePortMapping
      
         
          NewRemoteHost
          in
          RemoteHost
        
        
          NewExternalPort
          in
          ExternalPort
        
        
          NewProtocol
          in
        PortMappingProtocol
        
     
    
    
    GetExternalIPAddress
      
        
          NewExternalIPAddress
          out
        ExternalIPAddress
        
      
    
    
  
  
    
      ConnectionType
      string
    
    
      PossibleConnectionTypes
      string
      
        Unconfigured
        IP_Routed
        IP_Bridged
      
    
    
      ConnectionStatus
      string
      
        Unconfigured
        Connecting
        Connected
        PendingDisconnect
        Disconnecting
        Disconnected
  


  Uptime
  ui4


  LastConnectionError
  string
  
    ERROR_NONE
    ERROR_COMMAND_ABORTED
    ERROR_NOT_ENABLED_FOR_INTERNET
    ERROR_USER_DISCONNECT
    ERROR_ISP_DISCONNECT
    ERROR_IDLE_DISCONNECT
    ERROR_FORCED_DISCONNECT
    ERROR_NO_CARRIER
    ERROR_IP_CONFIGURATION
    ERROR_UNKNOWN
  

 
  AutoDisconnectTime
  ui4


  IdleDisconnectTime
  ui4


  WarnDisconnectDelay
  ui4


  RSIPAvailable
  boolean


  NATEnabled
  boolean


  ExternalIPAddress
  string


  PortMappingNumberOfEntries
  ui2


  PortMappingEnabled
  boolean


  PortMappingLeaseDuration
      ui4
    
    
      RemoteHost
      string
    
    
      ExternalPort
      ui2
    
    
      InternalPort
      ui2
    
    
      PortMappingProtocol
      string
       
        TCP
        UDP
      
   
    
      InternalClient
      string
    
    
      PortMappingDescription
      string
    
    
  

farstream-0.2.7/tests/check/upnp/InternetGatewayDevice.xml0000664000076400007640000000550611710041463020617 00000000000000

  
    1
    0
  
  
    urn:schemas-upnp-org:device:InternetGatewayDevice:1
    short user-friendly title
    manufacturer name
    URL to manufacturer site
    long user-friendly title
    model name
    model number
    URL to model site
    manufacturer's serial number
    uuid:UUID1
    Universal Product Code
    
      
          urn:schemas-upnp-org:device:WANDevice:1
          short user-friendly title
          manufacturer name
          URL to manufacturer site
          long user-friendly title
          model name
          model number
          URL to model site
          manufacturer's serial number
    uuid:UUID2
    Universal Product Code
    
     
       urn:schemas-upnp-org:device:WANConnectionDevice:1
       short user-friendly title
       manufacturer name
       URL to manufacturer site
       long user-friendly title
       model name
       model number
       URL to model site
       manufacturer's serial number
       uuid:UUID3
       Universal Product Code
       
          
            urn:schemas-upnp-org:service:WANIPConnection:1
            urn:upnp-org:serviceId:WANIPConn1
            /WANIPConnection.xml
            /WANIPConnection/Control
            /WANIPConnection/Event
          
          
            urn:schemas-upnp-org:service:WANPPPConnection:1
            urn:upnp-org:serviceId:WANPPPConn1
            /WANPPPConnection.xml
            /WANPPPConnection/Control
            /WANPPPConnection/Event
          
       
      
    

    
    
  

farstream-0.2.7/tests/check/utils/0000775000076400007640000000000012462323000014066 500000000000000farstream-0.2.7/tests/check/utils/binadded.c0000664000076400007640000002176012401500475015720 00000000000000/* Farstream unit tests for FsCodec
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */


#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 

#include "testutils.h"

gboolean called = FALSE;
gpointer last_added = NULL;
gpointer last_bin = NULL;

static void
_added_cb (FsElementAddedNotifier *notifier, GstBin *bin, GstElement *element,
    gpointer user_data)
{
  GstObject *parent = NULL;

  fail_unless (user_data == &last_added, "Pass user_data is incorrect");
  called = TRUE;
  last_added = element;
  last_bin = bin;

  if (bin)
  {
    parent = gst_object_get_parent (GST_OBJECT (element));
    fail_if (GST_OBJECT_CAST (bin) != parent,
        "The bin passed to use is not the right parent");
    gst_object_unref (parent);
  }
}


GST_START_TEST (test_bin_added_simple)
{
  GstElement *pipeline = NULL;
  GstElement *identity = NULL;
  FsElementAddedNotifier *notifier = NULL;

  pipeline = gst_pipeline_new (NULL);

  identity = gst_element_factory_make ("identity", NULL);
  gst_object_ref (identity);

  notifier = fs_element_added_notifier_new ();

  g_signal_connect (notifier, "element-added",
      G_CALLBACK (_added_cb), &last_added);

  fs_element_added_notifier_add (notifier, GST_BIN (pipeline));

  fail_unless (gst_bin_add (GST_BIN (pipeline), identity),
      "Could not add identity to pipeline");

  fail_if (called == FALSE, "AddedCallback not called");
  fail_unless (last_added == identity,
      "The element passed to the callback was wrong"
      " (it was %p, should have been %p",
      last_added, identity);
  fail_unless (last_bin == pipeline,
      "The bin passed to the callback was wrong"
      " (it was %p, should have been %p",
      last_bin, pipeline);

  fail_unless (gst_bin_remove (GST_BIN (pipeline), identity),
      "Could not remove identity from pipeline");

  called = FALSE;
  last_added = last_bin = NULL;

  fail_unless (
      fs_element_added_notifier_remove (notifier, GST_BIN (pipeline)),
      "Could not remove notification");

  fail_unless (gst_bin_add (GST_BIN (pipeline), identity),
      "Could not add identity to pipeline");

  fail_if (called == TRUE, "AddedCallback was removed, but was still called");

  called = FALSE;
  last_added = last_bin = NULL;

  g_object_unref (notifier);
  gst_object_unref (identity);
  gst_object_unref (pipeline);
}
GST_END_TEST;


GST_START_TEST (test_bin_added_recursive)
{
  GstElement *pipeline = NULL;
  GstElement *bin = NULL;
  GstElement *identity = NULL;
  FsElementAddedNotifier *notifier = NULL;

  pipeline = gst_pipeline_new (NULL);

  bin = gst_bin_new (NULL);
  gst_object_ref (bin);

  gst_bin_add (GST_BIN (pipeline), bin);

  identity = gst_element_factory_make ("identity", NULL);
  gst_object_ref (identity);

  notifier = fs_element_added_notifier_new ();

  g_signal_connect (notifier, "element-added",
      G_CALLBACK (_added_cb), &last_added);

  fs_element_added_notifier_add (notifier, GST_BIN (pipeline));

  fail_unless (gst_bin_add (GST_BIN (bin), identity),
      "Could not add identity to bin");

  fail_if (called == FALSE, "AddedCallback not called");
  fail_unless (last_added == identity,
      "The element passed to the callback was wrong"
      " (it was %p, should have been %p",
      last_added, identity);
  fail_unless (last_bin == bin,
      "The bin passed to the callback was wrong"
      " (it was %p, should have been %p",
      last_bin, bin);

  fail_unless (gst_bin_remove (GST_BIN (bin), identity),
      "Could not remove identity from bin");

  called = FALSE;
  last_added = last_bin = NULL;


  fail_unless (
      fs_element_added_notifier_remove (notifier, GST_BIN (pipeline)),
      "Could not remove notification");

  fail_unless (gst_bin_add (GST_BIN (bin), identity),
      "Could not add identity to bin");

  fail_if (called == TRUE, "AddedCallback was removed, but was still called");

  fail_unless (gst_bin_remove (GST_BIN (bin), identity),
      "Could not remove identity from bin");

  fs_element_added_notifier_add (notifier, GST_BIN (pipeline));

  called = FALSE;
  last_added = last_bin = NULL;

  gst_bin_remove (GST_BIN (pipeline), bin);

  fail_unless (gst_bin_add (GST_BIN (bin), identity),
      "Could not add identity to bin");

  fail_if (called == TRUE, "The bin was removed from the pipeline,"
      " but the callback was still called");


  g_object_unref (notifier);
  gst_object_unref (identity);
  gst_object_unref (bin);
  gst_object_unref (pipeline);
}
GST_END_TEST;

static void
test_keyfile (FsElementAddedNotifier *notifier)
{
  GstElement *pipeline;
  GstElement *identity = NULL;
  gboolean sync;

  pipeline = gst_pipeline_new (NULL);

  identity = gst_element_factory_make ("identity", NULL);
  gst_object_ref (identity);

  g_object_get (identity, "sync", &sync, NULL);
  fail_unless (sync == FALSE, "sync prop on identity does not start at FALSE");

  fs_element_added_notifier_add (notifier, GST_BIN (pipeline));

  fail_unless (gst_bin_add (GST_BIN (pipeline), identity),
      "Could not add identity to pipeline");

  g_object_get (identity, "sync", &sync, NULL);
  fail_unless (sync == TRUE, "sync prop on identity is not changed to TRUE");


  fail_unless (gst_bin_remove (GST_BIN (pipeline), identity),
      "Could not remove identity from pipeline");

  g_object_set (identity, "sync", FALSE, NULL);

  g_object_get (identity, "sync", &sync, NULL);
  fail_unless (sync == FALSE, "sync prop on identity not reset to FALSE");

  fail_unless (
      fs_element_added_notifier_remove (notifier, GST_BIN (pipeline)),
      "Could not remove notification");

  fail_unless (gst_bin_add (GST_BIN (pipeline), identity),
      "Could not add identity to bin");

  g_object_get (identity, "sync", &sync, NULL);
  fail_if (sync == TRUE, "sync prop on identity changed to TRUE");

  fs_element_added_notifier_add (notifier, GST_BIN (pipeline));

  g_object_get (identity, "sync", &sync, NULL);
  fail_unless (sync == TRUE, "sync prop on identity is not changed to TRUE");

  gst_object_unref (identity);
  gst_object_unref (pipeline);
}


GST_START_TEST (test_bin_keyfile)
{
  GKeyFile *keyfile = g_key_file_new ();
  FsElementAddedNotifier *notifier = NULL;
  gulong ret;

  g_key_file_set_boolean (keyfile, "identity", "sync", TRUE);
  g_key_file_set_boolean (keyfile, "identity", "invalid-property", TRUE);

  notifier = fs_element_added_notifier_new ();

  ret = fs_element_added_notifier_set_properties_from_keyfile (notifier,
      keyfile);
  fail_if (ret == 0);

  test_keyfile (notifier);
}
GST_END_TEST;

GST_START_TEST (test_bin_file)
{
  FsElementAddedNotifier *notifier = NULL;
  GError *error = NULL;
  gchar *filename = NULL;

  notifier = fs_element_added_notifier_new ();

  fail_if (fs_element_added_notifier_set_properties_from_file (notifier,
          "invalid-filename", &error));
  fail_if (error == NULL);
  fail_unless (error->domain == G_FILE_ERROR);
  g_clear_error (&error);

  filename = get_fullpath ("utils/gstelements.conf");
  fail_unless (fs_element_added_notifier_set_properties_from_file (notifier,
          filename, &error));
  g_free (filename);
  fail_if (error != NULL);

  test_keyfile (notifier);
}
GST_END_TEST;

GST_START_TEST (test_bin_errors)
{
  FsElementAddedNotifier *notifier = NULL;

  g_log_set_always_fatal (0);
  g_log_set_fatal_mask (NULL, 0);

  ASSERT_CRITICAL (fs_element_added_notifier_add (NULL, NULL));
  ASSERT_CRITICAL (fs_element_added_notifier_remove (NULL, NULL));
  ASSERT_CRITICAL (fs_element_added_notifier_set_properties_from_keyfile (
          NULL, NULL));

  notifier = fs_element_added_notifier_new ();

  ASSERT_CRITICAL (fs_element_added_notifier_add (notifier, NULL));
  ASSERT_CRITICAL (fs_element_added_notifier_remove (notifier, NULL));
  ASSERT_CRITICAL (fs_element_added_notifier_set_properties_from_keyfile (
          notifier, NULL));

  g_object_unref (notifier);
}
GST_END_TEST;


static Suite *
binadded_suite (void)
{
  Suite *s = suite_create ("binadded");
  TCase *tc_chain = tcase_create ("binadded");

  suite_add_tcase (s, tc_chain);
  tcase_add_test (tc_chain, test_bin_added_simple);
  tcase_add_test (tc_chain, test_bin_added_recursive);
  tcase_add_test (tc_chain, test_bin_keyfile);
  tcase_add_test (tc_chain, test_bin_file);
  tcase_add_test (tc_chain, test_bin_errors);

  return s;
}

GST_CHECK_MAIN (binadded);
farstream-0.2.7/tests/check/utils/gstelements.conf0000664000076400007640000000005411710041463017213 00000000000000[identity]
sync=true
invalid-property=false
farstream-0.2.7/tests/check/transmitter/0000775000076400007640000000000012462323000015302 500000000000000farstream-0.2.7/tests/check/transmitter/stunalternd.c0000664000076400007640000001771212401500475017747 00000000000000/* Farstream unit tests for FsRawUdpTransmitter
 * This file is taken from the Nice GLib ICE library. 
 *
 * (C) 2007-2009 Nokia Corporation
 *  @contributor: Rémi Denis-Courmont
 * (C) 2008-2009 Collabora Ltd
 *  @author: Youness Alaoui 
 *  @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#include 
#include 
#include 
#include 
#include 

#include 

#include 
#include 

#include 
#include 
#include 
#include 
#include 

#include 

#ifndef SOL_IP
# define SOL_IP IPPROTO_IP
#endif

#ifndef SOL_IPV6
# define SOL_IPV6 IPPROTO_IPV6
#endif

#ifndef IPV6_RECVPKTINFO
# define IPV6_RECVPKTINFO IPV6_PKTINFO
#endif

/** Default port for STUN binding discovery */
#define IPPORT_STUN  3478

#include 
#include "stunalternd.h"

static const uint16_t known_attributes[] =  {
  0
};

/**
 * Creates a listening socket
 */
int listen_socket (GSocketFamily fam, int type, int proto, unsigned int port)
{
  int yes = 1;
  int fd = socket (fam, type, proto);
  union {
    struct sockaddr addr;
    struct sockaddr_in in;
    struct sockaddr_in6 in6;
    struct sockaddr_storage storage;
  } addr;
  socklen_t socklen;

  if (fd == -1)
  {
    perror ("Error creating socket");
    return -1;
  }
  if (fd < 3)
    goto error;

  memset (&addr, 0, sizeof (addr));

  switch (fam)
  {
    case G_SOCKET_FAMILY_IPV4:
      addr.storage.ss_family = AF_INET;
      addr.in.sin_port = htons (port);
      socklen = sizeof (struct sockaddr_in);
      break;

    case G_SOCKET_FAMILY_IPV6:
      addr.storage.ss_family = AF_INET6;
      addr.in6.sin6_port = htons (port);
      socklen = sizeof (struct sockaddr_in6);
      break;
    default:
      socklen = 0;
      g_assert_not_reached ();
  }

  if (bind (fd, (struct sockaddr *)&addr, socklen))
  {
    perror ("Error binding to port");
    goto error;
  }

  if ((type == SOCK_DGRAM) || (type == SOCK_RAW))
  {
    switch (fam)
    {
      case AF_INET:
#ifdef IP_RECVERR
        setsockopt (fd, SOL_IP, IP_RECVERR, &yes, sizeof (yes));
#endif
        break;
      case AF_INET6:
#ifdef IPV6_RECVERR
        setsockopt (fd, SOL_IPV6, IPV6_RECVERR, &yes, sizeof (yes));
#endif
        break;
      default:
        g_assert_not_reached ();
        break;
    }
  }
  else
  {
    if (listen (fd, INT_MAX))
    {
      perror ("Error listening on port");
      goto error;
    }
  }

  return fd;

error:
  close (fd);
  return -1;
}


/** Dequeue error from a socket if applicable */
static int recv_err (int fd)
{
  struct msghdr hdr;
#ifdef MSG_ERRQUEUE
  memset (&hdr, 0, sizeof (hdr));
  return recvmsg (fd, &hdr, MSG_ERRQUEUE) >= 0;
#endif
}


/** Receives a message or dequeues an error from a socket */
ssize_t recv_safe (int fd, struct msghdr *msg)
{
  ssize_t len = recvmsg (fd, msg, 0);
  if (len == -1)
    recv_err (fd);
  else
  if (msg->msg_flags & MSG_TRUNC)
  {
    errno = EMSGSIZE;
    return -1;
  }

  return len;
}


/** Sends a message through a socket */
ssize_t send_safe (int fd, const struct msghdr *msg)
{
  ssize_t len;

  do
    len = sendmsg (fd, msg, 0);
  while ((len == -1) && (recv_err (fd) == 0));

  return len;
}


static int dgram_process (int sock, StunAgent *oldagent, StunAgent *newagent,
    struct sockaddr *alt_addr, socklen_t alt_addr_len)
{
  struct sockaddr_storage addr;
  uint8_t buf[STUN_MAX_MESSAGE_SIZE];
  char ctlbuf[256];
  struct iovec iov = { buf, sizeof (buf) };
  StunMessage request;
  StunMessage response;
  StunValidationStatus validation;
  StunAgent *agent = NULL;

  struct msghdr mh =
  {
    .msg_name = (struct sockaddr *)&addr,
    .msg_namelen = sizeof (addr),
    .msg_iov = &iov,
    .msg_iovlen = 1,
    .msg_control = ctlbuf,
    .msg_controllen = sizeof (ctlbuf)
  };

  size_t len = recv_safe (sock, &mh);
  if (len == (size_t)-1)
    return -1;

  validation = stun_agent_validate (newagent, &request, buf, len, NULL, 0);

  if (validation == STUN_VALIDATION_SUCCESS) {
    agent = newagent;
  }
  else {
    validation = stun_agent_validate (oldagent, &request, buf, len, NULL, 0);
    agent = oldagent;
  }

  /* Unknown attributes */
  if (validation == STUN_VALIDATION_UNKNOWN_REQUEST_ATTRIBUTE)
  {
    stun_agent_build_unknown_attributes_error (agent, &response, buf,
        sizeof (buf), &request);
    goto send_buf;
  }

  /* Mal-formatted packets */
  if (validation != STUN_VALIDATION_SUCCESS ||
      stun_message_get_class (&request) != STUN_REQUEST) {
    return -1;
  }

  switch (stun_message_get_method (&request))
  {
    case STUN_BINDING:
      stun_agent_init_error (agent, &response, buf, sizeof (buf), &request,
          STUN_ERROR_TRY_ALTERNATE);
      stun_message_append_addr (&response, STUN_ATTRIBUTE_ALTERNATE_SERVER,
          alt_addr, alt_addr_len);
      break;

    default:
      stun_agent_init_error (agent, &response, buf, sizeof (buf),
          &request, STUN_ERROR_BAD_REQUEST);
  }

  iov.iov_len = stun_agent_finish_message (agent, &response, NULL, 0);
send_buf:

  len = send_safe (sock, &mh);
  return (len < iov.iov_len) ? -1 : 0;
}



static int
resolve_addr (char *server, unsigned int port, GSocketFamily family,
    struct sockaddr *addr, socklen_t *addr_len)
{
  GInetAddress *inetaddr;
  GSocketAddress *sockaddr;
  gboolean ret;

  inetaddr = g_inet_address_new_from_string (server);

  if (!inetaddr)
    return 0;

  if (g_inet_address_get_family (inetaddr) != family) {
    g_object_unref (inetaddr);
    return 0;
  }

  sockaddr = g_inet_socket_address_new (inetaddr, port);

  ret = g_socket_address_to_native (sockaddr, addr,
      sizeof(struct sockaddr_storage), NULL);

  g_object_unref (sockaddr);
  g_object_unref (inetaddr);

  return ret;
}

struct thread_data {
  pthread_t thread;
  struct sockaddr_storage alt_addr;
  socklen_t alt_addr_len;
  StunAgent oldagent;
  StunAgent newagent;
  int sock;
};

void * stund_thread (void *data)
{
  struct thread_data *td = data;

  pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
  pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);

  for (;;)
    dgram_process (td->sock, &td->oldagent, &td->newagent,
        (struct sockaddr*) &td->alt_addr, td->alt_addr_len);


  return NULL;
}

void *stun_alternd_init (GSocketFamily family, char *redirect_ip,
    unsigned int redirect_port,
    unsigned int listen_port)
{
  struct thread_data *td;

  td = malloc (sizeof(struct thread_data));

  if (!redirect_port)
    redirect_port = IPPORT_STUN;

  if (!listen_port)
    listen_port = IPPORT_STUN;

  if (!resolve_addr (redirect_ip, redirect_port, family,
          (struct sockaddr *)&td->alt_addr, &td->alt_addr_len))
  {
    free (td);
    return NULL;
  }

  td->sock = listen_socket (family, SOCK_DGRAM, IPPROTO_UDP, listen_port);
  if (td->sock == -1)
  {
    free (td);
    return NULL;
  }

  stun_agent_init (&td->oldagent, known_attributes,
      STUN_COMPATIBILITY_RFC3489, 0);
  stun_agent_init (&td->newagent, known_attributes,
      STUN_COMPATIBILITY_RFC5389, STUN_AGENT_USAGE_USE_FINGERPRINT);

  pthread_create (&td->thread, NULL, stund_thread, td);

  return td;
}


void stun_alternd_stop (void *data)
{
  struct thread_data *td = data;

  pthread_cancel (td->thread);
  pthread_join (td->thread, NULL);
  free (data);
}
farstream-0.2.7/tests/check/transmitter/rawudp-upnp.c0000664000076400007640000001214112005526263017660 00000000000000/* Farstream unit tests for FsRawUdpTransmitter UPnP code
 *
 * Copyright (C) 2009 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include "check-threadsafe.h"


gboolean got_address = FALSE;
gboolean added_mapping = FALSE;

void
get_vars (gboolean *out_got_address,
    gboolean *out_added_mapping)
{
  *out_got_address = got_address;
  *out_added_mapping = added_mapping;
}


#ifdef HAVE_GUPNP

#include 

static void
get_external_ip_address_cb (GUPnPService *service,
    GUPnPServiceAction *action,
    gpointer user_data)
{
  gupnp_service_action_set (action,
      "NewExternalIPAddress", G_TYPE_STRING, "127.0.0.1",
      NULL);
  gupnp_service_action_return (action);
  got_address = TRUE;
}

static void
add_port_mapping_cb (GUPnPService *service,
    GUPnPServiceAction *action,
    gpointer user_data)
{
  gchar *remote_host = NULL;
  guint external_port = 0;
  gchar *proto = NULL;
  guint internal_port = 0;
  gchar *internal_client = NULL;
  gboolean enabled = -1;
  gchar *desc = NULL;
  guint lease = 0;

  gupnp_service_action_get (action,
      "NewRemoteHost", G_TYPE_STRING, &remote_host,
      "NewExternalPort", G_TYPE_UINT, &external_port,
      "NewProtocol", G_TYPE_STRING, &proto,
      "NewInternalPort", G_TYPE_UINT, &internal_port,
      "NewInternalClient", G_TYPE_STRING, &internal_client,
      "NewEnabled", G_TYPE_BOOLEAN, &enabled,
      "NewPortMappingDescription", G_TYPE_STRING, &desc,
      "NewLeaseDuration", G_TYPE_UINT, &lease,
      NULL);

  ts_fail_unless (remote_host && !strcmp (remote_host, ""), "Remote host invalid");
  ts_fail_unless (external_port == internal_port, "External and internal ports different");
  ts_fail_unless (proto && (!strcmp (proto, "UDP") || !strcmp (proto, "TCP")));
  ts_fail_unless (enabled == TRUE, "enable is not true");
  ts_fail_unless (desc != NULL, "no desc");

  g_free (remote_host);
  g_free (proto);
  g_free (internal_client);
  g_free (desc);

  gupnp_service_action_return (action);
  added_mapping = TRUE;
}


static void
delete_port_mapping_cb (GUPnPService *service,
    GUPnPServiceAction *action,
    gpointer user_data)
{
  gchar *remote_host = NULL;
  guint external_port = 0;
  gchar *proto = NULL;

  gupnp_service_action_get (action,
      "NewRemoteHost", G_TYPE_STRING, &remote_host,
      "NewExternalPort", G_TYPE_UINT, &external_port,
      "NewProtocol", G_TYPE_STRING, &proto,
      NULL);

  ts_fail_if (remote_host == NULL, "remote host NULL on remove");
  ts_fail_unless (external_port, "external port wrong on remove");
  ts_fail_unless (proto && !strcmp (proto, "UDP"), "proto wrong on remove");

  gupnp_service_action_return (action);
}


GObject *
start_upnp_server (void)
{
  GUPnPContext *context;
  GUPnPRootDevice *dev;
  GUPnPServiceInfo *service;
  GUPnPDeviceInfo *subdev1;
  GUPnPDeviceInfo *subdev2;
  const gchar *upnp_xml_path;

  context = gupnp_context_new (NULL, NULL, 0, NULL);
  ts_fail_if (context == NULL, "Can't get gupnp context");

  if (g_getenv ("UPNP_XML_PATH"))
    upnp_xml_path = g_getenv ("UPNP_XML_PATH");
  else
    upnp_xml_path  = ".";

  gupnp_context_host_path (context, upnp_xml_path, "");

  dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml",
      upnp_xml_path);
  ts_fail_if (dev == NULL, "could not get root dev");

  subdev1 = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (dev),
      "urn:schemas-upnp-org:device:WANDevice:1");
  ts_fail_if (subdev1 == NULL, "Could not get WANDevice");

  subdev2 = gupnp_device_info_get_device (subdev1,
      "urn:schemas-upnp-org:device:WANConnectionDevice:1");
  ts_fail_if (subdev2 == NULL, "Could not get WANConnectionDevice");
  g_object_unref (subdev1);

  service = gupnp_device_info_get_service (subdev2,
      "urn:schemas-upnp-org:service:WANIPConnection:1");
  ts_fail_if (service == NULL, "Could not get WANIPConnection");
  g_object_unref (subdev2);

  g_signal_connect (service, "action-invoked::GetExternalIPAddress",
      G_CALLBACK (get_external_ip_address_cb), NULL);
  g_signal_connect (service, "action-invoked::AddPortMapping",
      G_CALLBACK (add_port_mapping_cb), NULL);
  g_signal_connect (service, "action-invoked::DeletePortMapping",
      G_CALLBACK (delete_port_mapping_cb), NULL);

  gupnp_root_device_set_available (dev, TRUE);

  return G_OBJECT (context);
}

#else

GObject *
start_upnp_server (void)
{
  return NULL;
}

#endif
farstream-0.2.7/tests/check/transmitter/generic.c0000664000076400007640000001470212401500475017014 00000000000000/* Farstream generic unit tests for transmitters
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 
#include 

#include 
#include 

#include "check-threadsafe.h"
#include "generic.h"

static void
_transmitter_error (FsTransmitter *transmitter, gint errorno, gchar *error_msg,
    gpointer user_data)
{
  ts_fail ("Transmitter(%x) error(%d) msg:%s debug:%s", transmitter, errorno,
    error_msg);
}

void
stream_transmitter_error (FsStreamTransmitter *streamtransmitter,
  gint errorno, gchar *error_msg, gpointer user_data)
{
  ts_fail ("StreamTransmitter(%x) error(%d) msg:%s", streamtransmitter,
    errorno, error_msg);
}

void
setup_fakesrc (FsTransmitter *trans, GstElement *pipeline, guint component_id)
{
  GstElement *src;
  GstElement *trans_sink;
  gchar *padname;
  gchar *tmp;

  tmp = g_strdup_printf ("fakemediasrc_%u", component_id);
  src = gst_element_factory_make ("fakesrc", tmp);
  g_free (tmp);
  g_object_set (src,
      "num-buffers", 20,
      "sizetype", 2,
      "sizemax", component_id * 10,
      "is-live", TRUE,
      "filltype", 2,
      NULL);

  /*
   * We lock and unlock the state to prevent the source to start
   * playing before we link it
   */
  gst_element_set_locked_state (src, TRUE);

  ts_fail_unless (gst_bin_add (GST_BIN (pipeline), src),
    "Could not add the fakesrc");

  g_object_get (trans, "gst-sink", &trans_sink, NULL);

  padname = g_strdup_printf ("sink_%u", component_id);
  ts_fail_unless (gst_element_link_pads (src, "src", trans_sink, padname),
    "Could not link the fakesrc to %s", padname);
  g_free (padname);

  gst_element_set_locked_state (src, FALSE);

  ts_fail_if (gst_element_set_state (src, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the fakesrc to playing");

  gst_element_sync_state_with_parent (src);

  gst_object_unref (trans_sink);
}

GstElement *
setup_pipeline (FsTransmitter *trans, GCallback cb)
{
  GstElement *pipeline;
  GstElement *rtpfakesink, *rtcpfakesink;
  GstElement *trans_sink, *trans_src;

  ts_fail_unless (g_signal_connect (trans, "error",
      G_CALLBACK (_transmitter_error), NULL), "Could not connect signal");

  pipeline = gst_pipeline_new ("pipeline");
  rtpfakesink = gst_element_factory_make ("fakesink", "rtpfakesink");
  rtcpfakesink = gst_element_factory_make ("fakesink", "rtcpfakesink");

  g_object_get (trans, "gst-sink", &trans_sink, "gst-src", &trans_src, NULL);


  g_object_set (rtpfakesink, "signal-handoffs", TRUE, "sync", FALSE, "async", FALSE, NULL);
  g_object_set (rtcpfakesink, "signal-handoffs", TRUE, "sync", FALSE,
    "async", FALSE, NULL);

  if (cb) {
    g_signal_connect (rtpfakesink, "handoff", cb, GINT_TO_POINTER (1));
    g_signal_connect (rtcpfakesink, "handoff", cb, GINT_TO_POINTER (2));
  }

  ts_fail_if (trans_sink == NULL, "No transmitter sink");
  ts_fail_if (trans_src == NULL, "No transmitter src");

  gst_bin_add_many (GST_BIN (pipeline), rtpfakesink, rtcpfakesink,
    trans_sink, trans_src, NULL);

  ts_fail_unless (gst_element_link_pads (trans_src, "src_1",
      rtpfakesink, "sink"),
    "Coult not link transmitter src and fakesink");
  ts_fail_unless (gst_element_link_pads (trans_src, "src_2",
      rtcpfakesink, "sink"),
    "Coult not link transmitter src and fakesink");

  g_object_unref (trans_src);
  g_object_unref (trans_sink);

  return pipeline;
}


gboolean
bus_error_callback (GstBus *bus, GstMessage *message, gpointer user_data)
{
  switch (GST_MESSAGE_TYPE (message))
  {
    case GST_MESSAGE_ERROR:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_error (message, &error, &debug);

        ts_fail ("Got an error on the BUS (%d): %s (%s)", error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    case GST_MESSAGE_WARNING:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_warning (message, &error, &debug);

        GST_WARNING ("Got a warning on the BUS (%d): %s (%s)",
            error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    default:
      break;
  }

  return TRUE;
}

void
test_transmitter_creation (gchar *transmitter_name)
{
  GError *error = NULL;
  FsTransmitter *trans;
  GstElement *pipeline;
  GstElement *trans_sink, *trans_src;

  trans = fs_transmitter_new (transmitter_name, 2, 0, &error);

  if (error) {
    ts_fail ("Error creating transmitter: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);
  }

  ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");

  pipeline = setup_pipeline (trans, NULL);

  g_object_get (trans, "gst-sink", &trans_sink, "gst-src", &trans_src, NULL);

  ts_fail_if (trans_sink == NULL, "Sink is NULL");
  ts_fail_if (trans_src == NULL, "Src is NULL");

  gst_object_unref (trans_sink);
  gst_object_unref (trans_src);

  g_object_unref (trans);

  gst_object_unref (pipeline);

}


GPid stund_pid = 0;

void
setup_stund (void)
{
  GError *error = NULL;
  gchar *argv[] = {"stund", NULL};

  stund_pid = 0;

  if (!g_spawn_async (NULL, argv, NULL,
          G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
          NULL, NULL, &stund_pid, &error))
  {
    GST_WARNING ("Could not spawn stund, skipping stun testing: %s",
        error->message);
    g_clear_error (&error);
    return;
  }
}

void
teardown_stund (void)
{
  if (!stund_pid)
    return;

  kill (stund_pid, SIGTERM);
  waitpid (stund_pid, NULL, 0);
  g_spawn_close_pid (stund_pid);
  stund_pid = 0;
}

farstream-0.2.7/tests/check/transmitter/generic.h0000664000076400007640000000300111710041463017006 00000000000000/* Farstream generic unit tests for transmitters
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */


#include 
#include 

#ifndef __GENERIC_H__
#define __GENERIC_H__

GstElement *setup_pipeline (FsTransmitter *trans, GCallback cb);

void setup_fakesrc (FsTransmitter *trans, GstElement *pipeline,
  guint component_id);

void stream_transmitter_error (FsStreamTransmitter *streamtransmitter,
  gint errorno, gchar *error_msg, gpointer user_data);

gboolean bus_error_callback (GstBus *bus, GstMessage *message,
    gpointer user_data);

void test_transmitter_creation (gchar *transmitter_name);

extern GPid stund_pid;

void setup_stund (void);
void teardown_stund (void);

#endif /* __GENERIC_H__ */
farstream-0.2.7/tests/check/transmitter/nice.c0000664000076400007640000007217612462316243016334 00000000000000/* Farstream unit tests for FsRawUdpTransmitter
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 
#include 

#include 

#include "check-threadsafe.h"
#include "generic.h"


enum {
  FLAG_NO_SOURCE = 1 << 0,
  FLAG_IS_LOCAL = 1 << 1,
  FLAG_FORCE_CANDIDATES = 1 << 2,
  FLAG_NOT_SENDING = 1 << 3,
  FLAG_MUXED = 1 << 4,
};


gint buffer_count[2][2] = {{0,0}, {0,0}};
guint received_known[2][2] = {{0,0}, {0,0}};
GMainLoop *loop = NULL;
volatile gint running = TRUE;
gboolean associate_on_source = TRUE;
gboolean is_address_local = FALSE;
gboolean force_candidates = FALSE;
gboolean is_muxed = FALSE;

GMutex count_mutex;

GST_START_TEST (test_nicetransmitter_new)
{
  test_transmitter_creation ("nice");
}
GST_END_TEST;

static void
_new_local_candidate (FsStreamTransmitter *st, FsCandidate *candidate,
  gpointer user_data)
{
  GST_DEBUG ("Has local candidate %s:%u of type %d",
    candidate->ip, candidate->port, candidate->type);

  ts_fail_if (candidate == NULL, "Passed NULL candidate");
  ts_fail_unless (candidate->ip != NULL, "Null IP in candidate");
  ts_fail_if (candidate->port == 0 &&
      candidate->proto != FS_NETWORK_PROTOCOL_TCP_ACTIVE);
  ts_fail_if (candidate->foundation == NULL,
      "Candidate doenst have a foundation");
  ts_fail_if (candidate->component_id == 0, "Component id is 0");
  if (candidate->type == FS_CANDIDATE_TYPE_HOST)
  {
    ts_fail_if (candidate->base_ip != NULL, "Host candidate has a base ip");
    ts_fail_if (candidate->base_port != 0, "Host candidate has a base port");
  }
  else
  {
    ts_fail_if (candidate->base_ip == NULL, "Candidate doesnt have a base ip");
    ts_fail_if (candidate->base_port == 0, "Candidate doesnt have a base port");
  }
  ts_fail_if (candidate->username == NULL, "Candidate doenst have a username");
  ts_fail_if (candidate->password == NULL, "Candidate doenst have a password");

  GST_DEBUG ("New local candidate %s:%d of type %d for component %d",
    candidate->ip, candidate->port, candidate->type, candidate->component_id);
  GST_DEBUG ("username: %s password: %s", candidate->username,
      candidate->password);

  if (is_address_local)
    ts_fail_unless (!strcmp (candidate->ip, "127.0.0.1"));

  g_object_set_data (G_OBJECT (st), "candidates",
      g_list_append (g_object_get_data (G_OBJECT (st), "candidates"),
          fs_candidate_copy (candidate)));
}

static gboolean
set_the_candidates (gpointer user_data)
{
  FsStreamTransmitter *st = FS_STREAM_TRANSMITTER (user_data);
  GList *candidates = g_object_get_data (G_OBJECT (st), "candidates-set");
  gboolean ret;
  GError *error = NULL;

  if (!candidates)
  {
    g_debug ("Skipping libnice check because it found NO local candidates");
    g_atomic_int_set(&running, FALSE);
    g_main_loop_quit (loop);
    return FALSE;
  }

  if (force_candidates)
  {
    GList *item = NULL;
    GList *next = NULL;
    GList *new_list = NULL;
    for (item = candidates; item; item = next)
    {
      FsCandidate *cand = item->data;
      GList *item2 = NULL;

      next = g_list_next (item);

      if (cand->proto != FS_NETWORK_PROTOCOL_UDP)
        continue;
      if (cand->type != FS_CANDIDATE_TYPE_HOST)
        continue;
      if (cand->component_id != 1)
        continue;

      for (item2 = candidates; item2; item2 = g_list_next (item2))
      {
        FsCandidate *cand2 = item2->data;
        if (cand2->component_id == 2 &&
            !strcmp (cand->foundation, cand2->foundation))
        {
          new_list = g_list_append (new_list, cand);
          new_list = g_list_append (new_list, cand2);
          goto got_candidates;
        }
      }
    }

    ts_fail ("Could not find two matching host candidates???");

  got_candidates:
    ts_fail_unless (g_list_length (new_list) == 2);
    ret = fs_stream_transmitter_force_remote_candidates (st, new_list, &error);
  }
  else
  {
    ret = fs_stream_transmitter_add_remote_candidates (st, candidates, &error);
  }

  if (error)
    ts_fail ("Error while adding candidate: (%s:%d) %s",
        g_quark_to_string (error->domain), error->code, error->message);

  ts_fail_unless (ret == TRUE, "No detailed error setting remote_candidate");

  fs_candidate_list_destroy (candidates);

  return FALSE;
}


static void
_local_candidates_prepared (FsStreamTransmitter *st, gpointer user_data)
{
  FsStreamTransmitter *st2 = FS_STREAM_TRANSMITTER (user_data);
  GList *candidates = g_object_get_data (G_OBJECT (st), "candidates");

  g_object_set_data (G_OBJECT (st), "candidates", NULL);

  ts_fail_if (g_list_length (candidates) < 2,
      "We don't have at least 2 candidates");

  GST_DEBUG ("Local Candidates Prepared");

  g_object_set_data (G_OBJECT (st2), "candidates-set", candidates);

  g_idle_add (set_the_candidates, st2);

}

static void
_new_active_candidate_pair (FsStreamTransmitter *st, FsCandidate *local,
  FsCandidate *remote, gpointer user_data)
{
  ts_fail_if (local == NULL, "Local candidate NULL");
  ts_fail_if (remote == NULL, "Remote candidate NULL");

  ts_fail_unless (local->component_id == remote->component_id,
    "Local and remote candidates dont have the same component id");

  GST_DEBUG ("New active candidate pair");
}

static void
_handoff_handler_internal (GstElement *element, GstBuffer *buffer, GstPad *pad,
    guint stream, gint component_id)
{
  ts_fail_unless (gst_buffer_get_size (buffer) == component_id * 10,
    "Buffer is size %d but component_id is %d", gst_buffer_get_size (buffer),
    component_id);

  g_mutex_lock (&count_mutex);

  buffer_count[stream][component_id-1]++;


  if (buffer_count[stream][component_id-1] % 10 == 0)
  {
    GST_DEBUG ("Buffer %d stream: %u component: %d size: %" G_GSIZE_FORMAT,
        buffer_count[stream][component_id-1], stream,
        component_id, gst_buffer_get_size (buffer));
    GST_DEBUG ("Received %d %d %d %d",
        buffer_count[0][0], buffer_count[0][1],
        buffer_count[1][0], buffer_count[1][1]);
  }

  ts_fail_if (buffer_count[stream][component_id-1] > 20,
    "Too many buffers %d > 20 for component",
    buffer_count[stream][component_id-1], component_id);

  if (buffer_count[0][0] == 20 && buffer_count[0][1] == 20 &&
      buffer_count[1][0] == 20 && buffer_count[1][1] == 20) {
    if (associate_on_source)
      ts_fail_unless (buffer_count[0][0] == received_known[0][0] &&
          buffer_count[0][1] == received_known[0][1] &&
          buffer_count[1][0] == received_known[1][0] &&
          buffer_count[1][1] == received_known[1][1],
          "Some known buffers from known sources have not been reported"
          " (%d != %u || %d != %u || %d != %u || %d != %u)",
          buffer_count[0][0], received_known[0][0],
          buffer_count[0][1], received_known[0][1],
          buffer_count[1][0], received_known[1][0],
          buffer_count[1][1], received_known[1][1]);
    else
      ts_fail_unless (received_known[0][0] == 0 &&
          received_known[0][1] == 0 &&
          received_known[1][0] == 0 &&
          received_known[1][1] == 0,
          "Got a known-source-packet-received signal when we shouldn't have");

    /* TEST OVER */
    g_atomic_int_set(&running, FALSE);
    g_main_loop_quit (loop);
  }

  g_mutex_unlock (&count_mutex);
}

static void
_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
    guint stream, gint component_id)
{
  if (is_muxed) {
    ts_fail_if (component_id != 1,
        "Received data on component %d while the stream is muxed",
        component_id);

    if (gst_buffer_get_size (buffer) == 20) {
      received_known[stream][component_id-1]--;
      component_id = 2;
      received_known[stream][component_id-1]++;
    }
  }

  _handoff_handler_internal (element, buffer, pad, stream, component_id);
}

static void
_handoff_handler1 (GstElement *element, GstBuffer *buffer, GstPad *pad,
    gpointer user_data)
{
  gint component_id = GPOINTER_TO_INT (user_data);

  _handoff_handler (element, buffer, pad, 0, component_id);
}

static void
_handoff_handler2 (GstElement *element, GstBuffer *buffer, GstPad *pad,
    gpointer user_data)
{
  gint component_id = GPOINTER_TO_INT (user_data);

  _handoff_handler (element, buffer, pad, 1, component_id);
}


static void
_known_source_packet_received (FsStreamTransmitter *st, guint component_id,
    GstBuffer *buffer, gpointer user_data)
{
  guint stream = GPOINTER_TO_UINT (user_data);

  ts_fail_unless (associate_on_source == TRUE,
      "Got known-source-packet-received when we shouldn't have");

  ts_fail_unless (component_id == 1 || component_id == 2,
      "Invalid component id %u", component_id);

  ts_fail_unless (GST_IS_BUFFER (buffer), "Invalid buffer received at %p",
      buffer);

  received_known[stream - 1][component_id - 1]++;
}

static void
_setup_fakesink_for_ready_component (FsTransmitter *trans, const gchar *prop,
    FsStreamTransmitter *st, guint component)
{

  if (g_object_get_data (G_OBJECT (trans), prop) == NULL)
  {
    GstElement *pipeline = GST_ELEMENT (
        g_object_get_data (G_OBJECT (trans), "pipeline"));
    GST_DEBUG ("%p: Setting up fakesrc for component %u", st, component);
    setup_fakesrc (trans, pipeline, component);
    g_object_set_data (G_OBJECT (trans), prop, "");
  }
  else
    GST_DEBUG ("FAKESRC ALREADY SETUP for component %u", component);
}

static void
_stream_state_changed (FsStreamTransmitter *st, guint component,
    FsStreamState state, gpointer user_data)
{
  FsTransmitter *trans = FS_TRANSMITTER (user_data);
  GEnumClass *enumclass = NULL;
  GEnumValue *enumvalue = NULL;
  gchar *prop = NULL;
  FsStreamState oldstate = 0;

  enumclass = g_type_class_ref (FS_TYPE_STREAM_STATE);
  enumvalue = g_enum_get_value (enumclass, state);

  GST_DEBUG ("%p: Stream state for component %u is now %s (%u)", st,
      component, enumvalue->value_nick, state);

  ts_fail_if (state == FS_STREAM_STATE_FAILED,
      "Failed to establish a connection");

  if (component == 1)
    prop = "last-state-1";
  else if (component == 2)
    prop = "last-state-2";
  else
    ts_fail ("Invalid component %u, component");

  oldstate = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (st), prop));

  ts_fail_if (state < FS_STREAM_STATE_CONNECTED && state < oldstate,
      "State went in wrong direction %d -> %d for component %u",
      oldstate, state, component);

  g_object_set_data (G_OBJECT (st), prop, GINT_TO_POINTER (state));

  if (state < FS_STREAM_STATE_READY)
    return;

  if (component == 1) {
    _setup_fakesink_for_ready_component (trans, "src_setup_1", st, component);
    if (is_muxed)
      _setup_fakesink_for_ready_component (trans, "src_setup_2", st, 2);
  }
  if (!is_muxed && component == 2)
    _setup_fakesink_for_ready_component (trans, "src_setup_2", st, component);

}


static gboolean
check_running (gpointer data)
{
  if (g_atomic_int_get (&running) == FALSE)
    g_main_loop_quit (loop);

  return FALSE;
}

typedef FsParticipant FsNiceTestParticipant;
typedef FsParticipantClass FsNiceTestParticipantClass;

G_DEFINE_TYPE (FsNiceTestParticipant, fs_nice_test_participant,
    FS_TYPE_PARTICIPANT)

static void
fs_nice_test_participant_init (FsNiceTestParticipant *self)
{
}

static void
fs_nice_test_participant_class_init (FsNiceTestParticipantClass *klass)
{
}

static void
run_nice_transmitter_test (gint n_parameters, GParameter *params,
  gint flags)
{
  GError *error = NULL;
  FsTransmitter *trans = NULL, *trans2 = NULL;
  FsStreamTransmitter *st = NULL, *st2 = NULL;
  GstBus *bus = NULL;
  GstElement *pipeline = NULL;
  GstElement *pipeline2 = NULL;
  FsNiceTestParticipant *p1 = NULL, *p2 = NULL;

  memset (buffer_count, 0, sizeof(gint)*4);
  memset (received_known, 0, sizeof(guint)*4);
  running = TRUE;

  associate_on_source = !(flags & FLAG_NO_SOURCE);
  is_address_local = (flags & FLAG_IS_LOCAL);
  force_candidates = (flags & FLAG_FORCE_CANDIDATES);
  is_muxed = (flags & FLAG_MUXED);

  if (flags & FLAG_NOT_SENDING)
  {
    buffer_count[0][0] = 20;
    received_known[0][0] = 20;
    buffer_count[1][0] = 20;
    received_known[1][0] = 20;
  }

  loop = g_main_loop_new (NULL, FALSE);

  trans = fs_transmitter_new ("nice", 2, 0, &error);
  if (error) {
    ts_fail ("Error creating transmitter: (%s:%d) %s",
        g_quark_to_string (error->domain), error->code, error->message);
  }
  ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");

  trans2 = fs_transmitter_new ("nice", 2, 0, &error);
  if (error) {
    ts_fail ("Error creating transmitter: (%s:%d) %s",
        g_quark_to_string (error->domain), error->code, error->message);
  }
  ts_fail_if (trans2 == NULL, "No transmitter create, yet error is still NULL");

  pipeline = setup_pipeline (trans, G_CALLBACK (_handoff_handler1));
  pipeline2 = setup_pipeline (trans2, G_CALLBACK (_handoff_handler2));

  g_object_set_data (G_OBJECT (trans), "pipeline", pipeline);
  g_object_set_data (G_OBJECT (trans2), "pipeline", pipeline2);

  bus = gst_element_get_bus (pipeline);
  gst_bus_add_watch (bus, bus_error_callback, NULL);
  gst_object_unref (bus);

  bus = gst_element_get_bus (pipeline2);
  gst_bus_add_watch (bus, bus_error_callback, NULL);
  gst_object_unref (bus);

  /*
   * I'm passing the participant because any gobject will work,
   * but it should be the participant
   */

  p1 = g_object_new (fs_nice_test_participant_get_type (), NULL);
  p2 = g_object_new (fs_nice_test_participant_get_type (), NULL);

  st = fs_transmitter_new_stream_transmitter (trans, FS_PARTICIPANT (p1),
      n_parameters,  params, &error);
  if (error)
    ts_fail ("Error creating stream transmitter: (%s:%d) %s",
        g_quark_to_string (error->domain), error->code, error->message);
  ts_fail_if (st == NULL, "No stream transmitter created, yet error is NULL");

  st2 = fs_transmitter_new_stream_transmitter (trans2, FS_PARTICIPANT (p2),
      n_parameters, params, &error);
  if (error)
    ts_fail ("Error creating stream transmitter: (%s:%d) %s",
        g_quark_to_string (error->domain), error->code, error->message);
  ts_fail_if (st2 == NULL, "No stream transmitter created, yet error is NULL");

  g_object_set (st, "sending", !(flags & FLAG_NOT_SENDING), NULL);
  g_object_set (st2, "sending", !(flags & FLAG_NOT_SENDING), NULL);

  ts_fail_unless (g_signal_connect (st, "new-local-candidate",
      G_CALLBACK (_new_local_candidate), st2),
    "Could not connect new-local-candidate signal");
  ts_fail_unless (g_signal_connect (st, "local-candidates-prepared",
      G_CALLBACK (_local_candidates_prepared), st2),
    "Could not connect local-candidates-prepared signal");
  ts_fail_unless (g_signal_connect (st, "new-active-candidate-pair",
      G_CALLBACK (_new_active_candidate_pair), trans),
    "Could not connect new-active-candidate-pair signal");
  ts_fail_unless (g_signal_connect (st, "error",
      G_CALLBACK (stream_transmitter_error), NULL),
    "Could not connect error signal");
  ts_fail_unless (g_signal_connect (st, "state-changed",
          G_CALLBACK (_stream_state_changed), trans),
      "Could not connect to state-changed signal");
  ts_fail_unless (g_signal_connect (st, "known-source-packet-received",
          G_CALLBACK (_known_source_packet_received), GUINT_TO_POINTER (1)),
      "Could not connect to known-source-packet-received signal");

  ts_fail_unless (g_signal_connect (st2, "new-local-candidate",
      G_CALLBACK (_new_local_candidate), st),
    "Could not connect new-local-candidate signal");
  ts_fail_unless (g_signal_connect (st2, "local-candidates-prepared",
      G_CALLBACK (_local_candidates_prepared), st),
    "Could not connect local-candidates-prepared signal");
  ts_fail_unless (g_signal_connect (st2, "new-active-candidate-pair",
      G_CALLBACK (_new_active_candidate_pair), trans2),
    "Could not connect new-active-candidate-pair signal");
  ts_fail_unless (g_signal_connect (st2, "error",
      G_CALLBACK (stream_transmitter_error), NULL),
    "Could not connect error signal");
  ts_fail_unless (g_signal_connect (st2, "state-changed",
          G_CALLBACK (_stream_state_changed), trans2),
      "Could not connect to state-changed signal");
  ts_fail_unless (g_signal_connect (st2, "known-source-packet-received",
          G_CALLBACK (_known_source_packet_received), GUINT_TO_POINTER (2)),
      "Could not connect to known-source-packet-received signal");

  ts_fail_if (gst_element_set_state (pipeline, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  ts_fail_if (gst_element_set_state (pipeline2, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  if (!fs_stream_transmitter_gather_local_candidates (st, &error))
  {
    if (error)
      ts_fail ("Could not start gathering local candidates %s",
          error->message);
    else
      ts_fail ("Could not start gathering candidates"
          " (without a specified error)");
  }

  if (!fs_stream_transmitter_gather_local_candidates (st2, &error))
  {
    if (error)
      ts_fail ("Could not start gathering local candidates %s",
          error->message);
    else
      ts_fail ("Could not start gathering candidates"
          " (without a specified error)");
  }


  g_idle_add (check_running, NULL);

  g_main_loop_run (loop);

  fs_stream_transmitter_stop (st);
  fs_stream_transmitter_stop (st2);

  gst_element_set_state (pipeline, GST_STATE_NULL);
  gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);

  gst_element_set_state (pipeline2, GST_STATE_NULL);
  gst_element_get_state (pipeline2, NULL, NULL, GST_CLOCK_TIME_NONE);

  if (st)
    g_object_unref (st);
  if (st2)
    g_object_unref (st2);

  g_object_unref (trans);
  g_object_unref (trans2);

  g_object_unref (p1);
  g_object_unref (p2);

  gst_object_unref (pipeline);

  g_main_loop_unref (loop);

}

GST_START_TEST (test_nicetransmitter_basic)
{
  run_nice_transmitter_test (0, NULL, 0);
}
GST_END_TEST;

GST_START_TEST (test_nicetransmitter_no_associate_on_source)
{
  GParameter param = {NULL, {0}};

  param.name = "associate-on-source";
  g_value_init (¶m.value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶m.value, FALSE);

  run_nice_transmitter_test (1, ¶m, FLAG_NO_SOURCE);
}
GST_END_TEST;

GST_START_TEST (test_nicetransmitter_preferred_candidates)
{
  GParameter param = {NULL, {0}};
  FsCandidate *candidate;
  GList *list = NULL;

  candidate = fs_candidate_new ("L1",
      FS_COMPONENT_NONE, FS_CANDIDATE_TYPE_HOST,
      FS_NETWORK_PROTOCOL_UDP, "127.0.0.1", 0);
  list = g_list_prepend (list, candidate);

  candidate = fs_candidate_new ("L1",
      FS_COMPONENT_NONE, FS_CANDIDATE_TYPE_HOST,
      FS_NETWORK_PROTOCOL_UDP, "127.0.0.1", 0);
  list = g_list_prepend (list, candidate);

  param.name = "preferred-local-candidates";
  g_value_init (¶m.value, FS_TYPE_CANDIDATE_LIST);
  g_value_take_boxed (¶m.value, list);

  run_nice_transmitter_test (1, ¶m, FLAG_IS_LOCAL);

  g_value_unset (¶m.value);
}
GST_END_TEST;

GST_START_TEST (test_nicetransmitter_stund)
{
  GParameter params[2];

  if (stund_pid <= 0)
    return;

  memset (params, 0, sizeof (GParameter) * 2);

  params[0].name = "stun-ip";
  g_value_init (¶ms[0].value, G_TYPE_STRING);
  g_value_set_static_string (¶ms[0].value, "127.0.0.1");

  params[1].name = "stun-port";
  g_value_init (¶ms[1].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[1].value, 3478);

  run_nice_transmitter_test (2, params, 0);
}
GST_END_TEST;


GST_START_TEST (test_nicetransmitter_force_candidates)
{
  run_nice_transmitter_test (0, NULL, FLAG_FORCE_CANDIDATES);
}
GST_END_TEST;


GST_START_TEST (test_nicetransmitter_invalid_arguments)
{
  FsTransmitter *trans = NULL;
  FsStreamTransmitter *st = NULL;
  FsNiceTestParticipant *p = NULL;
  GError *error = NULL;
  guint comps = 0;
  GParameter params[1];
  GPtrArray *relay_info;
  FsCandidate *cand;
  GList *list;

  memset (params, 0, sizeof(GParameter) * 1);

  trans = fs_transmitter_new ("nice", 3, 0, &error);
  ts_fail_if (trans == NULL);
  ts_fail_unless (error == NULL);

  g_object_get (trans, "components", &comps, NULL);
  ts_fail_unless (comps == 3);

  st = fs_transmitter_new_stream_transmitter (trans, NULL, 0, NULL, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);

  p = g_object_new (fs_nice_test_participant_get_type (), NULL);

  params[0].name = "preferred-local-candidates";
  g_value_init (¶ms[0].value, FS_TYPE_CANDIDATE_LIST);


  /* invalid port */
  g_value_take_boxed (¶ms[0].value, g_list_append (NULL,
          fs_candidate_new (NULL, 0, FS_CANDIDATE_TYPE_HOST,
              FS_NETWORK_PROTOCOL_UDP, "127.0.0.1", 7777)));

  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);


  /* invalid componnent */
  g_value_take_boxed (¶ms[0].value, g_list_append (NULL,
          fs_candidate_new (NULL, 1, FS_CANDIDATE_TYPE_HOST,
              FS_NETWORK_PROTOCOL_UDP, "127.0.0.1", 0)));

  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);

  /* invalid IP */
  g_value_take_boxed (¶ms[0].value, g_list_append (NULL,
          fs_candidate_new (NULL, 0, FS_CANDIDATE_TYPE_HOST,
              FS_NETWORK_PROTOCOL_UDP, NULL, 0)));
  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);

  /* invalid type */
  g_value_take_boxed (¶ms[0].value, g_list_append (NULL,
          fs_candidate_new (NULL, 0, FS_CANDIDATE_TYPE_MULTICAST,
              FS_NETWORK_PROTOCOL_UDP, "127.0.0.1", 0)));

  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);
  g_value_unset (¶ms[0].value);

  params[0].name = "relay-info";
  g_value_init (¶ms[0].value, G_TYPE_PTR_ARRAY);

  /* no IP */
  relay_info = g_ptr_array_new_full (1, (GDestroyNotify)gst_structure_free);
  g_ptr_array_add (relay_info,
      gst_structure_new ("aa",
          "port", G_TYPE_UINT, 7654,
          "username", G_TYPE_STRING, "blah",
          "password", G_TYPE_STRING, "blah2",
          NULL));
  g_value_take_boxed (¶ms[0].value, relay_info);
  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);

  /* no port */
  relay_info = g_ptr_array_new_full (1, (GDestroyNotify) gst_structure_free);
  g_ptr_array_add (relay_info,
      gst_structure_new ("aa",
          "ip", G_TYPE_STRING, "127.0.0.1",
          "username", G_TYPE_STRING, "blah",
          "pasasword", G_TYPE_STRING, "blah2",
          NULL));
  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);


  /* invalid port */
  relay_info = g_ptr_array_new_full (1, (GDestroyNotify) gst_structure_free);
  g_ptr_array_add (relay_info,
      gst_structure_new ("aa",
          "ip", G_TYPE_STRING, "127.0.0.1",
          "port", G_TYPE_UINT, 65536,
          "username", G_TYPE_STRING, "blah",
          "password", G_TYPE_STRING, "blah2",
          NULL));
  g_value_take_boxed (¶ms[0].value, relay_info);
  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);

  /* no username */
  relay_info = g_ptr_array_new_full (1, (GDestroyNotify) gst_structure_free);
  g_ptr_array_add (relay_info,
      gst_structure_new ("aa",
          "ip", G_TYPE_STRING, "127.0.0.1",
          "port", G_TYPE_UINT, 7654,
          "password", G_TYPE_STRING, "blah2",
          NULL));
  g_value_take_boxed (¶ms[0].value, relay_info);
  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);

  /* no password */
  relay_info = g_ptr_array_new_full (1, (GDestroyNotify) gst_structure_free);
  g_ptr_array_add (relay_info,
      gst_structure_new ("aa",
      "ip", G_TYPE_STRING, "127.0.0.1",
      "port", G_TYPE_UINT, 7654,
      "username", G_TYPE_STRING, "blah",
          NULL));
  g_value_take_boxed (¶ms[0].value, relay_info);
  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_unless (st == NULL);
  ts_fail_unless (error &&
      error->domain == FS_ERROR &&
      error->code == FS_ERROR_INVALID_ARGUMENTS);
  g_clear_error (&error);

  /* valid */
  relay_info = g_ptr_array_new_full (1, (GDestroyNotify) gst_structure_free);
  g_ptr_array_add (relay_info,
      gst_structure_new ("aa",
          "ip", G_TYPE_STRING, "127.0.0.1",
          "port", G_TYPE_UINT, 7654,
          "username", G_TYPE_STRING, "blah",
          "password", G_TYPE_STRING, "blah2",
          NULL));
  g_value_take_boxed (¶ms[0].value, relay_info);
  st = fs_transmitter_new_stream_transmitter (trans, p, 1, params, &error);
  ts_fail_if (st == NULL);
  ts_fail_unless (error == NULL);
  g_value_unset (¶ms[0].value);

  /* Valid candidate, port 0 */
  cand = fs_candidate_new ("abc", 1,
      FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, "1.2.3.4", 0);
  cand->username = g_strdup ("a1");
  cand->password = g_strdup ("a1");
  list = g_list_prepend (NULL, cand);
  ts_fail_unless (fs_stream_transmitter_add_remote_candidates (st, list,
          &error));
  ts_fail_unless (error == NULL);
  fs_candidate_list_destroy (list);

  fs_stream_transmitter_stop (st);
  g_object_unref (st);
  g_object_unref (p);
  g_object_unref (trans);
}
GST_END_TEST;

GST_START_TEST (test_nicetransmitter_sending_half)
{
  run_nice_transmitter_test (0, NULL, FLAG_NOT_SENDING);
}
GST_END_TEST;

GST_START_TEST (test_nicetransmitter_send_component_mux)
{
  GParameter param = {NULL, {0}};

  param.name = "send-component-mux";
  g_value_init (¶m.value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶m.value, TRUE);

  run_nice_transmitter_test (1, ¶m, FLAG_MUXED);
}
GST_END_TEST;

static Suite *
nicetransmitter_suite (void)
{
  Suite *s = suite_create ("nicetransmitter");
  TCase *tc_chain;
  GLogLevelFlags fatal_mask;

  fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
  fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
  g_log_set_always_fatal (fatal_mask);

  tc_chain = tcase_create ("nicetransmitter");
  tcase_add_test (tc_chain, test_nicetransmitter_new);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("nicetransmitter-basic");
  tcase_add_test (tc_chain, test_nicetransmitter_basic);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("nicetransmitter-no-assoc-on-source");
  tcase_add_test (tc_chain, test_nicetransmitter_no_associate_on_source);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("nicetransmitter-preferred-candidates");
  tcase_add_test (tc_chain, test_nicetransmitter_preferred_candidates);
  suite_add_tcase (s, tc_chain);

  if (g_getenv ("STUND"))
  {
    tc_chain = tcase_create ("nicetransmitter-stund");
    tcase_add_checked_fixture (tc_chain, setup_stund, teardown_stund);
    tcase_add_test (tc_chain, test_nicetransmitter_stund);
    suite_add_tcase (s, tc_chain);
  }

  tc_chain = tcase_create ("nicetransmitter-force-candidates");
  tcase_add_test (tc_chain, test_nicetransmitter_force_candidates);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("nicetransmitter-invalid-arguments");
  tcase_add_test (tc_chain, test_nicetransmitter_invalid_arguments);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("nicetransmitter-sending-half");
  tcase_add_test (tc_chain, test_nicetransmitter_sending_half);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("nicetransmitter-send-component-mux");
  tcase_add_test (tc_chain, test_nicetransmitter_send_component_mux);
  suite_add_tcase (s, tc_chain);

  return s;
}


GST_CHECK_MAIN (nicetransmitter);
farstream-0.2.7/tests/check/transmitter/rawudp.c0000664000076400007640000007147312461773672016733 00000000000000/* Farstream unit tests for FsRawUdpTransmitter
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 
#include 

#include 
#include 

#include 

#include "check-threadsafe.h"
#include "generic.h"
#include "transmitter/rawudp-upnp.h"
#include "testutils.h"

#include "stunalternd.h"


gint buffer_count[2] = {0, 0};
GMainLoop *loop = NULL;
gint candidates[2] = {0, 0};
GstElement *pipeline = NULL;
gboolean src_setup[2] = {FALSE, FALSE};
volatile gint running = TRUE;
guint received_known[2] = {0, 0};
gboolean has_stun = FALSE;
gboolean associate_on_source = TRUE;

gboolean pipeline_done = FALSE;
GMutex pipeline_mod_mutex;

void *stun_alternd_data = NULL;

enum {
  FLAG_HAS_STUN  = 1 << 0,
  FLAG_IS_LOCAL  = 1 << 1,
  FLAG_NO_SOURCE = 1 << 2,
  FLAG_NOT_SENDING = 1 << 3
};

#define RTP_PORT 9828
#define RTCP_PORT 9829


GST_START_TEST (test_rawudptransmitter_new)
{
  gchar **transmitters;
  gint i;
  gboolean found_it = FALSE;

  transmitters = fs_transmitter_list_available ();
  for (i=0; transmitters != NULL && transmitters[i]; i++)
  {
    if (!strcmp ("rawudp", transmitters[i]))
    {
      found_it = TRUE;
      break;
    }
  }
  g_strfreev (transmitters);

  ts_fail_unless (found_it, "Did not find rawudp transmitter");

  test_transmitter_creation ("rawudp");
  test_transmitter_creation ("rawudp");
}
GST_END_TEST;

static void
_new_local_candidate (FsStreamTransmitter *st, FsCandidate *candidate,
  gpointer user_data)
{
  gboolean is_local = GPOINTER_TO_INT (user_data) & FLAG_IS_LOCAL;
  GError *error = NULL;
  GList *item = NULL;
  gboolean ret;

  GST_DEBUG ("Has local candidate %s:%u of type %d",
    candidate->ip, candidate->port, candidate->type);

  ts_fail_if (candidate == NULL, "Passed NULL candidate");
  ts_fail_unless (candidate->ip != NULL, "Null IP in candidate");
  ts_fail_if (candidate->port == 0, "Candidate has port 0");
  ts_fail_unless (candidate->proto == FS_NETWORK_PROTOCOL_UDP,
    "Protocol is not UDP");

  if (has_stun)
    ts_fail_unless (candidate->type == FS_CANDIDATE_TYPE_SRFLX,
      "Has stun, but candidate is not server reflexive,"
      " it is: %s:%u of type %d on component %u",
      candidate->ip, candidate->port, candidate->type, candidate->component_id);
  else {
    ts_fail_unless (candidate->type == FS_CANDIDATE_TYPE_HOST,
        "Does not have stun, but candidate is not host");
    if (candidate->component_id == FS_COMPONENT_RTP) {
      ts_fail_unless (candidate->port % 2 == 0, "RTP port should be odd");
    } else if (candidate->component_id == FS_COMPONENT_RTCP) {
      ts_fail_unless (candidate->port % 2 == 1, "RTCP port should be event");
    }
  }

  if (is_local) {
    ts_fail_unless (!strcmp (candidate->ip, "127.0.0.1"),
      "IP is wrong, it is %s but should be 127.0.0.1 when local candidate set",
      candidate->ip);

    if (candidate->component_id == FS_COMPONENT_RTP) {
      ts_fail_unless (candidate->port >= RTP_PORT  , "RTP port invalid");
    } else if (candidate->component_id == FS_COMPONENT_RTCP) {
      ts_fail_unless (candidate->port >= RTCP_PORT, "RTCP port invalid");
    }
  }


  candidates[candidate->component_id-1] = 1;

  GST_DEBUG ("New local candidate %s:%d of type %d for component %d",
    candidate->ip, candidate->port, candidate->type, candidate->component_id);

  item = g_list_prepend (NULL, candidate);

  ret = fs_stream_transmitter_force_remote_candidates (st, item, &error);

  g_list_free (item);

  if (error)
    ts_fail ("Error while adding candidate: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);

  ts_fail_unless (ret == TRUE, "No detailed error from add_remote_candidate");

}

static void
_local_candidates_prepared (FsStreamTransmitter *st, gpointer user_data)
{
  ts_fail_if (candidates[0] == 0, "candidates-prepared with no RTP candidate");
  ts_fail_if (candidates[1] == 0, "candidates-prepared with no RTCP candidate");

  GST_DEBUG ("Local Candidates Prepared");

  /*
   * This doesn't work on my router
   */

  if (has_stun)
  {
    g_main_loop_quit (loop);
    g_atomic_int_set(&running, FALSE);
  }
}


static void
_new_active_candidate_pair (FsStreamTransmitter *st, FsCandidate *local,
  FsCandidate *remote, gpointer user_data)
{
  ts_fail_if (local == NULL, "Local candidate NULL");
  ts_fail_if (remote == NULL, "Remote candidate NULL");

  ts_fail_unless (local->component_id == remote->component_id,
    "Local and remote candidates dont have the same component id");

  GST_DEBUG ("New active candidate pair for component %d", local->component_id);

  g_mutex_lock (&pipeline_mod_mutex);
  if (!pipeline_done && !src_setup[local->component_id-1])
    setup_fakesrc (user_data, pipeline, local->component_id);
  src_setup[local->component_id-1] = TRUE;
  g_mutex_unlock (&pipeline_mod_mutex);
}

static void
_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  gint component_id = GPOINTER_TO_INT (user_data);

  ts_fail_unless (gst_buffer_get_size (buffer) == component_id * 10,
    "Buffer is size %d but component_id is %d", gst_buffer_get_size (buffer),
    component_id);

  buffer_count[component_id-1]++;

  GST_LOG ("Buffer %d component: %d size: %" G_GSIZE_FORMAT,
      buffer_count[component_id-1], component_id, gst_buffer_get_size (buffer));

  ts_fail_if (buffer_count[component_id-1] > 20,
    "Too many buffers %d > 20 for component",
    buffer_count[component_id-1], component_id);

  if (buffer_count[0] == 20 && buffer_count[1] == 20) {
    /* TEST OVER */
    if (associate_on_source)
      ts_fail_unless (buffer_count[0] == received_known[0] &&
          buffer_count[1] == received_known[1], "Some known buffers from known"
          " sources have not been reported (%d != %u || %d != %u)",
          buffer_count[0], received_known[0],
          buffer_count[1], received_known[1]);
    else
      ts_fail_unless (received_known[0] == 0 && received_known[1] == 0,
          "Got a known-source-packet-received signal when we shouldn't have");
    g_atomic_int_set(&running, FALSE);
    g_main_loop_quit (loop);
  }
}

static void
_known_source_packet_received (FsStreamTransmitter *st, guint component_id,
    GstBuffer *buffer, gpointer user_data)
{
  ts_fail_unless (associate_on_source == TRUE,
      "Got known-source-packet-received when we shouldn't have");

  ts_fail_unless (component_id == 1 || component_id == 2,
      "Invalid component id %u", component_id);

  ts_fail_unless (GST_IS_BUFFER (buffer), "Invalid buffer received at %p",
      buffer);

  received_known[component_id - 1]++;
}

static gboolean
check_running (gpointer data)
{
  if (g_atomic_int_get (&running) == FALSE)
    g_main_loop_quit (loop);

  return FALSE;
}

void
sync_error_handler (GstBus *bus, GstMessage *message, gpointer blob)
{
  GError *error = NULL;
  gchar *debug;
  gst_message_parse_error (message, &error, &debug);
  g_error ("bus sync error %s", error->message);
}


static void
run_rawudp_transmitter_test (gint n_parameters, GParameter *params,
  gint flags)
{
  GError *error = NULL;
  FsTransmitter *trans;
  FsStreamTransmitter *st;
  GstBus *bus = NULL;
  guint tos;

  buffer_count[0] = 0;
  buffer_count[1] = 0;
  received_known[0] = 0;
  received_known[1] = 0;
  pipeline_done = FALSE;

  has_stun = flags & FLAG_HAS_STUN;
  associate_on_source = !(flags & FLAG_NO_SOURCE);

  if ((flags & FLAG_NOT_SENDING))
  {
    buffer_count[0] = 20;
    received_known[0] = 20;
  }

  loop = g_main_loop_new (NULL, FALSE);
  trans = fs_transmitter_new ("rawudp", 2, 0, &error);

  if (error) {
    ts_fail ("Error creating transmitter: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);
  }

  ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");

  g_object_set (trans, "tos", 2, NULL);
  g_object_get (trans, "tos", &tos, NULL);
  ts_fail_unless (tos == 2);

  pipeline = setup_pipeline (trans, G_CALLBACK (_handoff_handler));

  bus = gst_element_get_bus (pipeline);
  gst_bus_add_watch (bus, bus_error_callback, NULL);

  gst_bus_enable_sync_message_emission (bus);
  g_signal_connect (bus, "sync-message::error", G_CALLBACK (sync_error_handler), NULL);

  gst_object_unref (bus);

  st = fs_transmitter_new_stream_transmitter (trans, NULL, n_parameters, params,
    &error);

  if (error) {
    if (has_stun &&
        error->domain == FS_ERROR &&
        error->code == FS_ERROR_NETWORK &&
        error->message && strstr (error->message, "unreachable"))
    {
      GST_WARNING ("Skipping stunserver test, we have no network");
      goto skip;
    }
    else
      ts_fail ("Error creating stream transmitter: (%s:%d) %s",
          g_quark_to_string (error->domain), error->code, error->message);
  }

  ts_fail_if (st == NULL, "No stream transmitter created, yet error is NULL");

  g_object_set (st, "sending", !(flags & FLAG_NOT_SENDING), NULL);

  ts_fail_unless (g_signal_connect (st, "new-local-candidate",
      G_CALLBACK (_new_local_candidate), GINT_TO_POINTER (flags)),
    "Could not connect new-local-candidate signal");
  ts_fail_unless (g_signal_connect (st, "local-candidates-prepared",
      G_CALLBACK (_local_candidates_prepared), GINT_TO_POINTER (flags)),
    "Could not connect local-candidates-prepared signal");
  ts_fail_unless (g_signal_connect (st, "new-active-candidate-pair",
      G_CALLBACK (_new_active_candidate_pair), trans),
    "Could not connect new-active-candidate-pair signal");
  ts_fail_unless (g_signal_connect (st, "error",
      G_CALLBACK (stream_transmitter_error), NULL),
    "Could not connect error signal");
  ts_fail_unless (g_signal_connect (st, "known-source-packet-received",
      G_CALLBACK (_known_source_packet_received), NULL),
    "Could not connect known-source-packet-received signal");

  ts_fail_if (gst_element_set_state (pipeline, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  if (!fs_stream_transmitter_gather_local_candidates (st, &error))
  {
    if (error)
    {
      ts_fail ("Could not start gathering local candidates (%s:%d) %s",
          g_quark_to_string (error->domain), error->code, error->message);
    }
    else
      ts_fail ("Could not start gathering candidates"
          " (without a specified error)");
  }

  g_idle_add (check_running, NULL);

  g_main_loop_run (loop);

 skip:

  g_mutex_lock (&pipeline_mod_mutex);
  pipeline_done = TRUE;
  g_mutex_unlock (&pipeline_mod_mutex);

  gst_element_set_state (pipeline, GST_STATE_NULL);

  if (st)
  {
    fs_stream_transmitter_stop (st);
    g_object_unref (st);
  }

  g_object_unref (trans);

  gst_object_unref (pipeline);

  g_main_loop_unref (loop);
}

GST_START_TEST (test_rawudptransmitter_run_nostun)
{
  GParameter params[1];

  memset (params, 0, sizeof (GParameter));

  params[0].name = "upnp-discovery";
  g_value_init (¶ms[0].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[0].value, FALSE);

  run_rawudp_transmitter_test (1, params, 0);
}
GST_END_TEST;

GST_START_TEST (test_rawudptransmitter_run_nostun_nosource)
{
  GParameter params[2];

  memset (params, 0, sizeof (GParameter) * 2);

  params[0].name = "associate-on-source";
  g_value_init (¶ms[0].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[0].value, FALSE);

  params[1].name = "upnp-discovery";
  g_value_init (¶ms[1].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[1].value, FALSE);

  run_rawudp_transmitter_test (2, params, FLAG_NO_SOURCE);
}
GST_END_TEST;

GST_START_TEST (test_rawudptransmitter_run_invalid_stun)
{
  GParameter params[4];

  /*
   * Hopefully not one is runing a stun server on local port 7777
   */

  memset (params, 0, sizeof (GParameter) * 4);

  params[0].name = "stun-ip";
  g_value_init (¶ms[0].value, G_TYPE_STRING);
  g_value_set_static_string (¶ms[0].value, "127.0.0.1");

  params[1].name = "stun-port";
  g_value_init (¶ms[1].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[1].value, 7777);

  params[2].name = "stun-timeout";
  g_value_init (¶ms[2].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[2].value, 3);

  params[3].name = "upnp-discovery";
  g_value_init (¶ms[3].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[3].value, FALSE);

  run_rawudp_transmitter_test (4, params, 0);
}
GST_END_TEST;

GST_START_TEST (test_rawudptransmitter_run_stund)
{
  GParameter params[4];

  if (stund_pid <= 0)
    return;

  memset (params, 0, sizeof (GParameter) * 4);

  params[0].name = "stun-ip";
  g_value_init (¶ms[0].value, G_TYPE_STRING);
  g_value_set_static_string (¶ms[0].value, "127.0.0.1");

  params[1].name = "stun-port";
  g_value_init (¶ms[1].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[1].value, 3478);

  params[2].name = "stun-timeout";
  g_value_init (¶ms[2].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[2].value, 5);

  params[3].name = "upnp-discovery";
  g_value_init (¶ms[3].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[3].value, FALSE);


  run_rawudp_transmitter_test (3, params, FLAG_HAS_STUN);
}
GST_END_TEST;


GST_START_TEST (test_rawudptransmitter_run_local_candidates)
{
  GParameter params[2];
  GList *list = NULL;
  FsCandidate *candidate;

  memset (params, 0, sizeof (GParameter) * 2);

  candidate = fs_candidate_new ("L1",
      FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST,
      FS_NETWORK_PROTOCOL_UDP, "127.0.0.1", RTP_PORT);
  list = g_list_prepend (list, candidate);

  candidate = fs_candidate_new ("L1",
      FS_COMPONENT_RTCP, FS_CANDIDATE_TYPE_HOST,
      FS_NETWORK_PROTOCOL_UDP, "127.0.0.1", RTCP_PORT);
  list = g_list_prepend (list, candidate);

  params[0].name = "preferred-local-candidates";
  g_value_init (¶ms[0].value, FS_TYPE_CANDIDATE_LIST);
  g_value_set_boxed (¶ms[0].value, list);

  params[1].name = "upnp-discovery";
  g_value_init (¶ms[1].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[1].value, FALSE);


  run_rawudp_transmitter_test (2, params, FLAG_IS_LOCAL);

  g_value_reset (¶ms[0].value);

  fs_candidate_list_destroy (list);
}
GST_END_TEST;

static gboolean
_bus_stop_stream_cb (GstBus *bus, GstMessage *message, gpointer user_data)
{
  FsStreamTransmitter *st = user_data;
  GstState oldstate, newstate, pending;

  if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_STATE_CHANGED ||
      G_OBJECT_TYPE (GST_MESSAGE_SRC (message)) != GST_TYPE_PIPELINE)
    return bus_error_callback (bus, message, user_data);

  gst_message_parse_state_changed (message, &oldstate, &newstate, &pending);

  if (newstate != GST_STATE_PLAYING)
    return TRUE;

  if (pending != GST_STATE_VOID_PENDING)
    ts_fail ("New state playing, but pending is %d", pending);

  GST_DEBUG ("Stopping stream transmitter");

  fs_stream_transmitter_stop (st);
  g_object_unref (st);

  GST_DEBUG ("Stopped stream transmitter");

  g_atomic_int_set(&running, FALSE);
  g_main_loop_quit (loop);

  return TRUE;
}

static void
_handoff_handler_empty (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
}


/*
 * This test checks that starting a stream, getting it to playing
 * then stopping it, while the pipeline is playing works
 */

GST_START_TEST (test_rawudptransmitter_stop_stream)
{
  GError *error = NULL;
  FsTransmitter *trans;
  FsStreamTransmitter *st;
  GstBus *bus = NULL;
  GParameter params[1];

  memset (params, 0, sizeof (GParameter));

  params[0].name = "upnp-discovery";
  g_value_init (¶ms[0].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[0].value, FALSE);

  has_stun = FALSE;

  loop = g_main_loop_new (NULL, FALSE);
  trans = fs_transmitter_new ("rawudp", 2, 0, &error);

  if (error) {
    ts_fail ("Error creating transmitter: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);
  }

  ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");

  pipeline = setup_pipeline (trans, G_CALLBACK (_handoff_handler_empty));

  st = fs_transmitter_new_stream_transmitter (trans, NULL, 1, params, &error);

  if (error)
    ts_fail ("Error creating stream transmitter: (%s:%d) %s",
        g_quark_to_string (error->domain), error->code, error->message);

  ts_fail_if (st == NULL, "No stream transmitter created, yet error is NULL");

  bus = gst_element_get_bus (pipeline);
  gst_bus_add_watch (bus, _bus_stop_stream_cb, st);
  gst_object_unref (bus);

  ts_fail_unless (g_signal_connect (st, "new-local-candidate",
          G_CALLBACK (_new_local_candidate), NULL),
      "Could not connect new-local-candidate signal");
  ts_fail_unless (g_signal_connect (st, "new-active-candidate-pair",
          G_CALLBACK (_new_active_candidate_pair), trans),
      "Could not connect new-active-candidate-pair signal");
  ts_fail_unless (g_signal_connect (st, "error",
          G_CALLBACK (stream_transmitter_error), NULL),
      "Could not connect error signal");

  ts_fail_if (gst_element_set_state (pipeline, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  if (!fs_stream_transmitter_gather_local_candidates (st, &error))
  {
    if (error)
      ts_fail ("Could not start gathering local candidates %s",
          error->message);
    else
      ts_fail ("Could not start gathering candidates"
          " (without a specified error)");
  }

  g_idle_add (check_running, NULL);

  g_main_loop_run (loop);

  gst_element_set_state (pipeline, GST_STATE_NULL);

  g_object_unref (trans);

  gst_object_unref (pipeline);

  g_main_loop_unref (loop);
}
GST_END_TEST;

#ifdef HAVE_GUPNP

GST_START_TEST (test_rawudptransmitter_run_upnp_discovery)
{
  GParameter params[2];
  GObject *context;
  gboolean got_address = FALSE;
  gboolean added_mapping = FALSE;

  memset (params, 0, sizeof (GParameter) * 2);

  params[0].name = "associate-on-source";
  g_value_init (¶ms[0].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[0].value, TRUE);

  params[1].name = "upnp-discovery";
  g_value_init (¶ms[1].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[1].value, TRUE);

  context = start_upnp_server ();

  run_rawudp_transmitter_test (2, params, 0);


  get_vars (&got_address, &added_mapping);
  ts_fail_unless (got_address, "did not get address");
  ts_fail_unless (added_mapping, "did not add mapping");
  g_object_unref (context);
}
GST_END_TEST;

GST_START_TEST (test_rawudptransmitter_run_upnp_fallback)
{
  GParameter params[6];
  GObject *context;
  gboolean got_address = FALSE;
  gboolean added_mapping = FALSE;

  memset (params, 0, sizeof (GParameter) * 6);

  params[0].name = "associate-on-source";
  g_value_init (¶ms[0].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[0].value, TRUE);

  params[1].name = "upnp-discovery";
  g_value_init (¶ms[1].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[1].value, FALSE);

  params[2].name = "stun-ip";
  g_value_init (¶ms[2].value, G_TYPE_STRING);
  g_value_set_static_string (¶ms[2].value, "127.0.0.1");

  params[3].name = "stun-port";
  g_value_init (¶ms[3].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[3].value, 3232);

  params[4].name = "stun-timeout";
  g_value_init (¶ms[4].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[4].value, 6);

  params[5].name = "upnp-discovery-timeout";
  g_value_init (¶ms[5].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[5].value, 3);

  context = start_upnp_server ();

  run_rawudp_transmitter_test (6, params, 0);

  get_vars (&got_address, &added_mapping);
  ts_fail_unless (got_address, "did not get address");
  ts_fail_unless (added_mapping, "did not add mapping");

  g_object_unref (context);
}
GST_END_TEST;

GST_START_TEST (test_rawudptransmitter_run_upnp_ignored)
{
  GParameter params[6];
  GObject *context;

  if (stund_pid <= 0)
    return;

  memset (params, 0, sizeof (GParameter) * 6);

  params[0].name = "associate-on-source";
  g_value_init (¶ms[0].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[0].value, TRUE);

  params[1].name = "upnp-discovery";
  g_value_init (¶ms[1].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[1].value, FALSE);

  params[2].name = "stun-ip";
  g_value_init (¶ms[2].value, G_TYPE_STRING);
  g_value_set_static_string (¶ms[2].value, "127.0.0.1");

  params[3].name = "stun-port";
  g_value_init (¶ms[3].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[3].value, 3478);

  params[4].name = "stun-timeout";
  g_value_init (¶ms[4].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[4].value, 6);

  params[5].name = "upnp-discovery-timeout";
  g_value_init (¶ms[5].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[5].value, 3);

  context = start_upnp_server ();

  run_rawudp_transmitter_test (6, params, FLAG_HAS_STUN);

  g_object_unref (context);
}
GST_END_TEST;

#endif /* HAVE_GUPNP */


GST_START_TEST (test_rawudptransmitter_sending_half)
{
  GParameter params[2];

  memset (params, 0, sizeof (GParameter) * 2);

  params[0].name = "associate-on-source";
  g_value_init (¶ms[0].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[0].value, TRUE);

  params[1].name = "upnp-discovery";
  g_value_init (¶ms[1].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[1].value, FALSE);

  run_rawudp_transmitter_test (2, params, FLAG_NOT_SENDING);
}
GST_END_TEST;


GST_START_TEST (test_rawudptransmitter_run_stunalternd)
{
  GParameter params[4];

  if (stund_pid <= 0 || stun_alternd_data == NULL)
    return;

  memset (params, 0, sizeof (GParameter) * 4);

  params[0].name = "stun-ip";
  g_value_init (¶ms[0].value, G_TYPE_STRING);
  g_value_set_static_string (¶ms[0].value, "127.0.0.1");

  params[1].name = "stun-port";
  g_value_init (¶ms[1].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[1].value, 3480);

  params[2].name = "stun-timeout";
  g_value_init (¶ms[2].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[2].value, 5);

  params[3].name = "upnp-discovery";
  g_value_init (¶ms[3].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[3].value, FALSE);


  run_rawudp_transmitter_test (3, params, FLAG_HAS_STUN);
}
GST_END_TEST;


GST_START_TEST (test_rawudptransmitter_run_stun_altern_to_nowhere)
{
  GParameter params[4];

  if (stun_alternd_data == NULL)
    return;

  /*
   * Hopefully not one is runing a stun server on local port 3478
   */

  memset (params, 0, sizeof (GParameter) * 4);

  params[0].name = "stun-ip";
  g_value_init (¶ms[0].value, G_TYPE_STRING);
  g_value_set_static_string (¶ms[0].value, "127.0.0.1");

  params[1].name = "stun-port";
  g_value_init (¶ms[1].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[1].value, 3480);

  params[2].name = "stun-timeout";
  g_value_init (¶ms[2].value, G_TYPE_UINT);
  g_value_set_uint (¶ms[2].value, 10);

  params[3].name = "upnp-discovery";
  g_value_init (¶ms[3].value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶ms[3].value, FALSE);

  run_rawudp_transmitter_test (4, params, 0);
}
GST_END_TEST;

GST_START_TEST (test_rawudptransmitter_strange_arguments)
{
  FsTransmitter *trans = NULL;
  FsStreamTransmitter *st = NULL;
  GError *error = NULL;
  guint comps = 0;
  FsCandidate *cand;
  GList *list;

  trans = fs_transmitter_new ("rawudp", 3, 0, &error);
  ts_fail_if (trans == NULL);
  ts_fail_unless (error == NULL);

  g_object_get (trans, "components", &comps, NULL);
  ts_fail_unless (comps == 3);

  /* valid */
  st = fs_transmitter_new_stream_transmitter (trans, NULL, 0, NULL, &error);
  ts_fail_if (st == NULL);
  ts_fail_unless (error == NULL);

  /* Valid candidate, port 0 */
  cand = fs_candidate_new ("abc", 1,
      FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, "1.2.3.4", 0);
  list = g_list_prepend (NULL, cand);
  ts_fail_unless (fs_stream_transmitter_force_remote_candidates (st, list,
          &error));
  ts_fail_unless (error == NULL);
  fs_candidate_list_destroy (list);

  fs_stream_transmitter_stop (st);
  g_object_unref (st);
  g_object_unref (trans);
}
GST_END_TEST;

void
setup_stunalternd_valid (void)
{
  stun_alternd_data = stun_alternd_init (G_SOCKET_FAMILY_IPV4,
      "127.0.0.1", 3478, 3480);

  if (!stun_alternd_data)
    GST_WARNING ("Could not spawn stunalternd,"
        " skipping stun alternate server testing");
}

static void
setup_stunalternd_loop (void)
{
  stun_alternd_data = stun_alternd_init (G_SOCKET_FAMILY_IPV4,
      "127.0.0.1", 3478, 3478);

  if (!stun_alternd_data)
    GST_WARNING ("Could not spawn stunalternd,"
        " skipping stun alternate server testing");
}

static void
teardown_stunalternd (void)
{
  if (!stun_alternd_data)
    return;

  stun_alternd_stop (stun_alternd_data);
  stun_alternd_data = NULL;
}

static void
setup_stund_stunalternd (void)
{
  setup_stund ();
  setup_stunalternd_valid ();
}


static void
teardown_stund_stunalternd (void)
{
  teardown_stund ();
  teardown_stunalternd ();
}


static Suite *
rawudptransmitter_suite (void)
{
  Suite *s = suite_create ("rawudptransmitter");
  TCase *tc_chain;
  GLogLevelFlags fatal_mask;

  fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
  fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
  g_log_set_always_fatal (fatal_mask);

  tc_chain = tcase_create ("rawudptransmitter_new");
  tcase_add_test (tc_chain, test_rawudptransmitter_new);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter_nostun");
  tcase_add_test (tc_chain, test_rawudptransmitter_run_nostun);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter_nostun_nosource");
  tcase_add_test (tc_chain, test_rawudptransmitter_run_nostun_nosource);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter-stun-timeout");
  tcase_set_timeout (tc_chain, 5);
  tcase_add_test (tc_chain, test_rawudptransmitter_run_invalid_stun);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter-stund");
  tcase_set_timeout (tc_chain, 15);
  tcase_add_checked_fixture (tc_chain, setup_stund, teardown_stund);
  tcase_add_test (tc_chain, test_rawudptransmitter_run_stund);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter-local-candidates");
  tcase_add_test (tc_chain, test_rawudptransmitter_run_local_candidates);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter-stop-stream");
  tcase_add_test (tc_chain, test_rawudptransmitter_stop_stream);
  suite_add_tcase (s, tc_chain);

#ifdef HAVE_GUPNP
  if (g_getenv ("UPNP")) {
    gchar *multicast_addr;

    multicast_addr = find_multicast_capable_address ();
    g_free (multicast_addr);

    if (multicast_addr)
    {
      tc_chain = tcase_create ("rawudptransmitter-upnp-discovery");
      tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_discovery);
      suite_add_tcase (s, tc_chain);

      tc_chain = tcase_create ("rawudptransmitter-upnp-fallback");
      tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_fallback);
      suite_add_tcase (s, tc_chain);

      tc_chain = tcase_create ("rawudptransmitter-upnp-ignored");
      tcase_add_checked_fixture (tc_chain, setup_stund, teardown_stund);
      tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_ignored);
      suite_add_tcase (s, tc_chain);
    }
  }
#endif

  tc_chain = tcase_create ("rawudptransmitter-sending-half");
  tcase_add_test (tc_chain, test_rawudptransmitter_sending_half);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter-stunalternd");
  tcase_set_timeout (tc_chain, 5);
  tcase_add_checked_fixture (tc_chain, setup_stund_stunalternd,
      teardown_stund_stunalternd);
  tcase_add_test (tc_chain, test_rawudptransmitter_run_stunalternd);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter-stunalternd-to-nowhere");
  tcase_set_timeout (tc_chain, 12);
  tcase_add_checked_fixture (tc_chain, setup_stunalternd_valid,
      teardown_stunalternd);
  tcase_add_test (tc_chain, test_rawudptransmitter_run_stun_altern_to_nowhere);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter-stunalternd-loop");
  tcase_set_timeout (tc_chain, 12);
  tcase_add_checked_fixture (tc_chain, setup_stunalternd_loop,
      teardown_stunalternd);
  tcase_add_test (tc_chain, test_rawudptransmitter_run_stun_altern_to_nowhere);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("rawudptransmitter-strange-arguments");
  tcase_add_test (tc_chain, test_rawudptransmitter_strange_arguments);
  suite_add_tcase (s, tc_chain);

  return s;
}


GST_CHECK_MAIN (rawudptransmitter);
farstream-0.2.7/tests/check/transmitter/rawudp-upnp.h0000664000076400007640000000211711710041463017663 00000000000000/* Farstream unit tests for FsRawUdpTransmitter UPnP code
 *
 * Copyright (C) 2008 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/


#ifndef __RAWUDP_UPNP_H__
#define __RAWUDP_UPNP_H__

GObject *start_upnp_server (void);

void get_vars (gboolean *out_got_address,
    gboolean *out_added_mapping);

#endif /* __RAWUDP_UPNP_H__ */
farstream-0.2.7/tests/check/transmitter/shm.c0000664000076400007640000003135012461773672016206 00000000000000/* Farstream unit tests for FsShmTransmitter
 *
 * Copyright (C) 2009 Collabora Ltd
 * @author: Olivier Crete 
 * Copyright (C) 2009 Nokia
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 
#include 

#include 
#include 

#include 

#include "check-threadsafe.h"
#include "generic.h"

gint buffer_count[2] = {0, 0};
gboolean got_candidates[2];
gboolean got_prepared[2];
GstElement *pipeline = NULL;
gboolean src_setup[2] = {FALSE, FALSE};
guint received_known[2] = {0, 0};
gboolean associate_on_source = TRUE;

GMutex test_mutex;
GCond cond;
gboolean done = FALSE;
guint connected_count;


enum {
  FLAG_NO_SOURCE = 1 << 2,
  FLAG_NOT_SENDING = 1 << 3,
  FLAG_LOCAL_CANDIDATES = 1 << 5
};

#define RTP_PORT 9828
#define RTCP_PORT 9829

GST_START_TEST (test_shmtransmitter_new)
{
  gchar **transmitters;
  gint i;
  gboolean found_it = FALSE;

  transmitters = fs_transmitter_list_available ();
  for (i=0; transmitters[i]; i++)
  {
    if (!strcmp ("shm", transmitters[i]))
    {
      found_it = TRUE;
      break;
    }
  }
  g_strfreev (transmitters);

  ts_fail_unless (found_it, "Did not find shm transmitter");

  test_transmitter_creation ("shm");
  test_transmitter_creation ("shm");
}
GST_END_TEST;

static void
_new_local_candidate (FsStreamTransmitter *st, FsCandidate *candidate,
  gpointer user_data)
{
  ts_fail_if (candidate == NULL, "Passed NULL candidate");
  ts_fail_unless (candidate->ip != NULL, "Null IP in candidate");
  ts_fail_unless (candidate->proto == FS_NETWORK_PROTOCOL_UDP,
    "Protocol is not UDP");

  ts_fail_unless (candidate->type == FS_CANDIDATE_TYPE_HOST,
      "Candidate is not host");
  ts_fail_unless (got_candidates[candidate->component_id-1] == FALSE);
  got_candidates[candidate->component_id-1] = TRUE;

  GST_DEBUG ("New local candidate %s of type %d for component %d",
      candidate->ip, candidate->type, candidate->component_id);
}


static void
_candidate_prepared (FsStreamTransmitter *st,gpointer user_data)
{
  GST_DEBUG ("Local candidates prepared");

  fail_unless (got_candidates[0] == TRUE || got_candidates[1] == TRUE);

  if (got_candidates[0])
    got_prepared[0] = TRUE;
  if (got_candidates[1])
    got_prepared[1] = TRUE;
}

static void
_state_changed (FsStreamTransmitter *st, guint component_id,
    FsStreamState state, gpointer user_data)
{
  g_mutex_lock (&test_mutex);
  connected_count++;
  g_mutex_unlock (&test_mutex);
  g_cond_signal (&cond);
}

static void
_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  gint component_id = GPOINTER_TO_INT (user_data);

  ts_fail_unless (gst_buffer_get_size (buffer) == component_id * 10,
    "Buffer is size %d but component_id is %d", gst_buffer_get_size (buffer),
    component_id);

  buffer_count[component_id-1]++;

  GST_LOG ("Buffer %d component: %d size: %" G_GSIZE_FORMAT,
      buffer_count[component_id-1], component_id, gst_buffer_get_size (buffer));

  ts_fail_if (buffer_count[component_id-1] > 20,
    "Too many buffers %d > 20 for component",
    buffer_count[component_id-1], component_id);

  if (buffer_count[0] == 20 && buffer_count[1] == 20) {
    GST_DEBUG ("Test complete, got 20 buffers twice");
    /* TEST OVER */
    if (associate_on_source)
      ts_fail_unless (buffer_count[0] == received_known[0] &&
          buffer_count[1] == received_known[1], "Some known buffers from known"
          " sources have not been reported (%d != %u || %d != %u)",
          buffer_count[0], received_known[0],
          buffer_count[1], received_known[1]);
    else
      ts_fail_unless (received_known[0] == 0 && received_known[1] == 0,
          "Got a known-source-packet-received signal when we shouldn't have");

    g_mutex_lock (&test_mutex);
    done = TRUE;
    g_mutex_unlock (&test_mutex);
    g_cond_signal (&cond);
  }
}

static void
_known_source_packet_received (FsStreamTransmitter *st, guint component_id,
    GstBuffer *buffer, gpointer user_data)
{
  ts_fail_unless (associate_on_source == TRUE,
      "Got known-source-packet-received when we shouldn't have");

  ts_fail_unless (component_id == 1 || component_id == 2,
      "Invalid component id %u", component_id);

  ts_fail_unless (GST_IS_BUFFER (buffer), "Invalid buffer received at %p",
      buffer);

  received_known[component_id - 1]++;

  GST_LOG ("Known source buffer %d component: %d size: %" G_GSIZE_FORMAT,
      received_known[component_id-1], component_id,
      gst_buffer_get_size (buffer));
}

void
sync_error_handler (GstBus *bus, GstMessage *message, gpointer blob)
{
  GError *error = NULL;
  gchar *debug;
  gst_message_parse_error (message, &error, &debug);
  g_error ("bus sync error %s debug: %s", error->message, debug);
}


static void
run_shm_transmitter_test (gint flags)
{
  GError *error = NULL;
  FsTransmitter *trans;
  FsStreamTransmitter *st;
  GstBus *bus = NULL;
  GParameter params[1];
  GList *local_cands = NULL;
  GstStateChangeReturn ret;
  FsCandidate *cand;
  GList *remote_cands = NULL;
  int param_count = 0;
  gint bus_source;

  done = FALSE;
  connected_count = 0;
  g_cond_init (&cond);
  g_mutex_init (&test_mutex);

  buffer_count[0] = 0;
  buffer_count[1] = 0;
  received_known[0] = 0;
  received_known[1] = 0;

  got_candidates[0] = FALSE;
  got_candidates[1] = FALSE;
  got_prepared[0] = FALSE;
  got_prepared[1] = FALSE;

  if (unlink ("/tmp/src1") < 0 && errno != ENOENT)
    fail ("Could not unlink /tmp/src1: %s", strerror (errno));
  if (unlink ("/tmp/src2") < 0 && errno != ENOENT)
    fail ("Could not unlink /tmp/src2: %s", strerror (errno));


  local_cands = g_list_append (local_cands, fs_candidate_new (NULL, 1,
          FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, "/tmp/src1", 0));
  local_cands = g_list_append (local_cands, fs_candidate_new (NULL, 2,
          FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, "/tmp/src2", 0));

  if (flags & FLAG_LOCAL_CANDIDATES)
  {
    memset (params, 0, sizeof (GParameter));

    params[0].name = "preferred-local-candidates";
    g_value_init (¶ms[0].value, FS_TYPE_CANDIDATE_LIST);
    g_value_take_boxed (¶ms[0].value, local_cands);

    param_count = 1;
  }


  associate_on_source = !(flags & FLAG_NO_SOURCE);

  if (flags & FLAG_NOT_SENDING)
  {
    buffer_count[0] = 20;
    received_known[0] = 20;
  }

  trans = fs_transmitter_new ("shm", 2, 0, &error);

  if (error)
    ts_fail ("Error creating transmitter: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);
  ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");
  g_clear_error (&error);

  pipeline = setup_pipeline (trans, G_CALLBACK (_handoff_handler));

  bus = gst_element_get_bus (pipeline);
  bus_source = gst_bus_add_watch (bus, bus_error_callback, NULL);

  gst_bus_enable_sync_message_emission (bus);
  g_signal_connect (bus, "sync-message::error",
      G_CALLBACK (sync_error_handler), NULL);

  gst_object_unref (bus);

  st = fs_transmitter_new_stream_transmitter (trans, NULL,
      param_count, params, &error);

  if (param_count)
    g_value_unset (¶ms[0].value);

  if (error)
    ts_fail ("Error creating stream transmitter: (%s:%d) %s",
        g_quark_to_string (error->domain), error->code, error->message);
  ts_fail_if (st == NULL, "No stream transmitter created, yet error is NULL");
  g_clear_error (&error);

  g_object_set (st, "sending", !(flags & FLAG_NOT_SENDING), NULL);

  ts_fail_unless (g_signal_connect (st, "new-local-candidate",
      G_CALLBACK (_new_local_candidate), trans),
    "Could not connect new-local-candidate signal");
  ts_fail_unless (g_signal_connect (st, "local-candidates-prepared",
      G_CALLBACK (_candidate_prepared), NULL),
    "Could not connect local-candidates-prepared signal");
  ts_fail_unless (g_signal_connect (st, "error",
      G_CALLBACK (stream_transmitter_error), NULL),
    "Could not connect error signal");
  ts_fail_unless (g_signal_connect (st, "known-source-packet-received",
      G_CALLBACK (_known_source_packet_received), NULL),
    "Could not connect known-source-packet-received signal");
  ts_fail_unless (g_signal_connect (st, "state-changed",
      G_CALLBACK (_state_changed), NULL),
    "Could not connect state-changed signal");

  if (!fs_stream_transmitter_gather_local_candidates (st, &error))
  {
    if (error)
      ts_fail ("Could not start gathering local candidates (%s:%d) %s",
          g_quark_to_string (error->domain), error->code, error->message);
    else
      ts_fail ("Could not start gathering candidates"
          " (without a specified error)");
  }
  else
  {
    ts_fail_unless (error == NULL);
  }
  g_clear_error (&error);

  ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
  ts_fail_if (ret == GST_STATE_CHANGE_FAILURE,
      "Could not set the pipeline to playing");

  if (!(flags & FLAG_LOCAL_CANDIDATES))
  {
    ret = fs_stream_transmitter_force_remote_candidates (st, local_cands,
        &error);
    fs_candidate_list_destroy (local_cands);
    if (error)
      ts_fail ("Error while adding candidate: (%s:%d) %s",
          g_quark_to_string (error->domain), error->code, error->message);
    ts_fail_unless (ret == TRUE, "No detailed error from add_remote_candidate");
  }
  else
  {
    ts_fail_unless (error == NULL);
  }
  g_clear_error (&error);

  cand = fs_candidate_new (NULL, 1,
          FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, NULL, 0);
  cand->username = g_strdup ("/tmp/src1");
  remote_cands = g_list_prepend (remote_cands, cand);
  cand = fs_candidate_new (NULL, 2,
          FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, NULL, 0);
  cand->username = g_strdup ("/tmp/src2");
  remote_cands = g_list_prepend (remote_cands, cand);
  ret = fs_stream_transmitter_force_remote_candidates (st, remote_cands, &error);
  fs_candidate_list_destroy (remote_cands);
  if (error)
    ts_fail ("Error while adding candidate: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);
  ts_fail_unless (ret == TRUE, "No detailed error from add_remote_candidate");
  g_clear_error (&error);

  g_mutex_lock (&test_mutex);
  while (connected_count < 2)
    g_cond_wait (&cond, &test_mutex);
  g_mutex_unlock (&test_mutex);

  setup_fakesrc (trans, pipeline, 1);
  setup_fakesrc (trans, pipeline, 2);

  g_mutex_lock (&test_mutex);
  while (!done)
    g_cond_wait (&cond, &test_mutex);
  g_mutex_unlock (&test_mutex);

  fail_unless (got_prepared[0] == TRUE);
  fail_unless (got_prepared[1] == TRUE);
  fail_unless (got_candidates[0] == TRUE);
  fail_unless (got_candidates[1] == TRUE);

  gst_element_set_state (pipeline, GST_STATE_NULL);

  if (st)
  {
    fs_stream_transmitter_stop (st);
    g_object_unref (st);
  }

  g_object_unref (trans);

  g_source_remove (bus_source);
  gst_object_unref (pipeline);

  g_cond_clear (&cond);
  g_mutex_clear (&test_mutex);
}

GST_START_TEST (test_shmtransmitter_run_basic)
{
  run_shm_transmitter_test (0);
}
GST_END_TEST;

GST_START_TEST (test_shmtransmitter_sending_half)
{
  run_shm_transmitter_test (FLAG_NOT_SENDING);
}
GST_END_TEST;

GST_START_TEST (test_shmtransmitter_local_cands)
{
  run_shm_transmitter_test (FLAG_LOCAL_CANDIDATES);
}
GST_END_TEST;


static Suite *
shmtransmitter_suite (void)
{
  Suite *s = suite_create ("shmtransmitter");
  TCase *tc_chain;
  GLogLevelFlags fatal_mask;

  fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
  fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
  g_log_set_always_fatal (fatal_mask);

  tc_chain = tcase_create ("shmtransmitter_new");
  tcase_add_test (tc_chain, test_shmtransmitter_new);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("shmtransmitter_basic");
  tcase_add_test (tc_chain, test_shmtransmitter_run_basic);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("shmtransmitter-sending-half");
  tcase_add_test (tc_chain, test_shmtransmitter_sending_half);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("shmtransmitter-local-candidates");
  tcase_add_test (tc_chain, test_shmtransmitter_local_cands);
  suite_add_tcase (s, tc_chain);

  return s;
}


GST_CHECK_MAIN (shmtransmitter);
farstream-0.2.7/tests/check/transmitter/multicast.c0000664000076400007640000001770212461773672017431 00000000000000/* Farstream unit tests for FsMulticastTransmitter
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 
#include 

#include "check-threadsafe.h"
#include "generic.h"
#include "testutils.h"

gint buffer_count[2] = {0, 0};
GMainLoop *loop = NULL;
gint candidates[2] = {0, 0};
GstElement *pipeline = NULL;
gboolean src_setup[2] = {FALSE, FALSE};

enum {
  FLAG_NOT_SENDING = 1 << 0
};


GST_START_TEST (test_multicasttransmitter_new)
{
  test_transmitter_creation ("multicast");
}
GST_END_TEST;



static void
_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  gint component_id = GPOINTER_TO_INT (user_data);

  ts_fail_unless (gst_buffer_get_size (buffer) == component_id * 10,
    "Buffer is size %d but component_id is %d", gst_buffer_get_size (buffer),
    component_id);

  buffer_count[component_id-1]++;

  /*
  GST_DEBUG ("Buffer %d component: %d size: %u", buffer_count[component_id-1],
    component_id, gst_buffer_get_size (buffer));
  */

  ts_fail_if (buffer_count[component_id-1] > 20,
    "Too many buffers %d > 20 for component",
    buffer_count[component_id-1], component_id);

  if (buffer_count[0] == 20 && buffer_count[1] == 20) {
    /* TEST OVER */
    g_main_loop_quit (loop);
  }
}

static void
_new_active_candidate_pair (FsStreamTransmitter *st, FsCandidate *local,
  FsCandidate *remote, gpointer user_data)
{
  ts_fail_if (local == NULL, "Local candidate NULL");
  ts_fail_if (remote == NULL, "Remote candidate NULL");

  ts_fail_unless (local->component_id == remote->component_id,
    "Local and remote candidates dont have the same component id");

  GST_DEBUG ("New active candidate pair for component %d", local->component_id);

  if (!src_setup[local->component_id-1])
    setup_fakesrc (user_data, pipeline, local->component_id);
  src_setup[local->component_id-1] = TRUE;
}

static gboolean
_start_pipeline (gpointer user_data)
{
  GstElement *pipeline = user_data;

  GST_DEBUG ("Starting pipeline");

  ts_fail_if (gst_element_set_state (pipeline, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  return FALSE;
}

static void
run_multicast_transmitter_test (gint n_parameters, GParameter *params,
                                gint flags)
{
  GError *error = NULL;
  FsTransmitter *trans;
  FsStreamTransmitter *st;
  FsCandidate *tmpcand = NULL;
  GList *candidates = NULL;
  GstBus *bus = NULL;
  guint tos;

  buffer_count[0] = 0;
  buffer_count[1] = 0;

  if (flags & FLAG_NOT_SENDING)
    buffer_count[0] = 20;

  loop = g_main_loop_new (NULL, FALSE);
  trans = fs_transmitter_new ("multicast", 2, 0, &error);

  if (error) {
    ts_fail ("Error creating transmitter: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);
  }

  ts_fail_if (trans == NULL, "No transmitter create, yet error is still NULL");

  g_object_set (trans, "tos", 2, NULL);
  g_object_get (trans, "tos", &tos, NULL);
  ts_fail_unless (tos == 2);

  pipeline = setup_pipeline (trans, G_CALLBACK (_handoff_handler));

  st = fs_transmitter_new_stream_transmitter (trans, NULL, n_parameters, params,
    &error);

  if (error) {
    ts_fail ("Error creating stream transmitter: (%s:%d) %s",
        g_quark_to_string (error->domain), error->code, error->message);
  }

  ts_fail_if (st == NULL, "No stream transmitter created, yet error is NULL");

  g_object_set (st, "sending", !(flags & FLAG_NOT_SENDING), NULL);

  bus = gst_element_get_bus (pipeline);
  gst_bus_add_watch (bus, bus_error_callback, NULL);
  gst_object_unref (bus);

  ts_fail_unless (g_signal_connect (st, "new-active-candidate-pair",
      G_CALLBACK (_new_active_candidate_pair), trans),
    "Coult not connect new-active-candidate-pair signal");
  ts_fail_unless (g_signal_connect (st, "error",
      G_CALLBACK (stream_transmitter_error), NULL),
    "Could not connect error signal");

  g_idle_add (_start_pipeline, pipeline);

  tmpcand = fs_candidate_new ("L1", FS_COMPONENT_RTP,
      FS_CANDIDATE_TYPE_MULTICAST, FS_NETWORK_PROTOCOL_UDP,
      "224.0.0.110", 2322);
  tmpcand->ttl = 1;

  candidates = g_list_prepend (candidates, tmpcand);

  tmpcand = fs_candidate_new ("L2", FS_COMPONENT_RTCP,
      FS_CANDIDATE_TYPE_MULTICAST, FS_NETWORK_PROTOCOL_UDP,
      "224.0.0.110", 2323);
  tmpcand->ttl = 1;

  candidates = g_list_prepend (candidates, tmpcand);

  if (!fs_stream_transmitter_force_remote_candidates (st, candidates, &error))
    ts_fail ("Error setting the remote candidates: %p %s", error,
        error ? error->message : "NO ERROR SET");
  ts_fail_unless (error == NULL, "Error is not null after successful candidate"
      " addition");

  fs_candidate_list_destroy (candidates);

  g_main_loop_run (loop);

  g_object_unref (st);

  g_object_unref (trans);

  gst_element_set_state (pipeline, GST_STATE_NULL);

  gst_object_unref (pipeline);

  g_main_loop_unref (loop);
}

GST_START_TEST (test_multicasttransmitter_run)
{
  run_multicast_transmitter_test (0, NULL, 0);
}
GST_END_TEST;


GST_START_TEST (test_multicasttransmitter_run_local_candidates)
{
  GParameter params[1];
  GList *list = NULL;
  FsCandidate *candidate;
  gchar *address = find_multicast_capable_address ();

  if (address == NULL)
    return;

  memset (params, 0, sizeof (GParameter) * 1);

  candidate = fs_candidate_new ("L1", FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST,
      FS_NETWORK_PROTOCOL_UDP, address, 0);
  candidate->ttl = 2;
  list = g_list_prepend (list, candidate);

  candidate = fs_candidate_new ("L2", FS_COMPONENT_RTCP, FS_CANDIDATE_TYPE_HOST,
      FS_NETWORK_PROTOCOL_UDP, address, 0);
  candidate->ttl = 2;
  list = g_list_prepend (list, candidate);

  params[0].name = "preferred-local-candidates";
  g_value_init (¶ms[0].value, FS_TYPE_CANDIDATE_LIST);
  g_value_set_boxed (¶ms[0].value, list);

  run_multicast_transmitter_test (1, params, 0);

  g_value_reset (¶ms[0].value);

  g_free (address);
  fs_candidate_list_destroy (list);
}
GST_END_TEST;

GST_START_TEST (test_multicasttransmitter_sending_half)
{
  run_multicast_transmitter_test (0, NULL, FLAG_NOT_SENDING);
}
GST_END_TEST;



static Suite *
multicasttransmitter_suite (void)
{
  Suite *s = suite_create ("multicasttransmitter");
  TCase *tc_chain;
  GLogLevelFlags fatal_mask;
  gchar *tmp_addr;

  tmp_addr = find_multicast_capable_address ();

  if (!tmp_addr)
    return s;
  else
    g_free (tmp_addr);

  fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
  fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
  g_log_set_always_fatal (fatal_mask);

  tc_chain = tcase_create ("multicast_transmitter");
  tcase_add_test (tc_chain, test_multicasttransmitter_new);
  tcase_add_test (tc_chain, test_multicasttransmitter_run);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("multicast_transmitter_local_candidates");
  tcase_add_test (tc_chain, test_multicasttransmitter_run_local_candidates);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("multicast_transmitter_sending_half");
  tcase_add_test (tc_chain, test_multicasttransmitter_sending_half);
  suite_add_tcase (s, tc_chain);

  return s;
}


GST_CHECK_MAIN (multicasttransmitter);
farstream-0.2.7/tests/check/transmitter/stunalternd.h0000664000076400007640000000257312401500475017753 00000000000000/* Farstream unit tests for FsRawUdpTransmitter
 * This file is taken from the Nice GLib ICE library. 
 *
 * (C) 2007-2009 Nokia Corporation
 *  @contributor: Rémi Denis-Courmont
 * (C) 2008-2009 Collabora Ltd
 *  @author: Youness Alaoui 
 *  @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __STUNALTERND_H__
#define __STUNALTERND_H__

#include 
#include 

#include 

void *stun_alternd_init (GSocketFamily family,
    char *redirect_ip,
    unsigned int redirect_port,
    unsigned int listen_port);

void stun_alternd_stop (void *data);

#endif /* __STUNALTERND_H__ */
farstream-0.2.7/tests/check/Makefile.in0000664000076400007640000035325012462321046014733 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 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@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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@
target_triplet = @target@
DIST_COMMON = $(top_srcdir)/common/check.mak $(srcdir)/Makefile.in \
	$(srcdir)/Makefile.am $(top_srcdir)/depcomp \
	$(top_srcdir)/test-driver
check_PROGRAMS = base/fscodec$(EXEEXT) base/fstransmitter$(EXEEXT) \
	transmitter/rawudp$(EXEEXT) transmitter/multicast$(EXEEXT) \
	transmitter/nice$(EXEEXT) transmitter/shm$(EXEEXT) \
	raw/conference$(EXEEXT) rtp/codecs$(EXEEXT) \
	rtp/sendcodecs$(EXEEXT) rtp/conference$(EXEEXT) \
	rtp/recvcodecs$(EXEEXT) msn/conference$(EXEEXT) \
	utils/binadded$(EXEEXT)
subdir = tests/check
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
	$(top_srcdir)/common/m4/as-auto-alt.m4 \
	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
	$(top_srcdir)/common/m4/as-libtool.m4 \
	$(top_srcdir)/common/m4/as-python.m4 \
	$(top_srcdir)/common/m4/as-scrub-include.m4 \
	$(top_srcdir)/common/m4/as-version.m4 \
	$(top_srcdir)/common/m4/gst-arch.m4 \
	$(top_srcdir)/common/m4/gst-args.m4 \
	$(top_srcdir)/common/m4/gst-check.m4 \
	$(top_srcdir)/common/m4/gst-error.m4 \
	$(top_srcdir)/common/m4/gst-glib2.m4 \
	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
	$(top_srcdir)/common/m4/gst-plugindir.m4 \
	$(top_srcdir)/common/m4/gst.m4 \
	$(top_srcdir)/common/m4/gtk-doc.m4 \
	$(top_srcdir)/common/m4/pkg.m4 \
	$(top_srcdir)/m4/introspection.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__dirstamp = $(am__leading_dot)dirstamp
am_base_fscodec_OBJECTS = testutils.$(OBJEXT) base/fscodec.$(OBJEXT)
base_fscodec_OBJECTS = $(am_base_fscodec_OBJECTS)
base_fscodec_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
base_fscodec_DEPENDENCIES =  \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
base_fstransmitter_SOURCES = base/fstransmitter.c
base_fstransmitter_OBJECTS = base/fstransmitter.$(OBJEXT)
base_fstransmitter_LDADD = $(LDADD)
base_fstransmitter_DEPENDENCIES =  \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_msn_conference_OBJECTS = msn/msn_conference-conference.$(OBJEXT)
msn_conference_OBJECTS = $(am_msn_conference_OBJECTS)
msn_conference_LDADD = $(LDADD)
msn_conference_DEPENDENCIES =  \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
msn_conference_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(msn_conference_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
	$@
am_raw_conference_OBJECTS = raw_conference-testutils.$(OBJEXT) \
	raw/raw_conference-conference.$(OBJEXT)
raw_conference_OBJECTS = $(am_raw_conference_OBJECTS)
raw_conference_LDADD = $(LDADD)
raw_conference_DEPENDENCIES =  \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
raw_conference_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(raw_conference_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
	$@
am_rtp_codecs_OBJECTS = rtp/rtp_codecs-generic.$(OBJEXT) \
	rtp/rtp_codecs-codecs.$(OBJEXT)
rtp_codecs_OBJECTS = $(am_rtp_codecs_OBJECTS)
rtp_codecs_LDADD = $(LDADD)
rtp_codecs_DEPENDENCIES =  \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
rtp_codecs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(rtp_codecs_CFLAGS) \
	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
am_rtp_conference_OBJECTS = rtp_conference-testutils.$(OBJEXT) \
	rtp/rtp_conference-generic.$(OBJEXT) \
	rtp/rtp_conference-conference.$(OBJEXT)
rtp_conference_OBJECTS = $(am_rtp_conference_OBJECTS)
rtp_conference_LDADD = $(LDADD)
rtp_conference_DEPENDENCIES =  \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
rtp_conference_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(rtp_conference_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
	$@
rtp_recvcodecs_SOURCES = rtp/recvcodecs.c
rtp_recvcodecs_OBJECTS = rtp/rtp_recvcodecs-recvcodecs.$(OBJEXT)
am__DEPENDENCIES_2 =  \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
rtp_recvcodecs_DEPENDENCIES = $(am__DEPENDENCIES_2)
rtp_recvcodecs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(rtp_recvcodecs_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
	$@
am_rtp_sendcodecs_OBJECTS = rtp/rtp_sendcodecs-generic.$(OBJEXT) \
	rtp/rtp_sendcodecs-sendcodecs.$(OBJEXT)
rtp_sendcodecs_OBJECTS = $(am_rtp_sendcodecs_OBJECTS)
rtp_sendcodecs_DEPENDENCIES = $(am__DEPENDENCIES_2)
rtp_sendcodecs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(rtp_sendcodecs_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
	$@
am_transmitter_multicast_OBJECTS =  \
	transmitter_multicast-testutils.$(OBJEXT) \
	transmitter/transmitter_multicast-generic.$(OBJEXT) \
	transmitter/transmitter_multicast-multicast.$(OBJEXT)
transmitter_multicast_OBJECTS = $(am_transmitter_multicast_OBJECTS)
transmitter_multicast_DEPENDENCIES = $(am__DEPENDENCIES_2) \
	$(am__DEPENDENCIES_1)
transmitter_multicast_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(transmitter_multicast_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
	$(LDFLAGS) -o $@
am_transmitter_nice_OBJECTS =  \
	transmitter/transmitter_nice-generic.$(OBJEXT) \
	transmitter/transmitter_nice-nice.$(OBJEXT)
transmitter_nice_OBJECTS = $(am_transmitter_nice_OBJECTS)
transmitter_nice_DEPENDENCIES = $(am__DEPENDENCIES_2) \
	$(am__DEPENDENCIES_1)
transmitter_nice_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(transmitter_nice_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
	-o $@
am_transmitter_rawudp_OBJECTS =  \
	transmitter_rawudp-testutils.$(OBJEXT) \
	transmitter/transmitter_rawudp-generic.$(OBJEXT) \
	transmitter/transmitter_rawudp-rawudp.$(OBJEXT) \
	transmitter/transmitter_rawudp-rawudp-upnp.$(OBJEXT) \
	transmitter/transmitter_rawudp-stunalternd.$(OBJEXT)
transmitter_rawudp_OBJECTS = $(am_transmitter_rawudp_OBJECTS)
transmitter_rawudp_DEPENDENCIES = $(am__DEPENDENCIES_2) \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
transmitter_rawudp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(transmitter_rawudp_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
	$(LDFLAGS) -o $@
am_transmitter_shm_OBJECTS =  \
	transmitter/transmitter_shm-generic.$(OBJEXT) \
	transmitter/transmitter_shm-shm.$(OBJEXT)
transmitter_shm_OBJECTS = $(am_transmitter_shm_OBJECTS)
transmitter_shm_DEPENDENCIES = $(am__DEPENDENCIES_2) \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
transmitter_shm_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(transmitter_shm_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
	-o $@
am_utils_binadded_OBJECTS = utils_binadded-testutils.$(OBJEXT) \
	utils/utils_binadded-binadded.$(OBJEXT)
utils_binadded_OBJECTS = $(am_utils_binadded_OBJECTS)
utils_binadded_LDADD = $(LDADD)
utils_binadded_DEPENDENCIES =  \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
utils_binadded_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(utils_binadded_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
	$@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(base_fscodec_SOURCES) base/fstransmitter.c \
	$(msn_conference_SOURCES) $(raw_conference_SOURCES) \
	$(rtp_codecs_SOURCES) $(rtp_conference_SOURCES) \
	rtp/recvcodecs.c $(rtp_sendcodecs_SOURCES) \
	$(transmitter_multicast_SOURCES) $(transmitter_nice_SOURCES) \
	$(transmitter_rawudp_SOURCES) $(transmitter_shm_SOURCES) \
	$(utils_binadded_SOURCES)
DIST_SOURCES = $(base_fscodec_SOURCES) base/fstransmitter.c \
	$(msn_conference_SOURCES) $(raw_conference_SOURCES) \
	$(rtp_codecs_SOURCES) $(rtp_conference_SOURCES) \
	rtp/recvcodecs.c $(rtp_sendcodecs_SOURCES) \
	$(transmitter_multicast_SOURCES) $(transmitter_nice_SOURCES) \
	$(transmitter_rawudp_SOURCES) $(transmitter_shm_SOURCES) \
	$(utils_binadded_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__tty_colors_dummy = \
  mgn= red= grn= lgn= blu= brg= std=; \
  am__color_tests=no
am__tty_colors = { \
  $(am__tty_colors_dummy); \
  if test "X$(AM_COLOR_TESTS)" = Xno; then \
    am__color_tests=no; \
  elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
    am__color_tests=yes; \
  elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
    am__color_tests=yes; \
  fi; \
  if test $$am__color_tests = yes; then \
    red=''; \
    grn=''; \
    lgn=''; \
    blu=''; \
    mgn=''; \
    brg=''; \
    std=''; \
  fi; \
}
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__uninstall_files_from_dir = { \
  test -z "$$files" \
    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
         $(am__cd) "$$dir" && rm -f $$files; }; \
  }
am__recheck_rx = ^[ 	]*:recheck:[ 	]*
am__global_test_result_rx = ^[ 	]*:global-test-result:[ 	]*
am__copy_in_global_log_rx = ^[ 	]*:copy-in-global-log:[ 	]*
# A command that, given a newline-separated list of test names on the
# standard input, print the name of the tests that are to be re-run
# upon "make recheck".
am__list_recheck_tests = $(AWK) '{ \
  recheck = 1; \
  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
    { \
      if (rc < 0) \
        { \
          if ((getline line2 < ($$0 ".log")) < 0) \
	    recheck = 0; \
          break; \
        } \
      else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
        { \
          recheck = 0; \
          break; \
        } \
      else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
        { \
          break; \
        } \
    }; \
  if (recheck) \
    print $$0; \
  close ($$0 ".trs"); \
  close ($$0 ".log"); \
}'
# A command that, given a newline-separated list of test names on the
# standard input, create the global log from their .trs and .log files.
am__create_global_log = $(AWK) ' \
function fatal(msg) \
{ \
  print "fatal: making $@: " msg | "cat >&2"; \
  exit 1; \
} \
function rst_section(header) \
{ \
  print header; \
  len = length(header); \
  for (i = 1; i <= len; i = i + 1) \
    printf "="; \
  printf "\n\n"; \
} \
{ \
  copy_in_global_log = 1; \
  global_test_result = "RUN"; \
  while ((rc = (getline line < ($$0 ".trs"))) != 0) \
    { \
      if (rc < 0) \
         fatal("failed to read from " $$0 ".trs"); \
      if (line ~ /$(am__global_test_result_rx)/) \
        { \
          sub("$(am__global_test_result_rx)", "", line); \
          sub("[ 	]*$$", "", line); \
          global_test_result = line; \
        } \
      else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
        copy_in_global_log = 0; \
    }; \
  if (copy_in_global_log) \
    { \
      rst_section(global_test_result ": " $$0); \
      while ((rc = (getline line < ($$0 ".log"))) != 0) \
      { \
        if (rc < 0) \
          fatal("failed to read from " $$0 ".log"); \
        print line; \
      }; \
      printf "\n"; \
    }; \
  close ($$0 ".trs"); \
  close ($$0 ".log"); \
}'
# Restructured Text title.
am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
# by disabling -e (using the XSI extension "set +e") if it's set.
am__sh_e_setup = case $$- in *e*) set +e;; esac
# Default flags passed to test drivers.
am__common_driver_flags = \
  --color-tests "$$am__color_tests" \
  --enable-hard-errors "$$am__enable_hard_errors" \
  --expect-failure "$$am__expect_failure"
# To be inserted before the command running the test.  Creates the
# directory for the log if needed.  Stores in $dir the directory
# containing $f, in $tst the test, in $log the log.  Executes the
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
# passes TESTS_ENVIRONMENT.  Set up options for the wrapper that
# will run the test scripts (or their associated LOG_COMPILER, if
# thy have one).
am__check_pre = \
$(am__sh_e_setup);					\
$(am__vpath_adj_setup) $(am__vpath_adj)			\
$(am__tty_colors);					\
srcdir=$(srcdir); export srcdir;			\
case "$@" in						\
  */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;;	\
    *) am__odir=.;; 					\
esac;							\
test "x$$am__odir" = x"." || test -d "$$am__odir" 	\
  || $(MKDIR_P) "$$am__odir" || exit $$?;		\
if test -f "./$$f"; then dir=./;			\
elif test -f "$$f"; then dir=;				\
else dir="$(srcdir)/"; fi;				\
tst=$$dir$$f; log='$@'; 				\
if test -n '$(DISABLE_HARD_ERRORS)'; then		\
  am__enable_hard_errors=no; 				\
else							\
  am__enable_hard_errors=yes; 				\
fi; 							\
case " $(XFAIL_TESTS) " in				\
  *[\ \	]$$f[\ \	]* | *[\ \	]$$dir$$f[\ \	]*) \
    am__expect_failure=yes;;				\
  *)							\
    am__expect_failure=no;;				\
esac; 							\
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
# A shell command to get the names of the tests scripts with any registered
# extension removed (i.e., equivalently, the names of the test logs, with
# the '.log' extension removed).  The result is saved in the shell variable
# '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
# since that might cause problem with VPATH rewrites for suffix-less tests.
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
am__set_TESTS_bases = \
  bases='$(TEST_LOGS)'; \
  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
  bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
am__set_b = \
  case '$@' in \
    */*) \
      case '$*' in \
        */*) b='$*';; \
          *) b=`echo '$@' | sed 's/\.log$$//'`; \
       esac;; \
    *) \
      b='$*';; \
  esac
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.test.log=.log)
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
	$(TEST_LOG_FLAGS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ERROR_CFLAGS = @ERROR_CFLAGS@
EXEEXT = @EXEEXT@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FS_AGE = @FS_AGE@
FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@
FS_APIVERSION = @FS_APIVERSION@
FS_API_VERSION = @FS_API_VERSION@
FS_CFLAGS = @FS_CFLAGS@
FS_CURRENT = @FS_CURRENT@
FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@
FS_LIBS = @FS_LIBS@
FS_LIBVERSION = @FS_LIBVERSION@
FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@
FS_LICENSE = @FS_LICENSE@
FS_LT_LDFLAGS = @FS_LT_LDFLAGS@
FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@
FS_PLUGINS_ALL = @FS_PLUGINS_ALL@
FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@
FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@
FS_PLUGIN_PATH = @FS_PLUGIN_PATH@
FS_PREFIX = @FS_PREFIX@
FS_REVISION = @FS_REVISION@
FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@
FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@
GCOV = @GCOV@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LDFLAGS = @GIO_LDFLAGS@
GIO_LIBS = @GIO_LIBS@
GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_PREFIX = @GLIB_PREFIX@
GLIB_REQ = @GLIB_REQ@
GREP = @GREP@
GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
GST_API_VERSION = @GST_API_VERSION@
GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
GST_BASE_LIBS = @GST_BASE_LIBS@
GST_CFLAGS = @GST_CFLAGS@
GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
GST_CHECK_LIBS = @GST_CHECK_LIBS@
GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@
GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
GST_LIBS = @GST_LIBS@
GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
GST_TOOLS_DIR = @GST_TOOLS_DIR@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GUPNP_CFLAGS = @GUPNP_CFLAGS@
GUPNP_LIBS = @GUPNP_LIBS@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NICE_CFLAGS = @NICE_CFLAGS@
NICE_LIBS = @NICE_LIBS@
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@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VALGRIND_PATH = @VALGRIND_PATH@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
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@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
LOOPS = 10

# inspect every plugin feature
GST_INSPECT = $(GST_TOOLS_DIR)/gst-inspect-$(GST_API_VERSION)
CHECK_REGISTRY = $(top_builddir)/tests/check/test-registry.xml
REGISTRY_ENVIRONMENT = \
	GST_REGISTRY=$(CHECK_REGISTRY)

TESTS_ENVIRONMENT = \
	G_SLICE=debug-blocks					\
	CK_DEFAULT_TIMEOUT=120					\
	STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"	\
	$(REGISTRY_ENVIRONMENT)					\
	GST_PLUGIN_LOADING_WHITELIST=gstreamer:gst-plugins-base:gst-plugins-good:libnice:valve:siren:autoconvert:rtpmux:dtmf:mimic:shm:spandsp:srtp:farstream@$(top_builddir)/gst \
	GST_PLUGIN_PATH=$(top_builddir)/gst:${GST_PLUGIN_PATH}	\
	GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:${GST_PLUGIN_PATH_1_0}	\
	FS_PLUGIN_PATH=$(top_builddir)/transmitters/rawudp/.libs:$(top_builddir)/transmitters/multicast/.libs:$(top_builddir)/transmitters/nice/.libs:$(top_builddir)/transmitters/shm/.libs \
	LD_LIBRARY_PATH=$(top_builddir)/farstream/.libs:${LD_LIBRARY_PATH} \
	UPNP_XML_PATH=$(srcdir)/upnp \
	SRCDIR=$(srcdir) \
	XDG_CACHE_HOME=$(builddir)/cache


# ths core dumps of some machines have PIDs appended
CLEANFILES = core* test-registry.xml
TESTS = $(check_PROGRAMS)
SUPPRESSIONS = $(top_srcdir)/common/gst.supp
EXTRA_DIST = \
	upnp/InternetGatewayDevice.xml \
	upnp/WANIPConnection.xml \
	base/test1.conf \
	utils/gstelements.conf

AM_CFLAGS = \
	$(CFLAGS) \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_CHECK_CFLAGS) \
	$(GST_CFLAGS)

LDADD = \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(GST_CHECK_LIBS) \
	$(GST_LIBS)

base_fscodec_SOURCES = \
	testutils.c \
	testutils.h \
	base/fscodec.c

transmitter_rawudp_CFLAGS = $(AM_CFLAGS) \
	$(GUPNP_CFLAGS) $(GIO_CFLAGS) $(NICE_CFLAGS)

transmitter_rawudp_LDADD = $(LDADD) \
	$(GUPNP_LIBS) \
	$(GIO_LIBS) \
	$(NICE_LIBS)

transmitter_rawudp_SOURCES = \
	check-threadsafe.h  \
	testutils.c \
	testutils.h \
	transmitter/generic.c \
	transmitter/generic.h \
	transmitter/rawudp.c \
	transmitter/rawudp-upnp.c \
	transmitter/rawudp-upnp.h \
	transmitter/stunalternd.c \
	transmitter/stunalternd.h

transmitter_multicast_CFLAGS = $(AM_CFLAGS)
transmitter_multicast_SOURCES = \
	check-threadsafe.h  \
	testutils.c \
	testutils.h \
	transmitter/generic.c \
	transmitter/generic.h \
	transmitter/multicast.c

transmitter_multicast_LDADD = $(LDADD) $(GST_BASE_LIBS)
transmitter_nice_CFLAGS = $(FS_INTERNAL_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
transmitter_nice_SOURCES = \
	check-threadsafe.h  \
	transmitter/generic.c \
	transmitter/generic.h \
	transmitter/nice.c 

transmitter_nice_LDADD = $(LDADD) $(GST_BASE_LIBS)
transmitter_shm_CFLAGS = $(AM_CFLAGS) $(GUPNP_CFLAGS) $(NICE_CFLAGS)
transmitter_shm_LDADD = $(LDADD) \
	$(GUPNP_LIBS) \
	$(NICE_LIBS)

transmitter_shm_SOURCES = \
	check-threadsafe.h  \
	transmitter/generic.c \
	transmitter/generic.h \
	transmitter/shm.c

raw_conference_CFLAGS = $(CFLAGS) $(AM_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
raw_conference_SOURCES = \
	check-threadsafe.h  \
	testutils.c \
	testutils.h \
	raw/conference.c

rtp_conference_CFLAGS = $(AM_CFLAGS)
rtp_conference_SOURCES = \
	check-threadsafe.h  \
	testutils.c \
	testutils.h \
	rtp/generic.c \
	rtp/generic.h \
	rtp/conference.c

rtp_codecs_CFLAGS = $(AM_CFLAGS)
rtp_codecs_SOURCES = \
	rtp/generic.c \
	rtp/generic.h \
	rtp/codecs.c

rtp_sendcodecs_CFLAGS = $(AM_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
rtp_sendcodecs_LDADD = $(LDADD) -lgstrtp-@GST_API_VERSION@
rtp_sendcodecs_SOURCES = \
	rtp/generic.c \
	rtp/generic.h \
	rtp/sendcodecs.c

rtp_recvcodecs_CFLAGS = $(AM_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
rtp_recvcodecs_LDADD = $(LDADD) -lgstrtp-@GST_API_VERSION@
msn_conference_CFLAGS = $(AM_CFLAGS)
msn_conference_SOURCES = \
	msn/conference.c

utils_binadded_CFLAGS = $(AM_CFLAGS)
utils_binadded_SOURCES = \
	testutils.c \
	testutils.h \
	utils/binadded.c

all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/common/check.mak $(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 tests/check/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu tests/check/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_srcdir)/common/check.mak:

$(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):

clean-checkPROGRAMS:
	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
	echo " rm -f" $$list; \
	rm -f $$list || exit $$?; \
	test -n "$(EXEEXT)" || exit 0; \
	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
	echo " rm -f" $$list; \
	rm -f $$list
base/$(am__dirstamp):
	@$(MKDIR_P) base
	@: > base/$(am__dirstamp)
base/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) base/$(DEPDIR)
	@: > base/$(DEPDIR)/$(am__dirstamp)
base/fscodec.$(OBJEXT): base/$(am__dirstamp) \
	base/$(DEPDIR)/$(am__dirstamp)

base/fscodec$(EXEEXT): $(base_fscodec_OBJECTS) $(base_fscodec_DEPENDENCIES) $(EXTRA_base_fscodec_DEPENDENCIES) base/$(am__dirstamp)
	@rm -f base/fscodec$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(base_fscodec_OBJECTS) $(base_fscodec_LDADD) $(LIBS)
base/fstransmitter.$(OBJEXT): base/$(am__dirstamp) \
	base/$(DEPDIR)/$(am__dirstamp)

base/fstransmitter$(EXEEXT): $(base_fstransmitter_OBJECTS) $(base_fstransmitter_DEPENDENCIES) $(EXTRA_base_fstransmitter_DEPENDENCIES) base/$(am__dirstamp)
	@rm -f base/fstransmitter$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(base_fstransmitter_OBJECTS) $(base_fstransmitter_LDADD) $(LIBS)
msn/$(am__dirstamp):
	@$(MKDIR_P) msn
	@: > msn/$(am__dirstamp)
msn/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) msn/$(DEPDIR)
	@: > msn/$(DEPDIR)/$(am__dirstamp)
msn/msn_conference-conference.$(OBJEXT): msn/$(am__dirstamp) \
	msn/$(DEPDIR)/$(am__dirstamp)

msn/conference$(EXEEXT): $(msn_conference_OBJECTS) $(msn_conference_DEPENDENCIES) $(EXTRA_msn_conference_DEPENDENCIES) msn/$(am__dirstamp)
	@rm -f msn/conference$(EXEEXT)
	$(AM_V_CCLD)$(msn_conference_LINK) $(msn_conference_OBJECTS) $(msn_conference_LDADD) $(LIBS)
raw/$(am__dirstamp):
	@$(MKDIR_P) raw
	@: > raw/$(am__dirstamp)
raw/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) raw/$(DEPDIR)
	@: > raw/$(DEPDIR)/$(am__dirstamp)
raw/raw_conference-conference.$(OBJEXT): raw/$(am__dirstamp) \
	raw/$(DEPDIR)/$(am__dirstamp)

raw/conference$(EXEEXT): $(raw_conference_OBJECTS) $(raw_conference_DEPENDENCIES) $(EXTRA_raw_conference_DEPENDENCIES) raw/$(am__dirstamp)
	@rm -f raw/conference$(EXEEXT)
	$(AM_V_CCLD)$(raw_conference_LINK) $(raw_conference_OBJECTS) $(raw_conference_LDADD) $(LIBS)
rtp/$(am__dirstamp):
	@$(MKDIR_P) rtp
	@: > rtp/$(am__dirstamp)
rtp/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) rtp/$(DEPDIR)
	@: > rtp/$(DEPDIR)/$(am__dirstamp)
rtp/rtp_codecs-generic.$(OBJEXT): rtp/$(am__dirstamp) \
	rtp/$(DEPDIR)/$(am__dirstamp)
rtp/rtp_codecs-codecs.$(OBJEXT): rtp/$(am__dirstamp) \
	rtp/$(DEPDIR)/$(am__dirstamp)

rtp/codecs$(EXEEXT): $(rtp_codecs_OBJECTS) $(rtp_codecs_DEPENDENCIES) $(EXTRA_rtp_codecs_DEPENDENCIES) rtp/$(am__dirstamp)
	@rm -f rtp/codecs$(EXEEXT)
	$(AM_V_CCLD)$(rtp_codecs_LINK) $(rtp_codecs_OBJECTS) $(rtp_codecs_LDADD) $(LIBS)
rtp/rtp_conference-generic.$(OBJEXT): rtp/$(am__dirstamp) \
	rtp/$(DEPDIR)/$(am__dirstamp)
rtp/rtp_conference-conference.$(OBJEXT): rtp/$(am__dirstamp) \
	rtp/$(DEPDIR)/$(am__dirstamp)

rtp/conference$(EXEEXT): $(rtp_conference_OBJECTS) $(rtp_conference_DEPENDENCIES) $(EXTRA_rtp_conference_DEPENDENCIES) rtp/$(am__dirstamp)
	@rm -f rtp/conference$(EXEEXT)
	$(AM_V_CCLD)$(rtp_conference_LINK) $(rtp_conference_OBJECTS) $(rtp_conference_LDADD) $(LIBS)
rtp/rtp_recvcodecs-recvcodecs.$(OBJEXT): rtp/$(am__dirstamp) \
	rtp/$(DEPDIR)/$(am__dirstamp)

rtp/recvcodecs$(EXEEXT): $(rtp_recvcodecs_OBJECTS) $(rtp_recvcodecs_DEPENDENCIES) $(EXTRA_rtp_recvcodecs_DEPENDENCIES) rtp/$(am__dirstamp)
	@rm -f rtp/recvcodecs$(EXEEXT)
	$(AM_V_CCLD)$(rtp_recvcodecs_LINK) $(rtp_recvcodecs_OBJECTS) $(rtp_recvcodecs_LDADD) $(LIBS)
rtp/rtp_sendcodecs-generic.$(OBJEXT): rtp/$(am__dirstamp) \
	rtp/$(DEPDIR)/$(am__dirstamp)
rtp/rtp_sendcodecs-sendcodecs.$(OBJEXT): rtp/$(am__dirstamp) \
	rtp/$(DEPDIR)/$(am__dirstamp)

rtp/sendcodecs$(EXEEXT): $(rtp_sendcodecs_OBJECTS) $(rtp_sendcodecs_DEPENDENCIES) $(EXTRA_rtp_sendcodecs_DEPENDENCIES) rtp/$(am__dirstamp)
	@rm -f rtp/sendcodecs$(EXEEXT)
	$(AM_V_CCLD)$(rtp_sendcodecs_LINK) $(rtp_sendcodecs_OBJECTS) $(rtp_sendcodecs_LDADD) $(LIBS)
transmitter/$(am__dirstamp):
	@$(MKDIR_P) transmitter
	@: > transmitter/$(am__dirstamp)
transmitter/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) transmitter/$(DEPDIR)
	@: > transmitter/$(DEPDIR)/$(am__dirstamp)
transmitter/transmitter_multicast-generic.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)
transmitter/transmitter_multicast-multicast.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)

transmitter/multicast$(EXEEXT): $(transmitter_multicast_OBJECTS) $(transmitter_multicast_DEPENDENCIES) $(EXTRA_transmitter_multicast_DEPENDENCIES) transmitter/$(am__dirstamp)
	@rm -f transmitter/multicast$(EXEEXT)
	$(AM_V_CCLD)$(transmitter_multicast_LINK) $(transmitter_multicast_OBJECTS) $(transmitter_multicast_LDADD) $(LIBS)
transmitter/transmitter_nice-generic.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)
transmitter/transmitter_nice-nice.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)

transmitter/nice$(EXEEXT): $(transmitter_nice_OBJECTS) $(transmitter_nice_DEPENDENCIES) $(EXTRA_transmitter_nice_DEPENDENCIES) transmitter/$(am__dirstamp)
	@rm -f transmitter/nice$(EXEEXT)
	$(AM_V_CCLD)$(transmitter_nice_LINK) $(transmitter_nice_OBJECTS) $(transmitter_nice_LDADD) $(LIBS)
transmitter/transmitter_rawudp-generic.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)
transmitter/transmitter_rawudp-rawudp.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)
transmitter/transmitter_rawudp-rawudp-upnp.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)
transmitter/transmitter_rawudp-stunalternd.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)

transmitter/rawudp$(EXEEXT): $(transmitter_rawudp_OBJECTS) $(transmitter_rawudp_DEPENDENCIES) $(EXTRA_transmitter_rawudp_DEPENDENCIES) transmitter/$(am__dirstamp)
	@rm -f transmitter/rawudp$(EXEEXT)
	$(AM_V_CCLD)$(transmitter_rawudp_LINK) $(transmitter_rawudp_OBJECTS) $(transmitter_rawudp_LDADD) $(LIBS)
transmitter/transmitter_shm-generic.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)
transmitter/transmitter_shm-shm.$(OBJEXT):  \
	transmitter/$(am__dirstamp) \
	transmitter/$(DEPDIR)/$(am__dirstamp)

transmitter/shm$(EXEEXT): $(transmitter_shm_OBJECTS) $(transmitter_shm_DEPENDENCIES) $(EXTRA_transmitter_shm_DEPENDENCIES) transmitter/$(am__dirstamp)
	@rm -f transmitter/shm$(EXEEXT)
	$(AM_V_CCLD)$(transmitter_shm_LINK) $(transmitter_shm_OBJECTS) $(transmitter_shm_LDADD) $(LIBS)
utils/$(am__dirstamp):
	@$(MKDIR_P) utils
	@: > utils/$(am__dirstamp)
utils/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) utils/$(DEPDIR)
	@: > utils/$(DEPDIR)/$(am__dirstamp)
utils/utils_binadded-binadded.$(OBJEXT): utils/$(am__dirstamp) \
	utils/$(DEPDIR)/$(am__dirstamp)

utils/binadded$(EXEEXT): $(utils_binadded_OBJECTS) $(utils_binadded_DEPENDENCIES) $(EXTRA_utils_binadded_DEPENDENCIES) utils/$(am__dirstamp)
	@rm -f utils/binadded$(EXEEXT)
	$(AM_V_CCLD)$(utils_binadded_LINK) $(utils_binadded_OBJECTS) $(utils_binadded_LDADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)
	-rm -f base/*.$(OBJEXT)
	-rm -f msn/*.$(OBJEXT)
	-rm -f raw/*.$(OBJEXT)
	-rm -f rtp/*.$(OBJEXT)
	-rm -f transmitter/*.$(OBJEXT)
	-rm -f utils/*.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_conference-testutils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rtp_conference-testutils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testutils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_multicast-testutils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_rawudp-testutils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_binadded-testutils.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@base/$(DEPDIR)/fscodec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@base/$(DEPDIR)/fstransmitter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@msn/$(DEPDIR)/msn_conference-conference.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@raw/$(DEPDIR)/raw_conference-conference.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@rtp/$(DEPDIR)/rtp_codecs-codecs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@rtp/$(DEPDIR)/rtp_codecs-generic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@rtp/$(DEPDIR)/rtp_conference-conference.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@rtp/$(DEPDIR)/rtp_conference-generic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@rtp/$(DEPDIR)/rtp_recvcodecs-recvcodecs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@rtp/$(DEPDIR)/rtp_sendcodecs-generic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@rtp/$(DEPDIR)/rtp_sendcodecs-sendcodecs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_multicast-generic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_multicast-multicast.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_nice-generic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_nice-nice.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_rawudp-generic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_rawudp-rawudp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_rawudp-stunalternd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_shm-generic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@transmitter/$(DEPDIR)/transmitter_shm-shm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/utils_binadded-binadded.Po@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

msn/msn_conference-conference.o: msn/conference.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(msn_conference_CFLAGS) $(CFLAGS) -MT msn/msn_conference-conference.o -MD -MP -MF msn/$(DEPDIR)/msn_conference-conference.Tpo -c -o msn/msn_conference-conference.o `test -f 'msn/conference.c' || echo '$(srcdir)/'`msn/conference.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) msn/$(DEPDIR)/msn_conference-conference.Tpo msn/$(DEPDIR)/msn_conference-conference.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='msn/conference.c' object='msn/msn_conference-conference.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(msn_conference_CFLAGS) $(CFLAGS) -c -o msn/msn_conference-conference.o `test -f 'msn/conference.c' || echo '$(srcdir)/'`msn/conference.c

msn/msn_conference-conference.obj: msn/conference.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(msn_conference_CFLAGS) $(CFLAGS) -MT msn/msn_conference-conference.obj -MD -MP -MF msn/$(DEPDIR)/msn_conference-conference.Tpo -c -o msn/msn_conference-conference.obj `if test -f 'msn/conference.c'; then $(CYGPATH_W) 'msn/conference.c'; else $(CYGPATH_W) '$(srcdir)/msn/conference.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) msn/$(DEPDIR)/msn_conference-conference.Tpo msn/$(DEPDIR)/msn_conference-conference.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='msn/conference.c' object='msn/msn_conference-conference.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(msn_conference_CFLAGS) $(CFLAGS) -c -o msn/msn_conference-conference.obj `if test -f 'msn/conference.c'; then $(CYGPATH_W) 'msn/conference.c'; else $(CYGPATH_W) '$(srcdir)/msn/conference.c'; fi`

raw_conference-testutils.o: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(raw_conference_CFLAGS) $(CFLAGS) -MT raw_conference-testutils.o -MD -MP -MF $(DEPDIR)/raw_conference-testutils.Tpo -c -o raw_conference-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/raw_conference-testutils.Tpo $(DEPDIR)/raw_conference-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='raw_conference-testutils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(raw_conference_CFLAGS) $(CFLAGS) -c -o raw_conference-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c

raw_conference-testutils.obj: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(raw_conference_CFLAGS) $(CFLAGS) -MT raw_conference-testutils.obj -MD -MP -MF $(DEPDIR)/raw_conference-testutils.Tpo -c -o raw_conference-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/raw_conference-testutils.Tpo $(DEPDIR)/raw_conference-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='raw_conference-testutils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(raw_conference_CFLAGS) $(CFLAGS) -c -o raw_conference-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`

raw/raw_conference-conference.o: raw/conference.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(raw_conference_CFLAGS) $(CFLAGS) -MT raw/raw_conference-conference.o -MD -MP -MF raw/$(DEPDIR)/raw_conference-conference.Tpo -c -o raw/raw_conference-conference.o `test -f 'raw/conference.c' || echo '$(srcdir)/'`raw/conference.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) raw/$(DEPDIR)/raw_conference-conference.Tpo raw/$(DEPDIR)/raw_conference-conference.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='raw/conference.c' object='raw/raw_conference-conference.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(raw_conference_CFLAGS) $(CFLAGS) -c -o raw/raw_conference-conference.o `test -f 'raw/conference.c' || echo '$(srcdir)/'`raw/conference.c

raw/raw_conference-conference.obj: raw/conference.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(raw_conference_CFLAGS) $(CFLAGS) -MT raw/raw_conference-conference.obj -MD -MP -MF raw/$(DEPDIR)/raw_conference-conference.Tpo -c -o raw/raw_conference-conference.obj `if test -f 'raw/conference.c'; then $(CYGPATH_W) 'raw/conference.c'; else $(CYGPATH_W) '$(srcdir)/raw/conference.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) raw/$(DEPDIR)/raw_conference-conference.Tpo raw/$(DEPDIR)/raw_conference-conference.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='raw/conference.c' object='raw/raw_conference-conference.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(raw_conference_CFLAGS) $(CFLAGS) -c -o raw/raw_conference-conference.obj `if test -f 'raw/conference.c'; then $(CYGPATH_W) 'raw/conference.c'; else $(CYGPATH_W) '$(srcdir)/raw/conference.c'; fi`

rtp/rtp_codecs-generic.o: rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_codecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_codecs-generic.o -MD -MP -MF rtp/$(DEPDIR)/rtp_codecs-generic.Tpo -c -o rtp/rtp_codecs-generic.o `test -f 'rtp/generic.c' || echo '$(srcdir)/'`rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_codecs-generic.Tpo rtp/$(DEPDIR)/rtp_codecs-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/generic.c' object='rtp/rtp_codecs-generic.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_codecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_codecs-generic.o `test -f 'rtp/generic.c' || echo '$(srcdir)/'`rtp/generic.c

rtp/rtp_codecs-generic.obj: rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_codecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_codecs-generic.obj -MD -MP -MF rtp/$(DEPDIR)/rtp_codecs-generic.Tpo -c -o rtp/rtp_codecs-generic.obj `if test -f 'rtp/generic.c'; then $(CYGPATH_W) 'rtp/generic.c'; else $(CYGPATH_W) '$(srcdir)/rtp/generic.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_codecs-generic.Tpo rtp/$(DEPDIR)/rtp_codecs-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/generic.c' object='rtp/rtp_codecs-generic.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_codecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_codecs-generic.obj `if test -f 'rtp/generic.c'; then $(CYGPATH_W) 'rtp/generic.c'; else $(CYGPATH_W) '$(srcdir)/rtp/generic.c'; fi`

rtp/rtp_codecs-codecs.o: rtp/codecs.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_codecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_codecs-codecs.o -MD -MP -MF rtp/$(DEPDIR)/rtp_codecs-codecs.Tpo -c -o rtp/rtp_codecs-codecs.o `test -f 'rtp/codecs.c' || echo '$(srcdir)/'`rtp/codecs.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_codecs-codecs.Tpo rtp/$(DEPDIR)/rtp_codecs-codecs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/codecs.c' object='rtp/rtp_codecs-codecs.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_codecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_codecs-codecs.o `test -f 'rtp/codecs.c' || echo '$(srcdir)/'`rtp/codecs.c

rtp/rtp_codecs-codecs.obj: rtp/codecs.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_codecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_codecs-codecs.obj -MD -MP -MF rtp/$(DEPDIR)/rtp_codecs-codecs.Tpo -c -o rtp/rtp_codecs-codecs.obj `if test -f 'rtp/codecs.c'; then $(CYGPATH_W) 'rtp/codecs.c'; else $(CYGPATH_W) '$(srcdir)/rtp/codecs.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_codecs-codecs.Tpo rtp/$(DEPDIR)/rtp_codecs-codecs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/codecs.c' object='rtp/rtp_codecs-codecs.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_codecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_codecs-codecs.obj `if test -f 'rtp/codecs.c'; then $(CYGPATH_W) 'rtp/codecs.c'; else $(CYGPATH_W) '$(srcdir)/rtp/codecs.c'; fi`

rtp_conference-testutils.o: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -MT rtp_conference-testutils.o -MD -MP -MF $(DEPDIR)/rtp_conference-testutils.Tpo -c -o rtp_conference-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rtp_conference-testutils.Tpo $(DEPDIR)/rtp_conference-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='rtp_conference-testutils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -c -o rtp_conference-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c

rtp_conference-testutils.obj: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -MT rtp_conference-testutils.obj -MD -MP -MF $(DEPDIR)/rtp_conference-testutils.Tpo -c -o rtp_conference-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/rtp_conference-testutils.Tpo $(DEPDIR)/rtp_conference-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='rtp_conference-testutils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -c -o rtp_conference-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`

rtp/rtp_conference-generic.o: rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -MT rtp/rtp_conference-generic.o -MD -MP -MF rtp/$(DEPDIR)/rtp_conference-generic.Tpo -c -o rtp/rtp_conference-generic.o `test -f 'rtp/generic.c' || echo '$(srcdir)/'`rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_conference-generic.Tpo rtp/$(DEPDIR)/rtp_conference-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/generic.c' object='rtp/rtp_conference-generic.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -c -o rtp/rtp_conference-generic.o `test -f 'rtp/generic.c' || echo '$(srcdir)/'`rtp/generic.c

rtp/rtp_conference-generic.obj: rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -MT rtp/rtp_conference-generic.obj -MD -MP -MF rtp/$(DEPDIR)/rtp_conference-generic.Tpo -c -o rtp/rtp_conference-generic.obj `if test -f 'rtp/generic.c'; then $(CYGPATH_W) 'rtp/generic.c'; else $(CYGPATH_W) '$(srcdir)/rtp/generic.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_conference-generic.Tpo rtp/$(DEPDIR)/rtp_conference-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/generic.c' object='rtp/rtp_conference-generic.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -c -o rtp/rtp_conference-generic.obj `if test -f 'rtp/generic.c'; then $(CYGPATH_W) 'rtp/generic.c'; else $(CYGPATH_W) '$(srcdir)/rtp/generic.c'; fi`

rtp/rtp_conference-conference.o: rtp/conference.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -MT rtp/rtp_conference-conference.o -MD -MP -MF rtp/$(DEPDIR)/rtp_conference-conference.Tpo -c -o rtp/rtp_conference-conference.o `test -f 'rtp/conference.c' || echo '$(srcdir)/'`rtp/conference.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_conference-conference.Tpo rtp/$(DEPDIR)/rtp_conference-conference.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/conference.c' object='rtp/rtp_conference-conference.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -c -o rtp/rtp_conference-conference.o `test -f 'rtp/conference.c' || echo '$(srcdir)/'`rtp/conference.c

rtp/rtp_conference-conference.obj: rtp/conference.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -MT rtp/rtp_conference-conference.obj -MD -MP -MF rtp/$(DEPDIR)/rtp_conference-conference.Tpo -c -o rtp/rtp_conference-conference.obj `if test -f 'rtp/conference.c'; then $(CYGPATH_W) 'rtp/conference.c'; else $(CYGPATH_W) '$(srcdir)/rtp/conference.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_conference-conference.Tpo rtp/$(DEPDIR)/rtp_conference-conference.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/conference.c' object='rtp/rtp_conference-conference.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_conference_CFLAGS) $(CFLAGS) -c -o rtp/rtp_conference-conference.obj `if test -f 'rtp/conference.c'; then $(CYGPATH_W) 'rtp/conference.c'; else $(CYGPATH_W) '$(srcdir)/rtp/conference.c'; fi`

rtp/rtp_recvcodecs-recvcodecs.o: rtp/recvcodecs.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_recvcodecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_recvcodecs-recvcodecs.o -MD -MP -MF rtp/$(DEPDIR)/rtp_recvcodecs-recvcodecs.Tpo -c -o rtp/rtp_recvcodecs-recvcodecs.o `test -f 'rtp/recvcodecs.c' || echo '$(srcdir)/'`rtp/recvcodecs.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_recvcodecs-recvcodecs.Tpo rtp/$(DEPDIR)/rtp_recvcodecs-recvcodecs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/recvcodecs.c' object='rtp/rtp_recvcodecs-recvcodecs.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_recvcodecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_recvcodecs-recvcodecs.o `test -f 'rtp/recvcodecs.c' || echo '$(srcdir)/'`rtp/recvcodecs.c

rtp/rtp_recvcodecs-recvcodecs.obj: rtp/recvcodecs.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_recvcodecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_recvcodecs-recvcodecs.obj -MD -MP -MF rtp/$(DEPDIR)/rtp_recvcodecs-recvcodecs.Tpo -c -o rtp/rtp_recvcodecs-recvcodecs.obj `if test -f 'rtp/recvcodecs.c'; then $(CYGPATH_W) 'rtp/recvcodecs.c'; else $(CYGPATH_W) '$(srcdir)/rtp/recvcodecs.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_recvcodecs-recvcodecs.Tpo rtp/$(DEPDIR)/rtp_recvcodecs-recvcodecs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/recvcodecs.c' object='rtp/rtp_recvcodecs-recvcodecs.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_recvcodecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_recvcodecs-recvcodecs.obj `if test -f 'rtp/recvcodecs.c'; then $(CYGPATH_W) 'rtp/recvcodecs.c'; else $(CYGPATH_W) '$(srcdir)/rtp/recvcodecs.c'; fi`

rtp/rtp_sendcodecs-generic.o: rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_sendcodecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_sendcodecs-generic.o -MD -MP -MF rtp/$(DEPDIR)/rtp_sendcodecs-generic.Tpo -c -o rtp/rtp_sendcodecs-generic.o `test -f 'rtp/generic.c' || echo '$(srcdir)/'`rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_sendcodecs-generic.Tpo rtp/$(DEPDIR)/rtp_sendcodecs-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/generic.c' object='rtp/rtp_sendcodecs-generic.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_sendcodecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_sendcodecs-generic.o `test -f 'rtp/generic.c' || echo '$(srcdir)/'`rtp/generic.c

rtp/rtp_sendcodecs-generic.obj: rtp/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_sendcodecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_sendcodecs-generic.obj -MD -MP -MF rtp/$(DEPDIR)/rtp_sendcodecs-generic.Tpo -c -o rtp/rtp_sendcodecs-generic.obj `if test -f 'rtp/generic.c'; then $(CYGPATH_W) 'rtp/generic.c'; else $(CYGPATH_W) '$(srcdir)/rtp/generic.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_sendcodecs-generic.Tpo rtp/$(DEPDIR)/rtp_sendcodecs-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/generic.c' object='rtp/rtp_sendcodecs-generic.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_sendcodecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_sendcodecs-generic.obj `if test -f 'rtp/generic.c'; then $(CYGPATH_W) 'rtp/generic.c'; else $(CYGPATH_W) '$(srcdir)/rtp/generic.c'; fi`

rtp/rtp_sendcodecs-sendcodecs.o: rtp/sendcodecs.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_sendcodecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_sendcodecs-sendcodecs.o -MD -MP -MF rtp/$(DEPDIR)/rtp_sendcodecs-sendcodecs.Tpo -c -o rtp/rtp_sendcodecs-sendcodecs.o `test -f 'rtp/sendcodecs.c' || echo '$(srcdir)/'`rtp/sendcodecs.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_sendcodecs-sendcodecs.Tpo rtp/$(DEPDIR)/rtp_sendcodecs-sendcodecs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/sendcodecs.c' object='rtp/rtp_sendcodecs-sendcodecs.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_sendcodecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_sendcodecs-sendcodecs.o `test -f 'rtp/sendcodecs.c' || echo '$(srcdir)/'`rtp/sendcodecs.c

rtp/rtp_sendcodecs-sendcodecs.obj: rtp/sendcodecs.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_sendcodecs_CFLAGS) $(CFLAGS) -MT rtp/rtp_sendcodecs-sendcodecs.obj -MD -MP -MF rtp/$(DEPDIR)/rtp_sendcodecs-sendcodecs.Tpo -c -o rtp/rtp_sendcodecs-sendcodecs.obj `if test -f 'rtp/sendcodecs.c'; then $(CYGPATH_W) 'rtp/sendcodecs.c'; else $(CYGPATH_W) '$(srcdir)/rtp/sendcodecs.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) rtp/$(DEPDIR)/rtp_sendcodecs-sendcodecs.Tpo rtp/$(DEPDIR)/rtp_sendcodecs-sendcodecs.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='rtp/sendcodecs.c' object='rtp/rtp_sendcodecs-sendcodecs.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtp_sendcodecs_CFLAGS) $(CFLAGS) -c -o rtp/rtp_sendcodecs-sendcodecs.obj `if test -f 'rtp/sendcodecs.c'; then $(CYGPATH_W) 'rtp/sendcodecs.c'; else $(CYGPATH_W) '$(srcdir)/rtp/sendcodecs.c'; fi`

transmitter_multicast-testutils.o: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -MT transmitter_multicast-testutils.o -MD -MP -MF $(DEPDIR)/transmitter_multicast-testutils.Tpo -c -o transmitter_multicast-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/transmitter_multicast-testutils.Tpo $(DEPDIR)/transmitter_multicast-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='transmitter_multicast-testutils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -c -o transmitter_multicast-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c

transmitter_multicast-testutils.obj: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -MT transmitter_multicast-testutils.obj -MD -MP -MF $(DEPDIR)/transmitter_multicast-testutils.Tpo -c -o transmitter_multicast-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/transmitter_multicast-testutils.Tpo $(DEPDIR)/transmitter_multicast-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='transmitter_multicast-testutils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -c -o transmitter_multicast-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`

transmitter/transmitter_multicast-generic.o: transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_multicast-generic.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_multicast-generic.Tpo -c -o transmitter/transmitter_multicast-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_multicast-generic.Tpo transmitter/$(DEPDIR)/transmitter_multicast-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/generic.c' object='transmitter/transmitter_multicast-generic.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_multicast-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c

transmitter/transmitter_multicast-generic.obj: transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_multicast-generic.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_multicast-generic.Tpo -c -o transmitter/transmitter_multicast-generic.obj `if test -f 'transmitter/generic.c'; then $(CYGPATH_W) 'transmitter/generic.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/generic.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_multicast-generic.Tpo transmitter/$(DEPDIR)/transmitter_multicast-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/generic.c' object='transmitter/transmitter_multicast-generic.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_multicast-generic.obj `if test -f 'transmitter/generic.c'; then $(CYGPATH_W) 'transmitter/generic.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/generic.c'; fi`

transmitter/transmitter_multicast-multicast.o: transmitter/multicast.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_multicast-multicast.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_multicast-multicast.Tpo -c -o transmitter/transmitter_multicast-multicast.o `test -f 'transmitter/multicast.c' || echo '$(srcdir)/'`transmitter/multicast.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_multicast-multicast.Tpo transmitter/$(DEPDIR)/transmitter_multicast-multicast.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/multicast.c' object='transmitter/transmitter_multicast-multicast.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_multicast-multicast.o `test -f 'transmitter/multicast.c' || echo '$(srcdir)/'`transmitter/multicast.c

transmitter/transmitter_multicast-multicast.obj: transmitter/multicast.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_multicast-multicast.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_multicast-multicast.Tpo -c -o transmitter/transmitter_multicast-multicast.obj `if test -f 'transmitter/multicast.c'; then $(CYGPATH_W) 'transmitter/multicast.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/multicast.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_multicast-multicast.Tpo transmitter/$(DEPDIR)/transmitter_multicast-multicast.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/multicast.c' object='transmitter/transmitter_multicast-multicast.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_multicast_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_multicast-multicast.obj `if test -f 'transmitter/multicast.c'; then $(CYGPATH_W) 'transmitter/multicast.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/multicast.c'; fi`

transmitter/transmitter_nice-generic.o: transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_nice-generic.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_nice-generic.Tpo -c -o transmitter/transmitter_nice-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_nice-generic.Tpo transmitter/$(DEPDIR)/transmitter_nice-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/generic.c' object='transmitter/transmitter_nice-generic.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_nice-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c

transmitter/transmitter_nice-generic.obj: transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_nice-generic.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_nice-generic.Tpo -c -o transmitter/transmitter_nice-generic.obj `if test -f 'transmitter/generic.c'; then $(CYGPATH_W) 'transmitter/generic.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/generic.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_nice-generic.Tpo transmitter/$(DEPDIR)/transmitter_nice-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/generic.c' object='transmitter/transmitter_nice-generic.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_nice-generic.obj `if test -f 'transmitter/generic.c'; then $(CYGPATH_W) 'transmitter/generic.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/generic.c'; fi`

transmitter/transmitter_nice-nice.o: transmitter/nice.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_nice-nice.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_nice-nice.Tpo -c -o transmitter/transmitter_nice-nice.o `test -f 'transmitter/nice.c' || echo '$(srcdir)/'`transmitter/nice.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_nice-nice.Tpo transmitter/$(DEPDIR)/transmitter_nice-nice.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/nice.c' object='transmitter/transmitter_nice-nice.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_nice-nice.o `test -f 'transmitter/nice.c' || echo '$(srcdir)/'`transmitter/nice.c

transmitter/transmitter_nice-nice.obj: transmitter/nice.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_nice-nice.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_nice-nice.Tpo -c -o transmitter/transmitter_nice-nice.obj `if test -f 'transmitter/nice.c'; then $(CYGPATH_W) 'transmitter/nice.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/nice.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_nice-nice.Tpo transmitter/$(DEPDIR)/transmitter_nice-nice.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/nice.c' object='transmitter/transmitter_nice-nice.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_nice-nice.obj `if test -f 'transmitter/nice.c'; then $(CYGPATH_W) 'transmitter/nice.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/nice.c'; fi`

transmitter_rawudp-testutils.o: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter_rawudp-testutils.o -MD -MP -MF $(DEPDIR)/transmitter_rawudp-testutils.Tpo -c -o transmitter_rawudp-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/transmitter_rawudp-testutils.Tpo $(DEPDIR)/transmitter_rawudp-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='transmitter_rawudp-testutils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter_rawudp-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c

transmitter_rawudp-testutils.obj: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter_rawudp-testutils.obj -MD -MP -MF $(DEPDIR)/transmitter_rawudp-testutils.Tpo -c -o transmitter_rawudp-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/transmitter_rawudp-testutils.Tpo $(DEPDIR)/transmitter_rawudp-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='transmitter_rawudp-testutils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter_rawudp-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`

transmitter/transmitter_rawudp-generic.o: transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_rawudp-generic.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_rawudp-generic.Tpo -c -o transmitter/transmitter_rawudp-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_rawudp-generic.Tpo transmitter/$(DEPDIR)/transmitter_rawudp-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/generic.c' object='transmitter/transmitter_rawudp-generic.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_rawudp-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c

transmitter/transmitter_rawudp-generic.obj: transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_rawudp-generic.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_rawudp-generic.Tpo -c -o transmitter/transmitter_rawudp-generic.obj `if test -f 'transmitter/generic.c'; then $(CYGPATH_W) 'transmitter/generic.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/generic.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_rawudp-generic.Tpo transmitter/$(DEPDIR)/transmitter_rawudp-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/generic.c' object='transmitter/transmitter_rawudp-generic.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_rawudp-generic.obj `if test -f 'transmitter/generic.c'; then $(CYGPATH_W) 'transmitter/generic.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/generic.c'; fi`

transmitter/transmitter_rawudp-rawudp.o: transmitter/rawudp.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_rawudp-rawudp.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_rawudp-rawudp.Tpo -c -o transmitter/transmitter_rawudp-rawudp.o `test -f 'transmitter/rawudp.c' || echo '$(srcdir)/'`transmitter/rawudp.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_rawudp-rawudp.Tpo transmitter/$(DEPDIR)/transmitter_rawudp-rawudp.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/rawudp.c' object='transmitter/transmitter_rawudp-rawudp.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_rawudp-rawudp.o `test -f 'transmitter/rawudp.c' || echo '$(srcdir)/'`transmitter/rawudp.c

transmitter/transmitter_rawudp-rawudp.obj: transmitter/rawudp.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_rawudp-rawudp.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_rawudp-rawudp.Tpo -c -o transmitter/transmitter_rawudp-rawudp.obj `if test -f 'transmitter/rawudp.c'; then $(CYGPATH_W) 'transmitter/rawudp.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/rawudp.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_rawudp-rawudp.Tpo transmitter/$(DEPDIR)/transmitter_rawudp-rawudp.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/rawudp.c' object='transmitter/transmitter_rawudp-rawudp.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_rawudp-rawudp.obj `if test -f 'transmitter/rawudp.c'; then $(CYGPATH_W) 'transmitter/rawudp.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/rawudp.c'; fi`

transmitter/transmitter_rawudp-rawudp-upnp.o: transmitter/rawudp-upnp.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_rawudp-rawudp-upnp.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Tpo -c -o transmitter/transmitter_rawudp-rawudp-upnp.o `test -f 'transmitter/rawudp-upnp.c' || echo '$(srcdir)/'`transmitter/rawudp-upnp.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Tpo transmitter/$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/rawudp-upnp.c' object='transmitter/transmitter_rawudp-rawudp-upnp.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_rawudp-rawudp-upnp.o `test -f 'transmitter/rawudp-upnp.c' || echo '$(srcdir)/'`transmitter/rawudp-upnp.c

transmitter/transmitter_rawudp-rawudp-upnp.obj: transmitter/rawudp-upnp.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_rawudp-rawudp-upnp.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Tpo -c -o transmitter/transmitter_rawudp-rawudp-upnp.obj `if test -f 'transmitter/rawudp-upnp.c'; then $(CYGPATH_W) 'transmitter/rawudp-upnp.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/rawudp-upnp.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Tpo transmitter/$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/rawudp-upnp.c' object='transmitter/transmitter_rawudp-rawudp-upnp.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_rawudp-rawudp-upnp.obj `if test -f 'transmitter/rawudp-upnp.c'; then $(CYGPATH_W) 'transmitter/rawudp-upnp.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/rawudp-upnp.c'; fi`

transmitter/transmitter_rawudp-stunalternd.o: transmitter/stunalternd.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_rawudp-stunalternd.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_rawudp-stunalternd.Tpo -c -o transmitter/transmitter_rawudp-stunalternd.o `test -f 'transmitter/stunalternd.c' || echo '$(srcdir)/'`transmitter/stunalternd.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_rawudp-stunalternd.Tpo transmitter/$(DEPDIR)/transmitter_rawudp-stunalternd.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/stunalternd.c' object='transmitter/transmitter_rawudp-stunalternd.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_rawudp-stunalternd.o `test -f 'transmitter/stunalternd.c' || echo '$(srcdir)/'`transmitter/stunalternd.c

transmitter/transmitter_rawudp-stunalternd.obj: transmitter/stunalternd.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_rawudp-stunalternd.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_rawudp-stunalternd.Tpo -c -o transmitter/transmitter_rawudp-stunalternd.obj `if test -f 'transmitter/stunalternd.c'; then $(CYGPATH_W) 'transmitter/stunalternd.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/stunalternd.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_rawudp-stunalternd.Tpo transmitter/$(DEPDIR)/transmitter_rawudp-stunalternd.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/stunalternd.c' object='transmitter/transmitter_rawudp-stunalternd.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_rawudp-stunalternd.obj `if test -f 'transmitter/stunalternd.c'; then $(CYGPATH_W) 'transmitter/stunalternd.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/stunalternd.c'; fi`

transmitter/transmitter_shm-generic.o: transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_shm_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_shm-generic.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_shm-generic.Tpo -c -o transmitter/transmitter_shm-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_shm-generic.Tpo transmitter/$(DEPDIR)/transmitter_shm-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/generic.c' object='transmitter/transmitter_shm-generic.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_shm_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_shm-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c

transmitter/transmitter_shm-generic.obj: transmitter/generic.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_shm_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_shm-generic.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_shm-generic.Tpo -c -o transmitter/transmitter_shm-generic.obj `if test -f 'transmitter/generic.c'; then $(CYGPATH_W) 'transmitter/generic.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/generic.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_shm-generic.Tpo transmitter/$(DEPDIR)/transmitter_shm-generic.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/generic.c' object='transmitter/transmitter_shm-generic.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_shm_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_shm-generic.obj `if test -f 'transmitter/generic.c'; then $(CYGPATH_W) 'transmitter/generic.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/generic.c'; fi`

transmitter/transmitter_shm-shm.o: transmitter/shm.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_shm_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_shm-shm.o -MD -MP -MF transmitter/$(DEPDIR)/transmitter_shm-shm.Tpo -c -o transmitter/transmitter_shm-shm.o `test -f 'transmitter/shm.c' || echo '$(srcdir)/'`transmitter/shm.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_shm-shm.Tpo transmitter/$(DEPDIR)/transmitter_shm-shm.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/shm.c' object='transmitter/transmitter_shm-shm.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_shm_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_shm-shm.o `test -f 'transmitter/shm.c' || echo '$(srcdir)/'`transmitter/shm.c

transmitter/transmitter_shm-shm.obj: transmitter/shm.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_shm_CFLAGS) $(CFLAGS) -MT transmitter/transmitter_shm-shm.obj -MD -MP -MF transmitter/$(DEPDIR)/transmitter_shm-shm.Tpo -c -o transmitter/transmitter_shm-shm.obj `if test -f 'transmitter/shm.c'; then $(CYGPATH_W) 'transmitter/shm.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/shm.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) transmitter/$(DEPDIR)/transmitter_shm-shm.Tpo transmitter/$(DEPDIR)/transmitter_shm-shm.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='transmitter/shm.c' object='transmitter/transmitter_shm-shm.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_shm_CFLAGS) $(CFLAGS) -c -o transmitter/transmitter_shm-shm.obj `if test -f 'transmitter/shm.c'; then $(CYGPATH_W) 'transmitter/shm.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/shm.c'; fi`

utils_binadded-testutils.o: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utils_binadded_CFLAGS) $(CFLAGS) -MT utils_binadded-testutils.o -MD -MP -MF $(DEPDIR)/utils_binadded-testutils.Tpo -c -o utils_binadded-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/utils_binadded-testutils.Tpo $(DEPDIR)/utils_binadded-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='utils_binadded-testutils.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utils_binadded_CFLAGS) $(CFLAGS) -c -o utils_binadded-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c

utils_binadded-testutils.obj: testutils.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utils_binadded_CFLAGS) $(CFLAGS) -MT utils_binadded-testutils.obj -MD -MP -MF $(DEPDIR)/utils_binadded-testutils.Tpo -c -o utils_binadded-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/utils_binadded-testutils.Tpo $(DEPDIR)/utils_binadded-testutils.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='testutils.c' object='utils_binadded-testutils.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utils_binadded_CFLAGS) $(CFLAGS) -c -o utils_binadded-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`

utils/utils_binadded-binadded.o: utils/binadded.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utils_binadded_CFLAGS) $(CFLAGS) -MT utils/utils_binadded-binadded.o -MD -MP -MF utils/$(DEPDIR)/utils_binadded-binadded.Tpo -c -o utils/utils_binadded-binadded.o `test -f 'utils/binadded.c' || echo '$(srcdir)/'`utils/binadded.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) utils/$(DEPDIR)/utils_binadded-binadded.Tpo utils/$(DEPDIR)/utils_binadded-binadded.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utils/binadded.c' object='utils/utils_binadded-binadded.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utils_binadded_CFLAGS) $(CFLAGS) -c -o utils/utils_binadded-binadded.o `test -f 'utils/binadded.c' || echo '$(srcdir)/'`utils/binadded.c

utils/utils_binadded-binadded.obj: utils/binadded.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utils_binadded_CFLAGS) $(CFLAGS) -MT utils/utils_binadded-binadded.obj -MD -MP -MF utils/$(DEPDIR)/utils_binadded-binadded.Tpo -c -o utils/utils_binadded-binadded.obj `if test -f 'utils/binadded.c'; then $(CYGPATH_W) 'utils/binadded.c'; else $(CYGPATH_W) '$(srcdir)/utils/binadded.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) utils/$(DEPDIR)/utils_binadded-binadded.Tpo utils/$(DEPDIR)/utils_binadded-binadded.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='utils/binadded.c' object='utils/utils_binadded-binadded.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(utils_binadded_CFLAGS) $(CFLAGS) -c -o utils/utils_binadded-binadded.obj `if test -f 'utils/binadded.c'; then $(CYGPATH_W) 'utils/binadded.c'; else $(CYGPATH_W) '$(srcdir)/utils/binadded.c'; fi`

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
	-rm -rf base/.libs base/_libs
	-rm -rf msn/.libs msn/_libs
	-rm -rf raw/.libs raw/_libs
	-rm -rf rtp/.libs rtp/_libs
	-rm -rf transmitter/.libs transmitter/_libs
	-rm -rf utils/.libs utils/_libs

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	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-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	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"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

# Recover from deleted '.trs' file; this should ensure that
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
# both 'foo.log' and 'foo.trs'.  Break the recipe in two subshells
# to avoid problems with "make -n".
.log.trs:
	rm -f $< $@
	$(MAKE) $(AM_MAKEFLAGS) $<

# Leading 'am--fnord' is there to ensure the list of targets does not
# expand to empty, as could happen e.g. with make check TESTS=''.
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
am--force-recheck:
	@:

$(TEST_SUITE_LOG): $(TEST_LOGS)
	@$(am__set_TESTS_bases); \
	am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
	redo_bases=`for i in $$bases; do \
	              am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
	            done`; \
	if test -n "$$redo_bases"; then \
	  redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
	  redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
	  if $(am__make_dryrun); then :; else \
	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
	  fi; \
	fi; \
	if test -n "$$am__remaking_logs"; then \
	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
	       "recursion detected" >&2; \
	else \
	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
	fi; \
	if $(am__make_dryrun); then :; else \
	  st=0;  \
	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
	  for i in $$redo_bases; do \
	    test -f $$i.trs && test -r $$i.trs \
	      || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
	    test -f $$i.log && test -r $$i.log \
	      || { echo "$$errmsg $$i.log" >&2; st=1; }; \
	  done; \
	  test $$st -eq 0 || exit 1; \
	fi
	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
	ws='[ 	]'; \
	results=`for b in $$bases; do echo $$b.trs; done`; \
	test -n "$$results" || results=/dev/null; \
	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
	  success=true; \
	else \
	  success=false; \
	fi; \
	br='==================='; br=$$br$$br$$br$$br; \
	result_count () \
	{ \
	    if test x"$$1" = x"--maybe-color"; then \
	      maybe_colorize=yes; \
	    elif test x"$$1" = x"--no-color"; then \
	      maybe_colorize=no; \
	    else \
	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
	    fi; \
	    shift; \
	    desc=$$1 count=$$2; \
	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
	      color_start=$$3 color_end=$$std; \
	    else \
	      color_start= color_end=; \
	    fi; \
	    echo "$${color_start}# $$desc $$count$${color_end}"; \
	}; \
	create_testsuite_report () \
	{ \
	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
	  result_count $$1 "PASS: " $$pass  "$$grn"; \
	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
	  result_count $$1 "FAIL: " $$fail  "$$red"; \
	  result_count $$1 "XPASS:" $$xpass "$$red"; \
	  result_count $$1 "ERROR:" $$error "$$mgn"; \
	}; \
	{								\
	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
	    $(am__rst_title);						\
	  create_testsuite_report --no-color;				\
	  echo;								\
	  echo ".. contents:: :depth: 2";				\
	  echo;								\
	  for b in $$bases; do echo $$b; done				\
	    | $(am__create_global_log);					\
	} >$(TEST_SUITE_LOG).tmp || exit 1;				\
	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
	if $$success; then						\
	  col="$$grn";							\
	 else								\
	  col="$$red";							\
	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
	fi;								\
	echo "$${col}$$br$${std}"; 					\
	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
	echo "$${col}$$br$${std}"; 					\
	create_testsuite_report --maybe-color;				\
	echo "$$col$$br$$std";						\
	if $$success; then :; else					\
	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
	  fi;								\
	  echo "$$col$$br$$std";					\
	fi;								\
	$$success || exit 1

check-TESTS:
	@list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
	@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
	@set +e; $(am__set_TESTS_bases); \
	log_list=`for i in $$bases; do echo $$i.log; done`; \
	trs_list=`for i in $$bases; do echo $$i.trs; done`; \
	log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
	exit $$?;
recheck: all $(check_PROGRAMS)
	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
	@set +e; $(am__set_TESTS_bases); \
	bases=`for i in $$bases; do echo $$i; done \
	         | $(am__list_recheck_tests)` || exit 1; \
	log_list=`for i in $$bases; do echo $$i.log; done`; \
	log_list=`echo $$log_list`; \
	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
	        am__force_recheck=am--force-recheck \
	        TEST_LOGS="$$log_list"; \
	exit $$?
base/fscodec.log: base/fscodec$(EXEEXT)
	@p='base/fscodec$(EXEEXT)'; \
	b='base/fscodec'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
base/fstransmitter.log: base/fstransmitter$(EXEEXT)
	@p='base/fstransmitter$(EXEEXT)'; \
	b='base/fstransmitter'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
transmitter/rawudp.log: transmitter/rawudp$(EXEEXT)
	@p='transmitter/rawudp$(EXEEXT)'; \
	b='transmitter/rawudp'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
transmitter/multicast.log: transmitter/multicast$(EXEEXT)
	@p='transmitter/multicast$(EXEEXT)'; \
	b='transmitter/multicast'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
transmitter/nice.log: transmitter/nice$(EXEEXT)
	@p='transmitter/nice$(EXEEXT)'; \
	b='transmitter/nice'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
transmitter/shm.log: transmitter/shm$(EXEEXT)
	@p='transmitter/shm$(EXEEXT)'; \
	b='transmitter/shm'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
raw/conference.log: raw/conference$(EXEEXT)
	@p='raw/conference$(EXEEXT)'; \
	b='raw/conference'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
rtp/codecs.log: rtp/codecs$(EXEEXT)
	@p='rtp/codecs$(EXEEXT)'; \
	b='rtp/codecs'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
rtp/sendcodecs.log: rtp/sendcodecs$(EXEEXT)
	@p='rtp/sendcodecs$(EXEEXT)'; \
	b='rtp/sendcodecs'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
rtp/conference.log: rtp/conference$(EXEEXT)
	@p='rtp/conference$(EXEEXT)'; \
	b='rtp/conference'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
rtp/recvcodecs.log: rtp/recvcodecs$(EXEEXT)
	@p='rtp/recvcodecs$(EXEEXT)'; \
	b='rtp/recvcodecs'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
msn/conference.log: msn/conference$(EXEEXT)
	@p='msn/conference$(EXEEXT)'; \
	b='msn/conference'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
utils/binadded.log: utils/binadded$(EXEEXT)
	@p='utils/binadded$(EXEEXT)'; \
	b='utils/binadded'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
	@p='$<'; \
	$(am__set_b); \
	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
@am__EXEEXT_TRUE@	@p='$<'; \
@am__EXEEXT_TRUE@	$(am__set_b); \
@am__EXEEXT_TRUE@	$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
@am__EXEEXT_TRUE@	--log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@	$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@	"$$tst" $(AM_TESTS_FD_REDIRECT)

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
	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
installdirs:
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:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:
	-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
	-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
	-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)

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)
	-rm -f base/$(DEPDIR)/$(am__dirstamp)
	-rm -f base/$(am__dirstamp)
	-rm -f msn/$(DEPDIR)/$(am__dirstamp)
	-rm -f msn/$(am__dirstamp)
	-rm -f raw/$(DEPDIR)/$(am__dirstamp)
	-rm -f raw/$(am__dirstamp)
	-rm -f rtp/$(DEPDIR)/$(am__dirstamp)
	-rm -f rtp/$(am__dirstamp)
	-rm -f transmitter/$(DEPDIR)/$(am__dirstamp)
	-rm -f transmitter/$(am__dirstamp)
	-rm -f utils/$(DEPDIR)/$(am__dirstamp)
	-rm -f utils/$(am__dirstamp)

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-checkPROGRAMS clean-generic clean-libtool clean-local \
	mostlyclean-am

distclean: distclean-am
	-rm -rf ./$(DEPDIR) base/$(DEPDIR) msn/$(DEPDIR) raw/$(DEPDIR) rtp/$(DEPDIR) transmitter/$(DEPDIR) utils/$(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-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) base/$(DEPDIR) msn/$(DEPDIR) raw/$(DEPDIR) rtp/$(DEPDIR) transmitter/$(DEPDIR) utils/$(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:

.MAKE: check-am install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
	clean-checkPROGRAMS clean-generic clean-libtool clean-local \
	cscopelist-am ctags ctags-am 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-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 \
	recheck tags tags-am uninstall uninstall-am


# keep target around, since it's referenced in the modules' Makefiles
clean-local-check:
	@echo

# hangs spectacularly on some machines, so let's not do this by default yet
@HAVE_VALGRIND_TRUE@check-valgrind:
@HAVE_VALGRIND_TRUE@	$(MAKE) valgrind
@HAVE_VALGRIND_FALSE@check-valgrind:
@HAVE_VALGRIND_FALSE@	@true

# run any given test by running make test.check
# if the test fails, run it again at at least debug level 2
%.check: %
	@$(TESTS_ENVIRONMENT)					\
	CK_DEFAULT_TIMEOUT=20					\
	$* ||							\
	$(TESTS_ENVIRONMENT)					\
	GST_DEBUG=$$GST_DEBUG,*:2				\
	CK_DEFAULT_TIMEOUT=20					\
	$*

# just like 'check', but don't run it again if it fails (useful for debugging)
%.check-norepeat: %
	@$(TESTS_ENVIRONMENT)					\
	CK_DEFAULT_TIMEOUT=20					\
	$*

# run any given test in a loop
%.torture: %
	@for i in `seq 1 $(LOOPS)`; do				\
	$(TESTS_ENVIRONMENT)					\
	CK_DEFAULT_TIMEOUT=20					\
	$*; done

# run any given test in an infinite loop
%.forever: %
	@while true; do						\
	$(TESTS_ENVIRONMENT)					\
	CK_DEFAULT_TIMEOUT=20					\
	$* || break; done

# valgrind any given test by running make test.valgrind
%.valgrind: %
	@$(TESTS_ENVIRONMENT)					\
	CK_DEFAULT_TIMEOUT=360					\
	G_SLICE=always-malloc					\
	$(LIBTOOL) --mode=execute				\
	$(VALGRIND_PATH) -q					\
	$(foreach s,$(SUPPRESSIONS),--suppressions=$(s))	\
	--tool=memcheck --leak-check=full --trace-children=yes	\
	--leak-resolution=high --num-callers=20			\
	./$* 2>&1 | tee valgrind.log
	@if grep "==" valgrind.log > /dev/null 2>&1; then	\
	    rm valgrind.log;					\
	    exit 1;						\
	fi
	@rm valgrind.log

# valgrind any given test and generate suppressions for it
%.valgrind.gen-suppressions: %
	@$(TESTS_ENVIRONMENT)					\
	CK_DEFAULT_TIMEOUT=360					\
	G_SLICE=always-malloc					\
	$(LIBTOOL) --mode=execute				\
	$(VALGRIND_PATH) -q 					\
	$(foreach s,$(SUPPRESSIONS),--suppressions=$(s))	\
	--tool=memcheck --leak-check=full --trace-children=yes	\
	--leak-resolution=high --num-callers=20			\
	--gen-suppressions=all					\
	./$* 2>&1 | tee suppressions.log

# valgrind any given test until failure by running make test.valgrind-forever
%.valgrind-forever: %
	@while $(MAKE) $*.valgrind; do				\
	  true; done

# gdb any given test by running make test.gdb
%.gdb: %
	@$(TESTS_ENVIRONMENT)					\
	CK_FORK=no						\
	$(LIBTOOL) --mode=execute				\
	gdb $*

# torture tests
torture: $(TESTS)
	-rm test-registry.xml
	@echo "Torturing tests ..."
	@for i in `seq 1 $(LOOPS)`; do				\
		$(MAKE) check ||				\
		(echo "Failure after $$i runs"; exit 1) ||	\
		exit 1;						\
	done
	@banner="All $(LOOPS) loops passed";			\
	dashes=`echo "$$banner" | sed s/./=/g`;			\
	echo $$dashes; echo $$banner; echo $$dashes

# forever tests
forever: $(TESTS)
	-rm test-registry.xml
	@echo "Forever tests ..."
	@while true; do						\
		$(MAKE) check ||				\
		(echo "Failure"; exit 1) ||			\
		exit 1;						\
	done

# valgrind all tests
valgrind: $(TESTS)
	@echo "Valgrinding tests ..."
	@failed=0;							\
	for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do	\
		$(MAKE) $$t.valgrind;					\
		if test "$$?" -ne 0; then                               \
			echo "Valgrind error for test $$t";		\
			failed=`expr $$failed + 1`;			\
			whicht="$$whicht $$t";				\
		fi;							\
	done;								\
	if test "$$failed" -ne 0; then					\
		echo "$$failed tests had leaks or errors under valgrind:";	\
		echo "$$whicht";					\
		false;							\
	fi

# valgrind all tests and generate suppressions
valgrind.gen-suppressions: $(TESTS)
	@echo "Valgrinding tests ..."
	@failed=0;							\
	for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do	\
		$(MAKE) $$t.valgrind.gen-suppressions;			\
		if test "$$?" -ne 0; then                               \
			echo "Valgrind error for test $$t";		\
			failed=`expr $$failed + 1`;			\
			whicht="$$whicht $$t";				\
		fi;							\
	done;								\
	if test "$$failed" -ne 0; then					\
		echo "$$failed tests had leaks or errors under valgrind:";	\
		echo "$$whicht";					\
		false;							\
	fi
inspect:
	@echo "Inspecting features ..."
	@for e in `$(TESTS_ENVIRONMENT) $(GST_INSPECT) | head -n -2 	\
	  | cut -d: -f2`;						\
	  do echo Inspecting $$e;					\
	     $(GST_INSPECT) $$e > /dev/null 2>&1; done

help:
	@echo
	@echo "make check                         -- run all checks"
	@echo "make torture                       -- run all checks $(LOOPS) times"
	@echo "make (dir)/(test).check            -- run the given check once, repeat with GST_DEBUG=*:2 if it fails"
	@echo "make (dir)/(test).check-norepeat   -- run the given check once, but don't run it again if it fails"
	@echo "make (dir)/(test).forever          -- run the given check forever"
	@echo "make (dir)/(test).torture          -- run the given check $(LOOPS) times"
	@echo
	@echo "make (dir)/(test).gdb              -- start up gdb for the given test"
	@echo
	@echo "make valgrind                      -- valgrind all tests"
	@echo "make valgrind.gen-suppressions     -- generate suppressions for all tests"
	@echo "                                      and save to suppressions.log"
	@echo "make (dir)/(test).valgrind         -- valgrind the given test"
	@echo "make (dir)/(test).valgrind-forever -- valgrind the given test forever"
	@echo "make (dir)/(test).valgrind.gen-suppressions -- generate suppressions"
	@echo "                                               and save to suppressions.log"
	@echo "make inspect                       -- inspect all plugin features"
	@echo
	@echo
	@echo "Additionally, you can use the GST_CHECKS environment variable to"
	@echo "specify which test(s) should be run. This is useful if you are"
	@echo "debugging a failure in one particular test, or want to reproduce"
	@echo "a race condition in a single test."
	@echo
	@echo "Examples:"
	@echo
	@echo "  GST_CHECKS=test_this,test_that  make element/foobar.check"
	@echo "  GST_CHECKS=test_many_threads    make element/foobar.forever"
	@echo

clean-local: clean-local-check
	rm -rf cache

$(CHECK_REGISTRY):
	$(TESTS_ENVIRONMENT)

# 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:
farstream-0.2.7/tests/check/Makefile.am0000664000076400007640000001005312461773672014730 00000000000000include $(top_srcdir)/common/check.mak

CHECK_REGISTRY = $(top_builddir)/tests/check/test-registry.xml

REGISTRY_ENVIRONMENT = \
	GST_REGISTRY=$(CHECK_REGISTRY)

TESTS_ENVIRONMENT = \
	G_SLICE=debug-blocks					\
	CK_DEFAULT_TIMEOUT=120					\
	STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"	\
	$(REGISTRY_ENVIRONMENT)					\
	GST_PLUGIN_LOADING_WHITELIST=gstreamer:gst-plugins-base:gst-plugins-good:libnice:valve:siren:autoconvert:rtpmux:dtmf:mimic:shm:spandsp:srtp:farstream@$(top_builddir)/gst \
	GST_PLUGIN_PATH=$(top_builddir)/gst:${GST_PLUGIN_PATH}	\
	GST_PLUGIN_PATH_1_0=$(top_builddir)/gst:${GST_PLUGIN_PATH_1_0}	\
	FS_PLUGIN_PATH=$(top_builddir)/transmitters/rawudp/.libs:$(top_builddir)/transmitters/multicast/.libs:$(top_builddir)/transmitters/nice/.libs:$(top_builddir)/transmitters/shm/.libs \
	LD_LIBRARY_PATH=$(top_builddir)/farstream/.libs:${LD_LIBRARY_PATH} \
	UPNP_XML_PATH=$(srcdir)/upnp \
	SRCDIR=$(srcdir) \
	XDG_CACHE_HOME=$(builddir)/cache


# ths core dumps of some machines have PIDs appended
CLEANFILES = core* test-registry.xml

clean-local: clean-local-check
	rm -rf cache

$(CHECK_REGISTRY):
	$(TESTS_ENVIRONMENT)


TESTS = $(check_PROGRAMS)

SUPPRESSIONS = $(top_srcdir)/common/gst.supp

EXTRA_DIST = \
	upnp/InternetGatewayDevice.xml \
	upnp/WANIPConnection.xml \
	base/test1.conf \
	utils/gstelements.conf

#######
# From here.. Its a list of our tests and their sub stuff
#
check_PROGRAMS = \
	base/fscodec \
	base/fstransmitter \
	transmitter/rawudp \
	transmitter/multicast \
	transmitter/nice \
	transmitter/shm \
	raw/conference \
	rtp/codecs \
	rtp/sendcodecs \
	rtp/conference \
	rtp/recvcodecs \
	msn/conference \
	utils/binadded

AM_CFLAGS = \
	$(CFLAGS) \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_CHECK_CFLAGS) \
	$(GST_CFLAGS)

LDADD = \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(GST_CHECK_LIBS) \
	$(GST_LIBS)

base_fscodec_SOURCES = \
	testutils.c \
	testutils.h \
	base/fscodec.c


transmitter_rawudp_CFLAGS = $(AM_CFLAGS) \
	$(GUPNP_CFLAGS) $(GIO_CFLAGS) $(NICE_CFLAGS)
transmitter_rawudp_LDADD = $(LDADD) \
	$(GUPNP_LIBS) \
	$(GIO_LIBS) \
	$(NICE_LIBS)
transmitter_rawudp_SOURCES = \
	check-threadsafe.h  \
	testutils.c \
	testutils.h \
	transmitter/generic.c \
	transmitter/generic.h \
	transmitter/rawudp.c \
	transmitter/rawudp-upnp.c \
	transmitter/rawudp-upnp.h \
	transmitter/stunalternd.c \
	transmitter/stunalternd.h


transmitter_multicast_CFLAGS = $(AM_CFLAGS)
transmitter_multicast_SOURCES = \
	check-threadsafe.h  \
	testutils.c \
	testutils.h \
	transmitter/generic.c \
	transmitter/generic.h \
	transmitter/multicast.c
transmitter_multicast_LDADD = $(LDADD) $(GST_BASE_LIBS)

transmitter_nice_CFLAGS = $(FS_INTERNAL_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
transmitter_nice_SOURCES = \
	check-threadsafe.h  \
	transmitter/generic.c \
	transmitter/generic.h \
	transmitter/nice.c 
transmitter_nice_LDADD = $(LDADD) $(GST_BASE_LIBS)


transmitter_shm_CFLAGS = $(AM_CFLAGS) $(GUPNP_CFLAGS) $(NICE_CFLAGS)
transmitter_shm_LDADD = $(LDADD) \
	$(GUPNP_LIBS) \
	$(NICE_LIBS)
transmitter_shm_SOURCES = \
	check-threadsafe.h  \
	transmitter/generic.c \
	transmitter/generic.h \
	transmitter/shm.c

raw_conference_CFLAGS = $(CFLAGS) $(AM_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
raw_conference_SOURCES = \
	check-threadsafe.h  \
	testutils.c \
	testutils.h \
	raw/conference.c

rtp_conference_CFLAGS = $(AM_CFLAGS)
rtp_conference_SOURCES = \
	check-threadsafe.h  \
	testutils.c \
	testutils.h \
	rtp/generic.c \
	rtp/generic.h \
	rtp/conference.c

rtp_codecs_CFLAGS = $(AM_CFLAGS)
rtp_codecs_SOURCES = \
	rtp/generic.c \
	rtp/generic.h \
	rtp/codecs.c

rtp_sendcodecs_CFLAGS = $(AM_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
rtp_sendcodecs_LDADD = $(LDADD) -lgstrtp-@GST_API_VERSION@
rtp_sendcodecs_SOURCES = \
	rtp/generic.c \
	rtp/generic.h \
	rtp/sendcodecs.c

rtp_recvcodecs_CFLAGS = $(AM_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS)
rtp_recvcodecs_LDADD = $(LDADD) -lgstrtp-@GST_API_VERSION@

msn_conference_CFLAGS = $(AM_CFLAGS)
msn_conference_SOURCES = \
	msn/conference.c

utils_binadded_CFLAGS = $(AM_CFLAGS)
utils_binadded_SOURCES = \
	testutils.c \
	testutils.h \
	utils/binadded.c
farstream-0.2.7/tests/check/testutils.c0000664000076400007640000000472012401500475015063 00000000000000/* Farstream unit tests generic utilities
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 

#include "testutils.h"

#ifdef HAVE_GETIFADDRS
 #include 
 #include 
 #include 
 #include 
 #include 
#endif

gchar *
find_multicast_capable_address (void)
{
#ifdef HAVE_GETIFADDRS
  gchar *retval = NULL;
  struct ifaddrs *ifa, *results;

  if (getifaddrs (&results) < 0)
    return NULL;

  for (ifa = results; ifa; ifa = ifa->ifa_next) {
    /* no ip address from interface that is down */
    if ((ifa->ifa_flags & IFF_UP) == 0)
      continue;

    if ((ifa->ifa_flags & IFF_MULTICAST) == 0)
      continue;

    if ((ifa->ifa_flags & IFF_RUNNING) == 0)
      continue;

    if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET)
      continue;

    if (retval)
    {
      g_free (retval);
      retval = NULL;
      GST_DEBUG ("Disabling test, more than one multicast capable interface");
      break;
    }

    retval = g_strdup (
        inet_ntoa (((struct sockaddr_in *) ifa->ifa_addr)->sin_addr));
    GST_DEBUG ("Sending from %s on interface %s", retval, ifa->ifa_name);
  }

  freeifaddrs (results);

  if (retval == NULL)
    g_message ("Skipping multicast transmitter tests, "
        "no multicast capable interface found");
  return retval;

#else
  g_message ("This system does not have getifaddrs,"
      " this test will be disabled");
  return NULL;
#endif
}

gchar *
get_fullpath (const gchar *filename)
{
  if (g_getenv ("SRCDIR"))
    return g_strdup_printf ("%s/%s", g_getenv ("SRCDIR"), filename);
  else
    return g_strdup (filename);
}
farstream-0.2.7/tests/check/rtp/0000775000076400007640000000000012462323000013533 500000000000000farstream-0.2.7/tests/check/rtp/recvcodecs.c0000664000076400007640000002555412401500475015760 00000000000000/* Farstream unit tests for FsRtpConference
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 

#include 
#include 

#include "check-threadsafe.h"

#define SEND_BUFFER_COUNT 100
#define BUFFER_COUNT 20

GMutex count_mutex;
GCond count_cond;
guint buffer_count = 0;


static void
handoff_handler (GstElement *fakesink, GstBuffer *buffer, GstPad *pad,
    gpointer user_data)
{
  g_mutex_lock (&count_mutex);
  buffer_count ++;

  GST_LOG ("buffer %d", buffer_count);

  if (buffer_count == BUFFER_COUNT)
    g_cond_broadcast (&count_cond);
  ts_fail_unless (buffer_count <= SEND_BUFFER_COUNT);
  g_mutex_unlock (&count_mutex);
}

static void
src_pad_added_cb (FsStream *self,
    GstPad   *pad,
    FsCodec  *codec,
    GstElement *pipeline)
{
  GstElement *sink;
  GstPad *sinkpad;

  sink = gst_element_factory_make ("fakesink", NULL);
  g_object_set (sink, "sync", TRUE,
      "signal-handoffs", TRUE,
      NULL);
  g_signal_connect (sink, "handoff", G_CALLBACK (handoff_handler), NULL);
  fail_unless (gst_bin_add (GST_BIN (pipeline), sink));
  gst_element_set_state (sink, GST_STATE_PLAYING);
  sinkpad = gst_element_get_static_pad (sink, "sink");
  fail_unless (GST_PAD_LINK_SUCCESSFUL (gst_pad_link (pad, sinkpad)));
  gst_object_unref (sinkpad);

  GST_DEBUG ("Pad added");
}

static guint decoder_count = 0;

static void
element_added (FsElementAddedNotifier *notif, GstBin *bin, GstElement *element,
    gpointer user_data)
{
  GstElementFactory *fact = gst_element_get_factory (element);

  if (!fact)
    return;

  if (strcmp (gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (fact)),
              "theoradec"))
    return;

  ts_fail_unless (decoder_count == 0);
  decoder_count++;
}

static void
caps_changed (GstPad *pad, GParamSpec *spec, FsStream *stream)
{
  GstCaps *caps;
  GstStructure *s;
  FsCodec *codec;
  GList *codecs;
  const gchar *config;
  GError *error = NULL;

  g_object_get (pad, "caps", &caps, NULL);

  if (!caps)
    return;

  s = gst_caps_get_structure (caps, 0);

  codec = fs_codec_new (96, "THEORA", FS_MEDIA_TYPE_VIDEO, 90000);

  config = gst_structure_get_string (s, "configuration");
  if (config)
    fs_codec_add_optional_parameter (codec, "configuration", config);

  codecs = g_list_prepend (NULL, codec);
  fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error),
      "Unable to set remote codec: %s",
      error ? error->message : "UNKNOWN");
  fs_codec_list_destroy (codecs);
}

static GstPadProbeReturn
drop_theora_config (GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
{
  GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
  GstRTPBuffer rtpbuffer = GST_RTP_BUFFER_INIT;
  guint8 *payload;
  guint32 header;
  guchar TDT;

  gst_rtp_buffer_map (buffer, GST_MAP_READ, &rtpbuffer);

  payload = gst_rtp_buffer_get_payload (&rtpbuffer);

  header = GST_READ_UINT32_BE (payload);
  /*
   *  0                   1                   2                   3
   *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   * |                     Ident                     | F |TDT|# pkts.|
   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   *
   * F: Fragment type (0=none, 1=start, 2=cont, 3=end)
   * TDT: Theora data type (0=theora, 1=config, 2=comment, 3=reserved)
   * pkts: number of packets.
   */
  TDT = (header & 0x30) >> 4;

  gst_rtp_buffer_unmap (&rtpbuffer);

  if (TDT == 1)
    return GST_PAD_PROBE_DROP;
  else
    return GST_PAD_PROBE_OK;
}

GST_START_TEST (test_rtprecv_inband_config_data)
{
  FsParticipant *participant = NULL;
  FsStream *stream = NULL;
  GstElement *src;
  GstElement *pipeline;
  GstElement *sink;
  GstBus *bus;
  GstMessage *msg;
  guint port = 0;
  GError *error = NULL;
  GList *codecs = NULL;
  GstElement *fspipeline;
  GstElement *conference;
  FsSession *session;
  GList *item;
  GstPad *pad;
  GstElement *pay;
  FsElementAddedNotifier *notif;

  g_mutex_init (&count_mutex);
  g_cond_init (&count_cond);
  buffer_count = 0;
  decoder_count = 0;

  fspipeline = gst_pipeline_new (NULL);

  notif = fs_element_added_notifier_new ();
  fs_element_added_notifier_add (notif, GST_BIN (fspipeline));
  g_signal_connect (notif, "element-added", G_CALLBACK (element_added), NULL);


  conference = gst_element_factory_make ("fsrtpconference", NULL);

  fail_unless (gst_bin_add (GST_BIN (fspipeline), conference));

  session = fs_conference_new_session (FS_CONFERENCE (conference),
      FS_MEDIA_TYPE_VIDEO, &error);
  if (error)
    fail ("Error while creating new session (%d): %s",
        error->code, error->message);
  fail_if (session == NULL, "Could not make session, but no GError!");
  g_object_set (session, "no-rtcp-timeout", 0, NULL);

  g_object_get (session, "codecs-without-config", &codecs, NULL);
  for (item = codecs; item; item = item->next)
  {
    FsCodec *codec = item->data;

    if (!g_ascii_strcasecmp ("THEORA", codec->encoding_name))
      break;
  }
  fs_codec_list_destroy (codecs);

  if (!item)
  {
    GST_INFO ("Skipping %s because THEORA is not detected", G_STRFUNC);
    fs_session_destroy (session);
    g_object_unref (session);
    gst_object_unref (fspipeline);
    return;
  }

  participant = fs_conference_new_participant (
      FS_CONFERENCE (conference), &error);
  if (error)
    ts_fail ("Error while creating new participant (%d): %s",
        error->code, error->message);
  ts_fail_if (participant == NULL,
      "Could not make participant, but no GError!");

  stream = fs_session_new_stream (session, participant, FS_DIRECTION_RECV,
      &error);
  if (error)
    ts_fail ("Error while creating new stream (%d): %s",
        error->code, error->message);
  ts_fail_if (stream == NULL, "Could not make stream, but no GError!");

  fail_unless (fs_stream_set_transmitter (stream, "rawudp", NULL, 0, &error));
  fail_unless (error == NULL);

  g_signal_connect (stream, "src-pad-added",
      G_CALLBACK (src_pad_added_cb), fspipeline);

  codecs = g_list_prepend (NULL, fs_codec_new (96, "THEORA",
          FS_MEDIA_TYPE_VIDEO, 90000));
  fail_unless (fs_stream_set_remote_codecs (stream, codecs,
          &error),
      "Unable to set remote codec: %s",
      error ? error->message : "UNKNOWN");

  fs_codec_list_destroy (codecs);


  pipeline = gst_parse_launch (
      "videotestsrc is-live=1 name=src num-buffers="G_STRINGIFY (BUFFER_COUNT) " !"
      " video/x-raw, framerate=(fraction)30/1 ! theoraenc !"
      " rtptheorapay name=pay config-interval=0 name=pay !"
      " application/x-rtp, payload=96, ssrc=(uint)12345678 !"
      " udpsink host=127.0.0.1 name=sink", NULL);

  gst_element_set_state (fspipeline, GST_STATE_PLAYING);


  bus = gst_element_get_bus (fspipeline);
  while (port == 0)
  {
    const GstStructure *s;

    msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
        GST_MESSAGE_ELEMENT);
    fail_unless (msg != NULL);
    s = gst_message_get_structure (msg);

    fail_if (gst_structure_has_name (s, "farstream-local-candidates-prepared"));

    if (gst_structure_has_name (s, "farstream-new-local-candidate"))
    {
      const GValue *value;
      FsCandidate *candidate;

      ts_fail_unless (
          gst_structure_has_field_typed (s, "candidate", FS_TYPE_CANDIDATE),
          "farstream-new-local-candidate structure has no candidate field");

      value = gst_structure_get_value (s, "candidate");
      candidate = g_value_get_boxed (value);

      if (candidate->type == FS_CANDIDATE_TYPE_HOST)
        port = candidate->port;

      GST_DEBUG ("Got port %u", port);
    }

    gst_message_unref (msg);
  }

  gst_object_unref (bus);

  sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
  g_object_set (sink, "port", port, NULL);
  gst_object_unref (sink);


  pay = gst_bin_get_by_name (GST_BIN (pipeline), "pay");
  ts_fail_unless (pay != NULL);
  pad = gst_element_get_static_pad (pay, "src");
  ts_fail_unless (pad != NULL);
  gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER,
      drop_theora_config, NULL, NULL);
  g_signal_connect (pad, "notify::caps", G_CALLBACK (caps_changed), stream);
  caps_changed (pad, NULL, stream);
  gst_object_unref (pad);
  gst_object_unref (pay);


  gst_element_set_state (pipeline, GST_STATE_PLAYING);


  g_mutex_lock (&count_mutex);
  while (buffer_count < BUFFER_COUNT)
    g_cond_wait (&count_cond, &count_mutex);
  buffer_count = 0;
  g_mutex_unlock (&count_mutex);

  gst_element_set_state (pipeline, GST_STATE_NULL);

  src = gst_bin_get_by_name (GST_BIN (pipeline), "src");
  g_object_set (src, "num-buffers", SEND_BUFFER_COUNT, NULL);
  gst_object_unref (src);

  gst_element_set_state (pipeline, GST_STATE_PLAYING);

  g_mutex_lock (&count_mutex);
  while (buffer_count < BUFFER_COUNT)
    g_cond_wait (&count_cond, &count_mutex);
  buffer_count = 0;
  g_mutex_unlock (&count_mutex);

  gst_element_set_state (pipeline, GST_STATE_NULL);

  bus = gst_element_get_bus (fspipeline);
  msg = gst_bus_pop_filtered (bus, GST_MESSAGE_ERROR);
  if (msg)
  {
    GError *error;
    gchar *debug;

    gst_message_parse_error (msg, &error, &debug);

    ts_fail ("Got an error on the BUS (%d): %s (%s)", error->code,
        error->message, debug);
    g_error_free (error);
    g_free (debug);
    gst_message_unref (msg);
  }
  gst_object_unref (bus);


  gst_object_unref (pipeline);
  gst_object_unref (participant);
  gst_object_unref (stream);
  gst_object_unref (session);

  gst_element_set_state (fspipeline, GST_STATE_NULL);

  gst_object_unref (fspipeline);

  g_mutex_clear (&count_mutex);
  g_cond_clear (&count_cond);
}
GST_END_TEST;


static Suite *
fsrtprecvcodecs_suite (void)
{
  Suite *s = suite_create ("fsrtprecvcodecs");
  TCase *tc_chain;
  GLogLevelFlags fatal_mask;

  fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
  fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
  g_log_set_always_fatal (fatal_mask);

  tc_chain = tcase_create ("fsrtprecv_inband_config_data");
  tcase_add_test (tc_chain, test_rtprecv_inband_config_data);
  suite_add_tcase (s, tc_chain);

  return s;
}

GST_CHECK_MAIN (fsrtprecvcodecs);
farstream-0.2.7/tests/check/rtp/conference.c0000664000076400007640000012760512461773672015770 00000000000000/* Farstream unit tests for FsRtpConference
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 

#include 
#include 
#include 

#include "check-threadsafe.h"

#include "generic.h"
#include "testutils.h"

static struct SimpleTestStream *
find_pointback_stream (
    struct SimpleTestConference *dat,
    struct SimpleTestConference *target);


struct SimpleTestConference **dats;
GMainLoop *loop;
int count = 0;

// Options
gboolean select_last_codec = FALSE;
gboolean reset_to_last_codec = FALSE;
gboolean no_rtcp = FALSE;

#define WAITING_ON_LAST_CODEC   (1<<0)
#define SHOULD_BE_LAST_CODEC    (1<<1)
#define HAS_BEEN_RESET          (1<<2)

gint max_buffer_count = 20;

guint max_src_pads = 1;

GMutex testlock;

#define TEST_LOCK()   g_mutex_lock (&testlock)
#define TEST_UNLOCK() g_mutex_unlock (&testlock)


GST_START_TEST (test_rtpconference_new)
{
  struct SimpleTestConference *dat = NULL;
  struct SimpleTestStream *st = NULL;
  guint id = 999;
  GList *codecs = NULL;
  FsMediaType media_type;
  GstPad *sinkpad = NULL;
  gchar *str = NULL;
  GstElement *conf = NULL;
  FsSession *sess = NULL;
  FsParticipant *part = NULL;
  FsStreamDirection dir;
  GstStructure *s;

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");
  st = simple_conference_add_stream (dat, dat, "rawudp", 0, NULL);

  g_object_get (dat->conference, "sdes", &s, NULL);
  ts_fail_unless (gst_structure_get_string (s, "cname") &&
      !strcmp (gst_structure_get_string (s, "cname"),
          "bob@127.0.0.1"), "Conference CNAME is wrong");
  gst_structure_free (s);

  g_object_get (st->participant, "cname", &str, NULL);
  ts_fail_unless (str == NULL);

  g_object_set (st->participant, "cname", "bob@127.0.0.1", NULL);
  g_object_get (st->participant, "cname", &str, NULL);
  ts_fail_unless (!strcmp (str, "bob@127.0.0.1"), "Participant CNAME is wrong");
  g_free (str);

  g_object_get (dat->session,
      "id", &id,
      "codecs", &codecs,
      "media-type", &media_type,
      "sink-pad", &sinkpad,
      "conference", &conf,
      NULL);

  ts_fail_unless (id == 1, "The id of the first session should be 1 not %d",
      id);
  ts_fail_if (codecs == NULL, "Codecs should not be NULL");
  fs_codec_list_destroy (codecs);
  ts_fail_unless (media_type == FS_MEDIA_TYPE_AUDIO, "Media type isnt audio,"
      " its %d", media_type);
  ts_fail_if (sinkpad == NULL, "Sink pad should not be null");
  str = g_strdup_printf ("sink_%d", id);
  ts_fail_unless (!strcmp (str, GST_OBJECT_NAME (sinkpad)), "Sink pad is %s"
      " instead of being %d", GST_OBJECT_NAME (sinkpad), str);
  gst_object_unref (sinkpad);
  g_free (str);
  ts_fail_unless (conf == dat->conference, "Conference pointer from the session"
      " is wrong");
  gst_object_unref (conf);


  g_object_get (st->stream,
      "participant", &part,
      "session", &sess,
      "direction", &dir,
      NULL);
  ts_fail_unless (part == st->participant, "The stream does not have the right"
      " participant");
  g_object_unref (part);
  ts_fail_unless (sess == dat->session, "The stream does not have the right"
      " session");
  g_object_unref (sess);
  ts_fail_unless (dir == FS_DIRECTION_BOTH, "The direction is not both");

  ts_fail_unless (count_stream_pads (st->stream) == 0);
  g_object_set (st->stream, "direction", FS_DIRECTION_NONE, NULL);
  g_object_get (st->stream, "direction", &dir, NULL);
  ts_fail_unless (dir == FS_DIRECTION_NONE, "The direction is not both");

  cleanup_simple_conference (dat);
}
GST_END_TEST;


static void
_new_local_candidate (FsStream *stream, FsCandidate *candidate)
{
  struct SimpleTestStream *st = g_object_get_data (G_OBJECT (stream),
      "SimpleTestStream");
  gboolean ret;
  GError *error = NULL;
  struct SimpleTestStream *other_st;
  GList *candidates = NULL;

  TEST_LOCK ();

  if (st->target == NULL)
  {
    TEST_UNLOCK ();
    return;
  }

  other_st = find_pointback_stream (st->target, st->dat);
  if (other_st->stream == NULL ||
      (candidate->component_id == FS_COMPONENT_RTCP && no_rtcp))
  {
    TEST_UNLOCK ();
    return;
  }

  st->got_candidates = TRUE;

  GST_DEBUG ("%d:%d: Setting remote candidate for component %d",
      other_st->dat->id,
      other_st->target->id,
      candidate->component_id);

  if (other_st->stream == NULL)
  {
    TEST_UNLOCK ();
    return;
  }

  candidates = g_list_prepend (NULL, candidate);
  ret = fs_stream_add_remote_candidates (other_st->stream, candidates, &error);
  if (ret == FALSE && error &&
      error->domain == FS_ERROR && error->code == FS_ERROR_NOT_IMPLEMENTED)
  {
    g_clear_error (&error);
    ret = fs_stream_force_remote_candidates (other_st->stream, candidates,
        &error);
  }
  g_list_free (candidates);

  if (error)
    ts_fail ("Error while adding candidate: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);

  ts_fail_unless (ret == TRUE, "No detailed error from add_remote_candidate");

  TEST_UNLOCK ();
}

static void
_current_send_codec_changed (FsSession *session, FsCodec *codec)
{
  struct SimpleTestConference *dat = NULL;
  FsConference *conf = NULL;
  gchar *str = NULL;

  g_object_get (session, "conference", &conf, NULL);
  dat = g_object_get_data (G_OBJECT (conf), "dat");
  gst_object_unref (conf);

  str = fs_codec_to_string (codec);
  GST_DEBUG ("%d: New send codec: %s", dat->id, str);
  g_free (str);
}

static void
_local_candidates_prepared (FsStream *stream)
{
  struct SimpleTestStream *st = g_object_get_data (G_OBJECT (stream),
      "SimpleTestStream");

  if (!st->got_candidates)
  {
    g_debug ("Skipping test because there are no candidates");
    g_main_loop_quit (loop);
  }

}


static gboolean
_bus_callback (GstBus *bus, GstMessage *message, gpointer user_data)
{
  struct SimpleTestConference *dat = user_data;

  switch (GST_MESSAGE_TYPE (message))
  {
    case GST_MESSAGE_ELEMENT:
      {
        const GstStructure *s = gst_message_get_structure (message);
        ts_fail_if (s==NULL, "NULL structure in element message");
        if (gst_structure_has_name (s, "farstream-error"))
        {
          const GValue *value;
          FsError errorno;
          const gchar *error;

          ts_fail_unless (
              gst_structure_has_field_typed (s, "src-object", G_TYPE_OBJECT),
              "farstream-error structure has no src-object field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "error-no", FS_TYPE_ERROR),
              "farstream-error structure has no src-object field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "error-msg", G_TYPE_STRING),
              "farstream-error structure has no src-object field");

          value = gst_structure_get_value (s, "error-no");
          errorno = g_value_get_enum (value);
          error = gst_structure_get_string (s, "error-msg");

          ts_fail ("Error on BUS (%d) %s", errorno, error);
        }
        else if (gst_structure_has_name (s, "farstream-new-local-candidate"))
        {
          FsStream *stream;
          FsCandidate *candidate;
          const GValue *value;

          ts_fail_unless (
              gst_structure_has_field_typed (s, "stream", FS_TYPE_STREAM),
              "farstream-new-local-candidate structure has no stream field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "candidate", FS_TYPE_CANDIDATE),
              "farstream-new-local-candidate structure has no candidate field");

          value = gst_structure_get_value (s, "stream");
          stream = g_value_get_object (value);

          value = gst_structure_get_value (s, "candidate");
          candidate = g_value_get_boxed (value);

          ts_fail_unless (stream && candidate, "new-local-candidate with NULL"
              " stream(%p) or candidate(%p)", stream, candidate);

          _new_local_candidate (stream, candidate);
        }
        else if (gst_structure_has_name (s,
                "farstream-new-active-candidate-pair"))
        {
          FsStream *stream;
          FsCandidate *local_candidate, *remote_candidate;
          const GValue *value;

          ts_fail_unless (
              gst_structure_has_field_typed (s, "stream", FS_TYPE_STREAM),
              "farstream-new-active-candidate-pair structure"
              " has no stream field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "local-candidate",
                  FS_TYPE_CANDIDATE),
              "farstream-new-active-candidate-pair structure"
              " has no local-candidate field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "remote-candidate",
                  FS_TYPE_CANDIDATE),
              "farstream-new-active-candidate-pair structure"
              " has no remote-candidate field");

          value = gst_structure_get_value (s, "stream");
          stream = g_value_get_object (value);
          value = gst_structure_get_value (s, "local-candidate");
          local_candidate = g_value_get_boxed (value);
          value = gst_structure_get_value (s, "remote-candidate");
          remote_candidate = g_value_get_boxed (value);

          ts_fail_unless (stream && local_candidate && remote_candidate,
              "new-local-candidate with NULL stream(%p)"
              " or local_candidate(%p) or remote_candidate(%p)",
              stream, local_candidate, remote_candidate);
        }
        else if (gst_structure_has_name (s,
                "farstream-current-send-codec-changed"))
        {
          FsSession *session;
          FsCodec *codec;
          const GValue *value;

          ts_fail_unless (
              gst_structure_has_field_typed (s, "session", FS_TYPE_SESSION),
              "farstream-current-send-codec-changed structure"
              " has no session field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "codec",
                  FS_TYPE_CODEC),
              "");

          value = gst_structure_get_value (s, "session");
          session = g_value_get_object (value);
          value = gst_structure_get_value (s, "codec");
          codec = g_value_get_boxed (value);

          ts_fail_unless (session && codec,
              "current-send-codec-changed with NULL session(%p) or codec(%p)",
              session, codec);

          _current_send_codec_changed (session, codec);
        }
        else if (gst_structure_has_name (s,
                "farstream-local-candidates-prepared"))
        {
          FsStream *stream;
          const GValue *value;

          ts_fail_unless (
              gst_structure_has_field_typed (s, "stream", FS_TYPE_STREAM),
              "farstream-local-candidates-prepared structure"
              " has no stream field");

          value = gst_structure_get_value (s, "stream");
          stream = g_value_get_object (value);

          _local_candidates_prepared (stream);
        }

       }
      break;
    case GST_MESSAGE_ERROR:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_error (message, &error, &debug);

        ts_fail ("Got an error on the BUS (%d): %s (%s)", error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    case GST_MESSAGE_WARNING:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_warning (message, &error, &debug);

        GST_WARNING ("%d: Got a warning on the BUS (%d): %s (%s)", dat->id,
            error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    default:
      break;
  }

  return TRUE;
}

static void
_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  struct SimpleTestStream *st = user_data;
  int i;
  gboolean stop = TRUE;
  GList *codecs = NULL;

  if (st->dat->session == NULL)
    return;

  g_object_get (st->dat->session,
      "codecs", &codecs,
      NULL);

  ts_fail_if (codecs == NULL, "Could not get codecs");

  if (st->flags & WAITING_ON_LAST_CODEC)
  {
    if (fs_codec_are_equal (
        g_list_last (codecs)->data,
        g_object_get_data (G_OBJECT (element), "codec")))
    {
      st->flags &= ~WAITING_ON_LAST_CODEC;
      st->flags |= SHOULD_BE_LAST_CODEC;
      max_buffer_count += st->buffer_count;
      GST_DEBUG ("We HAVE last codec");
    }
    else
    {
#if 0
      gchar *str = fs_codec_to_string (
          g_object_get_data (G_OBJECT (element), "codec"));
      gchar *str2 = fs_codec_to_string (g_list_last (codecs)->data);
      GST_DEBUG ("not yet the last codec, skipping (we have %s, we want %s)",
          str, str2);
      g_free (str);
      g_free (str2);
#endif
      fs_codec_list_destroy (codecs);
      return;
    }
  }


  if (select_last_codec || st->flags & SHOULD_BE_LAST_CODEC)
  {
    if (!fs_codec_are_equal (
            g_list_last (codecs)->data,
            g_object_get_data (G_OBJECT (element), "codec")))
    {
      if (!reset_to_last_codec)
        ts_fail ("The handoff handler got a buffer from the wrong codec"
            " (ie. not the last)");
      fs_codec_list_destroy (codecs);
      return;
    }
  }
  else
    ts_fail_unless (
        fs_codec_are_equal (
            g_list_first (codecs)->data,
            g_object_get_data (G_OBJECT (element), "codec")),
        "The handoff handler got a buffer from the wrong codec");

  fs_codec_list_destroy (codecs);


  st->buffer_count++;
  GST_LOG ("%d:%d: Buffer %d", st->dat->id, st->target->id, st->buffer_count);


  /*
  ts_fail_if (dat->buffer_count > max_buffer_count,
    "Too many buffers %d > max_buffer_count", dat->buffer_count);
  */

  for (i = 0; i < count && !stop ; i++)
  {
    GList *item;


    for (item = g_list_first (dats[i]->streams);
         item;
         item = g_list_next (item))
    {
      struct SimpleTestStream *st2 = item->data;

      if (st2->buffer_count < max_buffer_count)
      {
        stop = FALSE;
        break;
      }
    }
  }

  if (stop)
  {
    if (reset_to_last_codec && !(st->flags & HAS_BEEN_RESET)) {
      GError *error = NULL;
      GList *nego_codecs = NULL;
      gchar *str = NULL;

      g_object_get (st->target->session,
          "codecs", &nego_codecs,
          NULL);

      ts_fail_if (nego_codecs == NULL, "No codecs");
      ts_fail_if (g_list_length (nego_codecs) < 2, "Only one negotiated codec");

      str = fs_codec_to_string (g_list_last (nego_codecs)->data);
      GST_DEBUG ("Setting codec to: %s", str);
      g_free (str);

      ts_fail_unless (fs_session_set_send_codec (st->target->session,
              g_list_last (nego_codecs)->data, &error),
          "Could not set the send codec: %s",
          error ? error->message : "NO GError!!!");
      g_clear_error (&error);

      fs_codec_list_destroy (nego_codecs);

      st->flags |= HAS_BEEN_RESET | WAITING_ON_LAST_CODEC;

      GST_DEBUG ("RESET TO LAST CODEC");

    } else {
      g_main_loop_quit (loop);
    }
  }
}

static void
_src_pad_added (FsStream *stream, GstPad *pad, FsCodec *codec,
    gpointer user_data)
{
  struct SimpleTestStream *st = user_data;
  GstElement *fakesink = gst_element_factory_make ("fakesink", NULL);
  GstPad *fakesink_pad = NULL;
  GstPadLinkReturn ret;
  FsCodec *codeccopy = fs_codec_copy (codec);
  gchar *str = NULL;

  g_assert (fakesink);

  g_object_set (fakesink,
      "signal-handoffs", TRUE,
      "sync", TRUE,
      "async", TRUE,
      NULL);

  ts_fail_if (codec->encoding_name == NULL,
      "Got invalid codec without an encoding_name with id %u"
      " and clock_rate %u", codec->id, codec->clock_rate);

  g_object_set_data (G_OBJECT (fakesink), "codec", codeccopy);
  g_object_weak_ref (G_OBJECT (fakesink),
      (GWeakNotify) fs_codec_destroy, codeccopy);

  g_signal_connect (fakesink, "handoff", st->handoff_handler, st);

  gst_bin_add (GST_BIN (st->dat->pipeline), fakesink);

  fakesink_pad = gst_element_get_static_pad (fakesink, "sink");
  ret = gst_pad_link (pad, fakesink_pad);
  gst_object_unref (fakesink_pad);

  ts_fail_if (GST_PAD_LINK_FAILED(ret), "Could not link fakesink");

  ts_fail_if (gst_element_set_state (fakesink, GST_STATE_PLAYING) ==
      GST_STATE_CHANGE_FAILURE, "Could not set the fakesink to playing");

  str = fs_codec_to_string (codec);
  GST_DEBUG ("%d:%d: Added Fakesink for codec %s", st->dat->id, st->target->id,
           str);
  g_free (str);

  if (max_src_pads > 1)
    ts_fail_unless (count_stream_pads (stream) <= max_src_pads);
  else
    ts_fail_unless (count_stream_pads (stream) == 1);
}


static struct SimpleTestStream *
find_pointback_stream (
    struct SimpleTestConference *dat,
    struct SimpleTestConference *target)
{
  GList *item = NULL;

  for (item = g_list_first (dat->streams);
       item;
       item = g_list_next (item))
  {
    struct SimpleTestStream *st = item->data;

    if (st->target == target)
      return st;
  }

  ts_fail ("We did not find a return stream for %d in %d", target->id, dat->id);
  return NULL;
}


static void
rtpconference_connect_signals (struct SimpleTestConference *dat)
{
  GstBus *bus = NULL;

  bus = gst_element_get_bus (dat->pipeline);
  gst_bus_add_watch (bus, _bus_callback, dat);
  gst_object_unref (bus);
}


static gboolean
_start_pipeline (gpointer user_data)
{
  struct SimpleTestConference *dat = user_data;

  GST_DEBUG ("%d: Starting pipeline", dat->id);

  ts_fail_if (gst_element_set_state (dat->pipeline, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  dat->started = TRUE;

  return FALSE;
}

static gboolean
_compare_codec_lists (GList *list1, GList *list2)
{
  for (; list1 && list2;
       list1 = g_list_next (list1),
       list2 = g_list_next (list2)) {
    if (!fs_codec_are_equal (list1->data, list2->data))
      return FALSE;
  }

  if (list1 == NULL && list2 == NULL)
    return TRUE;
  else
    return FALSE;
}

static void
_negotiated_codecs_notify (GObject *object, GParamSpec *paramspec,
    gpointer user_data)
{
  struct SimpleTestConference *dat = user_data;
  FsSession *session = FS_SESSION (object);
  GList *codecs = NULL;
  GError *error = NULL;
  GList *item = NULL;

  GST_DEBUG ("%d: New negotiated codecs", dat->id);

  ts_fail_if (session != dat->session, "Got signal from the wrong object");

  g_object_get (dat->session, "codecs", &codecs, NULL);
  ts_fail_if (codecs == NULL, "Could not get the negotiated codecs");


  /* We have to find the stream from the target that points back to us */
  for (item = g_list_first (dat->streams); item; item = g_list_next (item))
  {
    struct SimpleTestStream *st = item->data;
    struct SimpleTestStream *st2 = find_pointback_stream (st->target, dat);
    GList *rcodecs2;

    GST_DEBUG ("Setting negotiated remote codecs on %d:%d from %d",st2->dat->id,
        st2->target->id, dat->id);
    if (!fs_stream_set_remote_codecs (st2->stream, codecs, &error))
    {
      if (error)
        ts_fail ("Could not set the remote codecs on stream %d:%d (%d): %s",
            st2->dat->id, st2->target->id,
            error->code,
            error->message);
      else
        ts_fail ("Could not set the remote codecs on stream %d:%d"
            " and we DID not get a GError!!",
            st2->dat->id, st2->target->id);
    }
    g_object_get (st2->stream, "remote-codecs", &rcodecs2, NULL);
    ts_fail_unless (_compare_codec_lists (rcodecs2, codecs),
        "Can not get remote codecs correctly");

    fs_codec_list_destroy (rcodecs2);

    if (select_last_codec)
      ts_fail_unless (
          fs_session_set_send_codec (st2->dat->session,
              g_list_last (codecs)->data,
              &error),
          "Error setting the send codec to the last codec: %s",
          error ? error->message : "No GError");

    g_clear_error (&error);
    break;
  }
  fs_codec_list_destroy (codecs);
}


static void
set_initial_codecs (
    struct SimpleTestConference *from,
    struct SimpleTestStream *to)
{
  GList *codecs = NULL;
  GList *filtered_codecs = NULL;
  GList *item = NULL;
  GList *rcodecs2 = NULL;
  GError *error = NULL;

  if (to->stream == NULL || from->session == NULL)
    return;

  g_object_get (from->session, "codecs", &codecs, NULL);

  ts_fail_if (codecs == NULL, "Could not get the codecs");

  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    if (codec->id == 0 || codec->id == 8)
      filtered_codecs = g_list_append (filtered_codecs, codec);
  }

  ts_fail_if (filtered_codecs == NULL, "PCMA and PCMU are not in the codecs"
      " you must install gst-plugins-good");


  GST_DEBUG ("Setting initial remote codecs on %d:%d from %d",
      to->dat->id, to->target->id,
      from->id);

  if (!fs_stream_set_remote_codecs (to->stream, filtered_codecs, &error))
  {
    if (error)
      ts_fail ("Could not set the remote codecs on stream %d:%d (%d): %s",
          to->dat->id, to->target->id,
          error->code,
          error->message);
    else
      ts_fail ("Could not set the remote codecs on stream %d"
          " and we DID not get a GError!!", to->target->id);
  }
  g_object_get (to->stream, "remote-codecs", &rcodecs2, NULL);
  ts_fail_unless (_compare_codec_lists (rcodecs2, filtered_codecs),
      "Can not get remote codecs correctly");
  fs_codec_list_destroy (rcodecs2);


  if (select_last_codec)
    ts_fail_unless (
        fs_session_set_send_codec (to->dat->session,
            g_list_last (filtered_codecs)->data,
            &error),
        "Error setting the send codec to the last codec: %s",
        error ? error->message : "No GError");
  g_clear_error (&error);

  g_list_free (filtered_codecs);
  fs_codec_list_destroy (codecs);
}

typedef void (*extra_conf_init) (struct SimpleTestConference *dat,
    guint confid);
typedef void (*extra_stream_init) (struct SimpleTestStream *st, guint confid,
    guint streamid);

static void
nway_test (int in_count, extra_conf_init extra_conf_init,
    extra_stream_init extra_stream_init, const gchar *transmitter,
    guint st_param_count, GParameter *st_params)
{
  int i, j;
  GParameter *params = NULL;


  if (!strcmp ("rawudp", transmitter))
  {
    params = g_new0 (GParameter, st_param_count+2);

    memcpy (params, st_params, st_param_count * sizeof (GParameter));

    params[st_param_count].name = "upnp-discovery";
    g_value_init (¶ms[st_param_count].value, G_TYPE_BOOLEAN);
    g_value_set_boolean (¶ms[st_param_count].value, FALSE);

    params[st_param_count+1].name = "upnp-mapping";
    g_value_init (¶ms[st_param_count+1].value, G_TYPE_BOOLEAN);
    g_value_set_boolean (¶ms[st_param_count+1].value, FALSE);

    st_param_count += 2;
    st_params = params;
  }

  count = in_count;

  loop = g_main_loop_new (NULL, FALSE);

  dats = g_new0 (struct SimpleTestConference *, count);

  for (i = 0; i < count; i++)
  {
    gchar *tmp = g_strdup_printf ("tester%d@hostname", i);
    dats[i] = setup_simple_conference (i, "fsrtpconference", tmp);
    g_free (tmp);

    g_object_set (G_OBJECT (dats[i]->session), "no-rtcp-timeout", -1, NULL);


    if (extra_conf_init)
      extra_conf_init (dats[i], i);

    rtpconference_connect_signals (dats[i]);
    g_idle_add (_start_pipeline, dats[i]);

    setup_fakesrc (dats[i]);

    if (i != 0)
      g_signal_connect (dats[i]->session, "notify::codecs",
          G_CALLBACK (_negotiated_codecs_notify), dats[i]);
  }

  TEST_LOCK ();

  for (i = 0; i < count; i++)
    for (j = 0; j < count; j++)
      if (i != j)
      {
        struct SimpleTestStream *st = NULL;

        st = simple_conference_add_stream (dats[i], dats[j], transmitter,
            st_param_count, st_params);
        st->handoff_handler = G_CALLBACK (_handoff_handler);
        g_signal_connect (st->stream, "src-pad-added",
            G_CALLBACK (_src_pad_added), st);
        if (extra_stream_init)
          extra_stream_init (st, i, j);
      }


  for (i = 1; i < count; i++)
  {
    struct SimpleTestStream *st = find_pointback_stream (dats[i], dats[0]);
    set_initial_codecs (dats[0], st);
  }

  TEST_UNLOCK ();

  g_main_loop_run (loop);

  for (i = 0; i < count; i++)
    gst_element_set_state (dats[i]->pipeline, GST_STATE_NULL);

  for (i = 0; i < count; i++)
    cleanup_simple_conference (dats[i]);

  g_free (dats);

  g_main_loop_unref (loop);

  g_free (params);
}


GST_START_TEST (test_rtpconference_two_way)
{
  nway_test (2, NULL, NULL, "rawudp", 0, NULL);
}
GST_END_TEST;


GST_START_TEST (test_rtpconference_three_way)
{
  nway_test (3, NULL, NULL, "rawudp", 0, NULL);
}
GST_END_TEST;


GST_START_TEST (test_rtpconference_ten_way)
{
  nway_test (10, NULL, NULL, "rawudp", 0, NULL);
}
GST_END_TEST;

GST_START_TEST (test_rtpconference_errors)
{
  struct SimpleTestConference *dat = NULL;
  FsParticipant *participant = NULL;
  FsStream *stream = NULL;
  GError *error = NULL;

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");

  participant = fs_conference_new_participant (FS_CONFERENCE (dat->conference),
      NULL);
  ts_fail_if (participant == NULL, "Could not create participant");

  stream = fs_session_new_stream (dat->session, participant, FS_DIRECTION_NONE,
      &error);
  ts_fail_unless (stream != NULL);

  fail_unless (fs_stream_set_transmitter (stream, "invalid-transmitter-name",
          NULL, 0, &error) == FALSE);
  ts_fail_if (error == NULL, "Error was not set");
  ts_fail_unless (error->domain == FS_ERROR &&
      error->code == FS_ERROR_CONSTRUCTION,
      "The wrong domain or code (%d) was returned", error->code);

  g_clear_error (&error);

  g_object_unref (participant);

  cleanup_simple_conference (dat);

}
GST_END_TEST;


GST_START_TEST (test_rtpconference_select_send_codec)
{
  select_last_codec = TRUE;
  max_src_pads = 2;
  nway_test (2, NULL, NULL, "rawudp", 0, NULL);
  select_last_codec = FALSE;
  max_src_pads = 1;
}
GST_END_TEST;


GST_START_TEST (test_rtpconference_select_send_codec_while_running)
{
  reset_to_last_codec = TRUE;
  max_src_pads = 2;
  nway_test (2, NULL, NULL, "rawudp", 0, NULL);
  reset_to_last_codec = FALSE;
  max_src_pads = 1;
}
GST_END_TEST;


static void
_error_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  ts_fail ("Received a buffer when we shouldn't have");
}

static void
_normal_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  struct SimpleTestStream *st = user_data;

  st->buffer_count++;

  if (st->buffer_count > 100)
    g_main_loop_quit (loop);

}

gint error_conf;

static void
_recv_only_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  if (confid == error_conf)
  {
    st->handoff_handler = G_CALLBACK (_error_handoff_handler);
  }
  else
  {
    st->handoff_handler = G_CALLBACK (_normal_handoff_handler);
    g_object_set (st->stream, "direction", FS_DIRECTION_RECV, NULL);
  }
}

GST_START_TEST (test_rtpconference_recv_only)
{
  error_conf = 0;
  nway_test (2, NULL, _recv_only_init, "rawudp", 0, NULL);
  error_conf = 1;
  nway_test (2, NULL, _recv_only_init, "rawudp", 0, NULL);
}
GST_END_TEST;


static void
_send_only_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  if (confid == error_conf)
  {
    st->handoff_handler = G_CALLBACK (_error_handoff_handler);
    g_object_set (st->stream, "direction", FS_DIRECTION_SEND, NULL);
  }
  else
  {
    st->handoff_handler = G_CALLBACK (_normal_handoff_handler);
  }
}

GST_START_TEST (test_rtpconference_send_only)
{
  error_conf = 0;
  nway_test (2, NULL, _send_only_init, "rawudp", 0, NULL);
  error_conf = 1;
  nway_test (2, NULL, _send_only_init, "rawudp", 0, NULL);
}
GST_END_TEST;

static void
_switch_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  struct SimpleTestStream *st = user_data;

  st->buffer_count++;

  if (st->buffer_count == 20)
    g_object_set (st->stream, "direction", FS_DIRECTION_SEND, NULL);

  if (st->buffer_count > 20)
    ts_fail ("Received a buffer on a stream that should have been sendonly");
}


static void
_change_to_send_only_init (struct SimpleTestStream *st, guint confid,
    guint streamid)
{
  if (confid == 0)
    st->handoff_handler = G_CALLBACK (_normal_handoff_handler);
  else
    st->handoff_handler = G_CALLBACK (_switch_handoff_handler);
}

GST_START_TEST (test_rtpconference_change_to_send_only)
{
  nway_test (2, NULL, _change_to_send_only_init, "rawudp", 0, NULL);
}
GST_END_TEST;


GST_START_TEST (test_rtpconference_no_rtcp)
{
  no_rtcp = TRUE;

  nway_test (2, NULL, NULL, "rawudp", 0, NULL);

  no_rtcp = FALSE;
}
GST_END_TEST;

/* Disabled because somehow broken */

#if 0
static void
associate_cnames_init (struct SimpleTestStream *st, guint confid,
    guint streamid)
{
  g_object_set (st->participant, "cname", st->target->cname, NULL);
}

GST_START_TEST (test_rtpconference_three_way_cname_assoc)
{
  GParameter param = {0};

  param.name = "associate-on-source";
  g_value_init (¶m.value, G_TYPE_BOOLEAN);
  g_value_set_boolean (¶m.value, FALSE);

  nway_test (3, NULL, associate_cnames_init, "rawudp", 1, ¶m);
}
GST_END_TEST;

#endif


static void
_simple_profile_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  GList *prefs = NULL;
  FsCodec *codec = NULL;
  gboolean ret;

  codec = fs_codec_new (0, "PCMU", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "farstream-send-profile",
      "audioconvert ! audioresample ! audioconvert ! mulawenc ! rtppcmupay");
  prefs = g_list_append (NULL, codec);

  ret = fs_session_set_codec_preferences (st->dat->session, prefs,
      NULL);
  ts_fail_unless (ret, "set codec prefs");

  fs_codec_list_destroy (prefs);

}


GST_START_TEST (test_rtpconference_simple_profile)
{
  nway_test (2, NULL, _simple_profile_init, "rawudp", 0, NULL);
}
GST_END_TEST;


static void
_double_codec_handoff_handler (GstElement *element, GstBuffer *buffer,
    GstPad *pad, gpointer user_data)
{
  static int buffer_count [2][2] = {{0,0},{0,0}};
  static gpointer sts[2] = {NULL, NULL};
  GstPad *peer = gst_pad_get_peer (pad);
  gchar *name;
  gint session, ssrc, pt;
  guint id = 0xFFFFFF;

  if (!(sts[0] == user_data || sts[1] == user_data))
  {
    if (!sts[0])
      sts[0] = user_data;
    else if (!sts[1])
      sts[1] = user_data;
    else
      ts_fail ("Already have two streams");
  }

  if (sts[0] == user_data)
    id = 0;
  else if (sts[1] == user_data)
    id = 1;
  else
    ts_fail ("Should not be here");

  ts_fail_if (peer == NULL);
  name = gst_pad_get_name (peer);
  ts_fail_if (name == NULL);
  gst_object_unref (peer);

  ts_fail_unless (sscanf (name, "src_%d_%d_%d", &session, &ssrc, &pt) == 3);
  g_free (name);

  if (pt == 0)
    buffer_count[0][id]++;
  else if (pt == 8)
    buffer_count[1][id]++;
  else
    ts_fail ("Wrong PT: %d", pt);

  if (buffer_count[0][0] > 20 &&
      buffer_count[0][1] > 20  &&
      buffer_count[1][0] > 20 &&
      buffer_count[1][1] > 20 )
  {
    g_main_loop_quit (loop);
  }
}

static void
_double_profile_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  GList *prefs = NULL;
  FsCodec *codec = NULL;
  gboolean ret;

  st->handoff_handler = G_CALLBACK (_double_codec_handoff_handler);

  codec = fs_codec_new (0, "PCMU", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "farstream-send-profile",
      "tee name=t "
      "t. ! audioconvert ! audioresample ! audioconvert ! mulawenc ! rtppcmupay "
      "t. ! audioconvert ! audioresample ! audioconvert ! alawenc ! rtppcmapay");
  prefs = g_list_append (NULL, codec);

  ret = fs_session_set_codec_preferences (st->dat->session, prefs, NULL);
  ts_fail_unless (ret, "set codec prefs");

  fs_codec_list_destroy (prefs);
}

GST_START_TEST (test_rtpconference_double_codec_profile)
{
  max_src_pads = 2;
  nway_test (2, NULL, _double_profile_init, "rawudp", 0, NULL);
  max_src_pads = 1;
}
GST_END_TEST;


GST_START_TEST (test_rtpconference_dispose)
{
  FsConference *conf;
  FsParticipant *part;
  FsSession *session;
  FsStream *stream;
  GError *error = NULL;

  conf = FS_CONFERENCE (gst_element_factory_make ("fsrtpconference", NULL));
  fail_if (conf == NULL);

  session = fs_conference_new_session (conf, FS_MEDIA_TYPE_AUDIO, &error);
  fail_if (session == NULL || error != NULL);

  part = fs_conference_new_participant (conf, &error);
  fail_if (part == NULL || error != NULL);

  stream = fs_session_new_stream (session, part, FS_DIRECTION_BOTH, &error);
  fail_if (stream == NULL || error != NULL);

  g_object_run_dispose (G_OBJECT (stream));

  fail_if (fs_stream_add_remote_candidates (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_stream_set_remote_codecs (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_stream_force_remote_candidates (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fs_stream_destroy (stream);
  g_object_unref (stream);

  stream = fs_session_new_stream (session, part, FS_DIRECTION_BOTH, &error);
  fail_if (stream == NULL || error != NULL);

  g_object_run_dispose (G_OBJECT (stream));

  fail_if (fs_stream_add_remote_candidates (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_stream_set_remote_codecs (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_stream_force_remote_candidates (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  g_object_run_dispose (G_OBJECT (session));

  fail_if (fs_session_start_telephony_event (session, 1, 2));
  fail_if (fs_session_stop_telephony_event (session));

  fail_if (fs_session_set_send_codec (session, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_session_set_codec_preferences (session, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fs_session_destroy (session);
  g_object_unref (session);
  g_object_unref (part);
  g_object_unref (stream);
  gst_object_unref (conf);
}
GST_END_TEST;

static void
multicast_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  GList *candidates = NULL;
  FsCandidate *cand;
  GError *error = NULL;

  cand = fs_candidate_new ("1", FS_COMPONENT_RTP,
      FS_CANDIDATE_TYPE_MULTICAST, FS_NETWORK_PROTOCOL_UDP, "224.0.0.11",
      2324);
  cand->ttl = 1;
  candidates = g_list_prepend (candidates, cand);

  cand = fs_candidate_copy (cand);
  cand->component_id = FS_COMPONENT_RTCP;
  cand->port = 2325;
  candidates = g_list_prepend (candidates, cand);


  ts_fail_unless (fs_stream_force_remote_candidates (st->stream, candidates,
          &error), "Error %s", error ? error->message : "No GError");

  fs_candidate_list_destroy (candidates);
}

#if 0

static void
multicast_cname_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  associate_cnames_init (st, confid, streamid);
  multicast_init (st, confid, streamid);
}


GST_START_TEST (test_rtpconference_multicast_three_way_cname_assoc)
{
  gchar *mcast_addr = find_multicast_capable_address ();

  if (!mcast_addr)
    return;
  g_free (mcast_addr);

  nway_test (3, NULL, multicast_cname_init, "multicast", 0, NULL);
}
GST_END_TEST;

#endif

static void
add_ssrc_cb (GObject *session, GParamSpec *pspec, FsStream *stream)
{
  guint ssrc;

  g_object_get (session, "ssrc", &ssrc, NULL);
  fs_stream_add_id (stream, ssrc);
}

static void
multicast_ssrc_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  guint ssrc;

  multicast_init (st, confid, streamid);

  g_object_get (st->target->session, "ssrc", &ssrc, NULL);
  fs_stream_add_id (st->stream, ssrc);
  g_signal_connect (st->target->session, "notify::ssrc",
      G_CALLBACK (add_ssrc_cb), st->stream);
}


GST_START_TEST (test_rtpconference_multicast_three_way_ssrc_assoc)
{
  gchar *mcast_addr = find_multicast_capable_address ();

  if (!mcast_addr)
    return;
  g_free (mcast_addr);

  max_src_pads = 3 * 2; /* x2 because of loopbacks causing fake conflicts */
  nway_test (3, NULL, multicast_ssrc_init, "multicast", 0, NULL);
  max_src_pads = 1;
}
GST_END_TEST;

#if 0
static void
min_timeout (TCase *tc_chain, guint min)
{
  const gchar *env = g_getenv("CK_DEFAULT_TIMEOUT");
  int tmp = 0;

  if (env != NULL)
    tmp = atoi(env);

  tcase_set_timeout (tc_chain, MAX (min, tmp));
}
#endif

static void unref_session_on_src_pad_added (FsStream *stream,
    GstPad *pad, FsCodec *codec, struct SimpleTestStream *st)
{
  TEST_LOCK ();

  ASSERT_CRITICAL (fs_session_destroy (st->dat->session));

  TEST_UNLOCK ();

  g_main_loop_quit (loop);
}

static void unref_session_init (struct SimpleTestStream *st, guint confid,
    guint streamid)
{
  g_signal_connect (st->stream, "src-pad-added",
      G_CALLBACK (unref_session_on_src_pad_added), st);
}

GST_START_TEST (test_rtpconference_unref_session_in_pad_added)
{
  nway_test (2, NULL, unref_session_init, "rawudp", 0, NULL);
}
GST_END_TEST;


static void
setup_srtp_sender (struct SimpleTestConference *dat, guint confid)
{
  GstBuffer *key;
  GstStructure *s, *s2 = NULL;
  GstMapInfo info;
  guint i;
  GError *error = NULL;
  gboolean ret;

  key = gst_buffer_new_allocate (NULL, 30, NULL);
  gst_buffer_map (key, &info, GST_MAP_WRITE);
  for (i = 0; i < info.size / 4; i++)
    GST_WRITE_UINT32_LE (info.data + (i * 4), g_random_int ());
  GST_WRITE_UINT32_LE (info.data + info.size - 4, g_random_int ());
  gst_buffer_unmap (key, &info);

  s = gst_structure_new ("FarstreamSRTP",
      "auth", G_TYPE_STRING, "hmac-sha1-80",
      "cipher", G_TYPE_STRING, "aes-128-icm",
      "key", GST_TYPE_BUFFER, key, NULL);
  gst_buffer_unref (key);

  ret = fs_session_set_encryption_parameters (dat->session, s, &error);
  g_assert_no_error (error);
  fail_unless (ret);

  g_object_get (dat->session, "encryption-parameters", &s2, NULL);
  fail_unless (s2 != NULL);
  fail_unless (gst_structure_is_equal (s, s2));

  gst_structure_free (s2);
  gst_structure_free (s);
}

static void
setup_srtp_receiver (struct SimpleTestStream *st, guint confid, guint streamid)
{
  GstStructure *s, *s2 = NULL;
  GError *error = NULL;
  gboolean ret;

  g_object_get (st->target->session, "encryption-parameters", &s, NULL);

  ret = fs_stream_set_decryption_parameters (st->stream, s, &error);
  g_assert_no_error (error);
  fail_unless (ret);

  g_object_get (st->stream, "decryption-parameters", &s2, NULL);
  fail_unless (s2 != NULL);
  fail_unless (gst_structure_is_equal (s, s2));

  gst_structure_free (s2);
  gst_structure_free (s);
}

GST_START_TEST (test_rtpconference_two_way_srtp)
{
  nway_test (2, setup_srtp_sender, setup_srtp_receiver, "rawudp", 0, NULL);
}
GST_END_TEST;


GST_START_TEST (test_rtpconference_three_way_srtp)
{
  nway_test (3, setup_srtp_sender, setup_srtp_receiver, "rawudp", 0, NULL);
}
GST_END_TEST;

GST_START_TEST (test_rtpconference_ten_way_srtp)
{
  nway_test (10, setup_srtp_sender, setup_srtp_receiver, "rawudp", 0, NULL);
}
GST_END_TEST;

static void
multicast_srtp_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  multicast_ssrc_init (st, confid, streamid);
  setup_srtp_receiver (st, confid, streamid);
}

GST_START_TEST (test_rtpconference_multicast_three_way_ssrc_assoc_srtp)
{
  gchar *mcast_addr = find_multicast_capable_address ();

  if (!mcast_addr)
    return;
  g_free (mcast_addr);

  max_src_pads = 3 * 2; /* x2 because of loopbacks causing fake conflicts */
  nway_test (3, setup_srtp_sender, multicast_srtp_init, "multicast", 0, NULL);
  max_src_pads = 1;
}
GST_END_TEST;

static Suite *
fsrtpconference_suite (void)
{
  Suite *s = suite_create ("fsrtpconference");
  TCase *tc_chain;

  tc_chain = tcase_create ("fsrtpconference_base");
  tcase_add_test (tc_chain, test_rtpconference_new);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_two_way");
  tcase_add_test (tc_chain, test_rtpconference_two_way);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_three_way");
  tcase_add_test (tc_chain, test_rtpconference_three_way);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_ten_way");
  tcase_add_test (tc_chain, test_rtpconference_ten_way);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_errors");
  tcase_add_test (tc_chain, test_rtpconference_errors);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_select_send_codec");
  tcase_add_test (tc_chain, test_rtpconference_select_send_codec);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_select_send_codec_while_running");
  tcase_add_test (tc_chain, test_rtpconference_select_send_codec_while_running);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_recv_only");
  tcase_add_test (tc_chain, test_rtpconference_recv_only);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_send_only");
  tcase_add_test (tc_chain, test_rtpconference_send_only);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_change_to_send_only");
  tcase_add_test (tc_chain, test_rtpconference_change_to_send_only);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_no_rtcp");
  tcase_add_test (tc_chain, test_rtpconference_no_rtcp);
  suite_add_tcase (s, tc_chain);

#if 0
  tc_chain = tcase_create ("fsrtpconference_three_way_cname_assoc");
  tcase_add_test (tc_chain, test_rtpconference_three_way_cname_assoc);
  suite_add_tcase (s, tc_chain);
#endif

  tc_chain = tcase_create ("fsrtpconference_simple_profile");
  tcase_add_test (tc_chain, test_rtpconference_simple_profile);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_double_codec_profile");
  tcase_add_test (tc_chain, test_rtpconference_double_codec_profile);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_dispose");
  tcase_add_test (tc_chain, test_rtpconference_dispose);
  suite_add_tcase (s, tc_chain);

#if 0
  tc_chain = tcase_create ("fsrtpconference_multicast_three_way_cname_assoc");
  min_timeout (tc_chain, 30);
  tcase_add_test (tc_chain, test_rtpconference_multicast_three_way_cname_assoc);
  suite_add_tcase (s, tc_chain);
#endif

  tc_chain = tcase_create ("fsrtpconference_multicast_three_way_ssrc_assoc");
  tcase_add_test (tc_chain, test_rtpconference_multicast_three_way_ssrc_assoc);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_unref_session_in_pad_added");
  tcase_add_test (tc_chain, test_rtpconference_unref_session_in_pad_added);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_two_way_srtp");
  tcase_add_test (tc_chain, test_rtpconference_two_way_srtp);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_three_way_srtp");
  tcase_add_test (tc_chain, test_rtpconference_three_way_srtp);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpconference_ten_way_srtp");
  tcase_add_test (tc_chain, test_rtpconference_ten_way_srtp);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create (
      "fsrtpconference_multicast_three_way_ssrc_assoc_srtp");
  tcase_add_test (tc_chain,
      test_rtpconference_multicast_three_way_ssrc_assoc_srtp);
  suite_add_tcase (s, tc_chain);

  return s;
}


GST_CHECK_MAIN (fsrtpconference);
farstream-0.2.7/tests/check/rtp/generic.c0000664000076400007640000001465612461773672015276 00000000000000/* Farstream generic unit tests for conferences
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
# include 
#endif


#include "generic.h"

#include 
#include 


static GstBusSyncReply
default_sync_handler (GstBus *bus, GstMessage *message, gpointer data)
{
  struct SimpleTestConference *dat = data;
  guint tos;

  /* Get the tos property which takes the session lock to
     make sure it is not held across signal emissions
   */
  if (dat->session)
    g_object_get (dat->session, "tos", &tos, NULL);

  return GST_BUS_PASS;
}

struct SimpleTestConference *
setup_simple_conference_full (
    gint id,
    gchar *conference_elem,
    gchar *cname,
    FsMediaType mediatype)
{
  struct SimpleTestConference *dat = g_new0 (struct SimpleTestConference, 1);
  GError *error = NULL;
  guint tos;
  GstBus *bus;
  GstStructure *s;

  dat->id = id;
  dat->cname = g_strdup (cname);

  dat->pipeline = gst_pipeline_new ("pipeline");
  fail_if (dat->pipeline == NULL);

  bus = gst_pipeline_get_bus (GST_PIPELINE (dat->pipeline));
  fail_if (bus == NULL);
  gst_bus_set_sync_handler (bus, default_sync_handler, dat, NULL);
  gst_object_unref (bus);

  dat->conference = gst_element_factory_make (conference_elem, NULL);
  fail_if (dat->conference == NULL, "Could not build %s", conference_elem);
  fail_unless (gst_bin_add (GST_BIN (dat->pipeline), dat->conference),
      "Could not add conference to the pipeline");

  g_object_get (dat->conference, "sdes", &s, NULL);
  gst_structure_set (s, "cname", G_TYPE_STRING, cname, NULL);
  g_object_set (dat->conference, "sdes", s, NULL);
  gst_structure_free (s);

  dat->session = fs_conference_new_session (FS_CONFERENCE (dat->conference),
      mediatype, &error);
  if (error)
    fail ("Error while creating new session (%d): %s",
        error->code, error->message);
  fail_if (dat->session == NULL, "Could not make session, but no GError!");

  g_object_set (dat->session, "tos", 2, NULL);
  g_object_get (dat->session, "tos", &tos, NULL);
  fail_unless (tos == 2);


  g_object_set_data (G_OBJECT (dat->conference), "dat", dat);

  return dat;
}


struct SimpleTestConference *
setup_simple_conference (
    gint id,
    gchar *conference_elem,
    gchar *cname)
{
  return setup_simple_conference_full (id, conference_elem, cname,
      FS_MEDIA_TYPE_AUDIO);
}

struct SimpleTestStream *
simple_conference_add_stream (
    struct SimpleTestConference *dat,
    struct SimpleTestConference *target,
    const gchar *transmitter,
    guint st_param_count,
    GParameter *st_params)
{
  struct SimpleTestStream *st = g_new0 (struct SimpleTestStream, 1);
  GError *error = NULL;

  st->dat = dat;
  st->target = target;

  st->participant = fs_conference_new_participant (
      FS_CONFERENCE (dat->conference), &error);
  if (error)
    fail ("Error while creating new participant (%d): %s",
        error->code, error->message);
  fail_if (st->participant == NULL, "Could not make participant, but no GError!");

  st->stream = fs_session_new_stream (dat->session, st->participant,
      FS_DIRECTION_BOTH, &error);
  if (error)
    fail ("Error while creating new stream (%d): %s",
        error->code, error->message);
  fail_if (st->stream == NULL, "Could not make stream, but no GError!");

  fail_unless (fs_stream_set_transmitter (st->stream, transmitter, st_params,
          st_param_count, &error));
  fail_unless (error == NULL);


  g_object_set_data (G_OBJECT (st->stream), "SimpleTestStream", st);

  dat->streams = g_list_append (dat->streams, st);

  return st;
}


static void
cleanup_simple_stream (struct SimpleTestStream *st)
{
  if (st->stream)
  {
    fs_stream_destroy (st->stream);
    g_object_unref (st->stream);
  }
  g_object_unref (st->participant);
  g_free (st);
}

void
cleanup_simple_conference (struct SimpleTestConference *dat)
{

  g_list_foreach (dat->streams, (GFunc) cleanup_simple_stream, NULL);
  g_list_free (dat->streams);

  if (dat->session)
  {
    fs_session_destroy (dat->session);
    g_object_unref (dat->session);
  }
  gst_object_unref (dat->pipeline);
  g_free (dat->cname);
  g_free (dat);
}


void
setup_fakesrc (struct SimpleTestConference *dat)
{
  GstPad *sinkpad = NULL, *srcpad = NULL;

  GST_DEBUG ("Adding fakesrc");


  g_object_get (dat->session, "sink-pad", &sinkpad, NULL);
  fail_if (sinkpad == NULL, "Could not get session sinkpad");

  dat->fakesrc = gst_element_factory_make ("audiotestsrc", NULL);
  fail_if (dat->fakesrc == NULL, "Could not make audiotestsrc");
  gst_bin_add (GST_BIN (dat->pipeline), dat->fakesrc);

  g_object_set (dat->fakesrc,
      "blocksize", 10,
      "is-live", TRUE,
      "volume", 0.3,
      NULL);

  srcpad = gst_element_get_static_pad (dat->fakesrc, "src");

  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
      "Could not link the capsfilter and the fsrtpconference");

  gst_object_unref (sinkpad);
  gst_object_unref (srcpad);

  if (dat->started)
    gst_element_set_state (dat->pipeline, GST_STATE_PLAYING);
}

static gboolean
pad_count_fold (const GValue *item, GValue *val, gpointer user_data)
{
  g_value_set_uint (val, g_value_get_uint (val) + 1);

  return TRUE;
}

guint
count_stream_pads (FsStream *stream)
{
  GstIterator *iter = fs_stream_iterate_src_pads (stream);
  guint count = 0;

  fail_if (iter == NULL);

  for (;;)
  {
    GstIteratorResult res;
    GValue val = {0};

    g_value_init (&val, G_TYPE_UINT);

    res = gst_iterator_fold (iter, pad_count_fold, &val, NULL);

    fail_if (res == GST_ITERATOR_ERROR);

    if (res != GST_ITERATOR_RESYNC)
    {
      count = g_value_get_uint (&val);
      break;
    }

    gst_iterator_resync (iter);
  }

  gst_iterator_free (iter);

  return count;
}
farstream-0.2.7/tests/check/rtp/generic.h0000664000076400007640000000412412005526064015251 00000000000000/* Farstream generic unit tests for conferences
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */


#ifndef __GENERIC_H__
#define __GENERIC_H__

#include 
#include 

struct SimpleTestConference {
  gint id;
  gchar *cname;

  GstElement *pipeline;
  GstElement *conference;
  FsSession *session;
  GstElement *fakesrc;

  gboolean started;

  GList *streams;
};


struct SimpleTestStream {
  struct SimpleTestConference *dat;
  struct SimpleTestConference *target;

  FsParticipant *participant;
  FsStream *stream;

  gint buffer_count;

  GCallback handoff_handler;

  gboolean got_candidates;

  gint flags;
};

struct SimpleTestConference *setup_simple_conference (
    gint id,
    gchar *conference_elem,
    gchar *cname);

struct SimpleTestConference *setup_simple_conference_full (
    gint id,
    gchar *conference_elem,
    gchar *cname,
    FsMediaType mediatype);


struct SimpleTestStream *simple_conference_add_stream (
    struct SimpleTestConference *dat,
    struct SimpleTestConference *target,
    const gchar *transmitter,
    guint st_param_count,
    GParameter *st_params);

void setup_fakesrc (struct SimpleTestConference *dat);

void cleanup_simple_conference (struct SimpleTestConference *dat);

guint count_stream_pads (FsStream *stream);


#endif /* __GENERIC_H__ */
farstream-0.2.7/tests/check/rtp/codecs.c0000664000076400007640000026242512461773672015121 00000000000000/* Farstream unit tests for FsRtpConferenceu
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 
#include 

#include "generic.h"

GMainLoop *loop = NULL;


GST_START_TEST (test_rtpcodecs_codec_base)
{
  struct SimpleTestConference *dat = NULL;
  GList *codecs = NULL;
  GList *codecs_without_config = NULL;
  GList *item;
  gboolean needs_ready = FALSE;

  dat = setup_simple_conference_full (1, "fsrtpconference", "bob@127.0.0.1",
      FS_MEDIA_TYPE_VIDEO);

  g_object_get (dat->session, "codecs", &codecs,
      "codecs-without-config", &codecs_without_config, NULL);

  fail_if (codecs_without_config == NULL);
  for (item = codecs_without_config; item; item = item->next)
  {
    FsCodec *codec = item->data;

    if (!g_ascii_strcasecmp (codec->encoding_name, "THEORA") ||
        !g_ascii_strcasecmp (codec->encoding_name, "H264"))
      needs_ready = TRUE;
  }

  if (!needs_ready)
    GST_DEBUG ("No Theora and no H.264, so can't test codecs readiness");

  /* make sure we're not already ready before starting the pipeline */
  fail_if (needs_ready && codecs);

  fs_codec_list_destroy (codecs);
  fs_codec_list_destroy (codecs_without_config);
  cleanup_simple_conference (dat);
}
GST_END_TEST;


void
_notify_codecs (GObject *object, GParamSpec *param, gpointer user_data)
{
  guint *value = user_data;
  *value = 1;
}

GST_START_TEST (test_rtpcodecs_codec_preferences)
{
  struct SimpleTestConference *dat = NULL;
  GList *orig_codecs = NULL, *codecs = NULL, *codecs2 = NULL, *item = NULL;
  gint has0 = FALSE, has8 = FALSE;
  gboolean local_codecs_notified = FALSE;
  GError *error = NULL;

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");

  g_object_get (dat->session, "codecs-without-config", &orig_codecs, NULL);

  fail_unless (fs_session_set_codec_preferences (dat->session, orig_codecs,
          &error), "Could not set local codecs as codec preferences");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);

  fail_unless (fs_codec_list_are_equal (orig_codecs, codecs),
      "Setting local codecs as preferences changes the list of local codecs");

  fs_codec_list_destroy (codecs);
  codecs = NULL;

  for (item = g_list_first (orig_codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    if (codec->id == 0)
      has0 = TRUE;
    else if (codec->id == 8)
      has8 = TRUE;
  }
  fail_unless (has0 && has8, "You need the PCMA and PCMU encoder and payloades"
      " from gst-plugins-good");

  codecs = g_list_append (NULL,
      fs_codec_new (
          FS_CODEC_ID_DISABLE,
          "PCMU",
          FS_MEDIA_TYPE_AUDIO,
          8000));

  {
    FsCodec *codec = fs_codec_new (
        FS_CODEC_ID_ANY,
        "PCMA",
        FS_MEDIA_TYPE_AUDIO,
        8000);
    fs_codec_add_optional_parameter (codec, "p1", "v1");
    codecs = g_list_append (codecs, codec);
  }

  g_signal_connect (dat->session, "notify::codecs",
      G_CALLBACK (_notify_codecs), &local_codecs_notified);

  fail_unless (
      fs_session_set_codec_preferences (dat->session, codecs, &error),
      "Could not set codec preferences");
  fail_unless (error == NULL, "Setting the local codecs preferences failed,"
      " but the error is still there");

  fail_unless (local_codecs_notified == TRUE, "Not notified of codec changed");
  local_codecs_notified = FALSE;

  g_object_get (dat->session, "codec-preferences", &codecs2, NULL);

  fail_unless (g_list_length (codecs2) == 2,
      "Returned list from codec-preferences is wrong length");

  fail_unless (fs_codec_are_equal (codecs->data, codecs2->data),
      "codec-preferences first element wrong");
  fail_unless (fs_codec_are_equal (codecs->next->data, codecs2->next->data),
      "codec-preferences second element wrong");

  fs_codec_list_destroy (codecs);
  fs_codec_list_destroy (codecs2);

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);

  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    fail_if (!strcmp (codec->encoding_name, "PCMU"),
        "PCMU codec was not removed as requested");

    if (!strcmp (codec->encoding_name, "PCMA"))
    {
      fail_if (codec->optional_params == NULL, "No optional params for PCMA");
      fail_unless (g_list_length (codec->optional_params) == 1,
          "Too many optional params for PCMA");
      fail_unless (
          !strcmp (((FsCodecParameter*)codec->optional_params->data)->name,
              "p1") &&
          !strcmp (((FsCodecParameter*)codec->optional_params->data)->value,
              "v1"),
          "Not the right data in optional params for PCMA");
    }
  }

  fs_codec_list_destroy (codecs);

  fail_unless (fs_session_set_codec_preferences (dat->session, NULL, &error),
      "Could not set codec-preferences");
  fail_if (error, "Error set while function succeeded?");
  fail_unless (local_codecs_notified, "We were not notified of the change"
      " in codecs");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);

  fail_unless (fs_codec_list_are_equal (codecs, orig_codecs),
      "Resetting codec-preferences failed, codec lists are not equal");

  fs_codec_list_destroy (orig_codecs);

  for (item = codecs;
       item;
       item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    codec->id = FS_CODEC_ID_DISABLE;
  }

  codecs = g_list_prepend (codecs, fs_codec_new (116, "reserve-pt",
          FS_MEDIA_TYPE_AUDIO, 0));

  fail_if (fs_session_set_codec_preferences (dat->session, codecs,
          &error),
      "Disabling all codecs did not fail");
  fail_unless (error != NULL, "The error is not set");
  fail_unless (error->domain == FS_ERROR,
      "Domain is not FS_ERROR");
  fail_unless (error->code == FS_ERROR_NO_CODECS_LEFT,
      "The error code is %d, not FS_ERROR_NO_CODECS_LEFT");

  g_clear_error (&error);

  fs_codec_list_destroy (codecs);

  cleanup_simple_conference (dat);
}
GST_END_TEST;

static gboolean session_codecs_notified = FALSE;
static gboolean stream_remote_codecs_notified = FALSE;
static gboolean stream_nego_codecs_notified = FALSE;

static void
_codecs_notify (GObject *object, GParamSpec *paramspec,
    gpointer user_data)
{
  gboolean *notified_marker = user_data;
  *notified_marker = TRUE;
}


GST_START_TEST (test_rtpcodecs_two_way_negotiation)
{
  struct SimpleTestConference *dat = NULL;
  struct SimpleTestStream *st = NULL;
  GList *codecs = NULL, *codecs2 = NULL;
  GError *error = NULL;

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");
  st = simple_conference_add_stream (dat, dat, "rawudp", 0, NULL);

  session_codecs_notified = FALSE;
  stream_remote_codecs_notified = FALSE;
  stream_nego_codecs_notified = FALSE;

  g_signal_connect (dat->session, "notify::codecs",
      G_CALLBACK (_codecs_notify), &session_codecs_notified);
  g_signal_connect (st->stream, "notify::remote-codecs",
      G_CALLBACK (_codecs_notify), &stream_remote_codecs_notified);
  g_signal_connect (st->stream, "notify::negotiated-codecs",
      G_CALLBACK (_codecs_notify), &stream_nego_codecs_notified);

  codecs = g_list_append (codecs,
      fs_codec_new (
          FS_CODEC_ID_ANY,
          "PCMU",
          FS_MEDIA_TYPE_AUDIO,
          8000));

  fail_if (fs_stream_set_remote_codecs (st->stream, codecs, &error),
      "set_remote_codecs did not reject invalid PT");

  fail_unless (error && error->code == FS_ERROR_INVALID_ARGUMENTS,
      "Did not get the right error codec");

  g_clear_error (&error);

  fail_if (session_codecs_notified);
  fail_if (stream_remote_codecs_notified);
  fail_if (stream_nego_codecs_notified);

  fs_codec_list_destroy (codecs);
  codecs = NULL;

  codecs = g_list_append (codecs,
      fs_codec_new (
          0,
          "PCMU",
          FS_MEDIA_TYPE_AUDIO,
          8000));


  fail_unless (fs_stream_set_remote_codecs (st->stream, codecs, &error),
      "Could not set remote PCMU codec");

  fail_unless (session_codecs_notified);
  fail_unless (stream_remote_codecs_notified);
  fail_unless (stream_nego_codecs_notified);

  g_object_get (dat->session, "codecs-without-config", &codecs2, NULL);
  fail_unless (g_list_length (codecs2) == 1, "Too many negotiated codecs");
  fail_unless (fs_codec_are_equal (codecs->data, codecs2->data),
      "Negotiated codec does not match remote codec");
  fs_codec_list_destroy (codecs2);

  session_codecs_notified = FALSE;
  stream_remote_codecs_notified = FALSE;
  stream_nego_codecs_notified = FALSE;

  fail_unless (fs_stream_set_remote_codecs (st->stream, codecs, &error),
      "Could not re-set remote PCMU codec");

  fail_if (session_codecs_notified);
  fail_if (stream_nego_codecs_notified);
  fail_if (stream_remote_codecs_notified);

  fs_codec_list_destroy (codecs);
  codecs = NULL;

  session_codecs_notified = FALSE;
  stream_remote_codecs_notified = FALSE;
  stream_nego_codecs_notified = FALSE;

  codecs = g_list_append (codecs,
      fs_codec_new (
          118,
          "PCMU",
          FS_MEDIA_TYPE_AUDIO,
          8000));

  fail_unless (fs_stream_set_remote_codecs (st->stream, codecs, &error),
      "Could not set remote PCMU codec with Pt 118");

  fail_unless (session_codecs_notified);
  fail_unless (stream_nego_codecs_notified);
  fail_unless (stream_remote_codecs_notified);

  g_object_get (dat->session, "codecs-without-config", &codecs2, NULL);
  fail_unless (g_list_length (codecs2) == 1, "Too many negotiated codecs");
  fail_unless (fs_codec_are_equal (codecs->data, codecs2->data),
      "Negotiated codec does not match remote codec");
  fs_codec_list_destroy (codecs2);
  codecs2 = NULL;

  session_codecs_notified = FALSE;
  stream_remote_codecs_notified = FALSE;
  stream_nego_codecs_notified = FALSE;

  fail_unless (fs_stream_set_remote_codecs (st->stream, codecs, &error),
      "Could not re-set remote PCMU codec");

  fail_if (session_codecs_notified);
  fail_if (stream_remote_codecs_notified);
  fail_if (stream_nego_codecs_notified);

  fs_codec_list_destroy (codecs);
  codecs = NULL;

  codecs = g_list_append (NULL,
      fs_codec_new (
          0,
          "PCMU",
          FS_MEDIA_TYPE_AUDIO,
          0));

  session_codecs_notified = FALSE;
  stream_remote_codecs_notified = FALSE;
  stream_nego_codecs_notified = FALSE;
  fail_unless (fs_stream_set_remote_codecs (st->stream, codecs, &error),
      "Could not set remote PCMU codec with clock rate 0");
  g_clear_error (&error);

  fail_unless (session_codecs_notified);
  fail_unless (stream_remote_codecs_notified);
  fail_unless (stream_nego_codecs_notified);

  ((FsCodec*)codecs->data)->clock_rate = 8000;

  g_object_get (dat->session, "codecs-without-config", &codecs2, NULL);
  fail_unless (g_list_length (codecs2) == 1, "Too many negotiated codecs");
  fail_unless (fs_codec_are_equal (codecs->data, codecs2->data),
      "Negotiated codec does not match remote codec");
  fs_codec_list_destroy (codecs2);

  fs_codec_list_destroy (codecs);
  codecs = NULL;

  codecs = g_list_append (codecs,
      fs_codec_new (
          0,
          "PCMU",
          FS_MEDIA_TYPE_AUDIO,
          0));

  fail_unless (fs_stream_set_remote_codecs (st->stream, codecs, &error),
      "Could not set remote PCMU codec with unknown clock-rate");

  g_object_get (dat->session, "codecs-without-config", &codecs2, NULL);
  fail_unless (g_list_length (codecs2) == 1, "Too many negotiated codecs");
  ((FsCodec*)(codecs->data))->clock_rate = 8000;
  fail_unless (fs_codec_are_equal (codecs->data, codecs2->data),
      "Negotiated codec does not match remote codec");
  fs_codec_list_destroy (codecs2);
  codecs2 = NULL;

  fs_codec_list_destroy (codecs);
  codecs = NULL;

  cleanup_simple_conference (dat);
}
GST_END_TEST;

GST_START_TEST (test_rtpcodecs_invalid_remote_codecs)
{
  struct SimpleTestConference *dat = NULL;
  struct SimpleTestStream *st = NULL;
  GList *codecs = NULL;
  GError *error = NULL;
  gboolean rv;

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");
  st = simple_conference_add_stream (dat, dat, "rawudp", 0, NULL);

  codecs = g_list_prepend (codecs,
      fs_codec_new (1, "INVALID1", FS_MEDIA_TYPE_AUDIO, 1));
  codecs = g_list_prepend (codecs,
      fs_codec_new (2, "INVALID2", FS_MEDIA_TYPE_AUDIO, 1));

  rv = fs_stream_set_remote_codecs (st->stream, codecs, &error);

  fail_unless (rv == FALSE, "Invalid codecs did not fail");
  fail_if (error == NULL, "Error not set on invalid codecs");
  fail_unless (error->domain == FS_ERROR, "Error not of domain FS_ERROR");
  fail_unless (error->code == FS_ERROR_NEGOTIATION_FAILED, "Error isn't"
      " negotiation failed, it is %d", error->code);

  g_clear_error (&error);

  fs_codec_list_destroy (codecs);

  cleanup_simple_conference (dat);
}
GST_END_TEST;


GST_START_TEST (test_rtpcodecs_reserved_pt)
{
  struct SimpleTestConference *dat = NULL;
  GList *codecs = NULL, *item = NULL;
  GList *codec_prefs = NULL;
  FsParticipant *p = NULL;
  FsStream *s = NULL;
  guint id = 96;

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;

    id = codec->id;
    if (codec->id >= 96)
      break;
  }
  fs_codec_list_destroy (codecs);

  if (!item)
  {
    GST_WARNING ("Could not find a dynamically allocated codec,"
        " skipping testing of the payload-type reservation mecanism");
    goto out;
  }

  codec_prefs = g_list_prepend (NULL, fs_codec_new (id, "reserve-pt",
                                               FS_MEDIA_TYPE_AUDIO, 0));

  fail_unless (fs_session_set_codec_preferences (dat->session, codec_prefs,
          NULL), "Could not set codec preferences");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    if (codec->id == id)
      break;
  }
  fail_if (item, "Found codec with payload type %u, even though it should have"
      " been reserved", id);
  fs_codec_list_destroy (codecs);

  cleanup_simple_conference (dat);

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");

  p = fs_conference_new_participant (FS_CONFERENCE (dat->conference),  NULL);
  fail_if (p == NULL, "Could not add participant");

  s = fs_session_new_stream (dat->session, p, FS_DIRECTION_BOTH, NULL);
  fail_if (s == NULL, "Could not add stream");
  g_object_unref (p);

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);

  fail_unless (fs_stream_set_remote_codecs (s, codecs, NULL),
               "Could not set local codecs as remote codecs");

  fs_codec_list_destroy (codecs);

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    if (codec->id == id)
      break;
  }
  fs_codec_list_destroy (codecs);

  fail_if (item == NULL, "There is no pt %u in the negotiated codecs, "
      "but there was one in the local codecs", id);

  fail_unless (fs_session_set_codec_preferences (dat->session, codec_prefs,
          NULL), "Could not set codec preferences after set_remote_codecs");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    if (codec->id == id)
      break;
  }
  fail_if (item == NULL, "Codec preference was not overriden by remote codecs,"
      " could not find codec with id %d", id);
  fs_codec_list_destroy (codecs);


  fail_unless (fs_session_set_codec_preferences (dat->session, codec_prefs,
          NULL), "Could not re-set codec-preferences after set_remote_codecs");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    if (codec->id == id)
      break;
  }
  fail_if (item == NULL, "Codec preference was not overriden by remote codecs,"
     " could not find codec with id %d", id);
  fs_codec_list_destroy (codecs);

  fs_codec_list_destroy (codec_prefs);

  fs_stream_destroy (s);
 out:
  cleanup_simple_conference (dat);
}
GST_END_TEST;

static FsCodec *
check_vorbis_and_configuration (const gchar *text, GList *codecs,
    const gchar *config)
{
  GList *item = NULL;
  FsCodec *codec = NULL;

  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    codec = item->data;
    if (!g_ascii_strcasecmp ("vorbis", codec->encoding_name))
      break;
  }

  fail_if (item == NULL, "%s: Could not find Vorbis", text);

  for (item = codec->optional_params; item; item = g_list_next (item))
  {
    FsCodecParameter *param = item->data;

    if (!g_ascii_strcasecmp (param->name, "configuration"))
    {
      if (config)
        fail_if (strcmp (param->value, config),
            "%s: The value of the configuration param is not"
            " what it was set to", text);
      break;
    }
  }

  fail_if (item == NULL, "%s: The configuration parameter is not there", text);

  return codec;
}


struct ConfigDataTest {
  struct SimpleTestConference *dat;
  FsParticipant *participant;
  FsStream *stream;
  const gchar *config;
};

static void
_bus_message_element (GstBus *bus, GstMessage *message,
    struct ConfigDataTest *cd)
{
  GList *codecs = NULL;
  GList *codecs2 = NULL;
  FsCodec *codec = NULL;
  GList *item1, *item2;
  const GstStructure *s = gst_message_get_structure (message);
  FsParticipant *p2 = NULL;
  FsStream *stream2 = NULL;
  const gchar config[] = "asildksahkjewafrefenbwqgiufewaiufhwqiu"
    "enfiuewfkdnwqiucnwiufenciuawndiunfucnweciuqfiucina";
  const gchar config2[] = "sadsajdsakdjlksajdsajldsaldjsalkjdl";
  GError *error = NULL;
  gchar *discovered_config = NULL;
  FsCodecParameter *param;
  guint vorbis_id;

  if (!gst_structure_has_name (s, "farstream-codecs-changed"))
    return;

  g_object_get (cd->dat->session, "codecs", &codecs, NULL);

  /* Not ready, return */
  if (!codecs)
    return;

  codec = check_vorbis_and_configuration ("codecs before negotiation", codecs,
      NULL);
  vorbis_id = codec->id;

  param = fs_codec_get_optional_parameter (codec, "configuration", NULL);
  discovered_config = g_strdup (param->value);

  g_object_get (cd->dat->session, "codecs-without-config", &codecs2, NULL);
  fail_if (codecs2 == NULL, "Could not get codecs without config");
  for (item1 = codecs, item2 = codecs2;
       item1 && item2;
       item1 = g_list_next (item1), item2 = g_list_next (item2))
  {
    FsCodec *codec1 = item1->data;
    FsCodec *codec2 = item2->data;

    if (fs_codec_are_equal (codec1, codec2))
      continue;

    fail_unless (codec1->id == codec2->id &&
        !strcmp (codec1->encoding_name, codec2->encoding_name) &&
        codec1->media_type == codec2->media_type &&
        codec1->clock_rate == codec2->clock_rate &&
        codec1->channels == codec2->channels, "Codec from codec with and "
        "without are not equal outside of their optional params");

    fail_if (fs_codec_get_optional_parameter (codec2, "configuration", NULL),
        "Found the configuration inside a codec without config");
  }

  fail_unless (item1 == NULL && item2 == NULL, "Codecs with config and without"
      " config are not the same length");

  fs_codec_list_destroy (codecs2);
  fs_codec_list_destroy (codecs);

  if (cd->config)
  {
    g_object_get (cd->stream, "negotiated-codecs", &codecs, NULL);
    check_vorbis_and_configuration ("stream codecs before negotiation",
        codecs, cd->config);
    fs_codec_list_destroy (codecs);
  }

  /* Test without config in stream */

  codec = fs_codec_new (vorbis_id,  "VORBIS", FS_MEDIA_TYPE_AUDIO, 44100);
  codecs = g_list_prepend (NULL, codec);

  if (!fs_stream_set_remote_codecs (cd->stream, codecs, &error))
  {
    if (error)
      fail ("Could not set vorbis as remote codec on the stream: %s",
          error->message);
    else
      fail ("Could not set vorbis as remote codec on the stream"
          " WITHOUT SETTING THE GError");
  }

  fs_codec_list_destroy (codecs);

  g_object_get (cd->dat->session, "codecs", &codecs, NULL);
  fail_unless (codecs != NULL,
      "Codecs became unready after setting new remote codecs");
  check_vorbis_and_configuration ("session codecs after negotiation",
      codecs, discovered_config);
  fs_codec_list_destroy (codecs);

  /* Test with config in stream */

  codec = fs_codec_new (vorbis_id,  "VORBIS", FS_MEDIA_TYPE_AUDIO, 44100);
  fs_codec_add_optional_parameter (codec, "configuration", config);
  codecs = g_list_prepend (NULL, codec);

  if (!fs_stream_set_remote_codecs (cd->stream, codecs, &error))
  {
    if (error)
      fail ("Could not set vorbis as remote codec on the stream: %s",
          error->message);
    else
      fail ("Could not set vorbis as remote codec on the stream"
          " WITHOUT SETTING THE GError");
  }

  fs_codec_list_destroy (codecs);


  g_object_get (cd->dat->session, "codecs", &codecs, NULL);
  fail_unless (codecs != NULL,
      "Codecs became unready after setting new remote codecs");
  check_vorbis_and_configuration ("session codecs after negotiation",
      codecs, discovered_config);
  fs_codec_list_destroy (codecs);

  g_object_get (cd->stream, "negotiated-codecs", &codecs, NULL);
  check_vorbis_and_configuration ("stream codecs after negotiation",
      codecs, config);
  fs_codec_list_destroy (codecs);

  /* Add a second stream */

  p2 = fs_conference_new_participant (FS_CONFERENCE (cd->dat->conference),
      &error);
  if (!p2)
    fail ("Could not add second participant to conference %s", error->message);

  stream2 = fs_session_new_stream (cd->dat->session, p2, FS_DIRECTION_BOTH,
      NULL);

  fail_if (stream2 == NULL, "Could not second create new stream");

  /* Test with config in second stream */

  codec = fs_codec_new (vorbis_id, "VORBIS", FS_MEDIA_TYPE_AUDIO, 44100);
  codecs = g_list_prepend (NULL, codec);

  if (!fs_stream_set_remote_codecs (stream2, codecs, &error))
  {
    if (error)
      fail ("Could not set vorbis as remote codec on the stream: %s",
          error->message);
    else
      fail ("Could not set vorbis as remote codec on the stream"
          " WITHOUT SETTING THE GError");
  }
  fs_codec_list_destroy (codecs);

  g_object_get (cd->dat->session, "codecs", &codecs, NULL);
  fail_unless (codecs != NULL,
      "Codecs became unready after setting new remote codecs");
  check_vorbis_and_configuration ("session codecs after renegotiation",
      codecs, discovered_config);
  fs_codec_list_destroy (codecs);

  g_object_get (cd->stream, "negotiated-codecs", &codecs, NULL);
  check_vorbis_and_configuration ("stream codecs after renegotiation",
      codecs, config);
  fs_codec_list_destroy (codecs);

  /* Test without config in second stream */

  codec = fs_codec_new (vorbis_id, "VORBIS", FS_MEDIA_TYPE_AUDIO, 44100);
  fs_codec_add_optional_parameter (codec, "configuration", config2);
  codecs = g_list_prepend (NULL, codec);

  if (!fs_stream_set_remote_codecs (stream2, codecs, &error))
  {
    if (error)
      fail ("Could not set vorbis as remote codec on the stream: %s",
          error->message);
    else
      fail ("Could not set vorbis as remote codec on the stream"
          " WITHOUT SETTING THE GError");
  }
  fs_codec_list_destroy (codecs);

  g_object_get (cd->dat->session, "codecs", &codecs, NULL);
  fail_unless (codecs != NULL,
      "Codecs became unready after setting new remote codecs");
  fail_unless (codecs != NULL,
      "Codecs became unready after setting new remote codecs");
  check_vorbis_and_configuration ("session codecs after renegotiation",
      codecs, discovered_config);
  fs_codec_list_destroy (codecs);

  g_object_get (cd->stream, "negotiated-codecs", &codecs, NULL);
  check_vorbis_and_configuration ("stream codecs after renegotiation",
      codecs, config);
  fs_codec_list_destroy (codecs);

  g_object_get (stream2, "negotiated-codecs", &codecs, NULL);
  check_vorbis_and_configuration ("stream2 codecs after renegotiation",
      codecs, config2);
  fs_codec_list_destroy (codecs);


  g_object_unref (p2);
  fs_stream_destroy (stream2);
  g_object_unref (stream2);

  g_free (discovered_config);

  g_main_loop_quit (loop);
}

static void
run_test_rtpcodecs_config_data (gboolean preset_remotes)
{
  struct ConfigDataTest cd;
  GList *codecs = NULL, *item = NULL;
  GError *error = NULL;
  GstBus *bus = NULL;
  const gchar config[] = "lksajdoiwqjfd2ohqfpiuwqjofqiufhqfqw";

  memset (&cd, 0, sizeof(cd));

  loop = g_main_loop_new (NULL, FALSE);

  cd.dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");


  cd.participant = fs_conference_new_participant (
      FS_CONFERENCE (cd.dat->conference), NULL);

  fail_if (cd.participant == NULL, "Could not add participant to conference");

  cd.stream = fs_session_new_stream (cd.dat->session, cd.participant,
      FS_DIRECTION_BOTH, NULL);

  fail_if (cd.stream == NULL, "Could not create new stream");


  codecs = g_list_prepend (NULL, fs_codec_new (FS_CODEC_ID_ANY, "VORBIS",
          FS_MEDIA_TYPE_AUDIO, 44100));

  fail_unless (fs_session_set_codec_preferences (cd.dat->session, codecs,
          &error),
      "Unable to set codec preferences: %s",
      error ? error->message : "UNKNOWN");

  fs_codec_list_destroy (codecs);

  g_object_get (cd.dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    if (!g_ascii_strcasecmp ("vorbis", codec->encoding_name))
      break;

  }
  fs_codec_list_destroy (codecs);

  if (!item)
  {
    GST_WARNING ("Could not find Vorbis encoder/decoder/payloader/depayloaders,"
        " so we are skipping the config-data test");
    goto out;
  }


  g_object_get (cd.dat->session, "codecs", &codecs, NULL);
  fail_if (codecs, "Codecs are ready before the pipeline is playing,"
      " it does not try to detect vorbis codec data");
  fs_codec_list_destroy (codecs);

  if (preset_remotes)
  {
    FsCodec *codec = NULL;

    cd.config = config;
    codec = fs_codec_new (105, "VORBIS", FS_MEDIA_TYPE_AUDIO, 44100);
    fs_codec_add_optional_parameter (codec, "configuration", config);
    codecs = g_list_prepend (NULL, codec);

    if (!fs_stream_set_remote_codecs (cd.stream, codecs, &error))
    {
      if (error)
        fail ("Could not set vorbis as remote codec on the stream: %s",
            error->message);
      else
        fail ("Could not set vorbis as remote codec on the stream"
            " WITHOUT SETTING THE GError");
    }

    fs_codec_list_destroy (codecs);
  }

  g_object_get (cd.dat->session, "codecs", &codecs, NULL);
  fail_if (codecs, "Codecs are ready before the pipeline is playing,"
      " it does not try to detect vorbis codec data");
    fs_codec_list_destroy (codecs);

  setup_fakesrc (cd.dat);

  bus = gst_pipeline_get_bus (GST_PIPELINE (cd.dat->pipeline));

  gst_bus_add_signal_watch (bus);

  g_signal_connect (bus, "message::element", G_CALLBACK (_bus_message_element),
      &cd);

  fail_if (gst_element_set_state (cd.dat->pipeline, GST_STATE_PLAYING) ==
      GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  g_main_loop_run (loop);

  gst_bus_remove_signal_watch (bus);

  gst_object_unref (bus);

  fail_if (gst_element_set_state (cd.dat->pipeline, GST_STATE_NULL) ==
      GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to null");

 out:
  g_main_loop_unref (loop);

  g_object_unref (cd.participant);
  fs_stream_destroy (cd.stream);
  g_object_unref (cd.stream);

  cleanup_simple_conference (cd.dat);
}

GST_START_TEST (test_rtpcodecs_config_data)
{
  run_test_rtpcodecs_config_data (FALSE);
}
GST_END_TEST;

GST_START_TEST (test_rtpcodecs_preset_config_data)
{
  run_test_rtpcodecs_config_data (TRUE);
}
GST_END_TEST;


static void
profile_test (const gchar *send_profile, const gchar *recv_profile,
    gboolean is_valid)
{
  GstElement *conf;
  FsSession *session;
  GList *codecs;
  FsCodec *base_codec = fs_codec_new (120, "PCMA", FS_MEDIA_TYPE_AUDIO,
      8000);
  FsCodec *pref_codec = fs_codec_copy (base_codec);
  GList *prefs = g_list_append (NULL, pref_codec);
  GList *item;

  if (send_profile)
    fs_codec_add_optional_parameter (pref_codec, "farstream-send-profile",
        send_profile);
  if (recv_profile)
    fs_codec_add_optional_parameter (pref_codec, "farstream-recv-profile",
        recv_profile);

  conf = gst_element_factory_make ("fsrtpconference", NULL);
  fail_if (conf == NULL, "Could not make fsrtpconference");

  session = fs_conference_new_session (FS_CONFERENCE (conf),
      FS_MEDIA_TYPE_AUDIO, NULL);
  fail_if (session == NULL, "Could not make new session");

  fail_unless (fs_session_set_codec_preferences (session, prefs, NULL),
      "Could not set codec preferences");

  g_object_get (session, "codecs-without-config", &codecs, NULL);

  for (item = codecs; item; item = g_list_next (item))
    if (fs_codec_are_equal ((FsCodec *)item->data, base_codec))
      break;

  if (is_valid)
    fail_if (item == NULL,
        "Codec profile should be valid, but fails (%s) (%s)",
        send_profile, recv_profile);
  else
    fail_if (item != NULL,
        "Codec profile should be invalid, but succeeds (%s) (%s)",
        send_profile, recv_profile);

  fs_codec_list_destroy (codecs);

  fs_session_destroy (session);
  g_object_unref (session);
  gst_object_unref (conf);

  fs_codec_list_destroy (prefs);
  fs_codec_destroy (base_codec);
}

GST_START_TEST (test_rtpcodecs_profile)
{
  /* basic */
  profile_test (
      "audioconvert ! audioresample ! audioconvert ! alawenc ! rtppcmapay",
      "rtppcmadepay ! alawdec",
      TRUE);

  /* double send src */
  profile_test (
      "audioconvert ! audioresample ! audioconvert ! tee name=t ! alawenc ! rtppcmapay t. ! alawenc ! rtppcmapay",
      "rtppcmadepay ! alawdec",
      TRUE);

  /* double recv src */
  profile_test (
      "audioconvert ! audioresample ! audioconvert ! alawenc ! rtppcmapay",
      "rtppcmadepay ! alawdec ! tee name=t ! identity t. ! identity ",
      FALSE);

  /* no sink */
  profile_test (
      "audioconvert ! audioresample ! audioconvert ! alawenc ! rtppcmapay",
      "rtppcmadepay ! alawdec ! fakesink",
      FALSE);

  /* no src */
  profile_test (
      "audiotestsrc ! audioconvert ! audioresample ! audioconvert ! alawenc ! rtppcmapay",
      "rtppcmadepay ! alawdec",
      FALSE);

  /* double send sink */
  profile_test (
      "adder name=a ! audioconvert ! audioresample ! audioconvert ! alawenc ! rtppcmapay identity ! a. identity !a.",
      "rtppcmadepay ! alawdec",
      FALSE);

  /* double recv pipeline */
  profile_test (
      "audioconvert ! audioresample ! audioconvert ! alawenc ! rtppcmapay",
      "rtppcmadepay ! alawdec rtppcmadepay ! identity",
      FALSE);

  /* sendonly profile */
  profile_test (
      "audioconvert ! audioresample ! audioconvert ! alawenc ! rtppcmapay",
      NULL,
      FALSE);

  /* recvonly profile */
  profile_test (
      NULL,
      "rtppcmadepay ! alawdec",
      TRUE);
}
GST_END_TEST;


GST_START_TEST (test_rtpcodecs_dynamic_pt)
{
  struct SimpleTestConference *dat = NULL;
  GList *codecs = NULL, *item = NULL;
  GList *codec_prefs = NULL;
  FsCodec *codec1 = NULL, *codec2 = NULL;
  FsCodec *tmpcodec;

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;

    if (codec->id >= 96)
    {
      if (!codec1)
      {
        codec1 = fs_codec_copy (codec);
      }
      else
      {
        codec2 = fs_codec_copy (codec);
        break;
      }
    }
  }
  fs_codec_list_destroy (codecs);

  if (!codec1 || !codec2)
  {
    GST_WARNING ("Could not find two dynamically allocated codec,"
        "skipping testing of the payload-type dynamic number preferences");
    goto out;
  }

  tmpcodec = fs_codec_copy (codec2);
  tmpcodec->id = codec1->id;

  codec_prefs = g_list_prepend (NULL, tmpcodec);

  fail_unless (fs_session_set_codec_preferences (dat->session, codec_prefs,
          NULL), "Could not set codec preferences");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    if (fs_codec_are_equal (item->data, tmpcodec))
      break;
  }
  fs_codec_list_destroy (codecs);

  fs_codec_list_destroy (codec_prefs);

  fail_if (item == NULL, "Could not force codec id");

 out:
  fs_codec_destroy (codec1);
  fs_codec_destroy (codec2);
  cleanup_simple_conference (dat);

}
GST_END_TEST;

GST_START_TEST (test_rtpcodecs_ptime)
{
  struct SimpleTestConference *dat = NULL;
  GList *codecs = NULL, *item = NULL;
  FsCodec *codec = NULL;
  FsCodec *prefcodec = NULL;
  GError *error = NULL;
  FsParticipant *participant;
  FsStream *stream;
  GstBus *bus;
  GstMessage *message;

  dat = setup_simple_conference (1, "fsrtpconference", "bob@127.0.0.1");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *tmpcodec = item->data;

    if (tmpcodec->id == 0 || tmpcodec->id == 8)
    {
      if (!prefcodec)
      {
        prefcodec = fs_codec_copy (tmpcodec);
        break;
      }
    }
  }
  fs_codec_list_destroy (codecs);

  fail_unless (
      fs_codec_get_optional_parameter (prefcodec, "ptime", NULL) == NULL);
  fail_unless (
      fs_codec_get_optional_parameter (prefcodec, "maxptime", NULL) == NULL);

  codec = fs_codec_copy (prefcodec);
  fs_codec_add_optional_parameter (codec, "ptime", "10");
  fs_codec_add_optional_parameter (codec, "maxptime", "20");
  codecs = g_list_append (NULL, codec);
  fail_unless (fs_session_set_codec_preferences (dat->session, codecs, &error));
  fail_unless (error == NULL);
  fs_codec_list_destroy (codecs);
  codecs = NULL;

  g_object_get (dat->session, "current-send-codec", &codec, NULL);
  fail_unless (codec == NULL);

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  codec = codecs->data;
  fail_unless (codec->id == prefcodec->id);
  fail_unless (
      fs_codec_get_optional_parameter (codec, "ptime", "10") != NULL);
  fail_unless (
      fs_codec_get_optional_parameter (codec, "maxptime", "20") != NULL);
  fs_codec_list_destroy (codecs);

  participant = fs_conference_new_participant (
      FS_CONFERENCE (dat->conference),  NULL);
  fail_if (participant == NULL, "Could not add participant to conference");

  stream = fs_session_new_stream (dat->session, participant,
      FS_DIRECTION_BOTH, NULL);
  fail_if (stream == NULL, "Could not add stream to session");

  codecs = g_list_append (NULL, fs_codec_copy (prefcodec));
  fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error));
  fail_unless (error == NULL);
  fs_codec_list_destroy (codecs);

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  fail_unless (g_list_length (codecs) == 1);
  codec = codecs->data;
  fail_unless (codec->id == prefcodec->id);
  fail_unless (
      fs_codec_get_optional_parameter (codec, "ptime", "10") != NULL);
  fail_unless (
      fs_codec_get_optional_parameter (codec, "maxptime", "20") != NULL);
  fs_codec_list_destroy (codecs);

  fail_if (gst_element_set_state (dat->pipeline, GST_STATE_PLAYING) ==
      GST_STATE_CHANGE_FAILURE);
  dat->started = TRUE;

  setup_fakesrc (dat);

  bus = gst_pipeline_get_bus (GST_PIPELINE (dat->pipeline));

  codec = NULL;
  while ((message = gst_bus_poll (bus, GST_MESSAGE_ELEMENT, 3 * GST_SECOND)))
  {
    const GstStructure *s = gst_message_get_structure (message);

    if (gst_structure_has_name (s, "farstream-send-codec-changed"))
    {
      const GValue *val;
      val = gst_structure_get_value (s, "codec");
      codec = g_value_get_boxed (val);
      fail_unless (
          fs_codec_get_optional_parameter (prefcodec, "ptime", NULL) == NULL);
      fail_unless (
          fs_codec_get_optional_parameter (prefcodec, "maxptime", NULL) == NULL);
      gst_message_unref (message);
      break;
    }
    gst_message_unref (message);
  }
  g_assert (codec != NULL);

  codec = fs_codec_copy (prefcodec);
  fs_codec_add_optional_parameter (codec, "ptime", "30");
  fs_codec_add_optional_parameter (codec, "maxptime", "40");
  codecs = g_list_append (NULL, codec);
  fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error));
  fail_unless (error == NULL);
  fs_codec_list_destroy (codecs);

  fail_if (gst_element_set_state (dat->pipeline, GST_STATE_NULL) !=
      GST_STATE_CHANGE_SUCCESS);

  fs_codec_destroy (prefcodec);
  fs_stream_destroy (stream);
  g_object_unref (stream);
  g_object_unref (participant);
  cleanup_simple_conference (dat);
}
GST_END_TEST;


static GstBusSyncReply
drop_all_sync_handler (GstBus *bus, GstMessage *message, gpointer data)
{
  struct SimpleTestConference *dat = data;
  guint tos;

  /* Get the tos property which takes the session lock to
     make sure it is not held across signal emissions
   */
  if (dat->session)
    g_object_get (dat->session, "tos", &tos, NULL);

  gst_message_unref (message);

  return GST_BUS_DROP;
}

static void
setup_codec_tests (struct SimpleTestConference **dat,
    FsParticipant **participant, FsMediaType mediatype)
{
  GstBus *bus;

  *dat = setup_simple_conference_full (1, "fsrtpconference", "bob@127.0.0.1",
      mediatype);

  *participant = fs_conference_new_participant (
      FS_CONFERENCE ((*dat)->conference), NULL);
  fail_if (participant == NULL, "Could not add participant to conference");

  bus = gst_pipeline_get_bus (GST_PIPELINE ((*dat)->pipeline));
  fail_if (bus == NULL);
  gst_bus_set_sync_handler (bus, NULL, NULL, NULL);
  gst_bus_set_sync_handler (bus, drop_all_sync_handler, *dat, NULL);
  gst_object_unref (bus);

}

static void
cleanup_codec_tests (struct SimpleTestConference *dat,
    FsParticipant *participant)
{
  g_object_unref (participant);
  cleanup_simple_conference (dat);
}

static void
test_one_telephone_event_codec (FsSession *session, FsStream *stream,
    FsCodec *prefcodec, FsCodec *incodec, FsCodec *outcodec)
{
  GList *codecs = NULL;
  FsCodec *codec = NULL;
  GError *error = NULL;

  codecs = g_list_append (NULL, fs_codec_copy (prefcodec));
  codecs = g_list_append (codecs, incodec);
  fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error));
  fail_unless (error == NULL);
  fs_codec_list_destroy (codecs);

  g_object_get (session, "codecs-without-config", &codecs, NULL);
  if (outcodec)
  {
    fail_unless (g_list_length (codecs) == 2);
    codec = codecs->data;
    fail_unless (codec->id == prefcodec->id);
    codec = codecs->next->data;
    fail_unless (fs_codec_are_equal (codec, outcodec));
    fs_codec_destroy (outcodec);
  }
  else
  {
    fail_unless (g_list_length (codecs) == 1);
  }

  fs_codec_list_destroy (codecs);
}

GST_START_TEST (test_rtpcodecs_telephone_event_nego)
{
  struct SimpleTestConference *dat = NULL;
  GList *codecs = NULL, *item = NULL;
  FsCodec *codec = NULL;
  FsCodec *outcodec = NULL;
  FsCodec *prefcodec = NULL;
  FsParticipant *participant;
  FsStream *stream;
  gboolean has_telephone_event_codec = FALSE;

  setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_AUDIO);
  stream = fs_session_new_stream (dat->session, participant,
      FS_DIRECTION_BOTH, NULL);
  fail_if (stream == NULL, "Could not add stream to session");

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *tmpcodec = item->data;

    if (tmpcodec->id == 0 || tmpcodec->id == 8)
    {
      if (!prefcodec)
      {
        prefcodec = fs_codec_copy (tmpcodec);
      }
    } else if (!strcmp (tmpcodec->encoding_name, "telephone-event")) {
      fail_unless (
          fs_codec_get_optional_parameter (tmpcodec, "events", "0-15") != NULL);
      has_telephone_event_codec = TRUE;
    }
  }
  fs_codec_list_destroy (codecs);

  if (!has_telephone_event_codec) {
    g_debug ("telephone-event elements not detected, skipping test");
    return;
  }

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "0-15");
  outcodec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "events", "0-15");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "0,2-15");
  outcodec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "events", "0,2-15");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "0,2-15");
  outcodec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "events", "0,2-15");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "2");
  outcodec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "events", "2");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "2-3");
  outcodec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "events", "2-3");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "0,10-26,32");
  outcodec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "events", "0,10-15");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "0,10");
  outcodec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "events", "0,10");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "0,2-15-2");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      NULL);

  codec = fs_codec_new (100, "telephone-event", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "events", "0,,3");
  test_one_telephone_event_codec (dat->session, stream, prefcodec, codec,
      NULL);

  fs_codec_destroy (prefcodec);
  fs_stream_destroy (stream);
  g_object_unref (stream);
  cleanup_codec_tests (dat, participant);
}
GST_END_TEST;

#define test_one_codec(session, part, prefcodec, outprefcodec, incodec, \
    outcodec)                                                           \
  test_one_codec_internal (G_STRLOC, session, part, prefcodec,        \
      outprefcodec, incodec, outcodec)

static void
test_one_codec_internal (const gchar *addr,
    FsSession *session, FsParticipant *participant,
    FsCodec *prefcodec, FsCodec *outprefcodec,
    FsCodec *incodec, FsCodec *outcodec)
{
  GList *codecs = NULL;
  FsCodec *codec = NULL;
  GError *error = NULL;
  FsStream *stream;

  stream = fs_session_new_stream (session, participant,
      FS_DIRECTION_BOTH, NULL);
  fail_if (stream == NULL, "Could not add stream to session");

  codecs = g_list_append (NULL, prefcodec);
  fail_unless (fs_session_set_codec_preferences (session, codecs, &error),
      "%s: Could not set codec preferences", addr);
  fail_unless (error == NULL, "%s: Non-NULL error from codec prefs", addr);
  g_list_free (codecs);

  if (outprefcodec)
  {
    FsCodec *copy;

    g_object_get (session, "codecs-without-config", &codecs, NULL);
    codec = codecs->data;
    copy = fs_codec_copy (outprefcodec);
    copy->id = codec->id;
    fail_unless (fs_codec_are_equal (codec, copy),
        "%s: Codec prefs didn't give expected results: " FS_CODEC_FORMAT
        " (expected: " FS_CODEC_FORMAT ")", addr, FS_CODEC_ARGS (codec),
        FS_CODEC_ARGS (copy));
    fs_codec_destroy (copy);
    fs_codec_list_destroy (codecs);
  }

  codecs = g_list_append (NULL, incodec);
  if (outcodec)
  {
    fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error),
        "%s: Could not set remote codecs", addr);
    fail_unless (error == NULL, "%s: Non-NULL error from codec prefs", addr);
  }
  else
  {
    fail_if (fs_stream_set_remote_codecs (stream, codecs, &error),
        "%s: Could set unacceptable remote codecs", addr);
    fail_unless (error != NULL,
        "%s: Unacceptable remote codecs didnt give out a GError", addr);
    g_clear_error (&error);
  }
  fs_codec_list_destroy (codecs);

  if (outcodec)
  {
    g_object_get (session, "codecs-without-config", &codecs, NULL);
    fail_unless (g_list_length (codecs) == 1,
        "%s: Negotiation gives more than one codec", addr);
    codec = codecs->data;
    fail_unless (fs_codec_are_equal (codec, outcodec),
        "%s: Negotiation doesn't give the expected codec: " FS_CODEC_FORMAT
        " (expected: " FS_CODEC_FORMAT ")", addr, FS_CODEC_ARGS (codec),
        FS_CODEC_ARGS (outcodec));
    fs_codec_list_destroy (codecs);
    fs_codec_destroy (outcodec);
  }

  fs_stream_destroy (stream);
  g_object_unref (stream);
}


GST_START_TEST (test_rtpcodecs_nego_ilbc)
{
  struct SimpleTestConference *dat = NULL;
  FsCodec *codec = NULL;
  FsCodec *outcodec = NULL;
  FsCodec *prefcodec = NULL;
  FsCodec *outprefcodec = NULL;
  FsParticipant *participant;
  GError *error = NULL;
  GstCaps *caps;

  setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_AUDIO);

  /* First we test with  mode=20 in the prefs */

  outprefcodec = fs_codec_new (FS_CODEC_ID_ANY, "ILBC", FS_MEDIA_TYPE_AUDIO,
      8000);
  fs_codec_add_optional_parameter (outprefcodec, "mode", "20");

  prefcodec = fs_codec_copy (outprefcodec);
  fs_codec_add_optional_parameter (prefcodec, "farstream-recv-profile",
      "rtpilbcdepay ! identity");
  fs_codec_add_optional_parameter (prefcodec, "farstream-send-profile",
      "identity ! rtpilbcpay");

  caps = gst_caps_from_string ("audio/x-iLBC; audio/x-raw");
  fail_unless (fs_session_set_allowed_caps (dat->session, caps, caps, &error));
  g_assert_no_error (error);
  gst_caps_unref (caps);

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "mode", "30");
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "mode", "30");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "mode", "20");
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "mode", "20");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  /* Second we test with  mode=30 in the prefs */

  fs_codec_remove_optional_parameter (prefcodec,
      fs_codec_get_optional_parameter (prefcodec, "mode", NULL));
  fs_codec_remove_optional_parameter (outprefcodec,
      fs_codec_get_optional_parameter (outprefcodec, "mode", NULL));
  fs_codec_add_optional_parameter (prefcodec, "mode", "30");
  fs_codec_add_optional_parameter (outprefcodec, "mode", "30");

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "mode", "30");
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "mode", "30");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "mode", "20");
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "mode", "30");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  /* third with test with no mode in the prefs */
  fs_codec_remove_optional_parameter (prefcodec,
      fs_codec_get_optional_parameter (prefcodec, "mode", NULL));
  fs_codec_remove_optional_parameter (outprefcodec,
      fs_codec_get_optional_parameter (outprefcodec, "mode", NULL));

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "mode", "30");
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec, codec,
      outcodec);

  codec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "mode", "20");
  outcodec = fs_codec_new (100, "ILBC", FS_MEDIA_TYPE_AUDIO, 8000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec, codec,
      outcodec);

  fs_codec_destroy (outprefcodec);
  fs_codec_destroy (prefcodec);
  cleanup_codec_tests (dat, participant);
}
GST_END_TEST;


GST_START_TEST (test_rtpcodecs_nego_g729)
{
  struct SimpleTestConference *dat = NULL;
  FsCodec *codec = NULL;
  FsCodec *outcodec = NULL;
  FsCodec *prefcodec = NULL;
  FsCodec *outprefcodec = NULL;
  FsParticipant *participant;
  GError *error = NULL;
  GstCaps *caps;

  setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_AUDIO);


  outprefcodec = fs_codec_new (FS_CODEC_ID_ANY, "G729", FS_MEDIA_TYPE_AUDIO,
      8000);

  prefcodec = fs_codec_copy (outprefcodec);
  fs_codec_add_optional_parameter (prefcodec, "farstream-recv-profile",
      "rtpg729depay ! identity");
  fs_codec_add_optional_parameter (prefcodec, "farstream-send-profile",
      "identity ! rtpg729pay");

  caps = gst_caps_from_string ("audio/G729; audio/x-raw");
  fail_unless (fs_session_set_allowed_caps (dat->session, caps, caps, &error));
  g_assert_no_error (error);
  gst_caps_unref (caps);

  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  outcodec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  /* Lets try adding other misc params */

  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "p1", "v1");
  outcodec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "p1", "v1");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_add_optional_parameter (prefcodec, "p2", "v2");
  fs_codec_add_optional_parameter (outprefcodec, "p2", "v2");
  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  outcodec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "p2", "v2");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "p2", "v2-2");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, NULL);

  fs_codec_remove_optional_parameter (prefcodec,
      fs_codec_get_optional_parameter (prefcodec, "p2", NULL));
  fs_codec_remove_optional_parameter (outprefcodec,
      fs_codec_get_optional_parameter (outprefcodec, "p2", NULL));

  /* Now test annexb= */

  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "annexb", "yes");
  outcodec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "annexb", "no");
  outcodec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "annexb", "no");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_add_optional_parameter (prefcodec, "annexb", "no");
  fs_codec_add_optional_parameter (outprefcodec, "annexb", "no");


  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  outcodec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "annexb", "no");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "annexb", "yes");
  outcodec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "annexb", "no");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (codec, "annexb", "no");
  outcodec = fs_codec_new (18, "G729", FS_MEDIA_TYPE_AUDIO, 8000);
  fs_codec_add_optional_parameter (outcodec, "annexb", "no");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  fs_codec_destroy (outprefcodec);
  fs_codec_destroy (prefcodec);
  cleanup_codec_tests (dat, participant);
}
GST_END_TEST;


GST_START_TEST (test_rtpcodecs_nego_h261)
{
  struct SimpleTestConference *dat = NULL;
  FsCodec *codec = NULL;
  FsCodec *outcodec = NULL;
  FsCodec *prefcodec = NULL;
  FsCodec *outprefcodec = NULL;
  FsParticipant *participant;
  GError *error = NULL;
  GstCaps *caps;

  setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_VIDEO);

  outprefcodec = fs_codec_new (FS_CODEC_ID_ANY, "H261", FS_MEDIA_TYPE_VIDEO,
      90000);
  prefcodec = fs_codec_copy (outprefcodec);
  fs_codec_add_optional_parameter (prefcodec, "farstream-recv-profile",
      "identity");
  fs_codec_add_optional_parameter (prefcodec, "farstream-send-profile",
      "identity");

  caps = gst_caps_from_string ("application/x-rtp, media=(string)video,"
      " clock-rate=90000, encoding-name=H261; video/x-raw");
  fail_unless (fs_session_set_allowed_caps (dat->session, caps, caps, &error));
  g_assert_no_error (error);
  gst_caps_unref (caps);


  codec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  codec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "cif", "3");
  fs_codec_add_optional_parameter (codec, "qcif", "2");
  fs_codec_add_optional_parameter (codec, "d", "1");
  outcodec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "qcif", "2");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_add_optional_parameter (prefcodec, "d", "1");
  fs_codec_add_optional_parameter (outprefcodec, "d", "1");

  codec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "cif", "3");
  fs_codec_add_optional_parameter (codec, "qcif", "2");
  fs_codec_add_optional_parameter (codec, "d", "1");
  outcodec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "qcif", "2");
  fs_codec_add_optional_parameter (outcodec, "d", "1");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  fs_codec_add_optional_parameter (prefcodec, "cif", "3");
  fs_codec_add_optional_parameter (prefcodec, "qcif", "2");
  fs_codec_add_optional_parameter (outprefcodec, "cif", "3");
  fs_codec_add_optional_parameter (outprefcodec, "qcif", "2");


  codec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "qcif", "2");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  codec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "cif", "4");
  fs_codec_add_optional_parameter (codec, "qcif", "1");
  outcodec = fs_codec_new (31, "H261", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "cif", "4");
  fs_codec_add_optional_parameter (outcodec, "qcif", "2");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  fs_codec_destroy (outprefcodec);
  fs_codec_destroy (prefcodec);
  cleanup_codec_tests (dat, participant);
}
GST_END_TEST;


GST_START_TEST (test_rtpcodecs_nego_h263_1998)
{
  struct SimpleTestConference *dat = NULL;
  FsCodec *codec = NULL;
  FsCodec *outcodec = NULL;
  FsCodec *prefcodec = NULL;
  FsCodec *outprefcodec = NULL;
  FsParticipant *participant;
  GError *error = NULL;
  GstCaps *caps;

  setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_VIDEO);

  outprefcodec = fs_codec_new (FS_CODEC_ID_ANY, "H263-1998",
      FS_MEDIA_TYPE_VIDEO, 90000);
  prefcodec = fs_codec_copy (outprefcodec);
  fs_codec_add_optional_parameter (prefcodec, "farstream-recv-profile",
      "identity");
  fs_codec_add_optional_parameter (prefcodec, "farstream-send-profile",
      "identity");

  caps = gst_caps_from_string ("application/x-rtp, media=(string)video,"
      " clock-rate=90000, encoding-name=H263-1998; video/x-raw");
  fail_unless (fs_session_set_allowed_caps (dat->session, caps, caps, &error));
  g_assert_no_error (error);
  gst_caps_unref (caps);

  codec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "sqcif", "3");
  fs_codec_add_optional_parameter (codec, "qcif", "3");
  fs_codec_add_optional_parameter (codec, "cif", "3");
  fs_codec_add_optional_parameter (codec, "cif4", "3");
  fs_codec_add_optional_parameter (codec, "cif16", "3");
  fs_codec_add_optional_parameter (codec, "custom", "3,3,4");
  outcodec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "sqcif", "3");
  fs_codec_add_optional_parameter (outcodec, "qcif", "3");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "cif16", "3");
  fs_codec_add_optional_parameter (codec, "f", "1");
  fs_codec_add_optional_parameter (codec, "i", "1");
  fs_codec_add_optional_parameter (codec, "j", "1");
  fs_codec_add_optional_parameter (codec, "k", "1");
  fs_codec_add_optional_parameter (codec, "n", "1");
  fs_codec_add_optional_parameter (codec, "p", "1,2,3");
  fs_codec_add_optional_parameter (codec, "t", "1");
  fs_codec_add_optional_parameter (codec, "bpp", "1");
  fs_codec_add_optional_parameter (codec, "hrd", "1");
  fs_codec_add_optional_parameter (codec, "interlace", "1");
  fs_codec_add_optional_parameter (codec, "cpcf", "1,2,3,4,5,6,7,8");
  fs_codec_add_optional_parameter (codec, "par", "1,2");
  outcodec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "bpp", "1");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  fs_codec_add_optional_parameter (prefcodec, "sqcif", "3");
  fs_codec_add_optional_parameter (prefcodec, "qcif", "3");
  fs_codec_add_optional_parameter (prefcodec, "cif", "3");
  fs_codec_add_optional_parameter (prefcodec, "cif4", "3");
  fs_codec_add_optional_parameter (prefcodec, "cif16", "3");
  fs_codec_add_optional_parameter (prefcodec, "custom", "3,3,4");
  fs_codec_add_optional_parameter (outprefcodec, "sqcif", "3");
  fs_codec_add_optional_parameter (outprefcodec, "qcif", "3");
  fs_codec_add_optional_parameter (outprefcodec, "cif", "3");
  fs_codec_add_optional_parameter (outprefcodec, "cif4", "3");
  fs_codec_add_optional_parameter (outprefcodec, "cif16", "3");
  fs_codec_add_optional_parameter (outprefcodec, "custom", "3,3,4");


  codec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "sqcif", "3");
  fs_codec_add_optional_parameter (outcodec, "qcif", "3");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "sqcif", "5");
  fs_codec_add_optional_parameter (codec, "qcif", "5");
  fs_codec_add_optional_parameter (codec, "cif4", "5");
  fs_codec_add_optional_parameter (codec, "cif16", "2");
  fs_codec_add_optional_parameter (codec, "custom", "3,3,5");
  outcodec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "sqcif", "5");
  fs_codec_add_optional_parameter (outcodec, "qcif", "5");
  fs_codec_add_optional_parameter (outcodec, "cif4", "5");
  fs_codec_add_optional_parameter (outcodec, "cif16", "3");
  fs_codec_add_optional_parameter (outcodec, "custom", "3,3,5");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_add_optional_parameter (prefcodec, "f", "1");
  fs_codec_add_optional_parameter (prefcodec, "i", "1");
  fs_codec_add_optional_parameter (prefcodec, "j", "1");
  fs_codec_add_optional_parameter (prefcodec, "k", "1");
  fs_codec_add_optional_parameter (prefcodec, "n", "1");
  fs_codec_add_optional_parameter (prefcodec, "p", "1,2,3");
  fs_codec_add_optional_parameter (prefcodec, "t", "1");
  fs_codec_add_optional_parameter (prefcodec, "bpp", "1");
  fs_codec_add_optional_parameter (prefcodec, "hrd", "1");
  fs_codec_add_optional_parameter (prefcodec, "interlace", "1");
  fs_codec_add_optional_parameter (prefcodec, "cpcf", "1,2,3,4,5,6,7,8");
  fs_codec_add_optional_parameter (prefcodec, "par", "1,2");

  fs_codec_add_optional_parameter (outprefcodec, "f", "1");
  fs_codec_add_optional_parameter (outprefcodec, "i", "1");
  fs_codec_add_optional_parameter (outprefcodec, "j", "1");
  fs_codec_add_optional_parameter (outprefcodec, "k", "1");
  fs_codec_add_optional_parameter (outprefcodec, "n", "1");
  fs_codec_add_optional_parameter (outprefcodec, "p", "1,2,3");
  fs_codec_add_optional_parameter (outprefcodec, "t", "1");
  fs_codec_add_optional_parameter (outprefcodec, "bpp", "1");
  fs_codec_add_optional_parameter (outprefcodec, "hrd", "1");
  fs_codec_add_optional_parameter (outprefcodec, "interlace", "1");
  fs_codec_add_optional_parameter (outprefcodec, "cpcf", "1,2,3,4,5,6,7,8");
  fs_codec_add_optional_parameter (outprefcodec, "par", "1,2");


  codec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "cif16", "4");
  fs_codec_add_optional_parameter (codec, "cif", "5");
  fs_codec_add_optional_parameter (codec, "f", "1");
  fs_codec_add_optional_parameter (codec, "i", "1");
  fs_codec_add_optional_parameter (codec, "j", "1");
  fs_codec_add_optional_parameter (codec, "k", "1");
  fs_codec_add_optional_parameter (codec, "n", "1");
  fs_codec_add_optional_parameter (codec, "p", "1,2,3");
  fs_codec_add_optional_parameter (codec, "t", "1");
  fs_codec_add_optional_parameter (codec, "bpp", "1");
  fs_codec_add_optional_parameter (codec, "hrd", "1");
  fs_codec_add_optional_parameter (codec, "interlace", "1");
  fs_codec_add_optional_parameter (codec, "cpcf", "1,2,13,14,15,16,17,18");
  fs_codec_add_optional_parameter (codec, "par", "1,2");
  outcodec = fs_codec_new (96, "H263-1998", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "cif16", "4");
  fs_codec_add_optional_parameter (outcodec, "cif", "5");
  fs_codec_add_optional_parameter (outcodec, "f", "1");
  fs_codec_add_optional_parameter (outcodec, "i", "1");
  fs_codec_add_optional_parameter (outcodec, "j", "1");
  fs_codec_add_optional_parameter (outcodec, "k", "1");
  fs_codec_add_optional_parameter (outcodec, "n", "1");
  fs_codec_add_optional_parameter (outcodec, "p", "1,2,3");
  fs_codec_add_optional_parameter (outcodec, "t", "1");
  fs_codec_add_optional_parameter (outcodec, "bpp", "1");
  fs_codec_add_optional_parameter (outcodec, "hrd", "1");
  fs_codec_add_optional_parameter (outcodec, "interlace", "1");
  fs_codec_add_optional_parameter (outcodec, "cpcf", "1,2,13,14,15,16,17,18");
  fs_codec_add_optional_parameter (outcodec, "par", "1,2");
  fs_codec_add_optional_parameter (outcodec, "sqcif", "3");
  fs_codec_add_optional_parameter (outcodec, "qcif", "3");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  fs_codec_destroy (outprefcodec);
  fs_codec_destroy (prefcodec);
  cleanup_codec_tests (dat, participant);
}
GST_END_TEST;

GST_START_TEST (test_rtpcodecs_nego_h263_2000)
{
  struct SimpleTestConference *dat = NULL;
  FsCodec *codec = NULL;
  FsCodec *outcodec = NULL;
  FsCodec *prefcodec = NULL;
  FsCodec *outprefcodec = NULL;
  FsParticipant *participant;
  GError *error = NULL;
  GstCaps *caps;

  setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_VIDEO);

  outprefcodec = fs_codec_new (FS_CODEC_ID_ANY, "H263-2000",
      FS_MEDIA_TYPE_VIDEO, 90000);
  prefcodec = fs_codec_copy (outprefcodec);
  fs_codec_add_optional_parameter (prefcodec, "farstream-recv-profile",
      "identity");
  fs_codec_add_optional_parameter (prefcodec, "farstream-send-profile",
      "identity");


  caps = gst_caps_from_string ("application/x-rtp, media=(string)video,"
      " clock-rate=90000, encoding-name=H263-2000; video/x-raw");
  fail_unless (fs_session_set_allowed_caps (dat->session, caps, caps, &error));
  g_assert_no_error (error);
  gst_caps_unref (caps);


  codec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile", "3");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, NULL);

  codec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile", "0");
  fs_codec_add_optional_parameter (codec, "level", "50");
  outcodec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "profile", "0");
  fs_codec_add_optional_parameter (outcodec, "level", "0");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_add_optional_parameter (prefcodec, "profile", "3");
  fs_codec_add_optional_parameter (prefcodec, "level", "50");
  fs_codec_add_optional_parameter (outprefcodec, "profile", "3");
  fs_codec_add_optional_parameter (outprefcodec, "level", "50");

  codec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, NULL);

  codec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile", "3");
  fs_codec_add_optional_parameter (codec, "level", "30");
  outcodec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "profile", "3");
  fs_codec_add_optional_parameter (outcodec, "level", "30");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  fs_codec_remove_optional_parameter (prefcodec,
      fs_codec_get_optional_parameter (prefcodec, "profile", NULL));
  fs_codec_remove_optional_parameter (outprefcodec,
      fs_codec_get_optional_parameter (outprefcodec, "profile", NULL));
  fs_codec_remove_optional_parameter (prefcodec,
      fs_codec_get_optional_parameter (prefcodec, "level", NULL));
  fs_codec_remove_optional_parameter (outprefcodec,
      fs_codec_get_optional_parameter (outprefcodec, "level", NULL));

  codec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "sqcif", "3");
  fs_codec_add_optional_parameter (codec, "qcif", "3");
  fs_codec_add_optional_parameter (codec, "cif", "3");
  fs_codec_add_optional_parameter (codec, "cif4", "3");
  fs_codec_add_optional_parameter (codec, "cif16", "3");
  fs_codec_add_optional_parameter (codec, "custom", "3,3,4");
  outcodec = fs_codec_new (96, "H263-2000", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "sqcif", "3");
  fs_codec_add_optional_parameter (outcodec, "qcif", "3");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_destroy (outprefcodec);
  fs_codec_destroy (prefcodec);
  cleanup_codec_tests (dat, participant);
}
GST_END_TEST;

GST_START_TEST (test_rtpcodecs_nego_h264)
{
  struct SimpleTestConference *dat = NULL;
  FsCodec *codec = NULL;
  FsCodec *outcodec = NULL;
  FsCodec *prefcodec = NULL;
  FsCodec *outprefcodec = NULL;
  FsCodec *tmp_prefcodec, *tmp_outprefcodec;
  FsParticipant *participant;
  GError *error = NULL;
  GstCaps *caps;

  setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_VIDEO);

  outprefcodec = fs_codec_new (FS_CODEC_ID_ANY, "H264",
      FS_MEDIA_TYPE_VIDEO, 90000);
  prefcodec = fs_codec_copy (outprefcodec);
  fs_codec_add_optional_parameter (prefcodec, "farstream-recv-profile",
      "identity");
  fs_codec_add_optional_parameter (prefcodec, "farstream-send-profile",
      "identity");

  caps = gst_caps_from_string ("application/x-rtp, media=(string)video,"
      " clock-rate=90000, encoding-name=H264; video/x-raw");
  fail_unless (fs_session_set_allowed_caps (dat->session, caps, caps, &error));
  g_assert_no_error (error);
  gst_caps_unref (caps);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile-level-id",
      "42A01E");
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "deint-buf-cap", "2");
  fs_codec_add_optional_parameter (codec, "max-rcmd-nalu-size", "2");
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "deint-buf-cap", "2");
  fs_codec_add_optional_parameter (outcodec, "max-rcmd-nalu-size", "2");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_add_optional_parameter (prefcodec, "profile-level-id", "42E015");
  fs_codec_add_optional_parameter (outprefcodec, "profile-level-id", "42E015");

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile-level-id", "42E015");
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "profile-level-id", "42E015");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile-level-id", "42E010");
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "profile-level-id", "42E010");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile-level-id", "43E010");
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile-level-id", "420014");
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "profile-level-id", "42E014");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (codec, "profile-level-id", "42E015");
  fs_codec_add_optional_parameter (codec, "max-mbps", "1234");
  fs_codec_add_optional_parameter (codec, "max-fs", "1234");
  fs_codec_add_optional_parameter (codec, "max-cpb", "!234");
  fs_codec_add_optional_parameter (codec, "max-dpb", "1234");
  fs_codec_add_optional_parameter (codec, "max-br", "1234");
  fs_codec_add_optional_parameter (codec, "sprop-parameter-sets", "12dsakd");
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_optional_parameter (outcodec, "profile-level-id", "42E015");
  fs_codec_add_optional_parameter (outcodec, "max-mbps", "1234");
  fs_codec_add_optional_parameter (outcodec, "max-fs", "1234");
  fs_codec_add_optional_parameter (outcodec, "max-cpb", "!234");
  fs_codec_add_optional_parameter (outcodec, "max-dpb", "1234");
  fs_codec_add_optional_parameter (outcodec, "max-br", "1234");
  fs_codec_add_optional_parameter (outcodec, "profile-level-id", "42E015");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  /* Now test the minimum_reporting_interval property */

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  codec->minimum_reporting_interval = 3;
  outcodec->minimum_reporting_interval = 3;
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  tmp_prefcodec = fs_codec_copy (prefcodec);
  tmp_outprefcodec = fs_codec_copy (outprefcodec);
  tmp_prefcodec->minimum_reporting_interval = 3;
  tmp_outprefcodec->minimum_reporting_interval = 3;

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, tmp_prefcodec, tmp_outprefcodec,
      codec, outcodec);


  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  codec->minimum_reporting_interval = 3;
  outcodec->minimum_reporting_interval = 3;
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_destroy (tmp_prefcodec);
  fs_codec_destroy (tmp_outprefcodec);

  fs_codec_destroy (outprefcodec);
  fs_codec_destroy (prefcodec);
  cleanup_codec_tests (dat, participant);
}
GST_END_TEST;


GST_START_TEST (test_rtpcodecs_nego_feedback)
{
  struct SimpleTestConference *dat = NULL;
  FsCodec *codec = NULL;
  FsCodec *outcodec = NULL;
  FsCodec *prefcodec = NULL;
  FsCodec *outprefcodec = NULL;
  FsParticipant *participant;
  GError *error = NULL;
  GstCaps *caps;

  setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_VIDEO);

  outprefcodec = fs_codec_new (FS_CODEC_ID_ANY, "H264",
      FS_MEDIA_TYPE_VIDEO, 90000);
  prefcodec = fs_codec_copy (outprefcodec);
  fs_codec_add_optional_parameter (prefcodec, "farstream-recv-profile",
      "identity");
  fs_codec_add_optional_parameter (prefcodec, "farstream-send-profile",
      "identity");

  caps = gst_caps_from_string ("application/x-rtp, media=(string)video,"
      " clock-rate=90000, encoding-name=H264; video/x-raw");
  fail_unless (fs_session_set_allowed_caps (dat->session, caps, caps, &error));
  g_assert_no_error (error);
  gst_caps_unref (caps);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);


  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  codec->minimum_reporting_interval = 0;
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec->minimum_reporting_interval = 0;
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  codec->minimum_reporting_interval = 3;
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec->minimum_reporting_interval = 3;
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_feedback_parameter (codec, "nack", "pli", "");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_feedback_parameter (prefcodec, "nack", "pli", "");
  fs_codec_add_feedback_parameter (outprefcodec, "nack", "pli", "");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
  fs_codec_add_feedback_parameter (codec, "nack", "pli", "");
  fs_codec_add_feedback_parameter (outcodec, "nack", "pli", "");
  test_one_codec (dat->session, participant, prefcodec, outprefcodec,
      codec, outcodec);

  fs_codec_destroy (outprefcodec);
  fs_codec_destroy (prefcodec);
  cleanup_codec_tests (dat, participant);
}
GST_END_TEST;

static gboolean
compare_extensions (FsRtpHeaderExtension *ext1, FsRtpHeaderExtension *ext2)
{
  if (ext1->id == ext2->id &&
      ext1->direction == ext2->direction &&
      !strcmp (ext1->uri, ext2->uri))
    return TRUE;
  else
    return FALSE;
}

static gboolean
compare_extensions_list (GList *list1, GList *list2)
{
   for (;
        list1 && list2;
        list1 = g_list_next (list1), list2 = g_list_next (list2))
    if (!compare_extensions (list1->data, list2->data))
      return FALSE;

  if (list1 == NULL && list2 == NULL)
    return TRUE;
  else
    return FALSE;
}

GST_START_TEST (test_rtpcodecs_nego_hdrext)
{
  GstBus *bus;
  struct SimpleTestConference *dat;
  FsParticipant *participant;
  FsStream *stream;
  GList *hdrexts_prefs;
  GList *hdrexts;
  GList *hdrexts2;
  GList *codecs;

  dat = setup_simple_conference_full (1, "fsrtpconference", "bob@127.0.0.1",
      FS_MEDIA_TYPE_AUDIO);

  participant = fs_conference_new_participant (
      FS_CONFERENCE (dat->conference), NULL);
  fail_if (participant == NULL, "Could not add participant to conference");

  bus = gst_pipeline_get_bus (GST_PIPELINE (dat->pipeline));
  fail_if (bus == NULL);
  gst_bus_set_sync_handler (bus, NULL, NULL, NULL);
  gst_bus_set_sync_handler (bus, drop_all_sync_handler, dat, NULL);
  gst_object_unref (bus);


  stream = fs_session_new_stream (dat->session, participant,
      FS_DIRECTION_BOTH, NULL);
  fail_if (stream == NULL, "Could not add stream to session");

  hdrexts_prefs = g_list_prepend (NULL, fs_rtp_header_extension_new (1,
          FS_DIRECTION_BOTH, "URI"));

  g_object_get (dat->session, "rtp-header-extension-preferences", &hdrexts,
      NULL);
  fail_unless (hdrexts == NULL);
  g_object_get (dat->session, "rtp-header-extensions", &hdrexts, NULL);
  fail_unless (hdrexts == NULL);

  g_object_set (dat->session, "rtp-header-extension-preferences",
      hdrexts_prefs, NULL);
  g_object_get (dat->session, "rtp-header-extension-preferences", &hdrexts,
      NULL);
  fs_rtp_header_extension_list_destroy (hdrexts);

  g_object_get (dat->session, "codecs", &codecs, NULL);
  fail_unless (codecs != NULL);
  fail_unless (fs_stream_set_remote_codecs (stream, codecs, NULL));
  fs_codec_list_destroy (codecs);

  hdrexts2 = g_list_prepend (NULL, fs_rtp_header_extension_new (2,
          FS_DIRECTION_SEND, "URI"));
  g_object_set (stream, "rtp-header-extensions",  hdrexts2, NULL);
  g_object_get (stream, "rtp-header-extensions", &hdrexts, NULL);
  fail_unless (compare_extensions_list (hdrexts, hdrexts2));
  fs_rtp_header_extension_list_destroy (hdrexts);

  g_object_get (dat->session, "rtp-header-extensions", &hdrexts, NULL);
  fail_unless (compare_extensions_list (hdrexts, hdrexts2));
  fs_rtp_header_extension_list_destroy (hdrexts);
  fs_rtp_header_extension_list_destroy (hdrexts2);

  g_object_set (stream, "rtp-header-extensions",  hdrexts_prefs, NULL);
  g_object_get (stream, "rtp-header-extensions", &hdrexts, NULL);
  fail_unless (compare_extensions_list (hdrexts, hdrexts_prefs));
  fs_rtp_header_extension_list_destroy (hdrexts);

  g_object_get (dat->session, "rtp-header-extensions", &hdrexts, NULL);
  fail_unless (compare_extensions_list (hdrexts, hdrexts_prefs));
  fs_rtp_header_extension_list_destroy (hdrexts);


  hdrexts2 = g_list_prepend (NULL, fs_rtp_header_extension_new (1,
          FS_DIRECTION_BOTH, "URI2"));
  g_object_set (stream, "rtp-header-extensions",  hdrexts2, NULL);
  g_object_get (stream, "rtp-header-extensions", &hdrexts, NULL);
  fail_unless (compare_extensions_list (hdrexts, hdrexts2));
  fs_rtp_header_extension_list_destroy (hdrexts);
  fs_rtp_header_extension_list_destroy (hdrexts2);
  g_object_get (dat->session, "rtp-header-extensions", &hdrexts, NULL);
  fail_unless (hdrexts == NULL);

  fs_rtp_header_extension_list_destroy (hdrexts_prefs);
  fs_stream_destroy (stream);
  g_object_unref (stream);
  g_object_unref (participant);
  cleanup_simple_conference (dat);
}
GST_END_TEST;

GST_START_TEST (test_rtpcodecs_codec_need_resend)
{
  struct SimpleTestConference *dat;
  GList *list1, *list2;
  FsCodec *tmpcodec;
  GList *res;

  dat = setup_simple_conference_full (1, "fsrtpconference", "bob@127.0.0.1",
      FS_MEDIA_TYPE_AUDIO);

  tmpcodec = fs_codec_new (96, "VORBIS", FS_MEDIA_TYPE_AUDIO, 90000);
  fs_codec_add_optional_parameter (tmpcodec, "configuration", "aaa");
  list1 = g_list_prepend (NULL, tmpcodec);
  fail_unless (!fs_session_codecs_need_resend (dat->session, list1, list1));

  list2 = fs_codec_list_copy (list1);
  fail_unless (!fs_session_codecs_need_resend (dat->session, list1, list2));
  fail_unless (!fs_session_codecs_need_resend (dat->session, list2, list1));
  fs_codec_list_destroy (list2);

  tmpcodec = fs_codec_new (96, "VORBIS", FS_MEDIA_TYPE_AUDIO, 90000);
  list2 = g_list_prepend (NULL, tmpcodec);
  res = fs_session_codecs_need_resend (dat->session, list1, list2);
  fail_unless (fs_codec_list_are_equal (res, list2));
  fs_codec_list_destroy (res);
  res = fs_session_codecs_need_resend (dat->session, list2, list1);
  fail_unless (fs_codec_list_are_equal (res, list1));
  fs_codec_list_destroy (res);

  fs_codec_add_optional_parameter (tmpcodec, "configuration", "bbb");
  res = fs_session_codecs_need_resend (dat->session, list1, list2);
  fail_unless (fs_codec_list_are_equal (res, list2));
  fs_codec_list_destroy (res);
  res = fs_session_codecs_need_resend (dat->session, list2, list1);
  fail_unless (fs_codec_list_are_equal (res, list1));
  fs_codec_list_destroy (res);

  fs_codec_list_destroy (list2);
  fs_codec_list_destroy (list1);
  cleanup_simple_conference (dat);
}
GST_END_TEST;


GST_START_TEST (test_rtpcodecs_application_xdata)
{
  struct SimpleTestConference *dat;
  struct SimpleTestStream *st;
  GstCaps *caps;
  GError *error = NULL;
  GList *codecs;
  FsCodec *codec;

  dat = setup_simple_conference_full (1, "fsrtpconference", "bob@127.0.0.1",
      FS_MEDIA_TYPE_APPLICATION);

  caps = gst_caps_from_string ("application/octet-stream");
  fail_unless (fs_session_set_allowed_caps (dat->session, caps, caps, &error));
  g_assert_no_error (error);
  gst_caps_unref (caps);

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  fail_unless (g_list_length (codecs) == 1);
  codec = codecs->data;
  fail_unless_equals_string (codec->encoding_name, "X-DATA");
  fail_unless_equals_int (codec->clock_rate, 90000);

  st = simple_conference_add_stream (dat, NULL, "rawudp", 0, NULL);

  fail_unless (fs_stream_set_remote_codecs (st->stream, codecs, &error));
  g_assert_no_error (error);

  fs_codec_list_destroy (codecs);

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);
  fail_unless (g_list_length (codecs) == 1);
  codec = codecs->data;
  fail_unless_equals_string (codec->encoding_name, "X-DATA");
  fail_unless_equals_int (codec->clock_rate, 90000);
  fs_codec_list_destroy (codecs);


  cleanup_simple_conference (dat);
}
GST_END_TEST;

static Suite *
fsrtpcodecs_suite (void)
{
  Suite *s = suite_create ("fsrtpcodecs");
  TCase *tc_chain;
  GLogLevelFlags fatal_mask;

  fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
  fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
  g_log_set_always_fatal (fatal_mask);


  tc_chain = tcase_create ("fsrtpcodecs_codec_base");
  tcase_add_test (tc_chain, test_rtpcodecs_codec_base);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_codec_preferences");
  tcase_add_test (tc_chain, test_rtpcodecs_codec_preferences);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_two_way_negotiation");
  tcase_add_test (tc_chain, test_rtpcodecs_two_way_negotiation);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_invalid_remote_codecs");
  tcase_add_test (tc_chain, test_rtpcodecs_invalid_remote_codecs);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_reserved_pt");
  tcase_add_test (tc_chain, test_rtpcodecs_reserved_pt);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_config_data");
  tcase_add_test (tc_chain, test_rtpcodecs_config_data);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_preset_config_data");
  tcase_add_test (tc_chain, test_rtpcodecs_preset_config_data);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_test_codec_profile");
  tcase_add_test (tc_chain, test_rtpcodecs_profile);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_dynamic_pt");
  tcase_add_test (tc_chain, test_rtpcodecs_dynamic_pt);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_ptime");
  tcase_add_test (tc_chain, test_rtpcodecs_ptime);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_telephone_event-nego");
  tcase_add_test (tc_chain, test_rtpcodecs_telephone_event_nego);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_nego_ilbc");
  tcase_add_test (tc_chain, test_rtpcodecs_nego_ilbc);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_nego_g729");
  tcase_add_test (tc_chain, test_rtpcodecs_nego_g729);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_nego_h261");
  tcase_add_test (tc_chain, test_rtpcodecs_nego_h261);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_nego_h263_1998");
  tcase_add_test (tc_chain, test_rtpcodecs_nego_h263_1998);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_nego_h263_2000");
  tcase_add_test (tc_chain, test_rtpcodecs_nego_h263_2000);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_nego_h264");
  tcase_add_test (tc_chain, test_rtpcodecs_nego_h264);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_nego_feedback");
  tcase_add_test (tc_chain, test_rtpcodecs_nego_feedback);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_nego_hdrext");
  tcase_add_test (tc_chain, test_rtpcodecs_nego_hdrext);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_codec_need_resend");
  tcase_add_test (tc_chain, test_rtpcodecs_codec_need_resend);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpcodecs_application_xdata");
  tcase_add_test (tc_chain, test_rtpcodecs_application_xdata);
  suite_add_tcase (s, tc_chain);

  return s;
}

GST_CHECK_MAIN (fsrtpcodecs);
farstream-0.2.7/tests/check/rtp/sendcodecs.c0000664000076400007640000003747412401500475015756 00000000000000/* Farstream unit tests for FsRtpConference
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 

#include 

#include "check-threadsafe.h"
#include "generic.h"

GMainLoop *loop = NULL;

guint dtmf_id = 0;
gint digit = 0;
gboolean sending = FALSE;
gboolean received = FALSE;
gboolean ready_to_send = FALSE;
gboolean change_codec = FALSE;
gboolean filter_telephone_event = FALSE;

struct SimpleTestConference *dat = NULL;
FsStream *stream = NULL;

static gboolean
_start_pipeline (gpointer user_data)
{
  struct SimpleTestConference *dat = user_data;

  GST_DEBUG ("%d: Starting pipeline", dat->id);

  ts_fail_if (gst_element_set_state (dat->pipeline, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  dat->started = TRUE;

  return FALSE;
}

static gboolean
_bus_callback (GstBus *bus, GstMessage *message, gpointer user_data)
{
  struct SimpleTestConference *dat = user_data;

  switch (GST_MESSAGE_TYPE (message))
  {

    case GST_MESSAGE_ELEMENT:
      {
        const GstStructure *s = gst_message_get_structure (message);

        if (gst_structure_has_name (s, "farstream-error"))
        {
          const GValue *value;
          FsError errorno;
          const gchar *error;
          GEnumClass *enumclass = NULL;
          GEnumValue *enumvalue = NULL;

          ts_fail_unless (
            FS_IS_CONFERENCE (GST_MESSAGE_SRC (message)),
            "Received farstream-error from non-farstream element");

          ts_fail_unless (
              gst_structure_has_field_typed (s, "src-object", G_TYPE_OBJECT),
              "farstream-error structure has no src-object field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "error-no", FS_TYPE_ERROR),
              "farstream-error structure has no src-object field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "error-msg", G_TYPE_STRING),
              "farstream-error structure has no src-object field");

          value = gst_structure_get_value (s, "error-no");
          errorno = g_value_get_enum (value);
          error = gst_structure_get_string (s, "error-msg");

          enumclass = g_type_class_ref (FS_TYPE_ERROR);
          enumvalue = g_enum_get_value (enumclass, errorno);
          ts_fail ("Error on BUS %s (%d, %s) %s",
              enumvalue->value_name, errorno, enumvalue->value_nick,
              error);
          g_type_class_unref (enumclass);
        }
        else if (gst_structure_has_name (s, "farstream-send-codec-changed"))
        {
          FsCodec *codec = NULL;
          GList *secondary_codec_list = NULL;
          GList *item;

          ts_fail_unless (gst_structure_get ((GstStructure *) s,
                  "secondary-codecs", FS_TYPE_CODEC_LIST, &secondary_codec_list,
                  "codec", FS_TYPE_CODEC, &codec,
                  NULL));

          ts_fail_unless (codec != NULL);
          if (!filter_telephone_event)
          {
            ts_fail_unless (secondary_codec_list != NULL);

            for (item = secondary_codec_list; item; item = item->next)
            {
              FsCodec *codec = item->data;

              if (codec->clock_rate == 8000 &&
                  !g_ascii_strcasecmp ("telephone-event", codec->encoding_name))
              {
                ts_fail_unless (codec->id == dtmf_id);
                ready_to_send = TRUE;
              }
            }

            fail_unless (ready_to_send == TRUE);
          }

          fs_codec_list_destroy (secondary_codec_list);
          fs_codec_destroy (codec);
        }

      }
      break;
    case GST_MESSAGE_ERROR:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_error (message, &error, &debug);

        ts_fail ("Got an error on the BUS (%d): %s (%s)", error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    case GST_MESSAGE_WARNING:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_warning (message, &error, &debug);

        GST_WARNING ("%d: Got a warning on the BUS (%d): %s (%s)", dat->id,
            error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    default:
      break;
  }

  return TRUE;
}

static GstElement *
build_recv_pipeline (GstPadProbeCallback buffer_handler, gpointer data,
    gint *port)
{
  GstElement *pipeline;
  GstElement *src;
  GstElement *sink;
  GstPad *pad = NULL;

  pipeline = gst_pipeline_new (NULL);

  src = gst_element_factory_make ("udpsrc", NULL);
  sink = gst_element_factory_make ("fakesink", NULL);

  g_object_set (sink, "sync", FALSE, NULL);

  ts_fail_unless (pipeline && src && sink, "Could not make pipeline(%p)"
      " or src(%p) or sink(%p)", pipeline, src, sink);

  gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);

  ts_fail_unless (gst_element_link (src, sink), "Could not link udpsrc"
      " and fakesink");

  pad = gst_element_get_static_pad (sink, "sink");

  gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, buffer_handler, data,
      NULL);

  gst_object_ref (pad);

  ts_fail_if (gst_element_set_state (pipeline, GST_STATE_PLAYING) ==
      GST_STATE_CHANGE_FAILURE, "Could not start recv pipeline");

  g_object_get (G_OBJECT (src), "port", port, NULL);

  return pipeline;
}

static void
set_codecs (struct SimpleTestConference *dat, FsStream *stream)
{
  GList *codecs = NULL;
  GList *filtered_codecs = NULL;
  GList *item = NULL;
  GError *error = NULL;
  FsCodec *dtmf_codec = NULL;

  g_object_get (dat->session, "codecs-without-config", &codecs, NULL);

  ts_fail_if (codecs == NULL, "Could not get the local codecs");

  for (item = g_list_first (codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    if (codec->id == 0)
    {
      filtered_codecs = g_list_append (filtered_codecs, codec);
    }
    else if (codec->clock_rate == 8000 &&
        !g_ascii_strcasecmp (codec->encoding_name, "telephone-event"))
    {
      ts_fail_unless (dtmf_codec == NULL,
          "More than one copy of telephone-event");
      dtmf_codec = codec;
      if (!filter_telephone_event)
        filtered_codecs = g_list_append (filtered_codecs, codec);
    }
  }

  ts_fail_if (filtered_codecs == NULL, "PCMA and PCMU are not in the codecs"
      " you must install gst-plugins-good");

  ts_fail_unless (dtmf_codec != NULL);
  dtmf_codec->id = dtmf_id;

  if (!fs_stream_set_remote_codecs (stream, filtered_codecs, &error))
  {
    if (error)
      ts_fail ("Could not set the remote codecs on stream (%d): %s",
          error->code,
          error->message);
    else
      ts_fail ("Could not set the remote codecs on stream"
          " and we did NOT get a GError!!");
  }

  g_list_free (filtered_codecs);
  fs_codec_list_destroy (codecs);
}

static void
one_way (GstElement *recv_pipeline, gint port)
{
  FsParticipant *participant = NULL;
  GError *error = NULL;
  GList *candidates = NULL;
  GstBus *bus = NULL;

  dtmf_id = 105;
  digit = 0;
  sending = FALSE;
  received = FALSE;
  ready_to_send = filter_telephone_event;

  loop = g_main_loop_new (NULL, FALSE);

  dat = setup_simple_conference (1, "fsrtpconference", "tester@123445");

  bus = gst_element_get_bus (dat->pipeline);
  gst_bus_add_watch (bus, _bus_callback, dat);
  gst_object_unref (bus);

  g_idle_add (_start_pipeline, dat);

  participant = fs_conference_new_participant (
      FS_CONFERENCE (dat->conference), &error);
  if (error)
    ts_fail ("Error while creating new participant (%d): %s",
        error->code, error->message);
  ts_fail_if (dat->session == NULL,
      "Could not make participant, but no GError!");

  stream = fs_session_new_stream (dat->session, participant,
      FS_DIRECTION_SEND, &error);
  if (error)
    ts_fail ("Error while creating new stream (%d): %s",
        error->code, error->message);
  ts_fail_if (stream == NULL, "Could not make stream, but no GError!");

  fail_unless (fs_stream_set_transmitter (stream, "rawudp", NULL, 0, &error));
  fail_unless (error == NULL);

  GST_DEBUG ("port is %d", port);

  candidates = g_list_prepend (NULL,
      fs_candidate_new ("1", FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST,
          FS_NETWORK_PROTOCOL_UDP, "127.0.0.1", port));
  ts_fail_unless (fs_stream_force_remote_candidates (stream, candidates,
          &error),
      "Could not set remote candidate");
  fs_candidate_list_destroy (candidates);

  set_codecs (dat, stream);

  setup_fakesrc (dat);

  g_main_loop_run (loop);

  gst_element_set_state (dat->pipeline, GST_STATE_NULL);
  gst_element_set_state (recv_pipeline, GST_STATE_NULL);

  cleanup_simple_conference (dat);
  gst_object_unref (recv_pipeline);

  g_main_loop_unref (loop);
}


static GstPadProbeReturn
send_dmtf_buffer_handler (GstPad *pad, GstPadProbeInfo *info,
    gpointer user_data)
{
  GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
  GstBuffer *buf = GST_PAD_PROBE_INFO_BUFFER (info);
  gchar *data;

  ts_fail_unless (gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf),
    "Buffer is not valid rtp");
  if (gst_rtp_buffer_get_payload_type (&rtpbuf) != dtmf_id)
    goto out;

  data = gst_rtp_buffer_get_payload (&rtpbuf);

  /* Check if still on previous digit */
  if (data[0] < digit)
    goto out;

  GST_LOG ("Got digit %d", data[0]);

  ts_fail_if (data[0] != digit, "Not sending the right digit"
      " (sending %d, should be %d", data[0], digit);

  received = TRUE;

out:
  gst_rtp_buffer_unmap (&rtpbuf);
  return GST_PAD_PROBE_OK;
}


static gboolean
start_stop_sending_dtmf (gpointer data)
{
  GstState state;
  GstStateChangeReturn ret;

  if (!dat || !dat->pipeline || !dat->session)
    return TRUE;

  ret = gst_element_get_state (dat->pipeline, &state, NULL, 0);
  ts_fail_if (ret == GST_STATE_CHANGE_FAILURE);

  if (ret != GST_STATE_CHANGE_SUCCESS || state != GST_STATE_PLAYING)
    return TRUE;

  if (!ready_to_send)
    return TRUE;


  if (sending)
  {
    ts_fail_unless (fs_session_stop_telephony_event (dat->session),
        "Could not stop telephony event");
    sending = FALSE;
  }
  else
  {
    if (digit)
      ts_fail_unless (received == TRUE,
          "Did not receive any buffer for digit %d", digit);

    if (digit >= FS_DTMF_EVENT_D)
    {
      if (change_codec)
      {
        digit = 0;
        dtmf_id++;
        ready_to_send = FALSE;
        change_codec = FALSE;
        set_codecs (dat, stream);
        return TRUE;
      }
      else
      {
        g_main_loop_quit (loop);
        return FALSE;
      }
    }
    digit++;

    received = FALSE;
    ts_fail_unless (fs_session_start_telephony_event (dat->session,
            digit, digit),
        "Could not start telephony event");
    sending = TRUE;
  }

  return TRUE;
}

GST_START_TEST (test_senddtmf_event)
{
  gint port;
  GstElement *recv_pipeline = build_recv_pipeline (
      send_dmtf_buffer_handler, NULL, &port);

  g_timeout_add (350, start_stop_sending_dtmf, NULL);
  one_way (recv_pipeline, port);
}
GST_END_TEST;


static gboolean
dtmf_bus_watch (GstBus *bus, GstMessage *message, gpointer data)
{
  const GstStructure *s;
  int d;

  if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT)
    return TRUE;

  s = gst_message_get_structure (message);

  if (!gst_structure_has_name (s, "dtmf-event"))
    return TRUE;


  if (gst_structure_get_int (s, "number", &d)) {
    GST_LOG ("Got digit %d", d);
    if (digit == d)
      received = TRUE;
  }


  return TRUE;
}

static GstElement *
build_dtmf_sound_recv_pipeline (gint *port)
{
  GstElement *pipeline;
  GstElement *src;
  GstBus *bus;
  GError *error = NULL;

  pipeline = gst_parse_launch_full (
      "udpsrc name=src caps=\"application/x-rtp, payload=0\" !"
      " rtppcmudepay ! mulawdec ! dtmfdetect ! fakesink sync=0", NULL,
      GST_PARSE_FLAG_FATAL_ERRORS, &error);
  fail_if (pipeline == NULL);
  fail_if (error != NULL);

  bus = gst_element_get_bus (pipeline);
  gst_bus_add_watch (bus, dtmf_bus_watch, NULL);
  gst_object_unref (bus);

  ts_fail_if (gst_element_set_state (pipeline, GST_STATE_PLAYING) ==
      GST_STATE_CHANGE_FAILURE, "Could not start recv pipeline");

  src = gst_bin_get_by_name (GST_BIN (pipeline), "src");
  fail_if (src == NULL);
  g_object_get (G_OBJECT (src), "port", port, NULL);
  gst_object_unref (src);

  return pipeline;
}


GST_START_TEST (test_senddtmf_sound)
{
  gint port = 0;
  GstElement *recv_pipeline = build_dtmf_sound_recv_pipeline (&port);

  g_timeout_add (350, start_stop_sending_dtmf, NULL);
  filter_telephone_event = TRUE;
  one_way (recv_pipeline, port);
  filter_telephone_event = FALSE;
}
GST_END_TEST;


GST_START_TEST (test_senddtmf_change_auto)
{
  gint port;
  GstElement *recv_pipeline = build_recv_pipeline (
      send_dmtf_buffer_handler, NULL, &port);

  change_codec = TRUE;
  g_timeout_add (350, start_stop_sending_dtmf, NULL);
  one_way (recv_pipeline, port);
}
GST_END_TEST;

gboolean checked = FALSE;

static GstPadProbeReturn
change_ssrc_buffer_handler (GstPad *pad, GstPadProbeInfo *info,
    gpointer user_data)
{
  GstBuffer *buf = GST_PAD_PROBE_INFO_BUFFER (info);
  guint sess_ssrc;
  guint buf_ssrc;
  GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;

  ts_fail_unless (gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf));
  buf_ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
  gst_rtp_buffer_unmap (&rtpbuf);

  g_object_get (dat->session, "ssrc", &sess_ssrc, NULL);

  if (buf_ssrc == 12345)
  {
    /* Step two, set it to 6789 */
    ts_fail_unless (buf_ssrc == sess_ssrc || sess_ssrc == 6789);

    g_object_set (dat->session, "ssrc", 6789, NULL);
  }
  else if (buf_ssrc == 6789)
  {
    /* Step three, quit */
    ts_fail_unless (buf_ssrc == sess_ssrc);

    g_main_loop_quit (loop);
  }
  else
  {
    ts_fail_unless (checked || buf_ssrc == sess_ssrc);
    checked = TRUE;

    /* Step one, set the ssrc to 12345 */
    if (sess_ssrc != 12345)
      g_object_set (dat->session, "ssrc", 12345, NULL);
  }

  return GST_PAD_PROBE_OK;
}

GST_START_TEST (test_change_ssrc)
{
  gint port;
  GstElement *recv_pipeline = build_recv_pipeline (
      change_ssrc_buffer_handler, NULL, &port);

  checked = FALSE;
  one_way (recv_pipeline, port);
}
GST_END_TEST;


static Suite *
fsrtpsendcodecs_suite (void)
{
  Suite *s = suite_create ("fsrtpsendcodecs");
  TCase *tc_chain;
  GLogLevelFlags fatal_mask;

  fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
  fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
  g_log_set_always_fatal (fatal_mask);


  tc_chain = tcase_create ("fsrtpsenddtmf_event");
  tcase_add_test (tc_chain, test_senddtmf_event);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpsenddtmf_sound");
  tcase_add_test (tc_chain, test_senddtmf_sound);
  suite_add_tcase (s, tc_chain);

  /* FIXME: Skip this test cause it fails randomly due to some
   * ordering issue */
  tc_chain = tcase_create ("fsrtpsenddtmf_change_auto");
  tcase_add_test (tc_chain, test_senddtmf_change_auto);
  //suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrtpchangessrc");
  tcase_add_test (tc_chain, test_change_ssrc);
  suite_add_tcase (s, tc_chain);

  return s;
}

GST_CHECK_MAIN (fsrtpsendcodecs);
farstream-0.2.7/tests/check/check-threadsafe.h0000664000076400007640000000335012401500475016207 00000000000000/*
 * Farstream Voice+Video library
 *
 *  Copyright 2008 Collabora Ltd,
 *  Copyright 2008 Nokia Corporation
 *   @author: Olivier Crete 
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __CHECK_THREADSAFE_H__
#define __CHECK_THREADSAFE_H__

#include 

/* Define thread safe versions of the tests */

#define ts_fail_unless(...)             \
  G_STMT_START {                        \
    g_mutex_lock (&check_mutex);         \
    fail_unless (__VA_ARGS__);          \
    g_mutex_unlock (&check_mutex);       \
  } G_STMT_END


#define ts_fail_if(...)                 \
  G_STMT_START {                        \
    g_mutex_lock (&check_mutex);         \
    fail_if (__VA_ARGS__);              \
    g_mutex_unlock (&check_mutex);       \
  } G_STMT_END


#define ts_fail(...)    \
  G_STMT_START {                        \
    g_mutex_lock (&check_mutex);         \
    fail (__VA_ARGS__);                 \
    g_mutex_unlock (&check_mutex);       \
  } G_STMT_END

#endif /* __CHECK_THREADSAFE_H__ */
farstream-0.2.7/tests/check/base/0000775000076400007640000000000012462323000013640 500000000000000farstream-0.2.7/tests/check/base/fstransmitter.c0000664000076400007640000000324111710041462016635 00000000000000/* Farstream unit tests for FsTransmitter
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 
#include 


GST_START_TEST (test_fstransmitter_new_fail)
{
  GError *error = NULL;
  FsTransmitter *transmitter = NULL;

  transmitter = fs_transmitter_new ("invalidname", 1,  0, &error);

  fail_if (transmitter);

  fail_unless (error != NULL, "Error is NULL");
  fail_unless (error->domain == FS_ERROR, "Error domain is wrong");

  g_clear_error (&error);
}
GST_END_TEST;


static Suite *
fstransmitter_suite (void)
{
  Suite *s = suite_create ("fstransmitter");
  TCase *tc_chain = tcase_create ("fstransmitter");

  suite_add_tcase (s, tc_chain);

  tcase_add_test (tc_chain, test_fstransmitter_new_fail);

  return s;
}


GST_CHECK_MAIN (fstransmitter);
farstream-0.2.7/tests/check/base/test1.conf0000664000076400007640000000132111710041462015470 00000000000000[audio/TEST1]
id=122
clock-rate=8001
channels=5
test3=test4
feedback:aa/bb=cc
feedback:dd/ee=
feedback:ff=

[video/TEST2]
id=123
clock-rate=8002
channels=6
test5=test6

[audio/TEST3]

[audio/TEST4]
id=-1

[audio/TEST5]
id=asdas
clock-rate=das
channels=asd
channels=1asd
channels=1asd2

[audio/TEST5:1]
id=124

[asdas]
adsas=11
clock-rate=dsa

[asass/]
adsas=1as
clock-rate=dsa

[asass/:1]
adsas=135
clock-rate=dsa

[daasd/asdsa]
asdasd=11
channels=1das

[rtp-hdrext:audio:1]
id=1
uri=http://example.com/rtp-hdrext1

[rtp-hdrext:invalid:1]
id=3
uri=http://example.com/rtp-hdrext3

[rtp-hdrext:audio:2]
id=2
uri=http://example.com/rtp-hdrext2
direction=receive

[rtp-hdrext:video:1]
id=1
uri=http://example.com/rtp-hdrext1
farstream-0.2.7/tests/check/base/fscodec.c0000664000076400007640000003175511710041462015351 00000000000000/* Farstream unit tests for FsCodec
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include "farstream/fs-codec.h"
#include "farstream/fs-rtp.h"

#include "testutils.h"

GST_START_TEST (test_fscodec_new)
{
  FsCodec *codec = NULL;

  codec = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);

  fail_if (codec == NULL, "Allocation failed");

  fail_unless (codec->id == 1, "Codec is incorrect");
  fail_unless (!strcmp (codec->encoding_name, "aa"),
      "Codec encoding name incorrect");
  fail_unless (codec->media_type == FS_MEDIA_TYPE_VIDEO,
      "Codec media type incorrect");
  fail_unless (codec->clock_rate == 650, "Codec clock rate incorrect");

  fs_codec_destroy (codec);
}
GST_END_TEST;


GST_START_TEST (test_fscodec_are_equal)
{
  FsCodec *codec1 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);
  FsCodec *codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);

  fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
      "Identical codecs not recognized");

  fs_codec_destroy (codec2);

  codec2 = fs_codec_new (2, "aa", FS_MEDIA_TYPE_VIDEO, 650);
  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "Different codec ids not recognized");
  fs_codec_destroy (codec2);

  codec2 = fs_codec_new (1, "aaa", FS_MEDIA_TYPE_VIDEO, 650);
  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "Different codec types not recognized");
  fs_codec_destroy (codec2);

  codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_AUDIO, 650);
  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "Different media types not recognized");
  fs_codec_destroy (codec2);

  codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 651);
  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "Different clock rates not recognized");
  fs_codec_destroy (codec2);

  codec2 = fs_codec_new (1, NULL, FS_MEDIA_TYPE_VIDEO, 650);
  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "NULL encoding name not ignored");
  fs_codec_destroy (codec2);

  fs_codec_destroy (codec1);
}
GST_END_TEST;

static FsCodec *
init_codec_with_three_params (void)
{
  FsCodec *codec = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);

  fs_codec_add_optional_parameter (codec, "aa1", "bb1");
  fs_codec_add_optional_parameter (codec, "aa2", "bb2");
  fs_codec_add_optional_parameter (codec, "aa3", "bb3");

  fs_codec_add_feedback_parameter (codec, "aa1", "bb1", "cc1");
  fs_codec_add_feedback_parameter (codec, "aa2", "bb2", "cc2");
  fs_codec_add_feedback_parameter (codec, "aa3", "bb3", "cc3");

  return codec;
}

GST_START_TEST (test_fscodec_are_equal_opt_params)
{
  FsCodec *codec1;
  FsCodec *codec2;

  codec1 = init_codec_with_three_params ();
  codec2 = init_codec_with_three_params ();

  fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
      "Identical codecs (with params) not recognized");

  fs_codec_remove_optional_parameter (codec1,
      g_list_first (codec1->optional_params)->data);
  fs_codec_add_optional_parameter (codec1, "aa1", "bb1");

  fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
      "Identical codecs (with params in different order 1) not recognized");

  fs_codec_remove_optional_parameter (codec1,
      g_list_first (codec1->optional_params)->data);
  fs_codec_add_optional_parameter (codec1, "aa2", "bb2");

  fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
      "Identical codecs (with params in different order 2) not recognized");

  fs_codec_destroy (codec1);

  codec1 = init_codec_with_three_params ();

  fs_codec_remove_optional_parameter (codec1,
      g_list_first (codec1->optional_params)->data);

  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "Did not detect removal of first parameter of first codec");
  fail_unless (fs_codec_are_equal (codec2, codec1) == FALSE,
      "Did not detect removal of first parameter of second codec");

  fs_codec_destroy (codec1);

  codec1 = init_codec_with_three_params ();
  fs_codec_remove_optional_parameter (codec1,
      g_list_last (codec1->optional_params)->data);

  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "Did not detect removal of last parameter of first codec");
  fail_unless (fs_codec_are_equal (codec2, codec1) == FALSE,
      "Did not detect removal of last parameter of second codec");

  fs_codec_destroy (codec1);
  fs_codec_destroy (codec2);
}
GST_END_TEST;


GST_START_TEST (test_fscodec_are_equal_feedback_params)
{
  FsCodec *codec1;
  FsCodec *codec2;

  codec1 = init_codec_with_three_params ();
  codec2 = init_codec_with_three_params ();

  fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
      "Identical codecs (with params) not recognized");

  fs_codec_remove_feedback_parameter (codec1,
      g_list_first (codec1->feedback_params));
  fs_codec_add_feedback_parameter (codec1, "aa1", "bb1", "cc1");

  fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
      "Identical codecs (with params in different order 1) not recognized");

  fs_codec_remove_feedback_parameter (codec1,
      g_list_first (codec1->feedback_params));
  fs_codec_add_feedback_parameter (codec1, "aa2", "bb2", "cc2");

  fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
      "Identical codecs (with params in different order 2) not recognized");

  fs_codec_destroy (codec1);

  codec1 = init_codec_with_three_params ();

  fs_codec_remove_feedback_parameter (codec1,
      g_list_first (codec1->feedback_params));

  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "Did not detect removal of first parameter of first codec");
  fail_unless (fs_codec_are_equal (codec2, codec1) == FALSE,
      "Did not detect removal of first parameter of second codec");

  fs_codec_destroy (codec1);

  codec1 = init_codec_with_three_params ();
  fs_codec_remove_feedback_parameter (codec1,
      g_list_last (codec1->feedback_params));

  fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
      "Did not detect removal of last parameter of first codec");
  fail_unless (fs_codec_are_equal (codec2, codec1) == FALSE,
      "Did not detect removal of last parameter of second codec");

  fs_codec_destroy (codec1);
  fs_codec_destroy (codec2);
}
GST_END_TEST;


GST_START_TEST (test_fscodec_copy)
{
  FsCodec *codec1 = init_codec_with_three_params ();
  FsCodec *codec2 = NULL;

  codec2 = fs_codec_copy (codec1);

  fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
      "Copy is not identical to the original");

  fs_codec_destroy (codec1);
  fs_codec_destroy (codec2);
}
GST_END_TEST;

GST_START_TEST (test_fscodec_null)
{
  gchar *str;

  fs_codec_destroy (NULL);
  fail_unless (fs_codec_copy (NULL) == NULL, "Failed to copy NULL codec");
  fs_codec_list_destroy (NULL);
  fail_unless (fs_codec_list_copy (NULL) == NULL,
      "Failed to copy NULL codec list");
  str = fs_codec_to_string (NULL);
  fail_unless (str && !strcmp (str, "(NULL)"),
      "Failed to print NULL codec");
  g_free (str);
  fail_unless (fs_codec_are_equal (NULL,NULL), "NULL codecs are not equal");
}
GST_END_TEST;

GST_START_TEST (test_fscodec_keyfile)
{
  GList *codecs = NULL;
  GError *error = NULL;
  gchar *filename = NULL;
  GList *comparison = NULL;
  FsCodec *codec = NULL;

  fail_if (fs_codec_list_from_keyfile ("invalid-filename", &error));
  fail_if (error == NULL);
  fail_unless (error->domain == G_FILE_ERROR);
  g_clear_error (&error);

  filename = get_fullpath ("base/test1.conf");
  codecs = fs_codec_list_from_keyfile (filename, &error);
  g_free (filename);
  fail_unless (error == NULL);
  fail_if (codecs == NULL);

#if 0
  {
    GList *item;
    for(item = codecs; item ; item= item->next)
    {
      g_debug("%s", fs_codec_to_string (item->data));
    }
  }
#endif

  codec = fs_codec_new (122, "TEST1", FS_MEDIA_TYPE_AUDIO, 8001);
  codec->channels = 5;
  fs_codec_add_optional_parameter (codec, "test3", "test4");
  fs_codec_add_feedback_parameter (codec, "aa", "bb", "cc");
  fs_codec_add_feedback_parameter (codec, "dd", "ee", "");
  fs_codec_add_feedback_parameter (codec, "ff", "", "");
  comparison = g_list_append (comparison, codec);

  codec = fs_codec_new (123, "TEST2", FS_MEDIA_TYPE_VIDEO, 8002);
  codec->channels = 6;
  fs_codec_add_optional_parameter (codec, "test5", "test6");
  comparison = g_list_append (comparison, codec);

  codec = fs_codec_new (FS_CODEC_ID_ANY, "TEST3", FS_MEDIA_TYPE_AUDIO, 0);
  comparison = g_list_append (comparison, codec);

  codec = fs_codec_new (FS_CODEC_ID_DISABLE, "TEST4", FS_MEDIA_TYPE_AUDIO, 0);
  comparison = g_list_append (comparison, codec);

  codec = fs_codec_new (FS_CODEC_ID_ANY, "TEST5", FS_MEDIA_TYPE_AUDIO, 0);
  comparison = g_list_append (comparison, codec);

  codec = fs_codec_new (124, "TEST5", FS_MEDIA_TYPE_AUDIO, 0);
  comparison = g_list_append (comparison, codec);

  fail_unless (fs_codec_list_are_equal (codecs, comparison));

  fs_codec_list_destroy (comparison);
  fs_codec_list_destroy (codecs);

}
GST_END_TEST;

GST_START_TEST (test_fscodec_rtp_hdrext)
{
  FsRtpHeaderExtension *hdrext, *hdrext2;

  hdrext = fs_rtp_header_extension_new (1, FS_DIRECTION_BOTH, "uri");
  hdrext2 = fs_rtp_header_extension_new (1, FS_DIRECTION_BOTH, "uri");

  fail_unless (fs_rtp_header_extension_are_equal (hdrext, hdrext));
  fail_unless (fs_rtp_header_extension_are_equal (hdrext, hdrext2));

  hdrext2->id = 2;
  fail_unless (!fs_rtp_header_extension_are_equal (hdrext, hdrext2));

  hdrext2->id = 1;
  fail_unless (fs_rtp_header_extension_are_equal (hdrext, hdrext2));

  hdrext2->direction = FS_DIRECTION_NONE;
  fail_unless (!fs_rtp_header_extension_are_equal (hdrext, hdrext2));
  fs_rtp_header_extension_destroy (hdrext2);

  hdrext2 = fs_rtp_header_extension_copy (hdrext);

  fail_unless (fs_rtp_header_extension_are_equal (hdrext, hdrext2));

  fs_rtp_header_extension_destroy (hdrext2);
  fs_rtp_header_extension_destroy (hdrext);
}
GST_END_TEST;


GST_START_TEST (test_fscodec_rtp_hdrext_keyfile)
{
  GList *extensions = NULL;
  GError *error = NULL;
  gchar *filename = NULL;
  FsRtpHeaderExtension *comparison;

  fail_if (fs_rtp_header_extension_list_from_keyfile ("invalid-filename",
          FS_MEDIA_TYPE_AUDIO, &error));
  fail_if (error == NULL);
  fail_unless (error->domain == G_FILE_ERROR);
  g_clear_error (&error);

  filename = get_fullpath ("base/test1.conf");
  extensions = fs_rtp_header_extension_list_from_keyfile (filename,
      FS_MEDIA_TYPE_AUDIO, &error);
  g_free (filename);
  fail_unless (error == NULL);
  fail_if (extensions == NULL);

  comparison = fs_rtp_header_extension_new (1, FS_DIRECTION_BOTH,
      "http://example.com/rtp-hdrext1");
  fail_unless (fs_rtp_header_extension_are_equal (extensions->data,
          comparison));
  fs_rtp_header_extension_destroy (comparison);

  comparison = fs_rtp_header_extension_new (2, FS_DIRECTION_RECV,
      "http://example.com/rtp-hdrext2");
  fail_unless (fs_rtp_header_extension_are_equal (extensions->next->data,
          comparison));
  fs_rtp_header_extension_destroy (comparison);

  fail_unless (extensions->next->next == NULL);

  fs_rtp_header_extension_list_destroy (extensions);



  filename = get_fullpath ("base/test1.conf");
  extensions = fs_rtp_header_extension_list_from_keyfile (filename,
      FS_MEDIA_TYPE_VIDEO, &error);
  g_free (filename);
  fail_unless (error == NULL);
  fail_if (extensions == NULL);

  comparison = fs_rtp_header_extension_new (1, FS_DIRECTION_BOTH,
      "http://example.com/rtp-hdrext1");
  fail_unless (fs_rtp_header_extension_are_equal (extensions->data,
          comparison));
  fs_rtp_header_extension_destroy (comparison);

  fail_unless (extensions->next == NULL);
  fs_rtp_header_extension_list_destroy (extensions);
}
GST_END_TEST;

static Suite *
fscodec_suite (void)
{
  Suite *s = suite_create ("fscodec");
  TCase *tc_chain = tcase_create ("fscodec");

  suite_add_tcase (s, tc_chain);

  tcase_add_test (tc_chain, test_fscodec_new);
  tcase_add_test (tc_chain, test_fscodec_are_equal);
  tcase_add_test (tc_chain, test_fscodec_are_equal_opt_params);
  tcase_add_test (tc_chain, test_fscodec_are_equal_feedback_params);
  tcase_add_test (tc_chain, test_fscodec_copy);
  tcase_add_test (tc_chain, test_fscodec_null);
  tcase_add_test (tc_chain, test_fscodec_keyfile);
  tcase_add_test (tc_chain, test_fscodec_rtp_hdrext);
  tcase_add_test (tc_chain, test_fscodec_rtp_hdrext_keyfile);

  return s;
}


GST_CHECK_MAIN (fscodec);
farstream-0.2.7/tests/check/testutils.h0000664000076400007640000000210711710041463015064 00000000000000/* Farstream unit tests generic utilities
 *
 * Copyright (C) 2007 Collabora, Nokia
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifndef __UTILS_H__
#define __UTILS_H__

#include 

G_BEGIN_DECLS

gchar *find_multicast_capable_address (void);

gchar *get_fullpath (const gchar *filename);

G_END_DECLS

#endif /* __UTILS_H__ */
farstream-0.2.7/tests/check/raw/0000775000076400007640000000000012462323000013517 500000000000000farstream-0.2.7/tests/check/raw/conference.c0000664000076400007640000011477712401500475015741 00000000000000/* Farstream unit tests for fsrawconference
 *
 * Copyright (C) 2007,2010 Collabora, Nokia
 * @author: Olivier Crete 
 * @author: Mike Ruprecht 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 
#include 
#include 

#include "check-threadsafe.h"

#include "testutils.h"

struct SimpleTestConference {
  gint id;
  gchar *cname;

  GstElement *pipeline;
  GstElement *conference;
  FsSession *session;
  GstElement *fakesrc;

  gboolean started;

  gboolean destroyed;

  GList *streams;
};


struct SimpleTestStream {
  struct SimpleTestConference *dat;
  struct SimpleTestConference *target;

  FsParticipant *participant;
  FsStream *stream;

  gboolean destroyed;

  gchar *transmitter;

  gint buffer_count;

  GCallback handoff_handler;

  gboolean got_candidates;

  gint flags;
};

static struct SimpleTestStream *
find_pointback_stream (
    struct SimpleTestConference *dat,
    struct SimpleTestConference *target);


struct SimpleTestConference **dats;
GMainLoop *loop;
int count = 0;

#define WAITING_ON_LAST_CODEC   (1<<0)
#define SHOULD_BE_LAST_CODEC    (1<<1)
#define HAS_BEEN_RESET          (1<<2)

gint max_buffer_count = 20;

guint max_src_pads = 1;

GMutex testlock;

#define TEST_LOCK()   g_mutex_lock (&testlock)
#define TEST_UNLOCK() g_mutex_unlock (&testlock)

gboolean select_last_codec = FALSE;
gboolean reset_to_last_codec = FALSE;

static GstBusSyncReply
default_sync_handler (GstBus *bus, GstMessage *message, gpointer data)
{
  struct SimpleTestConference *dat = data;
  GList *codecs = NULL;

  /* Get the codecs property which should take the session lock to make sure
   * it is not held across signal emissions
   */
  if (dat->session)
    g_object_get (dat->session, "codecs", &codecs, NULL);
  fs_codec_list_destroy (codecs);

  return GST_BUS_PASS;
}

struct SimpleTestConference *
setup_simple_conference_full (
    gint id,
    gchar *conference_elem,
    gchar *cname,
    FsMediaType mediatype)
{
  struct SimpleTestConference *dat = g_new0 (struct SimpleTestConference, 1);
  GError *error = NULL;
  guint tos;
  GstBus *bus;

  dat->id = id;

  dat->pipeline = gst_pipeline_new ("pipeline");
  fail_if (dat->pipeline == NULL);

  bus = gst_pipeline_get_bus (GST_PIPELINE (dat->pipeline));
  fail_if (bus == NULL);
  gst_bus_set_sync_handler (bus, default_sync_handler, dat, NULL);
  gst_object_unref (bus);

  dat->conference = gst_element_factory_make (conference_elem, NULL);
  fail_if (dat->conference == NULL, "Could not build %s", conference_elem);
  fail_unless (gst_bin_add (GST_BIN (dat->pipeline), dat->conference),
      "Could not add conference to the pipeline");

  dat->session = fs_conference_new_session (FS_CONFERENCE (dat->conference),
      mediatype, &error);
  if (error)
    fail ("Error while creating new session (%d): %s",
        error->code, error->message);
  fail_if (dat->session == NULL, "Could not make session, but no GError!");

  g_object_set (dat->session, "tos", 2, NULL);
  g_object_get (dat->session, "tos", &tos, NULL);
  fail_unless (tos == 2);


  g_object_set_data (G_OBJECT (dat->conference), "dat", dat);

  return dat;
}


struct SimpleTestConference *
setup_simple_conference (
    gint id,
    gchar *conference_elem,
    gchar *cname)
{
  return setup_simple_conference_full (id, conference_elem, cname,
      FS_MEDIA_TYPE_AUDIO);
}

struct SimpleTestStream *
simple_conference_add_stream (
    struct SimpleTestConference *dat,
    struct SimpleTestConference *target,
    const gchar *transmitter,
    guint st_param_count,
    GParameter *st_params)
{
  struct SimpleTestStream *st = g_new0 (struct SimpleTestStream, 1);
  GError *error = NULL;

  st->dat = dat;
  st->target = target;
  st->transmitter = g_strdup (transmitter);

  st->participant = fs_conference_new_participant (
      FS_CONFERENCE (dat->conference), &error);
  if (error)
    fail ("Error while creating new participant (%d): %s",
        error->code, error->message);
  fail_if (st->participant == NULL, "Could not make participant, but no GError!");

  st->stream = fs_session_new_stream (dat->session, st->participant,
      FS_DIRECTION_BOTH, &error);
  if (error)
    fail ("Error while creating new stream (%d): %s",
        error->code, error->message);
  fail_if (st->stream == NULL, "Could not make stream, but no GError!");

  fail_unless (fs_stream_set_transmitter (st->stream, transmitter, st_params,
          st_param_count, &error));
  fail_unless (error == NULL);


  g_object_set_data (G_OBJECT (st->stream), "SimpleTestStream", st);

  dat->streams = g_list_append (dat->streams, st);

  return st;
}


void
cleanup_simple_stream (struct SimpleTestStream *st)
{
  if (st->stream)
  {
    fs_stream_destroy (st->stream);
    g_object_unref (st->stream);
  }
  g_object_unref (st->participant);
  g_free (st->transmitter);
  g_free (st);
}

void
cleanup_simple_conference (struct SimpleTestConference *dat)
{

  g_list_foreach (dat->streams, (GFunc) cleanup_simple_stream, NULL);
  g_list_free (dat->streams);

  if (dat->session)
  {
    fs_session_destroy (dat->session);
    g_object_unref (dat->session);
  }
  gst_object_unref (dat->pipeline);
  g_free (dat);
}


void
setup_fakesrc (struct SimpleTestConference *dat)
{
  GstPad *sinkpad = NULL, *srcpad = NULL;

  GST_DEBUG ("Adding fakesrc");


  g_object_get (dat->session, "sink-pad", &sinkpad, NULL);
  fail_if (sinkpad == NULL, "Could not get session sinkpad");

  dat->fakesrc = gst_element_factory_make ("audiotestsrc", NULL);
  fail_if (dat->fakesrc == NULL, "Could not make audiotestsrc");
  gst_bin_add (GST_BIN (dat->pipeline), dat->fakesrc);

  g_object_set (dat->fakesrc,
      "blocksize", 10,
      "is-live", TRUE,
      "volume", 0.3,
      NULL);

  srcpad = gst_element_get_static_pad (dat->fakesrc, "src");

  fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
      "Could not link the capsfilter and the fsrawconference");

  gst_object_unref (sinkpad);
  gst_object_unref (srcpad);

  if (dat->started)
    fail_if (gst_element_set_state (dat->pipeline, GST_STATE_PLAYING) ==
        GST_STATE_CHANGE_FAILURE);
}

static gboolean
pad_count_fold (const GValue *item, GValue *val, gpointer user_data)
{
  g_value_set_uint (val, g_value_get_uint (val) + 1);

  return TRUE;
}

guint
count_stream_pads (FsStream *stream)
{
  GstIterator *iter = fs_stream_iterate_src_pads (stream);
  guint count = 0;

  fail_if (iter == NULL);

  for (;;)
  {
    GstIteratorResult res;
    GValue val = {0};

    g_value_init (&val, G_TYPE_UINT);

    res = gst_iterator_fold (iter, pad_count_fold, &val, NULL);

    fail_if (res == GST_ITERATOR_ERROR);

    if (res != GST_ITERATOR_RESYNC)
    {
      count = g_value_get_uint (&val);
      break;
    }

    gst_iterator_resync (iter);
  }

  gst_iterator_free (iter);

  return count;
}

GST_START_TEST (test_rawconference_new)
{
  struct SimpleTestConference *dat = NULL;
  struct SimpleTestStream *st = NULL;
  guint id = 999;
  GList *codecs = NULL;
  FsMediaType media_type;
  GstPad *sinkpad = NULL;
  gchar *str = NULL;
  GstElement *conf = NULL;
  FsSession *sess = NULL;
  FsParticipant *part = NULL;
  FsStreamDirection dir;

  dat = setup_simple_conference (1, "fsrawconference", "bob@127.0.0.1");
  //st = simple_conference_add_stream (dat, dat, "shm", 0, NULL);
  st = simple_conference_add_stream (dat, dat, "rawudp", 0, NULL);

  g_object_get (dat->session,
      "id", &id,
      "codecs", &codecs,
      "media-type", &media_type,
      "sink-pad", &sinkpad,
      "conference", &conf,
      NULL);

  ts_fail_unless (id == 1, "The id of the first session should be 1 not %d",
      id);
  ts_fail_unless (codecs == NULL, "Codecs should be NULL");
  fs_codec_list_destroy (codecs);
  ts_fail_unless (media_type == FS_MEDIA_TYPE_AUDIO, "Media type isnt audio,"
      " its %d", media_type);
  ts_fail_if (sinkpad == NULL, "Sink pad should not be null");
  str = g_strdup_printf ("sink_%d", id);
  ts_fail_unless (!strcmp (str, GST_OBJECT_NAME (sinkpad)), "Sink pad is %s"
      " instead of being %d", GST_OBJECT_NAME (sinkpad), str);
  gst_object_unref (sinkpad);
  g_free (str);
  ts_fail_unless (conf == dat->conference, "Conference pointer from the session"
      " is wrong");
  gst_object_unref (conf);


  g_object_get (st->stream,
      "participant", &part,
      "session", &sess,
      "direction", &dir,
      NULL);
  ts_fail_unless (part == st->participant, "The stream does not have the right"
      " participant");
  g_object_unref (part);
  ts_fail_unless (sess == dat->session, "The stream does not have the right"
      " session");
  g_object_unref (sess);
  ts_fail_unless (dir == FS_DIRECTION_BOTH, "The direction is not both");

  ts_fail_unless (count_stream_pads (st->stream) == 0);
  g_object_set (st->stream, "direction", FS_DIRECTION_NONE, NULL);
  g_object_get (st->stream, "direction", &dir, NULL);
  ts_fail_unless (dir == FS_DIRECTION_NONE, "The direction is not both");

  cleanup_simple_conference (dat);
}
GST_END_TEST;


static void
_new_local_candidate (FsStream *stream, FsCandidate *candidate)
{
  struct SimpleTestStream *st = g_object_get_data (G_OBJECT (stream),
      "SimpleTestStream");
  gboolean ret;
  GError *error = NULL;
  struct SimpleTestStream *other_st;
  GList *candidates = NULL;
  FsCandidate *freecand = NULL;

  TEST_LOCK ();

  if (st->destroyed)
  {
    TEST_UNLOCK ();
    return;
  }

  other_st = find_pointback_stream (st->target, st->dat);
  if (other_st->destroyed)
  {
    TEST_UNLOCK ();
    return;
  }

  st->got_candidates = TRUE;

  GST_DEBUG ("%d:%d: Setting remote candidate for component %d",
      other_st->dat->id,
      other_st->target->id,
      candidate->component_id);

  if (!strcmp ("shm", st->transmitter))
  {
    freecand = fs_candidate_new (NULL, candidate->component_id,
        candidate->type, FS_NETWORK_PROTOCOL_UDP, NULL, 0);
    freecand->username = g_strdup (candidate->ip);
    candidates = g_list_prepend (NULL, freecand);
  }
  else
  {
    candidates = g_list_prepend (NULL, candidate);
  }

  ret = fs_stream_force_remote_candidates (other_st->stream, candidates,
      &error);
  g_list_free (candidates);
  fs_candidate_destroy (freecand);

  if (error)
    ts_fail ("Error while adding candidate: (%s:%d) %s",
      g_quark_to_string (error->domain), error->code, error->message);

  ts_fail_unless (ret == TRUE, "No detailed error from add_remote_candidate");

  TEST_UNLOCK ();
}

static void
_current_send_codec_changed (FsSession *session, FsCodec *codec)
{
  struct SimpleTestConference *dat = NULL;
  FsConference *conf = NULL;
  gchar *str = NULL;

  g_object_get (session, "conference", &conf, NULL);
  dat = g_object_get_data (G_OBJECT (conf), "dat");
  gst_object_unref (conf);

  str = fs_codec_to_string (codec);
  GST_DEBUG ("%d: New send codec: %s", dat->id, str);
  g_free (str);
}

static void
_local_candidates_prepared (FsStream *stream)
{
  struct SimpleTestStream *st = g_object_get_data (G_OBJECT (stream),
      "SimpleTestStream");

  if (!st->got_candidates)
  {
    g_debug ("Skipping test because there are no candidates");
    g_main_loop_quit (loop);
  }

}


static gboolean
_bus_callback (GstBus *bus, GstMessage *message, gpointer user_data)
{
  struct SimpleTestConference *dat = user_data;

  switch (GST_MESSAGE_TYPE (message))
  {
    case GST_MESSAGE_ELEMENT:
      {
        const GstStructure *s = gst_message_get_structure (message);
        ts_fail_if (s==NULL, "NULL structure in element message");
        if (gst_structure_has_name (s, "farstream-error"))
        {
          const GValue *value;
          FsError errorno;
          const gchar *error;

          ts_fail_unless (
            FS_IS_CONFERENCE (GST_MESSAGE_SRC (message)),
            "Received farstream-error from non-farstream element");

          ts_fail_unless (
              gst_structure_has_field_typed (s, "src-object", G_TYPE_OBJECT),
              "farstream-error structure has no src-object field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "error-no", FS_TYPE_ERROR),
              "farstream-error structure has no src-object field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "error-msg", G_TYPE_STRING),
              "farstream-error structure has no error-msg field");

          value = gst_structure_get_value (s, "error-no");
          errorno = g_value_get_enum (value);
          error = gst_structure_get_string (s, "error-msg");

          ts_fail ("Error on BUS (%d) %s", errorno, error);
        }
        else if (gst_structure_has_name (s, "farstream-new-local-candidate"))
        {
          FsStream *stream;
          FsCandidate *candidate;
          const GValue *value;

          ts_fail_unless (
            FS_IS_CONFERENCE (GST_MESSAGE_SRC (message)),
            "Received farstream-error from non-farstream element");

          ts_fail_unless (
              gst_structure_has_field_typed (s, "stream", FS_TYPE_STREAM),
              "farstream-new-local-candidate structure has no stream field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "candidate", FS_TYPE_CANDIDATE),
              "farstream-new-local-candidate structure has no candidate field");

          value = gst_structure_get_value (s, "stream");
          stream = g_value_get_object (value);

          value = gst_structure_get_value (s, "candidate");
          candidate = g_value_get_boxed (value);

          ts_fail_unless (stream && candidate, "new-local-candidate with NULL"
              " stream(%p) or candidate(%p)", stream, candidate);

          _new_local_candidate (stream, candidate);
        }
        else if (gst_structure_has_name (s,
                "farstream-new-active-candidate-pair"))
        {
          FsStream *stream;
          FsCandidate *local_candidate, *remote_candidate;
          const GValue *value;

          ts_fail_unless (
            FS_IS_CONFERENCE (GST_MESSAGE_SRC (message)),
            "Received farstream-error from non-farstream element");

          ts_fail_unless (
              gst_structure_has_field_typed (s, "stream", FS_TYPE_STREAM),
              "farstream-new-active-candidate-pair structure"
              " has no stream field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "local-candidate",
                  FS_TYPE_CANDIDATE),
              "farstream-new-active-candidate-pair structure"
              " has no local-candidate field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "remote-candidate",
                  FS_TYPE_CANDIDATE),
              "farstream-new-active-candidate-pair structure"
              " has no remote-candidate field");

          value = gst_structure_get_value (s, "stream");
          stream = g_value_get_object (value);
          value = gst_structure_get_value (s, "local-candidate");
          local_candidate = g_value_get_boxed (value);
          value = gst_structure_get_value (s, "remote-candidate");
          remote_candidate = g_value_get_boxed (value);

          ts_fail_unless (stream && local_candidate && remote_candidate,
              "new-local-candidate with NULL stream(%p)"
              " or local_candidate(%p) or remote_candidate(%p)",
              stream, local_candidate, remote_candidate);
        }
        else if (gst_structure_has_name (s,
                "farstream-current-send-codec-changed"))
        {
          FsSession *session;
          FsCodec *codec;
          const GValue *value;

          ts_fail_unless (
            FS_IS_CONFERENCE (GST_MESSAGE_SRC (message)),
            "Received farstream-error from non-farstream element");

          ts_fail_unless (
              gst_structure_has_field_typed (s, "session", FS_TYPE_SESSION),
              "farstream-current-send-codec-changed structure"
              " has no session field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "codec",
                  FS_TYPE_CODEC),
              "");

          value = gst_structure_get_value (s, "session");
          session = g_value_get_object (value);
          value = gst_structure_get_value (s, "codec");
          codec = g_value_get_boxed (value);

          ts_fail_unless (session && codec,
              "current-send-codec-changed with NULL session(%p) or codec(%p)",
              session, codec);

          _current_send_codec_changed (session, codec);
        }
        else if (gst_structure_has_name (s,
                "farstream-local-candidates-prepared"))
        {
          FsStream *stream;
          const GValue *value;

          ts_fail_unless (
            FS_IS_CONFERENCE (GST_MESSAGE_SRC (message)),
            "Received farstream-error from non-farstream element");

          ts_fail_unless (
              gst_structure_has_field_typed (s, "stream", FS_TYPE_STREAM),
              "farstream-local-candidates-prepared structure"
              " has no stream field");

          value = gst_structure_get_value (s, "stream");
          stream = g_value_get_object (value);

          _local_candidates_prepared (stream);
        }

       }
      break;
    case GST_MESSAGE_ERROR:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_error (message, &error, &debug);

        ts_fail ("Got an error on the BUS (%d): %s (%s)", error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    case GST_MESSAGE_WARNING:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_warning (message, &error, &debug);

        GST_WARNING ("%d: Got a warning on the BUS (%d): %s (%s)", dat->id,
            error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    default:
      break;
  }

  return TRUE;
}

static void
_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  struct SimpleTestStream *st = user_data;
  int i;
  gboolean stop = TRUE;
  GList *codecs = NULL;

  TEST_LOCK ();

  if (st->dat->destroyed)
  {
    TEST_UNLOCK ();
    return;
  }

  g_object_get (st->dat->session,
      "codecs", &codecs,
      NULL);

  ts_fail_if (codecs == NULL, "Could not get codecs");

  if (st->flags & WAITING_ON_LAST_CODEC)
  {
    if (fs_codec_are_equal (
        g_list_last (codecs)->data,
        g_object_get_data (G_OBJECT (element), "codec")))
    {
      st->flags &= ~WAITING_ON_LAST_CODEC;
      st->flags |= SHOULD_BE_LAST_CODEC;
      max_buffer_count += st->buffer_count;
      GST_DEBUG ("We HAVE last codec");
    }
    else
    {
#if 0
      gchar *str = fs_codec_to_string (
          g_object_get_data (G_OBJECT (element), "codec"));
      gchar *str2 = fs_codec_to_string (g_list_last (codecs)->data);
      GST_DEBUG ("not yet the last codec, skipping (we have %s, we want %s)",
          str, str2);
      g_free (str);
      g_free (str2);
#endif
      fs_codec_list_destroy (codecs);
      TEST_UNLOCK ();
      return;
    }
  }


  if (select_last_codec || st->flags & SHOULD_BE_LAST_CODEC)
  {
    if (!fs_codec_are_equal (
            g_list_last (codecs)->data,
            g_object_get_data (G_OBJECT (element), "codec")))
    {
      if (!reset_to_last_codec)
        ts_fail ("The handoff handler got a buffer from the wrong codec"
            " (ie. not the last)");
      fs_codec_list_destroy (codecs);
      TEST_UNLOCK ();
      return;
    }
  }
  else
    ts_fail_unless (
        fs_codec_are_equal (
            g_list_first (codecs)->data,
            g_object_get_data (G_OBJECT (element), "codec")),
        "The handoff handler got a buffer from the wrong codec");

  fs_codec_list_destroy (codecs);


  st->buffer_count++;
  GST_LOG ("%d:%d: Buffer %d", st->dat->id, st->target->id, st->buffer_count);


  /*
  ts_fail_if (dat->buffer_count > max_buffer_count,
    "Too many buffers %d > max_buffer_count", dat->buffer_count);
  */

  for (i = 0; i < count && !stop ; i++)
  {
    GList *item;


    for (item = g_list_first (dats[i]->streams);
         item;
         item = g_list_next (item))
    {
      struct SimpleTestStream *st2 = item->data;

      if (st2->buffer_count < max_buffer_count)
      {
        stop = FALSE;
        break;
      }
    }
  }

  if (stop)
  {
    if (reset_to_last_codec && !(st->flags & HAS_BEEN_RESET)) {
      //GError *error = NULL;
      GList *nego_codecs = NULL;
      //gchar *str = NULL;

      g_object_get (st->target->session,
          "codecs", &nego_codecs,
          NULL);
#if 0
      ts_fail_if (nego_codecs == NULL, "No codecs");
      ts_fail_if (g_list_length (nego_codecs) < 2, "Only one negotiated codec");

      str = fs_codec_to_string (g_list_last (nego_codecs)->data);
      GST_DEBUG ("Setting codec to: %s", str);
      g_free (str);

      ts_fail_unless (fs_session_set_send_codec (st->target->session,
              g_list_last (nego_codecs)->data, &error),
          "Could not set the send codec: %s",
          error ? error->message : "NO GError!!!");
      g_clear_error (&error);
#endif
      fs_codec_list_destroy (nego_codecs);

      st->flags |= HAS_BEEN_RESET | WAITING_ON_LAST_CODEC;

      GST_DEBUG ("RESET TO LAST CODEC");

    } else {
      g_main_loop_quit (loop);
    }
  }

  TEST_UNLOCK ();
}

static void
_src_pad_added (FsStream *stream, GstPad *pad, FsCodec *codec,
    gpointer user_data)
{
  struct SimpleTestStream *st = user_data;
  GstElement *fakesink = gst_element_factory_make ("fakesink", NULL);
  GstPad *fakesink_pad = NULL;
  GstPadLinkReturn ret;
  FsCodec *codeccopy = fs_codec_copy (codec);
  gchar *str = NULL;

  g_assert (fakesink);

  g_object_set (fakesink,
      "signal-handoffs", TRUE,
      "sync", TRUE,
      "async", TRUE,
      NULL);

  ts_fail_if (codec->encoding_name == NULL,
      "Got invalid codec without an encoding_name with id %u"
      " and clock_rate %u", codec->id, codec->clock_rate);

  g_object_set_data (G_OBJECT (fakesink), "codec", codeccopy);
  g_object_weak_ref (G_OBJECT (fakesink),
      (GWeakNotify) fs_codec_destroy, codeccopy);

  g_signal_connect (fakesink, "handoff", st->handoff_handler, st);

  gst_bin_add (GST_BIN (st->dat->pipeline), fakesink);

  fakesink_pad = gst_element_get_static_pad (fakesink, "sink");
  ret = gst_pad_link (pad, fakesink_pad);
  gst_object_unref (fakesink_pad);

  ts_fail_if (GST_PAD_LINK_FAILED(ret), "Could not link fakesink");

  ts_fail_if (gst_element_set_state (fakesink, GST_STATE_PLAYING) ==
      GST_STATE_CHANGE_FAILURE, "Could not set the fakesink to playing");

  str = fs_codec_to_string (codec);
  GST_DEBUG ("%d:%d: Added Fakesink for codec %s", st->dat->id, st->target->id,
           str);
  g_free (str);

  if (max_src_pads > 1)
    ts_fail_unless (count_stream_pads (stream) <= max_src_pads);
  else
    ts_fail_unless (count_stream_pads (stream) == 1);
}


static struct SimpleTestStream *
find_pointback_stream (
    struct SimpleTestConference *dat,
    struct SimpleTestConference *target)
{
  GList *item = NULL;

  for (item = g_list_first (dat->streams);
       item;
       item = g_list_next (item))
  {
    struct SimpleTestStream *st = item->data;

    if (st->target == target)
      return st;
  }

  ts_fail ("We did not find a return stream for %d in %d", target->id, dat->id);
  return NULL;
}


static void
rawconference_connect_signals (struct SimpleTestConference *dat)
{
  GstBus *bus = NULL;

  bus = gst_element_get_bus (dat->pipeline);
  gst_bus_add_watch (bus, _bus_callback, dat);
  gst_object_unref (bus);
}


static gboolean
_start_pipeline (gpointer user_data)
{
  struct SimpleTestConference *dat = user_data;

  GST_DEBUG ("%d: Starting pipeline", dat->id);

  ts_fail_if (gst_element_set_state (dat->pipeline, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE, "Could not set the pipeline to playing");

  dat->started = TRUE;

  return FALSE;
}

static gboolean
_compare_codec_lists (GList *list1, GList *list2)
{
  for (; list1 && list2;
       list1 = g_list_next (list1),
       list2 = g_list_next (list2)) {
    if (!fs_codec_are_equal (list1->data, list2->data))
      return FALSE;
  }

  if (list1 == NULL && list2 == NULL)
    return TRUE;
  else
    return FALSE;
}

static void
_negotiated_codecs_notify (GObject *object, GParamSpec *paramspec,
    gpointer user_data)
{
  struct SimpleTestConference *dat = user_data;
  FsSession *session = FS_SESSION (object);
  GList *codecs = NULL;
  GError *error = NULL;
  GList *item = NULL;

  GST_DEBUG ("%d: New negotiated codecs", dat->id);

  ts_fail_if (session != dat->session, "Got signal from the wrong object");

  g_object_get (dat->session, "codecs", &codecs, NULL);
  ts_fail_if (codecs == NULL, "Could not get the negotiated codecs");


  /* We have to find the stream from the target that points back to us */
  for (item = g_list_first (dat->streams); item; item = g_list_next (item))
  {
    struct SimpleTestStream *st = item->data;
    struct SimpleTestStream *st2 = find_pointback_stream (st->target, dat);
    GList *rcodecs2;

    GST_DEBUG ("Setting negotiated remote codecs on %d:%d from %d",st2->dat->id,
        st2->target->id, dat->id);
    if (!fs_stream_set_remote_codecs (st2->stream, codecs, &error))
    {
      if (error)
        ts_fail ("Could not set the remote codecs on stream %d:%d (%d): %s",
            st2->dat->id, st2->target->id,
            error->code,
            error->message);
      else
        ts_fail ("Could not set the remote codecs on stream %d:%d"
            " and we DID not get a GError!!",
            st2->dat->id, st2->target->id);
    }
    g_object_get (st2->stream, "remote-codecs", &rcodecs2, NULL);
    ts_fail_unless (_compare_codec_lists (rcodecs2, codecs),
        "Can not get remote codecs correctly");

    fs_codec_list_destroy (rcodecs2);

    if (select_last_codec)
      ts_fail_unless (
          fs_session_set_send_codec (st2->dat->session,
              g_list_last (codecs)->data,
              &error),
          "Error setting the send codec to the last codec: %s",
          error ? error->message : "No GError");

    g_clear_error (&error);
    break;
  }
  fs_codec_list_destroy (codecs);
}


static void
set_initial_codecs (
    struct SimpleTestConference *from,
    struct SimpleTestStream *to)
{
  FsCodec *codec;
  GList *codecs = NULL;
  GList *filtered_codecs = NULL;
  GList *rcodecs2 = NULL;
  GError *error = NULL;

  if (to->destroyed || from->destroyed)
    return;

  g_object_get (from->session, "codecs", &codecs, NULL);

  ts_fail_unless (codecs == NULL, "Shouldn't generate codecs codecs");

  codec = fs_codec_new (0, "audio/x-raw,"
      "format=(string)"GST_AUDIO_NE (S16)","
      "rate=(int)44100, channels=(int)1", FS_MEDIA_TYPE_AUDIO, 0);
  codecs = g_list_append (codecs, codec);

  filtered_codecs = g_list_append (filtered_codecs, codecs->data);

  GST_DEBUG ("Setting initial remote codecs on %d:%d from %d",
      to->dat->id, to->target->id,
      from->id);

  if (!fs_stream_set_remote_codecs (to->stream, filtered_codecs, &error))
  {
    if (error)
      ts_fail ("Could not set the remote codecs on stream %d:%d (%d): %s",
          to->dat->id, to->target->id,
          error->code,
          error->message);
    else
      ts_fail ("Could not set the remote codecs on stream %d"
          " and we DID not get a GError!!", to->target->id);
  }
  g_object_get (to->stream, "remote-codecs", &rcodecs2, NULL);
  ts_fail_unless (_compare_codec_lists (rcodecs2, filtered_codecs),
      "Can not get remote codecs correctly");
  fs_codec_list_destroy (rcodecs2);


  if (select_last_codec)
    ts_fail_unless (
        fs_session_set_send_codec (to->dat->session,
            g_list_last (filtered_codecs)->data,
            &error),
        "Error setting the send codec to the last codec: %s",
        error ? error->message : "No GError");
  g_clear_error (&error);

  g_list_free (filtered_codecs);
  fs_codec_list_destroy (codecs);
}

typedef void (*extra_conf_init) (struct SimpleTestConference *dat,
    guint confid);
typedef void (*extra_stream_init) (struct SimpleTestStream *st, guint confid,
    guint streamid);

static void
nway_test (int in_count, extra_conf_init extra_conf_init,
    extra_stream_init extra_stream_init, const gchar *transmitter,
    guint st_param_count, GParameter *st_params)
{
  int i, j;
  GParameter *params = NULL;


  if (!strcmp ("rawudp", transmitter))
  {
    params = g_new0 (GParameter, st_param_count+2);

    memcpy (params, st_params, st_param_count * sizeof (GParameter));

    params[st_param_count].name = "upnp-discovery";
    g_value_init (¶ms[st_param_count].value, G_TYPE_BOOLEAN);
    g_value_set_boolean (¶ms[st_param_count].value, FALSE);

    params[st_param_count+1].name = "upnp-mapping";
    g_value_init (¶ms[st_param_count+1].value, G_TYPE_BOOLEAN);
    g_value_set_boolean (¶ms[st_param_count+1].value, FALSE);

    st_param_count += 2;
    st_params = params;
  }

  count = in_count;

  loop = g_main_loop_new (NULL, FALSE);

  dats = g_new0 (struct SimpleTestConference *, count);

  for (i = 0; i < count; i++)
  {
    gchar *tmp = g_strdup_printf ("tester%d@hostname", i);
    dats[i] = setup_simple_conference (i, "fsrawconference", tmp);
    g_free (tmp);


    if (extra_conf_init)
      extra_conf_init (dats[i], i);

    rawconference_connect_signals (dats[i]);
    g_idle_add (_start_pipeline, dats[i]);

    setup_fakesrc (dats[i]);

    if (i != 0)
      g_signal_connect (dats[i]->session, "notify::codecs",
          G_CALLBACK (_negotiated_codecs_notify), dats[i]);
  }

  TEST_LOCK ();

  for (i = 0; i < count; i++)
    for (j = 0; j < count; j++)
      if (i != j)
      {
        struct SimpleTestStream *st = NULL;

        st = simple_conference_add_stream (dats[i], dats[j], transmitter,
            st_param_count, st_params);
        st->handoff_handler = G_CALLBACK (_handoff_handler);
        g_signal_connect (st->stream, "src-pad-added",
            G_CALLBACK (_src_pad_added), st);

        if (!strcmp ("shm", transmitter))
        {
          FsCandidate *candidate = fs_candidate_new ("1", 1,
              FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP,
              "/tmp/test-stream", 0);
          fs_stream_force_remote_candidates (st->stream,
              g_list_prepend (NULL, candidate), NULL);
        }

        if (extra_stream_init)
          extra_stream_init (st, i, j);
      }


  for (i = 1; i < count; i++)
  {
    struct SimpleTestStream *st = find_pointback_stream (dats[i], dats[0]);
    set_initial_codecs (dats[0], st);
  }

  TEST_UNLOCK ();

  g_main_loop_run (loop);

  for (i = 0; i < count; i++)
    gst_element_set_state (dats[i]->pipeline, GST_STATE_NULL);

  for (i = 0; i < count; i++)
    cleanup_simple_conference (dats[i]);

  g_free (dats);

  g_main_loop_unref (loop);

  g_free (params);
}


GST_START_TEST (test_rawconference_two_way)
{
  nway_test (2, NULL, NULL, "rawudp", 0, NULL);
}
GST_END_TEST;


GST_START_TEST (test_rawconference_two_way_shm)
{
  nway_test (2, NULL, NULL, "shm", 0, NULL);
}
GST_END_TEST;


GST_START_TEST (test_rawconference_errors)
{
  struct SimpleTestConference *dat = NULL;
  FsParticipant *participant = NULL;
  FsStream *stream = NULL;
  GError *error = NULL;

  dat = setup_simple_conference (1, "fsrawconference", "bob@127.0.0.1");

  participant = fs_conference_new_participant (FS_CONFERENCE (dat->conference),
      NULL);
  ts_fail_if (participant == NULL, "Could not create participant");



  stream = fs_session_new_stream (dat->session, participant, FS_DIRECTION_NONE,
      &error);
  ts_fail_unless (stream != NULL);

  fail_unless (fs_stream_set_transmitter (stream, "invalid-transmitter-name",
          NULL, 0, &error) == FALSE);
  ts_fail_if (error == NULL, "Error was not set");
  ts_fail_unless (error->domain == FS_ERROR &&
      error->code == FS_ERROR_CONSTRUCTION,
      "The wrong domain or code (%d) was returned", error->code);

  g_clear_error (&error);

  g_object_unref (participant);

  cleanup_simple_conference (dat);

}
GST_END_TEST;


static void
_error_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  ts_fail ("Received a buffer when we shouldn't have");
}

static void
_normal_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  struct SimpleTestStream *st = user_data;

  st->buffer_count++;

  if (st->buffer_count > 100)
    g_main_loop_quit (loop);

}

gint error_conf;

static void
_recv_only_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  if (confid == error_conf)
  {
    st->handoff_handler = G_CALLBACK (_error_handoff_handler);
  }
  else
  {
    st->handoff_handler = G_CALLBACK (_normal_handoff_handler);
    g_object_set (st->stream, "direction", FS_DIRECTION_RECV, NULL);
  }

}

GST_START_TEST (test_rawconference_recv_only)
{
  error_conf = 0;
  nway_test (2, NULL, _recv_only_init, "rawudp", 0, NULL);
  error_conf = 1;
  nway_test (2, NULL, _recv_only_init, "rawudp", 0, NULL);
}
GST_END_TEST;

static void
_send_only_init (struct SimpleTestStream *st, guint confid, guint streamid)
{
  if (confid == error_conf)
  {
    st->handoff_handler = G_CALLBACK (_error_handoff_handler);
    g_object_set (st->stream, "direction", FS_DIRECTION_SEND, NULL);
  }
  else
  {
    st->handoff_handler = G_CALLBACK (_normal_handoff_handler);
  }
}

GST_START_TEST (test_rawconference_send_only)
{
  error_conf = 0;
  nway_test (2, NULL, _send_only_init, "rawudp", 0, NULL);
  error_conf = 1;
  nway_test (2, NULL, _send_only_init, "rawudp", 0, NULL);
}
GST_END_TEST;



static void
_switch_handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
  gpointer user_data)
{
  struct SimpleTestStream *st = user_data;

  st->buffer_count++;

  if (st->buffer_count == 20)
    g_object_set (st->stream, "direction", FS_DIRECTION_SEND, NULL);

  if (st->buffer_count > 20)
    ts_fail ("Received a buffer on a stream that should have been sendonly");
}


static void
_change_to_send_only_init (struct SimpleTestStream *st, guint confid,
    guint streamid)
{
  if (confid == 0)
    st->handoff_handler = G_CALLBACK (_normal_handoff_handler);
  else
    st->handoff_handler = G_CALLBACK (_switch_handoff_handler);
}

GST_START_TEST (test_rawconference_change_to_send_only)
{
  nway_test (2, NULL, _change_to_send_only_init, "rawudp", 0, NULL);
}
GST_END_TEST;


GST_START_TEST (test_rawconference_dispose)
{
  FsConference *conf;
  FsParticipant *part;
  FsSession *session;
  FsStream *stream;
  GError *error = NULL;

  conf = FS_CONFERENCE (gst_element_factory_make ("fsrawconference", NULL));
  fail_if (conf == NULL);

  session = fs_conference_new_session (conf, FS_MEDIA_TYPE_AUDIO, &error);
  fail_if (session == NULL || error != NULL);

  part = fs_conference_new_participant (conf, &error);
  fail_if (part == NULL || error != NULL);

  stream = fs_session_new_stream (session, part, FS_DIRECTION_BOTH, &error);
  fail_if (stream == NULL || error != NULL);

  fs_stream_destroy (stream);

  fail_if (fs_stream_add_remote_candidates (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_stream_set_remote_codecs (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_stream_force_remote_candidates (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fs_stream_destroy (stream);
  g_object_unref (stream);

  stream = fs_session_new_stream (session, part, FS_DIRECTION_BOTH, &error);
  fail_if (stream == NULL || error != NULL);

  fs_stream_destroy (stream);

  fail_if (fs_stream_add_remote_candidates (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_stream_set_remote_codecs (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fail_if (fs_stream_force_remote_candidates (stream, NULL, &error));
  fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_DISPOSED);
  g_clear_error (&error);

  fs_session_destroy (session);

  fail_if (fs_session_start_telephony_event (session, 1, 2));
  fail_if (fs_session_stop_telephony_event (session));

  fail_if (fs_session_set_send_codec (session, NULL, &error));
  fail_unless (error->domain == FS_ERROR &&
      error->code == FS_ERROR_NOT_IMPLEMENTED);
  g_clear_error (&error);

  fail_if (fs_session_set_codec_preferences (session, NULL, &error));
  fail_unless (error->domain == FS_ERROR &&
      error->code == FS_ERROR_NOT_IMPLEMENTED);
  g_clear_error (&error);

  fs_session_destroy (session);
  g_object_unref (session);
  g_object_unref (part);
  g_object_unref (stream);
  gst_object_unref (conf);
}
GST_END_TEST;


static Suite *
fsrawconference_suite (void)
{
  Suite *s = suite_create ("fsrawconference");
  TCase *tc_chain;

  tc_chain = tcase_create ("fsrawconference_base");
  tcase_add_test (tc_chain, test_rawconference_new);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrawconference_two_way");
  tcase_add_test (tc_chain, test_rawconference_two_way);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrawconference_two_way_shm");
  tcase_add_test (tc_chain, test_rawconference_two_way_shm);
  //suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrawconference_errors");
  tcase_add_test (tc_chain, test_rawconference_errors);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrawconference_recv_only");
  tcase_add_test (tc_chain, test_rawconference_recv_only);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrawconference_send_only");
  tcase_add_test (tc_chain, test_rawconference_send_only);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrawconference_change_to_send_only");
  tcase_add_test (tc_chain, test_rawconference_change_to_send_only);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsrawconference_dispose");
  tcase_add_test (tc_chain, test_rawconference_dispose);
  suite_add_tcase (s, tc_chain);

  return s;
}

GST_CHECK_MAIN (fsrawconference);
farstream-0.2.7/tests/check/msn/0000775000076400007640000000000012462323000013523 500000000000000farstream-0.2.7/tests/check/msn/conference.c0000664000076400007640000002771512401500475015740 00000000000000/* Farstream unit tests for FsMsnConference
 *
 * Copyright (C) 2009 Collabora
 * @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
*/

#ifdef HAVE_CONFIG_H
# include 
#endif

#include 
#include 

#include "check-threadsafe.h"

GMainLoop *loop;
int count = 0;

#define WAITING_ON_LAST_CODEC   (1<<0)
#define SHOULD_BE_LAST_CODEC    (1<<1)
#define HAS_BEEN_RESET          (1<<2)

gint max_buffer_count = 20;


struct SimpleMsnConference {
  GstElement *pipeline;
  FsConference *conf;
  FsSession *session;
  FsParticipant *part;
  FsStream *stream;

  struct SimpleMsnConference *target;
  FsStreamDirection direction;
};

static gboolean
bus_watch (GstBus *bus, GstMessage *message, gpointer user_data)
{
  struct SimpleMsnConference *dat = user_data;

  switch (GST_MESSAGE_TYPE (message))
  {
    case GST_MESSAGE_ELEMENT:
      {
        const GstStructure *s = gst_message_get_structure (message);
        ts_fail_if (s==NULL, "NULL structure in element message");
        if (gst_structure_has_name (s, "farstream-error"))
        {
          const GValue *value;
          FsError errorno;
          const gchar *error;

          ts_fail_unless (
              gst_structure_has_field_typed (s, "src-object", G_TYPE_OBJECT),
              "farstream-error structure has no src-object field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "error-no", FS_TYPE_ERROR),
              "farstream-error structure has no src-object field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "error-msg", G_TYPE_STRING),
              "farstream-error structure has no src-object field");

          value = gst_structure_get_value (s, "error-no");
          errorno = g_value_get_enum (value);
          error = gst_structure_get_string (s, "error-msg");

          ts_fail ("Error on BUS (%d) %s", errorno, error);
        }
        else if (gst_structure_has_name (s, "farstream-new-local-candidate"))
        {
          FsStream *stream;
          FsCandidate *candidate;
          const GValue *value;

          ts_fail_unless (
              gst_structure_has_field_typed (s, "stream", FS_TYPE_STREAM),
              "farstream-new-local-candidate structure has no stream field");
          ts_fail_unless (
              gst_structure_has_field_typed (s, "candidate", FS_TYPE_CANDIDATE),
              "farstream-new-local-candidate structure has no candidate field");

          value = gst_structure_get_value (s, "stream");
          stream = g_value_get_object (value);

          value = gst_structure_get_value (s, "candidate");
          candidate = g_value_get_boxed (value);

          ts_fail_unless (stream && candidate, "new-local-candidate with NULL"
              " stream(%p) or candidate(%p)", stream, candidate);

          if (dat->target)
          {
            GError *error = NULL;
            GList *list = g_list_append (NULL, candidate);
            gboolean add_remote_candidates_res;

            GST_DEBUG ("Setting candidate: %s %d",
                candidate->ip, candidate->port);
            add_remote_candidates_res = fs_stream_add_remote_candidates (
                dat->target->stream, list, &error);
            ts_fail_unless (add_remote_candidates_res,
                "Could not set remote candidate: %s",
                error ? error->message : "No GError");
            ts_fail_unless (error == NULL);
            g_list_free (list);
          }
        }
      }
      break;
    case GST_MESSAGE_ERROR:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_error (message, &error, &debug);

        ts_fail ("Got an error on the BUS (%d): %s (%s)", error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    case GST_MESSAGE_WARNING:
      {
        GError *error = NULL;
        gchar *debug = NULL;
        gst_message_parse_warning (message, &error, &debug);

        GST_DEBUG ("%d: Got a warning on the BUS: %s (%s)",
            error->code,
            error->message, debug);
        g_error_free (error);
        g_free (debug);
      }
      break;
    default:
      break;
  }

  return TRUE;
}

static GstPadProbeReturn
pad_probe_cb (GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
{
  count++;

  if (count > 20)
    g_main_loop_quit (loop);

  return GST_PAD_PROBE_OK;
}

static void
stream_src_pad_added (FsStream *stream, GstPad *pad, FsCodec *codec,
    struct SimpleMsnConference *dat)
{
  GstElement *sink = gst_element_factory_make ("fakesink", NULL);
  GstPad *sinkpad;

  GST_DEBUG ("pad added");

  ts_fail_unless (sink != NULL);

  ts_fail_unless (gst_bin_add (GST_BIN (dat->pipeline), sink));

  sinkpad = gst_element_get_static_pad (sink, "sink");
  ts_fail_unless (sinkpad != NULL);

  gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_BUFFER, pad_probe_cb, dat,
    NULL);

  ts_fail_if (GST_PAD_LINK_FAILED (gst_pad_link (pad, sinkpad)));

  gst_object_unref (sinkpad);

  ts_fail_if (gst_element_set_state (sink, GST_STATE_PLAYING) ==
      GST_STATE_CHANGE_FAILURE);

}

struct SimpleMsnConference *
setup_conference (FsStreamDirection dir, struct SimpleMsnConference *target)
{
  struct SimpleMsnConference *dat = g_new0 (struct SimpleMsnConference, 1);
  GError *error = NULL;
  GstBus *bus;
  GParameter param = {NULL, {0}};
  gint n_params = 0;
  guint tos;

  dat->target = target;
  dat->direction = dir;

  dat->pipeline = gst_pipeline_new (NULL);

  bus = gst_element_get_bus (dat->pipeline);
  gst_bus_add_watch (bus, bus_watch, dat);
  gst_object_unref (bus);

  if (dir == FS_DIRECTION_SEND)
    dat->conf = FS_CONFERENCE (
        gst_element_factory_make ("fsmsncamsendconference", NULL));
  else
    dat->conf = FS_CONFERENCE (
        gst_element_factory_make ("fsmsncamrecvconference", NULL));
  ts_fail_unless (dat->conf != NULL);

  ts_fail_unless (gst_bin_add (GST_BIN (dat->pipeline),
          GST_ELEMENT (dat->conf)));

  dat->part = fs_conference_new_participant (dat->conf, &error);
  ts_fail_unless (error == NULL, "Error: %s", error ? error->message: "");
  ts_fail_unless (dat->part != NULL);

  dat->session = fs_conference_new_session (dat->conf, FS_MEDIA_TYPE_VIDEO,
      &error);
  ts_fail_unless (dat->session != NULL, "Session create error: %s:",
      error ? error->message : "No GError");
  ts_fail_unless (error == NULL);

  g_object_set (dat->session, "tos", 2, NULL);
  g_object_get (dat->session, "tos", &tos, NULL);
  ts_fail_unless (tos == 2);

  if (dir == FS_DIRECTION_SEND)
  {
    GstPad *sinkpad, *srcpad;
    GstElement *src;
    src = gst_element_factory_make ("videotestsrc", NULL);
    ts_fail_unless (src != NULL);
    g_object_set (src, "is-live", TRUE, NULL);
    ts_fail_unless (gst_bin_add (GST_BIN (dat->pipeline),
            GST_ELEMENT (src)));

    g_object_get (dat->session, "sink-pad", &sinkpad, NULL);
    ts_fail_if (sinkpad == NULL);
    srcpad = gst_element_get_static_pad (src, "src");
    ts_fail_if (srcpad == NULL);

    ts_fail_if (GST_PAD_LINK_FAILED (gst_pad_link ( srcpad, sinkpad)));
    gst_object_unref (srcpad);
    gst_object_unref (sinkpad);
  }

  if (target)
  {
    guint session_id = 0;
    n_params = 1;
    g_object_get (target->stream, "session-id", &session_id, NULL);
    ts_fail_unless (session_id >= 9000 && session_id < 10000);
    param.name = "session-id";
    g_value_init (¶m.value, G_TYPE_UINT);
    g_value_set_uint (¶m.value, session_id);
  }

  dat->stream = fs_session_new_stream (dat->session, dat->part, dir, &error);
  ts_fail_unless (dat->stream != NULL);
  ts_fail_unless (error == NULL);

  fail_unless (fs_stream_set_transmitter (dat->stream, NULL, ¶m, n_params,
          &error));
  fail_unless (error == NULL);

  g_signal_connect (dat->stream, "src-pad-added",
      G_CALLBACK (stream_src_pad_added), dat);

  ts_fail_if (gst_element_set_state (dat->pipeline, GST_STATE_PLAYING) ==
      GST_STATE_CHANGE_FAILURE);

  return dat;
}

static void
free_conference (struct SimpleMsnConference *dat)
{
  ts_fail_if (gst_element_set_state (dat->pipeline, GST_STATE_NULL) ==
      GST_STATE_CHANGE_FAILURE);

  fs_session_destroy (dat->session);
  gst_object_unref (dat->stream);
  gst_object_unref (dat->session);
  gst_object_unref (dat->part);
  gst_object_unref (dat->pipeline);

  free (dat);
}


GST_START_TEST (test_msnconference_new)
{
  struct SimpleMsnConference *senddat = setup_conference (FS_DIRECTION_SEND,
      NULL);
  struct SimpleMsnConference *recvdat = setup_conference (FS_DIRECTION_RECV,
      NULL);


  free_conference (senddat);
  free_conference (recvdat);
}
GST_END_TEST;



GST_START_TEST (test_msnconference_send_to_recv)
{
  struct SimpleMsnConference *senddat = setup_conference (FS_DIRECTION_SEND,
      NULL);
  struct SimpleMsnConference *recvdat = setup_conference (FS_DIRECTION_RECV,
      senddat);

  loop = g_main_loop_new (NULL, FALSE);

  g_main_loop_run (loop);

  free_conference (senddat);
  free_conference (recvdat);
  g_main_loop_unref (loop);
}
GST_END_TEST;


GST_START_TEST (test_msnconference_recv_to_send)
{
  struct SimpleMsnConference *recvdat = setup_conference (FS_DIRECTION_RECV,
      NULL);
  struct SimpleMsnConference *senddat = setup_conference (FS_DIRECTION_SEND,
      recvdat);

  loop = g_main_loop_new (NULL, FALSE);

  g_main_loop_run (loop);

  free_conference (senddat);
  free_conference (recvdat);
  g_main_loop_unref (loop);
}
GST_END_TEST;


GST_START_TEST (test_msnconference_error)
{
  struct SimpleMsnConference *dat = setup_conference (FS_DIRECTION_SEND,
      NULL);
  GError *error = NULL;

  ts_fail_unless (
      fs_conference_new_participant (dat->conf, &error) == NULL);
  ts_fail_unless (error->domain == FS_ERROR &&
      error->code == FS_ERROR_ALREADY_EXISTS);
  g_clear_error (&error);


  ts_fail_unless (
      fs_conference_new_session (dat->conf, FS_MEDIA_TYPE_VIDEO, &error) == NULL);
  ts_fail_unless (error->domain == FS_ERROR &&
      error->code == FS_ERROR_ALREADY_EXISTS);
  g_clear_error (&error);


  ts_fail_unless (
      fs_session_new_stream (dat->session, dat->part, FS_DIRECTION_SEND,
          &error) == NULL);
  ts_fail_unless (error->domain == FS_ERROR &&
      error->code == FS_ERROR_ALREADY_EXISTS);
  g_clear_error (&error);

  fail_unless (fs_stream_set_transmitter (dat->stream, NULL, NULL, 0,
          &error));
  fail_unless (error == NULL);


  free_conference (dat);
}
GST_END_TEST;

static Suite *
fsmsnconference_suite (void)
{
  Suite *s = suite_create ("fsmsnconference");
  TCase *tc_chain;
  GLogLevelFlags fatal_mask;

  fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
  fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
  g_log_set_always_fatal (fatal_mask);

  tc_chain = tcase_create ("fsmsnconference_new");
  tcase_add_test (tc_chain, test_msnconference_new);
  suite_add_tcase (s, tc_chain);


  tc_chain = tcase_create ("fsmsnconference_send_to_recv");
  tcase_add_test (tc_chain, test_msnconference_send_to_recv);
  suite_add_tcase (s, tc_chain);

  tc_chain = tcase_create ("fsmsnconference_recv_to_send");
  tcase_add_test (tc_chain, test_msnconference_recv_to_send);
  suite_add_tcase (s, tc_chain);


  tc_chain = tcase_create ("fsmsnconference_error");
  tcase_add_test (tc_chain, test_msnconference_error);
  suite_add_tcase (s, tc_chain);


  return s;
}

GST_CHECK_MAIN (fsmsnconference);
farstream-0.2.7/ltmain.sh0000644000076400007640000105152212212131156012255 00000000000000
# libtool (GNU libtool) 2.4.2
# Written by Gordon Matzigkeit , 1996

# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 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.

# GNU Libtool 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.
#
# As a special exception to the GNU General Public License,
# if you distribute this file as part of a program or library that
# is built using GNU Libtool, you may include this file under the
# same distribution terms that you use for the rest of that program.
#
# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
# or obtained by writing to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# Usage: $progname [OPTION]... [MODE-ARG]...
#
# Provide generalized library-building support services.
#
#       --config             show all configuration variables
#       --debug              enable verbose shell tracing
#   -n, --dry-run            display commands without modifying any files
#       --features           display basic configuration information and exit
#       --mode=MODE          use operation mode MODE
#       --preserve-dup-deps  don't remove duplicate dependency libraries
#       --quiet, --silent    don't print informational messages
#       --no-quiet, --no-silent
#                            print informational messages (default)
#       --no-warn            don't display warning messages
#       --tag=TAG            use configuration variables from tag TAG
#   -v, --verbose            print more informational messages than default
#       --no-verbose         don't print the extra informational messages
#       --version            print version information
#   -h, --help, --help-all   print short, long, or detailed help message
#
# MODE must be one of the following:
#
#         clean              remove files from the build directory
#         compile            compile a source file into a libtool object
#         execute            automatically set library path, then run a program
#         finish             complete the installation of libtool libraries
#         install            install libraries or executables
#         link               create a library or an executable
#         uninstall          remove libraries from an installed directory
#
# MODE-ARGS vary depending on the MODE.  When passed as first option,
# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
#
# When reporting a bug, please describe a test case to reproduce it and
# include the following information:
#
#         host-triplet:	$host
#         shell:		$SHELL
#         compiler:		$LTCC
#         compiler flags:		$LTCFLAGS
#         linker:		$LD (gnu? $with_gnu_ld)
#         $progname:	(GNU libtool) 2.4.2
#         automake:	$automake_version
#         autoconf:	$autoconf_version
#
# Report bugs to .
# GNU libtool home page: .
# General help using GNU software: .

PROGRAM=libtool
PACKAGE=libtool
VERSION=2.4.2
TIMESTAMP=""
package_revision=1.3337

# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh

# A function that is used when there is no print builtin or printf.
func_fallback_echo ()
{
  eval 'cat <<_LTECHO_EOF
$1
_LTECHO_EOF'
}

# NLS nuisances: We save the old values to restore during execute mode.
lt_user_locale=
lt_safe_locale=
for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
do
  eval "if test \"\${$lt_var+set}\" = set; then
          save_$lt_var=\$$lt_var
          $lt_var=C
	  export $lt_var
	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
	fi"
done
LC_ALL=C
LANGUAGE=C
export LANGUAGE LC_ALL

$lt_unset CDPATH


# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
# is ksh but when the shell is invoked as "sh" and the current value of
# the _XPG environment variable is not equal to 1 (one), the special
# positional parameter $0, within a function call, is the name of the
# function.
progpath="$0"



: ${CP="cp -f"}
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
: ${Xsed="$SED -e 1s/^X//"}

# Global variables:
EXIT_SUCCESS=0
EXIT_FAILURE=1
EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.

exit_status=$EXIT_SUCCESS

# Make sure IFS has a sensible default
lt_nl='
'
IFS=" 	$lt_nl"

dirname="s,/[^/]*$,,"
basename="s,^.*/,,"

# 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 ()
{
    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
    if test "X$func_dirname_result" = "X${1}"; then
      func_dirname_result="${3}"
    else
      func_dirname_result="$func_dirname_result${2}"
    fi
} # func_dirname may be replaced by extended shell implementation


# func_basename file
func_basename ()
{
    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
} # func_basename may be replaced by extended shell implementation


# 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 ()
{
    # Extract subdirectory from the argument.
    func_dirname_result=`$ECHO "${1}" | $SED -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_result=`$ECHO "${1}" | $SED -e "$basename"`
} # func_dirname_and_basename may be replaced by extended shell implementation


# 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 "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
    esac
} # func_stripname may be replaced by extended shell implementation


# These SED scripts presuppose an absolute path with a trailing slash.
pathcar='s,^/\([^/]*\).*$,\1,'
pathcdr='s,^/[^/]*,,'
removedotparts=':dotsl
		s@/\./@/@g
		t dotsl
		s,/\.$,/,'
collapseslashes='s@/\{1,\}@/@g'
finalslash='s,/*$,/,'

# func_normal_abspath PATH
# Remove doubled-up and trailing slashes, "." path components,
# and cancel out any ".." path components in PATH after making
# it an absolute path.
#             value returned in "$func_normal_abspath_result"
func_normal_abspath ()
{
  # Start from root dir and reassemble the path.
  func_normal_abspath_result=
  func_normal_abspath_tpath=$1
  func_normal_abspath_altnamespace=
  case $func_normal_abspath_tpath in
    "")
      # Empty path, that just means $cwd.
      func_stripname '' '/' "`pwd`"
      func_normal_abspath_result=$func_stripname_result
      return
    ;;
    # The next three entries are used to spot a run of precisely
    # two leading slashes without using negated character classes;
    # we take advantage of case's first-match behaviour.
    ///*)
      # Unusual form of absolute path, do nothing.
    ;;
    //*)
      # Not necessarily an ordinary path; POSIX reserves leading '//'
      # and for example Cygwin uses it to access remote file shares
      # over CIFS/SMB, so we conserve a leading double slash if found.
      func_normal_abspath_altnamespace=/
    ;;
    /*)
      # Absolute path, do nothing.
    ;;
    *)
      # Relative path, prepend $cwd.
      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
    ;;
  esac
  # Cancel out all the simple stuff to save iterations.  We also want
  # the path to end with a slash for ease of parsing, so make sure
  # there is one (and only one) here.
  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
  while :; do
    # Processed it all yet?
    if test "$func_normal_abspath_tpath" = / ; then
      # If we ascended to the root using ".." the result may be empty now.
      if test -z "$func_normal_abspath_result" ; then
        func_normal_abspath_result=/
      fi
      break
    fi
    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
        -e "$pathcar"`
    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
        -e "$pathcdr"`
    # Figure out what to do with it
    case $func_normal_abspath_tcomponent in
      "")
        # Trailing empty path component, ignore it.
      ;;
      ..)
        # Parent dir; strip last assembled component from result.
        func_dirname "$func_normal_abspath_result"
        func_normal_abspath_result=$func_dirname_result
      ;;
      *)
        # Actual path component, append it.
        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
      ;;
    esac
  done
  # Restore leading double-slash if one was found on entry.
  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
}

# func_relative_path SRCDIR DSTDIR
# generates a relative path from SRCDIR to DSTDIR, with a trailing
# slash if non-empty, suitable for immediately appending a filename
# without needing to append a separator.
#             value returned in "$func_relative_path_result"
func_relative_path ()
{
  func_relative_path_result=
  func_normal_abspath "$1"
  func_relative_path_tlibdir=$func_normal_abspath_result
  func_normal_abspath "$2"
  func_relative_path_tbindir=$func_normal_abspath_result

  # Ascend the tree starting from libdir
  while :; do
    # check if we have found a prefix of bindir
    case $func_relative_path_tbindir in
      $func_relative_path_tlibdir)
        # found an exact match
        func_relative_path_tcancelled=
        break
        ;;
      $func_relative_path_tlibdir*)
        # found a matching prefix
        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
        func_relative_path_tcancelled=$func_stripname_result
        if test -z "$func_relative_path_result"; then
          func_relative_path_result=.
        fi
        break
        ;;
      *)
        func_dirname $func_relative_path_tlibdir
        func_relative_path_tlibdir=${func_dirname_result}
        if test "x$func_relative_path_tlibdir" = x ; then
          # Have to descend all the way to the root!
          func_relative_path_result=../$func_relative_path_result
          func_relative_path_tcancelled=$func_relative_path_tbindir
          break
        fi
        func_relative_path_result=../$func_relative_path_result
        ;;
    esac
  done

  # Now calculate path; take care to avoid doubling-up slashes.
  func_stripname '' '/' "$func_relative_path_result"
  func_relative_path_result=$func_stripname_result
  func_stripname '/' '/' "$func_relative_path_tcancelled"
  if test "x$func_stripname_result" != x ; then
    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
  fi

  # Normalisation. If bindir is libdir, return empty string,
  # else relative path ending with a slash; either way, target
  # file name can be directly appended.
  if test ! -z "$func_relative_path_result"; then
    func_stripname './' '' "$func_relative_path_result/"
    func_relative_path_result=$func_stripname_result
  fi
}

# The name of this program:
func_dirname_and_basename "$progpath"
progname=$func_basename_result

# Make sure we have an absolute path for reexecution:
case $progpath in
  [\\/]*|[A-Za-z]:\\*) ;;
  *[\\/]*)
     progdir=$func_dirname_result
     progdir=`cd "$progdir" && pwd`
     progpath="$progdir/$progname"
     ;;
  *)
     save_IFS="$IFS"
     IFS=${PATH_SEPARATOR-:}
     for progdir in $PATH; do
       IFS="$save_IFS"
       test -x "$progdir/$progname" && break
     done
     IFS="$save_IFS"
     test -n "$progdir" || progdir=`pwd`
     progpath="$progdir/$progname"
     ;;
esac

# Sed substitution that helps us do robust quoting.  It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([`"$\\]\)/\\\1/g'

# Same as above, but do not quote variable references.
double_quote_subst='s/\(["`\\]\)/\\\1/g'

# Sed substitution that turns a string into a regex matching for the
# string literally.
sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'

# Sed substitution that converts a w32 file name or path
# which contains forward slashes, into one that contains
# (escaped) backslashes.  A very naive implementation.
lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'

# Re-`\' parameter expansions in output of double_quote_subst that were
# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
# in input to double_quote_subst, that '$' was protected from expansion.
# Since each input `\' is now two `\'s, look for any number of runs of
# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
bs='\\'
bs2='\\\\'
bs4='\\\\\\\\'
dollar='\$'
sed_double_backslash="\
  s/$bs4/&\\
/g
  s/^$bs2$dollar/$bs&/
  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
  s/\n//g"

# Standard options:
opt_dry_run=false
opt_help=false
opt_quiet=false
opt_verbose=false
opt_warning=:

# func_echo arg...
# Echo program name prefixed message, along with the current mode
# name if it has been set yet.
func_echo ()
{
    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
}

# func_verbose arg...
# Echo program name prefixed message in verbose mode only.
func_verbose ()
{
    $opt_verbose && func_echo ${1+"$@"}

    # A bug in bash halts the script if the last line of a function
    # fails when set -e is in force, so we need another command to
    # work around that:
    :
}

# func_echo_all arg...
# Invoke $ECHO with all args, space-separated.
func_echo_all ()
{
    $ECHO "$*"
}

# func_error arg...
# Echo program name prefixed message to standard error.
func_error ()
{
    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
}

# func_warning arg...
# Echo program name prefixed warning message to standard error.
func_warning ()
{
    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2

    # bash bug again:
    :
}

# func_fatal_error arg...
# Echo program name prefixed message to standard error, and exit.
func_fatal_error ()
{
    func_error ${1+"$@"}
    exit $EXIT_FAILURE
}

# func_fatal_help arg...
# Echo program name prefixed message to standard error, followed by
# a help hint, and exit.
func_fatal_help ()
{
    func_error ${1+"$@"}
    func_fatal_error "$help"
}
help="Try \`$progname --help' for more information."  ## default


# func_grep expression filename
# Check whether EXPRESSION matches any line of FILENAME, without output.
func_grep ()
{
    $GREP "$1" "$2" >/dev/null 2>&1
}


# func_mkdir_p directory-path
# Make sure the entire path to DIRECTORY-PATH is available.
func_mkdir_p ()
{
    my_directory_path="$1"
    my_dir_list=

    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then

      # Protect directory names starting with `-'
      case $my_directory_path in
        -*) my_directory_path="./$my_directory_path" ;;
      esac

      # While some portion of DIR does not yet exist...
      while test ! -d "$my_directory_path"; do
        # ...make a list in topmost first order.  Use a colon delimited
	# list incase some portion of path contains whitespace.
        my_dir_list="$my_directory_path:$my_dir_list"

        # If the last portion added has no slash in it, the list is done
        case $my_directory_path in */*) ;; *) break ;; esac

        # ...otherwise throw away the child directory and loop
        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
      done
      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`

      save_mkdir_p_IFS="$IFS"; IFS=':'
      for my_dir in $my_dir_list; do
	IFS="$save_mkdir_p_IFS"
        # mkdir can fail with a `File exist' error if two processes
        # try to create one of the directories concurrently.  Don't
        # stop in that case!
        $MKDIR "$my_dir" 2>/dev/null || :
      done
      IFS="$save_mkdir_p_IFS"

      # Bail out if we (or some other process) failed to create a directory.
      test -d "$my_directory_path" || \
        func_fatal_error "Failed to create \`$1'"
    fi
}


# func_mktempdir [string]
# Make a temporary directory that won't clash with other running
# libtool processes, and avoids race conditions if possible.  If
# given, STRING is the basename for that directory.
func_mktempdir ()
{
    my_template="${TMPDIR-/tmp}/${1-$progname}"

    if test "$opt_dry_run" = ":"; then
      # Return a directory name, but don't create it in dry-run mode
      my_tmpdir="${my_template}-$$"
    else

      # If mktemp works, use that first and foremost
      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`

      if test ! -d "$my_tmpdir"; then
        # Failing that, at least try and use $RANDOM to avoid a race
        my_tmpdir="${my_template}-${RANDOM-0}$$"

        save_mktempdir_umask=`umask`
        umask 0077
        $MKDIR "$my_tmpdir"
        umask $save_mktempdir_umask
      fi

      # If we're not in dry-run mode, bomb out on failure
      test -d "$my_tmpdir" || \
        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
    fi

    $ECHO "$my_tmpdir"
}


# func_quote_for_eval arg
# Aesthetically quote ARG to be evaled later.
# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
# is double-quoted, suitable for a subsequent eval, whereas
# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
# which are still active within double quotes backslashified.
func_quote_for_eval ()
{
    case $1 in
      *[\\\`\"\$]*)
	func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
      *)
        func_quote_for_eval_unquoted_result="$1" ;;
    esac

    case $func_quote_for_eval_unquoted_result in
      # Double-quote args containing shell metacharacters to delay
      # word splitting, command substitution and and variable
      # expansion for a subsequent eval.
      # Many Bourne shells cannot handle close brackets correctly
      # in scan sets, so we specify it separately.
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
        ;;
      *)
        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
    esac
}


# func_quote_for_expand arg
# Aesthetically quote ARG to be evaled later; same as above,
# but do not quote variable references.
func_quote_for_expand ()
{
    case $1 in
      *[\\\`\"]*)
	my_arg=`$ECHO "$1" | $SED \
	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
      *)
        my_arg="$1" ;;
    esac

    case $my_arg in
      # Double-quote args containing shell metacharacters to delay
      # word splitting and command substitution for a subsequent eval.
      # Many Bourne shells cannot handle close brackets correctly
      # in scan sets, so we specify it separately.
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
        my_arg="\"$my_arg\""
        ;;
    esac

    func_quote_for_expand_result="$my_arg"
}


# func_show_eval cmd [fail_exp]
# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.
func_show_eval ()
{
    my_cmd="$1"
    my_fail_exp="${2-:}"

    ${opt_silent-false} || {
      func_quote_for_expand "$my_cmd"
      eval "func_echo $func_quote_for_expand_result"
    }

    if ${opt_dry_run-false}; then :; else
      eval "$my_cmd"
      my_status=$?
      if test "$my_status" -eq 0; then :; else
	eval "(exit $my_status); $my_fail_exp"
      fi
    fi
}


# func_show_eval_locale cmd [fail_exp]
# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.  Use the saved locale for evaluation.
func_show_eval_locale ()
{
    my_cmd="$1"
    my_fail_exp="${2-:}"

    ${opt_silent-false} || {
      func_quote_for_expand "$my_cmd"
      eval "func_echo $func_quote_for_expand_result"
    }

    if ${opt_dry_run-false}; then :; else
      eval "$lt_user_locale
	    $my_cmd"
      my_status=$?
      eval "$lt_safe_locale"
      if test "$my_status" -eq 0; then :; else
	eval "(exit $my_status); $my_fail_exp"
      fi
    fi
}

# func_tr_sh
# Turn $1 into a string suitable for a shell variable name.
# Result is stored in $func_tr_sh_result.  All characters
# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
# if $1 begins with a digit, a '_' is prepended as well.
func_tr_sh ()
{
  case $1 in
  [0-9]* | *[!a-zA-Z0-9_]*)
    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
    ;;
  * )
    func_tr_sh_result=$1
    ;;
  esac
}


# func_version
# Echo version message to standard output and exit.
func_version ()
{
    $opt_debug

    $SED -n '/(C)/!b go
	:more
	/\./!{
	  N
	  s/\n# / /
	  b more
	}
	:go
	/^# '$PROGRAM' (GNU /,/# warranty; / {
        s/^# //
	s/^# *$//
        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
        p
     }' < "$progpath"
     exit $?
}

# func_usage
# Echo short help message to standard output and exit.
func_usage ()
{
    $opt_debug

    $SED -n '/^# Usage:/,/^#  *.*--help/ {
        s/^# //
	s/^# *$//
	s/\$progname/'$progname'/
	p
    }' < "$progpath"
    echo
    $ECHO "run \`$progname --help | more' for full usage"
    exit $?
}

# func_help [NOEXIT]
# Echo long help message to standard output and exit,
# unless 'noexit' is passed as argument.
func_help ()
{
    $opt_debug

    $SED -n '/^# Usage:/,/# Report bugs to/ {
	:print
        s/^# //
	s/^# *$//
	s*\$progname*'$progname'*
	s*\$host*'"$host"'*
	s*\$SHELL*'"$SHELL"'*
	s*\$LTCC*'"$LTCC"'*
	s*\$LTCFLAGS*'"$LTCFLAGS"'*
	s*\$LD*'"$LD"'*
	s/\$with_gnu_ld/'"$with_gnu_ld"'/
	s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
	p
	d
     }
     /^# .* home page:/b print
     /^# General help using/b print
     ' < "$progpath"
    ret=$?
    if test -z "$1"; then
      exit $ret
    fi
}

# func_missing_arg argname
# Echo program name prefixed message to standard error and set global
# exit_cmd.
func_missing_arg ()
{
    $opt_debug

    func_error "missing argument for $1."
    exit_cmd=exit
}


# func_split_short_opt shortopt
# Set func_split_short_opt_name and func_split_short_opt_arg shell
# variables after splitting SHORTOPT after the 2nd character.
func_split_short_opt ()
{
    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'

    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
} # func_split_short_opt may be replaced by extended shell implementation


# func_split_long_opt longopt
# Set func_split_long_opt_name and func_split_long_opt_arg shell
# variables after splitting LONGOPT at the `=' sign.
func_split_long_opt ()
{
    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
    my_sed_long_arg='1s/^--[^=]*=//'

    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
} # func_split_long_opt may be replaced by extended shell implementation

exit_cmd=:





magic="%%%MAGIC variable%%%"
magic_exe="%%%MAGIC EXE variable%%%"

# Global variables.
nonopt=
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
extracted_archives=
extracted_serial=0

# If this variable is set in any of the actions, the command in it
# will be execed at the end.  This prevents here-documents from being
# left over by shells.
exec_cmd=

# func_append var value
# Append VALUE to the end of shell variable VAR.
func_append ()
{
    eval "${1}=\$${1}\${2}"
} # func_append may be replaced by extended shell implementation

# func_append_quoted var value
# Quote VALUE and append to the end of shell variable VAR, separated
# by a space.
func_append_quoted ()
{
    func_quote_for_eval "${2}"
    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
} # func_append_quoted may be replaced by extended shell implementation


# func_arith arithmetic-term...
func_arith ()
{
    func_arith_result=`expr "${@}"`
} # func_arith may be replaced by extended shell implementation


# func_len string
# STRING may not start with a hyphen.
func_len ()
{
    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
} # func_len may be replaced by extended shell implementation


# func_lo2o object
func_lo2o ()
{
    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
} # func_lo2o may be replaced by extended shell implementation


# func_xform libobj-or-source
func_xform ()
{
    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
} # func_xform may be replaced by extended shell implementation


# func_fatal_configuration arg...
# Echo program name prefixed message to standard error, followed by
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
    func_error ${1+"$@"}
    func_error "See the $PACKAGE documentation for more information."
    func_fatal_error "Fatal configuration error."
}


# func_config
# Display the configuration for all the tags in this script.
func_config ()
{
    re_begincf='^# ### BEGIN LIBTOOL'
    re_endcf='^# ### END LIBTOOL'

    # Default configuration.
    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"

    # Now print the configurations for the tags.
    for tagname in $taglist; do
      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
    done

    exit $?
}

# func_features
# Display the features supported by this script.
func_features ()
{
    echo "host: $host"
    if test "$build_libtool_libs" = yes; then
      echo "enable shared libraries"
    else
      echo "disable shared libraries"
    fi
    if test "$build_old_libs" = yes; then
      echo "enable static libraries"
    else
      echo "disable static libraries"
    fi

    exit $?
}

# func_enable_tag tagname
# Verify that TAGNAME is valid, and either flag an error and exit, or
# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
# variable here.
func_enable_tag ()
{
  # Global variable:
  tagname="$1"

  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
  sed_extractcf="/$re_begincf/,/$re_endcf/p"

  # Validate tagname.
  case $tagname in
    *[!-_A-Za-z0-9,/]*)
      func_fatal_error "invalid tag name: $tagname"
      ;;
  esac

  # Don't test for the "default" C tag, as we know it's
  # there but not specially marked.
  case $tagname in
    CC) ;;
    *)
      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
	taglist="$taglist $tagname"

	# Evaluate the configuration.  Be careful to quote the path
	# and the sed script, to avoid splitting on whitespace, but
	# also don't use non-portable quotes within backquotes within
	# quotes we have to do it in 2 steps:
	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
	eval "$extractedcf"
      else
	func_error "ignoring unknown tag $tagname"
      fi
      ;;
  esac
}

# func_check_version_match
# Ensure that we are using m4 macros, and libtool script from the same
# release of libtool.
func_check_version_match ()
{
  if test "$package_revision" != "$macro_revision"; then
    if test "$VERSION" != "$macro_version"; then
      if test -z "$macro_version"; then
        cat >&2 <<_LT_EOF
$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from an older release.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
      else
        cat >&2 <<_LT_EOF
$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
      fi
    else
      cat >&2 <<_LT_EOF
$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
$progname: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
$progname: of $PACKAGE $VERSION and run autoconf again.
_LT_EOF
    fi

    exit $EXIT_MISMATCH
  fi
}


# Shorthand for --mode=foo, only valid as the first argument
case $1 in
clean|clea|cle|cl)
  shift; set dummy --mode clean ${1+"$@"}; shift
  ;;
compile|compil|compi|comp|com|co|c)
  shift; set dummy --mode compile ${1+"$@"}; shift
  ;;
execute|execut|execu|exec|exe|ex|e)
  shift; set dummy --mode execute ${1+"$@"}; shift
  ;;
finish|finis|fini|fin|fi|f)
  shift; set dummy --mode finish ${1+"$@"}; shift
  ;;
install|instal|insta|inst|ins|in|i)
  shift; set dummy --mode install ${1+"$@"}; shift
  ;;
link|lin|li|l)
  shift; set dummy --mode link ${1+"$@"}; shift
  ;;
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
  shift; set dummy --mode uninstall ${1+"$@"}; shift
  ;;
esac



# Option defaults:
opt_debug=:
opt_dry_run=false
opt_config=false
opt_preserve_dup_deps=false
opt_features=false
opt_finish=false
opt_help=false
opt_help_all=false
opt_silent=:
opt_warning=:
opt_verbose=:
opt_silent=false
opt_verbose=false


# Parse options once, thoroughly.  This comes as soon as possible in the
# script to make things like `--version' happen as quickly as we can.
{
  # this just eases exit handling
  while test $# -gt 0; do
    opt="$1"
    shift
    case $opt in
      --debug|-x)	opt_debug='set -x'
			func_echo "enabling shell trace mode"
			$opt_debug
			;;
      --dry-run|--dryrun|-n)
			opt_dry_run=:
			;;
      --config)
			opt_config=:
func_config
			;;
      --dlopen|-dlopen)
			optarg="$1"
			opt_dlopen="${opt_dlopen+$opt_dlopen
}$optarg"
			shift
			;;
      --preserve-dup-deps)
			opt_preserve_dup_deps=:
			;;
      --features)
			opt_features=:
func_features
			;;
      --finish)
			opt_finish=:
set dummy --mode finish ${1+"$@"}; shift
			;;
      --help)
			opt_help=:
			;;
      --help-all)
			opt_help_all=:
opt_help=': help-all'
			;;
      --mode)
			test $# = 0 && func_missing_arg $opt && break
			optarg="$1"
			opt_mode="$optarg"
case $optarg in
  # Valid mode arguments:
  clean|compile|execute|finish|install|link|relink|uninstall) ;;

  # Catch anything else as an error
  *) func_error "invalid argument for $opt"
     exit_cmd=exit
     break
     ;;
esac
			shift
			;;
      --no-silent|--no-quiet)
			opt_silent=false
func_append preserve_args " $opt"
			;;
      --no-warning|--no-warn)
			opt_warning=false
func_append preserve_args " $opt"
			;;
      --no-verbose)
			opt_verbose=false
func_append preserve_args " $opt"
			;;
      --silent|--quiet)
			opt_silent=:
func_append preserve_args " $opt"
        opt_verbose=false
			;;
      --verbose|-v)
			opt_verbose=:
func_append preserve_args " $opt"
opt_silent=false
			;;
      --tag)
			test $# = 0 && func_missing_arg $opt && break
			optarg="$1"
			opt_tag="$optarg"
func_append preserve_args " $opt $optarg"
func_enable_tag "$optarg"
			shift
			;;

      -\?|-h)		func_usage				;;
      --help)		func_help				;;
      --version)	func_version				;;

      # Separate optargs to long options:
      --*=*)
			func_split_long_opt "$opt"
			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
			shift
			;;

      # Separate non-argument short options:
      -\?*|-h*|-n*|-v*)
			func_split_short_opt "$opt"
			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
			shift
			;;

      --)		break					;;
      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
    esac
  done

  # Validate options:

  # save first non-option argument
  if test "$#" -gt 0; then
    nonopt="$opt"
    shift
  fi

  # preserve --debug
  test "$opt_debug" = : || func_append preserve_args " --debug"

  case $host in
    *cygwin* | *mingw* | *pw32* | *cegcc*)
      # don't eliminate duplications in $postdeps and $predeps
      opt_duplicate_compiler_generated_deps=:
      ;;
    *)
      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
      ;;
  esac

  $opt_help || {
    # Sanity checks first:
    func_check_version_match

    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
      func_fatal_configuration "not configured to build any kind of library"
    fi

    # Darwin sucks
    eval std_shrext=\"$shrext_cmds\"

    # Only execute mode is allowed to have -dlopen flags.
    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
      func_error "unrecognized option \`-dlopen'"
      $ECHO "$help" 1>&2
      exit $EXIT_FAILURE
    fi

    # Change the help message to a mode-specific one.
    generic_help="$help"
    help="Try \`$progname --help --mode=$opt_mode' for more information."
  }


  # Bail if the options were screwed
  $exit_cmd $EXIT_FAILURE
}




## ----------- ##
##    Main.    ##
## ----------- ##

# func_lalib_p file
# True iff FILE is a libtool `.la' library or `.lo' object file.
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_lalib_p ()
{
    test -f "$1" &&
      $SED -e 4q "$1" 2>/dev/null \
        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
}

# func_lalib_unsafe_p file
# True iff FILE is a libtool `.la' library or `.lo' object file.
# This function implements the same check as func_lalib_p without
# resorting to external programs.  To this end, it redirects stdin and
# closes it afterwards, without saving the original file descriptor.
# As a safety measure, use it only where a negative result would be
# fatal anyway.  Works if `file' does not exist.
func_lalib_unsafe_p ()
{
    lalib_p=no
    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
	for lalib_p_l in 1 2 3 4
	do
	    read lalib_p_line
	    case "$lalib_p_line" in
		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
	    esac
	done
	exec 0<&5 5<&-
    fi
    test "$lalib_p" = yes
}

# func_ltwrapper_script_p file
# True iff FILE is a libtool wrapper script
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_script_p ()
{
    func_lalib_p "$1"
}

# func_ltwrapper_executable_p file
# True iff FILE is a libtool wrapper executable
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_executable_p ()
{
    func_ltwrapper_exec_suffix=
    case $1 in
    *.exe) ;;
    *) func_ltwrapper_exec_suffix=.exe ;;
    esac
    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
}

# func_ltwrapper_scriptname file
# Assumes file is an ltwrapper_executable
# uses $file to determine the appropriate filename for a
# temporary ltwrapper_script.
func_ltwrapper_scriptname ()
{
    func_dirname_and_basename "$1" "" "."
    func_stripname '' '.exe' "$func_basename_result"
    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
}

# func_ltwrapper_p file
# True iff FILE is a libtool wrapper script or wrapper executable
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_ltwrapper_p ()
{
    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
}


# func_execute_cmds commands fail_cmd
# Execute tilde-delimited COMMANDS.
# If FAIL_CMD is given, eval that upon failure.
# FAIL_CMD may read-access the current command in variable CMD!
func_execute_cmds ()
{
    $opt_debug
    save_ifs=$IFS; IFS='~'
    for cmd in $1; do
      IFS=$save_ifs
      eval cmd=\"$cmd\"
      func_show_eval "$cmd" "${2-:}"
    done
    IFS=$save_ifs
}


# func_source file
# Source FILE, adding directory component if necessary.
# Note that it is not necessary on cygwin/mingw to append a dot to
# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
# behavior happens only for exec(3), not for open(2)!  Also, sourcing
# `FILE.' does not work on cygwin managed mounts.
func_source ()
{
    $opt_debug
    case $1 in
    */* | *\\*)	. "$1" ;;
    *)		. "./$1" ;;
    esac
}


# func_resolve_sysroot PATH
# Replace a leading = in PATH with a sysroot.  Store the result into
# func_resolve_sysroot_result
func_resolve_sysroot ()
{
  func_resolve_sysroot_result=$1
  case $func_resolve_sysroot_result in
  =*)
    func_stripname '=' '' "$func_resolve_sysroot_result"
    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
    ;;
  esac
}

# func_replace_sysroot PATH
# If PATH begins with the sysroot, replace it with = and
# store the result into func_replace_sysroot_result.
func_replace_sysroot ()
{
  case "$lt_sysroot:$1" in
  ?*:"$lt_sysroot"*)
    func_stripname "$lt_sysroot" '' "$1"
    func_replace_sysroot_result="=$func_stripname_result"
    ;;
  *)
    # Including no sysroot.
    func_replace_sysroot_result=$1
    ;;
  esac
}

# func_infer_tag arg
# Infer tagged configuration to use if any are available and
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
    $opt_debug
    if test -n "$available_tags" && test -z "$tagname"; then
      CC_quoted=
      for arg in $CC; do
	func_append_quoted CC_quoted "$arg"
      done
      CC_expanded=`func_echo_all $CC`
      CC_quoted_expanded=`func_echo_all $CC_quoted`
      case $@ in
      # Blanks in the command may have been stripped by the calling shell,
      # but not from the CC environment variable when configure was run.
      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
      # Blanks at the start of $base_compile will cause this to fail
      # if we don't check for them as well.
      *)
	for z in $available_tags; do
	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
	    # Evaluate the configuration.
	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
	    CC_quoted=
	    for arg in $CC; do
	      # Double-quote args containing other shell metacharacters.
	      func_append_quoted CC_quoted "$arg"
	    done
	    CC_expanded=`func_echo_all $CC`
	    CC_quoted_expanded=`func_echo_all $CC_quoted`
	    case "$@ " in
	    " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
	    " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
	      # The compiler in the base compile command matches
	      # the one in the tagged configuration.
	      # Assume this is the tagged configuration we want.
	      tagname=$z
	      break
	      ;;
	    esac
	  fi
	done
	# If $tagname still isn't set, then no tagged configuration
	# was found and let the user know that the "--tag" command
	# line option must be used.
	if test -z "$tagname"; then
	  func_echo "unable to infer tagged configuration"
	  func_fatal_error "specify a tag with \`--tag'"
#	else
#	  func_verbose "using $tagname tagged configuration"
	fi
	;;
      esac
    fi
}



# func_write_libtool_object output_name pic_name nonpic_name
# Create a libtool object file (analogous to a ".la" file),
# but don't create it if we're doing a dry run.
func_write_libtool_object ()
{
    write_libobj=${1}
    if test "$build_libtool_libs" = yes; then
      write_lobj=\'${2}\'
    else
      write_lobj=none
    fi

    if test "$build_old_libs" = yes; then
      write_oldobj=\'${3}\'
    else
      write_oldobj=none
    fi

    $opt_dry_run || {
      cat >${write_libobj}T </dev/null`
    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
        $SED -e "$lt_sed_naive_backslashify"`
    else
      func_convert_core_file_wine_to_w32_result=
    fi
  fi
}
# end: func_convert_core_file_wine_to_w32


# func_convert_core_path_wine_to_w32 ARG
# Helper function used by path conversion functions when $build is *nix, and
# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
# configured wine environment available, with the winepath program in $build's
# $PATH. Assumes ARG has no leading or trailing path separator characters.
#
# ARG is path to be converted from $build format to win32.
# Result is available in $func_convert_core_path_wine_to_w32_result.
# Unconvertible file (directory) names in ARG are skipped; if no directory names
# are convertible, then the result may be empty.
func_convert_core_path_wine_to_w32 ()
{
  $opt_debug
  # unfortunately, winepath doesn't convert paths, only file names
  func_convert_core_path_wine_to_w32_result=""
  if test -n "$1"; then
    oldIFS=$IFS
    IFS=:
    for func_convert_core_path_wine_to_w32_f in $1; do
      IFS=$oldIFS
      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
        if test -z "$func_convert_core_path_wine_to_w32_result"; then
          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
        else
          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
        fi
      fi
    done
    IFS=$oldIFS
  fi
}
# end: func_convert_core_path_wine_to_w32


# func_cygpath ARGS...
# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
# (2), returns the Cygwin file name or path in func_cygpath_result (input
# file name or path is assumed to be in w32 format, as previously converted
# from $build's *nix or MSYS format). In case (3), returns the w32 file name
# or path in func_cygpath_result (input file name or path is assumed to be in
# Cygwin format). Returns an empty string on error.
#
# ARGS are passed to cygpath, with the last one being the file name or path to
# be converted.
#
# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
# environment variable; do not put it in $PATH.
func_cygpath ()
{
  $opt_debug
  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
    if test "$?" -ne 0; then
      # on failure, ensure result is empty
      func_cygpath_result=
    fi
  else
    func_cygpath_result=
    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
  fi
}
#end: func_cygpath


# func_convert_core_msys_to_w32 ARG
# Convert file name or path ARG from MSYS format to w32 format.  Return
# result in func_convert_core_msys_to_w32_result.
func_convert_core_msys_to_w32 ()
{
  $opt_debug
  # awkward: cmd appends spaces to result
  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
}
#end: func_convert_core_msys_to_w32


# func_convert_file_check ARG1 ARG2
# Verify that ARG1 (a file name in $build format) was converted to $host
# format in ARG2. Otherwise, emit an error message, but continue (resetting
# func_to_host_file_result to ARG1).
func_convert_file_check ()
{
  $opt_debug
  if test -z "$2" && test -n "$1" ; then
    func_error "Could not determine host file name corresponding to"
    func_error "  \`$1'"
    func_error "Continuing, but uninstalled executables may not work."
    # Fallback:
    func_to_host_file_result="$1"
  fi
}
# end func_convert_file_check


# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
# Verify that FROM_PATH (a path in $build format) was converted to $host
# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
# func_to_host_file_result to a simplistic fallback value (see below).
func_convert_path_check ()
{
  $opt_debug
  if test -z "$4" && test -n "$3"; then
    func_error "Could not determine the host path corresponding to"
    func_error "  \`$3'"
    func_error "Continuing, but uninstalled executables may not work."
    # Fallback.  This is a deliberately simplistic "conversion" and
    # should not be "improved".  See libtool.info.
    if test "x$1" != "x$2"; then
      lt_replace_pathsep_chars="s|$1|$2|g"
      func_to_host_path_result=`echo "$3" |
        $SED -e "$lt_replace_pathsep_chars"`
    else
      func_to_host_path_result="$3"
    fi
  fi
}
# end func_convert_path_check


# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
# and appending REPL if ORIG matches BACKPAT.
func_convert_path_front_back_pathsep ()
{
  $opt_debug
  case $4 in
  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
    ;;
  esac
  case $4 in
  $2 ) func_append func_to_host_path_result "$3"
    ;;
  esac
}
# end func_convert_path_front_back_pathsep


##################################################
# $build to $host FILE NAME CONVERSION FUNCTIONS #
##################################################
# invoked via `$to_host_file_cmd ARG'
#
# In each case, ARG is the path to be converted from $build to $host format.
# Result will be available in $func_to_host_file_result.


# func_to_host_file ARG
# Converts the file name ARG from $build format to $host format. Return result
# in func_to_host_file_result.
func_to_host_file ()
{
  $opt_debug
  $to_host_file_cmd "$1"
}
# end func_to_host_file


# func_to_tool_file ARG LAZY
# converts the file name ARG from $build format to toolchain format. Return
# result in func_to_tool_file_result.  If the conversion in use is listed
# in (the comma separated) LAZY, no conversion takes place.
func_to_tool_file ()
{
  $opt_debug
  case ,$2, in
    *,"$to_tool_file_cmd",*)
      func_to_tool_file_result=$1
      ;;
    *)
      $to_tool_file_cmd "$1"
      func_to_tool_file_result=$func_to_host_file_result
      ;;
  esac
}
# end func_to_tool_file


# func_convert_file_noop ARG
# Copy ARG to func_to_host_file_result.
func_convert_file_noop ()
{
  func_to_host_file_result="$1"
}
# end func_convert_file_noop


# func_convert_file_msys_to_w32 ARG
# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
# conversion to w32 is not available inside the cwrapper.  Returns result in
# func_to_host_file_result.
func_convert_file_msys_to_w32 ()
{
  $opt_debug
  func_to_host_file_result="$1"
  if test -n "$1"; then
    func_convert_core_msys_to_w32 "$1"
    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
  fi
  func_convert_file_check "$1" "$func_to_host_file_result"
}
# end func_convert_file_msys_to_w32


# func_convert_file_cygwin_to_w32 ARG
# Convert file name ARG from Cygwin to w32 format.  Returns result in
# func_to_host_file_result.
func_convert_file_cygwin_to_w32 ()
{
  $opt_debug
  func_to_host_file_result="$1"
  if test -n "$1"; then
    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
    # LT_CYGPATH in this case.
    func_to_host_file_result=`cygpath -m "$1"`
  fi
  func_convert_file_check "$1" "$func_to_host_file_result"
}
# end func_convert_file_cygwin_to_w32


# func_convert_file_nix_to_w32 ARG
# Convert file name ARG from *nix to w32 format.  Requires a wine environment
# and a working winepath. Returns result in func_to_host_file_result.
func_convert_file_nix_to_w32 ()
{
  $opt_debug
  func_to_host_file_result="$1"
  if test -n "$1"; then
    func_convert_core_file_wine_to_w32 "$1"
    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
  fi
  func_convert_file_check "$1" "$func_to_host_file_result"
}
# end func_convert_file_nix_to_w32


# func_convert_file_msys_to_cygwin ARG
# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
# Returns result in func_to_host_file_result.
func_convert_file_msys_to_cygwin ()
{
  $opt_debug
  func_to_host_file_result="$1"
  if test -n "$1"; then
    func_convert_core_msys_to_w32 "$1"
    func_cygpath -u "$func_convert_core_msys_to_w32_result"
    func_to_host_file_result="$func_cygpath_result"
  fi
  func_convert_file_check "$1" "$func_to_host_file_result"
}
# end func_convert_file_msys_to_cygwin


# func_convert_file_nix_to_cygwin ARG
# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
# in func_to_host_file_result.
func_convert_file_nix_to_cygwin ()
{
  $opt_debug
  func_to_host_file_result="$1"
  if test -n "$1"; then
    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
    func_convert_core_file_wine_to_w32 "$1"
    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
    func_to_host_file_result="$func_cygpath_result"
  fi
  func_convert_file_check "$1" "$func_to_host_file_result"
}
# end func_convert_file_nix_to_cygwin


#############################################
# $build to $host PATH CONVERSION FUNCTIONS #
#############################################
# invoked via `$to_host_path_cmd ARG'
#
# In each case, ARG is the path to be converted from $build to $host format.
# The result will be available in $func_to_host_path_result.
#
# Path separators are also converted from $build format to $host format.  If
# ARG begins or ends with a path separator character, it is preserved (but
# converted to $host format) on output.
#
# All path conversion functions are named using the following convention:
#   file name conversion function    : func_convert_file_X_to_Y ()
#   path conversion function         : func_convert_path_X_to_Y ()
# where, for any given $build/$host combination the 'X_to_Y' value is the
# same.  If conversion functions are added for new $build/$host combinations,
# the two new functions must follow this pattern, or func_init_to_host_path_cmd
# will break.


# func_init_to_host_path_cmd
# Ensures that function "pointer" variable $to_host_path_cmd is set to the
# appropriate value, based on the value of $to_host_file_cmd.
to_host_path_cmd=
func_init_to_host_path_cmd ()
{
  $opt_debug
  if test -z "$to_host_path_cmd"; then
    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
    to_host_path_cmd="func_convert_path_${func_stripname_result}"
  fi
}


# func_to_host_path ARG
# Converts the path ARG from $build format to $host format. Return result
# in func_to_host_path_result.
func_to_host_path ()
{
  $opt_debug
  func_init_to_host_path_cmd
  $to_host_path_cmd "$1"
}
# end func_to_host_path


# func_convert_path_noop ARG
# Copy ARG to func_to_host_path_result.
func_convert_path_noop ()
{
  func_to_host_path_result="$1"
}
# end func_convert_path_noop


# func_convert_path_msys_to_w32 ARG
# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
# conversion to w32 is not available inside the cwrapper.  Returns result in
# func_to_host_path_result.
func_convert_path_msys_to_w32 ()
{
  $opt_debug
  func_to_host_path_result="$1"
  if test -n "$1"; then
    # Remove leading and trailing path separator characters from ARG.  MSYS
    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
    # and winepath ignores them completely.
    func_stripname : : "$1"
    func_to_host_path_tmp1=$func_stripname_result
    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
    func_convert_path_check : ";" \
      "$func_to_host_path_tmp1" "$func_to_host_path_result"
    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
  fi
}
# end func_convert_path_msys_to_w32


# func_convert_path_cygwin_to_w32 ARG
# Convert path ARG from Cygwin to w32 format.  Returns result in
# func_to_host_file_result.
func_convert_path_cygwin_to_w32 ()
{
  $opt_debug
  func_to_host_path_result="$1"
  if test -n "$1"; then
    # See func_convert_path_msys_to_w32:
    func_stripname : : "$1"
    func_to_host_path_tmp1=$func_stripname_result
    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
    func_convert_path_check : ";" \
      "$func_to_host_path_tmp1" "$func_to_host_path_result"
    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
  fi
}
# end func_convert_path_cygwin_to_w32


# func_convert_path_nix_to_w32 ARG
# Convert path ARG from *nix to w32 format.  Requires a wine environment and
# a working winepath.  Returns result in func_to_host_file_result.
func_convert_path_nix_to_w32 ()
{
  $opt_debug
  func_to_host_path_result="$1"
  if test -n "$1"; then
    # See func_convert_path_msys_to_w32:
    func_stripname : : "$1"
    func_to_host_path_tmp1=$func_stripname_result
    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
    func_convert_path_check : ";" \
      "$func_to_host_path_tmp1" "$func_to_host_path_result"
    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
  fi
}
# end func_convert_path_nix_to_w32


# func_convert_path_msys_to_cygwin ARG
# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
# Returns result in func_to_host_file_result.
func_convert_path_msys_to_cygwin ()
{
  $opt_debug
  func_to_host_path_result="$1"
  if test -n "$1"; then
    # See func_convert_path_msys_to_w32:
    func_stripname : : "$1"
    func_to_host_path_tmp1=$func_stripname_result
    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
    func_to_host_path_result="$func_cygpath_result"
    func_convert_path_check : : \
      "$func_to_host_path_tmp1" "$func_to_host_path_result"
    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
  fi
}
# end func_convert_path_msys_to_cygwin


# func_convert_path_nix_to_cygwin ARG
# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
# func_to_host_file_result.
func_convert_path_nix_to_cygwin ()
{
  $opt_debug
  func_to_host_path_result="$1"
  if test -n "$1"; then
    # Remove leading and trailing path separator characters from
    # ARG. msys behavior is inconsistent here, cygpath turns them
    # into '.;' and ';.', and winepath ignores them completely.
    func_stripname : : "$1"
    func_to_host_path_tmp1=$func_stripname_result
    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
    func_to_host_path_result="$func_cygpath_result"
    func_convert_path_check : : \
      "$func_to_host_path_tmp1" "$func_to_host_path_result"
    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
  fi
}
# end func_convert_path_nix_to_cygwin


# func_mode_compile arg...
func_mode_compile ()
{
    $opt_debug
    # Get the compilation command and the source file.
    base_compile=
    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
    suppress_opt=yes
    suppress_output=
    arg_mode=normal
    libobj=
    later=
    pie_flag=

    for arg
    do
      case $arg_mode in
      arg  )
	# do not "continue".  Instead, add this to base_compile
	lastarg="$arg"
	arg_mode=normal
	;;

      target )
	libobj="$arg"
	arg_mode=normal
	continue
	;;

      normal )
	# Accept any command-line options.
	case $arg in
	-o)
	  test -n "$libobj" && \
	    func_fatal_error "you cannot specify \`-o' more than once"
	  arg_mode=target
	  continue
	  ;;

	-pie | -fpie | -fPIE)
          func_append pie_flag " $arg"
	  continue
	  ;;

	-shared | -static | -prefer-pic | -prefer-non-pic)
	  func_append later " $arg"
	  continue
	  ;;

	-no-suppress)
	  suppress_opt=no
	  continue
	  ;;

	-Xcompiler)
	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
	  continue      #  The current "srcfile" will either be retained or
	  ;;            #  replaced later.  I would guess that would be a bug.

	-Wc,*)
	  func_stripname '-Wc,' '' "$arg"
	  args=$func_stripname_result
	  lastarg=
	  save_ifs="$IFS"; IFS=','
	  for arg in $args; do
	    IFS="$save_ifs"
	    func_append_quoted lastarg "$arg"
	  done
	  IFS="$save_ifs"
	  func_stripname ' ' '' "$lastarg"
	  lastarg=$func_stripname_result

	  # Add the arguments to base_compile.
	  func_append base_compile " $lastarg"
	  continue
	  ;;

	*)
	  # Accept the current argument as the source file.
	  # The previous "srcfile" becomes the current argument.
	  #
	  lastarg="$srcfile"
	  srcfile="$arg"
	  ;;
	esac  #  case $arg
	;;
      esac    #  case $arg_mode

      # Aesthetically quote the previous argument.
      func_append_quoted base_compile "$lastarg"
    done # for arg

    case $arg_mode in
    arg)
      func_fatal_error "you must specify an argument for -Xcompile"
      ;;
    target)
      func_fatal_error "you must specify a target with \`-o'"
      ;;
    *)
      # Get the name of the library object.
      test -z "$libobj" && {
	func_basename "$srcfile"
	libobj="$func_basename_result"
      }
      ;;
    esac

    # Recognize several different file suffixes.
    # If the user specifies -o file.o, it is replaced with file.lo
    case $libobj in
    *.[cCFSifmso] | \
    *.ada | *.adb | *.ads | *.asm | \
    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
      func_xform "$libobj"
      libobj=$func_xform_result
      ;;
    esac

    case $libobj in
    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
    *)
      func_fatal_error "cannot determine name of library object from \`$libobj'"
      ;;
    esac

    func_infer_tag $base_compile

    for arg in $later; do
      case $arg in
      -shared)
	test "$build_libtool_libs" != yes && \
	  func_fatal_configuration "can not build a shared library"
	build_old_libs=no
	continue
	;;

      -static)
	build_libtool_libs=no
	build_old_libs=yes
	continue
	;;

      -prefer-pic)
	pic_mode=yes
	continue
	;;

      -prefer-non-pic)
	pic_mode=no
	continue
	;;
      esac
    done

    func_quote_for_eval "$libobj"
    test "X$libobj" != "X$func_quote_for_eval_result" \
      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
      && func_warning "libobj name \`$libobj' may not contain shell special characters."
    func_dirname_and_basename "$obj" "/" ""
    objname="$func_basename_result"
    xdir="$func_dirname_result"
    lobj=${xdir}$objdir/$objname

    test -z "$base_compile" && \
      func_fatal_help "you must specify a compilation command"

    # Delete any leftover library objects.
    if test "$build_old_libs" = yes; then
      removelist="$obj $lobj $libobj ${libobj}T"
    else
      removelist="$lobj $libobj ${libobj}T"
    fi

    # On Cygwin there's no "real" PIC flag so we must build both object types
    case $host_os in
    cygwin* | mingw* | pw32* | os2* | cegcc*)
      pic_mode=default
      ;;
    esac
    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
      # non-PIC code in shared libraries is not supported
      pic_mode=default
    fi

    # Calculate the filename of the output object if compiler does
    # not support -o with -c
    if test "$compiler_c_o" = no; then
      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
      lockfile="$output_obj.lock"
    else
      output_obj=
      need_locks=no
      lockfile=
    fi

    # Lock this critical section if it is needed
    # We use this script file to make the link, it avoids creating a new file
    if test "$need_locks" = yes; then
      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
	func_echo "Waiting for $lockfile to be removed"
	sleep 2
      done
    elif test "$need_locks" = warn; then
      if test -f "$lockfile"; then
	$ECHO "\
*** ERROR, $lockfile exists and contains:
`cat $lockfile 2>/dev/null`

This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together.  If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."

	$opt_dry_run || $RM $removelist
	exit $EXIT_FAILURE
      fi
      func_append removelist " $output_obj"
      $ECHO "$srcfile" > "$lockfile"
    fi

    $opt_dry_run || $RM $removelist
    func_append removelist " $lockfile"
    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15

    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
    srcfile=$func_to_tool_file_result
    func_quote_for_eval "$srcfile"
    qsrcfile=$func_quote_for_eval_result

    # Only build a PIC object if we are building libtool libraries.
    if test "$build_libtool_libs" = yes; then
      # Without this assignment, base_compile gets emptied.
      fbsd_hideous_sh_bug=$base_compile

      if test "$pic_mode" != no; then
	command="$base_compile $qsrcfile $pic_flag"
      else
	# Don't build PIC code
	command="$base_compile $qsrcfile"
      fi

      func_mkdir_p "$xdir$objdir"

      if test -z "$output_obj"; then
	# Place PIC objects in $objdir
	func_append command " -o $lobj"
      fi

      func_show_eval_locale "$command"	\
          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'

      if test "$need_locks" = warn &&
	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
	$ECHO "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`

but it should contain:
$srcfile

This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together.  If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."

	$opt_dry_run || $RM $removelist
	exit $EXIT_FAILURE
      fi

      # Just move the object if needed, then go on to compile the next one
      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
	func_show_eval '$MV "$output_obj" "$lobj"' \
	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
      fi

      # Allow error messages only from the first compilation.
      if test "$suppress_opt" = yes; then
	suppress_output=' >/dev/null 2>&1'
      fi
    fi

    # Only build a position-dependent object if we build old libraries.
    if test "$build_old_libs" = yes; then
      if test "$pic_mode" != yes; then
	# Don't build PIC code
	command="$base_compile $qsrcfile$pie_flag"
      else
	command="$base_compile $qsrcfile $pic_flag"
      fi
      if test "$compiler_c_o" = yes; then
	func_append command " -o $obj"
      fi

      # Suppress compiler output if we already did a PIC compilation.
      func_append command "$suppress_output"
      func_show_eval_locale "$command" \
        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'

      if test "$need_locks" = warn &&
	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
	$ECHO "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`

but it should contain:
$srcfile

This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together.  If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."

	$opt_dry_run || $RM $removelist
	exit $EXIT_FAILURE
      fi

      # Just move the object if needed
      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
	func_show_eval '$MV "$output_obj" "$obj"' \
	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
      fi
    fi

    $opt_dry_run || {
      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"

      # Unlock the critical section if it was locked
      if test "$need_locks" != no; then
	removelist=$lockfile
        $RM "$lockfile"
      fi
    }

    exit $EXIT_SUCCESS
}

$opt_help || {
  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
}

func_mode_help ()
{
    # We need to display help for each of the modes.
    case $opt_mode in
      "")
        # Generic help is extracted from the usage comments
        # at the start of this file.
        func_help
        ;;

      clean)
        $ECHO \
"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...

Remove files from the build directory.

RM is the name of the program to use to delete files associated with each FILE
(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
to RM.

If FILE is a libtool library, object or program, all the files associated
with it are deleted. Otherwise, only FILE itself is deleted using RM."
        ;;

      compile)
      $ECHO \
"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE

Compile a source file into a libtool library object.

This mode accepts the following additional options:

  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
  -no-suppress      do not suppress compiler output for multiple passes
  -prefer-pic       try to build PIC objects only
  -prefer-non-pic   try to build non-PIC objects only
  -shared           do not build a \`.o' file suitable for static linking
  -static           only build a \`.o' file suitable for static linking
  -Wc,FLAG          pass FLAG directly to the compiler

COMPILE-COMMAND is a command to be used in creating a \`standard' object file
from the given SOURCEFILE.

The output file name is determined by removing the directory component from
SOURCEFILE, then substituting the C source code suffix \`.c' with the
library object suffix, \`.lo'."
        ;;

      execute)
        $ECHO \
"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...

Automatically set library path, then run a program.

This mode accepts the following additional options:

  -dlopen FILE      add the directory containing FILE to the library path

This mode sets the library path environment variable according to \`-dlopen'
flags.

If any of the ARGS are libtool executable wrappers, then they are translated
into their corresponding uninstalled binary, and any of their required library
directories are added to the library path.

Then, COMMAND is executed, with ARGS as arguments."
        ;;

      finish)
        $ECHO \
"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...

Complete the installation of libtool libraries.

Each LIBDIR is a directory that contains libtool libraries.

The commands that this mode executes may require superuser privileges.  Use
the \`--dry-run' option if you just want to see what would be executed."
        ;;

      install)
        $ECHO \
"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...

Install executables or libraries.

INSTALL-COMMAND is the installation command.  The first component should be
either the \`install' or \`cp' program.

The following components of INSTALL-COMMAND are treated specially:

  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation

The rest of the components are interpreted as arguments to that command (only
BSD-compatible install options are recognized)."
        ;;

      link)
        $ECHO \
"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...

Link object files or libraries together to form another library, or to
create an executable program.

LINK-COMMAND is a command using the C compiler that you would use to create
a program from several object files.

The following components of LINK-COMMAND are treated specially:

  -all-static       do not do any dynamic linking at all
  -avoid-version    do not add a version suffix if possible
  -bindir BINDIR    specify path to binaries directory (for systems where
                    libraries must be found in the PATH setting at runtime)
  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  -export-symbols SYMFILE
                    try to export only the symbols listed in SYMFILE
  -export-symbols-regex REGEX
                    try to export only the symbols matching REGEX
  -LLIBDIR          search LIBDIR for required installed libraries
  -lNAME            OUTPUT-FILE requires the installed library libNAME
  -module           build a library that can dlopened
  -no-fast-install  disable the fast-install mode
  -no-install       link a not-installable executable
  -no-undefined     declare that a library does not refer to external symbols
  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
  -objectlist FILE  Use a list of object files found in FILE to specify objects
  -precious-files-regex REGEX
                    don't remove output files matching REGEX
  -release RELEASE  specify package release information
  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
  -shared           only do dynamic linking of libtool libraries
  -shrext SUFFIX    override the standard shared library file extension
  -static           do not do any dynamic linking of uninstalled libtool libraries
  -static-libtool-libs
                    do not do any dynamic linking of libtool libraries
  -version-info CURRENT[:REVISION[:AGE]]
                    specify library version info [each variable defaults to 0]
  -weak LIBNAME     declare that the target provides the LIBNAME interface
  -Wc,FLAG
  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
  -Wl,FLAG
  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)

All other options (arguments beginning with \`-') are ignored.

Every other argument is treated as a filename.  Files ending in \`.la' are
treated as uninstalled libtool libraries, other files are standard or library
object files.

If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
only library objects (\`.lo' files) may be specified, and \`-rpath' is
required, except when creating a convenience library.

If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
using \`ar' and \`ranlib', or on Windows using \`lib'.

If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
is created, otherwise an executable program is created."
        ;;

      uninstall)
        $ECHO \
"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...

Remove libraries from an installation directory.

RM is the name of the program to use to delete files associated with each FILE
(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
to RM.

If FILE is a libtool library, all the files associated with it are deleted.
Otherwise, only FILE itself is deleted using RM."
        ;;

      *)
        func_fatal_help "invalid operation mode \`$opt_mode'"
        ;;
    esac

    echo
    $ECHO "Try \`$progname --help' for more information about other modes."
}

# Now that we've collected a possible --mode arg, show help if necessary
if $opt_help; then
  if test "$opt_help" = :; then
    func_mode_help
  else
    {
      func_help noexit
      for opt_mode in compile link execute install finish uninstall clean; do
	func_mode_help
      done
    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
    {
      func_help noexit
      for opt_mode in compile link execute install finish uninstall clean; do
	echo
	func_mode_help
      done
    } |
    sed '1d
      /^When reporting/,/^Report/{
	H
	d
      }
      $x
      /information about other modes/d
      /more detailed .*MODE/d
      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
  fi
  exit $?
fi


# func_mode_execute arg...
func_mode_execute ()
{
    $opt_debug
    # The first argument is the command name.
    cmd="$nonopt"
    test -z "$cmd" && \
      func_fatal_help "you must specify a COMMAND"

    # Handle -dlopen flags immediately.
    for file in $opt_dlopen; do
      test -f "$file" \
	|| func_fatal_help "\`$file' is not a file"

      dir=
      case $file in
      *.la)
	func_resolve_sysroot "$file"
	file=$func_resolve_sysroot_result

	# Check to see that this really is a libtool archive.
	func_lalib_unsafe_p "$file" \
	  || func_fatal_help "\`$lib' is not a valid libtool archive"

	# Read the libtool library.
	dlname=
	library_names=
	func_source "$file"

	# Skip this library if it cannot be dlopened.
	if test -z "$dlname"; then
	  # Warn if it was a shared library.
	  test -n "$library_names" && \
	    func_warning "\`$file' was not linked with \`-export-dynamic'"
	  continue
	fi

	func_dirname "$file" "" "."
	dir="$func_dirname_result"

	if test -f "$dir/$objdir/$dlname"; then
	  func_append dir "/$objdir"
	else
	  if test ! -f "$dir/$dlname"; then
	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
	  fi
	fi
	;;

      *.lo)
	# Just add the directory containing the .lo file.
	func_dirname "$file" "" "."
	dir="$func_dirname_result"
	;;

      *)
	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
	continue
	;;
      esac

      # Get the absolute pathname.
      absdir=`cd "$dir" && pwd`
      test -n "$absdir" && dir="$absdir"

      # Now add the directory to shlibpath_var.
      if eval "test -z \"\$$shlibpath_var\""; then
	eval "$shlibpath_var=\"\$dir\""
      else
	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
      fi
    done

    # This variable tells wrapper scripts just to set shlibpath_var
    # rather than running their programs.
    libtool_execute_magic="$magic"

    # Check if any of the arguments is a wrapper script.
    args=
    for file
    do
      case $file in
      -* | *.la | *.lo ) ;;
      *)
	# Do a test to see if this is really a libtool program.
	if func_ltwrapper_script_p "$file"; then
	  func_source "$file"
	  # Transform arg to wrapped name.
	  file="$progdir/$program"
	elif func_ltwrapper_executable_p "$file"; then
	  func_ltwrapper_scriptname "$file"
	  func_source "$func_ltwrapper_scriptname_result"
	  # Transform arg to wrapped name.
	  file="$progdir/$program"
	fi
	;;
      esac
      # Quote arguments (to preserve shell metacharacters).
      func_append_quoted args "$file"
    done

    if test "X$opt_dry_run" = Xfalse; then
      if test -n "$shlibpath_var"; then
	# Export the shlibpath_var.
	eval "export $shlibpath_var"
      fi

      # Restore saved environment variables
      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
      do
	eval "if test \"\${save_$lt_var+set}\" = set; then
                $lt_var=\$save_$lt_var; export $lt_var
	      else
		$lt_unset $lt_var
	      fi"
      done

      # Now prepare to actually exec the command.
      exec_cmd="\$cmd$args"
    else
      # Display what would be done.
      if test -n "$shlibpath_var"; then
	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
	echo "export $shlibpath_var"
      fi
      $ECHO "$cmd$args"
      exit $EXIT_SUCCESS
    fi
}

test "$opt_mode" = execute && func_mode_execute ${1+"$@"}


# func_mode_finish arg...
func_mode_finish ()
{
    $opt_debug
    libs=
    libdirs=
    admincmds=

    for opt in "$nonopt" ${1+"$@"}
    do
      if test -d "$opt"; then
	func_append libdirs " $opt"

      elif test -f "$opt"; then
	if func_lalib_unsafe_p "$opt"; then
	  func_append libs " $opt"
	else
	  func_warning "\`$opt' is not a valid libtool archive"
	fi

      else
	func_fatal_error "invalid argument \`$opt'"
      fi
    done

    if test -n "$libs"; then
      if test -n "$lt_sysroot"; then
        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
      else
        sysroot_cmd=
      fi

      # Remove sysroot references
      if $opt_dry_run; then
        for lib in $libs; do
          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
        done
      else
        tmpdir=`func_mktempdir`
        for lib in $libs; do
	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
	    > $tmpdir/tmp-la
	  mv -f $tmpdir/tmp-la $lib
	done
        ${RM}r "$tmpdir"
      fi
    fi

    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
      for libdir in $libdirs; do
	if test -n "$finish_cmds"; then
	  # Do each command in the finish commands.
	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
'"$cmd"'"'
	fi
	if test -n "$finish_eval"; then
	  # Do the single finish_eval.
	  eval cmds=\"$finish_eval\"
	  $opt_dry_run || eval "$cmds" || func_append admincmds "
       $cmds"
	fi
      done
    fi

    # Exit here if they wanted silent mode.
    $opt_silent && exit $EXIT_SUCCESS

    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
      echo "----------------------------------------------------------------------"
      echo "Libraries have been installed in:"
      for libdir in $libdirs; do
	$ECHO "   $libdir"
      done
      echo
      echo "If you ever happen to want to link against installed libraries"
      echo "in a given directory, LIBDIR, you must either use libtool, and"
      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
      echo "flag during linking and do at least one of the following:"
      if test -n "$shlibpath_var"; then
	echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
	echo "     during execution"
      fi
      if test -n "$runpath_var"; then
	echo "   - add LIBDIR to the \`$runpath_var' environment variable"
	echo "     during linking"
      fi
      if test -n "$hardcode_libdir_flag_spec"; then
	libdir=LIBDIR
	eval flag=\"$hardcode_libdir_flag_spec\"

	$ECHO "   - use the \`$flag' linker flag"
      fi
      if test -n "$admincmds"; then
	$ECHO "   - have your system administrator run these commands:$admincmds"
      fi
      if test -f /etc/ld.so.conf; then
	echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
      fi
      echo

      echo "See any operating system documentation about shared libraries for"
      case $host in
	solaris2.[6789]|solaris2.1[0-9])
	  echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
	  echo "pages."
	  ;;
	*)
	  echo "more information, such as the ld(1) and ld.so(8) manual pages."
	  ;;
      esac
      echo "----------------------------------------------------------------------"
    fi
    exit $EXIT_SUCCESS
}

test "$opt_mode" = finish && func_mode_finish ${1+"$@"}


# func_mode_install arg...
func_mode_install ()
{
    $opt_debug
    # There may be an optional sh(1) argument at the beginning of
    # install_prog (especially on Windows NT).
    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
       # Allow the use of GNU shtool's install command.
       case $nonopt in *shtool*) :;; *) false;; esac; then
      # Aesthetically quote it.
      func_quote_for_eval "$nonopt"
      install_prog="$func_quote_for_eval_result "
      arg=$1
      shift
    else
      install_prog=
      arg=$nonopt
    fi

    # The real first argument should be the name of the installation program.
    # Aesthetically quote it.
    func_quote_for_eval "$arg"
    func_append install_prog "$func_quote_for_eval_result"
    install_shared_prog=$install_prog
    case " $install_prog " in
      *[\\\ /]cp\ *) install_cp=: ;;
      *) install_cp=false ;;
    esac

    # We need to accept at least all the BSD install flags.
    dest=
    files=
    opts=
    prev=
    install_type=
    isdir=no
    stripme=
    no_mode=:
    for arg
    do
      arg2=
      if test -n "$dest"; then
	func_append files " $dest"
	dest=$arg
	continue
      fi

      case $arg in
      -d) isdir=yes ;;
      -f)
	if $install_cp; then :; else
	  prev=$arg
	fi
	;;
      -g | -m | -o)
	prev=$arg
	;;
      -s)
	stripme=" -s"
	continue
	;;
      -*)
	;;
      *)
	# If the previous option needed an argument, then skip it.
	if test -n "$prev"; then
	  if test "x$prev" = x-m && test -n "$install_override_mode"; then
	    arg2=$install_override_mode
	    no_mode=false
	  fi
	  prev=
	else
	  dest=$arg
	  continue
	fi
	;;
      esac

      # Aesthetically quote the argument.
      func_quote_for_eval "$arg"
      func_append install_prog " $func_quote_for_eval_result"
      if test -n "$arg2"; then
	func_quote_for_eval "$arg2"
      fi
      func_append install_shared_prog " $func_quote_for_eval_result"
    done

    test -z "$install_prog" && \
      func_fatal_help "you must specify an install program"

    test -n "$prev" && \
      func_fatal_help "the \`$prev' option requires an argument"

    if test -n "$install_override_mode" && $no_mode; then
      if $install_cp; then :; else
	func_quote_for_eval "$install_override_mode"
	func_append install_shared_prog " -m $func_quote_for_eval_result"
      fi
    fi

    if test -z "$files"; then
      if test -z "$dest"; then
	func_fatal_help "no file or destination specified"
      else
	func_fatal_help "you must specify a destination"
      fi
    fi

    # Strip any trailing slash from the destination.
    func_stripname '' '/' "$dest"
    dest=$func_stripname_result

    # Check to see that the destination is a directory.
    test -d "$dest" && isdir=yes
    if test "$isdir" = yes; then
      destdir="$dest"
      destname=
    else
      func_dirname_and_basename "$dest" "" "."
      destdir="$func_dirname_result"
      destname="$func_basename_result"

      # Not a directory, so check to see that there is only one file specified.
      set dummy $files; shift
      test "$#" -gt 1 && \
	func_fatal_help "\`$dest' is not a directory"
    fi
    case $destdir in
    [\\/]* | [A-Za-z]:[\\/]*) ;;
    *)
      for file in $files; do
	case $file in
	*.lo) ;;
	*)
	  func_fatal_help "\`$destdir' must be an absolute directory name"
	  ;;
	esac
      done
      ;;
    esac

    # This variable tells wrapper scripts just to set variables rather
    # than running their programs.
    libtool_install_magic="$magic"

    staticlibs=
    future_libdirs=
    current_libdirs=
    for file in $files; do

      # Do each installation.
      case $file in
      *.$libext)
	# Do the static libraries later.
	func_append staticlibs " $file"
	;;

      *.la)
	func_resolve_sysroot "$file"
	file=$func_resolve_sysroot_result

	# Check to see that this really is a libtool archive.
	func_lalib_unsafe_p "$file" \
	  || func_fatal_help "\`$file' is not a valid libtool archive"

	library_names=
	old_library=
	relink_command=
	func_source "$file"

	# Add the libdir to current_libdirs if it is the destination.
	if test "X$destdir" = "X$libdir"; then
	  case "$current_libdirs " in
	  *" $libdir "*) ;;
	  *) func_append current_libdirs " $libdir" ;;
	  esac
	else
	  # Note the libdir as a future libdir.
	  case "$future_libdirs " in
	  *" $libdir "*) ;;
	  *) func_append future_libdirs " $libdir" ;;
	  esac
	fi

	func_dirname "$file" "/" ""
	dir="$func_dirname_result"
	func_append dir "$objdir"

	if test -n "$relink_command"; then
	  # Determine the prefix the user has applied to our future dir.
	  inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`

	  # Don't allow the user to place us outside of our expected
	  # location b/c this prevents finding dependent libraries that
	  # are installed to the same prefix.
	  # At present, this check doesn't affect windows .dll's that
	  # are installed into $libdir/../bin (currently, that works fine)
	  # but it's something to keep an eye on.
	  test "$inst_prefix_dir" = "$destdir" && \
	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"

	  if test -n "$inst_prefix_dir"; then
	    # Stick the inst_prefix_dir data into the link command.
	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
	  else
	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
	  fi

	  func_warning "relinking \`$file'"
	  func_show_eval "$relink_command" \
	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
	fi

	# See the names of the shared library.
	set dummy $library_names; shift
	if test -n "$1"; then
	  realname="$1"
	  shift

	  srcname="$realname"
	  test -n "$relink_command" && srcname="$realname"T

	  # Install the shared library and build the symlinks.
	  func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
	      'exit $?'
	  tstripme="$stripme"
	  case $host_os in
	  cygwin* | mingw* | pw32* | cegcc*)
	    case $realname in
	    *.dll.a)
	      tstripme=""
	      ;;
	    esac
	    ;;
	  esac
	  if test -n "$tstripme" && test -n "$striplib"; then
	    func_show_eval "$striplib $destdir/$realname" 'exit $?'
	  fi

	  if test "$#" -gt 0; then
	    # Delete the old symlinks, and create new ones.
	    # Try `ln -sf' first, because the `ln' binary might depend on
	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
	    # so we also need to try rm && ln -s.
	    for linkname
	    do
	      test "$linkname" != "$realname" \
		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
	    done
	  fi

	  # Do each command in the postinstall commands.
	  lib="$destdir/$realname"
	  func_execute_cmds "$postinstall_cmds" 'exit $?'
	fi

	# Install the pseudo-library for information purposes.
	func_basename "$file"
	name="$func_basename_result"
	instname="$dir/$name"i
	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'

	# Maybe install the static library, too.
	test -n "$old_library" && func_append staticlibs " $dir/$old_library"
	;;

      *.lo)
	# Install (i.e. copy) a libtool object.

	# Figure out destination file name, if it wasn't already specified.
	if test -n "$destname"; then
	  destfile="$destdir/$destname"
	else
	  func_basename "$file"
	  destfile="$func_basename_result"
	  destfile="$destdir/$destfile"
	fi

	# Deduce the name of the destination old-style object file.
	case $destfile in
	*.lo)
	  func_lo2o "$destfile"
	  staticdest=$func_lo2o_result
	  ;;
	*.$objext)
	  staticdest="$destfile"
	  destfile=
	  ;;
	*)
	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
	  ;;
	esac

	# Install the libtool object if requested.
	test -n "$destfile" && \
	  func_show_eval "$install_prog $file $destfile" 'exit $?'

	# Install the old object if enabled.
	if test "$build_old_libs" = yes; then
	  # Deduce the name of the old-style object file.
	  func_lo2o "$file"
	  staticobj=$func_lo2o_result
	  func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
	fi
	exit $EXIT_SUCCESS
	;;

      *)
	# Figure out destination file name, if it wasn't already specified.
	if test -n "$destname"; then
	  destfile="$destdir/$destname"
	else
	  func_basename "$file"
	  destfile="$func_basename_result"
	  destfile="$destdir/$destfile"
	fi

	# If the file is missing, and there is a .exe on the end, strip it
	# because it is most likely a libtool script we actually want to
	# install
	stripped_ext=""
	case $file in
	  *.exe)
	    if test ! -f "$file"; then
	      func_stripname '' '.exe' "$file"
	      file=$func_stripname_result
	      stripped_ext=".exe"
	    fi
	    ;;
	esac

	# Do a test to see if this is really a libtool program.
	case $host in
	*cygwin* | *mingw*)
	    if func_ltwrapper_executable_p "$file"; then
	      func_ltwrapper_scriptname "$file"
	      wrapper=$func_ltwrapper_scriptname_result
	    else
	      func_stripname '' '.exe' "$file"
	      wrapper=$func_stripname_result
	    fi
	    ;;
	*)
	    wrapper=$file
	    ;;
	esac
	if func_ltwrapper_script_p "$wrapper"; then
	  notinst_deplibs=
	  relink_command=

	  func_source "$wrapper"

	  # Check the variables that should have been set.
	  test -z "$generated_by_libtool_version" && \
	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"

	  finalize=yes
	  for lib in $notinst_deplibs; do
	    # Check to see that each library is installed.
	    libdir=
	    if test -f "$lib"; then
	      func_source "$lib"
	    fi
	    libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
	    if test -n "$libdir" && test ! -f "$libfile"; then
	      func_warning "\`$lib' has not been installed in \`$libdir'"
	      finalize=no
	    fi
	  done

	  relink_command=
	  func_source "$wrapper"

	  outputname=
	  if test "$fast_install" = no && test -n "$relink_command"; then
	    $opt_dry_run || {
	      if test "$finalize" = yes; then
	        tmpdir=`func_mktempdir`
		func_basename "$file$stripped_ext"
		file="$func_basename_result"
	        outputname="$tmpdir/$file"
	        # Replace the output file specification.
	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`

	        $opt_silent || {
	          func_quote_for_expand "$relink_command"
		  eval "func_echo $func_quote_for_expand_result"
	        }
	        if eval "$relink_command"; then :
	          else
		  func_error "error: relink \`$file' with the above command before installing it"
		  $opt_dry_run || ${RM}r "$tmpdir"
		  continue
	        fi
	        file="$outputname"
	      else
	        func_warning "cannot relink \`$file'"
	      fi
	    }
	  else
	    # Install the binary that we compiled earlier.
	    file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
	  fi
	fi

	# remove .exe since cygwin /usr/bin/install will append another
	# one anyway
	case $install_prog,$host in
	*/usr/bin/install*,*cygwin*)
	  case $file:$destfile in
	  *.exe:*.exe)
	    # this is ok
	    ;;
	  *.exe:*)
	    destfile=$destfile.exe
	    ;;
	  *:*.exe)
	    func_stripname '' '.exe' "$destfile"
	    destfile=$func_stripname_result
	    ;;
	  esac
	  ;;
	esac
	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
	$opt_dry_run || if test -n "$outputname"; then
	  ${RM}r "$tmpdir"
	fi
	;;
      esac
    done

    for file in $staticlibs; do
      func_basename "$file"
      name="$func_basename_result"

      # Set up the ranlib parameters.
      oldlib="$destdir/$name"
      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
      tool_oldlib=$func_to_tool_file_result

      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'

      if test -n "$stripme" && test -n "$old_striplib"; then
	func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
      fi

      # Do each command in the postinstall commands.
      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
    done

    test -n "$future_libdirs" && \
      func_warning "remember to run \`$progname --finish$future_libdirs'"

    if test -n "$current_libdirs"; then
      # Maybe just do a dry run.
      $opt_dry_run && current_libdirs=" -n$current_libdirs"
      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
    else
      exit $EXIT_SUCCESS
    fi
}

test "$opt_mode" = install && func_mode_install ${1+"$@"}


# func_generate_dlsyms outputname originator pic_p
# Extract symbols from dlprefiles and create ${outputname}S.o with
# a dlpreopen symbol table.
func_generate_dlsyms ()
{
    $opt_debug
    my_outputname="$1"
    my_originator="$2"
    my_pic_p="${3-no}"
    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
    my_dlsyms=

    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
      if test -n "$NM" && test -n "$global_symbol_pipe"; then
	my_dlsyms="${my_outputname}S.c"
      else
	func_error "not configured to extract global symbols from dlpreopened files"
      fi
    fi

    if test -n "$my_dlsyms"; then
      case $my_dlsyms in
      "") ;;
      *.c)
	# Discover the nlist of each of the dlfiles.
	nlist="$output_objdir/${my_outputname}.nm"

	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"

	# Parse the name list into a source file.
	func_verbose "creating $output_objdir/$my_dlsyms"

	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */

#ifdef __cplusplus
extern \"C\" {
#endif

#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
#endif

/* 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

/* External symbol declarations for the compiler. */\
"

	if test "$dlself" = yes; then
	  func_verbose "generating symbol list for \`$output'"

	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"

	  # Add our own program objects to the symbol list.
	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
	  for progfile in $progfiles; do
	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
	    func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
	  done

	  if test -n "$exclude_expsyms"; then
	    $opt_dry_run || {
	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
	      eval '$MV "$nlist"T "$nlist"'
	    }
	  fi

	  if test -n "$export_symbols_regex"; then
	    $opt_dry_run || {
	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
	      eval '$MV "$nlist"T "$nlist"'
	    }
	  fi

	  # Prepare the list of exported symbols
	  if test -z "$export_symbols"; then
	    export_symbols="$output_objdir/$outputname.exp"
	    $opt_dry_run || {
	      $RM $export_symbols
	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
	      case $host in
	      *cygwin* | *mingw* | *cegcc* )
                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
	        ;;
	      esac
	    }
	  else
	    $opt_dry_run || {
	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
	      eval '$MV "$nlist"T "$nlist"'
	      case $host in
	        *cygwin* | *mingw* | *cegcc* )
	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
	          ;;
	      esac
	    }
	  fi
	fi

	for dlprefile in $dlprefiles; do
	  func_verbose "extracting global C symbols from \`$dlprefile'"
	  func_basename "$dlprefile"
	  name="$func_basename_result"
          case $host in
	    *cygwin* | *mingw* | *cegcc* )
	      # if an import library, we need to obtain dlname
	      if func_win32_import_lib_p "$dlprefile"; then
	        func_tr_sh "$dlprefile"
	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
	        dlprefile_dlbasename=""
	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
	          # Use subshell, to avoid clobbering current variable values
	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
	          if test -n "$dlprefile_dlname" ; then
	            func_basename "$dlprefile_dlname"
	            dlprefile_dlbasename="$func_basename_result"
	          else
	            # no lafile. user explicitly requested -dlpreopen .
	            $sharedlib_from_linklib_cmd "$dlprefile"
	            dlprefile_dlbasename=$sharedlib_from_linklib_result
	          fi
	        fi
	        $opt_dry_run || {
	          if test -n "$dlprefile_dlbasename" ; then
	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
	          else
	            func_warning "Could not compute DLL name from $name"
	            eval '$ECHO ": $name " >> "$nlist"'
	          fi
	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
	            $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
	        }
	      else # not an import lib
	        $opt_dry_run || {
	          eval '$ECHO ": $name " >> "$nlist"'
	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
	        }
	      fi
	    ;;
	    *)
	      $opt_dry_run || {
	        eval '$ECHO ": $name " >> "$nlist"'
	        func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
	        eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
	      }
	    ;;
          esac
	done

	$opt_dry_run || {
	  # Make sure we have at least an empty file.
	  test -f "$nlist" || : > "$nlist"

	  if test -n "$exclude_expsyms"; then
	    $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
	    $MV "$nlist"T "$nlist"
	  fi

	  # Try sorting and uniquifying the output.
	  if $GREP -v "^: " < "$nlist" |
	      if sort -k 3 /dev/null 2>&1; then
		sort -k 3
	      else
		sort +2
	      fi |
	      uniq > "$nlist"S; then
	    :
	  else
	    $GREP -v "^: " < "$nlist" > "$nlist"S
	  fi

	  if test -f "$nlist"S; then
	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
	  else
	    echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
	  fi

	  echo >> "$output_objdir/$my_dlsyms" "\

/* The mapping between symbol names and symbols.  */
typedef struct {
  const char *name;
  void *address;
} lt_dlsymlist;
extern LT_DLSYM_CONST lt_dlsymlist
lt_${my_prefix}_LTX_preloaded_symbols[];
LT_DLSYM_CONST lt_dlsymlist
lt_${my_prefix}_LTX_preloaded_symbols[] =
{\
  { \"$my_originator\", (void *) 0 },"

	  case $need_lib_prefix in
	  no)
	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
	    ;;
	  *)
	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
	    ;;
	  esac
	  echo >> "$output_objdir/$my_dlsyms" "\
  {0, (void *) 0}
};

/* This works around a problem in FreeBSD linker */
#ifdef FREEBSD_WORKAROUND
static const void *lt_preloaded_setup() {
  return lt_${my_prefix}_LTX_preloaded_symbols;
}
#endif

#ifdef __cplusplus
}
#endif\
"
	} # !$opt_dry_run

	pic_flag_for_symtable=
	case "$compile_command " in
	*" -static "*) ;;
	*)
	  case $host in
	  # compiling the symbol table file with pic_flag works around
	  # a FreeBSD bug that causes programs to crash when -lm is
	  # linked before any other PIC object.  But we must not use
	  # pic_flag when linking with -static.  The problem exists in
	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
	  *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
	  *-*-hpux*)
	    pic_flag_for_symtable=" $pic_flag"  ;;
	  *)
	    if test "X$my_pic_p" != Xno; then
	      pic_flag_for_symtable=" $pic_flag"
	    fi
	    ;;
	  esac
	  ;;
	esac
	symtab_cflags=
	for arg in $LTCFLAGS; do
	  case $arg in
	  -pie | -fpie | -fPIE) ;;
	  *) func_append symtab_cflags " $arg" ;;
	  esac
	done

	# Now compile the dynamic symbol file.
	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'

	# Clean up the generated files.
	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'

	# Transform the symbol file into the correct name.
	symfileobj="$output_objdir/${my_outputname}S.$objext"
	case $host in
	*cygwin* | *mingw* | *cegcc* )
	  if test -f "$output_objdir/$my_outputname.def"; then
	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
	  else
	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
	  fi
	  ;;
	*)
	  compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
	  finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
	  ;;
	esac
	;;
      *)
	func_fatal_error "unknown suffix for \`$my_dlsyms'"
	;;
      esac
    else
      # We keep going just in case the user didn't refer to
      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
      # really was required.

      # Nullify the symbol file.
      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
    fi
}

# func_win32_libid arg
# return the library type of file 'arg'
#
# Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called.
# Despite the name, also deal with 64 bit binaries.
func_win32_libid ()
{
  $opt_debug
  win32_libid_type="unknown"
  win32_fileres=`file -L $1 2>/dev/null`
  case $win32_fileres in
  *ar\ archive\ import\ library*) # definitely import
    win32_libid_type="x86 archive import"
    ;;
  *ar\ archive*) # could be an import, or static
    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
      func_to_tool_file "$1" func_convert_file_msys_to_w32
      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
	$SED -n -e '
	    1,100{
		/ I /{
		    s,.*,import,
		    p
		    q
		}
	    }'`
      case $win32_nmres in
      import*)  win32_libid_type="x86 archive import";;
      *)        win32_libid_type="x86 archive static";;
      esac
    fi
    ;;
  *DLL*)
    win32_libid_type="x86 DLL"
    ;;
  *executable*) # but shell scripts are "executable" too...
    case $win32_fileres in
    *MS\ Windows\ PE\ Intel*)
      win32_libid_type="x86 DLL"
      ;;
    esac
    ;;
  esac
  $ECHO "$win32_libid_type"
}

# func_cygming_dll_for_implib ARG
#
# Platform-specific function to extract the
# name of the DLL associated with the specified
# import library ARG.
# Invoked by eval'ing the libtool variable
#    $sharedlib_from_linklib_cmd
# Result is available in the variable
#    $sharedlib_from_linklib_result
func_cygming_dll_for_implib ()
{
  $opt_debug
  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
}

# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
#
# The is the core of a fallback implementation of a
# platform-specific function to extract the name of the
# DLL associated with the specified import library LIBNAME.
#
# SECTION_NAME is either .idata$6 or .idata$7, depending
# on the platform and compiler that created the implib.
#
# Echos the name of the DLL associated with the
# specified import library.
func_cygming_dll_for_implib_fallback_core ()
{
  $opt_debug
  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
    $SED '/^Contents of section '"$match_literal"':/{
      # Place marker at beginning of archive member dllname section
      s/.*/====MARK====/
      p
      d
    }
    # These lines can sometimes be longer than 43 characters, but
    # are always uninteresting
    /:[	 ]*file format pe[i]\{,1\}-/d
    /^In archive [^:]*:/d
    # Ensure marker is printed
    /^====MARK====/p
    # Remove all lines with less than 43 characters
    /^.\{43\}/!d
    # From remaining lines, remove first 43 characters
    s/^.\{43\}//' |
    $SED -n '
      # Join marker and all lines until next marker into a single line
      /^====MARK====/ b para
      H
      $ b para
      b
      :para
      x
      s/\n//g
      # Remove the marker
      s/^====MARK====//
      # Remove trailing dots and whitespace
      s/[\. \t]*$//
      # Print
      /./p' |
    # we now have a list, one entry per line, of the stringified
    # contents of the appropriate section of all members of the
    # archive which possess that section. Heuristic: eliminate
    # all those which have a first or second character that is
    # a '.' (that is, objdump's representation of an unprintable
    # character.) This should work for all archives with less than
    # 0x302f exports -- but will fail for DLLs whose name actually
    # begins with a literal '.' or a single character followed by
    # a '.'.
    #
    # Of those that remain, print the first one.
    $SED -e '/^\./d;/^.\./d;q'
}

# func_cygming_gnu_implib_p ARG
# This predicate returns with zero status (TRUE) if
# ARG is a GNU/binutils-style import library. Returns
# with nonzero status (FALSE) otherwise.
func_cygming_gnu_implib_p ()
{
  $opt_debug
  func_to_tool_file "$1" func_convert_file_msys_to_w32
  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
  test -n "$func_cygming_gnu_implib_tmp"
}

# func_cygming_ms_implib_p ARG
# This predicate returns with zero status (TRUE) if
# ARG is an MS-style import library. Returns
# with nonzero status (FALSE) otherwise.
func_cygming_ms_implib_p ()
{
  $opt_debug
  func_to_tool_file "$1" func_convert_file_msys_to_w32
  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
  test -n "$func_cygming_ms_implib_tmp"
}

# func_cygming_dll_for_implib_fallback ARG
# Platform-specific function to extract the
# name of the DLL associated with the specified
# import library ARG.
#
# This fallback implementation is for use when $DLLTOOL
# does not support the --identify-strict option.
# Invoked by eval'ing the libtool variable
#    $sharedlib_from_linklib_cmd
# Result is available in the variable
#    $sharedlib_from_linklib_result
func_cygming_dll_for_implib_fallback ()
{
  $opt_debug
  if func_cygming_gnu_implib_p "$1" ; then
    # binutils import library
    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
  elif func_cygming_ms_implib_p "$1" ; then
    # ms-generated import library
    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
  else
    # unknown
    sharedlib_from_linklib_result=""
  fi
}


# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
    $opt_debug
    f_ex_an_ar_dir="$1"; shift
    f_ex_an_ar_oldlib="$1"
    if test "$lock_old_archive_extraction" = yes; then
      lockfile=$f_ex_an_ar_oldlib.lock
      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
	func_echo "Waiting for $lockfile to be removed"
	sleep 2
      done
    fi
    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
		   'stat=$?; rm -f "$lockfile"; exit $stat'
    if test "$lock_old_archive_extraction" = yes; then
      $opt_dry_run || rm -f "$lockfile"
    fi
    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
     :
    else
      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
    fi
}


# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
    $opt_debug
    my_gentop="$1"; shift
    my_oldlibs=${1+"$@"}
    my_oldobjs=""
    my_xlib=""
    my_xabs=""
    my_xdir=""

    for my_xlib in $my_oldlibs; do
      # Extract the objects.
      case $my_xlib in
	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
	*) my_xabs=`pwd`"/$my_xlib" ;;
      esac
      func_basename "$my_xlib"
      my_xlib="$func_basename_result"
      my_xlib_u=$my_xlib
      while :; do
        case " $extracted_archives " in
	*" $my_xlib_u "*)
	  func_arith $extracted_serial + 1
	  extracted_serial=$func_arith_result
	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
	*) break ;;
	esac
      done
      extracted_archives="$extracted_archives $my_xlib_u"
      my_xdir="$my_gentop/$my_xlib_u"

      func_mkdir_p "$my_xdir"

      case $host in
      *-darwin*)
	func_verbose "Extracting $my_xabs"
	# Do not bother doing anything if just a dry run
	$opt_dry_run || {
	  darwin_orig_dir=`pwd`
	  cd $my_xdir || exit $?
	  darwin_archive=$my_xabs
	  darwin_curdir=`pwd`
	  darwin_base_archive=`basename "$darwin_archive"`
	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
	  if test -n "$darwin_arches"; then
	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
	    darwin_arch=
	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
	    for darwin_arch in  $darwin_arches ; do
	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
	      cd "$darwin_curdir"
	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
	    done # $darwin_arches
            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
	    darwin_file=
	    darwin_files=
	    for darwin_file in $darwin_filelist; do
	      darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
	      $LIPO -create -output "$darwin_file" $darwin_files
	    done # $darwin_filelist
	    $RM -rf unfat-$$
	    cd "$darwin_orig_dir"
	  else
	    cd $darwin_orig_dir
	    func_extract_an_archive "$my_xdir" "$my_xabs"
	  fi # $darwin_arches
	} # !$opt_dry_run
	;;
      *)
        func_extract_an_archive "$my_xdir" "$my_xabs"
	;;
      esac
      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
    done

    func_extract_archives_result="$my_oldobjs"
}


# func_emit_wrapper [arg=no]
#
# Emit a libtool wrapper script on stdout.
# Don't directly open a file because we may want to
# incorporate the script contents within a cygwin/mingw
# wrapper executable.  Must ONLY be called from within
# func_mode_link because it depends on a number of variables
# set therein.
#
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
# variable will take.  If 'yes', then the emitted script
# will assume that the directory in which it is stored is
# the $objdir directory.  This is a cygwin/mingw-specific
# behavior.
func_emit_wrapper ()
{
	func_emit_wrapper_arg1=${1-no}

	$ECHO "\
#! $SHELL

# $output - temporary wrapper script for $objdir/$outputname
# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.

# Sed substitution that helps us do robust quoting.  It backslashifies
# metacharacters that are still active within double-quoted strings.
sed_quote_subst='$sed_quote_subst'

# Be Bourne compatible
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
  setopt NO_GLOB_SUBST
else
  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh

# 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

relink_command=\"$relink_command\"

# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
  # install mode needs the following variables:
  generated_by_libtool_version='$macro_version'
  notinst_deplibs='$notinst_deplibs'
else
  # When we are sourced in execute mode, \$file and \$ECHO are already set.
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
    file=\"\$0\""

    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
    $ECHO "\

# A function that is used when there is no print builtin or printf.
func_fallback_echo ()
{
  eval 'cat <<_LTECHO_EOF
\$1
_LTECHO_EOF'
}
    ECHO=\"$qECHO\"
  fi

# Very basic option parsing. These options are (a) specific to
# the libtool wrapper, (b) are identical between the wrapper
# /script/ and the wrapper /executable/ which is used only on
# windows platforms, and (c) all begin with the string "--lt-"
# (application programs are unlikely to have options which match
# this pattern).
#
# There are only two supported options: --lt-debug and
# --lt-dump-script. There is, deliberately, no --lt-help.
#
# The first argument to this parsing function should be the
# script's $0 value, followed by "$@".
lt_option_debug=
func_parse_lt_options ()
{
  lt_script_arg0=\$0
  shift
  for lt_opt
  do
    case \"\$lt_opt\" in
    --lt-debug) lt_option_debug=1 ;;
    --lt-dump-script)
        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
        cat \"\$lt_dump_D/\$lt_dump_F\"
        exit 0
      ;;
    --lt-*)
        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
        exit 1
      ;;
    esac
  done

  # Print the debug banner immediately:
  if test -n \"\$lt_option_debug\"; then
    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
  fi
}

# Used when --lt-debug. Prints its arguments to stdout
# (redirection is the responsibility of the caller)
func_lt_dump_args ()
{
  lt_dump_args_N=1;
  for lt_arg
  do
    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
  done
}

# Core function for launching the target application
func_exec_program_core ()
{
"
  case $host in
  # Backslashes separate directories on plain windows
  *-*-mingw | *-*-os2* | *-cegcc*)
    $ECHO "\
      if test -n \"\$lt_option_debug\"; then
        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
        func_lt_dump_args \${1+\"\$@\"} 1>&2
      fi
      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
"
    ;;

  *)
    $ECHO "\
      if test -n \"\$lt_option_debug\"; then
        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
        func_lt_dump_args \${1+\"\$@\"} 1>&2
      fi
      exec \"\$progdir/\$program\" \${1+\"\$@\"}
"
    ;;
  esac
  $ECHO "\
      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
      exit 1
}

# A function to encapsulate launching the target application
# Strips options in the --lt-* namespace from \$@ and
# launches target application with the remaining arguments.
func_exec_program ()
{
  case \" \$* \" in
  *\\ --lt-*)
    for lt_wr_arg
    do
      case \$lt_wr_arg in
      --lt-*) ;;
      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
      esac
      shift
    done ;;
  esac
  func_exec_program_core \${1+\"\$@\"}
}

  # Parse options
  func_parse_lt_options \"\$0\" \${1+\"\$@\"}

  # Find the directory that this script lives in.
  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
  test \"x\$thisdir\" = \"x\$file\" && thisdir=.

  # Follow symbolic links until we get to the real thisdir.
  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
  while test -n \"\$file\"; do
    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`

    # If there was a directory component, then change thisdir.
    if test \"x\$destdir\" != \"x\$file\"; then
      case \"\$destdir\" in
      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
      *) thisdir=\"\$thisdir/\$destdir\" ;;
      esac
    fi

    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
  done

  # Usually 'no', except on cygwin/mingw when embedded into
  # the cwrapper.
  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
    # special case for '.'
    if test \"\$thisdir\" = \".\"; then
      thisdir=\`pwd\`
    fi
    # remove .libs from thisdir
    case \"\$thisdir\" in
    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
    $objdir )   thisdir=. ;;
    esac
  fi

  # Try to get the absolute directory name.
  absdir=\`cd \"\$thisdir\" && pwd\`
  test -n \"\$absdir\" && thisdir=\"\$absdir\"
"

	if test "$fast_install" = yes; then
	  $ECHO "\
  program=lt-'$outputname'$exeext
  progdir=\"\$thisdir/$objdir\"

  if test ! -f \"\$progdir/\$program\" ||
     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
       test \"X\$file\" != \"X\$progdir/\$program\"; }; then

    file=\"\$\$-\$program\"

    if test ! -d \"\$progdir\"; then
      $MKDIR \"\$progdir\"
    else
      $RM \"\$progdir/\$file\"
    fi"

	  $ECHO "\

    # relink executable if necessary
    if test -n \"\$relink_command\"; then
      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
      else
	$ECHO \"\$relink_command_output\" >&2
	$RM \"\$progdir/\$file\"
	exit 1
      fi
    fi

    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
    { $RM \"\$progdir/\$program\";
      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
    $RM \"\$progdir/\$file\"
  fi"
	else
	  $ECHO "\
  program='$outputname'
  progdir=\"\$thisdir/$objdir\"
"
	fi

	$ECHO "\

  if test -f \"\$progdir/\$program\"; then"

	# fixup the dll searchpath if we need to.
	#
	# Fix the DLL searchpath if we need to.  Do this before prepending
	# to shlibpath, because on Windows, both are PATH and uninstalled
	# libraries must come first.
	if test -n "$dllsearchpath"; then
	  $ECHO "\
    # Add the dll search path components to the executable PATH
    PATH=$dllsearchpath:\$PATH
"
	fi

	# Export our shlibpath_var if we have one.
	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
	  $ECHO "\
    # Add our own library path to $shlibpath_var
    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"

    # Some systems cannot cope with colon-terminated $shlibpath_var
    # The second colon is a workaround for a bug in BeOS R4 sed
    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`

    export $shlibpath_var
"
	fi

	$ECHO "\
    if test \"\$libtool_execute_magic\" != \"$magic\"; then
      # Run the actual program with our arguments.
      func_exec_program \${1+\"\$@\"}
    fi
  else
    # The program doesn't exist.
    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
    exit 1
  fi
fi\
"
}


# func_emit_cwrapperexe_src
# emit the source code for a wrapper executable on stdout
# Must ONLY be called from within func_mode_link because
# it depends on a number of variable set therein.
func_emit_cwrapperexe_src ()
{
	cat <
#include 
#ifdef _MSC_VER
# include 
# include 
# include 
#else
# include 
# include 
# ifdef __CYGWIN__
#  include 
# endif
#endif
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

/* declarations of non-ANSI functions */
#if defined(__MINGW32__)
# ifdef __STRICT_ANSI__
int _putenv (const char *);
# endif
#elif defined(__CYGWIN__)
# ifdef __STRICT_ANSI__
char *realpath (const char *, char *);
int putenv (char *);
int setenv (const char *, const char *, int);
# endif
/* #elif defined (other platforms) ... */
#endif

/* portability defines, excluding path handling macros */
#if defined(_MSC_VER)
# define setmode _setmode
# define stat    _stat
# define chmod   _chmod
# define getcwd  _getcwd
# define putenv  _putenv
# define S_IXUSR _S_IEXEC
# ifndef _INTPTR_T_DEFINED
#  define _INTPTR_T_DEFINED
#  define intptr_t int
# endif
#elif defined(__MINGW32__)
# define setmode _setmode
# define stat    _stat
# define chmod   _chmod
# define getcwd  _getcwd
# define putenv  _putenv
#elif defined(__CYGWIN__)
# define HAVE_SETENV
# define FOPEN_WB "wb"
/* #elif defined (other platforms) ... */
#endif

#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
#elif defined(MAXPATHLEN)
# define LT_PATHMAX MAXPATHLEN
#else
# define LT_PATHMAX 1024
#endif

#ifndef S_IXOTH
# define S_IXOTH 0
#endif
#ifndef S_IXGRP
# define S_IXGRP 0
#endif

/* path handling portability macros */
#ifndef DIR_SEPARATOR
# define DIR_SEPARATOR '/'
# define PATH_SEPARATOR ':'
#endif

#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
  defined (__OS2__)
# define HAVE_DOS_BASED_FILE_SYSTEM
# define FOPEN_WB "wb"
# ifndef DIR_SEPARATOR_2
#  define DIR_SEPARATOR_2 '\\'
# endif
# ifndef PATH_SEPARATOR_2
#  define PATH_SEPARATOR_2 ';'
# endif
#endif

#ifndef DIR_SEPARATOR_2
# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
#else /* DIR_SEPARATOR_2 */
# define IS_DIR_SEPARATOR(ch) \
	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */

#ifndef PATH_SEPARATOR_2
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
#else /* PATH_SEPARATOR_2 */
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
#endif /* PATH_SEPARATOR_2 */

#ifndef FOPEN_WB
# define FOPEN_WB "w"
#endif
#ifndef _O_BINARY
# define _O_BINARY 0
#endif

#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
  if (stale) { free ((void *) stale); stale = 0; } \
} while (0)

#if defined(LT_DEBUGWRAPPER)
static int lt_debug = 1;
#else
static int lt_debug = 0;
#endif

const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */

void *xmalloc (size_t num);
char *xstrdup (const char *string);
const char *base_name (const char *name);
char *find_executable (const char *wrapper);
char *chase_symlinks (const char *pathspec);
int make_executable (const char *path);
int check_executable (const char *path);
char *strendzap (char *str, const char *pat);
void lt_debugprintf (const char *file, int line, const char *fmt, ...);
void lt_fatal (const char *file, int line, const char *message, ...);
static const char *nonnull (const char *s);
static const char *nonempty (const char *s);
void lt_setenv (const char *name, const char *value);
char *lt_extend_str (const char *orig_value, const char *add, int to_end);
void lt_update_exe_path (const char *name, const char *value);
void lt_update_lib_path (const char *name, const char *value);
char **prepare_spawn (char **argv);
void lt_dump_script (FILE *f);
EOF

	    cat <= 0)
      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
    return 1;
  else
    return 0;
}

int
make_executable (const char *path)
{
  int rval = 0;
  struct stat st;

  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
                  nonempty (path));
  if ((!path) || (!*path))
    return 0;

  if (stat (path, &st) >= 0)
    {
      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
    }
  return rval;
}

/* Searches for the full path of the wrapper.  Returns
   newly allocated full path name if found, NULL otherwise
   Does not chase symlinks, even on platforms that support them.
*/
char *
find_executable (const char *wrapper)
{
  int has_slash = 0;
  const char *p;
  const char *p_next;
  /* static buffer for getcwd */
  char tmp[LT_PATHMAX + 1];
  int tmp_len;
  char *concat_name;

  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
                  nonempty (wrapper));

  if ((wrapper == NULL) || (*wrapper == '\0'))
    return NULL;

  /* Absolute path? */
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
    {
      concat_name = xstrdup (wrapper);
      if (check_executable (concat_name))
	return concat_name;
      XFREE (concat_name);
    }
  else
    {
#endif
      if (IS_DIR_SEPARATOR (wrapper[0]))
	{
	  concat_name = xstrdup (wrapper);
	  if (check_executable (concat_name))
	    return concat_name;
	  XFREE (concat_name);
	}
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
    }
#endif

  for (p = wrapper; *p; p++)
    if (*p == '/')
      {
	has_slash = 1;
	break;
      }
  if (!has_slash)
    {
      /* no slashes; search PATH */
      const char *path = getenv ("PATH");
      if (path != NULL)
	{
	  for (p = path; *p; p = p_next)
	    {
	      const char *q;
	      size_t p_len;
	      for (q = p; *q; q++)
		if (IS_PATH_SEPARATOR (*q))
		  break;
	      p_len = q - p;
	      p_next = (*q == '\0' ? q : q + 1);
	      if (p_len == 0)
		{
		  /* empty path: current directory */
		  if (getcwd (tmp, LT_PATHMAX) == NULL)
		    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
                              nonnull (strerror (errno)));
		  tmp_len = strlen (tmp);
		  concat_name =
		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
		  memcpy (concat_name, tmp, tmp_len);
		  concat_name[tmp_len] = '/';
		  strcpy (concat_name + tmp_len + 1, wrapper);
		}
	      else
		{
		  concat_name =
		    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
		  memcpy (concat_name, p, p_len);
		  concat_name[p_len] = '/';
		  strcpy (concat_name + p_len + 1, wrapper);
		}
	      if (check_executable (concat_name))
		return concat_name;
	      XFREE (concat_name);
	    }
	}
      /* not found in PATH; assume curdir */
    }
  /* Relative path | not found in path: prepend cwd */
  if (getcwd (tmp, LT_PATHMAX) == NULL)
    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
              nonnull (strerror (errno)));
  tmp_len = strlen (tmp);
  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
  memcpy (concat_name, tmp, tmp_len);
  concat_name[tmp_len] = '/';
  strcpy (concat_name + tmp_len + 1, wrapper);

  if (check_executable (concat_name))
    return concat_name;
  XFREE (concat_name);
  return NULL;
}

char *
chase_symlinks (const char *pathspec)
{
#ifndef S_ISLNK
  return xstrdup (pathspec);
#else
  char buf[LT_PATHMAX];
  struct stat s;
  char *tmp_pathspec = xstrdup (pathspec);
  char *p;
  int has_symlinks = 0;
  while (strlen (tmp_pathspec) && !has_symlinks)
    {
      lt_debugprintf (__FILE__, __LINE__,
		      "checking path component for symlinks: %s\n",
		      tmp_pathspec);
      if (lstat (tmp_pathspec, &s) == 0)
	{
	  if (S_ISLNK (s.st_mode) != 0)
	    {
	      has_symlinks = 1;
	      break;
	    }

	  /* search backwards for last DIR_SEPARATOR */
	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
	    p--;
	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
	    {
	      /* no more DIR_SEPARATORS left */
	      break;
	    }
	  *p = '\0';
	}
      else
	{
	  lt_fatal (__FILE__, __LINE__,
		    "error accessing file \"%s\": %s",
		    tmp_pathspec, nonnull (strerror (errno)));
	}
    }
  XFREE (tmp_pathspec);

  if (!has_symlinks)
    {
      return xstrdup (pathspec);
    }

  tmp_pathspec = realpath (pathspec, buf);
  if (tmp_pathspec == 0)
    {
      lt_fatal (__FILE__, __LINE__,
		"could not follow symlinks for %s", pathspec);
    }
  return xstrdup (tmp_pathspec);
#endif
}

char *
strendzap (char *str, const char *pat)
{
  size_t len, patlen;

  assert (str != NULL);
  assert (pat != NULL);

  len = strlen (str);
  patlen = strlen (pat);

  if (patlen <= len)
    {
      str += len - patlen;
      if (strcmp (str, pat) == 0)
	*str = '\0';
    }
  return str;
}

void
lt_debugprintf (const char *file, int line, const char *fmt, ...)
{
  va_list args;
  if (lt_debug)
    {
      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
      va_start (args, fmt);
      (void) vfprintf (stderr, fmt, args);
      va_end (args);
    }
}

static void
lt_error_core (int exit_status, const char *file,
	       int line, const char *mode,
	       const char *message, va_list ap)
{
  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
  vfprintf (stderr, message, ap);
  fprintf (stderr, ".\n");

  if (exit_status >= 0)
    exit (exit_status);
}

void
lt_fatal (const char *file, int line, const char *message, ...)
{
  va_list ap;
  va_start (ap, message);
  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
  va_end (ap);
}

static const char *
nonnull (const char *s)
{
  return s ? s : "(null)";
}

static const char *
nonempty (const char *s)
{
  return (s && !*s) ? "(empty)" : nonnull (s);
}

void
lt_setenv (const char *name, const char *value)
{
  lt_debugprintf (__FILE__, __LINE__,
		  "(lt_setenv) setting '%s' to '%s'\n",
                  nonnull (name), nonnull (value));
  {
#ifdef HAVE_SETENV
    /* always make a copy, for consistency with !HAVE_SETENV */
    char *str = xstrdup (value);
    setenv (name, str, 1);
#else
    int len = strlen (name) + 1 + strlen (value) + 1;
    char *str = XMALLOC (char, len);
    sprintf (str, "%s=%s", name, value);
    if (putenv (str) != EXIT_SUCCESS)
      {
        XFREE (str);
      }
#endif
  }
}

char *
lt_extend_str (const char *orig_value, const char *add, int to_end)
{
  char *new_value;
  if (orig_value && *orig_value)
    {
      int orig_value_len = strlen (orig_value);
      int add_len = strlen (add);
      new_value = XMALLOC (char, add_len + orig_value_len + 1);
      if (to_end)
        {
          strcpy (new_value, orig_value);
          strcpy (new_value + orig_value_len, add);
        }
      else
        {
          strcpy (new_value, add);
          strcpy (new_value + add_len, orig_value);
        }
    }
  else
    {
      new_value = xstrdup (add);
    }
  return new_value;
}

void
lt_update_exe_path (const char *name, const char *value)
{
  lt_debugprintf (__FILE__, __LINE__,
		  "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
                  nonnull (name), nonnull (value));

  if (name && *name && value && *value)
    {
      char *new_value = lt_extend_str (getenv (name), value, 0);
      /* some systems can't cope with a ':'-terminated path #' */
      int len = strlen (new_value);
      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
        {
          new_value[len-1] = '\0';
        }
      lt_setenv (name, new_value);
      XFREE (new_value);
    }
}

void
lt_update_lib_path (const char *name, const char *value)
{
  lt_debugprintf (__FILE__, __LINE__,
		  "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
                  nonnull (name), nonnull (value));

  if (name && *name && value && *value)
    {
      char *new_value = lt_extend_str (getenv (name), value, 0);
      lt_setenv (name, new_value);
      XFREE (new_value);
    }
}

EOF
	    case $host_os in
	      mingw*)
		cat <<"EOF"

/* Prepares an argument vector before calling spawn().
   Note that spawn() does not by itself call the command interpreter
     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
         GetVersionEx(&v);
         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
      }) ? "cmd.exe" : "command.com").
   Instead it simply concatenates the arguments, separated by ' ', and calls
   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
   special way:
   - Space and tab are interpreted as delimiters. They are not treated as
     delimiters if they are surrounded by double quotes: "...".
   - Unescaped double quotes are removed from the input. Their only effect is
     that within double quotes, space and tab are treated like normal
     characters.
   - Backslashes not followed by double quotes are not special.
   - But 2*n+1 backslashes followed by a double quote become
     n backslashes followed by a double quote (n >= 0):
       \" -> "
       \\\" -> \"
       \\\\\" -> \\"
 */
#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
char **
prepare_spawn (char **argv)
{
  size_t argc;
  char **new_argv;
  size_t i;

  /* Count number of arguments.  */
  for (argc = 0; argv[argc] != NULL; argc++)
    ;

  /* Allocate new argument vector.  */
  new_argv = XMALLOC (char *, argc + 1);

  /* Put quoted arguments into the new argument vector.  */
  for (i = 0; i < argc; i++)
    {
      const char *string = argv[i];

      if (string[0] == '\0')
	new_argv[i] = xstrdup ("\"\"");
      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
	{
	  int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
	  size_t length;
	  unsigned int backslashes;
	  const char *s;
	  char *quoted_string;
	  char *p;

	  length = 0;
	  backslashes = 0;
	  if (quote_around)
	    length++;
	  for (s = string; *s != '\0'; s++)
	    {
	      char c = *s;
	      if (c == '"')
		length += backslashes + 1;
	      length++;
	      if (c == '\\')
		backslashes++;
	      else
		backslashes = 0;
	    }
	  if (quote_around)
	    length += backslashes + 1;

	  quoted_string = XMALLOC (char, length + 1);

	  p = quoted_string;
	  backslashes = 0;
	  if (quote_around)
	    *p++ = '"';
	  for (s = string; *s != '\0'; s++)
	    {
	      char c = *s;
	      if (c == '"')
		{
		  unsigned int j;
		  for (j = backslashes + 1; j > 0; j--)
		    *p++ = '\\';
		}
	      *p++ = c;
	      if (c == '\\')
		backslashes++;
	      else
		backslashes = 0;
	    }
	  if (quote_around)
	    {
	      unsigned int j;
	      for (j = backslashes; j > 0; j--)
		*p++ = '\\';
	      *p++ = '"';
	    }
	  *p = '\0';

	  new_argv[i] = quoted_string;
	}
      else
	new_argv[i] = (char *) string;
    }
  new_argv[argc] = NULL;

  return new_argv;
}
EOF
		;;
	    esac

            cat <<"EOF"
void lt_dump_script (FILE* f)
{
EOF
	    func_emit_wrapper yes |
	      $SED -n -e '
s/^\(.\{79\}\)\(..*\)/\1\
\2/
h
s/\([\\"]\)/\\\1/g
s/$/\\n/
s/\([^\n]*\).*/  fputs ("\1", f);/p
g
D'
            cat <<"EOF"
}
EOF
}
# end: func_emit_cwrapperexe_src

# func_win32_import_lib_p ARG
# True if ARG is an import lib, as indicated by $file_magic_cmd
func_win32_import_lib_p ()
{
    $opt_debug
    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
    *import*) : ;;
    *) false ;;
    esac
}

# func_mode_link arg...
func_mode_link ()
{
    $opt_debug
    case $host in
    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
      # It is impossible to link a dll without this setting, and
      # we shouldn't force the makefile maintainer to figure out
      # which system we are compiling for in order to pass an extra
      # flag for every libtool invocation.
      # allow_undefined=no

      # FIXME: Unfortunately, there are problems with the above when trying
      # to make a dll which has undefined symbols, in which case not
      # even a static library is built.  For now, we need to specify
      # -no-undefined on the libtool link line when we can be certain
      # that all symbols are satisfied, otherwise we get a static library.
      allow_undefined=yes
      ;;
    *)
      allow_undefined=yes
      ;;
    esac
    libtool_args=$nonopt
    base_compile="$nonopt $@"
    compile_command=$nonopt
    finalize_command=$nonopt

    compile_rpath=
    finalize_rpath=
    compile_shlibpath=
    finalize_shlibpath=
    convenience=
    old_convenience=
    deplibs=
    old_deplibs=
    compiler_flags=
    linker_flags=
    dllsearchpath=
    lib_search_path=`pwd`
    inst_prefix_dir=
    new_inherited_linker_flags=

    avoid_version=no
    bindir=
    dlfiles=
    dlprefiles=
    dlself=no
    export_dynamic=no
    export_symbols=
    export_symbols_regex=
    generated=
    libobjs=
    ltlibs=
    module=no
    no_install=no
    objs=
    non_pic_objects=
    precious_files_regex=
    prefer_static_libs=no
    preload=no
    prev=
    prevarg=
    release=
    rpath=
    xrpath=
    perm_rpath=
    temp_rpath=
    thread_safe=no
    vinfo=
    vinfo_number=no
    weak_libs=
    single_module="${wl}-single_module"
    func_infer_tag $base_compile

    # We need to know -static, to get the right output filenames.
    for arg
    do
      case $arg in
      -shared)
	test "$build_libtool_libs" != yes && \
	  func_fatal_configuration "can not build a shared library"
	build_old_libs=no
	break
	;;
      -all-static | -static | -static-libtool-libs)
	case $arg in
	-all-static)
	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
	    func_warning "complete static linking is impossible in this configuration"
	  fi
	  if test -n "$link_static_flag"; then
	    dlopen_self=$dlopen_self_static
	  fi
	  prefer_static_libs=yes
	  ;;
	-static)
	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
	    dlopen_self=$dlopen_self_static
	  fi
	  prefer_static_libs=built
	  ;;
	-static-libtool-libs)
	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
	    dlopen_self=$dlopen_self_static
	  fi
	  prefer_static_libs=yes
	  ;;
	esac
	build_libtool_libs=no
	build_old_libs=yes
	break
	;;
      esac
    done

    # See if our shared archives depend on static archives.
    test -n "$old_archive_from_new_cmds" && build_old_libs=yes

    # Go through the arguments, transforming them on the way.
    while test "$#" -gt 0; do
      arg="$1"
      shift
      func_quote_for_eval "$arg"
      qarg=$func_quote_for_eval_unquoted_result
      func_append libtool_args " $func_quote_for_eval_result"

      # If the previous option needs an argument, assign it.
      if test -n "$prev"; then
	case $prev in
	output)
	  func_append compile_command " @OUTPUT@"
	  func_append finalize_command " @OUTPUT@"
	  ;;
	esac

	case $prev in
	bindir)
	  bindir="$arg"
	  prev=
	  continue
	  ;;
	dlfiles|dlprefiles)
	  if test "$preload" = no; then
	    # Add the symbol object into the linking commands.
	    func_append compile_command " @SYMFILE@"
	    func_append finalize_command " @SYMFILE@"
	    preload=yes
	  fi
	  case $arg in
	  *.la | *.lo) ;;  # We handle these cases below.
	  force)
	    if test "$dlself" = no; then
	      dlself=needless
	      export_dynamic=yes
	    fi
	    prev=
	    continue
	    ;;
	  self)
	    if test "$prev" = dlprefiles; then
	      dlself=yes
	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
	      dlself=yes
	    else
	      dlself=needless
	      export_dynamic=yes
	    fi
	    prev=
	    continue
	    ;;
	  *)
	    if test "$prev" = dlfiles; then
	      func_append dlfiles " $arg"
	    else
	      func_append dlprefiles " $arg"
	    fi
	    prev=
	    continue
	    ;;
	  esac
	  ;;
	expsyms)
	  export_symbols="$arg"
	  test -f "$arg" \
	    || func_fatal_error "symbol file \`$arg' does not exist"
	  prev=
	  continue
	  ;;
	expsyms_regex)
	  export_symbols_regex="$arg"
	  prev=
	  continue
	  ;;
	framework)
	  case $host in
	    *-*-darwin*)
	      case "$deplibs " in
		*" $qarg.ltframework "*) ;;
		*) func_append deplibs " $qarg.ltframework" # this is fixed later
		   ;;
	      esac
	      ;;
	  esac
	  prev=
	  continue
	  ;;
	inst_prefix)
	  inst_prefix_dir="$arg"
	  prev=
	  continue
	  ;;
	objectlist)
	  if test -f "$arg"; then
	    save_arg=$arg
	    moreargs=
	    for fil in `cat "$save_arg"`
	    do
#	      func_append moreargs " $fil"
	      arg=$fil
	      # A libtool-controlled object.

	      # Check to see that this really is a libtool object.
	      if func_lalib_unsafe_p "$arg"; then
		pic_object=
		non_pic_object=

		# Read the .lo file
		func_source "$arg"

		if test -z "$pic_object" ||
		   test -z "$non_pic_object" ||
		   test "$pic_object" = none &&
		   test "$non_pic_object" = none; then
		  func_fatal_error "cannot find name of object for \`$arg'"
		fi

		# Extract subdirectory from the argument.
		func_dirname "$arg" "/" ""
		xdir="$func_dirname_result"

		if test "$pic_object" != none; then
		  # Prepend the subdirectory the object is found in.
		  pic_object="$xdir$pic_object"

		  if test "$prev" = dlfiles; then
		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
		      func_append dlfiles " $pic_object"
		      prev=
		      continue
		    else
		      # If libtool objects are unsupported, then we need to preload.
		      prev=dlprefiles
		    fi
		  fi

		  # CHECK ME:  I think I busted this.  -Ossama
		  if test "$prev" = dlprefiles; then
		    # Preload the old-style object.
		    func_append dlprefiles " $pic_object"
		    prev=
		  fi

		  # A PIC object.
		  func_append libobjs " $pic_object"
		  arg="$pic_object"
		fi

		# Non-PIC object.
		if test "$non_pic_object" != none; then
		  # Prepend the subdirectory the object is found in.
		  non_pic_object="$xdir$non_pic_object"

		  # A standard non-PIC object
		  func_append non_pic_objects " $non_pic_object"
		  if test -z "$pic_object" || test "$pic_object" = none ; then
		    arg="$non_pic_object"
		  fi
		else
		  # If the PIC object exists, use it instead.
		  # $xdir was prepended to $pic_object above.
		  non_pic_object="$pic_object"
		  func_append non_pic_objects " $non_pic_object"
		fi
	      else
		# Only an error if not doing a dry-run.
		if $opt_dry_run; then
		  # Extract subdirectory from the argument.
		  func_dirname "$arg" "/" ""
		  xdir="$func_dirname_result"

		  func_lo2o "$arg"
		  pic_object=$xdir$objdir/$func_lo2o_result
		  non_pic_object=$xdir$func_lo2o_result
		  func_append libobjs " $pic_object"
		  func_append non_pic_objects " $non_pic_object"
	        else
		  func_fatal_error "\`$arg' is not a valid libtool object"
		fi
	      fi
	    done
	  else
	    func_fatal_error "link input file \`$arg' does not exist"
	  fi
	  arg=$save_arg
	  prev=
	  continue
	  ;;
	precious_regex)
	  precious_files_regex="$arg"
	  prev=
	  continue
	  ;;
	release)
	  release="-$arg"
	  prev=
	  continue
	  ;;
	rpath | xrpath)
	  # We need an absolute path.
	  case $arg in
	  [\\/]* | [A-Za-z]:[\\/]*) ;;
	  *)
	    func_fatal_error "only absolute run-paths are allowed"
	    ;;
	  esac
	  if test "$prev" = rpath; then
	    case "$rpath " in
	    *" $arg "*) ;;
	    *) func_append rpath " $arg" ;;
	    esac
	  else
	    case "$xrpath " in
	    *" $arg "*) ;;
	    *) func_append xrpath " $arg" ;;
	    esac
	  fi
	  prev=
	  continue
	  ;;
	shrext)
	  shrext_cmds="$arg"
	  prev=
	  continue
	  ;;
	weak)
	  func_append weak_libs " $arg"
	  prev=
	  continue
	  ;;
	xcclinker)
	  func_append linker_flags " $qarg"
	  func_append compiler_flags " $qarg"
	  prev=
	  func_append compile_command " $qarg"
	  func_append finalize_command " $qarg"
	  continue
	  ;;
	xcompiler)
	  func_append compiler_flags " $qarg"
	  prev=
	  func_append compile_command " $qarg"
	  func_append finalize_command " $qarg"
	  continue
	  ;;
	xlinker)
	  func_append linker_flags " $qarg"
	  func_append compiler_flags " $wl$qarg"
	  prev=
	  func_append compile_command " $wl$qarg"
	  func_append finalize_command " $wl$qarg"
	  continue
	  ;;
	*)
	  eval "$prev=\"\$arg\""
	  prev=
	  continue
	  ;;
	esac
      fi # test -n "$prev"

      prevarg="$arg"

      case $arg in
      -all-static)
	if test -n "$link_static_flag"; then
	  # See comment for -static flag below, for more details.
	  func_append compile_command " $link_static_flag"
	  func_append finalize_command " $link_static_flag"
	fi
	continue
	;;

      -allow-undefined)
	# FIXME: remove this flag sometime in the future.
	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
	;;

      -avoid-version)
	avoid_version=yes
	continue
	;;

      -bindir)
	prev=bindir
	continue
	;;

      -dlopen)
	prev=dlfiles
	continue
	;;

      -dlpreopen)
	prev=dlprefiles
	continue
	;;

      -export-dynamic)
	export_dynamic=yes
	continue
	;;

      -export-symbols | -export-symbols-regex)
	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
	  func_fatal_error "more than one -exported-symbols argument is not allowed"
	fi
	if test "X$arg" = "X-export-symbols"; then
	  prev=expsyms
	else
	  prev=expsyms_regex
	fi
	continue
	;;

      -framework)
	prev=framework
	continue
	;;

      -inst-prefix-dir)
	prev=inst_prefix
	continue
	;;

      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
      # so, if we see these flags be careful not to treat them like -L
      -L[A-Z][A-Z]*:*)
	case $with_gcc/$host in
	no/*-*-irix* | /*-*-irix*)
	  func_append compile_command " $arg"
	  func_append finalize_command " $arg"
	  ;;
	esac
	continue
	;;

      -L*)
	func_stripname "-L" '' "$arg"
	if test -z "$func_stripname_result"; then
	  if test "$#" -gt 0; then
	    func_fatal_error "require no space between \`-L' and \`$1'"
	  else
	    func_fatal_error "need path for \`-L' option"
	  fi
	fi
	func_resolve_sysroot "$func_stripname_result"
	dir=$func_resolve_sysroot_result
	# We need an absolute path.
	case $dir in
	[\\/]* | [A-Za-z]:[\\/]*) ;;
	*)
	  absdir=`cd "$dir" && pwd`
	  test -z "$absdir" && \
	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
	  dir="$absdir"
	  ;;
	esac
	case "$deplibs " in
	*" -L$dir "* | *" $arg "*)
	  # Will only happen for absolute or sysroot arguments
	  ;;
	*)
	  # Preserve sysroot, but never include relative directories
	  case $dir in
	    [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
	    *) func_append deplibs " -L$dir" ;;
	  esac
	  func_append lib_search_path " $dir"
	  ;;
	esac
	case $host in
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
	  testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
	  case :$dllsearchpath: in
	  *":$dir:"*) ;;
	  ::) dllsearchpath=$dir;;
	  *) func_append dllsearchpath ":$dir";;
	  esac
	  case :$dllsearchpath: in
	  *":$testbindir:"*) ;;
	  ::) dllsearchpath=$testbindir;;
	  *) func_append dllsearchpath ":$testbindir";;
	  esac
	  ;;
	esac
	continue
	;;

      -l*)
	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
	  case $host in
	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
	    # These systems don't actually have a C or math library (as such)
	    continue
	    ;;
	  *-*-os2*)
	    # These systems don't actually have a C library (as such)
	    test "X$arg" = "X-lc" && continue
	    ;;
	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
	    # Do not include libc due to us having libc/libc_r.
	    test "X$arg" = "X-lc" && continue
	    ;;
	  *-*-rhapsody* | *-*-darwin1.[012])
	    # Rhapsody C and math libraries are in the System framework
	    func_append deplibs " System.ltframework"
	    continue
	    ;;
	  *-*-sco3.2v5* | *-*-sco5v6*)
	    # Causes problems with __ctype
	    test "X$arg" = "X-lc" && continue
	    ;;
	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
	    # Compiler inserts libc in the correct place for threads to work
	    test "X$arg" = "X-lc" && continue
	    ;;
	  esac
	elif test "X$arg" = "X-lc_r"; then
	 case $host in
	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
	   # Do not include libc_r directly, use -pthread flag.
	   continue
	   ;;
	 esac
	fi
	func_append deplibs " $arg"
	continue
	;;

      -module)
	module=yes
	continue
	;;

      # Tru64 UNIX uses -model [arg] to determine the layout of C++
      # classes, name mangling, and exception handling.
      # Darwin uses the -arch flag to determine output architecture.
      -model|-arch|-isysroot|--sysroot)
	func_append compiler_flags " $arg"
	func_append compile_command " $arg"
	func_append finalize_command " $arg"
	prev=xcompiler
	continue
	;;

      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
	func_append compiler_flags " $arg"
	func_append compile_command " $arg"
	func_append finalize_command " $arg"
	case "$new_inherited_linker_flags " in
	    *" $arg "*) ;;
	    * ) func_append new_inherited_linker_flags " $arg" ;;
	esac
	continue
	;;

      -multi_module)
	single_module="${wl}-multi_module"
	continue
	;;

      -no-fast-install)
	fast_install=no
	continue
	;;

      -no-install)
	case $host in
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
	  # The PATH hackery in wrapper scripts is required on Windows
	  # and Darwin in order for the loader to find any dlls it needs.
	  func_warning "\`-no-install' is ignored for $host"
	  func_warning "assuming \`-no-fast-install' instead"
	  fast_install=no
	  ;;
	*) no_install=yes ;;
	esac
	continue
	;;

      -no-undefined)
	allow_undefined=no
	continue
	;;

      -objectlist)
	prev=objectlist
	continue
	;;

      -o) prev=output ;;

      -precious-files-regex)
	prev=precious_regex
	continue
	;;

      -release)
	prev=release
	continue
	;;

      -rpath)
	prev=rpath
	continue
	;;

      -R)
	prev=xrpath
	continue
	;;

      -R*)
	func_stripname '-R' '' "$arg"
	dir=$func_stripname_result
	# We need an absolute path.
	case $dir in
	[\\/]* | [A-Za-z]:[\\/]*) ;;
	=*)
	  func_stripname '=' '' "$dir"
	  dir=$lt_sysroot$func_stripname_result
	  ;;
	*)
	  func_fatal_error "only absolute run-paths are allowed"
	  ;;
	esac
	case "$xrpath " in
	*" $dir "*) ;;
	*) func_append xrpath " $dir" ;;
	esac
	continue
	;;

      -shared)
	# The effects of -shared are defined in a previous loop.
	continue
	;;

      -shrext)
	prev=shrext
	continue
	;;

      -static | -static-libtool-libs)
	# The effects of -static are defined in a previous loop.
	# We used to do the same as -all-static on platforms that
	# didn't have a PIC flag, but the assumption that the effects
	# would be equivalent was wrong.  It would break on at least
	# Digital Unix and AIX.
	continue
	;;

      -thread-safe)
	thread_safe=yes
	continue
	;;

      -version-info)
	prev=vinfo
	continue
	;;

      -version-number)
	prev=vinfo
	vinfo_number=yes
	continue
	;;

      -weak)
        prev=weak
	continue
	;;

      -Wc,*)
	func_stripname '-Wc,' '' "$arg"
	args=$func_stripname_result
	arg=
	save_ifs="$IFS"; IFS=','
	for flag in $args; do
	  IFS="$save_ifs"
          func_quote_for_eval "$flag"
	  func_append arg " $func_quote_for_eval_result"
	  func_append compiler_flags " $func_quote_for_eval_result"
	done
	IFS="$save_ifs"
	func_stripname ' ' '' "$arg"
	arg=$func_stripname_result
	;;

      -Wl,*)
	func_stripname '-Wl,' '' "$arg"
	args=$func_stripname_result
	arg=
	save_ifs="$IFS"; IFS=','
	for flag in $args; do
	  IFS="$save_ifs"
          func_quote_for_eval "$flag"
	  func_append arg " $wl$func_quote_for_eval_result"
	  func_append compiler_flags " $wl$func_quote_for_eval_result"
	  func_append linker_flags " $func_quote_for_eval_result"
	done
	IFS="$save_ifs"
	func_stripname ' ' '' "$arg"
	arg=$func_stripname_result
	;;

      -Xcompiler)
	prev=xcompiler
	continue
	;;

      -Xlinker)
	prev=xlinker
	continue
	;;

      -XCClinker)
	prev=xcclinker
	continue
	;;

      # -msg_* for osf cc
      -msg_*)
	func_quote_for_eval "$arg"
	arg="$func_quote_for_eval_result"
	;;

      # Flags to be passed through unchanged, with rationale:
      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
      # -r[0-9][0-9]*        specify processor for the SGI compiler
      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
      # +DA*, +DD*           enable 64-bit mode for the HP compiler
      # -q*                  compiler args for the IBM compiler
      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
      # -F/path              path to uninstalled frameworks, gcc on darwin
      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
      # @file                GCC response files
      # -tp=*                Portland pgcc target processor selection
      # --sysroot=*          for sysroot support
      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
        func_quote_for_eval "$arg"
	arg="$func_quote_for_eval_result"
        func_append compile_command " $arg"
        func_append finalize_command " $arg"
        func_append compiler_flags " $arg"
        continue
        ;;

      # Some other compiler flag.
      -* | +*)
        func_quote_for_eval "$arg"
	arg="$func_quote_for_eval_result"
	;;

      *.$objext)
	# A standard object.
	func_append objs " $arg"
	;;

      *.lo)
	# A libtool-controlled object.

	# Check to see that this really is a libtool object.
	if func_lalib_unsafe_p "$arg"; then
	  pic_object=
	  non_pic_object=

	  # Read the .lo file
	  func_source "$arg"

	  if test -z "$pic_object" ||
	     test -z "$non_pic_object" ||
	     test "$pic_object" = none &&
	     test "$non_pic_object" = none; then
	    func_fatal_error "cannot find name of object for \`$arg'"
	  fi

	  # Extract subdirectory from the argument.
	  func_dirname "$arg" "/" ""
	  xdir="$func_dirname_result"

	  if test "$pic_object" != none; then
	    # Prepend the subdirectory the object is found in.
	    pic_object="$xdir$pic_object"

	    if test "$prev" = dlfiles; then
	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
		func_append dlfiles " $pic_object"
		prev=
		continue
	      else
		# If libtool objects are unsupported, then we need to preload.
		prev=dlprefiles
	      fi
	    fi

	    # CHECK ME:  I think I busted this.  -Ossama
	    if test "$prev" = dlprefiles; then
	      # Preload the old-style object.
	      func_append dlprefiles " $pic_object"
	      prev=
	    fi

	    # A PIC object.
	    func_append libobjs " $pic_object"
	    arg="$pic_object"
	  fi

	  # Non-PIC object.
	  if test "$non_pic_object" != none; then
	    # Prepend the subdirectory the object is found in.
	    non_pic_object="$xdir$non_pic_object"

	    # A standard non-PIC object
	    func_append non_pic_objects " $non_pic_object"
	    if test -z "$pic_object" || test "$pic_object" = none ; then
	      arg="$non_pic_object"
	    fi
	  else
	    # If the PIC object exists, use it instead.
	    # $xdir was prepended to $pic_object above.
	    non_pic_object="$pic_object"
	    func_append non_pic_objects " $non_pic_object"
	  fi
	else
	  # Only an error if not doing a dry-run.
	  if $opt_dry_run; then
	    # Extract subdirectory from the argument.
	    func_dirname "$arg" "/" ""
	    xdir="$func_dirname_result"

	    func_lo2o "$arg"
	    pic_object=$xdir$objdir/$func_lo2o_result
	    non_pic_object=$xdir$func_lo2o_result
	    func_append libobjs " $pic_object"
	    func_append non_pic_objects " $non_pic_object"
	  else
	    func_fatal_error "\`$arg' is not a valid libtool object"
	  fi
	fi
	;;

      *.$libext)
	# An archive.
	func_append deplibs " $arg"
	func_append old_deplibs " $arg"
	continue
	;;

      *.la)
	# A libtool-controlled library.

	func_resolve_sysroot "$arg"
	if test "$prev" = dlfiles; then
	  # This library was specified with -dlopen.
	  func_append dlfiles " $func_resolve_sysroot_result"
	  prev=
	elif test "$prev" = dlprefiles; then
	  # The library was specified with -dlpreopen.
	  func_append dlprefiles " $func_resolve_sysroot_result"
	  prev=
	else
	  func_append deplibs " $func_resolve_sysroot_result"
	fi
	continue
	;;

      # Some other compiler argument.
      *)
	# Unknown arguments in both finalize_command and compile_command need
	# to be aesthetically quoted because they are evaled later.
	func_quote_for_eval "$arg"
	arg="$func_quote_for_eval_result"
	;;
      esac # arg

      # Now actually substitute the argument into the commands.
      if test -n "$arg"; then
	func_append compile_command " $arg"
	func_append finalize_command " $arg"
      fi
    done # argument parsing loop

    test -n "$prev" && \
      func_fatal_help "the \`$prevarg' option requires an argument"

    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
      eval arg=\"$export_dynamic_flag_spec\"
      func_append compile_command " $arg"
      func_append finalize_command " $arg"
    fi

    oldlibs=
    # calculate the name of the file, without its directory
    func_basename "$output"
    outputname="$func_basename_result"
    libobjs_save="$libobjs"

    if test -n "$shlibpath_var"; then
      # get the directories listed in $shlibpath_var
      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
    else
      shlib_search_path=
    fi
    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"

    func_dirname "$output" "/" ""
    output_objdir="$func_dirname_result$objdir"
    func_to_tool_file "$output_objdir/"
    tool_output_objdir=$func_to_tool_file_result
    # Create the object directory.
    func_mkdir_p "$output_objdir"

    # Determine the type of output
    case $output in
    "")
      func_fatal_help "you must specify an output file"
      ;;
    *.$libext) linkmode=oldlib ;;
    *.lo | *.$objext) linkmode=obj ;;
    *.la) linkmode=lib ;;
    *) linkmode=prog ;; # Anything else should be a program.
    esac

    specialdeplibs=

    libs=
    # Find all interdependent deplibs by searching for libraries
    # that are linked more than once (e.g. -la -lb -la)
    for deplib in $deplibs; do
      if $opt_preserve_dup_deps ; then
	case "$libs " in
	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
	esac
      fi
      func_append libs " $deplib"
    done

    if test "$linkmode" = lib; then
      libs="$predeps $libs $compiler_lib_search_path $postdeps"

      # Compute libraries that are listed more than once in $predeps
      # $postdeps and mark them as special (i.e., whose duplicates are
      # not to be eliminated).
      pre_post_deps=
      if $opt_duplicate_compiler_generated_deps; then
	for pre_post_dep in $predeps $postdeps; do
	  case "$pre_post_deps " in
	  *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
	  esac
	  func_append pre_post_deps " $pre_post_dep"
	done
      fi
      pre_post_deps=
    fi

    deplibs=
    newdependency_libs=
    newlib_search_path=
    need_relink=no # whether we're linking any uninstalled libtool libraries
    notinst_deplibs= # not-installed libtool libraries
    notinst_path= # paths that contain not-installed libtool libraries

    case $linkmode in
    lib)
	passes="conv dlpreopen link"
	for file in $dlfiles $dlprefiles; do
	  case $file in
	  *.la) ;;
	  *)
	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
	    ;;
	  esac
	done
	;;
    prog)
	compile_deplibs=
	finalize_deplibs=
	alldeplibs=no
	newdlfiles=
	newdlprefiles=
	passes="conv scan dlopen dlpreopen link"
	;;
    *)  passes="conv"
	;;
    esac

    for pass in $passes; do
      # The preopen pass in lib mode reverses $deplibs; put it back here
      # so that -L comes before libs that need it for instance...
      if test "$linkmode,$pass" = "lib,link"; then
	## FIXME: Find the place where the list is rebuilt in the wrong
	##        order, and fix it there properly
        tmp_deplibs=
	for deplib in $deplibs; do
	  tmp_deplibs="$deplib $tmp_deplibs"
	done
	deplibs="$tmp_deplibs"
      fi

      if test "$linkmode,$pass" = "lib,link" ||
	 test "$linkmode,$pass" = "prog,scan"; then
	libs="$deplibs"
	deplibs=
      fi
      if test "$linkmode" = prog; then
	case $pass in
	dlopen) libs="$dlfiles" ;;
	dlpreopen) libs="$dlprefiles" ;;
	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
	esac
      fi
      if test "$linkmode,$pass" = "lib,dlpreopen"; then
	# Collect and forward deplibs of preopened libtool libs
	for lib in $dlprefiles; do
	  # Ignore non-libtool-libs
	  dependency_libs=
	  func_resolve_sysroot "$lib"
	  case $lib in
	  *.la)	func_source "$func_resolve_sysroot_result" ;;
	  esac

	  # Collect preopened libtool deplibs, except any this library
	  # has declared as weak libs
	  for deplib in $dependency_libs; do
	    func_basename "$deplib"
            deplib_base=$func_basename_result
	    case " $weak_libs " in
	    *" $deplib_base "*) ;;
	    *) func_append deplibs " $deplib" ;;
	    esac
	  done
	done
	libs="$dlprefiles"
      fi
      if test "$pass" = dlopen; then
	# Collect dlpreopened libraries
	save_deplibs="$deplibs"
	deplibs=
      fi

      for deplib in $libs; do
	lib=
	found=no
	case $deplib in
	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
	  if test "$linkmode,$pass" = "prog,link"; then
	    compile_deplibs="$deplib $compile_deplibs"
	    finalize_deplibs="$deplib $finalize_deplibs"
	  else
	    func_append compiler_flags " $deplib"
	    if test "$linkmode" = lib ; then
		case "$new_inherited_linker_flags " in
		    *" $deplib "*) ;;
		    * ) func_append new_inherited_linker_flags " $deplib" ;;
		esac
	    fi
	  fi
	  continue
	  ;;
	-l*)
	  if test "$linkmode" != lib && test "$linkmode" != prog; then
	    func_warning "\`-l' is ignored for archives/objects"
	    continue
	  fi
	  func_stripname '-l' '' "$deplib"
	  name=$func_stripname_result
	  if test "$linkmode" = lib; then
	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
	  else
	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
	  fi
	  for searchdir in $searchdirs; do
	    for search_ext in .la $std_shrext .so .a; do
	      # Search the libtool library
	      lib="$searchdir/lib${name}${search_ext}"
	      if test -f "$lib"; then
		if test "$search_ext" = ".la"; then
		  found=yes
		else
		  found=no
		fi
		break 2
	      fi
	    done
	  done
	  if test "$found" != yes; then
	    # deplib doesn't seem to be a libtool library
	    if test "$linkmode,$pass" = "prog,link"; then
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    else
	      deplibs="$deplib $deplibs"
	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
	    fi
	    continue
	  else # deplib is a libtool library
	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
	    # We need to do some special things here, and not later.
	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
	      case " $predeps $postdeps " in
	      *" $deplib "*)
		if func_lalib_p "$lib"; then
		  library_names=
		  old_library=
		  func_source "$lib"
		  for l in $old_library $library_names; do
		    ll="$l"
		  done
		  if test "X$ll" = "X$old_library" ; then # only static version available
		    found=no
		    func_dirname "$lib" "" "."
		    ladir="$func_dirname_result"
		    lib=$ladir/$old_library
		    if test "$linkmode,$pass" = "prog,link"; then
		      compile_deplibs="$deplib $compile_deplibs"
		      finalize_deplibs="$deplib $finalize_deplibs"
		    else
		      deplibs="$deplib $deplibs"
		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
		    fi
		    continue
		  fi
		fi
		;;
	      *) ;;
	      esac
	    fi
	  fi
	  ;; # -l
	*.ltframework)
	  if test "$linkmode,$pass" = "prog,link"; then
	    compile_deplibs="$deplib $compile_deplibs"
	    finalize_deplibs="$deplib $finalize_deplibs"
	  else
	    deplibs="$deplib $deplibs"
	    if test "$linkmode" = lib ; then
		case "$new_inherited_linker_flags " in
		    *" $deplib "*) ;;
		    * ) func_append new_inherited_linker_flags " $deplib" ;;
		esac
	    fi
	  fi
	  continue
	  ;;
	-L*)
	  case $linkmode in
	  lib)
	    deplibs="$deplib $deplibs"
	    test "$pass" = conv && continue
	    newdependency_libs="$deplib $newdependency_libs"
	    func_stripname '-L' '' "$deplib"
	    func_resolve_sysroot "$func_stripname_result"
	    func_append newlib_search_path " $func_resolve_sysroot_result"
	    ;;
	  prog)
	    if test "$pass" = conv; then
	      deplibs="$deplib $deplibs"
	      continue
	    fi
	    if test "$pass" = scan; then
	      deplibs="$deplib $deplibs"
	    else
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    fi
	    func_stripname '-L' '' "$deplib"
	    func_resolve_sysroot "$func_stripname_result"
	    func_append newlib_search_path " $func_resolve_sysroot_result"
	    ;;
	  *)
	    func_warning "\`-L' is ignored for archives/objects"
	    ;;
	  esac # linkmode
	  continue
	  ;; # -L
	-R*)
	  if test "$pass" = link; then
	    func_stripname '-R' '' "$deplib"
	    func_resolve_sysroot "$func_stripname_result"
	    dir=$func_resolve_sysroot_result
	    # Make sure the xrpath contains only unique directories.
	    case "$xrpath " in
	    *" $dir "*) ;;
	    *) func_append xrpath " $dir" ;;
	    esac
	  fi
	  deplibs="$deplib $deplibs"
	  continue
	  ;;
	*.la)
	  func_resolve_sysroot "$deplib"
	  lib=$func_resolve_sysroot_result
	  ;;
	*.$libext)
	  if test "$pass" = conv; then
	    deplibs="$deplib $deplibs"
	    continue
	  fi
	  case $linkmode in
	  lib)
	    # Linking convenience modules into shared libraries is allowed,
	    # but linking other static libraries is non-portable.
	    case " $dlpreconveniencelibs " in
	    *" $deplib "*) ;;
	    *)
	      valid_a_lib=no
	      case $deplibs_check_method in
		match_pattern*)
		  set dummy $deplibs_check_method; shift
		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
		  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
		    | $EGREP "$match_pattern_regex" > /dev/null; then
		    valid_a_lib=yes
		  fi
		;;
		pass_all)
		  valid_a_lib=yes
		;;
	      esac
	      if test "$valid_a_lib" != yes; then
		echo
		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
		echo "*** I have the capability to make that library automatically link in when"
		echo "*** you link to this library.  But I can only do this if you have a"
		echo "*** shared version of the library, which you do not appear to have"
		echo "*** because the file extensions .$libext of this argument makes me believe"
		echo "*** that it is just a static archive that I should not use here."
	      else
		echo
		$ECHO "*** Warning: Linking the shared library $output against the"
		$ECHO "*** static library $deplib is not portable!"
		deplibs="$deplib $deplibs"
	      fi
	      ;;
	    esac
	    continue
	    ;;
	  prog)
	    if test "$pass" != link; then
	      deplibs="$deplib $deplibs"
	    else
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    fi
	    continue
	    ;;
	  esac # linkmode
	  ;; # *.$libext
	*.lo | *.$objext)
	  if test "$pass" = conv; then
	    deplibs="$deplib $deplibs"
	  elif test "$linkmode" = prog; then
	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
	      # If there is no dlopen support or we're linking statically,
	      # we need to preload.
	      func_append newdlprefiles " $deplib"
	      compile_deplibs="$deplib $compile_deplibs"
	      finalize_deplibs="$deplib $finalize_deplibs"
	    else
	      func_append newdlfiles " $deplib"
	    fi
	  fi
	  continue
	  ;;
	%DEPLIBS%)
	  alldeplibs=yes
	  continue
	  ;;
	esac # case $deplib

	if test "$found" = yes || test -f "$lib"; then :
	else
	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
	fi

	# Check to see that this really is a libtool archive.
	func_lalib_unsafe_p "$lib" \
	  || func_fatal_error "\`$lib' is not a valid libtool archive"

	func_dirname "$lib" "" "."
	ladir="$func_dirname_result"

	dlname=
	dlopen=
	dlpreopen=
	libdir=
	library_names=
	old_library=
	inherited_linker_flags=
	# If the library was installed with an old release of libtool,
	# it will not redefine variables installed, or shouldnotlink
	installed=yes
	shouldnotlink=no
	avoidtemprpath=


	# Read the .la file
	func_source "$lib"

	# Convert "-framework foo" to "foo.ltframework"
	if test -n "$inherited_linker_flags"; then
	  tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
	    case " $new_inherited_linker_flags " in
	      *" $tmp_inherited_linker_flag "*) ;;
	      *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
	    esac
	  done
	fi
	dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
	if test "$linkmode,$pass" = "lib,link" ||
	   test "$linkmode,$pass" = "prog,scan" ||
	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
	  test -n "$dlopen" && func_append dlfiles " $dlopen"
	  test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
	fi

	if test "$pass" = conv; then
	  # Only check for convenience libraries
	  deplibs="$lib $deplibs"
	  if test -z "$libdir"; then
	    if test -z "$old_library"; then
	      func_fatal_error "cannot find name of link library for \`$lib'"
	    fi
	    # It is a libtool convenience library, so add in its objects.
	    func_append convenience " $ladir/$objdir/$old_library"
	    func_append old_convenience " $ladir/$objdir/$old_library"
	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
	    func_fatal_error "\`$lib' is not a convenience library"
	  fi
	  tmp_libs=
	  for deplib in $dependency_libs; do
	    deplibs="$deplib $deplibs"
	    if $opt_preserve_dup_deps ; then
	      case "$tmp_libs " in
	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
	      esac
	    fi
	    func_append tmp_libs " $deplib"
	  done
	  continue
	fi # $pass = conv


	# Get the name of the library we link against.
	linklib=
	if test -n "$old_library" &&
	   { test "$prefer_static_libs" = yes ||
	     test "$prefer_static_libs,$installed" = "built,no"; }; then
	  linklib=$old_library
	else
	  for l in $old_library $library_names; do
	    linklib="$l"
	  done
	fi
	if test -z "$linklib"; then
	  func_fatal_error "cannot find name of link library for \`$lib'"
	fi

	# This library was specified with -dlopen.
	if test "$pass" = dlopen; then
	  if test -z "$libdir"; then
	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
	  fi
	  if test -z "$dlname" ||
	     test "$dlopen_support" != yes ||
	     test "$build_libtool_libs" = no; then
	    # If there is no dlname, no dlopen support or we're linking
	    # statically, we need to preload.  We also need to preload any
	    # dependent libraries so libltdl's deplib preloader doesn't
	    # bomb out in the load deplibs phase.
	    func_append dlprefiles " $lib $dependency_libs"
	  else
	    func_append newdlfiles " $lib"
	  fi
	  continue
	fi # $pass = dlopen

	# We need an absolute path.
	case $ladir in
	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
	*)
	  abs_ladir=`cd "$ladir" && pwd`
	  if test -z "$abs_ladir"; then
	    func_warning "cannot determine absolute directory name of \`$ladir'"
	    func_warning "passing it literally to the linker, although it might fail"
	    abs_ladir="$ladir"
	  fi
	  ;;
	esac
	func_basename "$lib"
	laname="$func_basename_result"

	# Find the relevant object directory and library name.
	if test "X$installed" = Xyes; then
	  if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
	    func_warning "library \`$lib' was moved."
	    dir="$ladir"
	    absdir="$abs_ladir"
	    libdir="$abs_ladir"
	  else
	    dir="$lt_sysroot$libdir"
	    absdir="$lt_sysroot$libdir"
	  fi
	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
	else
	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
	    dir="$ladir"
	    absdir="$abs_ladir"
	    # Remove this search path later
	    func_append notinst_path " $abs_ladir"
	  else
	    dir="$ladir/$objdir"
	    absdir="$abs_ladir/$objdir"
	    # Remove this search path later
	    func_append notinst_path " $abs_ladir"
	  fi
	fi # $installed = yes
	func_stripname 'lib' '.la' "$laname"
	name=$func_stripname_result

	# This library was specified with -dlpreopen.
	if test "$pass" = dlpreopen; then
	  if test -z "$libdir" && test "$linkmode" = prog; then
	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
	  fi
	  case "$host" in
	    # special handling for platforms with PE-DLLs.
	    *cygwin* | *mingw* | *cegcc* )
	      # Linker will automatically link against shared library if both
	      # static and shared are present.  Therefore, ensure we extract
	      # symbols from the import library if a shared library is present
	      # (otherwise, the dlopen module name will be incorrect).  We do
	      # this by putting the import library name into $newdlprefiles.
	      # We recover the dlopen module name by 'saving' the la file
	      # name in a special purpose variable, and (later) extracting the
	      # dlname from the la file.
	      if test -n "$dlname"; then
	        func_tr_sh "$dir/$linklib"
	        eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
	        func_append newdlprefiles " $dir/$linklib"
	      else
	        func_append newdlprefiles " $dir/$old_library"
	        # Keep a list of preopened convenience libraries to check
	        # that they are being used correctly in the link pass.
	        test -z "$libdir" && \
	          func_append dlpreconveniencelibs " $dir/$old_library"
	      fi
	    ;;
	    * )
	      # Prefer using a static library (so that no silly _DYNAMIC symbols
	      # are required to link).
	      if test -n "$old_library"; then
	        func_append newdlprefiles " $dir/$old_library"
	        # Keep a list of preopened convenience libraries to check
	        # that they are being used correctly in the link pass.
	        test -z "$libdir" && \
	          func_append dlpreconveniencelibs " $dir/$old_library"
	      # Otherwise, use the dlname, so that lt_dlopen finds it.
	      elif test -n "$dlname"; then
	        func_append newdlprefiles " $dir/$dlname"
	      else
	        func_append newdlprefiles " $dir/$linklib"
	      fi
	    ;;
	  esac
	fi # $pass = dlpreopen

	if test -z "$libdir"; then
	  # Link the convenience library
	  if test "$linkmode" = lib; then
	    deplibs="$dir/$old_library $deplibs"
	  elif test "$linkmode,$pass" = "prog,link"; then
	    compile_deplibs="$dir/$old_library $compile_deplibs"
	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
	  else
	    deplibs="$lib $deplibs" # used for prog,scan pass
	  fi
	  continue
	fi


	if test "$linkmode" = prog && test "$pass" != link; then
	  func_append newlib_search_path " $ladir"
	  deplibs="$lib $deplibs"

	  linkalldeplibs=no
	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
	     test "$build_libtool_libs" = no; then
	    linkalldeplibs=yes
	  fi

	  tmp_libs=
	  for deplib in $dependency_libs; do
	    case $deplib in
	    -L*) func_stripname '-L' '' "$deplib"
	         func_resolve_sysroot "$func_stripname_result"
	         func_append newlib_search_path " $func_resolve_sysroot_result"
		 ;;
	    esac
	    # Need to link against all dependency_libs?
	    if test "$linkalldeplibs" = yes; then
	      deplibs="$deplib $deplibs"
	    else
	      # Need to hardcode shared library paths
	      # or/and link against static libraries
	      newdependency_libs="$deplib $newdependency_libs"
	    fi
	    if $opt_preserve_dup_deps ; then
	      case "$tmp_libs " in
	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
	      esac
	    fi
	    func_append tmp_libs " $deplib"
	  done # for deplib
	  continue
	fi # $linkmode = prog...

	if test "$linkmode,$pass" = "prog,link"; then
	  if test -n "$library_names" &&
	     { { test "$prefer_static_libs" = no ||
	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
	       test -z "$old_library"; }; then
	    # We need to hardcode the library path
	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
	      # Make sure the rpath contains only unique directories.
	      case "$temp_rpath:" in
	      *"$absdir:"*) ;;
	      *) func_append temp_rpath "$absdir:" ;;
	      esac
	    fi

	    # Hardcode the library path.
	    # Skip directories that are in the system default run-time
	    # search path.
	    case " $sys_lib_dlsearch_path " in
	    *" $absdir "*) ;;
	    *)
	      case "$compile_rpath " in
	      *" $absdir "*) ;;
	      *) func_append compile_rpath " $absdir" ;;
	      esac
	      ;;
	    esac
	    case " $sys_lib_dlsearch_path " in
	    *" $libdir "*) ;;
	    *)
	      case "$finalize_rpath " in
	      *" $libdir "*) ;;
	      *) func_append finalize_rpath " $libdir" ;;
	      esac
	      ;;
	    esac
	  fi # $linkmode,$pass = prog,link...

	  if test "$alldeplibs" = yes &&
	     { test "$deplibs_check_method" = pass_all ||
	       { test "$build_libtool_libs" = yes &&
		 test -n "$library_names"; }; }; then
	    # We only need to search for static libraries
	    continue
	  fi
	fi

	link_static=no # Whether the deplib will be linked statically
	use_static_libs=$prefer_static_libs
	if test "$use_static_libs" = built && test "$installed" = yes; then
	  use_static_libs=no
	fi
	if test -n "$library_names" &&
	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
	  case $host in
	  *cygwin* | *mingw* | *cegcc*)
	      # No point in relinking DLLs because paths are not encoded
	      func_append notinst_deplibs " $lib"
	      need_relink=no
	    ;;
	  *)
	    if test "$installed" = no; then
	      func_append notinst_deplibs " $lib"
	      need_relink=yes
	    fi
	    ;;
	  esac
	  # This is a shared library

	  # Warn about portability, can't link against -module's on some
	  # systems (darwin).  Don't bleat about dlopened modules though!
	  dlopenmodule=""
	  for dlpremoduletest in $dlprefiles; do
	    if test "X$dlpremoduletest" = "X$lib"; then
	      dlopenmodule="$dlpremoduletest"
	      break
	    fi
	  done
	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
	    echo
	    if test "$linkmode" = prog; then
	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
	    else
	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
	    fi
	    $ECHO "*** $linklib is not portable!"
	  fi
	  if test "$linkmode" = lib &&
	     test "$hardcode_into_libs" = yes; then
	    # Hardcode the library path.
	    # Skip directories that are in the system default run-time
	    # search path.
	    case " $sys_lib_dlsearch_path " in
	    *" $absdir "*) ;;
	    *)
	      case "$compile_rpath " in
	      *" $absdir "*) ;;
	      *) func_append compile_rpath " $absdir" ;;
	      esac
	      ;;
	    esac
	    case " $sys_lib_dlsearch_path " in
	    *" $libdir "*) ;;
	    *)
	      case "$finalize_rpath " in
	      *" $libdir "*) ;;
	      *) func_append finalize_rpath " $libdir" ;;
	      esac
	      ;;
	    esac
	  fi

	  if test -n "$old_archive_from_expsyms_cmds"; then
	    # figure out the soname
	    set dummy $library_names
	    shift
	    realname="$1"
	    shift
	    libname=`eval "\\$ECHO \"$libname_spec\""`
	    # use dlname if we got it. it's perfectly good, no?
	    if test -n "$dlname"; then
	      soname="$dlname"
	    elif test -n "$soname_spec"; then
	      # bleh windows
	      case $host in
	      *cygwin* | mingw* | *cegcc*)
	        func_arith $current - $age
		major=$func_arith_result
		versuffix="-$major"
		;;
	      esac
	      eval soname=\"$soname_spec\"
	    else
	      soname="$realname"
	    fi

	    # Make a new name for the extract_expsyms_cmds to use
	    soroot="$soname"
	    func_basename "$soroot"
	    soname="$func_basename_result"
	    func_stripname 'lib' '.dll' "$soname"
	    newlib=libimp-$func_stripname_result.a

	    # If the library has no export list, then create one now
	    if test -f "$output_objdir/$soname-def"; then :
	    else
	      func_verbose "extracting exported symbol list from \`$soname'"
	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
	    fi

	    # Create $newlib
	    if test -f "$output_objdir/$newlib"; then :; else
	      func_verbose "generating import library for \`$soname'"
	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
	    fi
	    # make sure the library variables are pointing to the new library
	    dir=$output_objdir
	    linklib=$newlib
	  fi # test -n "$old_archive_from_expsyms_cmds"

	  if test "$linkmode" = prog || test "$opt_mode" != relink; then
	    add_shlibpath=
	    add_dir=
	    add=
	    lib_linked=yes
	    case $hardcode_action in
	    immediate | unsupported)
	      if test "$hardcode_direct" = no; then
		add="$dir/$linklib"
		case $host in
		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
		    *-*-unixware7*) add_dir="-L$dir" ;;
		  *-*-darwin* )
		    # if the lib is a (non-dlopened) module then we can not
		    # link against it, someone is ignoring the earlier warnings
		    if /usr/bin/file -L $add 2> /dev/null |
			 $GREP ": [^:]* bundle" >/dev/null ; then
		      if test "X$dlopenmodule" != "X$lib"; then
			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
			if test -z "$old_library" ; then
			  echo
			  echo "*** And there doesn't seem to be a static archive available"
			  echo "*** The link will probably fail, sorry"
			else
			  add="$dir/$old_library"
			fi
		      elif test -n "$old_library"; then
			add="$dir/$old_library"
		      fi
		    fi
		esac
	      elif test "$hardcode_minus_L" = no; then
		case $host in
		*-*-sunos*) add_shlibpath="$dir" ;;
		esac
		add_dir="-L$dir"
		add="-l$name"
	      elif test "$hardcode_shlibpath_var" = no; then
		add_shlibpath="$dir"
		add="-l$name"
	      else
		lib_linked=no
	      fi
	      ;;
	    relink)
	      if test "$hardcode_direct" = yes &&
	         test "$hardcode_direct_absolute" = no; then
		add="$dir/$linklib"
	      elif test "$hardcode_minus_L" = yes; then
		add_dir="-L$absdir"
		# Try looking first in the location we're being installed to.
		if test -n "$inst_prefix_dir"; then
		  case $libdir in
		    [\\/]*)
		      func_append add_dir " -L$inst_prefix_dir$libdir"
		      ;;
		  esac
		fi
		add="-l$name"
	      elif test "$hardcode_shlibpath_var" = yes; then
		add_shlibpath="$dir"
		add="-l$name"
	      else
		lib_linked=no
	      fi
	      ;;
	    *) lib_linked=no ;;
	    esac

	    if test "$lib_linked" != yes; then
	      func_fatal_configuration "unsupported hardcode properties"
	    fi

	    if test -n "$add_shlibpath"; then
	      case :$compile_shlibpath: in
	      *":$add_shlibpath:"*) ;;
	      *) func_append compile_shlibpath "$add_shlibpath:" ;;
	      esac
	    fi
	    if test "$linkmode" = prog; then
	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
	    else
	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
	      test -n "$add" && deplibs="$add $deplibs"
	      if test "$hardcode_direct" != yes &&
		 test "$hardcode_minus_L" != yes &&
		 test "$hardcode_shlibpath_var" = yes; then
		case :$finalize_shlibpath: in
		*":$libdir:"*) ;;
		*) func_append finalize_shlibpath "$libdir:" ;;
		esac
	      fi
	    fi
	  fi

	  if test "$linkmode" = prog || test "$opt_mode" = relink; then
	    add_shlibpath=
	    add_dir=
	    add=
	    # Finalize command for both is simple: just hardcode it.
	    if test "$hardcode_direct" = yes &&
	       test "$hardcode_direct_absolute" = no; then
	      add="$libdir/$linklib"
	    elif test "$hardcode_minus_L" = yes; then
	      add_dir="-L$libdir"
	      add="-l$name"
	    elif test "$hardcode_shlibpath_var" = yes; then
	      case :$finalize_shlibpath: in
	      *":$libdir:"*) ;;
	      *) func_append finalize_shlibpath "$libdir:" ;;
	      esac
	      add="-l$name"
	    elif test "$hardcode_automatic" = yes; then
	      if test -n "$inst_prefix_dir" &&
		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
		add="$inst_prefix_dir$libdir/$linklib"
	      else
		add="$libdir/$linklib"
	      fi
	    else
	      # We cannot seem to hardcode it, guess we'll fake it.
	      add_dir="-L$libdir"
	      # Try looking first in the location we're being installed to.
	      if test -n "$inst_prefix_dir"; then
		case $libdir in
		  [\\/]*)
		    func_append add_dir " -L$inst_prefix_dir$libdir"
		    ;;
		esac
	      fi
	      add="-l$name"
	    fi

	    if test "$linkmode" = prog; then
	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
	    else
	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
	      test -n "$add" && deplibs="$add $deplibs"
	    fi
	  fi
	elif test "$linkmode" = prog; then
	  # Here we assume that one of hardcode_direct or hardcode_minus_L
	  # is not unsupported.  This is valid on all known static and
	  # shared platforms.
	  if test "$hardcode_direct" != unsupported; then
	    test -n "$old_library" && linklib="$old_library"
	    compile_deplibs="$dir/$linklib $compile_deplibs"
	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
	  else
	    compile_deplibs="-l$name -L$dir $compile_deplibs"
	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
	  fi
	elif test "$build_libtool_libs" = yes; then
	  # Not a shared library
	  if test "$deplibs_check_method" != pass_all; then
	    # We're trying link a shared library against a static one
	    # but the system doesn't support it.

	    # Just print a warning and add the library to dependency_libs so
	    # that the program can be linked against the static library.
	    echo
	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
	    echo "*** I have the capability to make that library automatically link in when"
	    echo "*** you link to this library.  But I can only do this if you have a"
	    echo "*** shared version of the library, which you do not appear to have."
	    if test "$module" = yes; then
	      echo "*** But as you try to build a module library, libtool will still create "
	      echo "*** a static module, that should work as long as the dlopening application"
	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
	      if test -z "$global_symbol_pipe"; then
		echo
		echo "*** However, this would only work if libtool was able to extract symbol"
		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
		echo "*** not find such a program.  So, this module is probably useless."
		echo "*** \`nm' from GNU binutils and a full rebuild may help."
	      fi
	      if test "$build_old_libs" = no; then
		build_libtool_libs=module
		build_old_libs=yes
	      else
		build_libtool_libs=no
	      fi
	    fi
	  else
	    deplibs="$dir/$old_library $deplibs"
	    link_static=yes
	  fi
	fi # link shared/static library?

	if test "$linkmode" = lib; then
	  if test -n "$dependency_libs" &&
	     { test "$hardcode_into_libs" != yes ||
	       test "$build_old_libs" = yes ||
	       test "$link_static" = yes; }; then
	    # Extract -R from dependency_libs
	    temp_deplibs=
	    for libdir in $dependency_libs; do
	      case $libdir in
	      -R*) func_stripname '-R' '' "$libdir"
	           temp_xrpath=$func_stripname_result
		   case " $xrpath " in
		   *" $temp_xrpath "*) ;;
		   *) func_append xrpath " $temp_xrpath";;
		   esac;;
	      *) func_append temp_deplibs " $libdir";;
	      esac
	    done
	    dependency_libs="$temp_deplibs"
	  fi

	  func_append newlib_search_path " $absdir"
	  # Link against this library
	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
	  # ... and its dependency_libs
	  tmp_libs=
	  for deplib in $dependency_libs; do
	    newdependency_libs="$deplib $newdependency_libs"
	    case $deplib in
              -L*) func_stripname '-L' '' "$deplib"
                   func_resolve_sysroot "$func_stripname_result";;
              *) func_resolve_sysroot "$deplib" ;;
            esac
	    if $opt_preserve_dup_deps ; then
	      case "$tmp_libs " in
	      *" $func_resolve_sysroot_result "*)
                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
	      esac
	    fi
	    func_append tmp_libs " $func_resolve_sysroot_result"
	  done

	  if test "$link_all_deplibs" != no; then
	    # Add the search paths of all dependency libraries
	    for deplib in $dependency_libs; do
	      path=
	      case $deplib in
	      -L*) path="$deplib" ;;
	      *.la)
	        func_resolve_sysroot "$deplib"
	        deplib=$func_resolve_sysroot_result
	        func_dirname "$deplib" "" "."
		dir=$func_dirname_result
		# We need an absolute path.
		case $dir in
		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
		*)
		  absdir=`cd "$dir" && pwd`
		  if test -z "$absdir"; then
		    func_warning "cannot determine absolute directory name of \`$dir'"
		    absdir="$dir"
		  fi
		  ;;
		esac
		if $GREP "^installed=no" $deplib > /dev/null; then
		case $host in
		*-*-darwin*)
		  depdepl=
		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
		  if test -n "$deplibrary_names" ; then
		    for tmp in $deplibrary_names ; do
		      depdepl=$tmp
		    done
		    if test -f "$absdir/$objdir/$depdepl" ; then
		      depdepl="$absdir/$objdir/$depdepl"
		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
                      if test -z "$darwin_install_name"; then
                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                      fi
		      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
		      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
		      path=
		    fi
		  fi
		  ;;
		*)
		  path="-L$absdir/$objdir"
		  ;;
		esac
		else
		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
		  test -z "$libdir" && \
		    func_fatal_error "\`$deplib' is not a valid libtool archive"
		  test "$absdir" != "$libdir" && \
		    func_warning "\`$deplib' seems to be moved"

		  path="-L$absdir"
		fi
		;;
	      esac
	      case " $deplibs " in
	      *" $path "*) ;;
	      *) deplibs="$path $deplibs" ;;
	      esac
	    done
	  fi # link_all_deplibs != no
	fi # linkmode = lib
      done # for deplib in $libs
      if test "$pass" = link; then
	if test "$linkmode" = "prog"; then
	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
	else
	  compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
	fi
      fi
      dependency_libs="$newdependency_libs"
      if test "$pass" = dlpreopen; then
	# Link the dlpreopened libraries before other libraries
	for deplib in $save_deplibs; do
	  deplibs="$deplib $deplibs"
	done
      fi
      if test "$pass" != dlopen; then
	if test "$pass" != conv; then
	  # Make sure lib_search_path contains only unique directories.
	  lib_search_path=
	  for dir in $newlib_search_path; do
	    case "$lib_search_path " in
	    *" $dir "*) ;;
	    *) func_append lib_search_path " $dir" ;;
	    esac
	  done
	  newlib_search_path=
	fi

	if test "$linkmode,$pass" != "prog,link"; then
	  vars="deplibs"
	else
	  vars="compile_deplibs finalize_deplibs"
	fi
	for var in $vars dependency_libs; do
	  # Add libraries to $var in reverse order
	  eval tmp_libs=\"\$$var\"
	  new_libs=
	  for deplib in $tmp_libs; do
	    # FIXME: Pedantically, this is the right thing to do, so
	    #        that some nasty dependency loop isn't accidentally
	    #        broken:
	    #new_libs="$deplib $new_libs"
	    # Pragmatically, this seems to cause very few problems in
	    # practice:
	    case $deplib in
	    -L*) new_libs="$deplib $new_libs" ;;
	    -R*) ;;
	    *)
	      # And here is the reason: when a library appears more
	      # than once as an explicit dependence of a library, or
	      # is implicitly linked in more than once by the
	      # compiler, it is considered special, and multiple
	      # occurrences thereof are not removed.  Compare this
	      # with having the same library being listed as a
	      # dependency of multiple other libraries: in this case,
	      # we know (pedantically, we assume) the library does not
	      # need to be listed more than once, so we keep only the
	      # last copy.  This is not always right, but it is rare
	      # enough that we require users that really mean to play
	      # such unportable linking tricks to link the library
	      # using -Wl,-lname, so that libtool does not consider it
	      # for duplicate removal.
	      case " $specialdeplibs " in
	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
	      *)
		case " $new_libs " in
		*" $deplib "*) ;;
		*) new_libs="$deplib $new_libs" ;;
		esac
		;;
	      esac
	      ;;
	    esac
	  done
	  tmp_libs=
	  for deplib in $new_libs; do
	    case $deplib in
	    -L*)
	      case " $tmp_libs " in
	      *" $deplib "*) ;;
	      *) func_append tmp_libs " $deplib" ;;
	      esac
	      ;;
	    *) func_append tmp_libs " $deplib" ;;
	    esac
	  done
	  eval $var=\"$tmp_libs\"
	done # for var
      fi
      # Last step: remove runtime libs from dependency_libs
      # (they stay in deplibs)
      tmp_libs=
      for i in $dependency_libs ; do
	case " $predeps $postdeps $compiler_lib_search_path " in
	*" $i "*)
	  i=""
	  ;;
	esac
	if test -n "$i" ; then
	  func_append tmp_libs " $i"
	fi
      done
      dependency_libs=$tmp_libs
    done # for pass
    if test "$linkmode" = prog; then
      dlfiles="$newdlfiles"
    fi
    if test "$linkmode" = prog || test "$linkmode" = lib; then
      dlprefiles="$newdlprefiles"
    fi

    case $linkmode in
    oldlib)
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
	func_warning "\`-dlopen' is ignored for archives"
      fi

      case " $deplibs" in
      *\ -l* | *\ -L*)
	func_warning "\`-l' and \`-L' are ignored for archives" ;;
      esac

      test -n "$rpath" && \
	func_warning "\`-rpath' is ignored for archives"

      test -n "$xrpath" && \
	func_warning "\`-R' is ignored for archives"

      test -n "$vinfo" && \
	func_warning "\`-version-info/-version-number' is ignored for archives"

      test -n "$release" && \
	func_warning "\`-release' is ignored for archives"

      test -n "$export_symbols$export_symbols_regex" && \
	func_warning "\`-export-symbols' is ignored for archives"

      # Now set the variables for building old libraries.
      build_libtool_libs=no
      oldlibs="$output"
      func_append objs "$old_deplibs"
      ;;

    lib)
      # Make sure we only generate libraries of the form `libNAME.la'.
      case $outputname in
      lib*)
	func_stripname 'lib' '.la' "$outputname"
	name=$func_stripname_result
	eval shared_ext=\"$shrext_cmds\"
	eval libname=\"$libname_spec\"
	;;
      *)
	test "$module" = no && \
	  func_fatal_help "libtool library \`$output' must begin with \`lib'"

	if test "$need_lib_prefix" != no; then
	  # Add the "lib" prefix for modules if required
	  func_stripname '' '.la' "$outputname"
	  name=$func_stripname_result
	  eval shared_ext=\"$shrext_cmds\"
	  eval libname=\"$libname_spec\"
	else
	  func_stripname '' '.la' "$outputname"
	  libname=$func_stripname_result
	fi
	;;
      esac

      if test -n "$objs"; then
	if test "$deplibs_check_method" != pass_all; then
	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
	else
	  echo
	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
	  $ECHO "*** objects $objs is not portable!"
	  func_append libobjs " $objs"
	fi
      fi

      test "$dlself" != no && \
	func_warning "\`-dlopen self' is ignored for libtool libraries"

      set dummy $rpath
      shift
      test "$#" -gt 1 && \
	func_warning "ignoring multiple \`-rpath's for a libtool library"

      install_libdir="$1"

      oldlibs=
      if test -z "$rpath"; then
	if test "$build_libtool_libs" = yes; then
	  # Building a libtool convenience library.
	  # Some compilers have problems with a `.al' extension so
	  # convenience libraries should have the same extension an
	  # archive normally would.
	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
	  build_libtool_libs=convenience
	  build_old_libs=yes
	fi

	test -n "$vinfo" && \
	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"

	test -n "$release" && \
	  func_warning "\`-release' is ignored for convenience libraries"
      else

	# Parse the version information argument.
	save_ifs="$IFS"; IFS=':'
	set dummy $vinfo 0 0 0
	shift
	IFS="$save_ifs"

	test -n "$7" && \
	  func_fatal_help "too many parameters to \`-version-info'"

	# convert absolute version numbers to libtool ages
	# this retains compatibility with .la files and attempts
	# to make the code below a bit more comprehensible

	case $vinfo_number in
	yes)
	  number_major="$1"
	  number_minor="$2"
	  number_revision="$3"
	  #
	  # There are really only two kinds -- those that
	  # use the current revision as the major version
	  # and those that subtract age and use age as
	  # a minor version.  But, then there is irix
	  # which has an extra 1 added just for fun
	  #
	  case $version_type in
	  # correct linux to gnu/linux during the next big refactor
	  darwin|linux|osf|windows|none)
	    func_arith $number_major + $number_minor
	    current=$func_arith_result
	    age="$number_minor"
	    revision="$number_revision"
	    ;;
	  freebsd-aout|freebsd-elf|qnx|sunos)
	    current="$number_major"
	    revision="$number_minor"
	    age="0"
	    ;;
	  irix|nonstopux)
	    func_arith $number_major + $number_minor
	    current=$func_arith_result
	    age="$number_minor"
	    revision="$number_minor"
	    lt_irix_increment=no
	    ;;
	  esac
	  ;;
	no)
	  current="$1"
	  revision="$2"
	  age="$3"
	  ;;
	esac

	# Check that each of the things are valid numbers.
	case $current in
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
	*)
	  func_error "CURRENT \`$current' must be a nonnegative integer"
	  func_fatal_error "\`$vinfo' is not valid version information"
	  ;;
	esac

	case $revision in
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
	*)
	  func_error "REVISION \`$revision' must be a nonnegative integer"
	  func_fatal_error "\`$vinfo' is not valid version information"
	  ;;
	esac

	case $age in
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
	*)
	  func_error "AGE \`$age' must be a nonnegative integer"
	  func_fatal_error "\`$vinfo' is not valid version information"
	  ;;
	esac

	if test "$age" -gt "$current"; then
	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
	  func_fatal_error "\`$vinfo' is not valid version information"
	fi

	# Calculate the version variables.
	major=
	versuffix=
	verstring=
	case $version_type in
	none) ;;

	darwin)
	  # Like Linux, but with the current version available in
	  # verstring for coding it into the library header
	  func_arith $current - $age
	  major=.$func_arith_result
	  versuffix="$major.$age.$revision"
	  # Darwin ld doesn't like 0 for these options...
	  func_arith $current + 1
	  minor_current=$func_arith_result
	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
	  ;;

	freebsd-aout)
	  major=".$current"
	  versuffix=".$current.$revision";
	  ;;

	freebsd-elf)
	  major=".$current"
	  versuffix=".$current"
	  ;;

	irix | nonstopux)
	  if test "X$lt_irix_increment" = "Xno"; then
	    func_arith $current - $age
	  else
	    func_arith $current - $age + 1
	  fi
	  major=$func_arith_result

	  case $version_type in
	    nonstopux) verstring_prefix=nonstopux ;;
	    *)         verstring_prefix=sgi ;;
	  esac
	  verstring="$verstring_prefix$major.$revision"

	  # Add in all the interfaces that we are compatible with.
	  loop=$revision
	  while test "$loop" -ne 0; do
	    func_arith $revision - $loop
	    iface=$func_arith_result
	    func_arith $loop - 1
	    loop=$func_arith_result
	    verstring="$verstring_prefix$major.$iface:$verstring"
	  done

	  # Before this point, $major must not contain `.'.
	  major=.$major
	  versuffix="$major.$revision"
	  ;;

	linux) # correct to gnu/linux during the next big refactor
	  func_arith $current - $age
	  major=.$func_arith_result
	  versuffix="$major.$age.$revision"
	  ;;

	osf)
	  func_arith $current - $age
	  major=.$func_arith_result
	  versuffix=".$current.$age.$revision"
	  verstring="$current.$age.$revision"

	  # Add in all the interfaces that we are compatible with.
	  loop=$age
	  while test "$loop" -ne 0; do
	    func_arith $current - $loop
	    iface=$func_arith_result
	    func_arith $loop - 1
	    loop=$func_arith_result
	    verstring="$verstring:${iface}.0"
	  done

	  # Make executables depend on our current version.
	  func_append verstring ":${current}.0"
	  ;;

	qnx)
	  major=".$current"
	  versuffix=".$current"
	  ;;

	sunos)
	  major=".$current"
	  versuffix=".$current.$revision"
	  ;;

	windows)
	  # Use '-' rather than '.', since we only want one
	  # extension on DOS 8.3 filesystems.
	  func_arith $current - $age
	  major=$func_arith_result
	  versuffix="-$major"
	  ;;

	*)
	  func_fatal_configuration "unknown library version type \`$version_type'"
	  ;;
	esac

	# Clear the version info if we defaulted, and they specified a release.
	if test -z "$vinfo" && test -n "$release"; then
	  major=
	  case $version_type in
	  darwin)
	    # we can't check for "0.0" in archive_cmds due to quoting
	    # problems, so we reset it completely
	    verstring=
	    ;;
	  *)
	    verstring="0.0"
	    ;;
	  esac
	  if test "$need_version" = no; then
	    versuffix=
	  else
	    versuffix=".0.0"
	  fi
	fi

	# Remove version info from name if versioning should be avoided
	if test "$avoid_version" = yes && test "$need_version" = no; then
	  major=
	  versuffix=
	  verstring=""
	fi

	# Check to see if the archive will have undefined symbols.
	if test "$allow_undefined" = yes; then
	  if test "$allow_undefined_flag" = unsupported; then
	    func_warning "undefined symbols not allowed in $host shared libraries"
	    build_libtool_libs=no
	    build_old_libs=yes
	  fi
	else
	  # Don't allow undefined symbols.
	  allow_undefined_flag="$no_undefined_flag"
	fi

      fi

      func_generate_dlsyms "$libname" "$libname" "yes"
      func_append libobjs " $symfileobj"
      test "X$libobjs" = "X " && libobjs=

      if test "$opt_mode" != relink; then
	# Remove our outputs, but don't remove object files since they
	# may have been created when compiling PIC objects.
	removelist=
	tempremovelist=`$ECHO "$output_objdir/*"`
	for p in $tempremovelist; do
	  case $p in
	    *.$objext | *.gcno)
	       ;;
	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
	       if test "X$precious_files_regex" != "X"; then
		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
		 then
		   continue
		 fi
	       fi
	       func_append removelist " $p"
	       ;;
	    *) ;;
	  esac
	done
	test -n "$removelist" && \
	  func_show_eval "${RM}r \$removelist"
      fi

      # Now set the variables for building old libraries.
      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
	func_append oldlibs " $output_objdir/$libname.$libext"

	# Transform .lo files to .o files.
	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
      fi

      # Eliminate all temporary directories.
      #for path in $notinst_path; do
      #	lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
      #	deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
      #	dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
      #done

      if test -n "$xrpath"; then
	# If the user specified any rpath flags, then add them.
	temp_xrpath=
	for libdir in $xrpath; do
	  func_replace_sysroot "$libdir"
	  func_append temp_xrpath " -R$func_replace_sysroot_result"
	  case "$finalize_rpath " in
	  *" $libdir "*) ;;
	  *) func_append finalize_rpath " $libdir" ;;
	  esac
	done
	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
	  dependency_libs="$temp_xrpath $dependency_libs"
	fi
      fi

      # Make sure dlfiles contains only unique files that won't be dlpreopened
      old_dlfiles="$dlfiles"
      dlfiles=
      for lib in $old_dlfiles; do
	case " $dlprefiles $dlfiles " in
	*" $lib "*) ;;
	*) func_append dlfiles " $lib" ;;
	esac
      done

      # Make sure dlprefiles contains only unique files
      old_dlprefiles="$dlprefiles"
      dlprefiles=
      for lib in $old_dlprefiles; do
	case "$dlprefiles " in
	*" $lib "*) ;;
	*) func_append dlprefiles " $lib" ;;
	esac
      done

      if test "$build_libtool_libs" = yes; then
	if test -n "$rpath"; then
	  case $host in
	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
	    # these systems don't actually have a c library (as such)!
	    ;;
	  *-*-rhapsody* | *-*-darwin1.[012])
	    # Rhapsody C library is in the System framework
	    func_append deplibs " System.ltframework"
	    ;;
	  *-*-netbsd*)
	    # Don't link with libc until the a.out ld.so is fixed.
	    ;;
	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
	    # Do not include libc due to us having libc/libc_r.
	    ;;
	  *-*-sco3.2v5* | *-*-sco5v6*)
	    # Causes problems with __ctype
	    ;;
	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
	    # Compiler inserts libc in the correct place for threads to work
	    ;;
	  *)
	    # Add libc to deplibs on all other systems if necessary.
	    if test "$build_libtool_need_lc" = "yes"; then
	      func_append deplibs " -lc"
	    fi
	    ;;
	  esac
	fi

	# Transform deplibs into only deplibs that can be linked in shared.
	name_save=$name
	libname_save=$libname
	release_save=$release
	versuffix_save=$versuffix
	major_save=$major
	# I'm not sure if I'm treating the release correctly.  I think
	# release should show up in the -l (ie -lgmp5) so we don't want to
	# add it in twice.  Is that correct?
	release=""
	versuffix=""
	major=""
	newdeplibs=
	droppeddeps=no
	case $deplibs_check_method in
	pass_all)
	  # Don't check for shared/static.  Everything works.
	  # This might be a little naive.  We might want to check
	  # whether the library exists or not.  But this is on
	  # osf3 & osf4 and I'm not really sure... Just
	  # implementing what was already the behavior.
	  newdeplibs=$deplibs
	  ;;
	test_compile)
	  # This code stresses the "libraries are programs" paradigm to its
	  # limits. Maybe even breaks it.  We compile a program, linking it
	  # against the deplibs as a proxy for the library.  Then we can check
	  # whether they linked in statically or dynamically with ldd.
	  $opt_dry_run || $RM conftest.c
	  cat > conftest.c </dev/null`
		    $nocaseglob
		  else
		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
		  fi
		  for potent_lib in $potential_libs; do
		      # Follow soft links.
		      if ls -lLd "$potent_lib" 2>/dev/null |
			 $GREP " -> " >/dev/null; then
			continue
		      fi
		      # The statement above tries to avoid entering an
		      # endless loop below, in case of cyclic links.
		      # We might still enter an endless loop, since a link
		      # loop can be closed while we follow links,
		      # but so what?
		      potlib="$potent_lib"
		      while test -h "$potlib" 2>/dev/null; do
			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
			case $potliblink in
			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
			*) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
			esac
		      done
		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
			 $SED -e 10q |
			 $EGREP "$file_magic_regex" > /dev/null; then
			func_append newdeplibs " $a_deplib"
			a_deplib=""
			break 2
		      fi
		  done
		done
	      fi
	      if test -n "$a_deplib" ; then
		droppeddeps=yes
		echo
		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
		echo "*** I have the capability to make that library automatically link in when"
		echo "*** you link to this library.  But I can only do this if you have a"
		echo "*** shared version of the library, which you do not appear to have"
		echo "*** because I did check the linker path looking for a file starting"
		if test -z "$potlib" ; then
		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
		else
		  $ECHO "*** with $libname and none of the candidates passed a file format test"
		  $ECHO "*** using a file magic. Last file checked: $potlib"
		fi
	      fi
	      ;;
	    *)
	      # Add a -L argument.
	      func_append newdeplibs " $a_deplib"
	      ;;
	    esac
	  done # Gone through all deplibs.
	  ;;
	match_pattern*)
	  set dummy $deplibs_check_method; shift
	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
	  for a_deplib in $deplibs; do
	    case $a_deplib in
	    -l*)
	      func_stripname -l '' "$a_deplib"
	      name=$func_stripname_result
	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
		case " $predeps $postdeps " in
		*" $a_deplib "*)
		  func_append newdeplibs " $a_deplib"
		  a_deplib=""
		  ;;
		esac
	      fi
	      if test -n "$a_deplib" ; then
		libname=`eval "\\$ECHO \"$libname_spec\""`
		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
		  for potent_lib in $potential_libs; do
		    potlib="$potent_lib" # see symlink-check above in file_magic test
		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
		       $EGREP "$match_pattern_regex" > /dev/null; then
		      func_append newdeplibs " $a_deplib"
		      a_deplib=""
		      break 2
		    fi
		  done
		done
	      fi
	      if test -n "$a_deplib" ; then
		droppeddeps=yes
		echo
		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
		echo "*** I have the capability to make that library automatically link in when"
		echo "*** you link to this library.  But I can only do this if you have a"
		echo "*** shared version of the library, which you do not appear to have"
		echo "*** because I did check the linker path looking for a file starting"
		if test -z "$potlib" ; then
		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
		else
		  $ECHO "*** with $libname and none of the candidates passed a file format test"
		  $ECHO "*** using a regex pattern. Last file checked: $potlib"
		fi
	      fi
	      ;;
	    *)
	      # Add a -L argument.
	      func_append newdeplibs " $a_deplib"
	      ;;
	    esac
	  done # Gone through all deplibs.
	  ;;
	none | unknown | *)
	  newdeplibs=""
	  tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
	    for i in $predeps $postdeps ; do
	      # can't use Xsed below, because $i might contain '/'
	      tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
	    done
	  fi
	  case $tmp_deplibs in
	  *[!\	\ ]*)
	    echo
	    if test "X$deplibs_check_method" = "Xnone"; then
	      echo "*** Warning: inter-library dependencies are not supported in this platform."
	    else
	      echo "*** Warning: inter-library dependencies are not known to be supported."
	    fi
	    echo "*** All declared inter-library dependencies are being dropped."
	    droppeddeps=yes
	    ;;
	  esac
	  ;;
	esac
	versuffix=$versuffix_save
	major=$major_save
	release=$release_save
	libname=$libname_save
	name=$name_save

	case $host in
	*-*-rhapsody* | *-*-darwin1.[012])
	  # On Rhapsody replace the C library with the System framework
	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
	  ;;
	esac

	if test "$droppeddeps" = yes; then
	  if test "$module" = yes; then
	    echo
	    echo "*** Warning: libtool could not satisfy all declared inter-library"
	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
	    echo "*** a static module, that should work as long as the dlopening"
	    echo "*** application is linked with the -dlopen flag."
	    if test -z "$global_symbol_pipe"; then
	      echo
	      echo "*** However, this would only work if libtool was able to extract symbol"
	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
	      echo "*** not find such a program.  So, this module is probably useless."
	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
	    fi
	    if test "$build_old_libs" = no; then
	      oldlibs="$output_objdir/$libname.$libext"
	      build_libtool_libs=module
	      build_old_libs=yes
	    else
	      build_libtool_libs=no
	    fi
	  else
	    echo "*** The inter-library dependencies that have been dropped here will be"
	    echo "*** automatically added whenever a program is linked with this library"
	    echo "*** or is declared to -dlopen it."

	    if test "$allow_undefined" = no; then
	      echo
	      echo "*** Since this library must not contain undefined symbols,"
	      echo "*** because either the platform does not support them or"
	      echo "*** it was explicitly requested with -no-undefined,"
	      echo "*** libtool will only create a static version of it."
	      if test "$build_old_libs" = no; then
		oldlibs="$output_objdir/$libname.$libext"
		build_libtool_libs=module
		build_old_libs=yes
	      else
		build_libtool_libs=no
	      fi
	    fi
	  fi
	fi
	# Done checking deplibs!
	deplibs=$newdeplibs
      fi
      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
      case $host in
	*-*-darwin*)
	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
	  new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
	  deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
	  ;;
      esac

      # move library search paths that coincide with paths to not yet
      # installed libraries to the beginning of the library search list
      new_libs=
      for path in $notinst_path; do
	case " $new_libs " in
	*" -L$path/$objdir "*) ;;
	*)
	  case " $deplibs " in
	  *" -L$path/$objdir "*)
	    func_append new_libs " -L$path/$objdir" ;;
	  esac
	  ;;
	esac
      done
      for deplib in $deplibs; do
	case $deplib in
	-L*)
	  case " $new_libs " in
	  *" $deplib "*) ;;
	  *) func_append new_libs " $deplib" ;;
	  esac
	  ;;
	*) func_append new_libs " $deplib" ;;
	esac
      done
      deplibs="$new_libs"

      # All the library-specific variables (install_libdir is set above).
      library_names=
      old_library=
      dlname=

      # Test again, we may have decided not to build it any more
      if test "$build_libtool_libs" = yes; then
	# Remove ${wl} instances when linking with ld.
	# FIXME: should test the right _cmds variable.
	case $archive_cmds in
	  *\$LD\ *) wl= ;;
        esac
	if test "$hardcode_into_libs" = yes; then
	  # Hardcode the library paths
	  hardcode_libdirs=
	  dep_rpath=
	  rpath="$finalize_rpath"
	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
	  for libdir in $rpath; do
	    if test -n "$hardcode_libdir_flag_spec"; then
	      if test -n "$hardcode_libdir_separator"; then
		func_replace_sysroot "$libdir"
		libdir=$func_replace_sysroot_result
		if test -z "$hardcode_libdirs"; then
		  hardcode_libdirs="$libdir"
		else
		  # Just accumulate the unique libdirs.
		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
		    ;;
		  *)
		    func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
		    ;;
		  esac
		fi
	      else
		eval flag=\"$hardcode_libdir_flag_spec\"
		func_append dep_rpath " $flag"
	      fi
	    elif test -n "$runpath_var"; then
	      case "$perm_rpath " in
	      *" $libdir "*) ;;
	      *) func_append perm_rpath " $libdir" ;;
	      esac
	    fi
	  done
	  # Substitute the hardcoded libdirs into the rpath.
	  if test -n "$hardcode_libdir_separator" &&
	     test -n "$hardcode_libdirs"; then
	    libdir="$hardcode_libdirs"
	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
	  fi
	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
	    # We should set the runpath_var.
	    rpath=
	    for dir in $perm_rpath; do
	      func_append rpath "$dir:"
	    done
	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
	  fi
	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
	fi

	shlibpath="$finalize_shlibpath"
	test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
	if test -n "$shlibpath"; then
	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
	fi

	# Get the real and link names of the library.
	eval shared_ext=\"$shrext_cmds\"
	eval library_names=\"$library_names_spec\"
	set dummy $library_names
	shift
	realname="$1"
	shift

	if test -n "$soname_spec"; then
	  eval soname=\"$soname_spec\"
	else
	  soname="$realname"
	fi
	if test -z "$dlname"; then
	  dlname=$soname
	fi

	lib="$output_objdir/$realname"
	linknames=
	for link
	do
	  func_append linknames " $link"
	done

	# Use standard objects if they are pic
	test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
	test "X$libobjs" = "X " && libobjs=

	delfiles=
	if test -n "$export_symbols" && test -n "$include_expsyms"; then
	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
	  export_symbols="$output_objdir/$libname.uexp"
	  func_append delfiles " $export_symbols"
	fi

	orig_export_symbols=
	case $host_os in
	cygwin* | mingw* | cegcc*)
	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
	    # exporting using user supplied symfile
	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
	      # and it's NOT already a .def file. Must figure out
	      # which of the given symbols are data symbols and tag
	      # them as such. So, trigger use of export_symbols_cmds.
	      # export_symbols gets reassigned inside the "prepare
	      # the list of exported symbols" if statement, so the
	      # include_expsyms logic still works.
	      orig_export_symbols="$export_symbols"
	      export_symbols=
	      always_export_symbols=yes
	    fi
	  fi
	  ;;
	esac

	# Prepare the list of exported symbols
	if test -z "$export_symbols"; then
	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
	    func_verbose "generating symbol list for \`$libname.la'"
	    export_symbols="$output_objdir/$libname.exp"
	    $opt_dry_run || $RM $export_symbols
	    cmds=$export_symbols_cmds
	    save_ifs="$IFS"; IFS='~'
	    for cmd1 in $cmds; do
	      IFS="$save_ifs"
	      # Take the normal branch if the nm_file_list_spec branch
	      # doesn't work or if tool conversion is not needed.
	      case $nm_file_list_spec~$to_tool_file_cmd in
		*~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
		  try_normal_branch=yes
		  eval cmd=\"$cmd1\"
		  func_len " $cmd"
		  len=$func_len_result
		  ;;
		*)
		  try_normal_branch=no
		  ;;
	      esac
	      if test "$try_normal_branch" = yes \
		 && { test "$len" -lt "$max_cmd_len" \
		      || test "$max_cmd_len" -le -1; }
	      then
		func_show_eval "$cmd" 'exit $?'
		skipped_export=false
	      elif test -n "$nm_file_list_spec"; then
		func_basename "$output"
		output_la=$func_basename_result
		save_libobjs=$libobjs
		save_output=$output
		output=${output_objdir}/${output_la}.nm
		func_to_tool_file "$output"
		libobjs=$nm_file_list_spec$func_to_tool_file_result
		func_append delfiles " $output"
		func_verbose "creating $NM input file list: $output"
		for obj in $save_libobjs; do
		  func_to_tool_file "$obj"
		  $ECHO "$func_to_tool_file_result"
		done > "$output"
		eval cmd=\"$cmd1\"
		func_show_eval "$cmd" 'exit $?'
		output=$save_output
		libobjs=$save_libobjs
		skipped_export=false
	      else
		# The command line is too long to execute in one step.
		func_verbose "using reloadable object file for export list..."
		skipped_export=:
		# Break out early, otherwise skipped_export may be
		# set to false by a later but shorter cmd.
		break
	      fi
	    done
	    IFS="$save_ifs"
	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
	    fi
	  fi
	fi

	if test -n "$export_symbols" && test -n "$include_expsyms"; then
	  tmp_export_symbols="$export_symbols"
	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
	  $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
	fi

	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
	  # The given exports_symbols file has to be filtered, so filter it.
	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
	  # 's' commands which not all seds can handle. GNU sed should be fine
	  # though. Also, the filter scales superlinearly with the number of
	  # global variables. join(1) would be nice here, but unfortunately
	  # isn't a blessed tool.
	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
	  func_append delfiles " $export_symbols $output_objdir/$libname.filter"
	  export_symbols=$output_objdir/$libname.def
	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
	fi

	tmp_deplibs=
	for test_deplib in $deplibs; do
	  case " $convenience " in
	  *" $test_deplib "*) ;;
	  *)
	    func_append tmp_deplibs " $test_deplib"
	    ;;
	  esac
	done
	deplibs="$tmp_deplibs"

	if test -n "$convenience"; then
	  if test -n "$whole_archive_flag_spec" &&
	    test "$compiler_needs_object" = yes &&
	    test -z "$libobjs"; then
	    # extract the archives, so we have objects to list.
	    # TODO: could optimize this to just extract one archive.
	    whole_archive_flag_spec=
	  fi
	  if test -n "$whole_archive_flag_spec"; then
	    save_libobjs=$libobjs
	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
	    test "X$libobjs" = "X " && libobjs=
	  else
	    gentop="$output_objdir/${outputname}x"
	    func_append generated " $gentop"

	    func_extract_archives $gentop $convenience
	    func_append libobjs " $func_extract_archives_result"
	    test "X$libobjs" = "X " && libobjs=
	  fi
	fi

	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
	  eval flag=\"$thread_safe_flag_spec\"
	  func_append linker_flags " $flag"
	fi

	# Make a backup of the uninstalled library when relinking
	if test "$opt_mode" = relink; then
	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
	fi

	# Do each of the archive commands.
	if test "$module" = yes && test -n "$module_cmds" ; then
	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
	    eval test_cmds=\"$module_expsym_cmds\"
	    cmds=$module_expsym_cmds
	  else
	    eval test_cmds=\"$module_cmds\"
	    cmds=$module_cmds
	  fi
	else
	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
	    eval test_cmds=\"$archive_expsym_cmds\"
	    cmds=$archive_expsym_cmds
	  else
	    eval test_cmds=\"$archive_cmds\"
	    cmds=$archive_cmds
	  fi
	fi

	if test "X$skipped_export" != "X:" &&
	   func_len " $test_cmds" &&
	   len=$func_len_result &&
	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
	  :
	else
	  # The command line is too long to link in one step, link piecewise
	  # or, if using GNU ld and skipped_export is not :, use a linker
	  # script.

	  # Save the value of $output and $libobjs because we want to
	  # use them later.  If we have whole_archive_flag_spec, we
	  # want to use save_libobjs as it was before
	  # whole_archive_flag_spec was expanded, because we can't
	  # assume the linker understands whole_archive_flag_spec.
	  # This may have to be revisited, in case too many
	  # convenience libraries get linked in and end up exceeding
	  # the spec.
	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
	    save_libobjs=$libobjs
	  fi
	  save_output=$output
	  func_basename "$output"
	  output_la=$func_basename_result

	  # Clear the reloadable object creation command queue and
	  # initialize k to one.
	  test_cmds=
	  concat_cmds=
	  objlist=
	  last_robj=
	  k=1

	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
	    output=${output_objdir}/${output_la}.lnkscript
	    func_verbose "creating GNU ld script: $output"
	    echo 'INPUT (' > $output
	    for obj in $save_libobjs
	    do
	      func_to_tool_file "$obj"
	      $ECHO "$func_to_tool_file_result" >> $output
	    done
	    echo ')' >> $output
	    func_append delfiles " $output"
	    func_to_tool_file "$output"
	    output=$func_to_tool_file_result
	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
	    output=${output_objdir}/${output_la}.lnk
	    func_verbose "creating linker input file list: $output"
	    : > $output
	    set x $save_libobjs
	    shift
	    firstobj=
	    if test "$compiler_needs_object" = yes; then
	      firstobj="$1 "
	      shift
	    fi
	    for obj
	    do
	      func_to_tool_file "$obj"
	      $ECHO "$func_to_tool_file_result" >> $output
	    done
	    func_append delfiles " $output"
	    func_to_tool_file "$output"
	    output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
	  else
	    if test -n "$save_libobjs"; then
	      func_verbose "creating reloadable object files..."
	      output=$output_objdir/$output_la-${k}.$objext
	      eval test_cmds=\"$reload_cmds\"
	      func_len " $test_cmds"
	      len0=$func_len_result
	      len=$len0

	      # Loop over the list of objects to be linked.
	      for obj in $save_libobjs
	      do
		func_len " $obj"
		func_arith $len + $func_len_result
		len=$func_arith_result
		if test "X$objlist" = X ||
		   test "$len" -lt "$max_cmd_len"; then
		  func_append objlist " $obj"
		else
		  # The command $test_cmds is almost too long, add a
		  # command to the queue.
		  if test "$k" -eq 1 ; then
		    # The first file doesn't have a previous command to add.
		    reload_objs=$objlist
		    eval concat_cmds=\"$reload_cmds\"
		  else
		    # All subsequent reloadable object files will link in
		    # the last one created.
		    reload_objs="$objlist $last_robj"
		    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
		  fi
		  last_robj=$output_objdir/$output_la-${k}.$objext
		  func_arith $k + 1
		  k=$func_arith_result
		  output=$output_objdir/$output_la-${k}.$objext
		  objlist=" $obj"
		  func_len " $last_robj"
		  func_arith $len0 + $func_len_result
		  len=$func_arith_result
		fi
	      done
	      # Handle the remaining objects by creating one last
	      # reloadable object file.  All subsequent reloadable object
	      # files will link in the last one created.
	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
	      reload_objs="$objlist $last_robj"
	      eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
	      if test -n "$last_robj"; then
	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
	      fi
	      func_append delfiles " $output"

	    else
	      output=
	    fi

	    if ${skipped_export-false}; then
	      func_verbose "generating symbol list for \`$libname.la'"
	      export_symbols="$output_objdir/$libname.exp"
	      $opt_dry_run || $RM $export_symbols
	      libobjs=$output
	      # Append the command to create the export file.
	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
	      if test -n "$last_robj"; then
		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
	      fi
	    fi

	    test -n "$save_libobjs" &&
	      func_verbose "creating a temporary reloadable object file: $output"

	    # Loop through the commands generated above and execute them.
	    save_ifs="$IFS"; IFS='~'
	    for cmd in $concat_cmds; do
	      IFS="$save_ifs"
	      $opt_silent || {
		  func_quote_for_expand "$cmd"
		  eval "func_echo $func_quote_for_expand_result"
	      }
	      $opt_dry_run || eval "$cmd" || {
		lt_exit=$?

		# Restore the uninstalled library and exit
		if test "$opt_mode" = relink; then
		  ( cd "$output_objdir" && \
		    $RM "${realname}T" && \
		    $MV "${realname}U" "$realname" )
		fi

		exit $lt_exit
	      }
	    done
	    IFS="$save_ifs"

	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
	    fi
	  fi

          if ${skipped_export-false}; then
	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
	      tmp_export_symbols="$export_symbols"
	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
	      $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
	    fi

	    if test -n "$orig_export_symbols"; then
	      # The given exports_symbols file has to be filtered, so filter it.
	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
	      # 's' commands which not all seds can handle. GNU sed should be fine
	      # though. Also, the filter scales superlinearly with the number of
	      # global variables. join(1) would be nice here, but unfortunately
	      # isn't a blessed tool.
	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
	      func_append delfiles " $export_symbols $output_objdir/$libname.filter"
	      export_symbols=$output_objdir/$libname.def
	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
	    fi
	  fi

	  libobjs=$output
	  # Restore the value of output.
	  output=$save_output

	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
	    test "X$libobjs" = "X " && libobjs=
	  fi
	  # Expand the library linking commands again to reset the
	  # value of $libobjs for piecewise linking.

	  # Do each of the archive commands.
	  if test "$module" = yes && test -n "$module_cmds" ; then
	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
	      cmds=$module_expsym_cmds
	    else
	      cmds=$module_cmds
	    fi
	  else
	    if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
	      cmds=$archive_expsym_cmds
	    else
	      cmds=$archive_cmds
	    fi
	  fi
	fi

	if test -n "$delfiles"; then
	  # Append the command to remove temporary files to $cmds.
	  eval cmds=\"\$cmds~\$RM $delfiles\"
	fi

	# Add any objects from preloaded convenience libraries
	if test -n "$dlprefiles"; then
	  gentop="$output_objdir/${outputname}x"
	  func_append generated " $gentop"

	  func_extract_archives $gentop $dlprefiles
	  func_append libobjs " $func_extract_archives_result"
	  test "X$libobjs" = "X " && libobjs=
	fi

	save_ifs="$IFS"; IFS='~'
	for cmd in $cmds; do
	  IFS="$save_ifs"
	  eval cmd=\"$cmd\"
	  $opt_silent || {
	    func_quote_for_expand "$cmd"
	    eval "func_echo $func_quote_for_expand_result"
	  }
	  $opt_dry_run || eval "$cmd" || {
	    lt_exit=$?

	    # Restore the uninstalled library and exit
	    if test "$opt_mode" = relink; then
	      ( cd "$output_objdir" && \
	        $RM "${realname}T" && \
		$MV "${realname}U" "$realname" )
	    fi

	    exit $lt_exit
	  }
	done
	IFS="$save_ifs"

	# Restore the uninstalled library and exit
	if test "$opt_mode" = relink; then
	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?

	  if test -n "$convenience"; then
	    if test -z "$whole_archive_flag_spec"; then
	      func_show_eval '${RM}r "$gentop"'
	    fi
	  fi

	  exit $EXIT_SUCCESS
	fi

	# Create links to the real library.
	for linkname in $linknames; do
	  if test "$realname" != "$linkname"; then
	    func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
	  fi
	done

	# If -module or -export-dynamic was specified, set the dlname.
	if test "$module" = yes || test "$export_dynamic" = yes; then
	  # On all known operating systems, these are identical.
	  dlname="$soname"
	fi
      fi
      ;;

    obj)
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
	func_warning "\`-dlopen' is ignored for objects"
      fi

      case " $deplibs" in
      *\ -l* | *\ -L*)
	func_warning "\`-l' and \`-L' are ignored for objects" ;;
      esac

      test -n "$rpath" && \
	func_warning "\`-rpath' is ignored for objects"

      test -n "$xrpath" && \
	func_warning "\`-R' is ignored for objects"

      test -n "$vinfo" && \
	func_warning "\`-version-info' is ignored for objects"

      test -n "$release" && \
	func_warning "\`-release' is ignored for objects"

      case $output in
      *.lo)
	test -n "$objs$old_deplibs" && \
	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"

	libobj=$output
	func_lo2o "$libobj"
	obj=$func_lo2o_result
	;;
      *)
	libobj=
	obj="$output"
	;;
      esac

      # Delete the old objects.
      $opt_dry_run || $RM $obj $libobj

      # Objects from convenience libraries.  This assumes
      # single-version convenience libraries.  Whenever we create
      # different ones for PIC/non-PIC, this we'll have to duplicate
      # the extraction.
      reload_conv_objs=
      gentop=
      # reload_cmds runs $LD directly, so let us get rid of
      # -Wl from whole_archive_flag_spec and hope we can get by with
      # turning comma into space..
      wl=

      if test -n "$convenience"; then
	if test -n "$whole_archive_flag_spec"; then
	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
	  reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
	else
	  gentop="$output_objdir/${obj}x"
	  func_append generated " $gentop"

	  func_extract_archives $gentop $convenience
	  reload_conv_objs="$reload_objs $func_extract_archives_result"
	fi
      fi

      # If we're not building shared, we need to use non_pic_objs
      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"

      # Create the old-style object.
      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test

      output="$obj"
      func_execute_cmds "$reload_cmds" 'exit $?'

      # Exit if we aren't doing a library object file.
      if test -z "$libobj"; then
	if test -n "$gentop"; then
	  func_show_eval '${RM}r "$gentop"'
	fi

	exit $EXIT_SUCCESS
      fi

      if test "$build_libtool_libs" != yes; then
	if test -n "$gentop"; then
	  func_show_eval '${RM}r "$gentop"'
	fi

	# Create an invalid libtool object if no PIC, so that we don't
	# accidentally link it into a program.
	# $show "echo timestamp > $libobj"
	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
	exit $EXIT_SUCCESS
      fi

      if test -n "$pic_flag" || test "$pic_mode" != default; then
	# Only do commands if we really have different PIC objects.
	reload_objs="$libobjs $reload_conv_objs"
	output="$libobj"
	func_execute_cmds "$reload_cmds" 'exit $?'
      fi

      if test -n "$gentop"; then
	func_show_eval '${RM}r "$gentop"'
      fi

      exit $EXIT_SUCCESS
      ;;

    prog)
      case $host in
	*cygwin*) func_stripname '' '.exe' "$output"
	          output=$func_stripname_result.exe;;
      esac
      test -n "$vinfo" && \
	func_warning "\`-version-info' is ignored for programs"

      test -n "$release" && \
	func_warning "\`-release' is ignored for programs"

      test "$preload" = yes \
        && test "$dlopen_support" = unknown \
	&& test "$dlopen_self" = unknown \
	&& test "$dlopen_self_static" = unknown && \
	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."

      case $host in
      *-*-rhapsody* | *-*-darwin1.[012])
	# On Rhapsody replace the C library is the System framework
	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
	;;
      esac

      case $host in
      *-*-darwin*)
	# Don't allow lazy linking, it breaks C++ global constructors
	# But is supposedly fixed on 10.4 or later (yay!).
	if test "$tagname" = CXX ; then
	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
	    10.[0123])
	      func_append compile_command " ${wl}-bind_at_load"
	      func_append finalize_command " ${wl}-bind_at_load"
	    ;;
	  esac
	fi
	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
	;;
      esac


      # move library search paths that coincide with paths to not yet
      # installed libraries to the beginning of the library search list
      new_libs=
      for path in $notinst_path; do
	case " $new_libs " in
	*" -L$path/$objdir "*) ;;
	*)
	  case " $compile_deplibs " in
	  *" -L$path/$objdir "*)
	    func_append new_libs " -L$path/$objdir" ;;
	  esac
	  ;;
	esac
      done
      for deplib in $compile_deplibs; do
	case $deplib in
	-L*)
	  case " $new_libs " in
	  *" $deplib "*) ;;
	  *) func_append new_libs " $deplib" ;;
	  esac
	  ;;
	*) func_append new_libs " $deplib" ;;
	esac
      done
      compile_deplibs="$new_libs"


      func_append compile_command " $compile_deplibs"
      func_append finalize_command " $finalize_deplibs"

      if test -n "$rpath$xrpath"; then
	# If the user specified any rpath flags, then add them.
	for libdir in $rpath $xrpath; do
	  # This is the magic to use -rpath.
	  case "$finalize_rpath " in
	  *" $libdir "*) ;;
	  *) func_append finalize_rpath " $libdir" ;;
	  esac
	done
      fi

      # Now hardcode the library paths
      rpath=
      hardcode_libdirs=
      for libdir in $compile_rpath $finalize_rpath; do
	if test -n "$hardcode_libdir_flag_spec"; then
	  if test -n "$hardcode_libdir_separator"; then
	    if test -z "$hardcode_libdirs"; then
	      hardcode_libdirs="$libdir"
	    else
	      # Just accumulate the unique libdirs.
	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
		;;
	      *)
		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
		;;
	      esac
	    fi
	  else
	    eval flag=\"$hardcode_libdir_flag_spec\"
	    func_append rpath " $flag"
	  fi
	elif test -n "$runpath_var"; then
	  case "$perm_rpath " in
	  *" $libdir "*) ;;
	  *) func_append perm_rpath " $libdir" ;;
	  esac
	fi
	case $host in
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
	  case :$dllsearchpath: in
	  *":$libdir:"*) ;;
	  ::) dllsearchpath=$libdir;;
	  *) func_append dllsearchpath ":$libdir";;
	  esac
	  case :$dllsearchpath: in
	  *":$testbindir:"*) ;;
	  ::) dllsearchpath=$testbindir;;
	  *) func_append dllsearchpath ":$testbindir";;
	  esac
	  ;;
	esac
      done
      # Substitute the hardcoded libdirs into the rpath.
      if test -n "$hardcode_libdir_separator" &&
	 test -n "$hardcode_libdirs"; then
	libdir="$hardcode_libdirs"
	eval rpath=\" $hardcode_libdir_flag_spec\"
      fi
      compile_rpath="$rpath"

      rpath=
      hardcode_libdirs=
      for libdir in $finalize_rpath; do
	if test -n "$hardcode_libdir_flag_spec"; then
	  if test -n "$hardcode_libdir_separator"; then
	    if test -z "$hardcode_libdirs"; then
	      hardcode_libdirs="$libdir"
	    else
	      # Just accumulate the unique libdirs.
	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
		;;
	      *)
		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
		;;
	      esac
	    fi
	  else
	    eval flag=\"$hardcode_libdir_flag_spec\"
	    func_append rpath " $flag"
	  fi
	elif test -n "$runpath_var"; then
	  case "$finalize_perm_rpath " in
	  *" $libdir "*) ;;
	  *) func_append finalize_perm_rpath " $libdir" ;;
	  esac
	fi
      done
      # Substitute the hardcoded libdirs into the rpath.
      if test -n "$hardcode_libdir_separator" &&
	 test -n "$hardcode_libdirs"; then
	libdir="$hardcode_libdirs"
	eval rpath=\" $hardcode_libdir_flag_spec\"
      fi
      finalize_rpath="$rpath"

      if test -n "$libobjs" && test "$build_old_libs" = yes; then
	# Transform all the library objects into standard objects.
	compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
	finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
      fi

      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"

      # template prelinking step
      if test -n "$prelink_cmds"; then
	func_execute_cmds "$prelink_cmds" 'exit $?'
      fi

      wrappers_required=yes
      case $host in
      *cegcc* | *mingw32ce*)
        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
        wrappers_required=no
        ;;
      *cygwin* | *mingw* )
        if test "$build_libtool_libs" != yes; then
          wrappers_required=no
        fi
        ;;
      *)
        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
          wrappers_required=no
        fi
        ;;
      esac
      if test "$wrappers_required" = no; then
	# Replace the output file specification.
	compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
	link_command="$compile_command$compile_rpath"

	# We have no uninstalled library dependencies, so finalize right now.
	exit_status=0
	func_show_eval "$link_command" 'exit_status=$?'

	if test -n "$postlink_cmds"; then
	  func_to_tool_file "$output"
	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
	  func_execute_cmds "$postlink_cmds" 'exit $?'
	fi

	# Delete the generated files.
	if test -f "$output_objdir/${outputname}S.${objext}"; then
	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
	fi

	exit $exit_status
      fi

      if test -n "$compile_shlibpath$finalize_shlibpath"; then
	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
      fi
      if test -n "$finalize_shlibpath"; then
	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
      fi

      compile_var=
      finalize_var=
      if test -n "$runpath_var"; then
	if test -n "$perm_rpath"; then
	  # We should set the runpath_var.
	  rpath=
	  for dir in $perm_rpath; do
	    func_append rpath "$dir:"
	  done
	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
	fi
	if test -n "$finalize_perm_rpath"; then
	  # We should set the runpath_var.
	  rpath=
	  for dir in $finalize_perm_rpath; do
	    func_append rpath "$dir:"
	  done
	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
	fi
      fi

      if test "$no_install" = yes; then
	# We don't need to create a wrapper script.
	link_command="$compile_var$compile_command$compile_rpath"
	# Replace the output file specification.
	link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
	# Delete the old output file.
	$opt_dry_run || $RM $output
	# Link the executable and exit
	func_show_eval "$link_command" 'exit $?'

	if test -n "$postlink_cmds"; then
	  func_to_tool_file "$output"
	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
	  func_execute_cmds "$postlink_cmds" 'exit $?'
	fi

	exit $EXIT_SUCCESS
      fi

      if test "$hardcode_action" = relink; then
	# Fast installation is not supported
	link_command="$compile_var$compile_command$compile_rpath"
	relink_command="$finalize_var$finalize_command$finalize_rpath"

	func_warning "this platform does not like uninstalled shared libraries"
	func_warning "\`$output' will be relinked during installation"
      else
	if test "$fast_install" != no; then
	  link_command="$finalize_var$compile_command$finalize_rpath"
	  if test "$fast_install" = yes; then
	    relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
	  else
	    # fast_install is set to needless
	    relink_command=
	  fi
	else
	  link_command="$compile_var$compile_command$compile_rpath"
	  relink_command="$finalize_var$finalize_command$finalize_rpath"
	fi
      fi

      # Replace the output file specification.
      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`

      # Delete the old output files.
      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname

      func_show_eval "$link_command" 'exit $?'

      if test -n "$postlink_cmds"; then
	func_to_tool_file "$output_objdir/$outputname"
	postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
	func_execute_cmds "$postlink_cmds" 'exit $?'
      fi

      # Now create the wrapper script.
      func_verbose "creating $output"

      # Quote the relink command for shipping.
      if test -n "$relink_command"; then
	# Preserve any variables that may affect compiler behavior
	for var in $variables_saved_for_relink; do
	  if eval test -z \"\${$var+set}\"; then
	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
	  elif eval var_value=\$$var; test -z "$var_value"; then
	    relink_command="$var=; export $var; $relink_command"
	  else
	    func_quote_for_eval "$var_value"
	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
	  fi
	done
	relink_command="(cd `pwd`; $relink_command)"
	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
      fi

      # Only actually do things if not in dry run mode.
      $opt_dry_run || {
	# win32 will think the script is a binary if it has
	# a .exe suffix, so we strip it off here.
	case $output in
	  *.exe) func_stripname '' '.exe' "$output"
	         output=$func_stripname_result ;;
	esac
	# test for cygwin because mv fails w/o .exe extensions
	case $host in
	  *cygwin*)
	    exeext=.exe
	    func_stripname '' '.exe' "$outputname"
	    outputname=$func_stripname_result ;;
	  *) exeext= ;;
	esac
	case $host in
	  *cygwin* | *mingw* )
	    func_dirname_and_basename "$output" "" "."
	    output_name=$func_basename_result
	    output_path=$func_dirname_result
	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
	    cwrapper="$output_path/$output_name.exe"
	    $RM $cwrappersource $cwrapper
	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15

	    func_emit_cwrapperexe_src > $cwrappersource

	    # The wrapper executable is built using the $host compiler,
	    # because it contains $host paths and files. If cross-
	    # compiling, it, like the target executable, must be
	    # executed on the $host or under an emulation environment.
	    $opt_dry_run || {
	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
	      $STRIP $cwrapper
	    }

	    # Now, create the wrapper script for func_source use:
	    func_ltwrapper_scriptname $cwrapper
	    $RM $func_ltwrapper_scriptname_result
	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
	    $opt_dry_run || {
	      # note: this script will not be executed, so do not chmod.
	      if test "x$build" = "x$host" ; then
		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
	      else
		func_emit_wrapper no > $func_ltwrapper_scriptname_result
	      fi
	    }
	  ;;
	  * )
	    $RM $output
	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15

	    func_emit_wrapper no > $output
	    chmod +x $output
	  ;;
	esac
      }
      exit $EXIT_SUCCESS
      ;;
    esac

    # See if we need to build an old-fashioned archive.
    for oldlib in $oldlibs; do

      if test "$build_libtool_libs" = convenience; then
	oldobjs="$libobjs_save $symfileobj"
	addlibs="$convenience"
	build_libtool_libs=no
      else
	if test "$build_libtool_libs" = module; then
	  oldobjs="$libobjs_save"
	  build_libtool_libs=no
	else
	  oldobjs="$old_deplibs $non_pic_objects"
	  if test "$preload" = yes && test -f "$symfileobj"; then
	    func_append oldobjs " $symfileobj"
	  fi
	fi
	addlibs="$old_convenience"
      fi

      if test -n "$addlibs"; then
	gentop="$output_objdir/${outputname}x"
	func_append generated " $gentop"

	func_extract_archives $gentop $addlibs
	func_append oldobjs " $func_extract_archives_result"
      fi

      # Do each command in the archive commands.
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
	cmds=$old_archive_from_new_cmds
      else

	# Add any objects from preloaded convenience libraries
	if test -n "$dlprefiles"; then
	  gentop="$output_objdir/${outputname}x"
	  func_append generated " $gentop"

	  func_extract_archives $gentop $dlprefiles
	  func_append oldobjs " $func_extract_archives_result"
	fi

	# POSIX demands no paths to be encoded in archives.  We have
	# to avoid creating archives with duplicate basenames if we
	# might have to extract them afterwards, e.g., when creating a
	# static archive out of a convenience library, or when linking
	# the entirety of a libtool archive into another (currently
	# not supported by libtool).
	if (for obj in $oldobjs
	    do
	      func_basename "$obj"
	      $ECHO "$func_basename_result"
	    done | sort | sort -uc >/dev/null 2>&1); then
	  :
	else
	  echo "copying selected object files to avoid basename conflicts..."
	  gentop="$output_objdir/${outputname}x"
	  func_append generated " $gentop"
	  func_mkdir_p "$gentop"
	  save_oldobjs=$oldobjs
	  oldobjs=
	  counter=1
	  for obj in $save_oldobjs
	  do
	    func_basename "$obj"
	    objbase="$func_basename_result"
	    case " $oldobjs " in
	    " ") oldobjs=$obj ;;
	    *[\ /]"$objbase "*)
	      while :; do
		# Make sure we don't pick an alternate name that also
		# overlaps.
		newobj=lt$counter-$objbase
		func_arith $counter + 1
		counter=$func_arith_result
		case " $oldobjs " in
		*[\ /]"$newobj "*) ;;
		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
		esac
	      done
	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
	      func_append oldobjs " $gentop/$newobj"
	      ;;
	    *) func_append oldobjs " $obj" ;;
	    esac
	  done
	fi
	func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
	tool_oldlib=$func_to_tool_file_result
	eval cmds=\"$old_archive_cmds\"

	func_len " $cmds"
	len=$func_len_result
	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
	  cmds=$old_archive_cmds
	elif test -n "$archiver_list_spec"; then
	  func_verbose "using command file archive linking..."
	  for obj in $oldobjs
	  do
	    func_to_tool_file "$obj"
	    $ECHO "$func_to_tool_file_result"
	  done > $output_objdir/$libname.libcmd
	  func_to_tool_file "$output_objdir/$libname.libcmd"
	  oldobjs=" $archiver_list_spec$func_to_tool_file_result"
	  cmds=$old_archive_cmds
	else
	  # the command line is too long to link in one step, link in parts
	  func_verbose "using piecewise archive linking..."
	  save_RANLIB=$RANLIB
	  RANLIB=:
	  objlist=
	  concat_cmds=
	  save_oldobjs=$oldobjs
	  oldobjs=
	  # Is there a better way of finding the last object in the list?
	  for obj in $save_oldobjs
	  do
	    last_oldobj=$obj
	  done
	  eval test_cmds=\"$old_archive_cmds\"
	  func_len " $test_cmds"
	  len0=$func_len_result
	  len=$len0
	  for obj in $save_oldobjs
	  do
	    func_len " $obj"
	    func_arith $len + $func_len_result
	    len=$func_arith_result
	    func_append objlist " $obj"
	    if test "$len" -lt "$max_cmd_len"; then
	      :
	    else
	      # the above command should be used before it gets too long
	      oldobjs=$objlist
	      if test "$obj" = "$last_oldobj" ; then
		RANLIB=$save_RANLIB
	      fi
	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
	      objlist=
	      len=$len0
	    fi
	  done
	  RANLIB=$save_RANLIB
	  oldobjs=$objlist
	  if test "X$oldobjs" = "X" ; then
	    eval cmds=\"\$concat_cmds\"
	  else
	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
	  fi
	fi
      fi
      func_execute_cmds "$cmds" 'exit $?'
    done

    test -n "$generated" && \
      func_show_eval "${RM}r$generated"

    # Now create the libtool archive.
    case $output in
    *.la)
      old_library=
      test "$build_old_libs" = yes && old_library="$libname.$libext"
      func_verbose "creating $output"

      # Preserve any variables that may affect compiler behavior
      for var in $variables_saved_for_relink; do
	if eval test -z \"\${$var+set}\"; then
	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
	elif eval var_value=\$$var; test -z "$var_value"; then
	  relink_command="$var=; export $var; $relink_command"
	else
	  func_quote_for_eval "$var_value"
	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
	fi
      done
      # Quote the link command for shipping.
      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
      if test "$hardcode_automatic" = yes ; then
	relink_command=
      fi

      # Only create the output if not a dry run.
      $opt_dry_run || {
	for installed in no yes; do
	  if test "$installed" = yes; then
	    if test -z "$install_libdir"; then
	      break
	    fi
	    output="$output_objdir/$outputname"i
	    # Replace all uninstalled libtool libraries with the installed ones
	    newdependency_libs=
	    for deplib in $dependency_libs; do
	      case $deplib in
	      *.la)
		func_basename "$deplib"
		name="$func_basename_result"
		func_resolve_sysroot "$deplib"
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
		test -z "$libdir" && \
		  func_fatal_error "\`$deplib' is not a valid libtool archive"
		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
		;;
	      -L*)
		func_stripname -L '' "$deplib"
		func_replace_sysroot "$func_stripname_result"
		func_append newdependency_libs " -L$func_replace_sysroot_result"
		;;
	      -R*)
		func_stripname -R '' "$deplib"
		func_replace_sysroot "$func_stripname_result"
		func_append newdependency_libs " -R$func_replace_sysroot_result"
		;;
	      *) func_append newdependency_libs " $deplib" ;;
	      esac
	    done
	    dependency_libs="$newdependency_libs"
	    newdlfiles=

	    for lib in $dlfiles; do
	      case $lib in
	      *.la)
	        func_basename "$lib"
		name="$func_basename_result"
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
		test -z "$libdir" && \
		  func_fatal_error "\`$lib' is not a valid libtool archive"
		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
		;;
	      *) func_append newdlfiles " $lib" ;;
	      esac
	    done
	    dlfiles="$newdlfiles"
	    newdlprefiles=
	    for lib in $dlprefiles; do
	      case $lib in
	      *.la)
		# Only pass preopened files to the pseudo-archive (for
		# eventual linking with the app. that links it) if we
		# didn't already link the preopened objects directly into
		# the library:
		func_basename "$lib"
		name="$func_basename_result"
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
		test -z "$libdir" && \
		  func_fatal_error "\`$lib' is not a valid libtool archive"
		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
		;;
	      esac
	    done
	    dlprefiles="$newdlprefiles"
	  else
	    newdlfiles=
	    for lib in $dlfiles; do
	      case $lib in
		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
		*) abs=`pwd`"/$lib" ;;
	      esac
	      func_append newdlfiles " $abs"
	    done
	    dlfiles="$newdlfiles"
	    newdlprefiles=
	    for lib in $dlprefiles; do
	      case $lib in
		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
		*) abs=`pwd`"/$lib" ;;
	      esac
	      func_append newdlprefiles " $abs"
	    done
	    dlprefiles="$newdlprefiles"
	  fi
	  $RM $output
	  # place dlname in correct position for cygwin
	  # In fact, it would be nice if we could use this code for all target
	  # systems that can't hard-code library paths into their executables
	  # and that have no shared library path variable independent of PATH,
	  # but it turns out we can't easily determine that from inspecting
	  # libtool variables, so we have to hard-code the OSs to which it
	  # applies here; at the moment, that means platforms that use the PE
	  # object format with DLL files.  See the long comment at the top of
	  # tests/bindir.at for full details.
	  tdlname=$dlname
	  case $host,$output,$installed,$module,$dlname in
	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
	      # If a -bindir argument was supplied, place the dll there.
	      if test "x$bindir" != x ;
	      then
		func_relative_path "$install_libdir" "$bindir"
		tdlname=$func_relative_path_result$dlname
	      else
		# Otherwise fall back on heuristic.
		tdlname=../bin/$dlname
	      fi
	      ;;
	  esac
	  $ECHO > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='$tdlname'

# Names of this library.
library_names='$library_names'

# The name of the static archive.
old_library='$old_library'

# Linker flags that can not go in dependency_libs.
inherited_linker_flags='$new_inherited_linker_flags'

# Libraries that this one depends upon.
dependency_libs='$dependency_libs'

# Names of additional weak libraries provided by this library
weak_library_names='$weak_libs'

# Version information for $libname.
current=$current
age=$age
revision=$revision

# Is this an already installed library?
installed=$installed

# Should we warn about portability when linking against -modules?
shouldnotlink=$module

# Files to dlopen/dlpreopen
dlopen='$dlfiles'
dlpreopen='$dlprefiles'

# Directory that this library needs to be installed in:
libdir='$install_libdir'"
	  if test "$installed" = no && test "$need_relink" = yes; then
	    $ECHO >> $output "\
relink_command=\"$relink_command\""
	  fi
	done
      }

      # Do a symbolic link so that the libtool archive can be found in
      # LD_LIBRARY_PATH before the program is installed.
      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
      ;;
    esac
    exit $EXIT_SUCCESS
}

{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
    func_mode_link ${1+"$@"}


# func_mode_uninstall arg...
func_mode_uninstall ()
{
    $opt_debug
    RM="$nonopt"
    files=
    rmforce=
    exit_status=0

    # This variable tells wrapper scripts just to set variables rather
    # than running their programs.
    libtool_install_magic="$magic"

    for arg
    do
      case $arg in
      -f) func_append RM " $arg"; rmforce=yes ;;
      -*) func_append RM " $arg" ;;
      *) func_append files " $arg" ;;
      esac
    done

    test -z "$RM" && \
      func_fatal_help "you must specify an RM program"

    rmdirs=

    for file in $files; do
      func_dirname "$file" "" "."
      dir="$func_dirname_result"
      if test "X$dir" = X.; then
	odir="$objdir"
      else
	odir="$dir/$objdir"
      fi
      func_basename "$file"
      name="$func_basename_result"
      test "$opt_mode" = uninstall && odir="$dir"

      # Remember odir for removal later, being careful to avoid duplicates
      if test "$opt_mode" = clean; then
	case " $rmdirs " in
	  *" $odir "*) ;;
	  *) func_append rmdirs " $odir" ;;
	esac
      fi

      # Don't error if the file doesn't exist and rm -f was used.
      if { test -L "$file"; } >/dev/null 2>&1 ||
	 { test -h "$file"; } >/dev/null 2>&1 ||
	 test -f "$file"; then
	:
      elif test -d "$file"; then
	exit_status=1
	continue
      elif test "$rmforce" = yes; then
	continue
      fi

      rmfiles="$file"

      case $name in
      *.la)
	# Possibly a libtool archive, so verify it.
	if func_lalib_p "$file"; then
	  func_source $dir/$name

	  # Delete the libtool libraries and symlinks.
	  for n in $library_names; do
	    func_append rmfiles " $odir/$n"
	  done
	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"

	  case "$opt_mode" in
	  clean)
	    case " $library_names " in
	    *" $dlname "*) ;;
	    *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
	    esac
	    test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
	    ;;
	  uninstall)
	    if test -n "$library_names"; then
	      # Do each command in the postuninstall commands.
	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
	    fi

	    if test -n "$old_library"; then
	      # Do each command in the old_postuninstall commands.
	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
	    fi
	    # FIXME: should reinstall the best remaining shared library.
	    ;;
	  esac
	fi
	;;

      *.lo)
	# Possibly a libtool object, so verify it.
	if func_lalib_p "$file"; then

	  # Read the .lo file
	  func_source $dir/$name

	  # Add PIC object to the list of files to remove.
	  if test -n "$pic_object" &&
	     test "$pic_object" != none; then
	    func_append rmfiles " $dir/$pic_object"
	  fi

	  # Add non-PIC object to the list of files to remove.
	  if test -n "$non_pic_object" &&
	     test "$non_pic_object" != none; then
	    func_append rmfiles " $dir/$non_pic_object"
	  fi
	fi
	;;

      *)
	if test "$opt_mode" = clean ; then
	  noexename=$name
	  case $file in
	  *.exe)
	    func_stripname '' '.exe' "$file"
	    file=$func_stripname_result
	    func_stripname '' '.exe' "$name"
	    noexename=$func_stripname_result
	    # $file with .exe has already been added to rmfiles,
	    # add $file without .exe
	    func_append rmfiles " $file"
	    ;;
	  esac
	  # Do a test to see if this is a libtool program.
	  if func_ltwrapper_p "$file"; then
	    if func_ltwrapper_executable_p "$file"; then
	      func_ltwrapper_scriptname "$file"
	      relink_command=
	      func_source $func_ltwrapper_scriptname_result
	      func_append rmfiles " $func_ltwrapper_scriptname_result"
	    else
	      relink_command=
	      func_source $dir/$noexename
	    fi

	    # note $name still contains .exe if it was in $file originally
	    # as does the version of $file that was added into $rmfiles
	    func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
	    if test "$fast_install" = yes && test -n "$relink_command"; then
	      func_append rmfiles " $odir/lt-$name"
	    fi
	    if test "X$noexename" != "X$name" ; then
	      func_append rmfiles " $odir/lt-${noexename}.c"
	    fi
	  fi
	fi
	;;
      esac
      func_show_eval "$RM $rmfiles" 'exit_status=1'
    done

    # Try to remove the ${objdir}s in the directories where we deleted files
    for dir in $rmdirs; do
      if test -d "$dir"; then
	func_show_eval "rmdir $dir >/dev/null 2>&1"
      fi
    done

    exit $exit_status
}

{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
    func_mode_uninstall ${1+"$@"}

test -z "$opt_mode" && {
  help="$generic_help"
  func_fatal_help "you must specify a MODE"
}

test -z "$exec_cmd" && \
  func_fatal_help "invalid operation mode \`$opt_mode'"

if test -n "$exec_cmd"; then
  eval exec "$exec_cmd"
  exit $EXIT_FAILURE
fi

exit $exit_status


# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries.  Given conflicting
# choices, we go for a static library, that is the most portable,
# since we can't tell whether shared libraries were disabled because
# the user asked for that or because the platform doesn't support
# them.  This is particularly important on AIX, because we don't
# support having both static and shared libraries enabled at the same
# time on that platform, so we default to a shared-only configuration.
# If a disable-shared tag is given, we'll fallback to a static-only
# configuration.  But we'll never go from static-only to shared-only.

# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
build_libtool_libs=no
build_old_libs=yes
# ### END LIBTOOL TAG CONFIG: disable-shared

# ### BEGIN LIBTOOL TAG CONFIG: disable-static
build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
# ### END LIBTOOL TAG CONFIG: disable-static

# Local Variables:
# mode:shell-script
# sh-indentation:2
# End:
# vi:sw=2

farstream-0.2.7/config.sub0000755000076400007640000010532712073410014012420 00000000000000#! /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, 2010,
#   2011, 2012 Free Software Foundation, Inc.

timestamp='2012-04-18'

# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine.  It does not imply ALL GNU software can.
#
# 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
# 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, see .
#
# 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.


# Please send patches to .  Submit a context
# 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.
# Each package is responsible for reporting which valid configurations
# it does not support.  The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.

# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.

me=`echo "$0" | sed -e 's,.*/,,'`

usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
       $0 [OPTION] ALIAS

Canonicalize a configuration name.

Operation modes:
  -h, --help         print this help, then exit
  -t, --time-stamp   print date of last modification, then exit
  -v, --version      print version number, then exit

Report bugs and patches to ."

version="\
GNU config.sub ($timestamp)

Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
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."

help="
Try \`$me --help' for more information."

# Parse command line
while test $# -gt 0 ; do
  case $1 in
    --time-stamp | --time* | -t )
       echo "$timestamp" ; exit ;;
    --version | -v )
       echo "$version" ; exit ;;
    --help | --h* | -h )
       echo "$usage"; exit ;;
    -- )     # Stop option processing
       shift; break ;;
    - )	# Use stdin as input.
       break ;;
    -* )
       echo "$me: invalid option $1$help"
       exit 1 ;;

    *local*)
       # First pass through any local machine types.
       echo $1
       exit ;;

    * )
       break ;;
  esac
done

case $# in
 0) echo "$me: missing argument$help" >&2
    exit 1;;
 1) ;;
 *) echo "$me: too many arguments$help" >&2
    exit 1;;
esac

# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# 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-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
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    ;;
  android-linux)
    os=-linux-android
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
    ;;
  *)
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
    if [ $basic_machine != $1 ]
    then os=`echo $1 | sed 's/.*-/-/'`
    else os=; fi
    ;;
esac

### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work.  We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
	-sun*os*)
		# Prevent following clause from handling this invalid input.
		;;
	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
	-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 | -microblaze)
		os=
		basic_machine=$1
		;;
	-bluegene*)
		os=-cnk
		;;
	-sim | -cisco | -oki | -wec | -winbond)
		os=
		basic_machine=$1
		;;
	-scout)
		;;
	-wrs)
		os=-vxworks
		basic_machine=$1
		;;
	-chorusos*)
		os=-chorusos
		basic_machine=$1
		;;
	-chorusrdb)
		os=-chorusrdb
		basic_machine=$1
		;;
	-hiux*)
		os=-hiuxwe2
		;;
	-sco6)
		os=-sco5v6
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco5)
		os=-sco3.2v5
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco4)
		os=-sco3.2v4
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco3.2.[4-9]*)
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco3.2v[4-9]*)
		# Don't forget version if it is 3.2v4 or newer.
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco5v6*)
		# Don't forget version if it is 3.2v4 or newer.
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco*)
		os=-sco3.2v2
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-udk*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-isc)
		os=-isc2.2
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-clix*)
		basic_machine=clipper-intergraph
		;;
	-isc*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-lynx*178)
		os=-lynxos178
		;;
	-lynx*5)
		os=-lynxos5
		;;
	-lynx*)
		os=-lynxos
		;;
	-ptx*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
		;;
	-windowsnt*)
		os=`echo $os | sed -e 's/windowsnt/winnt/'`
		;;
	-psos*)
		os=-psos
		;;
	-mint | -mint[0-9]*)
		basic_machine=m68k-atari
		os=-mint
		;;
esac

# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
	# Recognize the basic CPU types without company name.
	# Some are omitted here because they have special meanings below.
	1750a | 580 \
	| a29k \
	| aarch64 | aarch64_be \
	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
	| am33_2.0 \
	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
        | be32 | be64 \
	| bfin \
	| c4x | clipper \
	| d10v | d30v | dlx | dsp16xx \
	| epiphany \
	| fido | fr30 | frv \
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
	| hexagon \
	| i370 | i860 | i960 | ia64 \
	| ip2k | iq2000 \
	| le32 | le64 \
	| lm32 \
	| m32c | m32r | m32rle | m68000 | m68k | m88k \
	| maxq | mb | microblaze | mcore | mep | metag \
	| mips | mipsbe | mipseb | mipsel | mipsle \
	| mips16 \
	| mips64 | mips64el \
	| mips64octeon | mips64octeonel \
	| mips64orion | mips64orionel \
	| mips64r5900 | mips64r5900el \
	| mips64vr | mips64vrel \
	| mips64vr4100 | mips64vr4100el \
	| mips64vr4300 | mips64vr4300el \
	| mips64vr5000 | mips64vr5000el \
	| mips64vr5900 | mips64vr5900el \
	| mipsisa32 | mipsisa32el \
	| mipsisa32r2 | mipsisa32r2el \
	| mipsisa64 | mipsisa64el \
	| mipsisa64r2 | mipsisa64r2el \
	| mipsisa64sb1 | mipsisa64sb1el \
	| mipsisa64sr71k | mipsisa64sr71kel \
	| mipstx39 | mipstx39el \
	| mn10200 | mn10300 \
	| moxie \
	| mt \
	| msp430 \
	| nds32 | nds32le | nds32be \
	| nios | nios2 \
	| ns16k | ns32k \
	| open8 \
	| or32 \
	| pdp10 | pdp11 | pj | pjl \
	| powerpc | powerpc64 | powerpc64le | powerpcle \
	| pyramid \
	| rl78 | 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 \
	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
	| ubicom32 \
	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
	| we32k \
	| x86 | xc16x | xstormy16 | xtensa \
	| z8k | z80)
		basic_machine=$basic_machine-unknown
		;;
	c54x)
		basic_machine=tic54x-unknown
		;;
	c55x)
		basic_machine=tic55x-unknown
		;;
	c6x)
		basic_machine=tic6x-unknown
		;;
	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
		basic_machine=$basic_machine-unknown
		os=-none
		;;
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
		;;
	ms1)
		basic_machine=mt-unknown
		;;

	strongarm | thumb | xscale)
		basic_machine=arm-unknown
		;;
	xgate)
		basic_machine=$basic_machine-unknown
		os=-none
		;;
	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.
	i*86 | x86_64)
	  basic_machine=$basic_machine-pc
	  ;;
	# Object if more than one company name word.
	*-*-*)
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
		exit 1
		;;
	# Recognize the basic CPU types with company name.
	580-* \
	| a29k-* \
	| aarch64-* | aarch64_be-* \
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
	| avr-* | avr32-* \
	| be32-* | be64-* \
	| bfin-* | bs2000-* \
	| c[123]* | c30-* | [cjt]90-* | c4x-* \
	| clipper-* | craynv-* | cydra-* \
	| d10v-* | d30v-* | dlx-* \
	| elxsi-* \
	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
	| h8300-* | h8500-* \
	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
	| hexagon-* \
	| i*86-* | i860-* | i960-* | ia64-* \
	| ip2k-* | iq2000-* \
	| le32-* | le64-* \
	| lm32-* \
	| m32c-* | m32r-* | m32rle-* \
	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
	| mips16-* \
	| mips64-* | mips64el-* \
	| mips64octeon-* | mips64octeonel-* \
	| mips64orion-* | mips64orionel-* \
	| mips64r5900-* | mips64r5900el-* \
	| mips64vr-* | mips64vrel-* \
	| mips64vr4100-* | mips64vr4100el-* \
	| mips64vr4300-* | mips64vr4300el-* \
	| mips64vr5000-* | mips64vr5000el-* \
	| mips64vr5900-* | mips64vr5900el-* \
	| mipsisa32-* | mipsisa32el-* \
	| mipsisa32r2-* | mipsisa32r2el-* \
	| mipsisa64-* | mipsisa64el-* \
	| mipsisa64r2-* | mipsisa64r2el-* \
	| mipsisa64sb1-* | mipsisa64sb1el-* \
	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
	| mipstx39-* | mipstx39el-* \
	| mmix-* \
	| mt-* \
	| msp430-* \
	| nds32-* | nds32le-* | nds32be-* \
	| nios-* | nios2-* \
	| none-* | np1-* | ns16k-* | ns32k-* \
	| open8-* \
	| orion-* \
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
	| pyramid-* \
	| rl78-* | 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-* | sv1-* | sx?-* \
	| tahoe-* \
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
	| tile*-* \
	| tron-* \
	| ubicom32-* \
	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
	| vax-* \
	| we32k-* \
	| x86-* | x86_64-* | xc16x-* | xps100-* \
	| xstormy16-* | xtensa*-* \
	| ymp-* \
	| z8k-* | z80-*)
		;;
	# Recognize the basic CPU types without company name, with glob match.
	xtensa*)
		basic_machine=$basic_machine-unknown
		;;
	# Recognize the various machine names and aliases which stand
	# for a CPU type and a company and sometimes even an OS.
	386bsd)
		basic_machine=i386-unknown
		os=-bsd
		;;
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
		basic_machine=m68000-att
		;;
	3b*)
		basic_machine=we32k-att
		;;
	a29khif)
		basic_machine=a29k-amd
		os=-udi
		;;
	abacus)
		basic_machine=abacus-unknown
		;;
	adobe68k)
		basic_machine=m68010-adobe
		os=-scout
		;;
	alliant | fx80)
		basic_machine=fx80-alliant
		;;
	altos | altos3068)
		basic_machine=m68k-altos
		;;
	am29k)
		basic_machine=a29k-none
		os=-bsd
		;;
	amd64)
		basic_machine=x86_64-pc
		;;
	amd64-*)
		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	amdahl)
		basic_machine=580-amdahl
		os=-sysv
		;;
	amiga | amiga-*)
		basic_machine=m68k-unknown
		;;
	amigaos | amigados)
		basic_machine=m68k-unknown
		os=-amigaos
		;;
	amigaunix | amix)
		basic_machine=m68k-unknown
		os=-sysv4
		;;
	apollo68)
		basic_machine=m68k-apollo
		os=-sysv
		;;
	apollo68bsd)
		basic_machine=m68k-apollo
		os=-bsd
		;;
	aros)
		basic_machine=i386-pc
		os=-aros
		;;
	aux)
		basic_machine=m68k-apple
		os=-aux
		;;
	balance)
		basic_machine=ns32k-sequent
		os=-dynix
		;;
	blackfin)
		basic_machine=bfin-unknown
		os=-linux
		;;
	blackfin-*)
		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
		os=-linux
		;;
	bluegene*)
		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)
		basic_machine=arm-unknown
		os=-cegcc
		;;
	convex-c1)
		basic_machine=c1-convex
		os=-bsd
		;;
	convex-c2)
		basic_machine=c2-convex
		os=-bsd
		;;
	convex-c32)
		basic_machine=c32-convex
		os=-bsd
		;;
	convex-c34)
		basic_machine=c34-convex
		os=-bsd
		;;
	convex-c38)
		basic_machine=c38-convex
		os=-bsd
		;;
	cray | j90)
		basic_machine=j90-cray
		os=-unicos
		;;
	craynv)
		basic_machine=craynv-cray
		os=-unicosmp
		;;
	cr16 | cr16-*)
		basic_machine=cr16-unknown
		os=-elf
		;;
	crds | unos)
		basic_machine=m68k-crds
		;;
	crisv32 | crisv32-* | etraxfs*)
		basic_machine=crisv32-axis
		;;
	cris | cris-* | etrax*)
		basic_machine=cris-axis
		;;
	crx)
		basic_machine=crx-unknown
		os=-elf
		;;
	da30 | da30-*)
		basic_machine=m68k-da30
		;;
	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
		basic_machine=mips-dec
		;;
	decsystem10* | dec10*)
		basic_machine=pdp10-dec
		os=-tops10
		;;
	decsystem20* | dec20*)
		basic_machine=pdp10-dec
		os=-tops20
		;;
	delta | 3300 | motorola-3300 | motorola-delta \
	      | 3300-motorola | delta-motorola)
		basic_machine=m68k-motorola
		;;
	delta88)
		basic_machine=m88k-motorola
		os=-sysv3
		;;
	dicos)
		basic_machine=i686-pc
		os=-dicos
		;;
	djgpp)
		basic_machine=i586-pc
		os=-msdosdjgpp
		;;
	dpx20 | dpx20-*)
		basic_machine=rs6000-bull
		os=-bosx
		;;
	dpx2* | dpx2*-bull)
		basic_machine=m68k-bull
		os=-sysv3
		;;
	ebmon29k)
		basic_machine=a29k-amd
		os=-ebmon
		;;
	elxsi)
		basic_machine=elxsi-elxsi
		os=-bsd
		;;
	encore | umax | mmax)
		basic_machine=ns32k-encore
		;;
	es1800 | OSE68k | ose68k | ose | OSE)
		basic_machine=m68k-ericsson
		os=-ose
		;;
	fx2800)
		basic_machine=i860-alliant
		;;
	genix)
		basic_machine=ns32k-ns
		;;
	gmicro)
		basic_machine=tron-gmicro
		os=-sysv
		;;
	go32)
		basic_machine=i386-pc
		os=-go32
		;;
	h3050r* | hiux*)
		basic_machine=hppa1.1-hitachi
		os=-hiuxwe2
		;;
	h8300hms)
		basic_machine=h8300-hitachi
		os=-hms
		;;
	h8300xray)
		basic_machine=h8300-hitachi
		os=-xray
		;;
	h8500hms)
		basic_machine=h8500-hitachi
		os=-hms
		;;
	harris)
		basic_machine=m88k-harris
		os=-sysv3
		;;
	hp300-*)
		basic_machine=m68k-hp
		;;
	hp300bsd)
		basic_machine=m68k-hp
		os=-bsd
		;;
	hp300hpux)
		basic_machine=m68k-hp
		os=-hpux
		;;
	hp3k9[0-9][0-9] | hp9[0-9][0-9])
		basic_machine=hppa1.0-hp
		;;
	hp9k2[0-9][0-9] | hp9k31[0-9])
		basic_machine=m68000-hp
		;;
	hp9k3[2-9][0-9])
		basic_machine=m68k-hp
		;;
	hp9k6[0-9][0-9] | hp6[0-9][0-9])
		basic_machine=hppa1.0-hp
		;;
	hp9k7[0-79][0-9] | hp7[0-79][0-9])
		basic_machine=hppa1.1-hp
		;;
	hp9k78[0-9] | hp78[0-9])
		# FIXME: really hppa2.0-hp
		basic_machine=hppa1.1-hp
		;;
	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
		# FIXME: really hppa2.0-hp
		basic_machine=hppa1.1-hp
		;;
	hp9k8[0-9][13679] | hp8[0-9][13679])
		basic_machine=hppa1.1-hp
		;;
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
		basic_machine=hppa1.0-hp
		;;
	hppa-next)
		os=-nextstep3
		;;
	hppaosf)
		basic_machine=hppa1.1-hp
		os=-osf
		;;
	hppro)
		basic_machine=hppa1.1-hp
		os=-proelf
		;;
	i370-ibm* | ibm*)
		basic_machine=i370-ibm
		;;
	i*86v32)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv32
		;;
	i*86v4*)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv4
		;;
	i*86v)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv
		;;
	i*86sol2)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-solaris2
		;;
	i386mach)
		basic_machine=i386-mach
		os=-mach
		;;
	i386-vsta | vsta)
		basic_machine=i386-unknown
		os=-vsta
		;;
	iris | iris4d)
		basic_machine=mips-sgi
		case $os in
		    -irix*)
			;;
		    *)
			os=-irix4
			;;
		esac
		;;
	isi68 | isi)
		basic_machine=m68k-isi
		os=-sysv
		;;
	m68knommu)
		basic_machine=m68k-unknown
		os=-linux
		;;
	m68knommu-*)
		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
		os=-linux
		;;
	m88k-omron*)
		basic_machine=m88k-omron
		;;
	magnum | m3230)
		basic_machine=mips-mips
		os=-sysv
		;;
	merlin)
		basic_machine=ns32k-utek
		os=-sysv
		;;
	microblaze)
		basic_machine=microblaze-xilinx
		;;
	mingw32)
		basic_machine=i386-pc
		os=-mingw32
		;;
	mingw32ce)
		basic_machine=arm-unknown
		os=-mingw32ce
		;;
	miniframe)
		basic_machine=m68000-convergent
		;;
	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
		basic_machine=m68k-atari
		os=-mint
		;;
	mips3*-*)
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
		;;
	mips3*)
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
		;;
	monitor)
		basic_machine=m68k-rom68k
		os=-coff
		;;
	morphos)
		basic_machine=powerpc-unknown
		os=-morphos
		;;
	msdos)
		basic_machine=i386-pc
		os=-msdos
		;;
	ms1-*)
		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
		;;
	msys)
		basic_machine=i386-pc
		os=-msys
		;;
	mvs)
		basic_machine=i370-ibm
		os=-mvs
		;;
	nacl)
		basic_machine=le32-unknown
		os=-nacl
		;;
	ncr3000)
		basic_machine=i486-ncr
		os=-sysv4
		;;
	netbsd386)
		basic_machine=i386-unknown
		os=-netbsd
		;;
	netwinder)
		basic_machine=armv4l-rebel
		os=-linux
		;;
	news | news700 | news800 | news900)
		basic_machine=m68k-sony
		os=-newsos
		;;
	news1000)
		basic_machine=m68030-sony
		os=-newsos
		;;
	news-3600 | risc-news)
		basic_machine=mips-sony
		os=-newsos
		;;
	necv70)
		basic_machine=v70-nec
		os=-sysv
		;;
	next | m*-next )
		basic_machine=m68k-next
		case $os in
		    -nextstep* )
			;;
		    -ns2*)
		      os=-nextstep2
			;;
		    *)
		      os=-nextstep3
			;;
		esac
		;;
	nh3000)
		basic_machine=m68k-harris
		os=-cxux
		;;
	nh[45]000)
		basic_machine=m88k-harris
		os=-cxux
		;;
	nindy960)
		basic_machine=i960-intel
		os=-nindy
		;;
	mon960)
		basic_machine=i960-intel
		os=-mon960
		;;
	nonstopux)
		basic_machine=mips-compaq
		os=-nonstopux
		;;
	np1)
		basic_machine=np1-gould
		;;
	neo-tandem)
		basic_machine=neo-tandem
		;;
	nse-tandem)
		basic_machine=nse-tandem
		;;
	nsr-tandem)
		basic_machine=nsr-tandem
		;;
	op50n-* | op60c-*)
		basic_machine=hppa1.1-oki
		os=-proelf
		;;
	openrisc | openrisc-*)
		basic_machine=or32-unknown
		;;
	os400)
		basic_machine=powerpc-ibm
		os=-os400
		;;
	OSE68000 | ose68000)
		basic_machine=m68000-ericsson
		os=-ose
		;;
	os68k)
		basic_machine=m68k-none
		os=-os68k
		;;
	pa-hitachi)
		basic_machine=hppa1.1-hitachi
		os=-hiuxwe2
		;;
	paragon)
		basic_machine=i860-intel
		os=-osf
		;;
	parisc)
		basic_machine=hppa-unknown
		os=-linux
		;;
	parisc-*)
		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
		os=-linux
		;;
	pbd)
		basic_machine=sparc-tti
		;;
	pbb)
		basic_machine=m68k-tti
		;;
	pc532 | pc532-*)
		basic_machine=ns32k-pc532
		;;
	pc98)
		basic_machine=i386-pc
		;;
	pc98-*)
		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentium | p5 | k5 | k6 | nexgen | viac3)
		basic_machine=i586-pc
		;;
	pentiumpro | p6 | 6x86 | athlon | athlon_*)
		basic_machine=i686-pc
		;;
	pentiumii | pentium2 | pentiumiii | pentium3)
		basic_machine=i686-pc
		;;
	pentium4)
		basic_machine=i786-pc
		;;
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentium4-*)
		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pn)
		basic_machine=pn-gould
		;;
	power)	basic_machine=power-ibm
		;;
	ppc | ppcbe)	basic_machine=powerpc-unknown
		;;
	ppc-* | ppcbe-*)
		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppcle | powerpclittle | ppc-le | powerpc-little)
		basic_machine=powerpcle-unknown
		;;
	ppcle-* | powerpclittle-*)
		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppc64)	basic_machine=powerpc64-unknown
		;;
	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
		basic_machine=powerpc64le-unknown
		;;
	ppc64le-* | powerpc64little-*)
		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ps2)
		basic_machine=i386-ibm
		;;
	pw32)
		basic_machine=i586-unknown
		os=-pw32
		;;
	rdos)
		basic_machine=i386-pc
		os=-rdos
		;;
	rom68k)
		basic_machine=m68k-rom68k
		os=-coff
		;;
	rm[46]00)
		basic_machine=mips-siemens
		;;
	rtpc | rtpc-*)
		basic_machine=romp-ibm
		;;
	s390 | s390-*)
		basic_machine=s390-ibm
		;;
	s390x | s390x-*)
		basic_machine=s390x-ibm
		;;
	sa29200)
		basic_machine=a29k-amd
		os=-udi
		;;
	sb1)
		basic_machine=mipsisa64sb1-unknown
		;;
	sb1el)
		basic_machine=mipsisa64sb1el-unknown
		;;
	sde)
		basic_machine=mipsisa32-sde
		os=-elf
		;;
	sei)
		basic_machine=mips-sei
		os=-seiux
		;;
	sequent)
		basic_machine=i386-sequent
		;;
	sh)
		basic_machine=sh-hitachi
		os=-hms
		;;
	sh5el)
		basic_machine=sh5le-unknown
		;;
	sh64)
		basic_machine=sh64-unknown
		;;
	sparclite-wrs | simso-wrs)
		basic_machine=sparclite-wrs
		os=-vxworks
		;;
	sps7)
		basic_machine=m68k-bull
		os=-sysv2
		;;
	spur)
		basic_machine=spur-unknown
		;;
	st2000)
		basic_machine=m68k-tandem
		;;
	stratus)
		basic_machine=i860-stratus
		os=-sysv4
		;;
	strongarm-* | thumb-*)
		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	sun2)
		basic_machine=m68000-sun
		;;
	sun2os3)
		basic_machine=m68000-sun
		os=-sunos3
		;;
	sun2os4)
		basic_machine=m68000-sun
		os=-sunos4
		;;
	sun3os3)
		basic_machine=m68k-sun
		os=-sunos3
		;;
	sun3os4)
		basic_machine=m68k-sun
		os=-sunos4
		;;
	sun4os3)
		basic_machine=sparc-sun
		os=-sunos3
		;;
	sun4os4)
		basic_machine=sparc-sun
		os=-sunos4
		;;
	sun4sol2)
		basic_machine=sparc-sun
		os=-solaris2
		;;
	sun3 | sun3-*)
		basic_machine=m68k-sun
		;;
	sun4)
		basic_machine=sparc-sun
		;;
	sun386 | sun386i | roadrunner)
		basic_machine=i386-sun
		;;
	sv1)
		basic_machine=sv1-cray
		os=-unicos
		;;
	symmetry)
		basic_machine=i386-sequent
		os=-dynix
		;;
	t3e)
		basic_machine=alphaev5-cray
		os=-unicos
		;;
	t90)
		basic_machine=t90-cray
		os=-unicos
		;;
	tile*)
		basic_machine=$basic_machine-unknown
		os=-linux-gnu
		;;
	tx39)
		basic_machine=mipstx39-unknown
		;;
	tx39el)
		basic_machine=mipstx39el-unknown
		;;
	toad1)
		basic_machine=pdp10-xkl
		os=-tops20
		;;
	tower | tower-32)
		basic_machine=m68k-ncr
		;;
	tpf)
		basic_machine=s390x-ibm
		os=-tpf
		;;
	udi29k)
		basic_machine=a29k-amd
		os=-udi
		;;
	ultra3)
		basic_machine=a29k-nyu
		os=-sym1
		;;
	v810 | necv810)
		basic_machine=v810-nec
		os=-none
		;;
	vaxv)
		basic_machine=vax-dec
		os=-sysv
		;;
	vms)
		basic_machine=vax-dec
		os=-vms
		;;
	vpp*|vx|vx-*)
		basic_machine=f301-fujitsu
		;;
	vxworks960)
		basic_machine=i960-wrs
		os=-vxworks
		;;
	vxworks68)
		basic_machine=m68k-wrs
		os=-vxworks
		;;
	vxworks29k)
		basic_machine=a29k-wrs
		os=-vxworks
		;;
	w65*)
		basic_machine=w65-wdc
		os=-none
		;;
	w89k-*)
		basic_machine=hppa1.1-winbond
		os=-proelf
		;;
	xbox)
		basic_machine=i686-pc
		os=-mingw32
		;;
	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
		;;
	z8k-*-coff)
		basic_machine=z8k-unknown
		os=-sim
		;;
	z80-*-coff)
		basic_machine=z80-unknown
		os=-sim
		;;
	none)
		basic_machine=none-none
		os=-none
		;;

# Here we handle the default manufacturer of certain CPU types.  It is in
# some cases the only manufacturer, in others, it is the most popular.
	w89k)
		basic_machine=hppa1.1-winbond
		;;
	op50n)
		basic_machine=hppa1.1-oki
		;;
	op60c)
		basic_machine=hppa1.1-oki
		;;
	romp)
		basic_machine=romp-ibm
		;;
	mmix)
		basic_machine=mmix-knuth
		;;
	rs6000)
		basic_machine=rs6000-ibm
		;;
	vax)
		basic_machine=vax-dec
		;;
	pdp10)
		# there are many clones, so DEC is not a safe bet
		basic_machine=pdp10-unknown
		;;
	pdp11)
		basic_machine=pdp11-dec
		;;
	we32k)
		basic_machine=we32k-att
		;;
	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
		basic_machine=sh-unknown
		;;
	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
		basic_machine=sparc-sun
		;;
	cydra)
		basic_machine=cydra-cydrome
		;;
	orion)
		basic_machine=orion-highlevel
		;;
	orion105)
		basic_machine=clipper-highlevel
		;;
	mac | mpw | mac-mpw)
		basic_machine=m68k-apple
		;;
	pmac | pmac-mpw)
		basic_machine=powerpc-apple
		;;
	*-unknown)
		# Make sure to match an already-canonicalized machine name.
		;;
	*)
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
		exit 1
		;;
esac

# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
	*-digital*)
		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
		;;
	*-commodore*)
		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
		;;
	*)
		;;
esac

# Decode manufacturer-specific aliases for certain operating systems.

if [ x"$os" != x"" ]
then
case $os in
	# 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|'`
		;;
	-solaris)
		os=-solaris2
		;;
	-svr4*)
		os=-sysv4
		;;
	-unixware*)
		os=-sysv4.2uw
		;;
	-gnu/linux*)
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
		;;
	# First accept the basic system types.
	# The portable systems comes first.
	# Each alternative MUST END IN A *, to match a version number.
	# -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* | -auroraux* | -solaris* \
	      | -sym* | -kopensolaris* \
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
	      | -aos* | -aros* \
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
	      | -openbsd* | -solidbsd* \
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
	      | -chorusos* | -chorusrdb* | -cegcc* \
	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
	      | -mingw32* | -linux-gnu* | -linux-android* \
	      | -linux-newlib* | -linux-uclibc* \
	      | -uxpv* | -beos* | -mpeix* | -udk* \
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
	# Remember, each alternative MUST END IN *, to match a version number.
		;;
	-qnx*)
		case $basic_machine in
		    x86-* | i*86-*)
			;;
		    *)
			os=-nto$os
			;;
		esac
		;;
	-nto-qnx*)
		;;
	-nto*)
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
		;;
	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
		;;
	-mac*)
		os=`echo $os | sed -e 's|mac|macos|'`
		;;
	-linux-dietlibc)
		os=-linux-dietlibc
		;;
	-linux*)
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
		;;
	-sunos5*)
		os=`echo $os | sed -e 's|sunos5|solaris2|'`
		;;
	-sunos6*)
		os=`echo $os | sed -e 's|sunos6|solaris3|'`
		;;
	-opened*)
		os=-openedition
		;;
	-os400*)
		os=-os400
		;;
	-wince*)
		os=-wince
		;;
	-osfrose*)
		os=-osfrose
		;;
	-osf*)
		os=-osf
		;;
	-utek*)
		os=-bsd
		;;
	-dynix*)
		os=-bsd
		;;
	-acis*)
		os=-aos
		;;
	-atheos*)
		os=-atheos
		;;
	-syllable*)
		os=-syllable
		;;
	-386bsd)
		os=-bsd
		;;
	-ctix* | -uts*)
		os=-sysv
		;;
	-nova*)
		os=-rtmk-nova
		;;
	-ns2 )
		os=-nextstep2
		;;
	-nsk*)
		os=-nsk
		;;
	# Preserve the version number of sinix5.
	-sinix5.*)
		os=`echo $os | sed -e 's|sinix|sysv|'`
		;;
	-sinix*)
		os=-sysv4
		;;
	-tpf*)
		os=-tpf
		;;
	-triton*)
		os=-sysv3
		;;
	-oss*)
		os=-sysv3
		;;
	-svr4)
		os=-sysv4
		;;
	-svr3)
		os=-sysv3
		;;
	-sysvr4)
		os=-sysv4
		;;
	# This must come after -sysvr4.
	-sysv*)
		;;
	-ose*)
		os=-ose
		;;
	-es1800*)
		os=-ose
		;;
	-xenix)
		os=-xenix
		;;
	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
		os=-mint
		;;
	-aros*)
		os=-aros
		;;
	-kaos*)
		os=-kaos
		;;
	-zvmoe)
		os=-zvmoe
		;;
	-dicos*)
		os=-dicos
		;;
	-nacl*)
		;;
	-none)
		;;
	*)
		# Get rid of the `-' at the beginning of $os.
		os=`echo $os | sed 's/[^-]*-//'`
		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
		exit 1
		;;
esac
else

# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.

# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system.  Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.

case $basic_machine in
	score-*)
		os=-elf
		;;
	spu-*)
		os=-elf
		;;
	*-acorn)
		os=-riscix1.2
		;;
	arm*-rebel)
		os=-linux
		;;
	arm*-semi)
		os=-aout
		;;
	c4x-* | tic4x-*)
		os=-coff
		;;
	hexagon-*)
		os=-elf
		;;
	tic54x-*)
		os=-coff
		;;
	tic55x-*)
		os=-coff
		;;
	tic6x-*)
		os=-coff
		;;
	# This must come before the *-dec entry.
	pdp10-*)
		os=-tops20
		;;
	pdp11-*)
		os=-none
		;;
	*-dec | vax-*)
		os=-ultrix4.2
		;;
	m68*-apollo)
		os=-domain
		;;
	i386-sun)
		os=-sunos4.0.2
		;;
	m68000-sun)
		os=-sunos3
		;;
	m68*-cisco)
		os=-aout
		;;
	mep-*)
		os=-elf
		;;
	mips*-cisco)
		os=-elf
		;;
	mips*-*)
		os=-elf
		;;
	or32-*)
		os=-coff
		;;
	*-tti)	# must be before sparc entry or we get the wrong os.
		os=-sysv3
		;;
	sparc-* | *-sun)
		os=-sunos4.1.1
		;;
	*-be)
		os=-beos
		;;
	*-haiku)
		os=-haiku
		;;
	*-ibm)
		os=-aix
		;;
	*-knuth)
		os=-mmixware
		;;
	*-wec)
		os=-proelf
		;;
	*-winbond)
		os=-proelf
		;;
	*-oki)
		os=-proelf
		;;
	*-hp)
		os=-hpux
		;;
	*-hitachi)
		os=-hiux
		;;
	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
		os=-sysv
		;;
	*-cbm)
		os=-amigaos
		;;
	*-dg)
		os=-dgux
		;;
	*-dolphin)
		os=-sysv3
		;;
	m68k-ccur)
		os=-rtu
		;;
	m88k-omron*)
		os=-luna
		;;
	*-next )
		os=-nextstep
		;;
	*-sequent)
		os=-ptx
		;;
	*-crds)
		os=-unos
		;;
	*-ns)
		os=-genix
		;;
	i370-*)
		os=-mvs
		;;
	*-next)
		os=-nextstep3
		;;
	*-gould)
		os=-sysv
		;;
	*-highlevel)
		os=-bsd
		;;
	*-encore)
		os=-bsd
		;;
	*-sgi)
		os=-irix
		;;
	*-siemens)
		os=-sysv4
		;;
	*-masscomp)
		os=-rtu
		;;
	f30[01]-fujitsu | f700-fujitsu)
		os=-uxpv
		;;
	*-rom68k)
		os=-coff
		;;
	*-*bug)
		os=-coff
		;;
	*-apple)
		os=-macos
		;;
	*-atari*)
		os=-mint
		;;
	*)
		os=-none
		;;
esac
fi

# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer.  We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
	*-unknown)
		case $os in
			-riscix*)
				vendor=acorn
				;;
			-sunos*)
				vendor=sun
				;;
			-cnk*|-aix*)
				vendor=ibm
				;;
			-beos*)
				vendor=be
				;;
			-hpux*)
				vendor=hp
				;;
			-mpeix*)
				vendor=hp
				;;
			-hiux*)
				vendor=hitachi
				;;
			-unos*)
				vendor=crds
				;;
			-dgux*)
				vendor=dg
				;;
			-luna*)
				vendor=omron
				;;
			-genix*)
				vendor=ns
				;;
			-mvs* | -opened*)
				vendor=ibm
				;;
			-os400*)
				vendor=ibm
				;;
			-ptx*)
				vendor=sequent
				;;
			-tpf*)
				vendor=ibm
				;;
			-vxsim* | -vxworks* | -windiss*)
				vendor=wrs
				;;
			-aux*)
				vendor=apple
				;;
			-hms*)
				vendor=hitachi
				;;
			-mpw* | -macos*)
				vendor=apple
				;;
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
				vendor=atari
				;;
			-vos*)
				vendor=stratus
				;;
		esac
		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
		;;
esac

echo $basic_machine$os
exit

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
farstream-0.2.7/compile0000755000076400007640000001610312073410014012004 00000000000000#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.

scriptversion=2012-03-05.13; # UTC

# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# 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, 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, see .

# 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.

# This file is maintained in Automake, please report
# bugs to  or send patches to
# .

nl='
'

# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" ""	$nl"

file_conv=

# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
  file=$1
  case $file in
    / | /[!/]*) # absolute file, and not a UNC file
      if test -z "$file_conv"; then
	# lazily determine how to convert abs files
	case `uname -s` in
	  MINGW*)
	    file_conv=mingw
	    ;;
	  CYGWIN*)
	    file_conv=cygwin
	    ;;
	  *)
	    file_conv=wine
	    ;;
	esac
      fi
      case $file_conv/,$2, in
	*,$file_conv,*)
	  ;;
	mingw/*)
	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
	  ;;
	cygwin/*)
	  file=`cygpath -m "$file" || echo "$file"`
	  ;;
	wine/*)
	  file=`winepath -w "$file" || echo "$file"`
	  ;;
      esac
      ;;
  esac
}

# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
  func_file_conv "$1"
  if test -z "$lib_path"; then
    lib_path=$file
  else
    lib_path="$lib_path;$file"
  fi
  linker_opts="$linker_opts -LIBPATH:$file"
}

# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
  lib=$1
  found=no
  save_IFS=$IFS
  IFS=';'
  for dir in $lib_path $LIB
  do
    IFS=$save_IFS
    if $shared && test -f "$dir/$lib.dll.lib"; then
      found=yes
      lib=$dir/$lib.dll.lib
      break
    fi
    if test -f "$dir/$lib.lib"; then
      found=yes
      lib=$dir/$lib.lib
      break
    fi
  done
  IFS=$save_IFS

  if test "$found" != yes; then
    lib=$lib.lib
  fi
}

# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
  # Assume a capable shell
  lib_path=
  shared=:
  linker_opts=
  for arg
  do
    if test -n "$eat"; then
      eat=
    else
      case $1 in
	-o)
	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
	  eat=1
	  case $2 in
	    *.o | *.[oO][bB][jJ])
	      func_file_conv "$2"
	      set x "$@" -Fo"$file"
	      shift
	      ;;
	    *)
	      func_file_conv "$2"
	      set x "$@" -Fe"$file"
	      shift
	      ;;
	  esac
	  ;;
	-I)
	  eat=1
	  func_file_conv "$2" mingw
	  set x "$@" -I"$file"
	  shift
	  ;;
	-I*)
	  func_file_conv "${1#-I}" mingw
	  set x "$@" -I"$file"
	  shift
	  ;;
	-l)
	  eat=1
	  func_cl_dashl "$2"
	  set x "$@" "$lib"
	  shift
	  ;;
	-l*)
	  func_cl_dashl "${1#-l}"
	  set x "$@" "$lib"
	  shift
	  ;;
	-L)
	  eat=1
	  func_cl_dashL "$2"
	  ;;
	-L*)
	  func_cl_dashL "${1#-L}"
	  ;;
	-static)
	  shared=false
	  ;;
	-Wl,*)
	  arg=${1#-Wl,}
	  save_ifs="$IFS"; IFS=','
	  for flag in $arg; do
	    IFS="$save_ifs"
	    linker_opts="$linker_opts $flag"
	  done
	  IFS="$save_ifs"
	  ;;
	-Xlinker)
	  eat=1
	  linker_opts="$linker_opts $2"
	  ;;
	-*)
	  set x "$@" "$1"
	  shift
	  ;;
	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
	  func_file_conv "$1"
	  set x "$@" -Tp"$file"
	  shift
	  ;;
	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
	  func_file_conv "$1" mingw
	  set x "$@" "$file"
	  shift
	  ;;
	*)
	  set x "$@" "$1"
	  shift
	  ;;
      esac
    fi
    shift
  done
  if test -n "$linker_opts"; then
    linker_opts="-link$linker_opts"
  fi
  exec "$@" $linker_opts
  exit 1
}

eat=

case $1 in
  '')
     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
     exit 1;
     ;;
  -h | --h*)
    cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]

Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.

If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.

Report bugs to .
EOF
    exit $?
    ;;
  -v | --v*)
    echo "compile $scriptversion"
    exit $?
    ;;
  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
    func_cl_wrapper "$@"      # Doesn't return...
    ;;
esac

ofile=
cfile=

for arg
do
  if test -n "$eat"; then
    eat=
  else
    case $1 in
      -o)
	# configure might choose to run compile as 'compile cc -o foo foo.c'.
	# So we strip '-o arg' only if arg is an object.
	eat=1
	case $2 in
	  *.o | *.obj)
	    ofile=$2
	    ;;
	  *)
	    set x "$@" -o "$2"
	    shift
	    ;;
	esac
	;;
      *.c)
	cfile=$1
	set x "$@" "$1"
	shift
	;;
      *)
	set x "$@" "$1"
	shift
	;;
    esac
  fi
  shift
done

if test -z "$ofile" || test -z "$cfile"; then
  # If no '-o' option was seen then we might have been invoked from a
  # pattern rule where we don't need one.  That is ok -- this is a
  # normal compilation that the losing compiler can handle.  If no
  # '.c' file was seen then we are probably linking.  That is also
  # ok.
  exec "$@"
fi

# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`

# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file.  Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
  if mkdir "$lockdir" >/dev/null 2>&1; then
    break
  fi
  sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15

# Run the compile.
"$@"
ret=$?

if test -f "$cofile"; then
  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi

rmdir "$lockdir"
exit $ret

# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
farstream-0.2.7/gst/0000775000076400007640000000000012462323000011304 500000000000000farstream-0.2.7/gst/fsmsnconference/0000775000076400007640000000000012462323000014462 500000000000000farstream-0.2.7/gst/fsmsnconference/fs-msn-session.c0000664000076400007640000003511112401500475017441 00000000000000/*
 * Farstream - Farstream MSN Session
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Youness Alaoui 
 *
 * fs-msn-session.c - A Farstream Msn Session gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-msn-session
 * @short_description: A  MSN session in a #FsMsnConference
 *
 * There can be only one stream per session.
 *
 * It can afterwards be modified to pause sending (or receiving) by modifying
 * the #FsMsnStream::direction property.
 *
 * The transmitter parameters to the fs_session_new_stream() function are
 * used to set the initial value of the construct properties of the stream
 * object. This plugin does not use transmitter plugins, so the transmitter
 * parameter itself is ignored.
 *
 * The codecs preferences can not be modified and the codec is a fixed value.
 * It is always "MIMIC".
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-msn-session.h"

#include 

#include 

#include "fs-msn-stream.h"
#include "fs-msn-participant.h"

#define GST_CAT_DEFAULT fsmsnconference_debug

/* Signals */
enum
{
  LAST_SIGNAL
};

/* props */
enum
{
  PROP_0,
  PROP_MEDIA_TYPE,
  PROP_ID,
  PROP_SINK_PAD,
  PROP_CODEC_PREFERENCES,
  PROP_CODECS,
  PROP_CODECS_WITHOUT_CONFIG,
  PROP_CURRENT_SEND_CODEC,
  PROP_CONFERENCE,
  PROP_TOS
};



struct _FsMsnSessionPrivate
{
  FsMediaType media_type;

  FsMsnConference *conference;
  FsMsnStream *stream;

  GError *construction_error;

  GstPad *media_sink_pad;

  guint tos; /* Protected by conf lock */

  GMutex mutex; /* protects the conference */
};

G_DEFINE_TYPE (FsMsnSession, fs_msn_session, FS_TYPE_SESSION);

#define FS_MSN_SESSION_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_MSN_SESSION, FsMsnSessionPrivate))

static void fs_msn_session_dispose (GObject *object);
static void fs_msn_session_finalize (GObject *object);

static void fs_msn_session_get_property (GObject *object,
    guint prop_id,
    GValue *value,
    GParamSpec *pspec);
static void fs_msn_session_set_property (GObject *object,
    guint prop_id,
    const GValue *value,
    GParamSpec *pspec);

static void fs_msn_session_constructed (GObject *object);

static FsStream *fs_msn_session_new_stream (FsSession *session,
    FsParticipant *participant,
    FsStreamDirection direction,
    GError **error);

static GType
fs_msn_session_get_stream_transmitter_type (FsSession *session,
    const gchar *transmitter);

static void _remove_stream (gpointer user_data,
                            GObject *where_the_object_was);

static void
fs_msn_session_class_init (FsMsnSessionClass *klass)
{
  GObjectClass *gobject_class;
  FsSessionClass *session_class;

  gobject_class = (GObjectClass *) klass;
  session_class = FS_SESSION_CLASS (klass);

  gobject_class->set_property = fs_msn_session_set_property;
  gobject_class->get_property = fs_msn_session_get_property;
  gobject_class->constructed = fs_msn_session_constructed;

  session_class->new_stream = fs_msn_session_new_stream;
  session_class->get_stream_transmitter_type =
    fs_msn_session_get_stream_transmitter_type;

  g_object_class_override_property (gobject_class,
      PROP_MEDIA_TYPE, "media-type");
  g_object_class_override_property (gobject_class,
      PROP_ID, "id");
  g_object_class_override_property (gobject_class,
      PROP_SINK_PAD, "sink-pad");

  g_object_class_override_property (gobject_class,
    PROP_CODEC_PREFERENCES, "codec-preferences");
  g_object_class_override_property (gobject_class,
    PROP_CODECS, "codecs");
  g_object_class_override_property (gobject_class,
    PROP_CODECS_WITHOUT_CONFIG, "codecs-without-config");
  g_object_class_override_property (gobject_class,
    PROP_CURRENT_SEND_CODEC, "current-send-codec");
  g_object_class_override_property (gobject_class,
    PROP_TOS, "tos");
  g_object_class_override_property (gobject_class,
    PROP_CONFERENCE, "conference");

  gobject_class->dispose = fs_msn_session_dispose;
  gobject_class->finalize = fs_msn_session_finalize;

  g_type_class_add_private (klass, sizeof (FsMsnSessionPrivate));
}

static void
fs_msn_session_init (FsMsnSession *self)
{
  /* member init */
  self->priv = FS_MSN_SESSION_GET_PRIVATE (self);
  self->priv->construction_error = NULL;

  g_mutex_init (&self->priv->mutex);

  self->priv->media_type = FS_MEDIA_TYPE_LAST + 1;
}


static FsMsnConference *
fs_msn_session_get_conference (FsMsnSession *self, GError **error)
{
  FsMsnConference *conference;

  g_mutex_lock (&self->priv->mutex);
  conference = self->priv->conference;
  if (conference)
    g_object_ref (conference);
  g_mutex_unlock (&self->priv->mutex);

  if (!conference)
    g_set_error (error, FS_ERROR, FS_ERROR_DISPOSED,
        "Called function after session has been disposed");

  return conference;
}


static void
fs_msn_session_dispose (GObject *object)
{
  FsMsnSession *self = FS_MSN_SESSION (object);
  GstBin *conferencebin = NULL;
  FsMsnConference *conference = fs_msn_session_get_conference (self, NULL);
  GstElement *valve = NULL;

  g_mutex_lock (&self->priv->mutex);
  self->priv->conference = NULL;
  g_mutex_unlock (&self->priv->mutex);

  if (!conference)
    goto out;

  if (self->priv->stream)
  {
    g_object_weak_unref (G_OBJECT (self->priv->stream), _remove_stream, self);
    fs_stream_destroy (FS_STREAM (self->priv->stream));
    self->priv->stream = NULL;
  }

  conferencebin = GST_BIN (conference);

  if (!conferencebin)
    goto out;

  if (self->priv->media_sink_pad)
    gst_pad_set_active (self->priv->media_sink_pad, FALSE);

  GST_OBJECT_LOCK (conference);
  valve = self->valve;
  self->valve = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (valve)
  {
    gst_element_set_locked_state (valve, TRUE);
    gst_element_set_state (valve, GST_STATE_NULL);
    gst_bin_remove (conferencebin, valve);
  }

  if (self->priv->media_sink_pad)
    gst_element_remove_pad (GST_ELEMENT (conference),
        self->priv->media_sink_pad);
  self->priv->media_sink_pad = NULL;

  gst_object_unref (conferencebin);
  gst_object_unref (conference);

 out:

  G_OBJECT_CLASS (fs_msn_session_parent_class)->dispose (object);
}

static void
fs_msn_session_finalize (GObject *object)
{
  FsMsnSession *self = FS_MSN_SESSION (object);

  g_mutex_clear (&self->priv->mutex);

  G_OBJECT_CLASS (fs_msn_session_parent_class)->finalize (object);
}

static void
fs_msn_session_get_property (GObject *object,
                             guint prop_id,
                             GValue *value,
                             GParamSpec *pspec)
{
  FsMsnSession *self = FS_MSN_SESSION (object);
  FsMsnConference *conference = fs_msn_session_get_conference (self, NULL);

  if (!conference)
    return;

  switch (prop_id)
  {
    case PROP_MEDIA_TYPE:
      g_value_set_enum (value, self->priv->media_type);
      break;
    case PROP_ID:
      g_value_set_uint (value, 1);
      break;
    case PROP_CONFERENCE:
      g_value_set_object (value, self->priv->conference);
      break;
    case PROP_SINK_PAD:
      g_value_set_object (value, self->priv->media_sink_pad);
      break;
    case PROP_CODEC_PREFERENCES:
      /* There are no preferences, so return NULL */
      break;
    case PROP_CODECS:
    case PROP_CODECS_WITHOUT_CONFIG:
      {
        GList *codecs = NULL;
        FsCodec *mimic_codec = fs_codec_new (FS_CODEC_ID_ANY, "mimic",
          FS_MEDIA_TYPE_VIDEO, 0);
        codecs = g_list_append (codecs, mimic_codec);
        g_value_take_boxed (value, codecs);
      }
      break;
    case PROP_CURRENT_SEND_CODEC:
      {
        FsCodec *send_codec = fs_codec_new (FS_CODEC_ID_ANY, "mimic",
            FS_MEDIA_TYPE_VIDEO, 0);
        g_value_take_boxed (value, send_codec);
        break;
      }
    case PROP_TOS:
      GST_OBJECT_LOCK (conference);
      g_value_set_uint (value, self->priv->tos);
      GST_OBJECT_UNLOCK (conference);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  gst_object_unref (conference);
}

static void
fs_msn_session_set_property (GObject *object,
                             guint prop_id,
                             const GValue *value,
                             GParamSpec *pspec)
{
  FsMsnSession *self = FS_MSN_SESSION (object);
  FsMsnConference *conference = fs_msn_session_get_conference (self, NULL);

  if (!conference && !(pspec->flags & G_PARAM_CONSTRUCT_ONLY))
    return;

  switch (prop_id)
  {
    case PROP_MEDIA_TYPE:
      self->priv->media_type = g_value_get_enum (value);
      break;
    case PROP_ID:
      break;
    case PROP_CONFERENCE:
      self->priv->conference = FS_MSN_CONFERENCE (g_value_dup_object (value));
      break;
    case PROP_TOS:
      if (conference)
        GST_OBJECT_LOCK (conference);
      self->priv->tos = g_value_get_uint (value);
      if (self->priv->stream)
        fs_msn_stream_set_tos_locked (self->priv->stream, self->priv->tos);
      if (conference)
        GST_OBJECT_UNLOCK (conference);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  if (conference)
    gst_object_unref (conference);
}

static void
fs_msn_session_constructed (GObject *object)
{
  FsMsnSession *self = FS_MSN_SESSION (object);
  GstPad *pad;

  g_assert (self->priv->conference);

  self->valve = gst_element_factory_make ("valve", NULL);

  if (!self->valve)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not make sink valve");
    return;
  }

  if (!gst_bin_add (GST_BIN (self->priv->conference), self->valve))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not add valve to conference");
    return;
  }

  g_object_set (G_OBJECT (self->valve), "drop", TRUE, NULL);

  pad = gst_element_get_static_pad (self->valve, "sink");
  self->priv->media_sink_pad = gst_ghost_pad_new ("sink1", pad);
  gst_object_unref (pad);

  if (!self->priv->media_sink_pad)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not create sink ghost pad");
    return;
  }

  gst_pad_set_active (self->priv->media_sink_pad, TRUE);
  if (!gst_element_add_pad (GST_ELEMENT (self->priv->conference),
          self->priv->media_sink_pad))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not add sink pad to conference");
    gst_object_unref (self->priv->media_sink_pad);
    self->priv->media_sink_pad = NULL;
    return;
  }

  gst_element_sync_state_with_parent (self->valve);

  if (G_OBJECT_CLASS (fs_msn_session_parent_class)->constructed)
    G_OBJECT_CLASS (fs_msn_session_parent_class)->constructed (object);
}


static void
_remove_stream (gpointer user_data,
                GObject *where_the_object_was)
{
  FsMsnSession *self = FS_MSN_SESSION (user_data);
  FsMsnConference *conference = fs_msn_session_get_conference (self, NULL);

  if (!conference)
    return;

  GST_OBJECT_LOCK (conference);
  if (self->priv->stream == (FsMsnStream *) where_the_object_was)
    self->priv->stream = NULL;
  GST_OBJECT_UNLOCK (conference);
  gst_object_unref (conference);
}

/**
 * fs_msn_session_new_stream:
 * @session: an #FsMsnSession
 * @participant: #FsParticipant of a participant for the new stream
 * @direction: #FsStreamDirection describing the direction of the new stream
 * that will be created for this participant
 * @error: location of a #GError, or NULL if no error occured
 *
 * This function creates a stream for the given participant into the active
 * session.
 *
 * Returns: the new #FsStream that has been created. User must unref the
 * #FsStream when the stream is ended. If an error occured, returns NULL.
 */
static FsStream *
fs_msn_session_new_stream (FsSession *session,
                           FsParticipant *participant,
                           FsStreamDirection direction,
                           GError **error)
{
  FsMsnSession *self = FS_MSN_SESSION (session);
  FsMsnParticipant *msnparticipant = NULL;
  FsStream *new_stream = NULL;
  FsMsnConference *conference;

  if (!FS_IS_MSN_PARTICIPANT (participant))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
        "You have to provide a participant of type MSN");
    return NULL;
  }

  conference = fs_msn_session_get_conference (self, error);
  if (!conference)
    return FALSE;

  GST_OBJECT_LOCK (conference);
  if (self->priv->stream)
    goto already_have_stream;
  GST_OBJECT_UNLOCK (conference);

  msnparticipant = FS_MSN_PARTICIPANT (participant);

  new_stream = FS_STREAM_CAST (fs_msn_stream_new (self, msnparticipant,
          direction, conference));

  GST_OBJECT_LOCK (conference);
  if (self->priv->stream)
  {
    g_object_unref (new_stream);
    goto already_have_stream;
  }
  self->priv->stream = (FsMsnStream *) new_stream;
  g_object_weak_ref (G_OBJECT (new_stream), _remove_stream, self);

  fs_msn_stream_set_tos_locked (self->priv->stream, self->priv->tos);
  GST_OBJECT_UNLOCK (conference);

  gst_object_unref (conference);


  return new_stream;

 already_have_stream:
  GST_OBJECT_UNLOCK (conference);
  gst_object_unref (conference);

  g_set_error (error, FS_ERROR, FS_ERROR_ALREADY_EXISTS,
        "There already is a stream in this session");
  return NULL;
}

FsMsnSession *
fs_msn_session_new (FsMediaType media_type,
    FsMsnConference *conference,
    GError **error)
{
  FsMsnSession *session = g_object_new (FS_TYPE_MSN_SESSION,
      "media-type", media_type,
      "conference", conference,
      NULL);

  if (!session)
  {
    *error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not create object");
  }
  else if (session->priv->construction_error)
  {
    g_propagate_error (error, session->priv->construction_error);
    g_object_unref (session);
    return NULL;
  }

  return session;
}


static GType
fs_msn_session_get_stream_transmitter_type (FsSession *session,
    const gchar *transmitter)
{
  return FS_TYPE_MSN_STREAM;
}
farstream-0.2.7/gst/fsmsnconference/Makefile.in0000664000076400007640000007032012462321046016461 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 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@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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@
target_triplet = @target@

# Optionally build a library to allow building the gtk-doc
@ENABLE_GTK_DOC_TRUE@am__append_1 = libfsmsnconference_doc.la
subdir = gst/fsmsnconference
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
	$(top_srcdir)/common/m4/as-auto-alt.m4 \
	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
	$(top_srcdir)/common/m4/as-libtool.m4 \
	$(top_srcdir)/common/m4/as-python.m4 \
	$(top_srcdir)/common/m4/as-scrub-include.m4 \
	$(top_srcdir)/common/m4/as-version.m4 \
	$(top_srcdir)/common/m4/gst-arch.m4 \
	$(top_srcdir)/common/m4/gst-args.m4 \
	$(top_srcdir)/common/m4/gst-check.m4 \
	$(top_srcdir)/common/m4/gst-error.m4 \
	$(top_srcdir)/common/m4/gst-glib2.m4 \
	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
	$(top_srcdir)/common/m4/gst-plugindir.m4 \
	$(top_srcdir)/common/m4/gst.m4 \
	$(top_srcdir)/common/m4/gtk-doc.m4 \
	$(top_srcdir)/common/m4/pkg.m4 \
	$(top_srcdir)/m4/introspection.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
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__uninstall_files_from_dir = { \
  test -z "$$files" \
    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
         $(am__cd) "$$dir" && rm -f $$files; }; \
  }
am__installdirs = "$(DESTDIR)$(plugindir)"
LTLIBRARIES = $(noinst_LTLIBRARIES) $(plugin_LTLIBRARIES)
libfsmsnconference_convenience_la_LIBADD =
am_libfsmsnconference_convenience_la_OBJECTS =  \
	fs-msn-cam-recv-conference.lo fs-msn-cam-send-conference.lo \
	fs-msn-participant.lo fs-msn-session.lo fs-msn-connection.lo \
	fs-msn-stream.lo
libfsmsnconference_convenience_la_OBJECTS =  \
	$(am_libfsmsnconference_convenience_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
am__DEPENDENCIES_1 =
libfsmsnconference_la_DEPENDENCIES =  \
	libfsmsnconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libfsmsnconference_la_OBJECTS = fs-msn-conference.lo
libfsmsnconference_la_OBJECTS = $(am_libfsmsnconference_la_OBJECTS)
libfsmsnconference_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(libfsmsnconference_la_LDFLAGS) \
	$(LDFLAGS) -o $@
am__DEPENDENCIES_2 = libfsmsnconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@ENABLE_GTK_DOC_TRUE@libfsmsnconference_doc_la_DEPENDENCIES =  \
@ENABLE_GTK_DOC_TRUE@	libfsmsnconference-convenience.la \
@ENABLE_GTK_DOC_TRUE@	$(am__DEPENDENCIES_2)
am__objects_1 = fs-msn-conference.lo
@ENABLE_GTK_DOC_TRUE@nodist_libfsmsnconference_doc_la_OBJECTS =  \
@ENABLE_GTK_DOC_TRUE@	$(am__objects_1)
libfsmsnconference_doc_la_OBJECTS =  \
	$(nodist_libfsmsnconference_doc_la_OBJECTS)
@ENABLE_GTK_DOC_TRUE@am_libfsmsnconference_doc_la_rpath =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(libfsmsnconference_convenience_la_SOURCES) \
	$(libfsmsnconference_la_SOURCES) \
	$(nodist_libfsmsnconference_doc_la_SOURCES)
DIST_SOURCES = $(libfsmsnconference_convenience_la_SOURCES) \
	$(libfsmsnconference_la_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ERROR_CFLAGS = @ERROR_CFLAGS@
EXEEXT = @EXEEXT@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FS_AGE = @FS_AGE@
FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@
FS_APIVERSION = @FS_APIVERSION@
FS_API_VERSION = @FS_API_VERSION@
FS_CFLAGS = @FS_CFLAGS@
FS_CURRENT = @FS_CURRENT@
FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@
FS_LIBS = @FS_LIBS@
FS_LIBVERSION = @FS_LIBVERSION@
FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@
FS_LICENSE = @FS_LICENSE@
FS_LT_LDFLAGS = @FS_LT_LDFLAGS@
FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@
FS_PLUGINS_ALL = @FS_PLUGINS_ALL@
FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@
FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@
FS_PLUGIN_PATH = @FS_PLUGIN_PATH@
FS_PREFIX = @FS_PREFIX@
FS_REVISION = @FS_REVISION@
FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@
FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@
GCOV = @GCOV@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LDFLAGS = @GIO_LDFLAGS@
GIO_LIBS = @GIO_LIBS@
GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_PREFIX = @GLIB_PREFIX@
GLIB_REQ = @GLIB_REQ@
GREP = @GREP@
GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
GST_API_VERSION = @GST_API_VERSION@
GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
GST_BASE_LIBS = @GST_BASE_LIBS@
GST_CFLAGS = @GST_CFLAGS@
GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
GST_CHECK_LIBS = @GST_CHECK_LIBS@
GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@
GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
GST_LIBS = @GST_LIBS@
GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
GST_TOOLS_DIR = @GST_TOOLS_DIR@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GUPNP_CFLAGS = @GUPNP_CFLAGS@
GUPNP_LIBS = @GUPNP_LIBS@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NICE_CFLAGS = @NICE_CFLAGS@
NICE_LIBS = @NICE_LIBS@
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@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VALGRIND_PATH = @VALGRIND_PATH@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
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@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
plugin_LTLIBRARIES = libfsmsnconference.la

# First build a convenience lib with the common stuff so its not built twice
noinst_LTLIBRARIES = libfsmsnconference-convenience.la $(am__append_1)
libfsmsnconference_convenience_la_SOURCES = \
	fs-msn-cam-recv-conference.c \
	fs-msn-cam-send-conference.c \
	fs-msn-participant.c \
	fs-msn-session.c \
	fs-msn-connection.c \
	fs-msn-stream.c 

noinst_HEADERS = \
	fs-msn-cam-recv-conference.h \
	fs-msn-cam-send-conference.h \
	fs-msn-conference.h \
	fs-msn-participant.h \
	fs-msn-session.h \
	fs-msn-connection.h  \
	fs-msn-stream.h 

AM_CFLAGS = \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_CFLAGS) \
	$(NICE_CFLAGS) 


# Build the main plugin
libfsmsnconference_la_SOURCES = \
	fs-msn-conference.c

libfsmsnconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libfsmsnconference_la_LIBADD = \
	libfsmsnconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(FS_LIBS) \
	$(GST_BASE_LIBS) \
	$(GST_LIBS) \
	$(NICE_LIBS)

@ENABLE_GTK_DOC_TRUE@nodist_libfsmsnconference_doc_la_CFLAGS = -DBUILD_GTK_DOC
@ENABLE_GTK_DOC_TRUE@nodist_libfsmsnconference_doc_la_SOURCES = $(libfsmsnconference_la_SOURCES)
@ENABLE_GTK_DOC_TRUE@libfsmsnconference_doc_la_LIBADD = libfsmsnconference-convenience.la \
@ENABLE_GTK_DOC_TRUE@	$(libfsmsnconference_la_LIBADD)

@ENABLE_GTK_DOC_TRUE@CLEANFILES = $(BUILT_SOURCES)
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(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 gst/fsmsnconference/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu gst/fsmsnconference/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):

clean-noinstLTLIBRARIES:
	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
	@list='$(noinst_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
	@$(NORMAL_INSTALL)
	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
	list2=; for p in $$list; do \
	  if test -f $$p; then \
	    list2="$$list2 $$p"; \
	  else :; fi; \
	done; \
	test -z "$$list2" || { \
	  echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \
	  $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \
	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \
	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \
	}

uninstall-pluginLTLIBRARIES:
	@$(NORMAL_UNINSTALL)
	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
	for p in $$list; do \
	  $(am__strip_dir) \
	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \
	done

clean-pluginLTLIBRARIES:
	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
	@list='$(plugin_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

libfsmsnconference-convenience.la: $(libfsmsnconference_convenience_la_OBJECTS) $(libfsmsnconference_convenience_la_DEPENDENCIES) $(EXTRA_libfsmsnconference_convenience_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK)  $(libfsmsnconference_convenience_la_OBJECTS) $(libfsmsnconference_convenience_la_LIBADD) $(LIBS)

libfsmsnconference.la: $(libfsmsnconference_la_OBJECTS) $(libfsmsnconference_la_DEPENDENCIES) $(EXTRA_libfsmsnconference_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(libfsmsnconference_la_LINK) -rpath $(plugindir) $(libfsmsnconference_la_OBJECTS) $(libfsmsnconference_la_LIBADD) $(LIBS)

libfsmsnconference_doc.la: $(libfsmsnconference_doc_la_OBJECTS) $(libfsmsnconference_doc_la_DEPENDENCIES) $(EXTRA_libfsmsnconference_doc_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK) $(am_libfsmsnconference_doc_la_rpath) $(libfsmsnconference_doc_la_OBJECTS) $(libfsmsnconference_doc_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-msn-cam-recv-conference.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-msn-cam-send-conference.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-msn-conference.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-msn-connection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-msn-participant.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-msn-session.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-msn-stream.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	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-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	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"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

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)$(plugindir)"; 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:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
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-generic clean-libtool clean-noinstLTLIBRARIES \
	clean-pluginLTLIBRARIES 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-pluginLTLIBRARIES

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-pluginLTLIBRARIES

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-noinstLTLIBRARIES clean-pluginLTLIBRARIES \
	cscopelist-am ctags ctags-am 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-html install-html-am \
	install-info install-info-am install-man install-pdf \
	install-pdf-am install-pluginLTLIBRARIES 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 tags-am uninstall \
	uninstall-am uninstall-pluginLTLIBRARIES


# 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:
farstream-0.2.7/gst/fsmsnconference/Makefile.am0000664000076400007640000000262412401500475016450 00000000000000plugin_LTLIBRARIES = libfsmsnconference.la


# First build a convenience lib with the common stuff so its not built twice

noinst_LTLIBRARIES = libfsmsnconference-convenience.la

libfsmsnconference_convenience_la_SOURCES = \
	fs-msn-cam-recv-conference.c \
	fs-msn-cam-send-conference.c \
	fs-msn-participant.c \
	fs-msn-session.c \
	fs-msn-connection.c \
	fs-msn-stream.c 

noinst_HEADERS = \
	fs-msn-cam-recv-conference.h \
	fs-msn-cam-send-conference.h \
	fs-msn-conference.h \
	fs-msn-participant.h \
	fs-msn-session.h \
	fs-msn-connection.h  \
	fs-msn-stream.h 


AM_CFLAGS = \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_CFLAGS) \
	$(NICE_CFLAGS) 

# Build the main plugin

libfsmsnconference_la_SOURCES = \
	fs-msn-conference.c

libfsmsnconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libfsmsnconference_la_LIBADD = \
	libfsmsnconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(FS_LIBS) \
	$(GST_BASE_LIBS) \
	$(GST_LIBS) \
	$(NICE_LIBS)



# Optionally build a library to allow building the gtk-doc

if ENABLE_GTK_DOC
noinst_LTLIBRARIES += libfsmsnconference_doc.la

nodist_libfsmsnconference_doc_la_CFLAGS = -DBUILD_GTK_DOC

nodist_libfsmsnconference_doc_la_SOURCES = $(libfsmsnconference_la_SOURCES)


libfsmsnconference_doc_la_LIBADD = libfsmsnconference-convenience.la \
	$(libfsmsnconference_la_LIBADD)

CLEANFILES = $(BUILT_SOURCES)

endif

farstream-0.2.7/gst/fsmsnconference/fs-msn-cam-send-conference.h0000664000076400007640000000470111710041461021555 00000000000000/*
 * Farstream - Farstream MSN Conference Implementation
 *
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *
 * fs-msn-send-conference.h - MSN implementation for Farstream Conference
 * Gstreamer Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_MSN_CAM_SEND_CONFERENCE_H__
#define __FS_MSN_CAM_SEND_CONFERENCE_H__

#include "fs-msn-conference.h"

G_BEGIN_DECLS

#define FS_TYPE_MSN_CAM_SEND_CONFERENCE (fs_msn_cam_send_conference_get_type ())
#define FS_MSN_CAM_SEND_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_MSN_CAM_SEND_CONFERENCE, \
      FsMsnCamSendConference))
#define FS_MSN_CAM_SEND_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_MSN_CAM_SEND_CONFERENCE, \
      FsMsnCamSendConferenceClass))
#define FS_MSN_CAM_SEND_CONFERENCE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS((obj), FS_TYPE_MSN_CAM_SEND_CONFERENCE, \
      FsMsnCamSendConferenceClass))
#define FS_IS_MSN_CAM_SEND_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_MSN_CAM_SEND_CONFERENCE))
#define FS_IS_MSN_CAM_SEND_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_MSN_CAM_SEND_CONFERENCE))
#define FS_MSN_CAM_SEND_CONFERENCE_CAST(obj) \
  ((FsMsnCamSendConference *)(obj))

typedef struct _FsMsnCamSendConference FsMsnCamSendConference;
typedef struct _FsMsnCamSendConferenceClass FsMsnCamSendConferenceClass;
typedef struct _FsMsnCamSendConferencePrivate FsMsnCamSendConferencePrivate;

struct _FsMsnCamSendConference
{
  FsMsnConference parent;
};

struct _FsMsnCamSendConferenceClass
{
  FsMsnConferenceClass parent_class;
};

GType fs_msn_cam_send_conference_get_type (void);


G_END_DECLS

#endif /* __FS_MSN_CAM_SEND_CONFERENCE_H__ */
farstream-0.2.7/gst/fsmsnconference/fs-msn-cam-recv-conference.h0000664000076400007640000000470111710041461021563 00000000000000/*
 * Farstream - Farstream MSN Conference Implementation
 *
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *
 * fs-msn-recv-conference.h - MSN implementation for Farstream Conference
 * Gstreamer Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_MSN_CAM_RECV_CONFERENCE_H__
#define __FS_MSN_CAM_RECV_CONFERENCE_H__

#include "fs-msn-conference.h"

G_BEGIN_DECLS

#define FS_TYPE_MSN_CAM_RECV_CONFERENCE (fs_msn_cam_recv_conference_get_type ())
#define FS_MSN_CAM_RECV_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_MSN_CAM_RECV_CONFERENCE, \
      FsMsnCamRecvConference))
#define FS_MSN_CAM_RECV_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_MSN_CAM_RECV_CONFERENCE, \
      FsMsnCamRecvConferenceClass))
#define FS_MSN_CAM_RECV_CONFERENCE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS((obj), FS_TYPE_MSN_CAM_RECV_CONFERENCE, \
      FsMsnCamRecvConferenceClass))
#define FS_IS_MSN_CAM_RECV_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_MSN_CAM_RECV_CONFERENCE))
#define FS_IS_MSN_CAM_RECV_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_MSN_CAM_RECV_CONFERENCE))
#define FS_MSN_CAM_RECV_CONFERENCE_CAST(obj) \
  ((FsMsnCamRecvConference *)(obj))

typedef struct _FsMsnCamRecvConference FsMsnCamRecvConference;
typedef struct _FsMsnCamRecvConferenceClass FsMsnCamRecvConferenceClass;
typedef struct _FsMsnCamRecvConferencePrivate FsMsnCamRecvConferencePrivate;

struct _FsMsnCamRecvConference
{
  FsMsnConference parent;
};

struct _FsMsnCamRecvConferenceClass
{
  FsMsnConferenceClass parent_class;
};

GType fs_msn_cam_recv_conference_get_type (void);


G_END_DECLS

#endif /* __FS_MSN_CAM_RECV_CONFERENCE_H__ */
farstream-0.2.7/gst/fsmsnconference/fs-msn-conference.c0000664000076400007640000001765112401500475020076 00000000000000/*
 * Farstream - Farstream MSN Conference Implementation
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *
 * fs-msn-conference.c - MSN implementation for Farstream Conference Gstreamer
 *                       Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-msn-conference
 * @short_description: Farstream MSN Conference Gstreamer Elements Base class
 *
 * This element implements the unidirection webcam feature found in various
 * version of MSN Messenger (tm) and Windows Live Messenger (tm).
 */


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include 

#include "fs-msn-conference.h"

#include "fs-msn-session.h"
#include "fs-msn-stream.h"
#include "fs-msn-participant.h"

#include "fs-msn-cam-send-conference.h"
#include "fs-msn-cam-recv-conference.h"

GST_DEBUG_CATEGORY (fsmsnconference_debug);
#define GST_CAT_DEFAULT fsmsnconference_debug

/* Signals */
enum
{
  LAST_SIGNAL
};

/* Properties */
enum
{
  PROP_0
};


static GstStaticPadTemplate fs_msn_conference_sink_template =
  GST_STATIC_PAD_TEMPLATE ("sink_%d",
      GST_PAD_SINK,
      GST_PAD_SOMETIMES,
      GST_STATIC_CAPS_ANY);

static GstStaticPadTemplate fs_msn_conference_src_template =
  GST_STATIC_PAD_TEMPLATE ("src_%d_%d_%d",
      GST_PAD_SRC,
      GST_PAD_SOMETIMES,
      GST_STATIC_CAPS_ANY);

#define FS_MSN_CONFERENCE_GET_PRIVATE(obj) \
  (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FS_TYPE_MSN_CONFERENCE,  \
      FsMsnConferencePrivate))

struct _FsMsnConferencePrivate
{
  gboolean disposed;
  /* Protected by GST_OBJECT_LOCK */
  FsMsnParticipant *participant;
  FsMsnSession *session;
};

G_DEFINE_ABSTRACT_TYPE (FsMsnConference, fs_msn_conference,
    FS_TYPE_CONFERENCE);

static FsSession *fs_msn_conference_new_session (FsConference *conf,
    FsMediaType media_type,
    GError **error);

static FsParticipant *fs_msn_conference_new_participant (FsConference *conf,
    GError **error);

static void _remove_session (gpointer user_data,
    GObject *where_the_object_was);
static void _remove_participant (gpointer user_data,
    GObject *where_the_object_was);

static void
fs_msn_conference_dispose (GObject * object)
{
  FsMsnConference *self = FS_MSN_CONFERENCE (object);

  if (self->priv->disposed)
    return;

  GST_OBJECT_LOCK (object);
  if (self->priv->session)
    g_object_weak_unref (G_OBJECT (self->priv->session), _remove_session, self);
  self->priv->session = NULL;

  if (self->priv->participant)
    g_object_weak_unref (G_OBJECT (self->priv->participant),
        _remove_participant, self);
  self->priv->participant = NULL;
  GST_OBJECT_UNLOCK (object);

  self->priv->disposed = TRUE;

  g_clear_error (&self->missing_element_error);

  G_OBJECT_CLASS (fs_msn_conference_parent_class)->dispose (object);
}

static void
fs_msn_conference_class_init (FsMsnConferenceClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
  FsConferenceClass *baseconf_class = FS_CONFERENCE_CLASS (klass);

  g_type_class_add_private (klass, sizeof (FsMsnConferencePrivate));

  GST_DEBUG_CATEGORY_INIT (fsmsnconference_debug, "fsmsnconference", 0,
                           "Farstream MSN Conference Element");

  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_msn_conference_sink_template));
  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_msn_conference_src_template));

  baseconf_class->new_session =
    GST_DEBUG_FUNCPTR (fs_msn_conference_new_session);
  baseconf_class->new_participant =
    GST_DEBUG_FUNCPTR (fs_msn_conference_new_participant);

  gobject_class->dispose = GST_DEBUG_FUNCPTR (fs_msn_conference_dispose);
}


static void
fs_msn_conference_init (FsMsnConference *conf)
{
  GST_DEBUG_OBJECT (conf, "fs_msn_conference_init");

  conf->priv = FS_MSN_CONFERENCE_GET_PRIVATE (conf);
}

static void
_remove_session (gpointer user_data,
                 GObject *where_the_object_was)
{
  FsMsnConference *self = FS_MSN_CONFERENCE (user_data);

  GST_OBJECT_LOCK (self);
  if (self->priv->session == (FsMsnSession *) where_the_object_was)
    self->priv->session = NULL;
  GST_OBJECT_UNLOCK (self);
}

static void
_remove_participant (gpointer user_data,
                     GObject *where_the_object_was)
{
  FsMsnConference *self = FS_MSN_CONFERENCE (user_data);

  GST_OBJECT_LOCK (self);
  if (self->priv->participant == (FsMsnParticipant *) where_the_object_was)
    self->priv->participant = NULL;
  GST_OBJECT_UNLOCK (self);
}


static FsSession *
fs_msn_conference_new_session (FsConference *conf,
                               FsMediaType media_type,
                               GError **error)
{
  FsMsnConference *self = FS_MSN_CONFERENCE (conf);
  FsMsnSession *new_session = NULL;

  if (self->missing_element_error)
  {
    if (error)
      *error = g_error_copy (self->missing_element_error);
    return NULL;
  }

  if (media_type != FS_MEDIA_TYPE_VIDEO)
  {
    g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
        "Only video supported for msn webcam");
    return NULL;
  }

  GST_OBJECT_LOCK (self);
  if (self->priv->session)
  {
    GST_OBJECT_UNLOCK (self);
    g_set_error (error, FS_ERROR, FS_ERROR_ALREADY_EXISTS,
        "There already is a session");
    return NULL;
  }

  GST_OBJECT_UNLOCK (self);

  new_session = fs_msn_session_new (media_type, self, error);

  if (new_session)
  {
    GST_OBJECT_LOCK (self);
    self->priv->session = new_session;
    g_object_weak_ref (G_OBJECT (new_session), _remove_session, self);
    GST_OBJECT_UNLOCK (self);
  }

  return FS_SESSION (new_session);
}


static FsParticipant *
fs_msn_conference_new_participant (FsConference *conf,
                                   GError **error)
{
  FsMsnConference *self = FS_MSN_CONFERENCE (conf);
  FsMsnParticipant *new_participant = NULL;

  if (self->missing_element_error)
  {
    if (error)
      *error = g_error_copy (self->missing_element_error);
    return NULL;
  }

  GST_OBJECT_LOCK (self);
  if (self->priv->participant)
  {
    GST_OBJECT_UNLOCK (self);
    g_set_error (error, FS_ERROR, FS_ERROR_ALREADY_EXISTS,
        "There already is a participant");
    return NULL;
  }

  GST_OBJECT_UNLOCK (self);

  new_participant = fs_msn_participant_new ();

  if (new_participant)
  {
    GST_OBJECT_LOCK (self);
    self->priv->participant = new_participant;
    g_object_weak_ref (G_OBJECT (new_participant), _remove_participant, self);
    GST_OBJECT_UNLOCK (self);
  }

  return FS_PARTICIPANT (new_participant);

}


static gboolean plugin_init (GstPlugin * plugin)
{
  return gst_element_register (plugin, "fsmsncamsendconference",
      GST_RANK_NONE, FS_TYPE_MSN_CAM_SEND_CONFERENCE) &&
    gst_element_register (plugin, "fsmsncamrecvconference",
        GST_RANK_NONE, FS_TYPE_MSN_CAM_RECV_CONFERENCE);
}



#ifdef BUILD_GTK_DOC
void
fs_msn_plugin_init_real (void)
{
  gst_plugin_register_static (
#else
GST_PLUGIN_DEFINE (
#endif
  GST_VERSION_MAJOR,
  GST_VERSION_MINOR,
  fsmsnconference,
  "Farstream MSN Conference plugin",
  plugin_init,
  VERSION,
  "LGPL",
  "Farstream",
  "http://www.freedesktop.org/wiki/Software/Farstream"
#ifdef BUILD_GTK_DOC
  );
}
#else
)
#endif

farstream-0.2.7/gst/fsmsnconference/fs-msn-stream.c0000664000076400007640000006212112401500475017252 00000000000000/*
 * Farstream - Farstream MSN Stream
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Youness Alaoui 
 *
 * fs-msn-stream.c - A Farstream MSN Stream gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-msn-stream
 * @short_description: A MSN stream in a #FsMsnSession in a #FsMsnConference
 *
 * The #FsMsnStream::direction property can be used to pause the stream, but not
 * to change the direction between sending and receiving since this protocol
 * is unidirectional.
 *
 * The "foundation" field of the local #FsCandidate contains the "recipient-id"
 * that must be transmitted to the peer.
 *
 * The session id can either be retrieved as a property, but it is also
 * put into every #FsCandidate in the "username" field.
 *
 * If the peer started the webcam session, it picks the session-id, it can then
 * be set either in the transmitter parameters field of fs_session_new_stream()
 * or by putting it in the "username" field of the remote #FsCandidate.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-msn-stream.h"

#include 
#include 
#include 
#include 
#include 
#include 

#include 

#include 


#include "fs-msn-connection.h"


#define GST_CAT_DEFAULT fsmsnconference_debug

/* Signals */
enum
{
  LAST_SIGNAL
};

/* props */
enum
{
  PROP_0,
  PROP_DIRECTION,
  PROP_PARTICIPANT,
  PROP_SESSION,
  PROP_CONFERENCE,
  PROP_SESSION_ID,
  PROP_INITIAL_PORT
};



struct _FsMsnStreamPrivate
{
  FsMsnConference *conference;
  FsMsnSession *session;
  FsMsnParticipant *participant;
  FsStreamDirection direction;
  GstElement *codecbin;
  GstElement *recv_valve;
  GstPad *src_pad;
  FsMsnConnection *connection;

  guint session_id;
  guint initial_port;

  gint fd;
  gint tos;

  GMutex mutex; /* protects the conference */
};


G_DEFINE_TYPE(FsMsnStream, fs_msn_stream, FS_TYPE_STREAM);

#define FS_MSN_STREAM_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_MSN_STREAM, FsMsnStreamPrivate))

static void fs_msn_stream_dispose (GObject *object);
static void fs_msn_stream_finalize (GObject *object);

static void fs_msn_stream_get_property (GObject *object,
                                        guint prop_id,
                                        GValue *value,
                                        GParamSpec *pspec);
static void fs_msn_stream_set_property (GObject *object,
                                        guint prop_id,
                                        const GValue *value,
                                        GParamSpec *pspec);

static gboolean
fs_msn_stream_set_transmitter (FsStream *stream,
    const gchar *transmitter,
    GParameter *stream_transmitter_parameters,
    guint stream_transmitter_n_parameters,
    GError **error);

static gboolean fs_msn_stream_add_remote_candidates (FsStream *stream,
    GList *candidates,
    GError **error);

static void _local_candidates_prepared (FsMsnConnection *connection,
    gpointer user_data);

static void _new_local_candidate (
    FsMsnConnection *connection,
    FsCandidate *candidate,
    gpointer user_data);

static void
_connected (
    FsMsnConnection *connection,
    guint fd,
    gpointer user_data);

static void
_connection_failed (FsMsnConnection *connection, FsMsnStream *self);


static void
fs_msn_stream_class_init (FsMsnStreamClass *klass)
{
  GObjectClass *gobject_class;
  FsStreamClass *stream_class = FS_STREAM_CLASS (klass);

  gobject_class = (GObjectClass *) klass;

  gobject_class->set_property = fs_msn_stream_set_property;
  gobject_class->get_property = fs_msn_stream_get_property;
  gobject_class->dispose = fs_msn_stream_dispose;
  gobject_class->finalize = fs_msn_stream_finalize;

  stream_class->add_remote_candidates = fs_msn_stream_add_remote_candidates;
  stream_class->set_transmitter = fs_msn_stream_set_transmitter;

  g_type_class_add_private (klass, sizeof (FsMsnStreamPrivate));

  g_object_class_override_property (gobject_class,
      PROP_DIRECTION,
      "direction");
  g_object_class_override_property (gobject_class,
      PROP_PARTICIPANT,
      "participant");
  g_object_class_override_property (gobject_class,
      PROP_SESSION,
      "session");

  g_object_class_install_property (gobject_class,
      PROP_CONFERENCE,
      g_param_spec_object ("conference",
          "The Conference this stream refers to",
          "This is a conveniance pointer for the Conference",
          FS_TYPE_MSN_CONFERENCE,
          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_class,
      PROP_SESSION_ID,
      g_param_spec_uint ("session-id",
          "The session-id of the session",
          "This is the session-id of the MSN session",
          0, 9999, 0,
          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  g_object_class_install_property (gobject_class,
      PROP_INITIAL_PORT,
      g_param_spec_uint ("initial-port",
          "The initial port to listen on",
          "The initial port to try to listen on for incoming connection."
          " If already used, port+1 is tried until one succeeds",
          1025, 65535, 1025,
          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

static void
fs_msn_stream_init (FsMsnStream *self)
{
  /* member init */
  self->priv = FS_MSN_STREAM_GET_PRIVATE (self);

  self->priv->session = NULL;
  self->priv->participant = NULL;
  self->priv->fd = -1;

  self->priv->direction = FS_DIRECTION_NONE;

  g_mutex_init (&self->priv->mutex);
}


static FsMsnConference *
fs_msn_stream_get_conference (FsMsnStream *self, GError **error)
{
  FsMsnConference *conference;

  g_mutex_lock (&self->priv->mutex);
  conference = self->priv->conference;
  if (conference)
    g_object_ref (conference);
  g_mutex_unlock (&self->priv->mutex);

  if (!conference)
    g_set_error (error, FS_ERROR, FS_ERROR_DISPOSED,
        "Called function after stream has been disposed");

  return conference;
}

static void
fs_msn_stream_dispose (GObject *object)
{
  FsMsnStream *self = FS_MSN_STREAM (object);
  FsMsnConference *conference = fs_msn_stream_get_conference (self, NULL);

  if (!conference)
    return;

  g_mutex_lock (&self->priv->mutex);
  self->priv->conference = NULL;
  g_mutex_unlock (&self->priv->mutex);

  if (self->priv->src_pad)
  {
    gst_pad_set_active (self->priv->src_pad, FALSE);
    gst_element_remove_pad (GST_ELEMENT (conference), self->priv->src_pad);
    self->priv->src_pad = NULL;
  }

  if (self->priv->recv_valve)
  {
    gst_object_unref (self->priv->recv_valve);
    self->priv->recv_valve = NULL;
  }

  if (self->priv->codecbin)
  {
    gst_element_set_locked_state (self->priv->codecbin, TRUE);
    gst_element_set_state (self->priv->codecbin, GST_STATE_NULL);
    gst_bin_remove (GST_BIN (conference), self->priv->codecbin);
    self->priv->codecbin = NULL;
  }

  if (self->priv->participant)
  {
    g_object_unref (self->priv->participant);
    self->priv->participant = NULL;
  }

  if (self->priv->session)
  {
    g_object_unref (self->priv->session);
    self->priv->session = NULL;
  }

  if (self->priv->connection)
  {
    g_object_unref (self->priv->connection);
    self->priv->connection = NULL;
  }

  gst_object_unref (conference);
  gst_object_unref (conference);

  G_OBJECT_CLASS (fs_msn_stream_parent_class)->dispose (object);
}

static void
fs_msn_stream_finalize (GObject *object)
{
  FsMsnStream *self = FS_MSN_STREAM (object);

  g_mutex_clear (&self->priv->mutex);

  G_OBJECT_CLASS (fs_msn_stream_parent_class)->finalize (object);
}


static void
fs_msn_stream_get_property (GObject *object,
                            guint prop_id,
                            GValue *value,
                            GParamSpec *pspec)
{
  FsMsnStream *self = FS_MSN_STREAM (object);
  FsMsnConference *conference = fs_msn_stream_get_conference (self, NULL);

  if (!conference &&
      !(pspec->flags & (G_PARAM_CONSTRUCT_ONLY | G_PARAM_CONSTRUCT)))
    return;

  if (conference)
    GST_OBJECT_LOCK (conference);

  switch (prop_id)
  {
    case PROP_SESSION:
      g_value_set_object (value, self->priv->session);
      break;
    case PROP_PARTICIPANT:
      g_value_set_object (value, self->priv->participant);
      break;
    case PROP_DIRECTION:
      g_value_set_flags (value, self->priv->direction);
      break;
    case PROP_CONFERENCE:
      g_value_set_object (value, self->priv->conference);
      break;
    case PROP_SESSION_ID:
      g_object_get_property (G_OBJECT (self->priv->connection), "session-id",
          value);
      break;
    case PROP_INITIAL_PORT:
      g_value_set_uint (value, self->priv->initial_port);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  if (conference)
  {
    GST_OBJECT_UNLOCK (conference);
    gst_object_unref (conference);
  }
}

static void
fs_msn_stream_set_property (GObject *object,
                            guint prop_id,
                            const GValue *value,
                            GParamSpec *pspec)
{
  FsMsnStream *self = FS_MSN_STREAM (object);
  FsMsnConference *conference = fs_msn_stream_get_conference (self, NULL);

  if (!conference &&
      !(pspec->flags & (G_PARAM_CONSTRUCT_ONLY | G_PARAM_CONSTRUCT)))
    return;

  if (conference)
    GST_OBJECT_LOCK (conference);

  switch (prop_id)
  {
    case PROP_SESSION:
      self->priv->session = FS_MSN_SESSION (g_value_dup_object (value));
      break;
    case PROP_PARTICIPANT:
      self->priv->participant = FS_MSN_PARTICIPANT (g_value_dup_object (value));
      break;
    case PROP_DIRECTION:
      if (g_value_get_flags (value) != self->priv->direction)
      {
        GstElement *recv_valve = NULL;
        GstElement *session_valve = NULL;

        if (!conference ||
            !self->priv->recv_valve ||
            !self->priv->session)
        {
          self->priv->direction = g_value_get_flags (value);
          break;
        }

        if (self->priv->recv_valve)
          recv_valve = gst_object_ref (self->priv->recv_valve);
        if (self->priv->session->valve)
          session_valve = gst_object_ref (self->priv->session->valve);

        self->priv->direction =
          g_value_get_flags (value) & conference->max_direction;

        if (self->priv->direction == FS_DIRECTION_NONE)
        {
          GST_OBJECT_UNLOCK (conference);
          if (recv_valve)
            g_object_set (recv_valve, "drop", TRUE, NULL);
          g_object_set (session_valve, "drop", TRUE, NULL);
          GST_OBJECT_LOCK (conference);
        }
        else if (self->priv->direction == FS_DIRECTION_SEND)
        {
          if (self->priv->codecbin)
          {
            GST_OBJECT_UNLOCK (conference);
            g_object_set (session_valve, "drop", FALSE, NULL);
            GST_OBJECT_LOCK (conference);
          }
        }
        else if (self->priv->direction == FS_DIRECTION_RECV)
        {
          GST_OBJECT_UNLOCK (conference);
          if (recv_valve)
            g_object_set (recv_valve, "drop", FALSE, NULL);
          GST_OBJECT_LOCK (conference);
        }

        if (session_valve)
          gst_object_unref (session_valve);
        if (recv_valve)
          gst_object_unref (recv_valve);
      }
      self->priv->direction = g_value_get_flags (value);
      break;
    case PROP_CONFERENCE:
      self->priv->conference = FS_MSN_CONFERENCE (g_value_dup_object (value));
      break;
    case PROP_SESSION_ID:
      self->priv->session_id = g_value_get_uint (value);
      if (self->priv->session_id == 0)
        self->priv->session_id = g_random_int_range (9000, 9999);
      break;
    case PROP_INITIAL_PORT:
      self->priv->initial_port = g_value_get_uint (value);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  if (conference)
  {
    GST_OBJECT_UNLOCK (conference);
    gst_object_unref (conference);
  }
}

static void
_local_candidates_prepared (FsMsnConnection *connection,
    gpointer user_data)
{
  FsMsnStream *self = FS_MSN_STREAM (user_data);
  FsMsnConference *conference = fs_msn_stream_get_conference (self, NULL);

  if (!conference)
    return;

  gst_element_post_message (GST_ELEMENT (conference),
      gst_message_new_element (GST_OBJECT (conference),
          gst_structure_new ("farstream-local-candidates-prepared",
              "stream", FS_TYPE_STREAM, self,
              NULL)));

  gst_object_unref (conference);
}

static void
_new_local_candidate (
    FsMsnConnection *connection,
    FsCandidate *candidate,
    gpointer user_data)
{
  FsMsnStream *self = FS_MSN_STREAM (user_data);
  FsMsnConference *conference = fs_msn_stream_get_conference (self, NULL);

  if (!conference)
    return;

  gst_element_post_message (GST_ELEMENT (conference),
      gst_message_new_element (GST_OBJECT (conference),
          gst_structure_new ("farstream-new-local-candidate",
              "stream", FS_TYPE_STREAM, self,
              "candidate", FS_TYPE_CANDIDATE, candidate,
              NULL)));

  gst_object_unref (conference);
}

static void
_connected (
    FsMsnConnection *connection,
    guint fd,
    gpointer user_data)
{
  FsMsnStream *self = FS_MSN_STREAM (user_data);
  GError *error = NULL;
  GstPad *pad;
  GstElement *fdelem;
  int checkfd;
  FsMsnConference *conference = fs_msn_stream_get_conference (self, NULL);
  GstElement *codecbin = NULL;
  GstElement *recv_valve = NULL;
  GstElement *send_valve = NULL;
  gboolean drop;

  if (!conference)
    goto error;

  GST_DEBUG ("******** CONNECTED %d**********", fd);

  gst_element_post_message (GST_ELEMENT (conference),
      gst_message_new_element (GST_OBJECT (conference),
          gst_structure_new ("farstream-component-state-changed",
              "stream", FS_TYPE_STREAM, self,
              "component", G_TYPE_UINT, 1,
              "state", FS_TYPE_STREAM_STATE, FS_STREAM_STATE_READY,
              NULL)));

  if (self->priv->conference->max_direction == FS_DIRECTION_RECV)
    codecbin = gst_parse_bin_from_description (
        "fdsrc name=fdsrc do-timestamp=true ! mimdec ! valve name=recv_valve", TRUE, &error);
  else
    codecbin = gst_parse_bin_from_description (
        "videoconvert ! videoscale ! mimenc name=enc !"
        " fdsink name=fdsink sync=false async=false",
        TRUE, &error);

  if (!codecbin)
  {
    g_prefix_error (&error, "Error creating codecbin: ");
    fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
        error->message);
    g_clear_error (&error);
    goto error;
  }

  /* So we don't require an unlreased gst-plugins-bad mimenc */
  if (self->priv->conference->max_direction == FS_DIRECTION_SEND)
  {
    GstElement *mimenc = gst_bin_get_by_name (GST_BIN (codecbin), "enc");
    if (g_object_class_find_property (
            G_OBJECT_GET_CLASS (mimenc), "paused-mode"))
      g_object_set (mimenc, "paused-mode", TRUE, NULL);
    gst_object_unref (mimenc);
  }

  if (self->priv->conference->max_direction == FS_DIRECTION_RECV)
  {
    fdelem = gst_bin_get_by_name (GST_BIN (codecbin), "fdsrc");
    gst_base_src_set_format (GST_BASE_SRC (fdelem), GST_FORMAT_TIME);
  }
  else
  {
    fdelem = gst_bin_get_by_name (GST_BIN (codecbin), "fdsink");
  }

  if (!fdelem)
  {
    fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
        "Could not get fd element");
    goto error;
  }

  g_object_set (fdelem, "fd", fd, NULL);
  g_object_get (fdelem, "fd", &checkfd, NULL);
  gst_object_unref (fdelem);

  if (fd != checkfd)
  {
    fs_stream_emit_error (FS_STREAM (self), FS_ERROR_INTERNAL,
        "Could not set file descriptor");
    goto error;
  }


  if (self->priv->conference->max_direction == FS_DIRECTION_RECV)
    pad = gst_element_get_static_pad (codecbin, "src");
  else
    pad = gst_element_get_static_pad (codecbin, "sink");

  if (!pad)
  {
    fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
        "Could not get codecbin pad");
    goto error;
  }

  if (!gst_bin_add (GST_BIN (conference), codecbin))
  {
    gst_object_unref (pad);
    fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
        "Could not add codecbin to the conference");
    goto error;
  }

  GST_OBJECT_LOCK (conference);
  self->priv->fd = fd;
  self->priv->codecbin = gst_object_ref (codecbin);
  GST_OBJECT_UNLOCK (conference);

  if (self->priv->conference->max_direction == FS_DIRECTION_RECV)
  {
    FsCodec *mimic_codec;
    GstPad *src_pad;

    src_pad = gst_ghost_pad_new ("src_1_1_1", pad);
    gst_object_unref (pad);

    GST_OBJECT_LOCK (conference);
    self->priv->src_pad =  gst_object_ref (src_pad);
    GST_OBJECT_UNLOCK (conference);

    gst_pad_set_active (src_pad, TRUE);
    if (!gst_element_add_pad (GST_ELEMENT (conference), src_pad))
    {
      fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
          "Could not add src_1_1_1 pad");
      gst_object_unref (src_pad);
      goto error;
    }

    recv_valve = gst_bin_get_by_name (GST_BIN (codecbin), "recv_valve");

    if (!recv_valve)
    {
       fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
           "Could not get recv_valve");
       gst_object_unref (src_pad);
       goto error;
    }

    GST_OBJECT_LOCK (conference);
    self->priv->recv_valve = gst_object_ref (recv_valve);
    drop = !(self->priv->direction & FS_DIRECTION_RECV);
    GST_OBJECT_UNLOCK (conference);

    g_object_set (recv_valve, "drop", drop, NULL);


    mimic_codec = fs_codec_new (0, "mimic",
        FS_MEDIA_TYPE_VIDEO, 0);
    fs_stream_emit_src_pad_added (FS_STREAM (self), src_pad, mimic_codec);
    fs_codec_destroy (mimic_codec);
    gst_object_unref (src_pad);

  }
  else
  {
    GstPad *valvepad;

    GST_OBJECT_LOCK (conference);
    if (self->priv->session->valve)
      send_valve = gst_object_ref (self->priv->session->valve);
    GST_OBJECT_UNLOCK (conference);

    if (!send_valve)
    {
      fs_stream_emit_error (FS_STREAM (self), FS_ERROR_DISPOSED,
          "Session was disposed");
      goto error;
    }

    valvepad = gst_element_get_static_pad (send_valve, "src");

    if (!valvepad)
    {
      gst_object_unref (pad);
      fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
          "Could not get valve sink pad");
      goto error;
    }

    if (GST_PAD_LINK_FAILED (gst_pad_link (valvepad, pad)))
    {
      gst_object_unref (valvepad);
      gst_object_unref (pad);
      fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
          "Could not link valve to codec bin");
      goto error;
    }
    gst_object_unref (valvepad);
    gst_object_unref (pad);
  }

  if (!gst_element_sync_state_with_parent (codecbin))
  {
    fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONSTRUCTION,
        "Could not start codec bin");
    goto error;
  }

  if (self->priv->conference->max_direction == FS_DIRECTION_SEND)
  {
    GST_OBJECT_LOCK (conference);
    fs_msn_stream_set_tos_locked (self, self->priv->tos);
    drop = !(self->priv->direction & FS_DIRECTION_SEND);
    GST_OBJECT_UNLOCK (conference);
    g_object_set (send_valve, "drop", drop, NULL);
  }

 error:

  if (send_valve)
    gst_object_unref (send_valve);
  if (recv_valve)
    gst_object_unref (recv_valve);
  if (codecbin)
    gst_object_unref (codecbin);
  if (conference)
    gst_object_unref (conference);
}

static void
_connection_failed (FsMsnConnection *connection, FsMsnStream *self)
{
  FsMsnConference *conference = fs_msn_stream_get_conference (self, NULL);

  if (!conference)
    return;

  GST_OBJECT_LOCK (conference);
  self->priv->fd = -1;
  GST_OBJECT_UNLOCK (conference);

  gst_element_post_message (GST_ELEMENT (conference),
      gst_message_new_element (GST_OBJECT (conference),
          gst_structure_new ("farstream-component-state-changed",
              "stream", FS_TYPE_STREAM, self,
              "component", G_TYPE_UINT, 1,
              "state", FS_TYPE_STREAM_STATE, FS_STREAM_STATE_FAILED,
              NULL)));

  fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONNECTION_FAILED,
      "Could not establish streaming connection");

  gst_object_unref (conference);
}

/**
 * fs_msn_stream_add_remote_candidate:
 */
static gboolean
fs_msn_stream_add_remote_candidates (FsStream *stream, GList *candidates,
                                     GError **error)
{
  FsMsnStream *self = FS_MSN_STREAM (stream);
  FsMsnConference *conference = fs_msn_stream_get_conference (self, error);
  FsMsnConnection *conn = NULL;
  gboolean ret = FALSE;

  if (!conference)
    return FALSE;

  GST_OBJECT_LOCK (conference);
  if (self->priv->connection)
    conn = g_object_ref (self->priv->connection);
  GST_OBJECT_UNLOCK (conference);

  if (conn)
  {
    ret = fs_msn_connection_add_remote_candidates (conn, candidates, error);
    g_object_unref (conn);
  }

  if (ret)
    gst_element_post_message (GST_ELEMENT (conference),
        gst_message_new_element (GST_OBJECT (conference),
            gst_structure_new ("farstream-component-state-changed",
                "stream", FS_TYPE_STREAM, self,
                "component", G_TYPE_UINT, 1,
                "state", FS_TYPE_STREAM_STATE, FS_STREAM_STATE_CONNECTING,
                NULL)));

  gst_object_unref (conference);

  return ret;
}


/**
 * fs_msn_stream_new:
 * @session: The #FsMsnSession this stream is a child of
 * @participant: The #FsMsnParticipant this stream is for
 * @direction: the initial #FsDirection for this stream
 *
 *
 * This function create a new stream
 *
 * Returns: the newly created string or NULL on error
 */

FsMsnStream *
fs_msn_stream_new (FsMsnSession *session,
    FsMsnParticipant *participant,
    FsStreamDirection direction,
    FsMsnConference *conference)
{
  FsMsnStream *self;

  self = g_object_new (FS_TYPE_MSN_STREAM,
      "session", session,
      "participant", participant,
      "direction", direction,
      "conference", conference,
      NULL);

  return self;
}

void
fs_msn_stream_set_tos_locked (FsMsnStream *self, gint tos)
{
  self->priv->tos = tos;

  if (self->priv->fd < 0)
    return;

  if (setsockopt (self->priv->fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0)
    GST_WARNING ( "could not set socket ToS: %s", g_strerror (errno));

#ifdef IPV6_TCLASS
  if (setsockopt (self->priv->fd, IPPROTO_IPV6, IPV6_TCLASS,
          &tos, sizeof (tos)) < 0)
    GST_WARNING ("could not set TCLASS: %s", g_strerror (errno));
#endif
}


static gboolean
fs_msn_stream_set_transmitter (FsStream *stream,
    const gchar *transmitter,
    GParameter *stream_transmitter_parameters,
    guint stream_transmitter_n_parameters,
    GError **error)
{
  FsMsnStream *self = FS_MSN_STREAM (stream);
  FsMsnConference *conference = fs_msn_stream_get_conference (self, error);
  gboolean producer;
  guint i;

  if (!conference)
    return FALSE;

  for (i = 0; i < stream_transmitter_n_parameters; i++)
  {
    if (!g_ascii_strcasecmp (stream_transmitter_parameters[i].name,
            "session-id"))
    {
      if (g_value_get_uint (&stream_transmitter_parameters[i].value) >= 1025 &&
          g_value_get_uint (&stream_transmitter_parameters[i].value) < 65536)
        self->priv->session_id =
            g_value_get_uint (&stream_transmitter_parameters[i].value);
    }
    else if (!g_ascii_strcasecmp (stream_transmitter_parameters[i].name,
            "initial-port"))
    {
      if (g_value_get_uint (&stream_transmitter_parameters[i].value) < 10000)
        self->priv->initial_port =
            g_value_get_uint (&stream_transmitter_parameters[i].value);
    }
  }

  if (self->priv->conference->max_direction == FS_DIRECTION_RECV)
    producer = FALSE;
  else if (self->priv->conference->max_direction == FS_DIRECTION_SEND)
    producer = TRUE;
  else
    g_assert_not_reached ();


  self->priv->connection = fs_msn_connection_new (self->priv->session_id,
      producer, self->priv->initial_port);

  g_signal_connect (self->priv->connection,
      "new-local-candidate",
      G_CALLBACK (_new_local_candidate), self);
  g_signal_connect (self->priv->connection,
      "local-candidates-prepared",
      G_CALLBACK (_local_candidates_prepared), self);
  g_signal_connect (self->priv->connection,
      "connected",
      G_CALLBACK (_connected), self);
  g_signal_connect (self->priv->connection,
      "connection-failed",
      G_CALLBACK (_connection_failed), self);

  if (!fs_msn_connection_gather_local_candidates (self->priv->connection,
          error))
  {
    g_object_unref (self->priv->connection);
    self->priv->connection = NULL;
    g_object_unref (conference);
    return FALSE;
  }

  g_object_unref (conference);

  return TRUE;
}
farstream-0.2.7/gst/fsmsnconference/fs-msn-conference.h0000664000076400007640000000463411710041461020075 00000000000000/*
 * Farstream - Farstream MSN Conference Implementation
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 *
 * gstfsmsnconference.h - MSN implementation for Farstream Conference Gstreamer
 *                        Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_MSN_CONFERENCE_H__
#define __FS_MSN_CONFERENCE_H__

#include 

G_BEGIN_DECLS

#define FS_TYPE_MSN_CONFERENCE \
  (fs_msn_conference_get_type ())
#define FS_MSN_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),FS_TYPE_MSN_CONFERENCE,FsMsnConference))
#define FS_MSN_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),FS_TYPE_MSN_CONFERENCE,FsMsnConferenceClass))
#define FS_MSN_CONFERENCE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS((obj),FS_TYPE_MSN_CONFERENCE,FsMsnConferenceClass))
#define FS_IS_MSN_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_MSN_CONFERENCE))
#define FS_IS_MSN_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_MSN_CONFERENCE))
#define FS_MSN_CONFERENCE_CAST(obj) \
  ((FsMsnConference *)(obj))

typedef struct _FsMsnConference FsMsnConference;
typedef struct _FsMsnConferenceClass FsMsnConferenceClass;
typedef struct _FsMsnConferencePrivate FsMsnConferencePrivate;

struct _FsMsnConference
{
  FsConference parent;
  FsMsnConferencePrivate *priv;

  FsStreamDirection max_direction;

  GError *missing_element_error;
};

struct _FsMsnConferenceClass
{
  FsConferenceClass parent_class;
};

GType fs_msn_conference_get_type (void);


GST_DEBUG_CATEGORY_EXTERN (fsmsnconference_debug);

G_END_DECLS

#endif /* __FS_MSN_CONFERENCE_H__ */
farstream-0.2.7/gst/fsmsnconference/fs-msn-connection.h0000664000076400007640000000616412401500475020130 00000000000000/*
 * Farstream - Farstream MSN Stream
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Youness Alaoui 
 *
 * fs-msn-connection.h - An MSN Connection class
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_MSN_CONNECTION_H__
#define __FS_MSN_CONNECTION_H__

#include "fs-msn-participant.h"
#include "fs-msn-session.h"

G_BEGIN_DECLS

/* TYPE MACROS */
#define FS_TYPE_MSN_CONNECTION \
  (fs_msn_connection_get_type ())
#define FS_MSN_CONNECTION(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_MSN_CONNECTION, FsMsnConnection))
#define FS_MSN_CONNECTION_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_MSN_CONNECTION, FsMsnConnectionClass))
#define FS_IS_MSN_CONNECTION(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_MSN_CONNECTION))
#define FS_IS_MSN_CONNECTION_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_MSN_CONNECTION))
#define FS_MSN_CONNECTION_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_MSN_CONNECTION, FsMsnConnectionClass))
#define FS_MSN_CONNECTION_CAST(obj) ((FsMsnConnection*) (obj))

typedef struct _FsMsnConnection FsMsnConnection;
typedef struct _FsMsnConnectionClass FsMsnConnectionClass;
typedef struct _FsMsnConnectionPrivate FsMsnConnectionPrivate;


struct _FsMsnConnectionClass
{
  GObjectClass parent_class;
};

/**
 * FsMsnConnection:
 *
 */
struct _FsMsnConnection
{
  GObject parent;

  /* All variables that are not protected by the lock are read-only */

  gchar *local_recipient_id;
  gchar *remote_recipient_id; /* protected by lock */
  guint session_id; /* protected by lock */
  guint initial_port;
  gboolean producer;

  GThread *polling_thread; /* protected by lock */
  GstClockTime poll_timeout; /* protected by lock */
  GstPoll *poll;
  GPtrArray *pollfds; /* protected by lock */
  GRecMutex mutex;
};

GType fs_msn_connection_get_type (void);

FsMsnConnection *fs_msn_connection_new (guint session_id, gboolean producer,
	                                guint initial_port);

gboolean fs_msn_connection_gather_local_candidates (FsMsnConnection *connection,
                                                    GError **error);

gboolean fs_msn_connection_add_remote_candidates (FsMsnConnection *connection,
    GList *candidates, GError **error);


G_END_DECLS

#endif /* __FS_MSN_CONNECTION_H__ */
farstream-0.2.7/gst/fsmsnconference/fs-msn-connection.c0000664000076400007640000007317612462002536020134 00000000000000/*
 * Farstream - Farstream MSN Connection
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Youness Alaoui 
 *
 * fs-msn-connection.c - A MSN Connection gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-msn-connection.h"

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#ifdef HAVE_STDLIB_H
#include 
#endif

#include 
#include 

#define GST_CAT_DEFAULT fsmsnconference_debug

/* Signals */
enum
{
  SIGNAL_NEW_LOCAL_CANDIDATE,
  SIGNAL_LOCAL_CANDIDATES_PREPARED,
  SIGNAL_CONNECTED,
  SIGNAL_CONNECTION_FAILED,
  N_SIGNALS
};


static guint signals[N_SIGNALS];

/* props */
enum
{
  PROP_0,
  PROP_SESSION_ID
};


typedef enum {
  FS_MSN_STATUS_AUTH,
  FS_MSN_STATUS_CONNECTED,
  FS_MSN_STATUS_CONNECTED2,
  FS_MSN_STATUS_SEND_RECEIVE,
  FS_MSN_STATUS_PAUSED,
} FsMsnStatus;

typedef struct _FsMsnPollFD FsMsnPollFD;
typedef void (*PollFdCallback) (FsMsnConnection *self, FsMsnPollFD *pollfd);

struct _FsMsnPollFD {
  GstPollFD pollfd;
  FsMsnStatus status;
  gboolean server;
  gboolean want_read;
  gboolean want_write;
  PollFdCallback callback;
};

#define FS_MSN_CONNECTION_LOCK(conn)   g_rec_mutex_lock(&(conn)->mutex)
#define FS_MSN_CONNECTION_UNLOCK(conn) g_rec_mutex_unlock(&(conn)->mutex)


G_DEFINE_TYPE(FsMsnConnection, fs_msn_connection, G_TYPE_OBJECT);

static void fs_msn_connection_dispose (GObject *object);
static void fs_msn_connection_finalize (GObject *object);
static void fs_msn_connection_get_property (GObject *object,
    guint prop_id,
    GValue *value,
    GParamSpec *pspec);
static void fs_msn_connection_set_property (GObject *object,
    guint prop_id,
    const GValue *value,
    GParamSpec *pspec);


static gboolean fs_msn_connection_attempt_connection_locked (
    FsMsnConnection *connection,
    FsCandidate *candidate,
    GError **error);
static gboolean fs_msn_open_listening_port_unlock (FsMsnConnection *connection,
    guint16 port,
    GError **error);

static void successful_connection_cb (FsMsnConnection *self, FsMsnPollFD *fd);
static void accept_connection_cb (FsMsnConnection *self, FsMsnPollFD *fd);
static void connection_cb (FsMsnConnection *self, FsMsnPollFD *fd);

static gpointer connection_polling_thread (gpointer data);
static void shutdown_fd (FsMsnConnection *self, FsMsnPollFD *pollfd,
    gboolean equal);
static void shutdown_fd_locked (FsMsnConnection *self, FsMsnPollFD *pollfd,
    gboolean equal);
static FsMsnPollFD * add_pollfd_locked (FsMsnConnection *self, int fd,
    PollFdCallback callback, gboolean read, gboolean write, gboolean server);

static void
fs_msn_connection_class_init (FsMsnConnectionClass *klass)
{
  GObjectClass *gobject_class = (GObjectClass *) klass;

  gobject_class->dispose = fs_msn_connection_dispose;
  gobject_class->finalize = fs_msn_connection_finalize;
  gobject_class->get_property = fs_msn_connection_get_property;
  gobject_class->set_property = fs_msn_connection_set_property;

  signals[SIGNAL_NEW_LOCAL_CANDIDATE] = g_signal_new
      ("new-local-candidate",
          G_TYPE_FROM_CLASS (klass),
          G_SIGNAL_RUN_LAST,
          0,
          NULL,
          NULL,
          g_cclosure_marshal_VOID__BOXED,
          G_TYPE_NONE, 1, FS_TYPE_CANDIDATE);

  signals[SIGNAL_LOCAL_CANDIDATES_PREPARED] = g_signal_new
    ("local-candidates-prepared",
      G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST,
      0,
      NULL,
      NULL,
      g_cclosure_marshal_VOID__VOID,
      G_TYPE_NONE, 0);

  signals[SIGNAL_CONNECTED] = g_signal_new
    ("connected",
      G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST,
      0,
      NULL,
      NULL,
      g_cclosure_marshal_VOID__UINT,
        G_TYPE_NONE, 1, G_TYPE_UINT);

  signals[SIGNAL_CONNECTION_FAILED] = g_signal_new
    ("connection-failed",
      G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST,
      0,
      NULL,
      NULL,
      g_cclosure_marshal_VOID__VOID,
      G_TYPE_NONE, 0);

  g_object_class_install_property (gobject_class,
      PROP_SESSION_ID,
      g_param_spec_uint ("session-id",
          "The session-id of the session",
          "This is the session-id of the MSN session",
          1, 9999, 1,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

static void
fs_msn_connection_init (FsMsnConnection *self)
{
  /* member init */

  self->poll_timeout = GST_CLOCK_TIME_NONE;
  self->poll = gst_poll_new (TRUE);
  gst_poll_set_flushing (self->poll, FALSE);
  self->pollfds = g_ptr_array_new ();

  g_rec_mutex_init (&self->mutex);
}

static void
fs_msn_connection_dispose (GObject *object)
{
  FsMsnConnection *self = FS_MSN_CONNECTION (object);

  FS_MSN_CONNECTION_LOCK(self);

  if (self->polling_thread)
  {
    GThread *polling_thread = g_thread_ref (self->polling_thread);
    gst_poll_set_flushing (self->poll, TRUE);
    FS_MSN_CONNECTION_UNLOCK(self);
    g_thread_join (polling_thread);
    FS_MSN_CONNECTION_LOCK(self);
    g_thread_unref (polling_thread);
    self->polling_thread = NULL;
  }

  FS_MSN_CONNECTION_UNLOCK(self);

  G_OBJECT_CLASS (fs_msn_connection_parent_class)->dispose (object);
}

static void
fs_msn_connection_finalize (GObject *object)
{
  FsMsnConnection *self = FS_MSN_CONNECTION (object);
  gint i;

  g_free (self->local_recipient_id);
  g_free (self->remote_recipient_id);

  gst_poll_free (self->poll);

  for (i = 0; i < self->pollfds->len; i++)
  {
    FsMsnPollFD *p = g_ptr_array_index(self->pollfds, i);
    close (p->pollfd.fd);
    g_slice_free (FsMsnPollFD, p);
  }
  g_ptr_array_free (self->pollfds, TRUE);

  g_rec_mutex_clear (&self->mutex);

  G_OBJECT_CLASS (fs_msn_connection_parent_class)->finalize (object);
}

/**
 * fs_msn_connection_new:
 * @session: The #FsMsnSession this connection is a child of
 * @participant: The #FsMsnParticipant this connection is for
 * @direction: the initial #FsDirection for this connection
 *
 *
 * This function create a new connection
 *
 * Returns: the newly created string or NULL on error
 */

FsMsnConnection *
fs_msn_connection_new (guint session_id, gboolean producer, guint initial_port)
{
  FsMsnConnection *self = g_object_new (FS_TYPE_MSN_CONNECTION, NULL);

  if (self) {
    self->session_id = session_id;
    self->initial_port = initial_port;
    self->producer = producer;
  }

  return self;
}

static void
fs_msn_connection_get_property (GObject *object,
                            guint prop_id,
                            GValue *value,
                            GParamSpec *pspec)
{
  FsMsnConnection *self = FS_MSN_CONNECTION (object);

  FS_MSN_CONNECTION_LOCK (self);
  switch (prop_id)
  {
    case PROP_SESSION_ID:
      g_value_set_uint (value, self->session_id);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }
  FS_MSN_CONNECTION_UNLOCK (self);
}

static void
fs_msn_connection_set_property (GObject *object,
                            guint prop_id,
                            const GValue *value,
                            GParamSpec *pspec)
{
  FsMsnConnection *self = FS_MSN_CONNECTION (object);

  FS_MSN_CONNECTION_LOCK (self);
  switch (prop_id)
  {
    case PROP_SESSION_ID:
      self->session_id = g_value_get_uint (value);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }
  FS_MSN_CONNECTION_LOCK (self);

}

gboolean
fs_msn_connection_gather_local_candidates (FsMsnConnection *self,
    GError **error)
{
  gboolean ret;

  FS_MSN_CONNECTION_LOCK(self);

  self->polling_thread = g_thread_try_new ("msn polling thread",
      connection_polling_thread, self, error);

  if (!self->polling_thread)
  {
    FS_MSN_CONNECTION_UNLOCK(self);
    return FALSE;
  }

  ret = fs_msn_open_listening_port_unlock (self, self->initial_port, error);

  g_signal_emit (self, signals[SIGNAL_LOCAL_CANDIDATES_PREPARED], 0);

  return ret;
}


/**
 * fs_msn_connection_add_remote_candidate:
 */
gboolean
fs_msn_connection_add_remote_candidates (FsMsnConnection *self,
    GList *candidates, GError **error)
{
  GList *item = NULL;
  gchar *recipient_id = NULL;
  gboolean ret = FALSE;
  guint session_id = 0;

  if (!candidates)
  {
    g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
        "Candidate list can no be empty");
    return FALSE;
  }

  FS_MSN_CONNECTION_LOCK(self);

  recipient_id = self->remote_recipient_id;

  for (item = candidates; item; item = g_list_next (item))
  {
    FsCandidate *candidate = item->data;

    if (!candidate->ip || !candidate->port)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The candidate passed does not contain a valid ip or port");
      goto out;
    }
    if (!candidate->foundation)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The candidate passed does not have a foundation (MSN recipient ID)");
      goto out;
    }
    if (recipient_id)
    {
      if (g_strcmp0 (candidate->foundation, recipient_id) != 0)
      {
        g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
            "The candidates do not have the same recipient ID");
        goto out;
      }
    }
    else
    {
      recipient_id = candidate->foundation;
    }

    if (candidate->username)
    {
      gint sid = atoi (candidate->username);

      if (sid < 1 || sid > 9999)
      {
          g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
              "The session ID (in the username) must be between 1 and 9999,"
              " %d is invalid", sid);
          goto out;
      }

      if (session_id)
      {
        if (session_id != sid)
        {
          g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
              "The candidates do not have the same session ID"
              " (in the username)");
          goto out;
        }
      }
      else
      {
        session_id = sid;
      }
    }
  }

  self->remote_recipient_id = g_strdup (recipient_id);
  self->session_id = session_id;
  ret = TRUE;
  for (item = candidates; item; item = g_list_next (item))
  {
    FsCandidate *candidate = item->data;
    if (!fs_msn_connection_attempt_connection_locked (self, candidate, error))
    {
      ret = FALSE;
      break;
    }
  }

 out:
  FS_MSN_CONNECTION_UNLOCK(self);
  return ret;
}



static GList *
filter_ips_ipv4 (GList *ips)
{
  GList *item;

  for (item = ips; item;)
  {
    gchar *ip = item->data;
    GList *next = item->next;

    if (!strchr (ip, '.'))
    {
      g_free (ip);
      ips = g_list_delete_link (ips, item);
    }
    item = next;
  }

  return ips;
}

static gboolean
fs_msn_open_listening_port_unlock (FsMsnConnection *self, guint16 port,
    GError **error)
{
  gint fd = -1;
  struct sockaddr_in myaddr;
  guint myaddr_len = sizeof (struct sockaddr_in);
  FsCandidate * candidate = NULL;
  GList *addresses = nice_interfaces_get_local_ips (FALSE);
  GList *item = NULL;
  gchar *session_id;

  addresses = filter_ips_ipv4 (addresses);


  GST_DEBUG ("Attempting to listen on port %d.....",port);

  if ( (fd = socket(PF_INET, SOCK_STREAM, 0)) < 0 )
  {
    gchar error_str[256];
    strerror_r (errno, error_str, 256);
    g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
        "Could not create socket: %s", error_str);
    goto error;
  }

  // set non-blocking mode
  fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
  for (;;) {
    GST_DEBUG ("Attempting to listen on port %d.....",port);
    memset(&myaddr, 0, sizeof(myaddr));
    myaddr.sin_family = AF_INET;
    myaddr.sin_port = htons (port);
    // bind
    if (bind(fd, (struct sockaddr *) &myaddr, sizeof(myaddr)) != 0)
    {
      if (port != 0 && errno == EADDRINUSE)
      {
        port++;
      }
      else
      {
        gchar error_str[256];
        strerror_r (errno, error_str, 256);
        g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
            "Could not bind socket: %s", error_str);
        goto error;
      }
    } else {
      /* Listen */
      if (listen(fd, 3) != 0)
      {
        if (port != 0 && errno == EADDRINUSE)
        {
          port++;
        }
        else
        {
          gchar error_str[256];
          strerror_r (errno, error_str, 256);
          g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
              "Could not listen on socket: %s", error_str);
          goto error;
        }
      }
      else
      {
        goto done;
      }
    }
  }

 done:

  if (getsockname (fd, (struct sockaddr *) &myaddr, &myaddr_len) < 0) {
    gchar error_str[256];
    strerror_r (errno, error_str, 256);
    g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
        "Could not get the socket name: %s", error_str);
    goto error;
  }
  port = ntohs (myaddr.sin_port);
  add_pollfd_locked (self, fd, accept_connection_cb, TRUE, TRUE, FALSE);

  GST_DEBUG ("Listening on port %d", port);

  self->local_recipient_id = g_strdup_printf ("%d",
      g_random_int_range (100, 199));
  session_id = g_strdup_printf ("%u", self->session_id);

  FS_MSN_CONNECTION_UNLOCK (self);

  for (item = addresses;
       item;
       item = g_list_next (item))
  {
    candidate = fs_candidate_new (self->local_recipient_id, 1,
        FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_TCP, item->data, port);
    candidate->username = g_strdup (session_id);

    g_signal_emit (self, signals[SIGNAL_NEW_LOCAL_CANDIDATE], 0, candidate);

    fs_candidate_destroy (candidate);
  }

  g_free (session_id);

  g_list_foreach (addresses, (GFunc) g_free, NULL);
  g_list_free (addresses);

  return TRUE;

 error:
  if (fd >= 0)
    close (fd);
  g_list_foreach (addresses, (GFunc) g_free, NULL);
  g_list_free (addresses);
  FS_MSN_CONNECTION_UNLOCK (self);
  return FALSE;
}

static gboolean
fs_msn_connection_attempt_connection_locked (FsMsnConnection *connection,
    FsCandidate *candidate,
    GError **error)
{
  FsMsnConnection *self = FS_MSN_CONNECTION (connection);
  gint fd = -1;
  gint ret;
  struct sockaddr_in theiraddr;
  memset(&theiraddr, 0, sizeof(theiraddr));


  if ( (fd = socket(PF_INET, SOCK_STREAM, 0)) == -1 )
  {
    gchar error_str[256];
    strerror_r (errno, error_str, 256);
    g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
        "Could not create socket: %s", error_str);
    return FALSE;
  }

  // set non-blocking mode
  fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);

  theiraddr.sin_family = AF_INET;
  theiraddr.sin_addr.s_addr = inet_addr (candidate->ip);
  theiraddr.sin_port = htons (candidate->port);

  GST_DEBUG ("Attempting connection to %s %d on socket %d", candidate->ip,
      candidate->port, fd);
  // this is non blocking, the return value isn't too usefull
  ret = connect (fd, (struct sockaddr *) &theiraddr, sizeof (theiraddr));
  if (ret < 0 && errno != EINPROGRESS)
  {
    gchar error_str[256];
    strerror_r (errno, error_str, 256);
    g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
        "Could not connect socket: %s", error_str);
    close (fd);
    return FALSE;
  }

  FS_MSN_CONNECTION_LOCK (self);
  add_pollfd_locked (self, fd, successful_connection_cb, TRUE, TRUE, FALSE);
  FS_MSN_CONNECTION_UNLOCK (self);

  return TRUE;
}

static void
accept_connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
{
  struct sockaddr_in in;
  int fd = -1;
  socklen_t n = sizeof (in);

  if (gst_poll_fd_has_error (self->poll, &pollfd->pollfd) ||
      gst_poll_fd_has_closed (self->poll, &pollfd->pollfd))
  {
    GST_WARNING ("Error in accept socket : %d", pollfd->pollfd.fd);
    goto error;
  }

  if ((fd = accept(pollfd->pollfd.fd,
              (struct sockaddr*) &in, &n)) == -1)
  {
    GST_ERROR ("Error while running accept() %d", errno);
    return;
  }

  FS_MSN_CONNECTION_LOCK (self);
  add_pollfd_locked (self, fd, connection_cb, TRUE, FALSE, TRUE);
  FS_MSN_CONNECTION_UNLOCK (self);

  return;

  /* Error */
 error:
  GST_WARNING ("Got error from fd %d, closing", fd);
  // find, shutdown and remove channel from fdlist
  shutdown_fd (self, pollfd, TRUE);

  return;
}


static void
successful_connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
{
  gint error;
  socklen_t option_len;

  GST_DEBUG ("handler called on fd %d", pollfd->pollfd.fd);

  errno = 0;
  if (gst_poll_fd_has_error (self->poll, &pollfd->pollfd) ||
      gst_poll_fd_has_closed (self->poll, &pollfd->pollfd))
  {
    GST_WARNING ("connecton closed or error");
    goto error;
  }

  option_len = sizeof(error);

  /* Get the error option */
  if (getsockopt(pollfd->pollfd.fd, SOL_SOCKET, SO_ERROR, (void*) &error, &option_len) < 0)
  {
    g_warning ("getsockopt() failed");
    goto error;
  }

  /* Check if there is an error */
  if (error)
  {
    GST_WARNING ("getsockopt gave an error : %d", error);
    goto error;
  }

  pollfd->callback = connection_cb;

  GST_DEBUG ("connection succeeded on socket %p", pollfd);
  return;

  /* Error */
 error:
  GST_WARNING ("Got error from fd %d, closing", pollfd->pollfd.fd);
  // find, shutdown and remove channel from fdlist
  shutdown_fd (self, pollfd, TRUE);

  return;
}


static void
connection_cb (FsMsnConnection *self, FsMsnPollFD *pollfd)
{
  gboolean success = FALSE;

  GST_DEBUG ("handler called on fd:%d server: %d status:%d r:%d w:%d",
      pollfd->pollfd.fd,
      pollfd->server, pollfd->status,
      gst_poll_fd_can_read (self->poll, &pollfd->pollfd),
      gst_poll_fd_can_write (self->poll, &pollfd->pollfd));

  if (gst_poll_fd_has_error (self->poll, &pollfd->pollfd) ||
      gst_poll_fd_has_closed (self->poll, &pollfd->pollfd))
  {
    GST_WARNING ("connecton closed or error (error: %d closed: %d)",
        gst_poll_fd_has_error (self->poll, &pollfd->pollfd),
        gst_poll_fd_has_closed (self->poll, &pollfd->pollfd));
    goto error;
  }

  if (gst_poll_fd_can_read (self->poll, &pollfd->pollfd))
  {
    switch (pollfd->status)
    {
      case FS_MSN_STATUS_AUTH:
        if (pollfd->server)
        {
          gchar str[35] = {0};
          gchar check[35] = {0};

          if (recv (pollfd->pollfd.fd, str, 34, 0) == 34)
          {
            GST_DEBUG ("Got %s, checking if it's auth", str);
            FS_MSN_CONNECTION_LOCK(self);
            snprintf(check, 35, "recipientid=%s&sessionid=%d\r\n\r\n",
                self->local_recipient_id, self->session_id);
            FS_MSN_CONNECTION_UNLOCK(self);
            if (strncmp (str, check, 35) == 0)
            {
              GST_DEBUG ("Authentication successful");
              pollfd->status = FS_MSN_STATUS_CONNECTED;
              pollfd->want_write = TRUE;
              gst_poll_fd_ctl_write (self->poll, &pollfd->pollfd, TRUE);
            }
            else
            {
              GST_WARNING ("Authentication failed check=%s", check);
              goto error;
            }
          }
          else
          {
            gchar error_str[256];
            strerror_r (errno, error_str, 256);
            GST_WARNING ("auth: %s", error_str);
            goto error;
          }

        } else {
          GST_ERROR ("shouldn't receive data when client on AUTH state");
          goto error;
        }
        break;
      case FS_MSN_STATUS_CONNECTED:
        if (!pollfd->server)
        {
          gchar str[14] = {0};
          ssize_t size;

          size = recv (pollfd->pollfd.fd, str, 13, MSG_PEEK);
          if (size > 0)
          {
            GST_DEBUG ("Got %s, checking if it's connected", str);
            if (size == 13 && strcmp (str, "connected\r\n\r\n") == 0)
            {
              GST_DEBUG ("connection successful");
              if (recv (pollfd->pollfd.fd, str, 13, 0) != 13)
              {
                GST_WARNING ("Could not read 13 bytes that had previously"
                    " been peeked at!");
                goto error;
              }
              pollfd->status = FS_MSN_STATUS_CONNECTED2;
              pollfd->want_write = TRUE;
              gst_poll_fd_ctl_write (self->poll, &pollfd->pollfd, TRUE);
            }
            else if (!self->producer)
            {
              GST_DEBUG ("connection successful");
              pollfd->status = FS_MSN_STATUS_SEND_RECEIVE;
              success = TRUE;
            }
            else
            {
              GST_WARNING ("connected failed");
              goto error;
            }
          }
          else
          {
            gchar error_str[256];
            strerror_r (errno, error_str, 256);
            GST_WARNING ("recv: %s", error_str);
            goto error;
          }
        } else {
          GST_ERROR ("shouldn't receive data when server on CONNECTED state");
          goto error;
        }
        break;
      case FS_MSN_STATUS_CONNECTED2:
        if (pollfd->server)
        {
          gchar str[14] = {0};
          ssize_t size;

          size = recv (pollfd->pollfd.fd, str, 13, MSG_PEEK);
          if (size > 0)
          {
            GST_DEBUG ("Got %s, checking if it's connected", str);
            if (size == 13 && strcmp (str, "connected\r\n\r\n") == 0)
            {
              GST_DEBUG ("connection successful");
              if (recv (pollfd->pollfd.fd, str, 13, 0) != 13)
              {
                GST_WARNING ("Could not read 13 bytes that had previously"
                    " been peeked at!");

                goto error;
              }
              pollfd->status = FS_MSN_STATUS_SEND_RECEIVE;
              success = TRUE;
            }
            else if (!self->producer)
            {
              GST_DEBUG ("connection successful");
              pollfd->status = FS_MSN_STATUS_SEND_RECEIVE;
              success = TRUE;
            }
            else
            {
              GST_WARNING ("connected failed");
              goto error;
            }
          }
          else
          {
            gchar error_str[256];
            strerror_r (errno, error_str, 256);
            GST_WARNING ("recv: %s", error_str);
            goto error;
          }

        } else {
          GST_ERROR ("shouldn't receive data when client on CONNECTED2 state");
          goto error;
        }
        break;
      default:
        GST_ERROR ("Invalid status %d", pollfd->status);
        goto error;
        break;

    }
  }
  else if (gst_poll_fd_can_write (self->poll, &pollfd->pollfd))
  {
    pollfd->want_write = FALSE;
    gst_poll_fd_ctl_write (self->poll, &pollfd->pollfd, FALSE);
    switch (pollfd->status)
    {
      case FS_MSN_STATUS_AUTH:
        if (!pollfd->server)
        {
          gchar *str;
          FS_MSN_CONNECTION_LOCK(self);
          str = g_strdup_printf("recipientid=%s&sessionid=%d\r\n\r\n",
              self->remote_recipient_id, self->session_id);
          FS_MSN_CONNECTION_UNLOCK(self);
          if (send(pollfd->pollfd.fd, str, strlen (str), 0) != -1)
          {
            GST_DEBUG ("Sent %s", str);
            pollfd->status = FS_MSN_STATUS_CONNECTED;
            g_free (str);
          }
          else
          {
            gchar error_str[256];
            strerror_r (errno, error_str, 256);
            GST_WARNING ("auth send: %s", error_str);
            g_free (str);
            goto error;
          }

        }
        break;
      case FS_MSN_STATUS_CONNECTED:
        if (pollfd->server)
        {

          if (send(pollfd->pollfd.fd, "connected\r\n\r\n", 13, 0) != -1)
          {
            GST_DEBUG ("sent connected");
            if (self->producer)
            {
              pollfd->status = FS_MSN_STATUS_SEND_RECEIVE;
              success = TRUE;
            }
            else
            {
              pollfd->status = FS_MSN_STATUS_CONNECTED2;
            }
          }
          else
          {
            gchar error_str[256];
            strerror_r (errno, error_str, 256);
            GST_WARNING ("sending connected: %s", error_str);
            goto error;
          }
        } else {
          GST_DEBUG ("shouldn't receive data when server on CONNECTED state");
          goto error;
        }
        break;
      case FS_MSN_STATUS_CONNECTED2:
        if (!pollfd->server)
        {

          if (send(pollfd->pollfd.fd, "connected\r\n\r\n", 13, 0) != -1)
          {
            GST_DEBUG ("sent connected");
            pollfd->status = FS_MSN_STATUS_SEND_RECEIVE;
            success = TRUE;
          }
          else
          {
            gchar error_str[256];
            strerror_r (errno, error_str, 256);
            GST_WARNING ("sending connected: %s", error_str);
            goto error;
          }
        } else {
          GST_ERROR ("shouldn't receive data when client on CONNECTED2 state");
          goto error;
        }
        break;
      default:
        GST_ERROR ("Invalid status %d", pollfd->status);
        goto error;
        break;
    }
  }

  if (success) {
    // success! we need to shutdown/close all other channels
    shutdown_fd (self, pollfd, FALSE);

    g_signal_emit (self, signals[SIGNAL_CONNECTED], 0, pollfd->pollfd.fd);

    pollfd->want_read = FALSE;
    pollfd->want_write = FALSE;
    gst_poll_fd_ctl_read (self->poll, &pollfd->pollfd, FALSE);
    gst_poll_fd_ctl_write (self->poll, &pollfd->pollfd, FALSE);
  }

  return;
 error:
  /* Error */
  GST_WARNING ("Got error from fd %d, closing", pollfd->pollfd.fd);
  shutdown_fd (self, pollfd, TRUE);

  FS_MSN_CONNECTION_LOCK (self);
  success = (self->pollfds->len > 1);
  FS_MSN_CONNECTION_UNLOCK (self);

  if (!success)
    g_signal_emit (self, signals[SIGNAL_CONNECTION_FAILED], 0);

  return;
}

static gpointer
connection_polling_thread (gpointer data)
{
  FsMsnConnection *self = data;
  gint ret;
  GstClockTime timeout;
  GstPoll * poll;

  FS_MSN_CONNECTION_LOCK(self);
  timeout = self->poll_timeout;
  poll = self->poll;
  GST_DEBUG ("poll waiting %d", self->pollfds->len);
  FS_MSN_CONNECTION_UNLOCK(self);

  while ((ret = gst_poll_wait (poll, timeout)) >= 0)
  {
    GST_DEBUG ("gst_poll_wait returned : %d", ret);
    FS_MSN_CONNECTION_LOCK(self);
    if (ret > 0)
    {
      gint i;

      for (i = 0; i < self->pollfds->len; i++)
      {
        FsMsnPollFD *pollfd = NULL;

        pollfd = g_ptr_array_index(self->pollfds, i);

        GST_DEBUG ("ret %d - i = %d, len = %d", ret, i, self->pollfds->len);

        GST_DEBUG ("%p - error %d, close %d, read %d-%d, write %d-%d",
            pollfd,
            gst_poll_fd_has_error (poll, &pollfd->pollfd),
            gst_poll_fd_has_closed (poll, &pollfd->pollfd),
            pollfd->want_read,
            gst_poll_fd_can_read (poll, &pollfd->pollfd),
            pollfd->want_write,
            gst_poll_fd_can_write (poll, &pollfd->pollfd));

        if (gst_poll_fd_has_error (poll, &pollfd->pollfd) ||
            gst_poll_fd_has_closed (poll, &pollfd->pollfd))
        {
          pollfd->callback (self, pollfd);
          shutdown_fd_locked (self, pollfd, TRUE);
          i--;
          continue;
        }
        if ((pollfd->want_read &&
                gst_poll_fd_can_read (poll, &pollfd->pollfd)) ||
            (pollfd->want_write &&
                gst_poll_fd_can_write (poll, &pollfd->pollfd)))
        {
          pollfd->callback (self, pollfd);
        }

      }
    }
    timeout = self->poll_timeout;
    FS_MSN_CONNECTION_UNLOCK(self);
  }

  return NULL;
}


static void
shutdown_fd (FsMsnConnection *self, FsMsnPollFD *pollfd, gboolean equal)
{
  FS_MSN_CONNECTION_LOCK (self);
  shutdown_fd_locked (self, pollfd, equal);
  FS_MSN_CONNECTION_UNLOCK (self);
}

static void
shutdown_fd_locked (FsMsnConnection *self, FsMsnPollFD *pollfd, gboolean equal)
{
  gint i;
  guint closed = 0;

  for (i = 0; i < self->pollfds->len; i++)
  {
    FsMsnPollFD *p = g_ptr_array_index(self->pollfds, i);
    if ((equal && p == pollfd) || (!equal && p != pollfd))
    {
      GST_DEBUG ("Shutting down p %p (fd %d)", p, p->pollfd.fd);

      if (!gst_poll_fd_has_closed (self->poll, &p->pollfd))
        close (p->pollfd.fd);
      if (!gst_poll_remove_fd (self->poll, &p->pollfd))
        GST_WARNING ("Could not remove pollfd %p", p);
      g_ptr_array_remove_index_fast (self->pollfds, i);
      g_slice_free (FsMsnPollFD, p);
      closed++;
      i--;
    }
  }

  if (closed)
    gst_poll_restart (self->poll);
  else
    GST_WARNING ("Could find pollfd to remove");
}

static FsMsnPollFD *
add_pollfd_locked (FsMsnConnection *self, int fd, PollFdCallback callback,
    gboolean read, gboolean write, gboolean server)
{
  FsMsnPollFD *pollfd = g_slice_new0 (FsMsnPollFD);
  gst_poll_fd_init (&pollfd->pollfd);
  pollfd->pollfd.fd = fd;
  pollfd->server = server;
  pollfd->want_read = read;
  pollfd->want_write = write;
  pollfd->status = FS_MSN_STATUS_AUTH;

  gst_poll_add_fd (self->poll, &pollfd->pollfd);

  gst_poll_fd_ctl_read (self->poll, &pollfd->pollfd, read);
  gst_poll_fd_ctl_write (self->poll, &pollfd->pollfd, write);
  pollfd->callback = callback;

  GST_DEBUG ("ADD_POLLFD %p (%p) - error %d, close %d, read %d-%d, write %d-%d",
      self->pollfds, pollfd,
      gst_poll_fd_has_error (self->poll, &pollfd->pollfd),
      gst_poll_fd_has_closed (self->poll, &pollfd->pollfd),
      pollfd->want_read,
      gst_poll_fd_can_read (self->poll, &pollfd->pollfd),
      pollfd->want_write,
      gst_poll_fd_can_write (self->poll, &pollfd->pollfd));

  g_ptr_array_add (self->pollfds, pollfd);
  gst_poll_restart (self->poll);
  return pollfd;
}
farstream-0.2.7/gst/fsmsnconference/fs-msn-cam-send-conference.c0000664000076400007640000000520312401500475021551 00000000000000/*
 * Farstream - Farstream MSN Conference Implementation
 *
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *
 * fs-msn-send-conference.c - MSN implementation for Farstream Conference
 *   Gstreamer Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:element-fsmsncamsendconference
 * @short_description: Farstream MSN send Conference Gstreamer Element
 *
 * This element implements the unidirection webcam feature found in various
 * version of MSN Messenger (tm) and Windows Live Messenger (tm). This is
 * to send the local webcam's video to someone else.
 */


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-msn-cam-send-conference.h"

#include "fs-msn-conference.h"
#include "fs-msn-session.h"
#include "fs-msn-stream.h"
#include "fs-msn-participant.h"

#define GST_CAT_DEFAULT fsmsnconference_debug


G_DEFINE_TYPE (FsMsnCamSendConference, fs_msn_cam_send_conference,
    FS_TYPE_MSN_CONFERENCE);

static void
fs_msn_cam_send_conference_class_init (FsMsnCamSendConferenceClass * klass)
{
  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);

  gst_element_class_set_metadata (gstelement_class,
      "Farstream MSN Sending Conference",
      "Generic/Bin/MSN",
      "A Farstream MSN Sending Conference",
      "Richard Spiers , "
      "Youness Alaoui , "
      "Olivier Crete ");
}

static void
fs_msn_cam_send_conference_init (FsMsnCamSendConference *self)
{
  FsMsnConference *conf = FS_MSN_CONFERENCE (self);
  GstElementFactory *fact = NULL;

  GST_DEBUG_OBJECT (conf, "fs_msn_cam_send_conference_init");

  conf->max_direction = FS_DIRECTION_SEND;

  fact = gst_element_factory_find ("mimenc");
  if (fact)
    gst_object_unref (fact);
  else
    g_set_error (&conf->missing_element_error,
        FS_ERROR, FS_ERROR_CONSTRUCTION,
        "mimenc missing");
}

farstream-0.2.7/gst/fsmsnconference/fs-msn-participant.c0000664000076400007640000000320112401500475020267 00000000000000/*
 * Farstream - Farstream MSN Participant
 *
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2008 Richard Spiers 
 *
 * fs-msn-participant.c - A MSN Farstream Participant gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-msn-participant
 * @short_description: A MSN participant in a #FsMsnConference
 *
 * This object represents one participant or person in a conference
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-msn-participant.h"

/* Signals */
enum
{
  LAST_SIGNAL
};

/* props */
enum
{
  PROP_0,
};

G_DEFINE_TYPE(FsMsnParticipant, fs_msn_participant, FS_TYPE_PARTICIPANT);

static void
fs_msn_participant_class_init (FsMsnParticipantClass *klass)
{
}

static void
fs_msn_participant_init (FsMsnParticipant *self)
{
}

FsMsnParticipant *fs_msn_participant_new (void)
{
  return g_object_new (FS_TYPE_MSN_PARTICIPANT, NULL);
}
farstream-0.2.7/gst/fsmsnconference/fs-msn-stream.h0000664000076400007640000000465011710041461017257 00000000000000/*
 * Farstream - Farstream MSN Stream
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 *
 * fs-msn-stream.h - A Farstream MSN Stream
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_MSN_STREAM_H__
#define __FS_MSN_STREAM_H__

#include 

#include "fs-msn-participant.h"
#include "fs-msn-session.h"

G_BEGIN_DECLS

/* TYPE MACROS */
#define FS_TYPE_MSN_STREAM \
  (fs_msn_stream_get_type ())
#define FS_MSN_STREAM(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_MSN_STREAM, FsMsnStream))
#define FS_MSN_STREAM_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_MSN_STREAM, FsMsnStreamClass))
#define FS_IS_MSN_STREAM(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_MSN_STREAM))
#define FS_IS_MSN_STREAM_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_MSN_STREAM))
#define FS_MSN_STREAM_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_MSN_STREAM, FsMsnStreamClass))
#define FS_MSN_STREAM_CAST(obj) ((FsMsnStream*) (obj))

typedef struct _FsMsnStream FsMsnStream;
typedef struct _FsMsnStreamClass FsMsnStreamClass;
typedef struct _FsMsnStreamPrivate FsMsnStreamPrivate;


struct _FsMsnStreamClass
{
  FsStreamClass parent_class;

};

/**
 * FsMsnStream:
 *
 */
struct _FsMsnStream
{
  FsStream parent;

  /*< private >*/
  FsMsnStreamPrivate *priv;
};

GType fs_msn_stream_get_type (void);

FsMsnStream *fs_msn_stream_new (FsMsnSession *session,
    FsMsnParticipant *participant,
    FsStreamDirection direction,
    FsMsnConference *conference);

void fs_msn_stream_set_tos_locked (FsMsnStream *self, gint tos);


G_END_DECLS

#endif /* __FS_MSN_STREAM_H__ */
farstream-0.2.7/gst/fsmsnconference/fs-msn-cam-recv-conference.c0000664000076400007640000000516712401500475021570 00000000000000/*
 * Farstream - Farstream MSN Conference Implementation
 *
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2009 Collabora Ltd.
 *  @author: Olivier Crete 
 *
 * fs-msn-recv-conference.c - MSN implementation for Farstream Conference
 *   Gstreamer Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:element-fsmsncamrecvconference
 * @short_description: Farstream MSN Receive Conference Gstreamer Element
 *
 * This element implements the unidirection webcam feature found in various
 * version of MSN Messenger (tm) and Windows Live Messenger (tm). This is
 * to receive someone else's webcam.
 */


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-msn-cam-recv-conference.h"

#include "fs-msn-conference.h"
#include "fs-msn-session.h"
#include "fs-msn-stream.h"
#include "fs-msn-participant.h"

#define GST_CAT_DEFAULT fsmsnconference_debug


G_DEFINE_TYPE (FsMsnCamRecvConference, fs_msn_cam_recv_conference,
    FS_TYPE_MSN_CONFERENCE);


static void
fs_msn_cam_recv_conference_class_init (FsMsnCamRecvConferenceClass * klass)
{
  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);

  gst_element_class_set_metadata (gstelement_class,
      "Farstream MSN Reception Conference",
      "Generic/Bin/MSN",
      "A Farstream MSN Reception Conference",
      "Richard Spiers , "
      "Youness Alaoui , "
      "Olivier Crete ");
}

static void
fs_msn_cam_recv_conference_init (FsMsnCamRecvConference *self)
{
  FsMsnConference *conf = FS_MSN_CONFERENCE (self);
  GstElementFactory *fact = NULL;

  GST_DEBUG_OBJECT (conf, "fs_msn_cam_recv_conference_init");

  conf->max_direction = FS_DIRECTION_RECV;

  fact = gst_element_factory_find ("mimenc");
  if (fact)
    gst_object_unref (fact);
  else
    g_set_error (&conf->missing_element_error,
        FS_ERROR, FS_ERROR_CONSTRUCTION,
        "mimenc missing");
}

farstream-0.2.7/gst/fsmsnconference/fs-msn-participant.h0000664000076400007640000000476112401500475020310 00000000000000/*
 * Farstream - Farstream MSN Participant
 *
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2008 Richard Spiers 
 *
 * fs-msn-participant.h - A Farstream MSN Participant gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_MSN_PARTICIPANT_H__
#define __FS_MSN_PARTICIPANT_H__

#include 

G_BEGIN_DECLS

/* TYPE MACROS */
#define FS_TYPE_MSN_PARTICIPANT (fs_msn_participant_get_type())
#define FS_MSN_PARTICIPANT(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_MSN_PARTICIPANT, \
                              FsMsnParticipant))
#define FS_MSN_PARTICIPANT_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_MSN_PARTICIPANT, \
                           FsMsnParticipantClass))
#define FS_IS_MSN_PARTICIPANT(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_MSN_PARTICIPANT))
#define FS_IS_MSN_PARTICIPANT_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_MSN_PARTICIPANT))
#define FS_MSN_PARTICIPANT_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_MSN_PARTICIPANT, \
                              FsMsnParticipantClass))
#define FS_MSN_PARTICIPANT_CAST(obj) ((FsMsnParticipant *) (obj))

typedef struct _FsMsnParticipant FsMsnParticipant;
typedef struct _FsMsnParticipantClass FsMsnParticipantClass;
typedef struct _FsMsnParticipantPrivate FsMsnParticipantPrivate;

struct _FsMsnParticipantClass
{
  FsParticipantClass parent_class;

  /*virtual functions */

  /*< private >*/
  FsMsnParticipantPrivate *priv;
};

/**
 * FsMsnParticipant:
 *
 */
struct _FsMsnParticipant
{
  FsParticipant parent;
  FsMsnParticipantPrivate *priv;
};

GType fs_msn_participant_get_type (void);

FsMsnParticipant *fs_msn_participant_new (void);

G_END_DECLS

#endif /* __FS_MSN_PARTICIPANT_H__ */
farstream-0.2.7/gst/fsmsnconference/fs-msn-session.h0000664000076400007640000000501211710041461017440 00000000000000/*
 * Farstream - Farstream MSN Session
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 *
 * fs-msn-session.h - A Farstream Msn Session gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_MSN_SESSION_H__
#define __FS_MSN_SESSION_H__

#include 

#include 

#include "fs-msn-conference.h"

G_BEGIN_DECLS

/* TYPE MACROS */
#define FS_TYPE_MSN_SESSION \
  (fs_msn_session_get_type ())
#define FS_MSN_SESSION(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_MSN_SESSION, FsMsnSession))
#define FS_MSN_SESSION_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_MSN_SESSION, FsMsnSessionClass))
#define FS_IS_MSN_SESSION(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_MSN_SESSION))
#define FS_IS_MSN_SESSION_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_MSN_SESSION))
#define FS_MSN_SESSION_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_MSN_SESSION, FsMsnSessionClass))
#define FS_MSN_SESSION_CAST(obj) ((FsMsnSession *) (obj))

typedef struct _FsMsnSession FsMsnSession;
typedef struct _FsMsnSessionClass FsMsnSessionClass;
typedef struct _FsMsnSessionPrivate FsMsnSessionPrivate;

struct _FsMsnSessionClass
  {
    FsSessionClass parent_class;
  };

/**
 * FsMsnSession:
 *
 */
struct _FsMsnSession
{
  FsSession parent;

  /* Protected by the conf lock */
  GstElement *valve;

  /*< private >*/

  FsMsnSessionPrivate *priv;
};


GType fs_msn_session_get_type (void);

FsMsnSession *fs_msn_session_new (FsMediaType media_type,
    FsMsnConference *conference,
    GError **error);

void fs_msn_session_new_recv_pad (FsMsnSession *session,
    GstPad *new_pad,
    guint32 ssrc, guint pt);

G_END_DECLS

#endif /* __FS_MSN_SESSION_H__ */
farstream-0.2.7/gst/Makefile.in0000664000076400007640000005445712462321046013320 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 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@

# include this at the end of $MODULE/ext/Makefile.am to force make to
# build subdirectories in parallel when make -jN is used. We will end up
# descending into all subdirectories a second time, but only after the first
# (parallel) run has finished, so it should go right through the second time.
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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@
target_triplet = @target@
DIST_COMMON = $(top_srcdir)/common/parallel-subdirs.mak \
	$(srcdir)/Makefile.in $(srcdir)/Makefile.am
subdir = gst
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
	$(top_srcdir)/common/m4/as-auto-alt.m4 \
	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
	$(top_srcdir)/common/m4/as-libtool.m4 \
	$(top_srcdir)/common/m4/as-python.m4 \
	$(top_srcdir)/common/m4/as-scrub-include.m4 \
	$(top_srcdir)/common/m4/as-version.m4 \
	$(top_srcdir)/common/m4/gst-arch.m4 \
	$(top_srcdir)/common/m4/gst-args.m4 \
	$(top_srcdir)/common/m4/gst-check.m4 \
	$(top_srcdir)/common/m4/gst-error.m4 \
	$(top_srcdir)/common/m4/gst-glib2.m4 \
	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
	$(top_srcdir)/common/m4/gst-plugindir.m4 \
	$(top_srcdir)/common/m4/gst.m4 \
	$(top_srcdir)/common/m4/gtk-doc.m4 \
	$(top_srcdir)/common/m4/pkg.m4 \
	$(top_srcdir)/m4/introspection.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
	ctags-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 \
	tags-recursive uninstall-recursive
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
  distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
  $(RECURSIVE_TARGETS) \
  $(RECURSIVE_CLEAN_TARGETS) \
  $(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
	distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
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@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ERROR_CFLAGS = @ERROR_CFLAGS@
EXEEXT = @EXEEXT@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FS_AGE = @FS_AGE@
FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@
FS_APIVERSION = @FS_APIVERSION@
FS_API_VERSION = @FS_API_VERSION@
FS_CFLAGS = @FS_CFLAGS@
FS_CURRENT = @FS_CURRENT@
FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@
FS_LIBS = @FS_LIBS@
FS_LIBVERSION = @FS_LIBVERSION@
FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@
FS_LICENSE = @FS_LICENSE@
FS_LT_LDFLAGS = @FS_LT_LDFLAGS@
FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@
FS_PLUGINS_ALL = @FS_PLUGINS_ALL@
FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@
FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@
FS_PLUGIN_PATH = @FS_PLUGIN_PATH@
FS_PREFIX = @FS_PREFIX@
FS_REVISION = @FS_REVISION@
FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@
FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@
GCOV = @GCOV@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LDFLAGS = @GIO_LDFLAGS@
GIO_LIBS = @GIO_LIBS@
GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_PREFIX = @GLIB_PREFIX@
GLIB_REQ = @GLIB_REQ@
GREP = @GREP@
GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
GST_API_VERSION = @GST_API_VERSION@
GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
GST_BASE_LIBS = @GST_BASE_LIBS@
GST_CFLAGS = @GST_CFLAGS@
GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
GST_CHECK_LIBS = @GST_CHECK_LIBS@
GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@
GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
GST_LIBS = @GST_LIBS@
GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
GST_TOOLS_DIR = @GST_TOOLS_DIR@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GUPNP_CFLAGS = @GUPNP_CFLAGS@
GUPNP_LIBS = @GUPNP_LIBS@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NICE_CFLAGS = @NICE_CFLAGS@
NICE_LIBS = @NICE_LIBS@
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@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VALGRIND_PATH = @VALGRIND_PATH@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
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@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = $(FS_PLUGINS_SELECTED)
DIST_SUBDIRS = $(FS_PLUGINS_ALL)
all: all-recursive

.SUFFIXES:
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/common/parallel-subdirs.mak $(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 gst/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu gst/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_srcdir)/common/parallel-subdirs.mak:

$(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

# 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.
$(am__recursive_targets):
	@fail=; \
	if $(am__make_keepgoing); then \
	  failcom='fail=yes'; \
	else \
	  failcom='exit 1'; \
	fi; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	case "$@" in \
	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
	  *) list='$(SUBDIRS)' ;; \
	esac; \
	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"

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	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; \
	$(am__define_uniq_tagged_files); \
	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-recursive

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	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"
cscopelist: cscopelist-recursive

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

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 \
	    $(am__make_dryrun) \
	      || test -d "$(distdir)/$$subdir" \
	      || $(MKDIR_P) "$(distdir)/$$subdir" \
	      || exit 1; \
	    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
installdirs: installdirs-recursive
installdirs-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-recursive
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
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 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-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:

.MAKE: $(am__recursive_targets) install-am install-strip

.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
	check-am clean clean-generic clean-libtool cscopelist-am ctags \
	ctags-am 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-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-am uninstall uninstall-am


.PHONY: independent-subdirs $(SUBDIRS)

independent-subdirs: $(SUBDIRS)

$(SUBDIRS):
	$(MAKE) -C $@

all-recursive: independent-subdirs

# 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:
farstream-0.2.7/gst/Makefile.am0000664000076400007640000000016511710041461013265 00000000000000SUBDIRS = $(FS_PLUGINS_SELECTED)
DIST_SUBDIRS = $(FS_PLUGINS_ALL)

include $(top_srcdir)/common/parallel-subdirs.mak
farstream-0.2.7/gst/fsrawconference/0000775000076400007640000000000012462323000014456 500000000000000farstream-0.2.7/gst/fsrawconference/fs-raw-conference.c0000664000076400007640000002367312401500475020067 00000000000000/*
 * Farstream - Farstream Raw Conference Implementation
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Mike Ruprecht 
 *
 * fs-raw-conference.c - Raw implementation for Farstream Conference Gstreamer
 *                       Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:element-fsrawconference
 * @short_description: Farstream Raw Conference Gstreamer Elements Base class
 *
 * This element implements a raw content stream over which any Gstreamer
 * content may travel.
 */


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-raw-conference.h"

#include "fs-raw-session.h"
#include "fs-raw-participant.h"

GST_DEBUG_CATEGORY (fsrawconference_debug);
#define GST_CAT_DEFAULT fsrawconference_debug

/* Signals */
enum
{
  LAST_SIGNAL
};

/* Properties */
enum
{
  PROP_0
};


static GstStaticPadTemplate fs_raw_conference_sink_template =
  GST_STATIC_PAD_TEMPLATE ("sink_%d",
      GST_PAD_SINK,
      GST_PAD_SOMETIMES,
      GST_STATIC_CAPS_ANY);

static GstStaticPadTemplate fs_raw_conference_src_template =
  GST_STATIC_PAD_TEMPLATE ("src_%d",
      GST_PAD_SRC,
      GST_PAD_SOMETIMES,
      GST_STATIC_CAPS_ANY);

#define FS_RAW_CONFERENCE_GET_PRIVATE(obj) \
  (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FS_TYPE_RAW_CONFERENCE,  \
      FsRawConferencePrivate))

struct _FsRawConferencePrivate
{
  gboolean disposed;

  /* Protected by GST_OBJECT_LOCK */
  GList *sessions;
  guint max_session_id;

  GList *participants;

  /* Array of all internal threads, as GThreads */
  GPtrArray *threads;
};

G_DEFINE_TYPE (FsRawConference, fs_raw_conference, FS_TYPE_CONFERENCE);

static FsSession *fs_raw_conference_new_session (FsConference *conf,
    FsMediaType media_type,
    GError **error);

static FsParticipant *fs_raw_conference_new_participant (FsConference *conf,
    GError **error);

static void _remove_session (gpointer user_data,
    GObject *where_the_object_was);

static void _remove_participant (gpointer user_data,
    GObject *where_the_object_was);

static void fs_raw_conference_handle_message (
    GstBin * bin,
    GstMessage * message);

static void
fs_raw_conference_dispose (GObject * object)
{
  FsRawConference *self = FS_RAW_CONFERENCE (object);
  GList *item;

  if (self->priv->disposed)
    return;

  for (item = g_list_first (self->priv->participants);
       item;
       item = g_list_next (item))
    g_object_weak_unref (G_OBJECT (item->data), _remove_participant, self);
  g_list_free (self->priv->participants);
  self->priv->participants = NULL;

  self->priv->disposed = TRUE;

  G_OBJECT_CLASS (fs_raw_conference_parent_class)->dispose (object);
}

static void
fs_raw_conference_finalize (GObject * object)
{
  FsRawConference *self = FS_RAW_CONFERENCE (object);

  g_ptr_array_free (self->priv->threads, TRUE);

  G_OBJECT_CLASS (fs_raw_conference_parent_class)->finalize (object);
}

static void
fs_raw_conference_class_init (FsRawConferenceClass * klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
  FsConferenceClass *baseconf_class = FS_CONFERENCE_CLASS (klass);
  GstBinClass *gstbin_class = GST_BIN_CLASS (klass);

  g_type_class_add_private (klass, sizeof (FsRawConferencePrivate));

  GST_DEBUG_CATEGORY_INIT (fsrawconference_debug, "fsrawconference", 0,
                           "Farstream Raw Conference Element");

  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_raw_conference_sink_template));
  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_raw_conference_src_template));

  baseconf_class->new_session =
    GST_DEBUG_FUNCPTR (fs_raw_conference_new_session);
  baseconf_class->new_participant =
    GST_DEBUG_FUNCPTR (fs_raw_conference_new_participant);

  gstbin_class->handle_message =
    GST_DEBUG_FUNCPTR (fs_raw_conference_handle_message);

  gobject_class->finalize = GST_DEBUG_FUNCPTR (fs_raw_conference_finalize);
  gobject_class->dispose = GST_DEBUG_FUNCPTR (fs_raw_conference_dispose);
}


static void
fs_raw_conference_init (FsRawConference *conf)
{
  GST_DEBUG_OBJECT (conf, "fs_raw_conference_init");

  conf->priv = FS_RAW_CONFERENCE_GET_PRIVATE (conf);

  conf->priv->max_session_id = 1;

  conf->priv->threads = g_ptr_array_new ();
}

/**
 * fs_rtp_conference_get_session_by_id_locked
 * @self: The #FsRawConference
 * @session_id: The session id
 *
 * Gets the #FsRawSession from a list of sessions or NULL if it doesnt exist
 * You have to hold the GST_OBJECT_LOCK to call this function.
 *
 * Return value: A #FsRawSession (unref after use) or NULL if it doesn't exist
 */
static FsRawSession *
fs_raw_conference_get_session_by_id_locked (FsRawConference *self,
                                            guint session_id)
{
  GList *item = NULL;

  for (item = g_list_first (self->priv->sessions);
       item;
       item = g_list_next (item)) {
    FsRawSession *session = item->data;

    if (session->id == session_id) {
      g_object_ref (session);
      break;
    }
  }

  if (item)
    return FS_RAW_SESSION (item->data);
  else
    return NULL;
}

static void
_remove_session (gpointer user_data,
                 GObject *where_the_object_was)
{
  FsRawConference *self = FS_RAW_CONFERENCE (user_data);

  GST_OBJECT_LOCK (self);
  self->priv->sessions =
    g_list_remove_all (self->priv->sessions, where_the_object_was);
  GST_OBJECT_UNLOCK (self);
}

static void
_remove_participant (gpointer user_data,
                     GObject *where_the_object_was)
{
  FsRawConference *self = FS_RAW_CONFERENCE (user_data);

  GST_OBJECT_LOCK (self);
  self->priv->participants =
    g_list_remove_all (self->priv->participants, where_the_object_was);
  GST_OBJECT_UNLOCK (self);
}

static FsSession *
fs_raw_conference_new_session (FsConference *conf,
                               FsMediaType media_type,
                               GError **error)
{
  FsRawConference *self = FS_RAW_CONFERENCE (conf);
  FsRawSession *new_session = NULL;
  guint id;

  GST_OBJECT_LOCK (self);
  do {
    id = self->priv->max_session_id++;
  } while (fs_raw_conference_get_session_by_id_locked (self, id));
  GST_OBJECT_UNLOCK (self);

  new_session = fs_raw_session_new (media_type, self, id, error);

  if (new_session == NULL)
    return NULL;

  GST_OBJECT_LOCK (self);
  self->priv->sessions = g_list_append (self->priv->sessions, new_session);
  GST_OBJECT_UNLOCK (self);

  g_object_weak_ref (G_OBJECT (new_session), _remove_session, self);

  return FS_SESSION (new_session);
}


static FsParticipant *
fs_raw_conference_new_participant (FsConference *conf,
                                   GError **error)
{
  FsRawConference *self = FS_RAW_CONFERENCE (conf);
  FsParticipant *new_participant = NULL;

  new_participant = FS_PARTICIPANT_CAST (fs_raw_participant_new ());

  GST_OBJECT_LOCK (self);
  self->priv->participants = g_list_append (self->priv->participants,
      new_participant);
  GST_OBJECT_UNLOCK (self);

  g_object_weak_ref (G_OBJECT (new_participant), _remove_participant, self);

  return new_participant;
}

static void
fs_raw_conference_handle_message (
    GstBin * bin,
    GstMessage * message)
{
  FsRawConference *self = FS_RAW_CONFERENCE (bin);

  switch (GST_MESSAGE_TYPE (message)) {
    case GST_MESSAGE_STREAM_STATUS:
    {
      GstStreamStatusType type;
      guint i;

      gst_message_parse_stream_status (message, &type, NULL);

      switch (type)
      {
        case GST_STREAM_STATUS_TYPE_ENTER:
          GST_OBJECT_LOCK (self);
          for (i = 0; i < self->priv->threads->len; i++)
          {
            if (g_ptr_array_index (self->priv->threads, i) ==
                g_thread_self ())
              goto done;
          }
          g_ptr_array_add (self->priv->threads, g_thread_self ());
        done:
          GST_OBJECT_UNLOCK (self);
          break;

        case GST_STREAM_STATUS_TYPE_LEAVE:
          GST_OBJECT_LOCK (self);
          while (g_ptr_array_remove_fast (self->priv->threads,
                  g_thread_self ()));
          GST_OBJECT_UNLOCK (self);
          break;

        default:
          /* Do nothing */
          break;
      }
    }
      break;
    default:
      break;
  }

  /* forward all messages to the parent */
  GST_BIN_CLASS (fs_raw_conference_parent_class)->handle_message (bin,
      message);
}

/**
 * fs_codec_to_gst_caps
 * @codec: A #FsCodec to be converted
 *
 * This function converts a #FsCodec to a fixed #GstCaps.
 *
 * Return value: A newly-allocated #GstCaps or %NULL if the codec was %NULL
 */

GstCaps *
fs_raw_codec_to_gst_caps (const FsCodec *codec)
{
  GstCaps *caps;

  if (codec == NULL || codec->encoding_name == NULL)
    return NULL;

  caps = gst_caps_from_string (codec->encoding_name);

  if (!caps)
    return NULL;

  if (gst_caps_is_fixed (caps))
    return caps;

  gst_caps_unref (caps);
  return NULL;
}

gboolean
fs_raw_conference_is_internal_thread (FsRawConference *self)
{
  guint i;
  gboolean ret = FALSE;

  GST_OBJECT_LOCK (self);
  for (i = 0; i < self->priv->threads->len; i++)
  {
    if (g_ptr_array_index (self->priv->threads, i) == g_thread_self ())
    {
      ret = TRUE;
      break;
    }
  }
  GST_OBJECT_UNLOCK (self);

  return ret;
}

farstream-0.2.7/gst/fsrawconference/fs-raw-conference-plugin.c0000664000076400007640000000335112401500475021352 00000000000000/*
 * Farstream - Farstream Raw Conference Implementation
 *
 * Copyright 2007,2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Mike Ruprecht 
 * Copyright 2007 Nokia Corp.
 *
 * gstfsrawconference.c - Raw implementation for Farstream Conference Gstreamer
 *                        Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include 

#include "fs-raw-conference.h"

static gboolean plugin_init (GstPlugin * plugin)
{
  return gst_element_register (plugin, "fsrawconference",
                               GST_RANK_NONE, FS_TYPE_RAW_CONFERENCE);
}

#ifdef BUILD_GTK_DOC
void
fs_raw_plugin_init_real (void)
{
  gst_plugin_register_static (
#else
GST_PLUGIN_DEFINE (
#endif
  GST_VERSION_MAJOR,
  GST_VERSION_MINOR,
  fsrawconference,
  "Farstream Raw Conference plugin",
  plugin_init,
  VERSION,
  "LGPL",
  "Farstream",
  "http://www.freedesktop.org/wiki/Software/Farstream"
#ifdef BUILD_GTK_DOC
  );
}
#else
)
#endif
farstream-0.2.7/gst/fsrawconference/fs-raw-stream.c0000664000076400007640000006053012401500475017244 00000000000000/*
 * Farstream - Farstream Raw Stream
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Youness Alaoui 
 *  @author: Mike Ruprecht 
 *
 * fs-raw-stream.c - A Farstream Raw Stream gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-raw-stream
 * @short_description: A raw stream in a #FsRawSession in a #FsRawConference
 *
 * This list of remote codecs set on this stream should contain one or two
 * codecs. The first codec in this list represents the codec the remote side
 * will be sending. The second codec, if given, represents what should be
 * sent to the remote side. If only one codec is passed, and the codec to
 * send to the remote side hasn't yet been chosen, it will use the first
 * and only codec in the list.
 *
 * The codec content of the codec are ignored except for the "encoding_name"
 * parameter which has to be a valid caps string that can be parsed with
 * gst_caps_to_string() to produce fixed caps.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-raw-stream.h"
#include "fs-raw-session.h"

#include 
#include 

#include 


#define GST_CAT_DEFAULT fsrawconference_debug

/* Signals */
enum
{
  LAST_SIGNAL
};

/* props */
enum
{
  PROP_0,
  PROP_DIRECTION,
  PROP_PARTICIPANT,
  PROP_SESSION,
  PROP_CONFERENCE,
  PROP_STREAM_TRANSMITTER,
  PROP_REMOTE_CODECS,
};



struct _FsRawStreamPrivate
{
  FsRawConference *conference;
  FsRawSession *session;
  FsRawParticipant *participant;
  FsStreamDirection direction;
  FsStreamTransmitter *stream_transmitter;

  GList *remote_codecs;

  gulong local_candidates_prepared_handler_id;
  gulong new_active_candidate_pair_handler_id;
  gulong new_local_candidate_handler_id;
  gulong error_handler_id;
  gulong state_changed_handler_id;

  stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb;
  gpointer user_data;

  GMutex mutex; /* protects the conference */

  gboolean disposed;

#ifdef DEBUG_MUTEXES
  guint count;
#endif
};


G_DEFINE_TYPE(FsRawStream, fs_raw_stream, FS_TYPE_STREAM);

#define FS_RAW_STREAM_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RAW_STREAM, FsRawStreamPrivate))

#ifdef DEBUG_MUTEXES

#define FS_RAW_STREAM_LOCK(stream) \
  do { \
    g_mutex_lock (&FS_RAW_STREAM (stream)->priv->mutex);   \
    g_assert (FS_RAW_STREAM (stream)->priv->count == 0);  \
    FS_RAW_STREAM (stream)->priv->count++;                \
  } while (0);
#define FS_RAW_STREAM_UNLOCK(stream) \
  do { \
    g_assert (FS_RAW_STREAM (stream)->priv->count == 1);  \
    FS_RAW_STREAM (stream)->priv->count--;                \
    g_mutex_unlock (&FS_RAW_STREAM (stream)->priv->mutex); \
  } while (0);
#define FS_RAW_STREAM_GET_LOCK(stream) \
  (FS_RAW_STREAM (stream)->priv->mutex)
#else
#define FS_RAW_STREAM_LOCK(stream) \
  g_mutex_lock (&(stream)->priv->mutex)
#define FS_RAW_STREAM_UNLOCK(stream) \
  g_mutex_unlock (&(stream)->priv->mutex)
#define FS_RAW_STREAM_GET_LOCK(stream) \
  (&(stream)->priv->mutex)
#endif

static void fs_raw_stream_dispose (GObject *object);
static void fs_raw_stream_finalize (GObject *object);

static void fs_raw_stream_get_property (GObject *object,
                                        guint prop_id,
                                        GValue *value,
                                        GParamSpec *pspec);
static void fs_raw_stream_set_property (GObject *object,
                                        guint prop_id,
                                        const GValue *value,
                                        GParamSpec *pspec);

static void _local_candidates_prepared (
    FsStreamTransmitter *stream_transmitter,
    gpointer user_data);
static void _new_active_candidate_pair (
    FsStreamTransmitter *stream_transmitter,
    FsCandidate *candidate1,
    FsCandidate *candidate2,
    gpointer user_data);
static void _new_local_candidate (
    FsStreamTransmitter *stream_transmitter,
    FsCandidate *candidate,
    gpointer user_data);
static void _transmitter_error (
    FsStreamTransmitter *stream_transmitter,
    gint errorno,
    gchar *error_msg,
    gpointer user_data);
static void _state_changed (FsStreamTransmitter *stream_transmitter,
    guint component,
    FsStreamState state,
    gpointer user_data);

static gboolean fs_raw_stream_add_remote_candidates (FsStream *stream,
    GList *candidates,
    GError **error);
static gboolean fs_raw_stream_force_remote_candidates (FsStream *stream,
    GList *remote_candidates,
    GError **error);
static gboolean fs_raw_stream_set_remote_codecs (FsStream *stream,
    GList *remote_codecs,
    GError **error);
static gboolean fs_raw_stream_set_transmitter (FsStream *stream,
    const gchar *transmitter,
    GParameter *stream_transmitter_parameters,
    guint stream_transmitter_n_parameters,
    GError **error);

static void
fs_raw_stream_class_init (FsRawStreamClass *klass)
{
  GObjectClass *gobject_class;
  FsStreamClass *stream_class = FS_STREAM_CLASS (klass);

  gobject_class = (GObjectClass *) klass;

  gobject_class->set_property = fs_raw_stream_set_property;
  gobject_class->get_property = fs_raw_stream_get_property;
  gobject_class->dispose = fs_raw_stream_dispose;
  gobject_class->finalize = fs_raw_stream_finalize;

  stream_class->add_remote_candidates = fs_raw_stream_add_remote_candidates;
  stream_class->force_remote_candidates = fs_raw_stream_force_remote_candidates;
  stream_class->set_remote_codecs = fs_raw_stream_set_remote_codecs;
  stream_class->set_transmitter = fs_raw_stream_set_transmitter;

  g_type_class_add_private (klass, sizeof (FsRawStreamPrivate));

  g_object_class_override_property (gobject_class,
      PROP_DIRECTION,
      "direction");
  g_object_class_override_property (gobject_class,
      PROP_PARTICIPANT,
      "participant");
  g_object_class_override_property (gobject_class,
      PROP_SESSION,
      "session");
  g_object_class_override_property (gobject_class,
      PROP_REMOTE_CODECS,
      "remote-codecs");

  g_object_class_install_property (gobject_class,
      PROP_CONFERENCE,
      g_param_spec_object ("conference",
          "The Conference this stream refers to",
          "This is a conveniance pointer for the Conference",
          FS_TYPE_RAW_CONFERENCE,
          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  /**
   * FsRawStream:stream-transmitter:
   *
   * The #FsStreamTransmitter for this stream.
   *
   */
  g_object_class_install_property (gobject_class,
      PROP_STREAM_TRANSMITTER,
      g_param_spec_object ("stream-transmitter",
        "The transmitter use by the stream",
        "An FsStreamTransmitter used by this stream",
        FS_TYPE_STREAM_TRANSMITTER,
        G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
}

static void
fs_raw_stream_init (FsRawStream *self)
{
  /* member init */
  self->priv = FS_RAW_STREAM_GET_PRIVATE (self);

  self->priv->session = NULL;
  self->priv->participant = NULL;

  self->priv->direction = FS_DIRECTION_NONE;

  g_mutex_init (&self->priv->mutex);
}


static FsRawConference *
fs_raw_stream_get_conference (FsRawStream *self, GError **error)
{
  FsRawConference *conference;

  FS_RAW_STREAM_LOCK (self);
  conference = self->priv->conference;
  if (conference)
    g_object_ref (conference);
  FS_RAW_STREAM_UNLOCK (self);

  if (!conference)
    g_set_error (error, FS_ERROR, FS_ERROR_DISPOSED,
        "Called function after stream has been disposed");

  return conference;
}

static void
fs_raw_stream_dispose (GObject *obj)
{
  FsRawStream *self = FS_RAW_STREAM (obj);
  FsRawConference *conference;
  FsStreamTransmitter *st;

  FS_RAW_STREAM_LOCK (self);
  conference = self->priv->conference;
  self->priv->conference = NULL;
  FS_RAW_STREAM_UNLOCK (self);

  if (!conference)
    return;


  if (fs_raw_conference_is_internal_thread (conference))
  {
    g_critical ("You MUST call fs_stream_destroy() from your main thread, "
        "this FsStream may now be leaked");
    return;
  }

  st = self->priv->stream_transmitter;
  self->priv->stream_transmitter = NULL;

  if (st)
  {
    g_signal_handler_disconnect (st,
        self->priv->local_candidates_prepared_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->new_active_candidate_pair_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->new_local_candidate_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->error_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->state_changed_handler_id);

    fs_stream_transmitter_stop (st);
    g_object_unref (st);
  }

  if (self->priv->participant)
  {
    g_object_unref (self->priv->participant);
    self->priv->participant = NULL;
  }

  if (self->priv->session)
  {
    fs_raw_session_remove_stream (self->priv->session, (FsStream *)self);

    g_object_unref (self->priv->session);
    self->priv->session = NULL;
  }

  gst_object_unref (conference);

  G_OBJECT_CLASS (fs_raw_stream_parent_class)->dispose (obj);
}

static void
fs_raw_stream_finalize (GObject *object)
{
  FsRawStream *self = FS_RAW_STREAM (object);

  fs_codec_list_destroy (self->priv->remote_codecs);

  g_mutex_clear (&self->priv->mutex);

  G_OBJECT_CLASS (fs_raw_stream_parent_class)->finalize (object);
}


static void
fs_raw_stream_get_property (GObject *object,
                            guint prop_id,
                            GValue *value,
                            GParamSpec *pspec)
{
  FsRawStream *self = FS_RAW_STREAM (object);
  FsRawConference *conference = fs_raw_stream_get_conference (self, NULL);

  if (!conference &&
      !(pspec->flags & (G_PARAM_CONSTRUCT_ONLY | G_PARAM_CONSTRUCT)))
    return;

  if (conference)
    GST_OBJECT_LOCK (conference);

  switch (prop_id)
  {
    case PROP_SESSION:
      g_value_set_object (value, self->priv->session);
      break;
    case PROP_PARTICIPANT:
      g_value_set_object (value, self->priv->participant);
      break;
    case PROP_DIRECTION:
      g_value_set_flags (value, self->priv->direction);
      break;
    case PROP_CONFERENCE:
      g_value_set_object (value, self->priv->conference);
      break;
    case PROP_REMOTE_CODECS:
      g_value_set_boxed (value, self->priv->remote_codecs);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  if (conference)
  {
    GST_OBJECT_UNLOCK (conference);
    gst_object_unref (conference);
  }
}

static void
fs_raw_stream_set_property (GObject *object,
                            guint prop_id,
                            const GValue *value,
                            GParamSpec *pspec)
{
  FsRawStream *self = FS_RAW_STREAM (object);
  FsRawConference *conference = fs_raw_stream_get_conference (self, NULL);

  if (!conference &&
      !(pspec->flags & (G_PARAM_CONSTRUCT_ONLY | G_PARAM_CONSTRUCT)))
    return;

  if (conference)
    GST_OBJECT_LOCK (conference);

  switch (prop_id)
  {
    case PROP_SESSION:
      self->priv->session = FS_RAW_SESSION (g_value_dup_object (value));
      break;
    case PROP_PARTICIPANT:
      self->priv->participant = FS_RAW_PARTICIPANT (g_value_dup_object (value));
      break;
    case PROP_DIRECTION:
      if (g_value_get_flags (value) != self->priv->direction)
      {
        FsStreamDirection direction = g_value_get_flags (value);
        FsStreamTransmitter *st;

        self->priv->direction = direction;
        st = self->priv->stream_transmitter;
        if (st)
          g_object_ref (st);

        if (conference)
          GST_OBJECT_UNLOCK (conference);
        if (st)
        {
          g_object_set (st, "sending",
              (direction & FS_DIRECTION_SEND) ? TRUE : FALSE, NULL);
          g_object_unref (st);
        }
        if (self->priv->session)
          fs_raw_session_update_direction (self->priv->session, direction);
        if (conference)
          GST_OBJECT_LOCK (conference);
      }
      break;
    case PROP_CONFERENCE:
      self->priv->conference = FS_RAW_CONFERENCE (g_value_dup_object (value));
      break;
    case PROP_STREAM_TRANSMITTER:
      self->priv->stream_transmitter = g_value_get_object (value);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  if (conference)
  {
    GST_OBJECT_UNLOCK (conference);
    gst_object_unref (conference);
  }
}


static void
_local_candidates_prepared (FsStreamTransmitter *stream_transmitter,
    gpointer user_data)
{
  FsRawStream *self = FS_RAW_STREAM (user_data);
  GstElement *conf = GST_ELEMENT (fs_raw_stream_get_conference (self, NULL));

  if (!conf)
    return;

  gst_element_post_message (conf,
      gst_message_new_element (GST_OBJECT (conf),
          gst_structure_new ("farstream-local-candidates-prepared",
              "stream", FS_TYPE_STREAM, self,
              NULL)));

  gst_object_unref (conf);
}


static void
_new_active_candidate_pair (
    FsStreamTransmitter *stream_transmitter,
    FsCandidate *local_candidate,
    FsCandidate *remote_candidate,
    gpointer user_data)
{
  FsRawStream *self = FS_RAW_STREAM (user_data);
  GstElement *conf = GST_ELEMENT (fs_raw_stream_get_conference (self, NULL));

  if (!conf)
    return;

  gst_element_post_message (conf,
      gst_message_new_element (GST_OBJECT (conf),
          gst_structure_new ("farstream-new-active-candidate-pair",
              "stream", FS_TYPE_STREAM, self,
              "local-candidate", FS_TYPE_CANDIDATE, local_candidate,
              "remote-candidate", FS_TYPE_CANDIDATE, remote_candidate,
              NULL)));

  gst_object_unref (conf);
}


static void
_new_local_candidate (
    FsStreamTransmitter *stream_transmitter,
    FsCandidate *candidate,
    gpointer user_data)
{
  FsRawStream *self = FS_RAW_STREAM (user_data);
  GstElement *conf = GST_ELEMENT (fs_raw_stream_get_conference (self, NULL));

  if (!conf)
    return;

  gst_element_post_message (conf,
      gst_message_new_element (GST_OBJECT (conf),
          gst_structure_new ("farstream-new-local-candidate",
              "stream", FS_TYPE_STREAM, self,
              "candidate", FS_TYPE_CANDIDATE, candidate,
              NULL)));

  gst_object_unref (conf);
}

static void
_transmitter_error (
    FsStreamTransmitter *stream_transmitter,
    gint errorno,
    gchar *error_msg,
    gpointer user_data)
{
  FsStream *stream = FS_STREAM (user_data);

  fs_stream_emit_error (stream, errorno, error_msg);
}

static void
_state_changed (FsStreamTransmitter *stream_transmitter,
    guint component,
    FsStreamState state,
    gpointer user_data)
{
  FsRawStream *self = FS_RAW_STREAM (user_data);
  GstElement *conf = GST_ELEMENT (fs_raw_stream_get_conference (self, NULL));

  if (!conf)
    return;

  gst_element_post_message (conf,
      gst_message_new_element (GST_OBJECT (conf),
          gst_structure_new ("farstream-component-state-changed",
              "stream", FS_TYPE_STREAM, self,
              "component", G_TYPE_UINT, component,
              "state", FS_TYPE_STREAM_STATE, state,
              NULL)));

  gst_object_unref (conf);

  if (component == 1 && state == FS_STREAM_STATE_FAILED)
    fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONNECTION_FAILED,
        "Could not establish connection");
}

/**
 * fs_raw_stream_add_remote_candidate:
 */
static gboolean
fs_raw_stream_add_remote_candidates (FsStream *stream, GList *candidates,
                                     GError **error)
{
  FsRawStream *self = FS_RAW_STREAM (stream);
  FsRawConference *conference = fs_raw_stream_get_conference (self, error);
  FsStreamTransmitter *st = NULL;
  gboolean ret = FALSE;

  if (!conference)
    return FALSE;

  GST_OBJECT_LOCK (conference);
  if (self->priv->stream_transmitter)
    st = g_object_ref (self->priv->stream_transmitter);
  GST_OBJECT_UNLOCK (conference);

  if (st)
  {
    ret = fs_stream_transmitter_add_remote_candidates (st, candidates, error);
    g_object_unref (st);
  }

  gst_object_unref (conference);

  return ret;
}


/**
 * fs_raw_stream_force_remote_candidate:
 */
static gboolean
fs_raw_stream_force_remote_candidates (FsStream *stream,
    GList *candidates,
    GError **error)
{
  FsRawStream *self = FS_RAW_STREAM (stream);
  FsRawConference *conference = fs_raw_stream_get_conference (self, error);
  FsStreamTransmitter *st = NULL;
  gboolean ret = FALSE;

  if (!conference)
    return FALSE;

  GST_OBJECT_LOCK (conference);
  if (self->priv->stream_transmitter)
    st = g_object_ref (self->priv->stream_transmitter);
  GST_OBJECT_UNLOCK (conference);

  if (st)
  {
    ret = fs_stream_transmitter_force_remote_candidates (st, candidates, error);
    g_object_unref (st);
  }

  gst_object_unref (conference);

  return ret;
}


/**
 * fs_raw_stream_set_remote_codecs:
 * @stream: an #FsStream
 * @remote_codecs: a #GList of #FsCodec representing the remote codecs
 * @error: location of a #GError, or NULL if no error occured
 *
 * This function will set the list of remote codecs for this stream. This list
 * should contain one or two codecs. The first codec in this list represents
 * the codec the remote side will be sending. The second codec, if given,
 * represents what should be sent to the remote side. If only one codec is
 * passed, and the codec to send to the remote side hasn't yet been chosen,
 * it will use the first and only codec in the list. If the list isn't in this
 * format, @error will be set and %FALSE will be returned. The @remote_codecs
 * list will be copied so it must be free'd using fs_codec_list_destroy()
 * when done.
 *
 * Returns: %FALSE if the remote codecs couldn't be set.
 */
static gboolean
fs_raw_stream_set_remote_codecs (FsStream *stream,
    GList *remote_codecs,
    GError **error)
{
  FsRawStream *self = FS_RAW_STREAM (stream);
  GList *item = NULL;
  FsRawSession *session;
  FsRawConference *conf = fs_raw_stream_get_conference (self, error);
  gboolean is_new = TRUE;

  if (!conf)
    return FALSE;

  GST_OBJECT_LOCK (conf);
  session = self->priv->session;
  if (session)
    g_object_ref (session);
  GST_OBJECT_UNLOCK (conf);

  if (!session)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_DISPOSED,
          "Called function after stream has been disposed");
      return FALSE;
    }

  if (remote_codecs == NULL) {
    g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
        "You can not set NULL remote codecs");
    goto error;
  }

  if (g_list_length (remote_codecs) > 2) {
    g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
        "Too many codecs passed");
    goto error;
  }

  for (item = g_list_first (remote_codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;
    GstCaps *caps;

    if (!codec->encoding_name)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The codec must have an encoding name");
      goto error;
    }

    caps = fs_raw_codec_to_gst_caps (codec);
    if (!caps)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The encoding name for codec %s is not valid GstCaps",
          codec->encoding_name);
      goto error;
    }
    gst_caps_unref (caps);
  }

  GST_OBJECT_LOCK (conf);
  if (self->priv->remote_codecs)
  {
    is_new = !fs_codec_list_are_equal (self->priv->remote_codecs,
        remote_codecs);
    fs_codec_list_destroy (self->priv->remote_codecs);
  }
  self->priv->remote_codecs = fs_codec_list_copy (remote_codecs);
  GST_OBJECT_UNLOCK (conf);

  if (is_new)
    g_object_notify (G_OBJECT (stream), "remote-codecs");

  g_object_unref (session);
  g_object_unref (conf);
  return TRUE;

 error:

  g_object_unref (session);
  g_object_unref (conf);
  return FALSE;
}


/**
 * fs_raw_stream_new:
 * @session: The #FsRawSession this stream is a child of
 * @participant: The #FsRawParticipant this stream is for
 * @direction: the initial #FsDirection for this stream
 *
 *
 * This function create a new stream
 *
 * Returns: the newly created string or NULL on error
 */

FsRawStream *
fs_raw_stream_new (FsRawSession *session,
    FsRawParticipant *participant,
    FsStreamDirection direction,
    FsRawConference *conference,
    stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb,
    gpointer user_data)
{
  FsRawStream *self;

  g_return_val_if_fail (session, NULL);
  g_return_val_if_fail (participant, NULL);

  self = g_object_new (FS_TYPE_RAW_STREAM,
      "session", session,
      "participant", participant,
      "direction", direction,
      "conference", conference,
      NULL);

  self->priv->get_new_stream_transmitter_cb = get_new_stream_transmitter_cb;
  self->priv->user_data = user_data;

  return self;
}


static gboolean
fs_raw_stream_set_transmitter (FsStream *stream,
    const gchar *transmitter,
    GParameter *stream_transmitter_parameters,
    guint stream_transmitter_n_parameters,
    GError **error)
{
  FsRawStream *self = FS_RAW_STREAM (stream);
  FsRawConference *conf = fs_raw_stream_get_conference (self, error);
  FsStreamTransmitter *st;
  FsRawSession *session = NULL;

  if (!conf)
    return FALSE;

  GST_OBJECT_LOCK (conf);
  if (self->priv->stream_transmitter)
  {
    g_set_error (error, FS_ERROR, FS_ERROR_ALREADY_EXISTS,
        "Stream transmitter already set");
    GST_OBJECT_UNLOCK (conf);
    goto error;
  }

  session = g_object_ref (self->priv->session);
  GST_OBJECT_UNLOCK (conf);

  st = self->priv->get_new_stream_transmitter_cb (self, transmitter,
      FS_PARTICIPANT (self->priv->participant), stream_transmitter_parameters,
      stream_transmitter_n_parameters,error, self->priv->user_data);

  if (!st)
    goto error;

  GST_OBJECT_LOCK (conf);
  self->priv->stream_transmitter = st;
  GST_OBJECT_UNLOCK (conf);


  g_object_set (self->priv->stream_transmitter, "sending",
      (self->priv->direction & FS_DIRECTION_SEND) ? TRUE : FALSE, NULL);

  self->priv->local_candidates_prepared_handler_id =
      g_signal_connect_object (self->priv->stream_transmitter,
          "local-candidates-prepared",
          G_CALLBACK (_local_candidates_prepared),
          self, 0);
  self->priv->new_active_candidate_pair_handler_id =
      g_signal_connect_object (self->priv->stream_transmitter,
          "new-active-candidate-pair",
          G_CALLBACK (_new_active_candidate_pair),
          self, 0);
  self->priv->new_local_candidate_handler_id =
      g_signal_connect_object (self->priv->stream_transmitter,
          "new-local-candidate",
          G_CALLBACK (_new_local_candidate),
          self, 0);
  self->priv->error_handler_id =
      g_signal_connect_object (self->priv->stream_transmitter,
          "error",
          G_CALLBACK (_transmitter_error),
          self, 0);
  self->priv->state_changed_handler_id =
      g_signal_connect_object (self->priv->stream_transmitter,
          "state-changed",
          G_CALLBACK (_state_changed),
          self, 0);

  if (!fs_stream_transmitter_gather_local_candidates (
        self->priv->stream_transmitter, error))
  {
    GST_OBJECT_LOCK (conf);
    self->priv->stream_transmitter = NULL;
    GST_OBJECT_UNLOCK (conf);

    g_signal_handler_disconnect (st,
        self->priv->local_candidates_prepared_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->new_active_candidate_pair_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->new_local_candidate_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->error_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->state_changed_handler_id);

    fs_stream_transmitter_stop (st);
    /* We want to remove the transmitter, but not the stream */
    fs_raw_session_remove_stream (session, NULL);
    goto error;
  }

  g_object_unref (conf);
  g_object_unref (session);

  g_object_notify (G_OBJECT (self), "remote-codecs");
  g_object_notify (G_OBJECT (self), "direction");
  return TRUE;

error:
  if (session)
    g_object_unref (session);
  g_object_unref (conf);

  return FALSE;
}
farstream-0.2.7/gst/fsrawconference/fs-raw-stream.h0000664000076400007640000000544211710041462017250 00000000000000/*
 * Farstream - Farstream Raw Stream
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007,2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Mike Ruprecht 
 *
 * fs-raw-stream.h - A Farstream Raw Stream
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_RAW_STREAM_H__
#define __FS_RAW_STREAM_H__

#include 
#include 

#include "fs-raw-participant.h"
#include "fs-raw-session.h"

G_BEGIN_DECLS

/* TYPE MACROS */
#define FS_TYPE_RAW_STREAM \
  (fs_raw_stream_get_type ())
#define FS_RAW_STREAM(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RAW_STREAM, FsRawStream))
#define FS_RAW_STREAM_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RAW_STREAM, FsRawStreamClass))
#define FS_IS_RAW_STREAM(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RAW_STREAM))
#define FS_IS_RAW_STREAM_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RAW_STREAM))
#define FS_RAW_STREAM_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RAW_STREAM, FsRawStreamClass))
#define FS_RAW_STREAM_CAST(obj) ((FsRawStream*) (obj))

typedef struct _FsRawStream FsRawStream;
typedef struct _FsRawStreamClass FsRawStreamClass;
typedef struct _FsRawStreamPrivate FsRawStreamPrivate;


struct _FsRawStreamClass
{
  FsStreamClass parent_class;

};

/**
 * FsRawStream:
 *
 */
struct _FsRawStream
{
  FsStream parent;

  /*< private >*/
  FsRawStreamPrivate *priv;
};

GType fs_raw_stream_get_type (void);

typedef FsStreamTransmitter* (*stream_get_new_stream_transmitter_cb) (
  FsRawStream *stream, const gchar *transmitter_name,
  FsParticipant *participant, GParameter *parameters, guint n_parameters,
  GError **error, gpointer user_data);

FsRawStream *fs_raw_stream_new (FsRawSession *session,
    FsRawParticipant *participant,
    FsStreamDirection direction,
    FsRawConference *conference,
    stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb,
    gpointer user_data);


G_END_DECLS

#endif /* __FS_RAW_STREAM_H__ */
farstream-0.2.7/gst/fsrawconference/Makefile.in0000664000076400007640000007153412462321046016465 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 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@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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@
target_triplet = @target@

# Optionally build a library to allow building the gtk-doc
@ENABLE_GTK_DOC_TRUE@am__append_1 = libfsrawconference_doc.la
subdir = gst/fsrawconference
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
	$(top_srcdir)/common/m4/as-auto-alt.m4 \
	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
	$(top_srcdir)/common/m4/as-libtool.m4 \
	$(top_srcdir)/common/m4/as-python.m4 \
	$(top_srcdir)/common/m4/as-scrub-include.m4 \
	$(top_srcdir)/common/m4/as-version.m4 \
	$(top_srcdir)/common/m4/gst-arch.m4 \
	$(top_srcdir)/common/m4/gst-args.m4 \
	$(top_srcdir)/common/m4/gst-check.m4 \
	$(top_srcdir)/common/m4/gst-error.m4 \
	$(top_srcdir)/common/m4/gst-glib2.m4 \
	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
	$(top_srcdir)/common/m4/gst-plugindir.m4 \
	$(top_srcdir)/common/m4/gst.m4 \
	$(top_srcdir)/common/m4/gtk-doc.m4 \
	$(top_srcdir)/common/m4/pkg.m4 \
	$(top_srcdir)/m4/introspection.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
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__uninstall_files_from_dir = { \
  test -z "$$files" \
    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
         $(am__cd) "$$dir" && rm -f $$files; }; \
  }
am__installdirs = "$(DESTDIR)$(plugindir)" \
	"$(DESTDIR)$(preferencesdir)"
LTLIBRARIES = $(noinst_LTLIBRARIES) $(plugin_LTLIBRARIES)
libfsrawconference_convenience_la_LIBADD =
am_libfsrawconference_convenience_la_OBJECTS = fs-raw-conference.lo \
	fs-raw-session.lo fs-raw-stream.lo fs-raw-participant.lo
libfsrawconference_convenience_la_OBJECTS =  \
	$(am_libfsrawconference_convenience_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
am__DEPENDENCIES_1 =
libfsrawconference_la_DEPENDENCIES =  \
	libfsrawconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
am_libfsrawconference_la_OBJECTS = fs-raw-conference-plugin.lo
libfsrawconference_la_OBJECTS = $(am_libfsrawconference_la_OBJECTS)
libfsrawconference_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(libfsrawconference_la_LDFLAGS) \
	$(LDFLAGS) -o $@
am__DEPENDENCIES_2 = libfsrawconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
@ENABLE_GTK_DOC_TRUE@libfsrawconference_doc_la_DEPENDENCIES =  \
@ENABLE_GTK_DOC_TRUE@	$(am__DEPENDENCIES_2)
am__objects_1 = fs-raw-conference-plugin.lo
@ENABLE_GTK_DOC_TRUE@nodist_libfsrawconference_doc_la_OBJECTS =  \
@ENABLE_GTK_DOC_TRUE@	$(am__objects_1)
libfsrawconference_doc_la_OBJECTS =  \
	$(nodist_libfsrawconference_doc_la_OBJECTS)
@ENABLE_GTK_DOC_TRUE@am_libfsrawconference_doc_la_rpath =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(libfsrawconference_convenience_la_SOURCES) \
	$(libfsrawconference_la_SOURCES) \
	$(nodist_libfsrawconference_doc_la_SOURCES)
DIST_SOURCES = $(libfsrawconference_convenience_la_SOURCES) \
	$(libfsrawconference_la_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
DATA = $(preferences_DATA)
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ERROR_CFLAGS = @ERROR_CFLAGS@
EXEEXT = @EXEEXT@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FS_AGE = @FS_AGE@
FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@
FS_APIVERSION = @FS_APIVERSION@
FS_API_VERSION = @FS_API_VERSION@
FS_CFLAGS = @FS_CFLAGS@
FS_CURRENT = @FS_CURRENT@
FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@
FS_LIBS = @FS_LIBS@
FS_LIBVERSION = @FS_LIBVERSION@
FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@
FS_LICENSE = @FS_LICENSE@
FS_LT_LDFLAGS = @FS_LT_LDFLAGS@
FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@
FS_PLUGINS_ALL = @FS_PLUGINS_ALL@
FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@
FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@
FS_PLUGIN_PATH = @FS_PLUGIN_PATH@
FS_PREFIX = @FS_PREFIX@
FS_REVISION = @FS_REVISION@
FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@
FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@
GCOV = @GCOV@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LDFLAGS = @GIO_LDFLAGS@
GIO_LIBS = @GIO_LIBS@
GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_PREFIX = @GLIB_PREFIX@
GLIB_REQ = @GLIB_REQ@
GREP = @GREP@
GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
GST_API_VERSION = @GST_API_VERSION@
GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
GST_BASE_LIBS = @GST_BASE_LIBS@
GST_CFLAGS = @GST_CFLAGS@
GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
GST_CHECK_LIBS = @GST_CHECK_LIBS@
GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@
GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
GST_LIBS = @GST_LIBS@
GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
GST_TOOLS_DIR = @GST_TOOLS_DIR@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GUPNP_CFLAGS = @GUPNP_CFLAGS@
GUPNP_LIBS = @GUPNP_LIBS@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NICE_CFLAGS = @NICE_CFLAGS@
NICE_LIBS = @NICE_LIBS@
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@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VALGRIND_PATH = @VALGRIND_PATH@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
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@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
plugin_LTLIBRARIES = libfsrawconference.la

# First build a convenience lib with the common stuff so its not built twice
noinst_LTLIBRARIES = libfsrawconference-convenience.la $(am__append_1)
libfsrawconference_convenience_la_SOURCES = \
	fs-raw-conference.c \
	fs-raw-session.c \
	fs-raw-stream.c \
	fs-raw-participant.c

noinst_HEADERS = \
	fs-raw-conference.h \
	fs-raw-session.h \
	fs-raw-stream.h \
	fs-raw-participant.h

AM_CFLAGS = \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_CFLAGS)


# Build the main plugin
libfsrawconference_la_SOURCES = fs-raw-conference-plugin.c
libfsrawconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libfsrawconference_la_LIBADD = \
	libfsrawconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(FS_LIBS) \
	$(GST_BASE_LIBS) \
	$(GST_LIBS)

preferencesdir = $(datadir)/$(PACKAGE_TARNAME)/$(FS_APIVERSION)/fsrawconference
preferences_DATA = \
	default-element-properties

EXTRA_DIST = $(preferences_DATA)
@ENABLE_GTK_DOC_TRUE@nodist_libfsrawconference_doc_la_CFLAGS = -DBUILD_GTK_DOC
@ENABLE_GTK_DOC_TRUE@nodist_libfsrawconference_doc_la_SOURCES = \
@ENABLE_GTK_DOC_TRUE@	$(libfsrawconference_la_SOURCES)

@ENABLE_GTK_DOC_TRUE@libfsrawconference_doc_la_LIBADD = $(libfsrawconference_la_LIBADD)
@ENABLE_GTK_DOC_TRUE@CLEANFILES = $(BUILT_SOURCES)
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(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 gst/fsrawconference/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu gst/fsrawconference/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):

clean-noinstLTLIBRARIES:
	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
	@list='$(noinst_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
	@$(NORMAL_INSTALL)
	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
	list2=; for p in $$list; do \
	  if test -f $$p; then \
	    list2="$$list2 $$p"; \
	  else :; fi; \
	done; \
	test -z "$$list2" || { \
	  echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \
	  $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \
	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \
	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \
	}

uninstall-pluginLTLIBRARIES:
	@$(NORMAL_UNINSTALL)
	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
	for p in $$list; do \
	  $(am__strip_dir) \
	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \
	done

clean-pluginLTLIBRARIES:
	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
	@list='$(plugin_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

libfsrawconference-convenience.la: $(libfsrawconference_convenience_la_OBJECTS) $(libfsrawconference_convenience_la_DEPENDENCIES) $(EXTRA_libfsrawconference_convenience_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK)  $(libfsrawconference_convenience_la_OBJECTS) $(libfsrawconference_convenience_la_LIBADD) $(LIBS)

libfsrawconference.la: $(libfsrawconference_la_OBJECTS) $(libfsrawconference_la_DEPENDENCIES) $(EXTRA_libfsrawconference_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(libfsrawconference_la_LINK) -rpath $(plugindir) $(libfsrawconference_la_OBJECTS) $(libfsrawconference_la_LIBADD) $(LIBS)

libfsrawconference_doc.la: $(libfsrawconference_doc_la_OBJECTS) $(libfsrawconference_doc_la_DEPENDENCIES) $(EXTRA_libfsrawconference_doc_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK) $(am_libfsrawconference_doc_la_rpath) $(libfsrawconference_doc_la_OBJECTS) $(libfsrawconference_doc_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-raw-conference-plugin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-raw-conference.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-raw-participant.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-raw-session.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-raw-stream.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
install-preferencesDATA: $(preferences_DATA)
	@$(NORMAL_INSTALL)
	@list='$(preferences_DATA)'; test -n "$(preferencesdir)" || list=; \
	if test -n "$$list"; then \
	  echo " $(MKDIR_P) '$(DESTDIR)$(preferencesdir)'"; \
	  $(MKDIR_P) "$(DESTDIR)$(preferencesdir)" || exit 1; \
	fi; \
	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)$(preferencesdir)'"; \
	  $(INSTALL_DATA) $$files "$(DESTDIR)$(preferencesdir)" || exit $$?; \
	done

uninstall-preferencesDATA:
	@$(NORMAL_UNINSTALL)
	@list='$(preferences_DATA)'; test -n "$(preferencesdir)" || list=; \
	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
	dir='$(DESTDIR)$(preferencesdir)'; $(am__uninstall_files_from_dir)

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	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-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	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"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

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) $(DATA) $(HEADERS)
installdirs:
	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(preferencesdir)"; 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:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
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-generic clean-libtool clean-noinstLTLIBRARIES \
	clean-pluginLTLIBRARIES 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-pluginLTLIBRARIES install-preferencesDATA

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-pluginLTLIBRARIES uninstall-preferencesDATA

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-noinstLTLIBRARIES clean-pluginLTLIBRARIES \
	cscopelist-am ctags ctags-am 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-html install-html-am \
	install-info install-info-am install-man install-pdf \
	install-pdf-am install-pluginLTLIBRARIES \
	install-preferencesDATA 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 tags-am uninstall uninstall-am \
	uninstall-pluginLTLIBRARIES uninstall-preferencesDATA


# 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:
farstream-0.2.7/gst/fsrawconference/Makefile.am0000664000076400007640000000253212401500475016442 00000000000000plugin_LTLIBRARIES = libfsrawconference.la


# First build a convenience lib with the common stuff so its not built twice

noinst_LTLIBRARIES = libfsrawconference-convenience.la

libfsrawconference_convenience_la_SOURCES = \
	fs-raw-conference.c \
	fs-raw-session.c \
	fs-raw-stream.c \
	fs-raw-participant.c

noinst_HEADERS = \
	fs-raw-conference.h \
	fs-raw-session.h \
	fs-raw-stream.h \
	fs-raw-participant.h


AM_CFLAGS = \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_CFLAGS)

# Build the main plugin

libfsrawconference_la_SOURCES = fs-raw-conference-plugin.c

libfsrawconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libfsrawconference_la_LIBADD = \
	libfsrawconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(FS_LIBS) \
	$(GST_BASE_LIBS) \
	$(GST_LIBS)

preferencesdir = $(datadir)/$(PACKAGE_TARNAME)/$(FS_APIVERSION)/fsrawconference
preferences_DATA = \
	default-element-properties

EXTRA_DIST = $(preferences_DATA)

# Optionally build a library to allow building the gtk-doc

if ENABLE_GTK_DOC
noinst_LTLIBRARIES += libfsrawconference_doc.la

nodist_libfsrawconference_doc_la_CFLAGS = -DBUILD_GTK_DOC

nodist_libfsrawconference_doc_la_SOURCES = \
	$(libfsrawconference_la_SOURCES)

libfsrawconference_doc_la_LIBADD = $(libfsrawconference_la_LIBADD)

CLEANFILES = $(BUILT_SOURCES)

endif

farstream-0.2.7/gst/fsrawconference/fs-raw-participant.c0000664000076400007640000000404011710041461020256 00000000000000/*
 * Farstream - Farstream Raw Participant
 *
 * Copyright 2007,2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Mike Ruprecht 
 * Copyright 2007 Nokia Corp.
 *
 * fs-raw-participant.c - A Raw Farstream Participant gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-raw-participant
 * @short_description: A Raw participant in a #FsRawConference
 *
 * This object represents one participant or person in a raw conference
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-raw-participant.h"

/* Signals */
enum
{
  LAST_SIGNAL
};

/* props */
enum
{
  PROP_0,
};

G_DEFINE_TYPE(FsRawParticipant, fs_raw_participant, FS_TYPE_PARTICIPANT);

/*
struct _FsRawParticipantPrivate
{
};

#define FS_RAW_PARTICIPANT_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_PARTICIPANT, \
   FsRawParticipantPrivate))
*/

// static guint signals[LAST_SIGNAL] = { 0 };

static void
fs_raw_participant_class_init (FsRawParticipantClass *klass)
{
  // g_type_class_add_private (klass, sizeof (FsRawParticipantPrivate));
}

static void
fs_raw_participant_init (FsRawParticipant *self)
{
  /* member init */
  // self->priv = FS_RAW_PARTICIPANT_GET_PRIVATE (self);
}

FsRawParticipant *fs_raw_participant_new (void)
{
  return g_object_new (FS_TYPE_RAW_PARTICIPANT, NULL);
}
farstream-0.2.7/gst/fsrawconference/fs-raw-session.c0000664000076400007640000012210512461773672017452 00000000000000/*
 * Farstream - Farstream Raw Session
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007-2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Youness Alaoui 
 *  @author: Mike Ruprecht 
 *
 * fs-raw-session.c - A Farstream Raw Session gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-raw-session
 * @short_description: A  Raw session in a #FsRawConference
 *
 * The transmitter parameters to the fs_session_new_stream() function are
 * used to set the initial value of the construct properties of the stream
 * object.
 *
 * The codecs preferences can not be modified. The codec should have the
 * encoding_name property set to the value returned by gst_caps_to_string.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-raw-session.h"

#include 

#include 
#include 

#include "fs-raw-stream.h"
#include "fs-raw-participant.h"

#define GST_CAT_DEFAULT fsrawconference_debug

/* Signals */
enum
{
  LAST_SIGNAL
};

/* props */
enum
{
  PROP_0,
  PROP_MEDIA_TYPE,
  PROP_ID,
  PROP_SINK_PAD,
  PROP_CODEC_PREFERENCES,
  PROP_CODECS,
  PROP_CODECS_WITHOUT_CONFIG,
  PROP_CURRENT_SEND_CODEC,
  PROP_CONFERENCE,
  PROP_TOS
};



struct _FsRawSessionPrivate
{
  FsMediaType media_type;

  FsRawConference *conference;
  FsRawStream *stream;

  GError *construction_error;

  GstPad *media_sink_pad;
  GstElement *send_capsfilter;
  GList *codecs;
  FsCodec *send_codec;
  gboolean transmitter_sink_added;

  GstElement *send_tee;
  GstPad *send_tee_pad;

  GstElement *transform_bin;
  GstElement *fakesink;

  GstElement *send_valve;

  GstElement *recv_capsfilter;
  GstElement *recv_valve;
  gulong transmitter_recv_probe_id;
  GstPad *transmitter_src_pad;
  GstPad *src_ghost_pad;

  FsTransmitter *transmitter;

  guint tos; /* Protected by conf lock */

  GMutex mutex; /* protects the conference */

#ifdef DEBUG_MUTEXES
  guint count;
#endif
};

G_DEFINE_TYPE (FsRawSession, fs_raw_session, FS_TYPE_SESSION);

#define FS_RAW_SESSION_GET_PRIVATE(o)                                   \
  (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RAW_SESSION, FsRawSessionPrivate))

#ifdef DEBUG_MUTEXES

#define FS_RAW_SESSION_LOCK(session)                            \
  do {                                                          \
    g_mutex_lock (&FS_RAW_SESSION (session)->priv->mutex);       \
    g_assert (FS_RAW_SESSION (session)->priv->count == 0);      \
    FS_RAW_SESSION (session)->priv->count++;                    \
  } while (0);
#define FS_RAW_SESSION_UNLOCK(session)                          \
  do {                                                          \
    g_assert (FS_RAW_SESSION (session)->priv->count == 1);      \
    FS_RAW_SESSION (session)->priv->count--;                    \
    g_mutex_unlock (&FS_RAW_SESSION (session)->priv->mutex);     \
  } while (0);
#define FS_RAW_SESSION_GET_LOCK(session)        \
  (FS_RAW_SESSION (session)->priv->mutex)
#else
#define FS_RAW_SESSION_LOCK(session)            \
  g_mutex_lock (&(session)->priv->mutex)
#define FS_RAW_SESSION_UNLOCK(session)          \
  g_mutex_unlock (&(session)->priv->mutex)
#define FS_RAW_SESSION_GET_LOCK(session)        \
  ((session)->priv->mutex)
#endif

static void fs_raw_session_dispose (GObject *object);
static void fs_raw_session_finalize (GObject *object);

static void fs_raw_session_get_property (GObject *object,
    guint prop_id,
    GValue *value,
    GParamSpec *pspec);
static void fs_raw_session_set_property (GObject *object,
    guint prop_id,
    const GValue *value,
    GParamSpec *pspec);

static void fs_raw_session_constructed (GObject *object);

static FsStream *fs_raw_session_new_stream (FsSession *session,
    FsParticipant *participant,
    FsStreamDirection direction,
    GError **error);

static gchar **fs_raw_session_list_transmitters (FsSession *session);

static GType fs_raw_session_get_stream_transmitter_type (FsSession *session,
    const gchar *transmitter);


static GstElement *_create_transform_bin (FsRawSession *self, GError **error);

static FsStreamTransmitter *_stream_get_stream_transmitter (FsRawStream *stream,
    const gchar *transmitter_name,
    FsParticipant *participant,
    GParameter *parameters,
    guint n_parameters,
    GError **error,
    gpointer user_data);


static void
fs_raw_session_class_init (FsRawSessionClass *klass)
{
  GObjectClass *gobject_class;
  FsSessionClass *session_class;

  gobject_class = (GObjectClass *) klass;
  session_class = FS_SESSION_CLASS (klass);

  gobject_class->set_property = fs_raw_session_set_property;
  gobject_class->get_property = fs_raw_session_get_property;
  gobject_class->constructed = fs_raw_session_constructed;

  session_class->new_stream = fs_raw_session_new_stream;
  session_class->list_transmitters = fs_raw_session_list_transmitters;
  session_class->get_stream_transmitter_type =
      fs_raw_session_get_stream_transmitter_type;

  g_object_class_override_property (gobject_class,
      PROP_MEDIA_TYPE, "media-type");
  g_object_class_override_property (gobject_class,
      PROP_ID, "id");
  g_object_class_override_property (gobject_class,
      PROP_SINK_PAD, "sink-pad");

  g_object_class_override_property (gobject_class,
      PROP_CODEC_PREFERENCES, "codec-preferences");
  g_object_class_override_property (gobject_class,
      PROP_CODECS, "codecs");
  g_object_class_override_property (gobject_class,
      PROP_CODECS_WITHOUT_CONFIG, "codecs-without-config");
  g_object_class_override_property (gobject_class,
      PROP_CURRENT_SEND_CODEC, "current-send-codec");
  g_object_class_override_property (gobject_class,
      PROP_TOS, "tos");
  g_object_class_override_property (gobject_class,
      PROP_CONFERENCE, "conference");

  gobject_class->dispose = fs_raw_session_dispose;
  gobject_class->finalize = fs_raw_session_finalize;

  g_type_class_add_private (klass, sizeof (FsRawSessionPrivate));
}

static void
fs_raw_session_init (FsRawSession *self)
{
  /* member init */
  self->priv = FS_RAW_SESSION_GET_PRIVATE (self);
  self->priv->construction_error = NULL;

  g_mutex_init (&self->priv->mutex);

  self->priv->media_type = FS_MEDIA_TYPE_LAST + 1;
}


static FsRawConference *
fs_raw_session_get_conference (FsRawSession *self, GError **error)
{
  FsRawConference *conference;

  FS_RAW_SESSION_LOCK (self);
  conference = self->priv->conference;
  if (conference)
    g_object_ref (conference);
  FS_RAW_SESSION_UNLOCK (self);

  if (!conference)
    g_set_error (error, FS_ERROR, FS_ERROR_DISPOSED,
        "Called function after session has been disposed");

  return conference;
}

static void
fs_raw_session_dispose (GObject *object)
{
  FsRawSession *self = FS_RAW_SESSION (object);
  GstBin *conferencebin = NULL;
  FsRawConference *conference = NULL;
  GstElement *send_valve = NULL;
  GstElement *send_capsfilter = NULL;
  GstElement *transform = NULL;
  GstElement *send_tee = NULL;
  GstElement *fakesink = NULL;
  GstPad *send_tee_pad = NULL;
  FsTransmitter *transmitter = NULL;
  GstPad *media_sink_pad = NULL;

  FS_RAW_SESSION_LOCK (self);
  conference = self->priv->conference;
  self->priv->conference = NULL;
  FS_RAW_SESSION_UNLOCK (self);

  if (!conference)
    goto out;

  conferencebin = GST_BIN (conference);

  if (!conferencebin)
    goto out;

  GST_OBJECT_LOCK (conference);
  send_valve = self->priv->send_valve;
  self->priv->send_valve = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (send_valve)
  {
    gst_element_set_locked_state (send_valve, TRUE);
    gst_bin_remove (conferencebin, send_valve);
    gst_element_set_state (send_valve, GST_STATE_NULL);
    gst_object_unref (send_valve);
  }

  GST_OBJECT_LOCK (conference);
  send_capsfilter = self->priv->send_capsfilter;
  self->priv->send_capsfilter = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (send_capsfilter)
  {
    gst_element_set_locked_state (send_capsfilter, TRUE);
    gst_bin_remove (conferencebin, send_capsfilter);
    gst_element_set_state (send_capsfilter, GST_STATE_NULL);
    gst_object_unref (send_capsfilter);
  }

  if (self->priv->stream)
  {
    FsStream *stream = FS_STREAM (self->priv->stream);
    fs_raw_session_remove_stream(self, stream);
    fs_stream_destroy (stream);
  }

  GST_OBJECT_LOCK (conference);
  transmitter = self->priv->transmitter;
  self->priv->transmitter = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (transmitter)
  {
    g_object_unref (transmitter);
  }

  GST_OBJECT_LOCK (conference);
  media_sink_pad = self->priv->media_sink_pad;
  self->priv->media_sink_pad = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (media_sink_pad)
  {
    gst_element_remove_pad (GST_ELEMENT (conference), media_sink_pad);
    gst_pad_set_active (media_sink_pad, FALSE);
    gst_object_unref (media_sink_pad);
  }

  GST_OBJECT_LOCK (conference);
  transform = self->priv->transform_bin;
  self->priv->transform_bin = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (transform)
  {
    gst_element_set_locked_state (transform, TRUE);
    gst_bin_remove (conferencebin, transform);
    gst_element_set_state (transform, GST_STATE_NULL);
    gst_object_unref (transform);
  }

  GST_OBJECT_LOCK (conference);
  fakesink = self->priv->fakesink;
  self->priv->fakesink = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (fakesink)
  {
    gst_element_set_locked_state (fakesink, TRUE);
    gst_bin_remove (conferencebin, fakesink);
    gst_element_set_state (fakesink, GST_STATE_NULL);
    gst_object_unref (fakesink);
  }

  GST_OBJECT_LOCK (conference);
  send_tee = self->priv->send_tee;
  self->priv->send_tee = NULL;

  send_tee_pad = self->priv->send_tee_pad;
  self->priv->send_tee_pad = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (send_tee)
  {
    gst_element_set_locked_state (send_tee, TRUE);
    gst_bin_remove (conferencebin, send_tee);
    gst_element_set_state (send_tee, GST_STATE_NULL);
    gst_object_unref (send_tee);
  }

  if (send_tee_pad != NULL)
    gst_object_unref (send_tee_pad);


  gst_object_unref (conference);

out:

  G_OBJECT_CLASS (fs_raw_session_parent_class)->dispose (object);
}

static void
fs_raw_session_finalize (GObject *object)
{
  FsRawSession *self = FS_RAW_SESSION (object);

  if (self->priv->codecs)
    fs_codec_list_destroy (self->priv->codecs);

  if (self->priv->send_codec)
    fs_codec_destroy (self->priv->send_codec);

  g_mutex_clear (&self->priv->mutex);

  G_OBJECT_CLASS (fs_raw_session_parent_class)->finalize (object);
}

static void
fs_raw_session_get_property (GObject *object,
    guint prop_id,
    GValue *value,
    GParamSpec *pspec)
{
  FsRawSession *self = FS_RAW_SESSION (object);
  FsRawConference *conference = fs_raw_session_get_conference (self, NULL);

  if (!conference)
    return;

  GST_OBJECT_LOCK (conference);

  switch (prop_id)
  {
    case PROP_MEDIA_TYPE:
      g_value_set_enum (value, self->priv->media_type);
      break;
    case PROP_ID:
      g_value_set_uint (value, self->id);
      break;
    case PROP_CONFERENCE:
      g_value_set_object (value, self->priv->conference);
      break;
    case PROP_SINK_PAD:
      g_value_set_object (value, self->priv->media_sink_pad);
      break;
    case PROP_CODEC_PREFERENCES:
      /* There are no preferences, so return NULL */
      break;
    case PROP_CODECS:
    case PROP_CODECS_WITHOUT_CONFIG:
      g_value_set_boxed (value, self->priv->codecs);
      break;
    case PROP_CURRENT_SEND_CODEC:
      g_value_set_boxed (value, self->priv->send_codec);
      break;
    case PROP_TOS:
      g_value_set_uint (value, self->priv->tos);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  GST_OBJECT_UNLOCK (conference);
  gst_object_unref (conference);
}

static void
fs_raw_session_set_property (GObject *object,
    guint prop_id,
    const GValue *value,
    GParamSpec *pspec)
{
  FsRawSession *self = FS_RAW_SESSION (object);
  FsRawConference *conference = fs_raw_session_get_conference (self, NULL);

  if (!conference && !(pspec->flags & G_PARAM_CONSTRUCT_ONLY))
    return;

  if (conference)
    GST_OBJECT_LOCK (conference);

  switch (prop_id)
  {
    case PROP_MEDIA_TYPE:
      self->priv->media_type = g_value_get_enum (value);
      break;
    case PROP_ID:
      self->id = g_value_get_uint (value);
      break;
    case PROP_CONFERENCE:
      self->priv->conference = FS_RAW_CONFERENCE (g_value_dup_object (value));
      break;
    case PROP_TOS:
      self->priv->tos = g_value_get_uint (value);
      if (self->priv->transmitter)
        g_object_set (self->priv->transmitter, "tos", self->priv->tos, NULL);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  if (conference)
  {
    GST_OBJECT_UNLOCK (conference);
    gst_object_unref (conference);
  }
}

static void
fs_raw_session_constructed (GObject *object)
{
  FsRawSession *self = FS_RAW_SESSION (object);
  GstPad *pad;
  gchar *tmp;

  if (self->id == 0)
  {
    g_error ("You can not instantiate this element directly, you MUST"
        " call fs_raw_session_new ()");
    return;
  }

  g_assert (self->priv->conference);

  tmp = g_strdup_printf ("send_capsfilter_%u", self->id);
  self->priv->send_capsfilter = gst_element_factory_make ("capsfilter", tmp);
  g_free (tmp);

  if (!self->priv->send_capsfilter)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not make send capsfilter");
    return;
  }

  gst_object_ref_sink (self->priv->send_capsfilter);

  if (!gst_bin_add (GST_BIN (self->priv->conference),
          self->priv->send_capsfilter))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not add capsfilter to conference");
    gst_object_unref (self->priv->send_capsfilter);
    self->priv->send_capsfilter = NULL;
    return;
  }

  if (!gst_element_sync_state_with_parent (self->priv->send_capsfilter))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not sync the send capsfilter's state with its parent");
    return;
  }

  self->priv->transform_bin = _create_transform_bin (self, NULL);

  if (self->priv->transform_bin == NULL)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not create transform bin");
    return;
  }

  gst_object_ref_sink (self->priv->transform_bin);
  if (!gst_bin_add (GST_BIN (self->priv->conference),
      self->priv->transform_bin))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not add transform bin to conference");
    gst_object_unref (self->priv->transform_bin);
    self->priv->transform_bin = NULL;
    return;
  }

  if (!gst_element_link_pads (self->priv->transform_bin, "src",
          self->priv->send_capsfilter, "sink"))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not link send transformbin and capsfilter");
    return;
  }

  if (!gst_element_sync_state_with_parent (self->priv->transform_bin))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not sync the send transformbin's state with its parent");
    return;
  }

  tmp = g_strdup_printf ("send_tee_%u", self->id);
  self->priv->send_tee = gst_element_factory_make ("tee", tmp);
  g_free (tmp);

  if (!self->priv->send_tee)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not make send tee");
    return;
  }

  gst_object_ref_sink (self->priv->send_tee);

  if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->send_tee))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not add send tee to conference");
    gst_object_unref (self->priv->send_tee);
    self->priv->send_tee = NULL;
    return;
  }

  self->priv->send_tee_pad = gst_element_get_request_pad (self->priv->send_tee,
    "src_%u");

  if (self->priv->send_tee_pad == NULL)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not create send tee pad");
    return;
  }

  pad = gst_element_get_static_pad (self->priv->transform_bin, "sink");
  if (pad == NULL)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not get transformbin sink pad");
    return;
  }

  if (GST_PAD_LINK_FAILED (gst_pad_link (self->priv->send_tee_pad, pad)))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not link send tee and transformbin");
    gst_object_unref (pad);
    return;
  }

  gst_object_unref (pad);

  self->priv->fakesink = gst_element_factory_make ("fakesink", NULL);
  if (!self->priv->fakesink)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not make fakesink");
    return;
  }

  g_object_set (self->priv->fakesink,
      "sync", FALSE,
      "async", FALSE,
      NULL);

  gst_object_ref_sink (self->priv->fakesink);
  if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->fakesink))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not add fakesink to conference");
    gst_object_unref (self->priv->fakesink);
    self->priv->fakesink = NULL;
    return;
  }

  if (!gst_element_link_pads (self->priv->send_tee, "src_%u",
          self->priv->fakesink, "sink"))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not link send send tee and fakesink");
    return;
  }

  if (!gst_element_sync_state_with_parent (self->priv->fakesink))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not sync the fakesinks state with its parent");
    return;
  }

  if (!gst_element_sync_state_with_parent (self->priv->send_tee))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not sync the send valve's state with its parent");
    gst_bin_remove (GST_BIN (self->priv->conference), self->priv->send_tee);
    return;
  }

  tmp = g_strdup_printf ("send_valve_%u", self->id);
  self->priv->send_valve = gst_element_factory_make ("valve", tmp);
  g_free (tmp);

  if (!self->priv->send_valve)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not make send valve");
    return;
  }

  gst_object_ref_sink (self->priv->send_valve);

  if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->send_valve))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not add valve to conference");
    gst_object_unref (self->priv->send_valve);
    self->priv->send_valve = NULL;
    return;
  }

  g_object_set (G_OBJECT (self->priv->send_valve), "drop", TRUE, NULL);

  if (!gst_element_sync_state_with_parent (self->priv->send_valve))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not sync the send valve's state with its parent");
    return;
  }

  if (!gst_element_link_pads (self->priv->send_valve, "src",
          self->priv->send_tee, "sink"))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION,
        "Could not link send valve and transformbin");
    return;
  }

  pad = gst_element_get_static_pad (self->priv->send_valve, "sink");
  tmp = g_strdup_printf ("sink_%u", self->id);
  self->priv->media_sink_pad = gst_ghost_pad_new (tmp, pad);
  g_free (tmp);
  gst_object_unref (pad);

  if (!self->priv->media_sink_pad)
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not create sink ghost pad");
    return;
  }

  gst_object_ref_sink (self->priv->media_sink_pad);

  gst_pad_set_active (self->priv->media_sink_pad, TRUE);
  if (!gst_element_add_pad (GST_ELEMENT (self->priv->conference),
          self->priv->media_sink_pad))
  {
    self->priv->construction_error = g_error_new (FS_ERROR,
        FS_ERROR_CONSTRUCTION, "Could not add sink pad to conference");
    gst_object_unref (self->priv->media_sink_pad);
    self->priv->media_sink_pad = NULL;
    return;
  }

  if (G_OBJECT_CLASS (fs_raw_session_parent_class)->constructed)
    G_OBJECT_CLASS (fs_raw_session_parent_class)->constructed (object);
}

static GstElement *
_create_transform_bin (FsRawSession *self, GError **error)
{
  FsMediaType mtype = self->priv->media_type;

  if (mtype == FS_MEDIA_TYPE_AUDIO)
    return gst_parse_bin_from_description_full (
      "audioconvert ! audioresample ! audioconvert", TRUE, NULL,
      GST_PARSE_FLAG_NONE, error);
  else if (mtype == FS_MEDIA_TYPE_VIDEO)
    return gst_parse_bin_from_description_full ("videoconvert ! videoscale",
        TRUE, NULL, GST_PARSE_FLAG_NONE, error);
  else if (mtype == FS_MEDIA_TYPE_APPLICATION)
    return gst_element_factory_make ("identify", NULL);

  g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
    "No transform bin for this media type");
  return NULL;
}

static void
_stream_remote_codecs_changed (FsRawStream *stream, GParamSpec *pspec,
    FsRawSession *self)
{
  GList *codecs;
  GstCaps *caps;
  FsCodec *codec = NULL;
  GstPad *transform_pad;
  GError *error = NULL;
  GstElement *transform = NULL;
  FsRawConference *conference = fs_raw_session_get_conference (self, &error);
  gboolean changed;
  FsStreamDirection direction;

  if (conference == NULL)
    goto error;

  g_object_get (stream, "remote-codecs", &codecs, "direction", &direction,
      NULL);

  if (!codecs)
    return;

  if (g_list_length (codecs) == 2)
    codec = codecs->next->data;
  else
    codec = codecs->data;

  GST_OBJECT_LOCK (conference);
  transform = self->priv->transform_bin;
  self->priv->transform_bin = NULL;
  GST_OBJECT_UNLOCK (conference);

  /* Replace the transform bin */
  if (transform != NULL)
  {
    gst_element_set_locked_state (transform, TRUE);
    gst_element_set_state (transform, GST_STATE_NULL);
    gst_bin_remove (GST_BIN (conference), transform);
    g_object_unref (transform);
  }

  transform = _create_transform_bin (self, &error);

  if (transform == NULL)
    goto error;
  gst_object_ref_sink (transform);

  if (!gst_bin_add (GST_BIN (conference), transform))
    goto error;

  caps = fs_raw_codec_to_gst_caps (codec);
  if (self->priv->send_capsfilter)
    g_object_set (self->priv->send_capsfilter, "caps", caps, NULL);
  gst_caps_unref (caps);

  if (!gst_element_link_pads (transform, "src",
          self->priv->send_capsfilter, "sink"))
    goto error;

  if (!gst_element_sync_state_with_parent (transform))
    goto error;

  transform_pad = gst_element_get_static_pad (transform, "sink");
  if (transform_pad == NULL)
    goto error;

  if (GST_PAD_LINK_FAILED (gst_pad_link (self->priv->send_tee_pad,
      transform_pad)))
    goto error;

  GST_OBJECT_LOCK (conference);
  self->priv->transform_bin = transform;
  transform = NULL;

  if (self->priv->codecs)
    fs_codec_list_destroy (self->priv->codecs);
  self->priv->codecs = codecs;

  if ((changed = !fs_codec_are_equal (self->priv->send_codec, codec)))
  {
    if (self->priv->send_codec)
      fs_codec_destroy (self->priv->send_codec);

    self->priv->send_codec = fs_codec_copy (codec);
  }

  codec = codecs->data;

  if (self->priv->recv_capsfilter)
  {
    GstElement *capsfilter = gst_object_ref (self->priv->recv_capsfilter);
    GstCaps *recv_caps;

    recv_caps = fs_raw_codec_to_gst_caps (codec);
    GST_OBJECT_UNLOCK (conference);
    g_object_set (capsfilter, "caps", recv_caps, NULL);
    gst_object_unref (capsfilter);
    GST_OBJECT_LOCK (conference);
    gst_caps_unref (recv_caps);
  }

  GST_OBJECT_UNLOCK (conference);

  fs_raw_session_update_direction (self, direction);

  if (changed)
  {
    g_object_notify (G_OBJECT (self), "current-send-codec");
    gst_element_post_message (GST_ELEMENT (self->priv->conference),
        gst_message_new_element (GST_OBJECT (self->priv->conference),
            gst_structure_new ("farstream-send-codec-changed",
                "session", FS_TYPE_SESSION, self,
                "codec", FS_TYPE_CODEC, codec,
                "secondary-codecs", FS_TYPE_CODEC_LIST, NULL,
                NULL)));
  }

  g_object_notify (G_OBJECT (self), "codecs");

  gst_object_unref (conference);
  return;

error:
  if (error != NULL)
    fs_session_emit_error (FS_SESSION (self), error->code, error->message);
  else
    fs_session_emit_error (FS_SESSION (self), FS_ERROR_INTERNAL,
        "Unable to change transform bin");

  if (conference != NULL)
    gst_object_unref (conference);

  if (transform != NULL)
    gst_object_unref (transform);
}

void
fs_raw_session_remove_stream (FsRawSession *self,
    FsStream *stream)
{
  FsRawConference *conference = fs_raw_session_get_conference (self, NULL);
  FsTransmitter *transmitter = NULL;
  GstElement *src = NULL;
  GstElement *sink = NULL;

  if (!conference)
    return;

  g_object_set (G_OBJECT (self->priv->send_valve), "drop", TRUE, NULL);

  GST_OBJECT_LOCK (conference);
  if (self->priv->stream == (FsRawStream *) stream)
  {
    self->priv->stream = NULL;
  }
  transmitter = self->priv->transmitter;
  self->priv->transmitter = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (!transmitter)
    return;
  g_object_get (transmitter,
      "gst-src", &src,
      "gst-sink", &sink,
      NULL);


  if (self->priv->transmitter_recv_probe_id)
  {
    if (self->priv->transmitter_src_pad)
      gst_pad_remove_probe (self->priv->transmitter_src_pad,
          self->priv->transmitter_recv_probe_id);
    self->priv->transmitter_recv_probe_id = 0;
  }


  gst_element_set_locked_state (src, TRUE);
  gst_element_set_state (src, GST_STATE_NULL);
  gst_bin_remove (GST_BIN (conference), src);

  if (gst_object_has_ancestor (GST_OBJECT (sink), GST_OBJECT (conference)))
  {
    gst_element_set_locked_state (sink, TRUE);
    gst_element_set_state (sink, GST_STATE_NULL);
    gst_bin_remove (GST_BIN (conference), sink);
  }

  if (self->priv->transmitter_src_pad)
  {
    gst_object_unref (self->priv->transmitter_src_pad);
    self->priv->transmitter_src_pad = NULL;
  }

  if (self->priv->recv_valve)
  {
    gst_element_set_locked_state (self->priv->recv_valve, TRUE);
    gst_bin_remove (GST_BIN (conference), self->priv->recv_valve);
    gst_element_set_state (self->priv->recv_valve, GST_STATE_NULL);
    gst_object_unref (self->priv->recv_valve);
    self->priv->recv_valve = NULL;
  }

  if (self->priv->recv_capsfilter)
  {
    gst_element_set_locked_state (self->priv->recv_capsfilter, TRUE);
    gst_bin_remove (GST_BIN (conference), self->priv->recv_capsfilter);
    gst_element_set_state (self->priv->recv_capsfilter, GST_STATE_NULL);
    gst_object_unref (self->priv->recv_capsfilter);
    self->priv->recv_capsfilter = NULL;
  }

  if (self->priv->src_ghost_pad)
  {
    gst_element_remove_pad (GST_ELEMENT (conference),
        self->priv->src_ghost_pad);
    gst_pad_set_active (self->priv->src_ghost_pad, FALSE);
    gst_object_unref (self->priv->src_ghost_pad);
    self->priv->src_ghost_pad = NULL;
  }


  gst_object_unref (src);
  gst_object_unref (sink);
  g_object_unref (transmitter);
  gst_object_unref (conference);
}

static gboolean
_add_transmitter_sink (FsRawSession *self,
    GstElement *transmitter_sink,
    GError **error)
{
  if (!gst_bin_add (GST_BIN (self->priv->conference), transmitter_sink))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not add the transmitter's sink element"
        " for session %d to the conference bin", self->id);
    goto error;
  }

  if (!gst_element_sync_state_with_parent (transmitter_sink))
  {
    gst_bin_remove (GST_BIN (self->priv->conference), transmitter_sink);
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not sync the transmitter's sink element"
        " with its parent for session %d", self->id);
    goto error;
  }

  if (!gst_element_link (self->priv->send_capsfilter, transmitter_sink))
  {
    gst_bin_remove (GST_BIN (self->priv->conference), transmitter_sink);
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not link the capsfilter and transmitter's"
        " sink element for session %d", self->id);
    goto error;
  }

  return TRUE;

error:
  return FALSE;
}

void
fs_raw_session_update_direction (FsRawSession *self,
  FsStreamDirection direction)
{
  GError *error = NULL;
  FsRawConference *conference;

  conference = fs_raw_session_get_conference (self, &error);

  if (!conference)
  {
    fs_session_emit_error (FS_SESSION (self), error->code, error->message);
    g_clear_error (&error);
    return;
  }

  GST_OBJECT_LOCK (conference);

  /* Don't start sending before we have codecs */
  if (!self->priv->codecs)
  {
    GST_OBJECT_UNLOCK (conference);
    goto out;
  }

  if (self->priv->transmitter &&
      !self->priv->transmitter_sink_added &&
      direction & FS_DIRECTION_SEND)  {
    GstElement *transmitter_sink;

    GST_OBJECT_UNLOCK (conference);

    g_object_get (self->priv->transmitter, "gst-sink", &transmitter_sink, NULL);
    if (!transmitter_sink)
    {
      fs_session_emit_error (FS_SESSION (self), FS_ERROR_CONSTRUCTION,
          "Unable to get the sink element from the FsTransmitter");
      goto out;
    }

    if (!_add_transmitter_sink (self, transmitter_sink, &error))
    {
      gst_object_unref (transmitter_sink);
      fs_session_emit_error (FS_SESSION (self), error->code, error->message);
      g_clear_error (&error);
      goto out;
    }

    gst_object_unref (transmitter_sink);

    GST_OBJECT_LOCK (conference);
    self->priv->transmitter_sink_added = TRUE;
  }

  if (self->priv->recv_valve)
  {
    GstElement *valve = g_object_ref (self->priv->recv_valve);

    GST_OBJECT_UNLOCK (conference);
    g_object_set (valve,
        "drop", ! (direction & FS_DIRECTION_RECV), NULL);
    g_object_unref (valve);
    GST_OBJECT_LOCK (conference);
  }

  GST_OBJECT_UNLOCK (conference);

  if (direction & FS_DIRECTION_SEND)
    g_object_set (self->priv->send_valve, "drop", FALSE, NULL);
  else
    g_object_set (self->priv->send_valve, "drop", TRUE, NULL);

out:
  gst_object_unref (conference);
}

/**
 * fs_raw_session_new_stream:
 * @session: an #FsRawSession
 * @participant: #FsParticipant of a participant for the new stream
 * @direction: #FsStreamDirection describing the direction of the new stream
 * that will be created for this participant
 * @error: location of a #GError, or NULL if no error occured
 *
 * This function creates a stream for the given participant into the active
 * session.
 *
 * Returns: the new #FsStream that has been created. User must unref the
 * #FsStream when the stream is ended. If an error occured, returns NULL.
 */
static FsStream *
fs_raw_session_new_stream (FsSession *session,
    FsParticipant *participant,
    FsStreamDirection direction,
    GError **error)
{
  FsRawSession *self = FS_RAW_SESSION (session);
  FsStream *new_stream = NULL;
  FsRawConference *conference;

  if (!FS_IS_RAW_PARTICIPANT (participant))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
        "You have to provide a participant of type RAW");
    return NULL;
  }

  conference = fs_raw_session_get_conference (self, error);
  if (!conference)
    return NULL;

  GST_OBJECT_LOCK (conference);
  if (self->priv->stream)
    goto already_have_stream;
  GST_OBJECT_UNLOCK (conference);

  new_stream = FS_STREAM_CAST (fs_raw_stream_new (self,
          FS_RAW_PARTICIPANT (participant),
          direction, conference,
          _stream_get_stream_transmitter, self));

  GST_OBJECT_LOCK (conference);
  if (self->priv->stream)
    goto already_have_stream;


  self->priv->stream = (FsRawStream *) new_stream;

  GST_OBJECT_UNLOCK (conference);

  g_signal_connect_object (new_stream, "notify::remote-codecs",
      G_CALLBACK (_stream_remote_codecs_changed), self, 0);


done:
  gst_object_unref (conference);
  return new_stream;

already_have_stream:
  GST_OBJECT_UNLOCK (conference);
  g_set_error (error, FS_ERROR, FS_ERROR_ALREADY_EXISTS,
      "There already is a stream in this session");
  goto done;
}

FsRawSession *
fs_raw_session_new (FsMediaType media_type,
    FsRawConference *conference,
    guint id,
    GError **error)
{
  FsRawSession *session = g_object_new (FS_TYPE_RAW_SESSION,
      "media-type", media_type,
      "conference", conference,
      "id", id,
      NULL);

  if (!session)
  {
    *error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not create object");
  }
  else if (session->priv->construction_error)
  {
    g_propagate_error (error, session->priv->construction_error);
    g_object_unref (session);
    return NULL;
  }

  return session;
}

static gchar **
fs_raw_session_list_transmitters (FsSession *session)
{
  return fs_transmitter_list_available ();
}

static GType
fs_raw_session_get_stream_transmitter_type (FsSession *session,
    const gchar *transmitter)
{
  FsTransmitter *fstransmitter;
  GType transmitter_type;

  fstransmitter = fs_transmitter_new (transmitter, 1, 0, NULL);

  if (!fstransmitter)
    return G_TYPE_NONE;

  transmitter_type = fs_transmitter_get_stream_transmitter_type (fstransmitter);

  g_object_unref (fstransmitter);
  return transmitter_type;
}

static GstPadProbeReturn
_transmitter_pad_have_data_callback (GstPad *pad, GstPadProbeInfo *info,
    gpointer user_data)
{
  FsRawSession *self = FS_RAW_SESSION (user_data);
  FsRawConference *conference = fs_raw_session_get_conference (self, NULL);
  FsRawStream *stream;
  GstElement *recv_capsfilter = NULL;
  GstPad *ghostpad;
  GstPad *srcpad;
  gchar *padname;
  FsCodec *codec;

  if (!conference)
    return GST_PAD_PROBE_REMOVE;

  GST_OBJECT_LOCK (conference);
  if (!self->priv->codecs ||
      !self->priv->recv_capsfilter ||
      !self->priv->transmitter_recv_probe_id)
  {
    GST_OBJECT_UNLOCK (conference);
    gst_object_unref (conference);
    return GST_PAD_PROBE_DROP;
  }

  recv_capsfilter = gst_object_ref (self->priv->recv_capsfilter);
  self->priv->transmitter_recv_probe_id = 0;
  codec = fs_codec_copy (self->priv->codecs->data);
  GST_OBJECT_UNLOCK (conference);

  srcpad = gst_element_get_static_pad (recv_capsfilter, "src");

  if (!srcpad)
  {
    GST_WARNING ("Unable to get recv_capsfilter (%p) srcpad", recv_capsfilter);
    goto error;
  }

  padname = g_strdup_printf ("src_%d", self->id);
  ghostpad = gst_ghost_pad_new_from_template (padname, srcpad,
      gst_element_class_get_pad_template (
        GST_ELEMENT_GET_CLASS (self->priv->conference),
        "src_%d"));
  g_free (padname);
  gst_object_unref (srcpad);

  gst_object_ref (ghostpad);

  if (!gst_pad_set_active (ghostpad, TRUE))
    GST_WARNING ("Unable to set ghost pad active");


  if (!gst_element_add_pad (GST_ELEMENT (self->priv->conference), ghostpad))
  {
    GST_WARNING ("Unable to add ghost pad to conference");

    gst_object_unref (ghostpad);
    gst_object_unref (ghostpad);
    goto error;
  }

  GST_OBJECT_LOCK (conference);
  self->priv->src_ghost_pad = ghostpad;
  stream = g_object_ref (self->priv->stream);
  GST_OBJECT_UNLOCK (conference);

  fs_stream_emit_src_pad_added (FS_STREAM (stream), ghostpad, codec);

  fs_codec_destroy (codec);
  g_object_unref (stream);
  gst_object_unref (conference);
  gst_object_unref (recv_capsfilter);

  return GST_PAD_PROBE_REMOVE;

error:
  fs_codec_destroy (codec);
  gst_object_unref (conference);
  gst_object_unref (recv_capsfilter);

  return GST_PAD_PROBE_REMOVE;
}




static FsStreamTransmitter *_stream_get_stream_transmitter (FsRawStream *stream,
    const gchar *transmitter_name,
    FsParticipant *participant,
    GParameter *parameters,
    guint n_parameters,
    GError **error,
    gpointer user_data)
{
  FsRawSession *self = user_data;
  FsTransmitter *fstransmitter = NULL;
  FsStreamTransmitter *stream_transmitter = NULL;
  GstElement *transmitter_src = NULL;
  FsRawConference *conference;
  gchar *tmp;
  GstElement *capsfilter;
  GstElement *valve;
  GstPad *transmitter_src_pad;

  conference = fs_raw_session_get_conference (self, error);
  if (!conference)
    return NULL;

  fstransmitter = fs_transmitter_new (transmitter_name, 1, 0, error);

  if (!fstransmitter)
    goto error;

  g_object_set (fstransmitter,
      "tos", self->priv->tos,
      "do-timestamp", FALSE,
      NULL);

  stream_transmitter = fs_transmitter_new_stream_transmitter (fstransmitter,
      participant, n_parameters, parameters, error);

  if (!stream_transmitter)
    goto error;

  g_object_get (fstransmitter, "gst-src", &transmitter_src, NULL);
  g_assert (transmitter_src);

  if (!gst_bin_add (GST_BIN (conference), transmitter_src))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not add the transmitter's source element"
        " for session %d to the conference bin", self->id);
    gst_object_unref (transmitter_src);
    transmitter_src = NULL;
    goto error;
  }

  tmp = g_strdup_printf ("recv_capsfilter_%d", self->id);
  capsfilter = gst_element_factory_make ("capsfilter", tmp);
  g_free (tmp);

  if (!capsfilter)
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not create a capsfilter element for session %d", self->id);
    g_object_unref (capsfilter);
    goto error;
  }

  gst_object_ref (capsfilter);

  if (!gst_bin_add (GST_BIN (conference), capsfilter))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not add the capsfilter element for session %d", self->id);
    gst_object_unref (capsfilter);
    gst_object_unref (capsfilter);
    goto error;
  }
  self->priv->recv_capsfilter = capsfilter;

  if (gst_element_set_state (self->priv->recv_capsfilter, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE)
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not set the capsfilter element for session %d", self->id);
    goto error;
  }

  tmp = g_strdup_printf ("recv_valve_%d", self->id);
  valve = gst_element_factory_make ("valve", tmp);
  g_free (tmp);

  if (!valve) {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not create a valve element for session %d", self->id);
    goto error;
  }

  gst_object_ref (valve);

  if (!gst_bin_add (GST_BIN (conference), valve))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not add the valve element for session %d"
        " to the conference bin", self->id);
    gst_object_unref (valve);
    goto error;
  }

  g_object_set (valve, "drop", TRUE, NULL);

  self->priv->recv_valve = valve;

  if (gst_element_set_state (self->priv->recv_valve, GST_STATE_PLAYING) ==
    GST_STATE_CHANGE_FAILURE) {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not set the valve element for session %d to the playing state",
        self->id);
    goto error;
  }

  if (!gst_element_link (self->priv->recv_valve, self->priv->recv_capsfilter))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not link the recv valve and the capsfilter");
    goto error;
  }

  if (!gst_element_link_pads (transmitter_src, "src_1",
          valve, "sink"))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not link the recv_valve to the codec bin");
    goto error;
  }

  transmitter_src_pad = gst_element_get_static_pad (transmitter_src, "src_1");

  GST_OBJECT_LOCK (conference);
  self->priv->transmitter = fstransmitter;
  self->priv->transmitter_src_pad = transmitter_src_pad;
  GST_OBJECT_UNLOCK (conference);

  self->priv->transmitter_recv_probe_id = gst_pad_add_probe (
    self->priv->transmitter_src_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
    _transmitter_pad_have_data_callback, g_object_ref (self),
    g_object_unref);

  if (!gst_element_sync_state_with_parent (transmitter_src))
  {
    g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
        "Could not sync the transmitter's source element"
        " with its parent for session %d", self->id);
    goto error;
  }

  gst_object_unref (transmitter_src);
  gst_object_unref (conference);

  return stream_transmitter;

error:
  if (self->priv->recv_valve)
  {
    gst_bin_remove (GST_BIN (conference), self->priv->recv_valve);
    self->priv->recv_valve = NULL;
  }

  if (self->priv->recv_capsfilter)
  {
    gst_bin_remove (GST_BIN (conference), self->priv->recv_capsfilter);
    self->priv->recv_capsfilter = NULL;
  }

  if (transmitter_src)
    gst_bin_remove (GST_BIN (conference), transmitter_src);

  if (stream_transmitter)
  {
    fs_stream_transmitter_stop (stream_transmitter);
    g_object_unref (stream_transmitter);
  }

  GST_OBJECT_LOCK (conference);
  fstransmitter = self->priv->transmitter;
  self->priv->transmitter = NULL;
  GST_OBJECT_UNLOCK (conference);

  if (fstransmitter)
    g_object_unref (fstransmitter);

  gst_object_unref (conference);

  return NULL;

}
farstream-0.2.7/gst/fsrawconference/fs-raw-session.h0000664000076400007640000000525211710041462017437 00000000000000/*
 * Farstream - Farstream Raw Session
 *
 * Copyright 2008 Richard Spiers 
 * Copyright 2007 Nokia Corp.
 * Copyright 2007,2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Mike Ruprecht 
 *
 * fs-raw-session.h - A Farstream Raw Session gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_RAW_SESSION_H__
#define __FS_RAW_SESSION_H__

#include 

#include 

#include "fs-raw-conference.h"

G_BEGIN_DECLS

/* TYPE MACROS */
#define FS_TYPE_RAW_SESSION \
  (fs_raw_session_get_type ())
#define FS_RAW_SESSION(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RAW_SESSION, FsRawSession))
#define FS_RAW_SESSION_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RAW_SESSION, FsRawSessionClass))
#define FS_IS_RAW_SESSION(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RAW_SESSION))
#define FS_IS_RAW_SESSION_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RAW_SESSION))
#define FS_RAW_SESSION_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RAW_SESSION, FsRawSessionClass))
#define FS_RAW_SESSION_CAST(obj) ((FsRawSession *) (obj))

typedef struct _FsRawSession FsRawSession;
typedef struct _FsRawSessionClass FsRawSessionClass;
typedef struct _FsRawSessionPrivate FsRawSessionPrivate;

struct _FsRawSessionClass
  {
    FsSessionClass parent_class;
  };

/**
 * FsRawSession:
 *
 */
struct _FsRawSession
{
  FsSession parent;

  /*< private >*/

  /* This ID can be accessed by the streams for this session */
  guint id;

  FsRawSessionPrivate *priv;
};


GType fs_raw_session_get_type (void);

FsRawSession *fs_raw_session_new (FsMediaType media_type,
    FsRawConference *conference,
    guint id,
    GError **error);

void fs_raw_session_remove_stream (FsRawSession *self,
    FsStream *stream);

void fs_raw_session_update_direction (FsRawSession *self,
  FsStreamDirection direction);

G_END_DECLS

#endif /* __FS_RAW_SESSION_H__ */
farstream-0.2.7/gst/fsrawconference/default-element-properties0000664000076400007640000000072712032661146021605 00000000000000# Put the desired properties in the style of
#
# [element name]
# prop1=val1

# Set appropriate buffer/latency parameters for voip. The key parameter is
# buffer-time, which determines the latency in the conventional sense (X us of
# buffering between client and playback/capture. We take a conservatively high
# value for these to lower CPU load on less powerful systems.
[pulsesink]
latency-time=20000
buffer-time=60000

[pulsesrc]
latency-time=20000
buffer-time=40000
farstream-0.2.7/gst/fsrawconference/fs-raw-participant.h0000664000076400007640000000504611710041461020272 00000000000000/*
 * Farstream - Farstream Raw Participant
 *
 * Copyright 2007,2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Mike Ruprecht 
 * Copyright 2007 Nokia Corp.
 *
 * fs-raw-participant.h - A Farstream Raw Participant gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_RAW_PARTICIPANT_H__
#define __FS_RAW_PARTICIPANT_H__

#include 

G_BEGIN_DECLS

/* TYPE MACROS */
#define FS_TYPE_RAW_PARTICIPANT (fs_raw_participant_get_type())
#define FS_RAW_PARTICIPANT(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RAW_PARTICIPANT, \
                              FsRawParticipant))
#define FS_RAW_PARTICIPANT_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RAW_PARTICIPANT, \
                           FsRawParticipantClass))
#define FS_IS_RAW_PARTICIPANT(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RAW_PARTICIPANT))
#define FS_IS_RAW_PARTICIPANT_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RAW_PARTICIPANT))
#define FS_RAW_PARTICIPANT_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RAW_PARTICIPANT, \
                              FsRawParticipantClass))
#define FS_RAW_PARTICIPANT_CAST(obj) ((FsRawParticipant *) (obj))

typedef struct _FsRawParticipant FsRawParticipant;
typedef struct _FsRawParticipantClass FsRawParticipantClass;
typedef struct _FsRawParticipantPrivate FsRawParticipantPrivate;

struct _FsRawParticipantClass
{
  FsParticipantClass parent_class;

  /*virtual functions */

  /*< private >*/
  FsRawParticipantPrivate *priv;
};

/**
 * FsRawParticipant:
 *
 */
struct _FsRawParticipant
{
  FsParticipant parent;
  FsRawParticipantPrivate *priv;

  /*< private >*/
};

GType fs_raw_participant_get_type (void);

FsRawParticipant *fs_raw_participant_new (void);

G_END_DECLS

#endif /* __FS_RAW_PARTICIPANT_H__ */
farstream-0.2.7/gst/fsrawconference/fs-raw-conference.h0000664000076400007640000000475711710041461020073 00000000000000/*
 * Farstream - Farstream Raw Conference Implementation
 *
 * Copyright 2007,2010 Collabora Ltd.
 *  @author: Olivier Crete 
 *  @author: Mike Ruprecht 
 * Copyright 2007 Nokia Corp.
 *
 * gstfsrawconference.h - Raw implementation for Farstream Conference Gstreamer
 *                        Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_RAW_CONFERENCE_H__
#define __FS_RAW_CONFERENCE_H__

#include 

G_BEGIN_DECLS

#define FS_TYPE_RAW_CONFERENCE \
  (fs_raw_conference_get_type ())
#define FS_RAW_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),FS_TYPE_RAW_CONFERENCE,FsRawConference))
#define FS_RAW_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),FS_TYPE_RAW_CONFERENCE,FsRawConferenceClass))
#define FS_RAW_CONFERENCE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS((obj),FS_TYPE_RAW_CONFERENCE,FsRawConferenceClass))
#define FS_IS_RAW_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RAW_CONFERENCE))
#define FS_IS_RAW_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RAW_CONFERENCE))
#define FS_RAW_CONFERENCE_CAST(obj) \
  ((FsRawConference *)(obj))

typedef struct _FsRawConference FsRawConference;
typedef struct _FsRawConferenceClass FsRawConferenceClass;
typedef struct _FsRawConferencePrivate FsRawConferencePrivate;

struct _FsRawConference
{
  FsConference parent;

  /*< private >*/
  FsRawConferencePrivate *priv;
};

struct _FsRawConferenceClass
{
  FsConferenceClass parent_class;
};

GType fs_raw_conference_get_type (void);

GstCaps *fs_raw_codec_to_gst_caps (const FsCodec *codec);

gboolean fs_raw_conference_is_internal_thread (FsRawConference *self);

GST_DEBUG_CATEGORY_EXTERN (fsrawconference_debug);

G_END_DECLS

#endif /* __FS_RAW_CONFERENCE_H__ */
farstream-0.2.7/gst/fsrtpxdata/0000775000076400007640000000000012462323000013464 500000000000000farstream-0.2.7/gst/fsrtpxdata/Makefile.in0000664000076400007640000006776012462321046015501 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 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@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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@
target_triplet = @target@
subdir = gst/fsrtpxdata
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
	$(top_srcdir)/common/m4/as-auto-alt.m4 \
	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
	$(top_srcdir)/common/m4/as-libtool.m4 \
	$(top_srcdir)/common/m4/as-python.m4 \
	$(top_srcdir)/common/m4/as-scrub-include.m4 \
	$(top_srcdir)/common/m4/as-version.m4 \
	$(top_srcdir)/common/m4/gst-arch.m4 \
	$(top_srcdir)/common/m4/gst-args.m4 \
	$(top_srcdir)/common/m4/gst-check.m4 \
	$(top_srcdir)/common/m4/gst-error.m4 \
	$(top_srcdir)/common/m4/gst-glib2.m4 \
	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
	$(top_srcdir)/common/m4/gst-plugindir.m4 \
	$(top_srcdir)/common/m4/gst.m4 \
	$(top_srcdir)/common/m4/gtk-doc.m4 \
	$(top_srcdir)/common/m4/pkg.m4 \
	$(top_srcdir)/m4/introspection.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
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__uninstall_files_from_dir = { \
  test -z "$$files" \
    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
         $(am__cd) "$$dir" && rm -f $$files; }; \
  }
am__installdirs = "$(DESTDIR)$(plugindir)"
LTLIBRARIES = $(plugin_LTLIBRARIES)
am__DEPENDENCIES_1 =
libfsrtpxdata_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
am_libfsrtpxdata_la_OBJECTS = libfsrtpxdata_la-fsrtpxdata.lo \
	libfsrtpxdata_la-fsrtpxdatapay.lo \
	libfsrtpxdata_la-fsrtpxdatadepay.lo
libfsrtpxdata_la_OBJECTS = $(am_libfsrtpxdata_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
libfsrtpxdata_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(libfsrtpxdata_la_CFLAGS) $(CFLAGS) \
	$(libfsrtpxdata_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(libfsrtpxdata_la_SOURCES)
DIST_SOURCES = $(libfsrtpxdata_la_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ERROR_CFLAGS = @ERROR_CFLAGS@
EXEEXT = @EXEEXT@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FS_AGE = @FS_AGE@
FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@
FS_APIVERSION = @FS_APIVERSION@
FS_API_VERSION = @FS_API_VERSION@
FS_CFLAGS = @FS_CFLAGS@
FS_CURRENT = @FS_CURRENT@
FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@
FS_LIBS = @FS_LIBS@
FS_LIBVERSION = @FS_LIBVERSION@
FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@
FS_LICENSE = @FS_LICENSE@
FS_LT_LDFLAGS = @FS_LT_LDFLAGS@
FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@
FS_PLUGINS_ALL = @FS_PLUGINS_ALL@
FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@
FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@
FS_PLUGIN_PATH = @FS_PLUGIN_PATH@
FS_PREFIX = @FS_PREFIX@
FS_REVISION = @FS_REVISION@
FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@
FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@
GCOV = @GCOV@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LDFLAGS = @GIO_LDFLAGS@
GIO_LIBS = @GIO_LIBS@
GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_PREFIX = @GLIB_PREFIX@
GLIB_REQ = @GLIB_REQ@
GREP = @GREP@
GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
GST_API_VERSION = @GST_API_VERSION@
GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
GST_BASE_LIBS = @GST_BASE_LIBS@
GST_CFLAGS = @GST_CFLAGS@
GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
GST_CHECK_LIBS = @GST_CHECK_LIBS@
GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@
GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
GST_LIBS = @GST_LIBS@
GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
GST_TOOLS_DIR = @GST_TOOLS_DIR@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GUPNP_CFLAGS = @GUPNP_CFLAGS@
GUPNP_LIBS = @GUPNP_LIBS@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NICE_CFLAGS = @NICE_CFLAGS@
NICE_LIBS = @NICE_LIBS@
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@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VALGRIND_PATH = @VALGRIND_PATH@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
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@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
plugin_LTLIBRARIES = libfsrtpxdata.la
libfsrtpxdata_la_SOURCES = fsrtpxdata.c fsrtpxdatapay.c fsrtpxdatadepay.c
libfsrtpxdata_la_CFLAGS = \
	$(FS_CFLAGS) \
	$(GST_BASE_CFLAGS) \
	$(GST_CFLAGS)

libfsrtpxdata_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libfsrtpxdata_la_LIBADD = \
	$(FS_LIBS) \
	$(GST_BASE_LIBS) \
	$(GST_LIBS) \
	-lgstrtp-@GST_API_VERSION@

noinst_HEADERS = fsrtpxdatapay.h fsrtpxdatadepay.h
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(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 gst/fsrtpxdata/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu gst/fsrtpxdata/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-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
	@$(NORMAL_INSTALL)
	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
	list2=; for p in $$list; do \
	  if test -f $$p; then \
	    list2="$$list2 $$p"; \
	  else :; fi; \
	done; \
	test -z "$$list2" || { \
	  echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \
	  $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \
	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \
	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \
	}

uninstall-pluginLTLIBRARIES:
	@$(NORMAL_UNINSTALL)
	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
	for p in $$list; do \
	  $(am__strip_dir) \
	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \
	done

clean-pluginLTLIBRARIES:
	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
	@list='$(plugin_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

libfsrtpxdata.la: $(libfsrtpxdata_la_OBJECTS) $(libfsrtpxdata_la_DEPENDENCIES) $(EXTRA_libfsrtpxdata_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(libfsrtpxdata_la_LINK) -rpath $(plugindir) $(libfsrtpxdata_la_OBJECTS) $(libfsrtpxdata_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfsrtpxdata_la-fsrtpxdata.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfsrtpxdata_la-fsrtpxdatadepay.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfsrtpxdata_la-fsrtpxdatapay.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

libfsrtpxdata_la-fsrtpxdata.lo: fsrtpxdata.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfsrtpxdata_la_CFLAGS) $(CFLAGS) -MT libfsrtpxdata_la-fsrtpxdata.lo -MD -MP -MF $(DEPDIR)/libfsrtpxdata_la-fsrtpxdata.Tpo -c -o libfsrtpxdata_la-fsrtpxdata.lo `test -f 'fsrtpxdata.c' || echo '$(srcdir)/'`fsrtpxdata.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libfsrtpxdata_la-fsrtpxdata.Tpo $(DEPDIR)/libfsrtpxdata_la-fsrtpxdata.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fsrtpxdata.c' object='libfsrtpxdata_la-fsrtpxdata.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfsrtpxdata_la_CFLAGS) $(CFLAGS) -c -o libfsrtpxdata_la-fsrtpxdata.lo `test -f 'fsrtpxdata.c' || echo '$(srcdir)/'`fsrtpxdata.c

libfsrtpxdata_la-fsrtpxdatapay.lo: fsrtpxdatapay.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfsrtpxdata_la_CFLAGS) $(CFLAGS) -MT libfsrtpxdata_la-fsrtpxdatapay.lo -MD -MP -MF $(DEPDIR)/libfsrtpxdata_la-fsrtpxdatapay.Tpo -c -o libfsrtpxdata_la-fsrtpxdatapay.lo `test -f 'fsrtpxdatapay.c' || echo '$(srcdir)/'`fsrtpxdatapay.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libfsrtpxdata_la-fsrtpxdatapay.Tpo $(DEPDIR)/libfsrtpxdata_la-fsrtpxdatapay.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fsrtpxdatapay.c' object='libfsrtpxdata_la-fsrtpxdatapay.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfsrtpxdata_la_CFLAGS) $(CFLAGS) -c -o libfsrtpxdata_la-fsrtpxdatapay.lo `test -f 'fsrtpxdatapay.c' || echo '$(srcdir)/'`fsrtpxdatapay.c

libfsrtpxdata_la-fsrtpxdatadepay.lo: fsrtpxdatadepay.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfsrtpxdata_la_CFLAGS) $(CFLAGS) -MT libfsrtpxdata_la-fsrtpxdatadepay.lo -MD -MP -MF $(DEPDIR)/libfsrtpxdata_la-fsrtpxdatadepay.Tpo -c -o libfsrtpxdata_la-fsrtpxdatadepay.lo `test -f 'fsrtpxdatadepay.c' || echo '$(srcdir)/'`fsrtpxdatadepay.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libfsrtpxdata_la-fsrtpxdatadepay.Tpo $(DEPDIR)/libfsrtpxdata_la-fsrtpxdatadepay.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='fsrtpxdatadepay.c' object='libfsrtpxdata_la-fsrtpxdatadepay.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfsrtpxdata_la_CFLAGS) $(CFLAGS) -c -o libfsrtpxdata_la-fsrtpxdatadepay.lo `test -f 'fsrtpxdatadepay.c' || echo '$(srcdir)/'`fsrtpxdatadepay.c

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	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-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	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"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

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)$(plugindir)"; 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:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
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-pluginLTLIBRARIES \
	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-pluginLTLIBRARIES

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-pluginLTLIBRARIES

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \
	ctags-am 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-html install-html-am install-info \
	install-info-am install-man install-pdf install-pdf-am \
	install-pluginLTLIBRARIES 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 tags-am uninstall uninstall-am \
	uninstall-pluginLTLIBRARIES


# 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:
farstream-0.2.7/gst/fsrtpxdata/Makefile.am0000664000076400007640000000062012461773672015465 00000000000000plugin_LTLIBRARIES = libfsrtpxdata.la

libfsrtpxdata_la_SOURCES = fsrtpxdata.c fsrtpxdatapay.c fsrtpxdatadepay.c
libfsrtpxdata_la_CFLAGS = \
	$(FS_CFLAGS) \
	$(GST_BASE_CFLAGS) \
	$(GST_CFLAGS)
libfsrtpxdata_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libfsrtpxdata_la_LIBADD = \
	$(FS_LIBS) \
	$(GST_BASE_LIBS) \
	$(GST_LIBS) \
	-lgstrtp-@GST_API_VERSION@

noinst_HEADERS = fsrtpxdatapay.h fsrtpxdatadepay.h
farstream-0.2.7/gst/fsrtpxdata/fsrtpxdatapay.c0000664000076400007640000001116712462316243016463 00000000000000/*
 * Microsoft Lync RTP x-data Payloader Gst Element
 *
 * Copyright 2014 Collabora Ltd.
 *   @author: Olivier Crete 
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fsrtpxdatapay.h"
#include 

GST_DEBUG_CATEGORY_STATIC (rtpxdatapay_debug);
#define GST_CAT_DEFAULT (rtpxdatapay_debug)

static GstStaticPadTemplate fs_rtp_xdata_pay_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
    GST_PAD_SINK,
    GST_PAD_ALWAYS,
    GST_STATIC_CAPS ("application/octet-stream")
    );

static GstStaticPadTemplate fs_rtp_xdata_pay_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
    GST_PAD_SRC,
    GST_PAD_ALWAYS,
    GST_STATIC_CAPS ("application/x-rtp, "
        "media = (string) \"application\", "
        "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
        "clock-rate = (int) 90000, "
        "encoding-name = (string) \"X-DATA\"")
    );

#define MAX_PAYLOAD_SIZE 1200

static gboolean fs_rtp_xdata_pay_setcaps (GstRTPBasePayload * payload,
    GstCaps * caps);
static GstFlowReturn fs_rtp_xdata_pay_handle_buffer (GstRTPBasePayload *payload,
    GstBuffer *buffer);

G_DEFINE_TYPE (FsRTPXdataPay, fs_rtp_xdata_pay,
    GST_TYPE_RTP_BASE_PAYLOAD);

static void
fs_rtp_xdata_pay_class_init (FsRTPXdataPayClass * klass)
{
  GstElementClass *gstelement_class;
  GstRTPBasePayloadClass *gstrtpbasepayload_class;

  gstelement_class = (GstElementClass *) klass;
  gstrtpbasepayload_class = (GstRTPBasePayloadClass *) klass;

  gstrtpbasepayload_class->set_caps = fs_rtp_xdata_pay_setcaps;
  gstrtpbasepayload_class->handle_buffer = fs_rtp_xdata_pay_handle_buffer;

  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_rtp_xdata_pay_sink_template));
  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_rtp_xdata_pay_src_template));
  gst_element_class_set_static_metadata (gstelement_class,
      "RTP Payloader for Microsoft Lync x-data", "Codec/Payloader/Network/RTP",
      "Packetize Microsoft Lync x-data streams into RTP packets",
      "Olivier Crete ");

  GST_DEBUG_CATEGORY_INIT (rtpxdatapay_debug, "fsrtpxdatapay", 0,
      "Microsoft Lync x-data RTP payloader");
}

static void
fs_rtp_xdata_pay_init (FsRTPXdataPay * rtpxdatapay)
{
  GstRTPBasePayload *rtpbasepayload;

  rtpbasepayload = GST_RTP_BASE_PAYLOAD (rtpxdatapay);

  gst_rtp_base_payload_set_options (rtpbasepayload, "application", TRUE,
      "X-DATA", 90000);
  GST_RTP_BASE_PAYLOAD_MTU(rtpbasepayload) = MAX_PAYLOAD_SIZE +
      gst_rtp_buffer_calc_header_len (0);
}

static gboolean
fs_rtp_xdata_pay_setcaps (GstRTPBasePayload * rtpbasepayload, GstCaps * caps)
{
  return gst_rtp_base_payload_set_outcaps (rtpbasepayload, NULL);
}

static GstFlowReturn
fs_rtp_xdata_pay_handle_buffer (GstRTPBasePayload *payload, GstBuffer *buffer)
{
  GstBuffer *rtpbuf;
  gsize size;
  guint mtu;

  size = gst_buffer_get_size (buffer);
  mtu = GST_RTP_BASE_PAYLOAD_MTU(payload);
  mtu -= gst_rtp_buffer_calc_header_len (0);

  if (size <= mtu) {
    rtpbuf = gst_rtp_buffer_new_allocate (0, 0, 0);
    rtpbuf = gst_buffer_append (rtpbuf, buffer);

    return gst_rtp_base_payload_push (payload, rtpbuf);
  } else {
    GstBufferList *rtplist = gst_buffer_list_new_sized (2);
    gsize offset = 0;
    gsize new_size;

    while (size > 0) {
      new_size = size > mtu ? mtu : size;

      rtpbuf = gst_rtp_buffer_new_allocate (0, 0, 0);
      gst_buffer_copy_into (rtpbuf, buffer, GST_BUFFER_COPY_MEMORY |
          GST_BUFFER_COPY_TIMESTAMPS, offset, new_size);
      gst_buffer_list_add (rtplist, rtpbuf);
      offset += new_size;
      size -= new_size;
    }
    gst_buffer_unref (buffer);
    return gst_rtp_base_payload_push_list (payload, rtplist);
  }
}

gboolean
fs_rtp_xdata_pay_plugin_init (GstPlugin * plugin)
{
  return gst_element_register (plugin, "fsrtpxdatapay",
      GST_RANK_SECONDARY, FS_TYPE_RTP_XDATA_PAY);
}
farstream-0.2.7/gst/fsrtpxdata/fsrtpxdatadepay.h0000664000076400007640000000364712461773672017021 00000000000000/*
 * Microsoft Lync RTP x-data Depayloader Gst Element
 *
 * Copyright 2014 Collabora Ltd.
 *   @author: Olivier Crete 
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __FS_RTP_XDATA_DEPAY_H__
#define __FS_RTP_XDATA_DEPAY_H__

#include 
#include 

G_BEGIN_DECLS typedef struct _FsRTPXdataDepay FsRTPXdataDepay;
typedef struct _FsRTPXdataDepayClass FsRTPXdataDepayClass;

#define FS_TYPE_RTP_XDATA_DEPAY \
  (fs_rtp_xdata_depay_get_type())
#define FS_RTP_XDATA_DEPAY(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),FS_TYPE_RTP_XDATA_DEPAY,FsRTPXdataDepay))
#define FS_RTP_XDATA_DEPAY_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),FS_TYPE_RTP_XDATA_DEPAY,FsRTPXdataDepayClass))
#define FS_IS_RTP_XDATA_DEPAY(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RTP_XDATA_DEPAY))
#define FS_IS_RTP_XDATA_DEPAY_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RTP_XDATA_DEPAY))


struct _FsRTPXdataDepay
{
  GstRTPBaseDepayload depayload;

};

struct _FsRTPXdataDepayClass
{
  GstRTPBaseDepayloadClass parent_class;
};

GType fs_rtp_xdata_depay_get_type (void);

gboolean fs_rtp_xdata_depay_plugin_init (GstPlugin * plugin);

G_END_DECLS
#endif /* __FS_RTP_XDATA_DEPAY_H__ */
farstream-0.2.7/gst/fsrtpxdata/fsrtpxdatadepay.c0000664000076400007640000000625712461773672017014 00000000000000/*
 * Microsoft Lync RTP x-data Depayloader Gst Element
 *
 * Copyright 2014 Collabora Ltd.
 *   @author: Olivier Crete 
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write tox the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#include 
#include 
#include 
#include "fsrtpxdatadepay.h"

static GstStaticPadTemplate fs_rtp_xdata_depay_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
    GST_PAD_SINK,
    GST_PAD_ALWAYS,
    GST_STATIC_CAPS ("application/x-rtp, "
        "media = (string) \"application\", "
        "encoding-name = (string) \"X-DATA\"")
    );

static GstStaticPadTemplate fs_rtp_xdata_depay_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
    GST_PAD_SRC,
    GST_PAD_ALWAYS,
    GST_STATIC_CAPS ("application/octet-stream")
    );

static GstBuffer *fs_rtp_xdata_depay_process (GstRTPBaseDepayload * depayload,
    GstBuffer * buf);

G_DEFINE_TYPE (FsRTPXdataDepay, fs_rtp_xdata_depay,
    GST_TYPE_RTP_BASE_DEPAYLOAD);

static void
fs_rtp_xdata_depay_class_init (FsRTPXdataDepayClass * klass)
{
  GstElementClass *gstelement_class;
  GstRTPBaseDepayloadClass *gstrtpbasedepayload_class;

  gstelement_class = (GstElementClass *) klass;
  gstrtpbasedepayload_class = (GstRTPBaseDepayloadClass *) klass;

  gstrtpbasedepayload_class->process = fs_rtp_xdata_depay_process;

  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_rtp_xdata_depay_src_template));
  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_rtp_xdata_depay_sink_template));
  gst_element_class_set_static_metadata (gstelement_class,
      "RTP Depayloader for Microsoft Lync x-data",
      "Codec/Depayloader/Network/RTP",
      "Extracts data from Microsoft Lync RTP x-data packets",
      "Olivier Crete ");
}

static void
fs_rtp_xdata_depay_init (FsRTPXdataDepay * rtpxdatadepay)
{
  GstRTPBaseDepayload *depayload = GST_RTP_BASE_DEPAYLOAD (rtpxdatadepay);

  depayload->clock_rate = 90000;
}

static GstBuffer *
fs_rtp_xdata_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{
  GstBuffer *outbuf;
  GstRTPBuffer rtp = { NULL };

  gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp);
  outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
  gst_rtp_buffer_unmap (&rtp);

  return outbuf;
}

gboolean
fs_rtp_xdata_depay_plugin_init (GstPlugin * plugin)
{
  return gst_element_register (plugin, "fsrtpxdatadepay",
      GST_RANK_SECONDARY, FS_TYPE_RTP_XDATA_DEPAY);
}
farstream-0.2.7/gst/fsrtpxdata/fsrtpxdata.c0000664000076400007640000000262512461773672015764 00000000000000/*
 * Microsoft Lync RTP x-data Gst Element
 *
 * Copyright 2014 Collabora Ltd.
 *   @author: Olivier Crete 
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write tox the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#include "fsrtpxdatapay.h"
#include "fsrtpxdatadepay.h"

static gboolean
plugin_init (GstPlugin * plugin)
{
  if (!fs_rtp_xdata_depay_plugin_init (plugin))
    return FALSE;

  if (!fs_rtp_xdata_pay_plugin_init (plugin))
    return FALSE;

  return TRUE;
}

GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
    GST_VERSION_MINOR,
    fsrtpxdata,
    "Farstream Microsoft Lync x-data RTP plugin",
    plugin_init, VERSION, "LGPL", "Farstream",
    "http://www.freedesktop.org/wiki/Software/Farstream")
farstream-0.2.7/gst/fsrtpxdata/fsrtpxdatapay.h0000664000076400007640000000355412461773672016505 00000000000000/*
 * Microsoft Lync RTP x-data Payloader Gst Element
 *
 * Copyright 2014 Collabora Ltd.
 *   @author: Olivier Crete 
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __FS_RTP_XDATA_PAY_H__
#define __FS_RTP_XDATA_PAY_H__

#include 
#include 

G_BEGIN_DECLS
#define FS_TYPE_RTP_XDATA_PAY \
  (fs_rtp_xdata_pay_get_type())
#define FS_RTP_XDATA_PAY(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),FS_TYPE_RTP_XDATA_PAY,FsRTPXdataPay))
#define FS_RTP_XDATA_PAY_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),FS_TYPE_RTP_XDATA_PAY,FsRTPXdataPayClass))
#define FS_IS_RTP_XDATA_PAY(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RTP_XDATA_PAY))
#define FS_IS_RTP_XDATA_PAY_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RTP_XDATA_PAY))
typedef struct _FsRTPXdataPay FsRTPXdataPay;
typedef struct _FsRTPXdataPayClass FsRTPXdataPayClass;

struct _FsRTPXdataPay
{
  GstRTPBasePayload payload;
};

struct _FsRTPXdataPayClass
{
  GstRTPBasePayloadClass parent_class;
};

GType fs_rtp_xdata_pay_get_type (void);

gboolean fs_rtp_xdata_pay_plugin_init (GstPlugin * plugin);

G_END_DECLS
#endif /* __FS_RTP_XDATA_PAY_H__ */
farstream-0.2.7/gst/fsrtpconference/0000775000076400007640000000000012462323000014472 500000000000000farstream-0.2.7/gst/fsrtpconference/fs-rtp-session.h0000664000076400007640000001104412401500475017465 00000000000000/*
 * Farstream - Farstream RTP Session
 *
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2007 Nokia Corp.
 *
 * fs-rtp-session.h - A Farstream RTP Session gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_RTP_SESSION_H__
#define __FS_RTP_SESSION_H__

#include 

#include 

#include "fs-rtp-conference.h"

G_BEGIN_DECLS

/* TYPE MACROS */
#define FS_TYPE_RTP_SESSION \
  (fs_rtp_session_get_type ())
#define FS_RTP_SESSION(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_SESSION, FsRtpSession))
#define FS_RTP_SESSION_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_SESSION, FsRtpSessionClass))
#define FS_IS_RTP_SESSION(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_SESSION))
#define FS_IS_RTP_SESSION_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_SESSION))
#define FS_RTP_SESSION_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_SESSION, FsRtpSessionClass))
#define FS_RTP_SESSION_CAST(obj) ((FsRtpSession *) (obj))

typedef struct _FsRtpSession FsRtpSession;
typedef struct _FsRtpSessionClass FsRtpSessionClass;
typedef struct _FsRtpSessionPrivate FsRtpSessionPrivate;

struct _FsRtpSessionClass
{
  FsSessionClass parent_class;
};

/**
 * FsRtpSession:
 *
 */
struct _FsRtpSession
{
  FsSession parent;

  /*< private >*/

  /* This ID can be accessed by the stream/substreams for this session */
  guint id;

  GMutex mutex; /* Should only be accessed using the macros */

#ifdef DEBUG_MUTEXES
  guint count;
#endif

  FsRtpSessionPrivate *priv;
};

#ifdef DEBUG_MUTEXES

#define FS_RTP_SESSION_LOCK(session) \
  do { \
    g_mutex_lock (&FS_RTP_SESSION (session)->mutex);   \
    g_assert (FS_RTP_SESSION (session)->count == 0);  \
    FS_RTP_SESSION (session)->count++;                \
  } while (0);
#define FS_RTP_SESSION_UNLOCK(session) \
  do { \
    g_assert (FS_RTP_SESSION (session)->count == 1);  \
    FS_RTP_SESSION (session)->count--;                \
    g_mutex_unlock (&FS_RTP_SESSION (session)->mutex); \
  } while (0);
#define FS_RTP_SESSION_GET_LOCK(session) \
  (&FS_RTP_SESSION (session)->mutex)
#else
#define FS_RTP_SESSION_LOCK(session) \
  g_mutex_lock (&(session)->mutex)
#define FS_RTP_SESSION_UNLOCK(session) \
  g_mutex_unlock (&(session)->mutex)
#define FS_RTP_SESSION_GET_LOCK(session) \
  (&(session)->mutex)
#endif


GType fs_rtp_session_get_type (void);

FsRtpSession *fs_rtp_session_new (FsMediaType media_type,
                                  FsRtpConference *conference,
                                  guint id, GError **error);

GstCaps *fs_rtp_session_request_pt_map (FsRtpSession *session, guint pt);


void fs_rtp_session_new_recv_pad (FsRtpSession *session, GstPad *new_pad,
  guint32 ssrc, guint pt);

void fs_rtp_session_associate_ssrc_cname (FsRtpSession *session,
    guint32 ssrc,
    const gchar *cname);

void fs_rtp_session_bye_ssrc (FsRtpSession *session,
    guint32 ssrc);

void fs_rtp_session_ssrc_validated (FsRtpSession *session,
    guint32 ssrc);

gboolean fs_rtp_session_handle_dtmf_event_message (FsRtpSession *session,
    GstMessage *message);

/* Those two functions are for the EXCLUSIVE use of the other users
 * of the rtp session lock */
gboolean fs_rtp_session_has_disposed_enter (FsRtpSession *self, GError **error);
void fs_rtp_session_has_disposed_exit (FsRtpSession *self);

/* These functions are to be called from modules in their "new" method
 * or only when called from the session
 */
FsRtpConference *fs_rtp_session_get_conference (FsRtpSession *self);
GstPad *fs_rtp_session_get_rtpbin_recv_rtp_sink (FsRtpSession *self);
GstPad *fs_rtp_session_get_rtpbin_recv_rtcp_sink (FsRtpSession *self);
GObject *fs_rtp_session_get_rtpbin_internal_session (FsRtpSession *self);
GstElement *fs_rtp_session_get_rtpmuxer(FsRtpSession *self);

G_END_DECLS

#endif /* __FS_RTP_SESSION_H__ */
farstream-0.2.7/gst/fsrtpconference/fs-rtp-bitrate-adapter.h0000664000076400007640000000436112461773672021077 00000000000000/*
 * Farstream Voice+Video library
 *
 *  Copyright 2008 Collabora Ltd,
 *  Copyright 2008 Nokia Corporation
 *   @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_RTP_BITRATE_ADAPTER_H__
#define __FS_RTP_BITRATE_ADAPTER_H__

#include 

G_BEGIN_DECLS

/* #define's don't like whitespacey bits */
#define FS_TYPE_RTP_BITRATE_ADAPTER \
  (fs_rtp_bitrate_adapter_get_type())
#define FS_RTP_BITRATE_ADAPTER(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj), \
  FS_TYPE_RTP_BITRATE_ADAPTER,FsRtpBitrateAdapter))
#define FS_RTP_BITRATE_ADAPTER_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass), \
  FS_TYPE_RTP_BITRATE_ADAPTER,FsRtpBitrateAdapterClass))
#define FS_IS_RTP_BITRATE_ADAPTER(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RTP_BITRATE_ADAPTER))
#define FS_IS_RTP_BITRATE_ADAPTER_CLASS(obj) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RTP_BITRATE_ADAPTER))

typedef struct _FsRtpBitrateAdapter FsRtpBitrateAdapter;
typedef struct _FsRtpBitrateAdapterClass FsRtpBitrateAdapterClass;
typedef struct _FsRtpBitrateAdapterPrivate FsRtpBitrateAdapterPrivate;

struct _FsRtpBitrateAdapter
{
  GstElement parent;

  GstPad *srcpad;
  GstPad *sinkpad;

  GstClock *system_clock;
  GstClockTime interval;
  GQueue bitrate_history;
  GstClockID clockid;
  guint bitrate;
  guint last_bitrate;
};

struct _FsRtpBitrateAdapterClass
{
  GstElementClass parent_class;
};

GType fs_rtp_bitrate_adapter_get_type (void);

GstElement *fs_rtp_bitrate_adapter_new (void);

G_END_DECLS

#endif /* __FS_RTP_BITRATE_ADAPTER_H__ */
farstream-0.2.7/gst/fsrtpconference/fs-rtp-conference.h0000664000076400007640000000523712401500475020120 00000000000000/*
 * Farstream - Farstream RTP Conference Implementation
 *
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2007 Nokia Corp.
 *
 * gstfsrtpconference.h - RTP implementation for Farstream Conference Gstreamer
 *                        Elements
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifndef __FS_RTP_CONFERENCE_H__
#define __FS_RTP_CONFERENCE_H__

#include 

G_BEGIN_DECLS

#define FS_TYPE_RTP_CONFERENCE \
  (fs_rtp_conference_get_type ())
#define FS_RTP_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),FS_TYPE_RTP_CONFERENCE,FsRtpConference))
#define FS_RTP_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),FS_TYPE_RTP_CONFERENCE,FsRtpConferenceClass))
#define FS_RTP_CONFERENCE_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS((obj),FS_TYPE_RTP_CONFERENCE,FsRtpConferenceClass))
#define FS_IS_RTP_CONFERENCE(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RTP_CONFERENCE))
#define FS_IS_RTP_CONFERENCE_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RTP_CONFERENCE))
/* since 0.10.4 */
#define FS_RTP_CONFERENCE_CAST(obj) \
  ((FsRtpConference *)(obj))

typedef struct _FsRtpConference FsRtpConference;
typedef struct _FsRtpConferenceClass FsRtpConferenceClass;
typedef struct _FsRtpConferencePrivate FsRtpConferencePrivate;

struct _FsRtpConference
{
  FsConference parent;

  /*< private >*/
  FsRtpConferencePrivate *priv;

  /* Do not modify the pointer */
  GstElement *rtpbin;
};

struct _FsRtpConferenceClass
{
  FsConferenceClass parent_class;
};

GType fs_rtp_conference_get_type (void);


GST_DEBUG_CATEGORY_EXTERN (fsrtpconference_debug);
GST_DEBUG_CATEGORY_EXTERN (fsrtpconference_disco);
GST_DEBUG_CATEGORY_EXTERN (fsrtpconference_nego);


GstCaps *fs_codec_to_gst_caps (const FsCodec *codec);
GstCaps *fs_codec_to_gst_caps_with_ptime (const FsCodec *codec);

gboolean fs_rtp_conference_is_internal_thread (FsRtpConference *self);

G_END_DECLS

#endif /* __FS_RTP_CONFERENCE_H__ */
farstream-0.2.7/gst/fsrtpconference/fs-rtp-keyunit-manager.c0000664000076400007640000001447112401500475021104 00000000000000/*
 * Farstream - Farstream RTP Keyunit request manager
 *
 * Copyright 2011 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2011 Nokia Corp.
 *
 * fs-rtp-keyunit-request.h - A Farstream RTP Key Unit request manager
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-rtp-keyunit-manager.h"

#include 

#include 

/* Remove this line as soon as the types are merged
 * in gst-plugins-base
 */
#define GST_RTCP_PSFB_TYPE_FIR 4


struct _FsRtpKeyunitManagerClass
{
  GstObjectClass parent_class;
};

struct _FsRtpKeyunitManager
{
  GstObject parent;

  GObject *rtpbin_internal_session;

  GstElement *codecbin;
  gulong rtcp_feedback_id;
};


G_DEFINE_TYPE (FsRtpKeyunitManager, fs_rtp_keyunit_manager, GST_TYPE_OBJECT);

static void fs_rtp_keyunit_manager_dispose (GObject *obj);

static void
fs_rtp_keyunit_manager_class_init (FsRtpKeyunitManagerClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  gobject_class->dispose = fs_rtp_keyunit_manager_dispose;
}

static void
fs_rtp_keyunit_manager_init (FsRtpKeyunitManager *self)
{
}

static void
fs_rtp_keyunit_manager_dispose (GObject *obj)
{
  FsRtpKeyunitManager *self = FS_RTP_KEYUNIT_MANAGER (obj);

  GST_OBJECT_LOCK (self);

  if (self->rtcp_feedback_id)
    g_signal_handler_disconnect (self->rtpbin_internal_session,
        self->rtcp_feedback_id);
  self->rtcp_feedback_id = 0;

  if (self->rtpbin_internal_session)
    g_object_unref (self->rtpbin_internal_session);
  self->rtpbin_internal_session = NULL;

  if (self->codecbin)
    g_object_unref (self->codecbin);
  self->codecbin = NULL;

  GST_OBJECT_UNLOCK (self);

  G_OBJECT_CLASS (fs_rtp_keyunit_manager_parent_class)->dispose (obj);
}

FsRtpKeyunitManager *
fs_rtp_keyunit_manager_new (GObject *rtpbin_internal_session)
{
  FsRtpKeyunitManager *self =  g_object_new (FS_TYPE_RTP_KEYUNIT_MANAGER, NULL);

  self->rtpbin_internal_session = g_object_ref (rtpbin_internal_session);

  return self;
}

struct ElementProperty {
  gchar *element;
  gchar *property;
  guint value;
};

static const struct ElementProperty no_keyframe_property[] = {
  {"x264enc", "key-int-max", G_MAXINT},
  {"dsph263enc", "keyframe-interval", 600},
  {"dsph264enc", "keyframe-interval", 600},
  {"dsphdh264enc", "keyframe-interval", 0},
  {NULL, NULL, 0}
};

static void
disable_keyframes (const GValue *item, gpointer user_data)
{
  GstElement *element = g_value_get_object (item);
  GstElementFactory *factory;
  const gchar *factory_name;
  guint i;

  factory = gst_element_get_factory (element);
  if (!factory)
    return;

  factory_name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory));
  if (!factory_name)
    return;

  for (i = 0; no_keyframe_property[i].element; i++)
    if (!strcmp (no_keyframe_property[i].element, factory_name))
      g_object_set (element, no_keyframe_property[i].property,
          no_keyframe_property[i].value, NULL);

}

static void
fs_rtp_keyunit_manager_disable_keyframes (GstElement *codecbin)
{
  GstIterator *iter;

  iter = gst_bin_iterate_recurse (GST_BIN (codecbin));

  while (gst_iterator_foreach (iter, disable_keyframes, NULL) ==
      GST_ITERATOR_RESYNC)
    gst_iterator_resync (iter);

  gst_iterator_free (iter);
  g_object_unref (codecbin);
}

static void
on_feedback_rtcp (GObject *rtpsession, GstRTCPType type, GstRTCPFBType fbtype,
    guint sender_ssrc, guint media_ssrc, GstBuffer *fci, gpointer user_data)
{
  FsRtpKeyunitManager *self = FS_RTP_KEYUNIT_MANAGER (user_data);
  guint32 local_ssrc;
  GstElement *codecbin;

  if (type != GST_RTCP_TYPE_PSFB)
    return;

  g_object_get (rtpsession, "internal-ssrc", &local_ssrc, NULL);

  /* Let's check if the PLI or FIR is for us */
  if (fbtype == GST_RTCP_PSFB_TYPE_PLI)
  {
    if (media_ssrc != local_ssrc)
      return;
  }
  else if (fbtype == GST_RTCP_PSFB_TYPE_FIR)
  {
    guint position = 0;
    gboolean our_request = FALSE;
    GstMapInfo mapinfo;

    if (!gst_buffer_map (fci, &mapinfo, GST_MAP_READ))
      return;

    for (position = 0; position < mapinfo.size ; position += 8) {
      guint8 *data = mapinfo.data + position;
      guint32 ssrc;

      ssrc = GST_READ_UINT32_BE (data);

      if (ssrc == local_ssrc) {
        our_request = TRUE;
        break;
      }
    }
    gst_buffer_unmap (fci, &mapinfo);
    if (!our_request)
      return;
  }
  else
  {
    return;
  }

  GST_OBJECT_LOCK (self);
  codecbin = self->codecbin;
  self->codecbin = NULL;
  if (self->rtcp_feedback_id)
    g_signal_handler_disconnect (self->rtpbin_internal_session,
        self->rtcp_feedback_id);
  self->rtcp_feedback_id = 0;
  GST_OBJECT_UNLOCK (self);

  if (!codecbin)
    return;

  fs_rtp_keyunit_manager_disable_keyframes (codecbin);
}

gboolean
fs_rtp_keyunit_manager_has_key_request_feedback (FsCodec *send_codec)
{
  return !!fs_codec_get_feedback_parameter (send_codec, "nack", "pli", NULL);
}

void
fs_rtp_keyunit_manager_codecbin_changed (FsRtpKeyunitManager *self,
    GstElement *codecbin, FsCodec *send_codec)
{
  GST_OBJECT_LOCK (self);

  if (self->codecbin)
    g_object_unref (self->codecbin);
  self->codecbin = NULL;

  if (fs_rtp_keyunit_manager_has_key_request_feedback (send_codec))
  {
    self->codecbin = g_object_ref (codecbin);
    if (!self->rtcp_feedback_id)
      self->rtcp_feedback_id = g_signal_connect_object (
        self->rtpbin_internal_session, "on-feedback-rtcp",
        G_CALLBACK (on_feedback_rtcp), self, 0);
  }
  else
  {
    if (self->rtcp_feedback_id)
      g_signal_handler_disconnect (self->rtpbin_internal_session,
          self->rtcp_feedback_id);
    self->rtcp_feedback_id = 0;
  }

  GST_OBJECT_UNLOCK (self);
}
farstream-0.2.7/gst/fsrtpconference/fs-rtp-stream.c0000664000076400007640000012776612462316243017320 00000000000000/*
 * Farstream - Farstream RTP Stream
 *
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2007 Nokia Corp.
 *
 * fs-rtp-stream.c - A Farstream RTP Stream gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-rtp-stream
 * @short_description: A RTP stream in a #FsRtpSession in a #FsRtpConference
 *
 * This is the conjunction of a #FsRtpParticipant and a #FsRtpSession,
 * it is created by calling fs_session_new_stream() on a
 * #FsRtpSession.
 *
 * SRTP authentication & decryption
 * 
 *
 * To tell #FsRtpStream to authenticate and decrypt the media it is
 * receiving using SRTP, one must set the parameters using a
 * #GstStructure named "FarstreamSRTP" and pass it to
 * fs_stream_set_decryption_parameters().
 *
 * The cipher, auth, and key must be specified, refer to the FsRtpSession
 * documentation for details.
 *
 *  
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-rtp-stream.h"

#include 

#include 

/* Signals */
enum
{
  LAST_SIGNAL
};

/* props */
enum
{
  PROP_0,
#if 0
  /* TODO Do we really need this? */
  PROP_SOURCE_PADS,
#endif
  PROP_REMOTE_CODECS,
  PROP_NEGOTIATED_CODECS,
  PROP_CURRENT_RECV_CODECS,
  PROP_DIRECTION,
  PROP_PARTICIPANT,
  PROP_SESSION,
  PROP_RTP_HEADER_EXTENSIONS,
  PROP_DECRYPTION_PARAMETERS,
  PROP_SEND_RTCP_MUX
};

struct _FsRtpStreamPrivate
{
  FsRtpSession *session;
  FsStreamTransmitter *stream_transmitter;

  FsStreamDirection direction;
  gboolean send_rtcp_mux;

  stream_new_remote_codecs_cb new_remote_codecs_cb;
  stream_known_source_packet_receive_cb known_source_packet_received_cb;
  stream_sending_changed_locked_cb sending_changed_locked_cb;
  stream_ssrc_added_cb ssrc_added_cb;
  stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb;
  stream_decrypt_clear_locked_cb decrypt_clear_locked_cb;
  gpointer user_data_for_cb;

  /* protected by session lock */
  GstStructure *decryption_parameters;

  gulong local_candidates_prepared_handler_id;
  gulong new_active_candidate_pair_handler_id;
  gulong new_local_candidate_handler_id;
  gulong error_handler_id;
  gulong known_source_packet_received_handler_id;
  gulong state_changed_handler_id;

  GMutex mutex;
};


G_DEFINE_TYPE(FsRtpStream, fs_rtp_stream, FS_TYPE_STREAM);

#define FS_RTP_STREAM_GET_PRIVATE(o)  \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RTP_STREAM, FsRtpStreamPrivate))

static void fs_rtp_stream_dispose (GObject *object);
static void fs_rtp_stream_finalize (GObject *object);

static void fs_rtp_stream_get_property (GObject *object,
                                    guint prop_id,
                                    GValue *value,
                                    GParamSpec *pspec);
static void fs_rtp_stream_set_property (GObject *object,
                                    guint prop_id,
                                    const GValue *value,
                                    GParamSpec *pspec);

static gboolean fs_rtp_stream_add_remote_candidates (FsStream *stream,
                                                     GList *candidates,
                                                     GError **error);
static gboolean fs_rtp_stream_force_remote_candidates (FsStream *stream,
    GList *remote_candidates,
    GError **error);

static gboolean fs_rtp_stream_set_remote_codecs (FsStream *stream,
                                                 GList *remote_codecs,
                                                 GError **error);

static gboolean fs_rtp_stream_set_transmitter (FsStream *stream,
    const gchar *transmitter,
    GParameter *stream_transmitter_parameters,
    guint stream_transmitter_n_parameters,
    GError **error);

static void fs_rtp_stream_add_id (FsStream *stream, guint id);

static gboolean fs_rtp_stream_set_decryption_parameters (FsStream *stream,
    GstStructure *parameters, GError **error);

static void _local_candidates_prepared (
    FsStreamTransmitter *stream_transmitter,
    gpointer user_data);
static void _new_active_candidate_pair (
    FsStreamTransmitter *stream_transmitter,
    FsCandidate *candidate1,
    FsCandidate *candidate2,
    gpointer user_data);
static void _new_local_candidate (
    FsStreamTransmitter *stream_transmitter,
    FsCandidate *candidate,
    gpointer user_data);
static void
_known_source_packet_received (FsStreamTransmitter *st,
    guint component,
    GstBuffer *buffer,
    FsRtpStream *self);
static void _transmitter_error (
    FsStreamTransmitter *stream_transmitter,
    gint errorno,
    gchar *error_msg,
    gpointer user_data);
static void _substream_codec_changed (FsRtpSubStream *substream,
    FsRtpStream *stream);
static void _state_changed (FsStreamTransmitter *stream_transmitter,
    guint component,
    FsStreamState state,
    gpointer user_data);

// static guint signals[LAST_SIGNAL] = { 0 };

static void
fs_rtp_stream_class_init (FsRtpStreamClass *klass)
{
  GObjectClass *gobject_class;
  FsStreamClass *stream_class = FS_STREAM_CLASS (klass);

  gobject_class = (GObjectClass *) klass;

  gobject_class->set_property = fs_rtp_stream_set_property;
  gobject_class->get_property = fs_rtp_stream_get_property;
  gobject_class->dispose = fs_rtp_stream_dispose;
  gobject_class->finalize = fs_rtp_stream_finalize;

  stream_class->add_remote_candidates = fs_rtp_stream_add_remote_candidates;
  stream_class->set_remote_codecs = fs_rtp_stream_set_remote_codecs;
  stream_class->force_remote_candidates = fs_rtp_stream_force_remote_candidates;
  stream_class->add_id = fs_rtp_stream_add_id;
  stream_class->set_transmitter = fs_rtp_stream_set_transmitter;
  stream_class->set_decryption_parameters =
      fs_rtp_stream_set_decryption_parameters;

  g_type_class_add_private (klass, sizeof (FsRtpStreamPrivate));

  g_object_class_override_property (gobject_class,
                                    PROP_REMOTE_CODECS,
                                    "remote-codecs");
  g_object_class_override_property (gobject_class,
                                    PROP_NEGOTIATED_CODECS,
                                    "negotiated-codecs");
  g_object_class_override_property (gobject_class,
                                    PROP_CURRENT_RECV_CODECS,
                                    "current-recv-codecs");
  g_object_class_override_property (gobject_class,
                                    PROP_DIRECTION,
                                    "direction");
  g_object_class_override_property (gobject_class,
                                    PROP_PARTICIPANT,
                                    "participant");
  g_object_class_override_property (gobject_class,
                                    PROP_SESSION,
                                    "session");
  g_object_class_override_property (gobject_class,
                                    PROP_DECRYPTION_PARAMETERS,
                                    "decryption-parameters");

  g_object_class_install_property (gobject_class,
      PROP_RTP_HEADER_EXTENSIONS,
      g_param_spec_boxed ("rtp-header-extensions",
          "RTP Header extension desired by participant in this stream",
          "GList of RTP Header extensions that the participant for this stream"
          " would like to use",
          FS_TYPE_RTP_HEADER_EXTENSION_LIST,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

  g_object_class_install_property (gobject_class,
      PROP_SEND_RTCP_MUX,
      g_param_spec_boolean ("send-rtcp-mux",
          "Send RTCP muxed with on the same RTP connection",
          "Send RTCP muxed with on the same RTP connection",
          FALSE,
          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}

static void
fs_rtp_stream_init (FsRtpStream *self)
{
  /* member init */
  self->priv = FS_RTP_STREAM_GET_PRIVATE (self);

  self->priv->session = NULL;
  self->participant = NULL;
  self->priv->stream_transmitter = NULL;

  g_mutex_init (&self->priv->mutex);

  self->priv->direction = FS_DIRECTION_NONE;
}

static FsRtpSession *
fs_rtp_stream_get_session (FsRtpStream *self, GError **error)
{
  FsRtpSession *session;

  g_mutex_lock (&self->priv->mutex);
  session = self->priv->session;
  if (session)
    g_object_ref (session);
  g_mutex_unlock (&self->priv->mutex);

  if (!session)
    g_set_error (error, FS_ERROR, FS_ERROR_DISPOSED,
        "Called function after stream has been disposed");

  return session;
}


static FsStreamTransmitter *
fs_rtp_stream_get_stream_transmitter (FsRtpStream *self, GError **error)
{
  FsRtpSession *session = fs_rtp_stream_get_session (self, error);
  FsStreamTransmitter *st = NULL;

  if (!session)
    return NULL;

  FS_RTP_SESSION_LOCK (session);
  st = self->priv->stream_transmitter;
  if (st)
    g_object_ref (st);
  FS_RTP_SESSION_UNLOCK (session);

  if (!st)
    g_set_error (error, FS_ERROR, FS_ERROR_DISPOSED,
        "Stream transmitter not set (or stream has been disposed)");

  g_object_unref (session);
  return st;
}

static void
fs_rtp_stream_dispose (GObject *object)
{
  FsRtpStream *self = FS_RTP_STREAM (object);
  FsStreamTransmitter *st;
  FsRtpParticipant *participant;
  FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);

  if (!session)
    return;

  g_mutex_lock (&self->priv->mutex);
  self->priv->session = NULL;
  g_mutex_unlock (&self->priv->mutex);

  FS_RTP_SESSION_LOCK (session);

  if (self->priv->sending_changed_locked_cb &&
      self->priv->direction & FS_DIRECTION_SEND)
    self->priv->sending_changed_locked_cb (self, FALSE,
        self->priv->user_data_for_cb);

  participant = self->participant;
  self->participant = NULL;

  st = self->priv->stream_transmitter;
  self->priv->stream_transmitter = NULL;

  if (st)
  {
    g_signal_handler_disconnect (st,
        self->priv->local_candidates_prepared_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->new_active_candidate_pair_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->new_local_candidate_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->error_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->known_source_packet_received_handler_id);
    g_signal_handler_disconnect (st,
        self->priv->state_changed_handler_id);

    FS_RTP_SESSION_UNLOCK (session);
    fs_stream_transmitter_stop (st);
    g_object_unref (st);
    FS_RTP_SESSION_LOCK (session);
  }

  while (self->substreams)
  {
    FsRtpSubStream *substream = self->substreams->data;
    self->substreams = g_list_remove (self->substreams, substream);
    FS_RTP_SESSION_UNLOCK (session);
    g_object_unref (substream);
    FS_RTP_SESSION_LOCK (session);
  }

  FS_RTP_SESSION_UNLOCK (session);

  g_object_unref (participant);
  g_object_unref (session);
  g_object_unref (session);

  G_OBJECT_CLASS (fs_rtp_stream_parent_class)->dispose (object);
}

static void
fs_rtp_stream_finalize (GObject *object)
{
  FsRtpStream *self = FS_RTP_STREAM (object);

  fs_codec_list_destroy (self->remote_codecs);
  fs_codec_list_destroy (self->negotiated_codecs);

  if (self->priv->decryption_parameters)
    gst_structure_free (self->priv->decryption_parameters);

  g_mutex_clear (&self->priv->mutex);

  G_OBJECT_CLASS (fs_rtp_stream_parent_class)->finalize (object);
}

static gboolean
_codec_list_has_codec (GList *list, FsCodec *codec)
{
  for (; list; list = g_list_next (list))
  {
    FsCodec *listcodec = list->data;
    if (fs_codec_are_equal (codec, listcodec))
      return TRUE;
  }

  return FALSE;
}

static void
fs_rtp_stream_get_property (GObject *object,
                            guint prop_id,
                            GValue *value,
                            GParamSpec *pspec)
{
  FsRtpStream *self = FS_RTP_STREAM (object);
  FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);

  if (!session)
    return;

  switch (prop_id) {
    case PROP_REMOTE_CODECS:
      FS_RTP_SESSION_LOCK (session);
      g_value_set_boxed (value, self->remote_codecs);
      FS_RTP_SESSION_UNLOCK (session);
      break;
    case PROP_NEGOTIATED_CODECS:
      FS_RTP_SESSION_LOCK (session);
      g_value_set_boxed (value, self->negotiated_codecs);
      FS_RTP_SESSION_UNLOCK (session);
      break;
    case PROP_SESSION:
      g_value_set_object (value, session);
      break;
    case PROP_PARTICIPANT:
      FS_RTP_SESSION_LOCK (session);
      g_value_set_object (value, self->participant);
      FS_RTP_SESSION_UNLOCK (session);
      break;
    case PROP_DIRECTION:
      g_value_set_flags (value, self->priv->direction);
      break;
    case PROP_CURRENT_RECV_CODECS:
      {
        GList *codeclist = NULL;
        GList *substream_item;

        FS_RTP_SESSION_LOCK (session);
        for (substream_item = g_list_first (self->substreams);
             substream_item;
             substream_item = g_list_next (substream_item))
        {
          FsRtpSubStream *substream = substream_item->data;

          if (substream->codec)
          {
            if (!_codec_list_has_codec (codeclist, substream->codec))
              codeclist = g_list_append (codeclist,
                  fs_codec_copy (substream->codec));
          }
        }

        g_value_take_boxed (value, codeclist);
        FS_RTP_SESSION_UNLOCK (session);
      }
      break;
    case PROP_RTP_HEADER_EXTENSIONS:
      FS_RTP_SESSION_LOCK (session);
      g_value_set_boxed (value, self->hdrext);
      FS_RTP_SESSION_UNLOCK (session);
      break;
    case PROP_DECRYPTION_PARAMETERS:
      FS_RTP_SESSION_LOCK (session);
      g_value_set_boxed (value, self->priv->decryption_parameters);
      FS_RTP_SESSION_UNLOCK (session);
      break;
    case PROP_SEND_RTCP_MUX:
      FS_RTP_SESSION_LOCK (session);
      if (self->priv->stream_transmitter == NULL ||
          g_object_class_find_property (
              G_OBJECT_GET_CLASS (self->priv->stream_transmitter),
              "send-component-mux") != NULL)
        g_value_set_boolean (value, self->priv->send_rtcp_mux);
      else
        g_value_set_boolean (value, FALSE);
      FS_RTP_SESSION_UNLOCK (session);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  g_object_unref (session);
}

static void
fs_rtp_stream_set_property (GObject *object,
                            guint prop_id,
                            const GValue *value,
                            GParamSpec *pspec)
{
  FsRtpStream *self = FS_RTP_STREAM (object);
  GList *item;

  switch (prop_id) {
    case PROP_SESSION:
      self->priv->session = FS_RTP_SESSION (g_value_dup_object (value));
      break;
    case PROP_PARTICIPANT:
      self->participant = FS_RTP_PARTICIPANT (g_value_dup_object (value));
      break;
    case PROP_DIRECTION:
      {
        FsStreamTransmitter *st = NULL;
        GList *copy = NULL;
        FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);
        FsStreamDirection dir;

        if (!session)
        {
          self->priv->direction = g_value_get_flags (value);
          return;
        }

        FS_RTP_SESSION_LOCK (session);
        if (self->priv->sending_changed_locked_cb &&
            (self->priv->direction & FS_DIRECTION_SEND) !=
            (g_value_get_flags (value) & FS_DIRECTION_SEND))
          self->priv->sending_changed_locked_cb (self,
              g_value_get_flags (value) & FS_DIRECTION_SEND,
              self->priv->user_data_for_cb);

        dir = self->priv->direction = g_value_get_flags (value);
        FS_RTP_SESSION_UNLOCK (session);
        st = fs_rtp_stream_get_stream_transmitter (self, NULL);
        if (st)
        {
          g_object_set (self->priv->stream_transmitter, "sending",
              dir & FS_DIRECTION_SEND, NULL);
          g_object_unref (st);
        }

        FS_RTP_SESSION_LOCK (session);
        copy = g_list_copy (g_list_first (self->substreams));
        g_list_foreach (copy, (GFunc) g_object_ref, NULL);
        FS_RTP_SESSION_UNLOCK (session);

        for (item = copy;  item; item = g_list_next (item))
          g_object_set (G_OBJECT (item->data),
              "receiving", ((dir & FS_DIRECTION_RECV) != 0),
              NULL);
        g_list_foreach (copy, (GFunc) g_object_unref, NULL);
        g_list_free (copy);
        g_object_unref (session);
      }
      break;
    case PROP_RTP_HEADER_EXTENSIONS:
      {
        FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);
        if (session)
        {
          FS_RTP_SESSION_LOCK (session);
          fs_rtp_header_extension_list_destroy (self->hdrext);
          self->hdrext = g_value_dup_boxed (value);
          FS_RTP_SESSION_UNLOCK (session);
          /* The callbadck can not fail because it does not change
           * the codecs
           */
          self->priv->new_remote_codecs_cb (NULL, NULL, NULL,
              self->priv->user_data_for_cb);
          g_object_unref (session);
        }
      }
      break;
    case PROP_SEND_RTCP_MUX:
      {
        FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);

        if (session) {
          FS_RTP_SESSION_LOCK (session);
          self->priv->send_rtcp_mux = g_value_get_boolean (value);
          if (self->priv->stream_transmitter != NULL &&
              g_object_class_find_property (
                  G_OBJECT_GET_CLASS (self->priv->stream_transmitter),
                  "send-component-mux") != NULL)
            g_object_set (self->priv->stream_transmitter,
                "send-component-mux", self->priv->send_rtcp_mux, NULL);
          FS_RTP_SESSION_UNLOCK (session);
        }
      }
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

}


/**
 * fs_rtp_stream_add_remote_candidate:
 */
static gboolean
fs_rtp_stream_add_remote_candidates (FsStream *stream, GList *candidates,
                                     GError **error)
{
  FsRtpStream *self = FS_RTP_STREAM (stream);
  FsStreamTransmitter *st = fs_rtp_stream_get_stream_transmitter (self, error);
  gboolean ret = FALSE;

  if (!st)
    return FALSE;

  ret = fs_stream_transmitter_add_remote_candidates (st, candidates, error);

  g_object_unref (st);
  return ret;
}

/**
 * fs_rtp_stream_force_remote_candidates
 *
 * Implement FsStream -> force_remote_candidates
 * by calling the same function in the stream transmittrer
 */

static gboolean
fs_rtp_stream_force_remote_candidates (FsStream *stream,
    GList *remote_candidates,
    GError **error)
{
  FsRtpStream *self = FS_RTP_STREAM (stream);
  FsStreamTransmitter *st = fs_rtp_stream_get_stream_transmitter (self, error);
  gboolean ret = FALSE;

  if (!st)
    return FALSE;


  ret = fs_stream_transmitter_force_remote_candidates (
      self->priv->stream_transmitter, remote_candidates,
      error);

  g_object_unref (st);
  return ret;
}


/**
 * fs_rtp_stream_set_remote_codecs:
 * @stream: an #FsStream
 * @remote_codecs: a #GList of #FsCodec representing the remote codecs
 * @error: location of a #GError, or NULL if no error occured
 *
 * This function will set the list of remote codecs for this stream. If
 * the given remote codecs couldn't be negotiated with the list of local
 * codecs or already negotiated codecs for the corresponding #FsSession, @error
 * will be set and %FALSE will be returned. The @remote_codecs list will be
 * copied so it must be free'd using fs_codec_list_destroy() when done.
 *
 * Returns: %FALSE if the remote codecs couldn't be set.
 */
static gboolean
fs_rtp_stream_set_remote_codecs (FsStream *stream,
                                 GList *remote_codecs, GError **error)
{
  FsRtpStream *self = FS_RTP_STREAM (stream);
  GList *item = NULL;
  FsMediaType media_type;
  FsRtpSession *session = fs_rtp_stream_get_session (self, error);

  if (!session)
    return FALSE;

  if (remote_codecs == NULL) {
    g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
      "You can not set NULL remote codecs");
    goto error;
  }

  g_object_get (session, "media-type", &media_type, NULL);

  for (item = g_list_first (remote_codecs); item; item = g_list_next (item))
  {
    FsCodec *codec = item->data;

    if (!codec->encoding_name)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The codec must have an encoding name");
      goto error;
    }
    if (codec->id < 0 || codec->id > 128)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The codec id must be between 0 ans 128 for %s",
          codec->encoding_name);
      goto error;
    }
    if (codec->media_type != media_type)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The media type for codec %s is not %s", codec->encoding_name,
          fs_media_type_to_string (media_type));
      goto error;
    }
  }

  if (self->priv->new_remote_codecs_cb (self, remote_codecs, error,
          self->priv->user_data_for_cb))
  {
    gboolean is_new = TRUE;

    FS_RTP_SESSION_LOCK (session);
    if (self->remote_codecs)
    {
      is_new = !fs_codec_list_are_equal (self->remote_codecs, remote_codecs);
      fs_codec_list_destroy (self->remote_codecs);
    }
    self->remote_codecs = fs_codec_list_copy (remote_codecs);
    FS_RTP_SESSION_UNLOCK (session);

    if (is_new)
      g_object_notify (G_OBJECT (stream), "remote-codecs");
  } else {
    goto error;
  }

  g_object_unref (session);
  return TRUE;

 error:

  g_object_unref (session);
  return FALSE;
}

/**
 * fs_rtp_stream_new:
 * @session: The #FsRtpSession this stream is a child of
 * @participant: The #FsRtpParticipant this stream is for
 * @direction: the initial #FsDirection for this stream
 * @new_remote_codecs_cb: Callback called when the remote codecs change
 * (ie when fs_rtp_stream_set_remote_codecs() is called). One must hold
 * the session lock across calls.
 * @known_source_packet_received: Callback called when a packet from a
 * known source is receive.
 * @sending_changed_locked_cb: Callback called when the sending status of
 *  this stream changes
 * @user_data: User data for the callbacks.
 * This function create a new stream
 *
 * Returns: the newly created string or NULL on error
 */

FsRtpStream *
fs_rtp_stream_new (FsRtpSession *session,
    FsRtpParticipant *participant,
    FsStreamDirection direction,
    stream_new_remote_codecs_cb new_remote_codecs_cb,
    stream_known_source_packet_receive_cb known_source_packet_received_cb,
    stream_sending_changed_locked_cb sending_changed_locked_cb,
    stream_ssrc_added_cb ssrc_added_cb,
    stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb,
    stream_decrypt_clear_locked_cb decrypt_clear_locked_cb,
    gpointer user_data_for_cb)
{
  FsRtpStream *self;

  g_return_val_if_fail (session, NULL);
  g_return_val_if_fail (participant, NULL);
  g_return_val_if_fail (new_remote_codecs_cb, NULL);
  g_return_val_if_fail (known_source_packet_received_cb, NULL);

  self = g_object_new (FS_TYPE_RTP_STREAM,
    "session", session,
    "participant", participant,
    "direction", direction,
    NULL);

  self->priv->new_remote_codecs_cb = new_remote_codecs_cb;
  self->priv->known_source_packet_received_cb = known_source_packet_received_cb;
  self->priv->sending_changed_locked_cb = sending_changed_locked_cb;
  self->priv->ssrc_added_cb = ssrc_added_cb;
  self->priv->get_new_stream_transmitter_cb = get_new_stream_transmitter_cb;
  self->priv->decrypt_clear_locked_cb = decrypt_clear_locked_cb;

  self->priv->user_data_for_cb = user_data_for_cb;

  return self;
}


static void
_local_candidates_prepared (FsStreamTransmitter *stream_transmitter,
    gpointer user_data)
{
  FsRtpStream *self = FS_RTP_STREAM (user_data);
  GstElement *conf = NULL;
  FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);

  if (!session)
    return;

  g_object_get (session, "conference", &conf, NULL);

  gst_element_post_message (conf,
      gst_message_new_element (GST_OBJECT (conf),
          gst_structure_new ("farstream-local-candidates-prepared",
              "stream", FS_TYPE_STREAM, self,
              NULL)));

  gst_object_unref (conf);
  g_object_unref (session);
}


static void
_new_active_candidate_pair (
    FsStreamTransmitter *stream_transmitter,
    FsCandidate *local_candidate,
    FsCandidate *remote_candidate,
    gpointer user_data)
{
  FsRtpStream *self = FS_RTP_STREAM (user_data);
  FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);
  GstElement *conf = NULL;

  if (!session)
    return;

  g_object_get (session, "conference", &conf, NULL);

  gst_element_post_message (conf,
      gst_message_new_element (GST_OBJECT (conf),
          gst_structure_new ("farstream-new-active-candidate-pair",
              "stream", FS_TYPE_STREAM, self,
              "local-candidate", FS_TYPE_CANDIDATE, local_candidate,
              "remote-candidate", FS_TYPE_CANDIDATE, remote_candidate,
              NULL)));

  gst_object_unref (conf);
  g_object_unref (session);
}


static void
_new_local_candidate (
    FsStreamTransmitter *stream_transmitter,
    FsCandidate *candidate,
    gpointer user_data)
{
  FsRtpStream *self = FS_RTP_STREAM (user_data);
  FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);
  GstElement *conf = NULL;

  if (!session)
    return;

  g_object_get (session, "conference", &conf, NULL);

  gst_element_post_message (conf,
      gst_message_new_element (GST_OBJECT (conf),
          gst_structure_new ("farstream-new-local-candidate",
              "stream", FS_TYPE_STREAM, self,
              "candidate", FS_TYPE_CANDIDATE, candidate,
              NULL)));

  gst_object_unref (conf);
  g_object_unref (session);
}

static void
_transmitter_error (
    FsStreamTransmitter *stream_transmitter,
    gint errorno,
    gchar *error_msg,
    gpointer user_data)
{
  FsStream *stream = FS_STREAM (user_data);

  fs_stream_emit_error (stream, errorno, error_msg);
}

static void
_known_source_packet_received (FsStreamTransmitter *st,
    guint component,
    GstBuffer *buffer,
    FsRtpStream *self)
{
  self->priv->known_source_packet_received_cb (self, component, buffer,
      self->priv->user_data_for_cb);
}

static void
_state_changed (FsStreamTransmitter *stream_transmitter,
    guint component,
    FsStreamState state,
    gpointer user_data)
{
  FsRtpStream *self = FS_RTP_STREAM (user_data);
  FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);
  GstElement *conf = NULL;

  if (!session)
    return;

  g_object_get (session, "conference", &conf, NULL);

  gst_element_post_message (conf,
      gst_message_new_element (GST_OBJECT (conf),
          gst_structure_new ("farstream-component-state-changed",
              "stream", FS_TYPE_STREAM, self,
              "component", G_TYPE_UINT, component,
              "state", FS_TYPE_STREAM_STATE, state,
              NULL)));

  gst_object_unref (conf);
  g_object_unref (session);

  if (component == 1 && state == FS_STREAM_STATE_FAILED)
    fs_stream_emit_error (FS_STREAM (self), FS_ERROR_CONNECTION_FAILED,
        "Could not establish connection on the RTP component");
}

static void
_substream_src_pad_added (FsRtpSubStream *substream, GstPad *pad,
                          FsCodec *codec, gpointer user_data)
{
  FsStream *stream = FS_STREAM (user_data);

  fs_stream_emit_src_pad_added (stream, pad, codec);
}

static void
_substream_error (FsRtpSubStream *substream,
    gint errorno,
    gchar *error_msg,
    gchar *debug_msg,
    gpointer user_data)
{
  FsStream *stream = FS_STREAM (user_data);

  fs_stream_emit_error (stream, errorno, error_msg);
}


static void
_substream_unlinked (FsRtpSubStream *substream, gpointer user_data)
{
  FsRtpStream *stream = FS_RTP_STREAM (user_data);
  FsRtpSession *session =  fs_rtp_stream_get_session (stream, NULL);

  if (!session)
    return;

  FS_RTP_SESSION_LOCK (session);
  stream->substreams = g_list_remove (stream->substreams,
      substream);
  FS_RTP_SESSION_UNLOCK (session);

  fs_rtp_sub_stream_stop (substream);

  g_object_unref (substream);
  g_object_unref (session);
}


/**
 * fs_rtp_stream_add_substream_unlock:
 * @stream: a #FsRtpStream
 * @substream: the #FsRtpSubStream to associate with this stream
 *
 * This functions associates a substream with this stream
 *
 * You must enter this function with the session lock held and it will release
 * it.
 *
 * Returns: TRUE on success, FALSE on failure
 */
gboolean
fs_rtp_stream_add_substream_unlock (FsRtpStream *stream,
    FsRtpSubStream *substream,
    GError **error)
{
  gboolean ret = TRUE;
  FsRtpSession *session = fs_rtp_stream_get_session (stream, error);

  if (!session)
    return FALSE;

  stream->substreams = g_list_prepend (stream->substreams,
      substream);
  g_object_set (substream,
      "stream", stream,
      "receiving", ((stream->priv->direction & FS_DIRECTION_RECV) != 0),
      NULL);

  g_signal_connect_object (substream, "unlinked",
      G_CALLBACK (_substream_unlinked), stream, 0);
  g_signal_connect_object (substream, "src-pad-added",
      G_CALLBACK (_substream_src_pad_added), stream, 0);
  g_signal_connect_object (substream, "codec-changed",
      G_CALLBACK (_substream_codec_changed), stream, 0);
  g_signal_connect_object (substream, "error",
      G_CALLBACK (_substream_error), stream, 0);

  fs_rtp_sub_stream_verify_codec_locked (substream);

  /* Only announce a pad if it has a codec attached to it */
  if (substream->codec)
    ret = fs_rtp_sub_stream_add_output_ghostpad_unlock (substream, error);
  else
    FS_RTP_SESSION_UNLOCK (session);

  g_object_unref (session);

  return ret;
}

/**
 *  _substream_codec_changed
 * @substream: The #FsRtpSubStream that may have a new receive codec
 * @stream: a #FsRtpStream
 *
 * This function checks if the specified substream introduces a new codec
 * not present in another substream and if it does, it emits a GstMessage
 * and the notify signal
 */

static void
_substream_codec_changed (FsRtpSubStream *substream,
    FsRtpStream *stream)
{
  GList *substream_item = NULL;
  GList *codeclist = NULL;
  FsRtpSession *session = fs_rtp_stream_get_session (stream, NULL);

  if (!session)
    return;

  FS_RTP_SESSION_LOCK (session);

  if (!substream->codec)
  {
    FS_RTP_SESSION_UNLOCK (session);
    g_object_unref (session);
    return;
  }

  codeclist = g_list_prepend (NULL, fs_codec_copy (substream->codec));

  for (substream_item = stream->substreams;
       substream_item;
       substream_item = g_list_next (substream_item))
  {
    FsRtpSubStream *othersubstream = substream_item->data;

    if (othersubstream != substream)
    {
      if (othersubstream->codec)
      {
        if (fs_codec_are_equal (substream->codec, othersubstream->codec))
          break;

        if (!_codec_list_has_codec (codeclist, othersubstream->codec))
          codeclist = g_list_append (codeclist,
              fs_codec_copy (othersubstream->codec));
      }
    }
  }

  FS_RTP_SESSION_UNLOCK (session);

  if (substream_item == NULL)
  {
    GstElement *conf = NULL;

    g_object_notify (G_OBJECT (stream), "current-recv-codecs");

    g_object_get (session, "conference", &conf, NULL);

    gst_element_post_message (conf,
        gst_message_new_element (GST_OBJECT (conf),
            gst_structure_new ("farstream-recv-codecs-changed",
                "stream", FS_TYPE_STREAM, stream,
                "codecs", FS_TYPE_CODEC_LIST, codeclist,
                NULL)));

    gst_object_unref (conf);
  }

  fs_codec_list_destroy (codeclist);
  g_object_unref (session);
}

/**
 * fs_rtp_stream_set_negotiated_codecs_unlock
 * @stream: a #FsRtpStream
 * @codecs: The #GList of #FsCodec to set for the negotiated-codecs property
 *
 * This function sets the value of the FsStream:negotiated-codecs property.
 * Unlike most other functions in this element, it TAKES the reference to the
 * codecs, so you have to give it its own copy.
 *
 * You must enter this function with the session lock held and it will release
 * it.
 */
void
fs_rtp_stream_set_negotiated_codecs_unlock (FsRtpStream *stream,
    GList *codecs)
{
  FsRtpSession *session = fs_rtp_stream_get_session (stream, NULL);

  if (!session)
    return;

  if (fs_codec_list_are_equal (stream->negotiated_codecs, codecs))
  {
    fs_codec_list_destroy (codecs);
    FS_RTP_SESSION_UNLOCK (session);
    g_object_unref (session);
    return;
  }

  if (stream->negotiated_codecs)
    fs_codec_list_destroy (stream->negotiated_codecs);

  stream->negotiated_codecs = codecs;

  FS_RTP_SESSION_UNLOCK (session);

  g_object_notify (G_OBJECT (stream), "negotiated-codecs");

  g_object_unref (session);
}

static void
fs_rtp_stream_add_id (FsStream *stream, guint id)
{
  FsRtpStream *self = FS_RTP_STREAM (stream);
  FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);

  if (!session)
    return;

  if (self->priv->ssrc_added_cb)
    self->priv->ssrc_added_cb (self, id, self->priv->user_data_for_cb);

  g_object_unref (session);
}

static gboolean
fs_rtp_stream_set_transmitter (FsStream *stream,
    const gchar *transmitter,
    GParameter *stream_transmitter_parameters,
    guint stream_transmitter_n_parameters,
    GError **error)
{
  FsStreamTransmitter *st = NULL;
  FsRtpStream *self = FS_RTP_STREAM (stream);
  FsRtpSession *session = fs_rtp_stream_get_session (self, error);

  if (!session)
    return FALSE;

  FS_RTP_SESSION_LOCK (session);
  if (self->priv->stream_transmitter)
  {
    FS_RTP_SESSION_UNLOCK (session);
    g_object_unref (session);
    return FALSE;
  }
  FS_RTP_SESSION_UNLOCK (session);

  st = self->priv->get_new_stream_transmitter_cb (self,
      FS_PARTICIPANT (self->participant), transmitter,
      stream_transmitter_parameters, stream_transmitter_n_parameters, error,
      self->priv->user_data_for_cb);

  if (!st)
  {
    g_object_unref (session);
    return FALSE;
  }


  g_object_set (st, "sending",
    self->priv->direction & FS_DIRECTION_SEND, NULL);

  self->priv->local_candidates_prepared_handler_id =
    g_signal_connect_object (st,
        "local-candidates-prepared",
        G_CALLBACK (_local_candidates_prepared),
        self, 0);
  self->priv->new_active_candidate_pair_handler_id =
    g_signal_connect_object (st,
        "new-active-candidate-pair",
        G_CALLBACK (_new_active_candidate_pair),
        self, 0);
  self->priv->new_local_candidate_handler_id =
    g_signal_connect_object (st,
        "new-local-candidate",
        G_CALLBACK (_new_local_candidate),
        self, 0);
  self->priv->error_handler_id =
    g_signal_connect_object (st,
        "error",
        G_CALLBACK (_transmitter_error),
        self, 0);
  self->priv->known_source_packet_received_handler_id =
    g_signal_connect_object (st,
        "known-source-packet-received",
        G_CALLBACK (_known_source_packet_received),
        self, 0);
  self->priv->state_changed_handler_id =
    g_signal_connect_object (st,
        "state-changed",
        G_CALLBACK (_state_changed),
        self, 0);


  FS_RTP_SESSION_LOCK (session);
  self->priv->stream_transmitter = st;
  if (self->priv->direction & FS_DIRECTION_SEND)
    self->priv->sending_changed_locked_cb (self,
        self->priv->direction & FS_DIRECTION_SEND,
        self->priv->user_data_for_cb);
  if (g_object_class_find_property (G_OBJECT_GET_CLASS (st),
          "send-component-mux") != NULL)
    g_object_set (st, "send-component-mux", self->priv->send_rtcp_mux, NULL);
  FS_RTP_SESSION_UNLOCK (session);

  if (!fs_stream_transmitter_gather_local_candidates (st, error))
  {

    FS_RTP_SESSION_LOCK (session);
    self->priv->stream_transmitter = NULL;
    FS_RTP_SESSION_UNLOCK (session);
    g_object_unref (st);
    g_object_unref (session);
    return FALSE;
  }

  g_object_unref (session);
  return TRUE;
}

static gint
parse_enum (const gchar *name, const gchar *value, GError **error)
{
  GstElementFactory *factory;
  GstPluginFeature *loaded_feature;
  GType srtpenc_type;
  GObjectClass *srtpenc_class;
  GParamSpec *spec;
  GParamSpecEnum *enumspec;
  GEnumValue *enumvalue;

  if (value == NULL)
    goto error;

  factory = gst_element_factory_find ("srtpenc");
  if (!factory)
    goto error_not_installed;

  loaded_feature = gst_plugin_feature_load (GST_PLUGIN_FEATURE (factory));
  gst_object_unref (factory);
  factory = GST_ELEMENT_FACTORY (loaded_feature);

  srtpenc_type = gst_element_factory_get_element_type (factory);
  gst_object_unref (factory);
  if (srtpenc_type == 0)
    goto error_not_installed;

  srtpenc_class = g_type_class_ref (srtpenc_type);
  if (!srtpenc_class)
    goto error_not_installed;

  spec = g_object_class_find_property (srtpenc_class, name);
  g_type_class_unref (srtpenc_class);
  if (!spec)
    goto error_internal;

  if (!G_IS_PARAM_SPEC_ENUM (spec))
    goto error_internal;
  enumspec = G_PARAM_SPEC_ENUM (spec);

  enumvalue = g_enum_get_value_by_nick (enumspec->enum_class, value);
  if (enumvalue)
    return enumvalue->value;

  enumvalue = g_enum_get_value_by_name (enumspec->enum_class, value);
  if (enumvalue)
    return enumvalue->value;

error:
  g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
      "Invalid %s value: %s", name, value);
  return -1;

error_not_installed:
  g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
      "Can't find srtpenc, no encryption possible");
  return -1;

error_internal:
  g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL,
      "Can't find srtpenc %s property or is not a GEnum type!", name);
  return -1;
}


gboolean
validate_srtp_parameters (GstStructure *parameters,
    gint *srtp_cipher, gint *srtcp_cipher, gint *srtp_auth, gint *srtcp_auth,
    GstBuffer **key, guint *replay_window, GError **error)
{
  gint cipher = 0; /* 0 is null cipher, no encryption */
  gint auth = -1;

  *key = NULL;
  *srtp_cipher = -1;
  *srtcp_cipher = -1;
  *srtp_auth = -1;
  *srtcp_auth = -1;
  *replay_window = 128;

  if (parameters)
  {
    const GValue *v = NULL;
    const gchar *tmp;

    if (!gst_structure_has_name (parameters, "FarstreamSRTP"))
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The only structure accepted is FarstreamSRTP");
      return FALSE;
    }
    if ((tmp = gst_structure_get_string (parameters, "cipher")))
    {
      cipher = parse_enum ("rtp-cipher", tmp, error);
      if (cipher == -1)
        return FALSE;
    }
    if ((tmp = gst_structure_get_string (parameters, "rtp-cipher")))
    {
      *srtp_cipher = parse_enum ("rtp-cipher", tmp, error);
      if (*srtp_cipher == -1)
        return FALSE;
    }
    if ((tmp = gst_structure_get_string (parameters, "rtcp-cipher")))
    {
      *srtcp_cipher = parse_enum ("rtcp-cipher", tmp, error);
      if (*srtcp_cipher == -1)
        return FALSE;
    }
    if ((tmp = gst_structure_get_string (parameters, "auth")))
    {
      auth = parse_enum ("rtp-auth", tmp, error);
      if (auth == -1)
        return FALSE;
    }
    if ((tmp = gst_structure_get_string (parameters, "rtp-auth")))
    {
      *srtp_auth = parse_enum ("rtp-auth", tmp, error);
      if (*srtp_auth == -1)
        return FALSE;
    }
    if ((tmp = gst_structure_get_string (parameters, "rtcp-auth")))
    {
      *srtcp_auth = parse_enum ("rtcp-auth", tmp, error);
      if (*srtcp_auth == -1)
        return FALSE;
    }

    if (*srtp_cipher == -1)
      *srtp_cipher = cipher;
    if (*srtcp_cipher == -1)
      *srtcp_cipher = cipher;

    if (*srtp_auth == -1)
      *srtp_auth = auth;
    if (*srtcp_auth == -1)
      *srtcp_auth = auth;
    if (*srtp_auth == -1 || *srtcp_auth == -1)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "At least the authentication MUST be set, \"auth\" or \"rtp-auth\""
          " and \"rtcp-auth\" are required.");
      return FALSE;
    }

    v = gst_structure_get_value (parameters, "key");
    if (!v)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "The argument \"key\" is required.");
      return FALSE;
    }
    if (!GST_VALUE_HOLDS_BUFFER (v) || gst_value_get_buffer (v) == NULL)
    {
       g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
           "The argument \"key\" MUST hold a GstBuffer.");
       return FALSE;
    }
    *key = gst_value_get_buffer (v);

    if (gst_structure_get_uint (parameters, "replay-window-size",
            replay_window))
    {
      if (*replay_window < 64 || *replay_window >= 32768)
      {
        g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
            "Reply window size must be between 64 and 32768");
        return FALSE;
      }
    }
  } else {
    *srtp_cipher = *srtcp_cipher = *srtcp_auth = *srtp_auth = 0; /* 0 is NULL */
  }

  return TRUE;
}


static gboolean
fs_rtp_stream_set_decryption_parameters (FsStream *stream,
    GstStructure *parameters, GError **error)
{
  FsRtpStream *self = FS_RTP_STREAM (stream);
  GstBuffer *key;
  gint rtp_cipher;
  gint rtcp_cipher;
  gint rtp_auth;
  gint rtcp_auth;
  guint replay_window_size;
  FsRtpSession *session;
  gboolean ret = FALSE;

  g_return_val_if_fail (FS_IS_RTP_STREAM (stream), FALSE);
  g_return_val_if_fail (parameters == NULL ||
      GST_IS_STRUCTURE (parameters), FALSE);

  if (!validate_srtp_parameters (parameters, &rtp_cipher, &rtcp_cipher,
          &rtp_auth, &rtcp_auth, &key, &replay_window_size, error))
    return FALSE;

  session = fs_rtp_stream_get_session (self, error);
  if (!session)
    return FALSE;


  FS_RTP_SESSION_LOCK (session);
  if (self->priv->decryption_parameters != parameters &&
      (!parameters || !self->priv->decryption_parameters ||
          !gst_structure_is_equal (self->priv->decryption_parameters,
              parameters)))
  {
    if (!self->priv->decrypt_clear_locked_cb (self,
            self->priv->user_data_for_cb))
    {
      g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
          "Can't set encryption because srtpdec is not installed");
      goto done;
    }

    if (self->priv->decryption_parameters)
      gst_structure_free (self->priv->decryption_parameters);

    if (parameters)
      self->priv->decryption_parameters = gst_structure_copy (parameters);
    else
      self->priv->decryption_parameters = NULL;

 }

  ret = TRUE;

done:
  FS_RTP_SESSION_UNLOCK (session);
  g_object_unref (session);

  return ret;
}

GstCaps *
fs_rtp_stream_get_srtp_caps_locked (FsRtpStream *self)
{
  const gchar *srtp_cipher;
  const gchar *srtcp_cipher;
  const gchar *srtp_auth;
  const gchar *srtcp_auth;
  const GValue *v;
  GstBuffer *key;

  if (!self->priv->decryption_parameters)
    return NULL;

  /* This is always TRUE for now, but when we expand to DTLS-SRTP, it may
   * not be.
   */
  if (!gst_structure_has_name (self->priv->decryption_parameters,
          "FarstreamSRTP"))
    return NULL;

  srtp_cipher = gst_structure_get_string (self->priv->decryption_parameters,
      "rtp-cipher");
  if (!srtp_cipher)
    srtp_cipher = gst_structure_get_string (self->priv->decryption_parameters,
        "cipher");
  if (!srtp_cipher)
    srtp_cipher = "null";

  srtcp_cipher = gst_structure_get_string (self->priv->decryption_parameters,
      "rtcp-cipher");
  if (!srtcp_cipher)
    srtcp_cipher = gst_structure_get_string (self->priv->decryption_parameters,
        "cipher");
  if (!srtcp_cipher)
    srtcp_cipher = "null";

  srtp_auth = gst_structure_get_string (self->priv->decryption_parameters,
      "rtp-auth");
  if (!srtp_auth)
    srtp_auth = gst_structure_get_string (self->priv->decryption_parameters,
        "auth");
  if (!srtp_auth)
    srtp_auth = "null";

  srtcp_auth = gst_structure_get_string (self->priv->decryption_parameters,
      "rtcp-auth");
  if (!srtcp_auth)
    srtcp_auth = gst_structure_get_string (self->priv->decryption_parameters,
        "auth");
  if (!srtcp_auth)
    srtcp_auth = "null";

  v = gst_structure_get_value (self->priv->decryption_parameters, "key");
  key = gst_value_get_buffer (v);

  return gst_caps_new_simple ("application/x-srtp",
      "srtp-key", GST_TYPE_BUFFER, key,
      "srtp-cipher", G_TYPE_STRING, srtp_cipher,
      "srtcp-cipher", G_TYPE_STRING, srtcp_cipher,
      "srtp-auth", G_TYPE_STRING, srtp_auth,
      "srtcp-auth", G_TYPE_STRING, srtcp_auth,
      NULL);
}
farstream-0.2.7/gst/fsrtpconference/Makefile.in0000664000076400007640000010327012462321046016472 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 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@

# these are the variables your Makefile.am should set
# the example is based on the colorbalance interface

#glib_enum_headers=$(colorbalance_headers)
#glib_enum_define=GST_COLOR_BALANCE
#glib_gen_prefix=gst_color_balance
#glib_gen_basename=colorbalance



VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
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@
target_triplet = @target@

# Optionally build a library to allow building the gtk-doc
@ENABLE_GTK_DOC_TRUE@am__append_1 = libfsrtpconference_doc.la
DIST_COMMON = $(top_srcdir)/common/gst-glib-gen.mak \
	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp $(noinst_HEADERS)
subdir = gst/fsrtpconference
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
	$(top_srcdir)/common/m4/as-auto-alt.m4 \
	$(top_srcdir)/common/m4/as-compiler-flag.m4 \
	$(top_srcdir)/common/m4/as-libtool.m4 \
	$(top_srcdir)/common/m4/as-python.m4 \
	$(top_srcdir)/common/m4/as-scrub-include.m4 \
	$(top_srcdir)/common/m4/as-version.m4 \
	$(top_srcdir)/common/m4/gst-arch.m4 \
	$(top_srcdir)/common/m4/gst-args.m4 \
	$(top_srcdir)/common/m4/gst-check.m4 \
	$(top_srcdir)/common/m4/gst-error.m4 \
	$(top_srcdir)/common/m4/gst-glib2.m4 \
	$(top_srcdir)/common/m4/gst-plugin-docs.m4 \
	$(top_srcdir)/common/m4/gst-plugindir.m4 \
	$(top_srcdir)/common/m4/gst.m4 \
	$(top_srcdir)/common/m4/gtk-doc.m4 \
	$(top_srcdir)/common/m4/pkg.m4 \
	$(top_srcdir)/m4/introspection.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
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__uninstall_files_from_dir = { \
  test -z "$$files" \
    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
         $(am__cd) "$$dir" && rm -f $$files; }; \
  }
am__installdirs = "$(DESTDIR)$(plugindir)" \
	"$(DESTDIR)$(preferencesdir)"
LTLIBRARIES = $(noinst_LTLIBRARIES) $(plugin_LTLIBRARIES)
libfsrtpconference_convenience_la_LIBADD =
am_libfsrtpconference_convenience_la_OBJECTS = fs-rtp-conference.lo \
	fs-rtp-participant.lo fs-rtp-session.lo fs-rtp-stream.lo \
	fs-rtp-substream.lo fs-rtp-discover-codecs.lo \
	fs-rtp-codec-cache.lo fs-rtp-codec-negotiation.lo \
	fs-rtp-codec-specific.lo fs-rtp-special-source.lo \
	fs-rtp-dtmf-event-source.lo fs-rtp-dtmf-sound-source.lo \
	fs-rtp-bin-error-downgrade.lo fs-rtp-bitrate-adapter.lo \
	fs-rtp-keyunit-manager.lo fs-rtp-tfrc.lo \
	fs-rtp-packet-modder.lo tfrc.lo
libfsrtpconference_convenience_la_OBJECTS =  \
	$(am_libfsrtpconference_convenience_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
am__DEPENDENCIES_1 =
libfsrtpconference_la_DEPENDENCIES =  \
	libfsrtpconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
am_libfsrtpconference_la_OBJECTS = fs-rtp-conference-plugin.lo
libfsrtpconference_la_OBJECTS = $(am_libfsrtpconference_la_OBJECTS)
libfsrtpconference_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(libfsrtpconference_la_LDFLAGS) \
	$(LDFLAGS) -o $@
am__DEPENDENCIES_2 = libfsrtpconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
@ENABLE_GTK_DOC_TRUE@libfsrtpconference_doc_la_DEPENDENCIES =  \
@ENABLE_GTK_DOC_TRUE@	$(am__DEPENDENCIES_2)
am__objects_1 = fs-rtp-conference-plugin.lo
@ENABLE_GTK_DOC_TRUE@nodist_libfsrtpconference_doc_la_OBJECTS =  \
@ENABLE_GTK_DOC_TRUE@	$(am__objects_1)
libfsrtpconference_doc_la_OBJECTS =  \
	$(nodist_libfsrtpconference_doc_la_OBJECTS)
@ENABLE_GTK_DOC_TRUE@am_libfsrtpconference_doc_la_rpath =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(libfsrtpconference_convenience_la_SOURCES) \
	$(libfsrtpconference_la_SOURCES) \
	$(nodist_libfsrtpconference_doc_la_SOURCES)
DIST_SOURCES = $(libfsrtpconference_convenience_la_SOURCES) \
	$(libfsrtpconference_la_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
DATA = $(preferences_DATA)
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ERROR_CFLAGS = @ERROR_CFLAGS@
EXEEXT = @EXEEXT@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
FS_AGE = @FS_AGE@
FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@
FS_APIVERSION = @FS_APIVERSION@
FS_API_VERSION = @FS_API_VERSION@
FS_CFLAGS = @FS_CFLAGS@
FS_CURRENT = @FS_CURRENT@
FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@
FS_LIBS = @FS_LIBS@
FS_LIBVERSION = @FS_LIBVERSION@
FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@
FS_LICENSE = @FS_LICENSE@
FS_LT_LDFLAGS = @FS_LT_LDFLAGS@
FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@
FS_PLUGINS_ALL = @FS_PLUGINS_ALL@
FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@
FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@
FS_PLUGIN_PATH = @FS_PLUGIN_PATH@
FS_PREFIX = @FS_PREFIX@
FS_REVISION = @FS_REVISION@
FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@
FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@
GCOV = @GCOV@
GCOV_CFLAGS = @GCOV_CFLAGS@
GCOV_LIBS = @GCOV_LIBS@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LDFLAGS = @GIO_LDFLAGS@
GIO_LIBS = @GIO_LIBS@
GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GLIB_PREFIX = @GLIB_PREFIX@
GLIB_REQ = @GLIB_REQ@
GREP = @GREP@
GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@
GST_API_VERSION = @GST_API_VERSION@
GST_BASE_CFLAGS = @GST_BASE_CFLAGS@
GST_BASE_LIBS = @GST_BASE_LIBS@
GST_CFLAGS = @GST_CFLAGS@
GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@
GST_CHECK_LIBS = @GST_CHECK_LIBS@
GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@
GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@
GST_LIBS = @GST_LIBS@
GST_PACKAGE_NAME = @GST_PACKAGE_NAME@
GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
GST_PLUGINS_DIR = @GST_PLUGINS_DIR@
GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@
GST_TOOLS_DIR = @GST_TOOLS_DIR@
GTKDOC_CHECK = @GTKDOC_CHECK@
GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
GUPNP_CFLAGS = @GUPNP_CFLAGS@
GUPNP_LIBS = @GUPNP_LIBS@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NICE_CFLAGS = @NICE_CFLAGS@
NICE_LIBS = @NICE_LIBS@
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@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VALGRIND_PATH = @VALGRIND_PATH@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
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@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
plugin_LTLIBRARIES = libfsrtpconference.la

# First build a convenience lib with the common stuff so its not built twice
noinst_LTLIBRARIES = libfsrtpconference-convenience.la $(am__append_1)
libfsrtpconference_convenience_la_SOURCES = \
	fs-rtp-conference.c \
	fs-rtp-participant.c \
	fs-rtp-session.c \
	fs-rtp-stream.c \
	fs-rtp-substream.c \
	fs-rtp-discover-codecs.c \
	fs-rtp-codec-cache.c \
	fs-rtp-codec-negotiation.c \
	fs-rtp-codec-specific.c \
	fs-rtp-special-source.c \
	fs-rtp-dtmf-event-source.c \
	fs-rtp-dtmf-sound-source.c \
	fs-rtp-bin-error-downgrade.c \
	fs-rtp-bitrate-adapter.c \
	fs-rtp-keyunit-manager.c \
	fs-rtp-tfrc.c \
	fs-rtp-packet-modder.c \
	tfrc.c

noinst_HEADERS = \
	fs-rtp-conference.h \
	fs-rtp-participant.h \
	fs-rtp-session.h \
	fs-rtp-stream.h \
	fs-rtp-substream.h \
	fs-rtp-discover-codecs.h \
	fs-rtp-codec-cache.h \
	fs-rtp-codec-negotiation.h \
	fs-rtp-codec-specific.h \
	fs-rtp-special-source.h \
	fs-rtp-dtmf-event-source.h \
	fs-rtp-dtmf-sound-source.h \
	fs-rtp-bin-error-downgrade.h \
	fs-rtp-bitrate-adapter.h \
	fs-rtp-keyunit-manager.h \
	fs-rtp-tfrc.h \
	fs-rtp-packet-modder.h \
	tfrc.h

AM_CFLAGS = \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_CFLAGS)


# Build the main plugin
libfsrtpconference_la_SOURCES = fs-rtp-conference-plugin.c
libfsrtpconference_la_LIBADD = \
	libfsrtpconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(FS_LIBS) \
	$(GST_PLUGINS_BASE_LIBS) \
	$(GST_LIBS) \
	-lgstrtp-@GST_API_VERSION@ \
	-lm

libfsrtpconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
preferencesdir = $(datadir)/$(PACKAGE_TARNAME)/$(FS_APIVERSION)/fsrtpconference
preferences_DATA = \
	default-codec-preferences \
	default-element-properties

EXTRA_DIST = $(preferences_DATA)
@ENABLE_GTK_DOC_TRUE@nodist_libfsrtpconference_doc_la_CFLAGS = -DBUILD_GTK_DOC
@ENABLE_GTK_DOC_TRUE@nodist_libfsrtpconference_doc_la_SOURCES = \
@ENABLE_GTK_DOC_TRUE@	$(libfsrtpconference_la_SOURCES)

@ENABLE_GTK_DOC_TRUE@libfsrtpconference_doc_la_LIBADD = $(libfsrtpconference_la_LIBADD)

# Build the build sources
glib_enum_define = FS_RTP
glib_gen_prefix = _fs_rtp
glib_gen_basename = fs-rtp
enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/common/gst-glib-gen.mak $(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 gst/fsrtpconference/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu gst/fsrtpconference/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_srcdir)/common/gst-glib-gen.mak:

$(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):

clean-noinstLTLIBRARIES:
	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
	@list='$(noinst_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
	@$(NORMAL_INSTALL)
	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
	list2=; for p in $$list; do \
	  if test -f $$p; then \
	    list2="$$list2 $$p"; \
	  else :; fi; \
	done; \
	test -z "$$list2" || { \
	  echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \
	  $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \
	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \
	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \
	}

uninstall-pluginLTLIBRARIES:
	@$(NORMAL_UNINSTALL)
	@list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \
	for p in $$list; do \
	  $(am__strip_dir) \
	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \
	done

clean-pluginLTLIBRARIES:
	-test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
	@list='$(plugin_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

libfsrtpconference-convenience.la: $(libfsrtpconference_convenience_la_OBJECTS) $(libfsrtpconference_convenience_la_DEPENDENCIES) $(EXTRA_libfsrtpconference_convenience_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK)  $(libfsrtpconference_convenience_la_OBJECTS) $(libfsrtpconference_convenience_la_LIBADD) $(LIBS)

libfsrtpconference.la: $(libfsrtpconference_la_OBJECTS) $(libfsrtpconference_la_DEPENDENCIES) $(EXTRA_libfsrtpconference_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(libfsrtpconference_la_LINK) -rpath $(plugindir) $(libfsrtpconference_la_OBJECTS) $(libfsrtpconference_la_LIBADD) $(LIBS)

libfsrtpconference_doc.la: $(libfsrtpconference_doc_la_OBJECTS) $(libfsrtpconference_doc_la_DEPENDENCIES) $(EXTRA_libfsrtpconference_doc_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK) $(am_libfsrtpconference_doc_la_rpath) $(libfsrtpconference_doc_la_OBJECTS) $(libfsrtpconference_doc_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-bin-error-downgrade.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-bitrate-adapter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-codec-cache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-codec-negotiation.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-codec-specific.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-conference-plugin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-conference.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-discover-codecs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-dtmf-event-source.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-dtmf-sound-source.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-keyunit-manager.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-packet-modder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-participant.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-session.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-special-source.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-stream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-substream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fs-rtp-tfrc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfrc.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
install-preferencesDATA: $(preferences_DATA)
	@$(NORMAL_INSTALL)
	@list='$(preferences_DATA)'; test -n "$(preferencesdir)" || list=; \
	if test -n "$$list"; then \
	  echo " $(MKDIR_P) '$(DESTDIR)$(preferencesdir)'"; \
	  $(MKDIR_P) "$(DESTDIR)$(preferencesdir)" || exit 1; \
	fi; \
	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)$(preferencesdir)'"; \
	  $(INSTALL_DATA) $$files "$(DESTDIR)$(preferencesdir)" || exit $$?; \
	done

uninstall-preferencesDATA:
	@$(NORMAL_UNINSTALL)
	@list='$(preferences_DATA)'; test -n "$(preferencesdir)" || list=; \
	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
	dir='$(DESTDIR)$(preferencesdir)'; $(am__uninstall_files_from_dir)

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	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-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	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"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

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) $(DATA) $(HEADERS)
installdirs:
	for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(preferencesdir)"; 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:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
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-noinstLTLIBRARIES \
	clean-pluginLTLIBRARIES 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-pluginLTLIBRARIES install-preferencesDATA

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-pluginLTLIBRARIES uninstall-preferencesDATA

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-noinstLTLIBRARIES clean-pluginLTLIBRARIES \
	cscopelist-am ctags ctags-am 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-html install-html-am \
	install-info install-info-am install-man install-pdf \
	install-pdf-am install-pluginLTLIBRARIES \
	install-preferencesDATA 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 tags-am uninstall uninstall-am \
	uninstall-pluginLTLIBRARIES uninstall-preferencesDATA


# these are all the rules generating the relevant files
$(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list
	$(AM_V_GEN)glib-genmarshal --header --prefix=$(glib_gen_prefix)_marshal $^ > $(glib_gen_basename)-marshal.h.tmp && \
	mv $(glib_gen_basename)-marshal.h.tmp $(glib_gen_basename)-marshal.h

$(glib_gen_basename)-marshal.c: $(glib_gen_basename)-marshal.list
	$(AM_V_GEN)echo "#include \"$(glib_gen_basename)-marshal.h\"" >> $(glib_gen_basename)-marshal.c.tmp && \
	glib-genmarshal --body --prefix=$(glib_gen_prefix)_marshal $^ >> $(glib_gen_basename)-marshal.c.tmp && \
	mv $(glib_gen_basename)-marshal.c.tmp $(glib_gen_basename)-marshal.c

$(glib_gen_basename)-enumtypes.h: $(glib_enum_headers)
	$(AM_V_GEN)glib-mkenums \
	--fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \
	--fprod "\n/* enumerations from \"@filename@\" */\n" \
	--vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
	--ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \
	$^ > $@

$(glib_gen_basename)-enumtypes.c: $(glib_enum_headers)
	@if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi
	$(AM_V_GEN)glib-mkenums \
	--fhead "#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \
	--fprod "\n/* enumerations from \"@filename@\" */" \
	--vhead "GType\n@enum_name@_get_type (void)\n{\n  static volatile gsize g_define_type_id__volatile = 0;\n  if (g_once_init_enter (&g_define_type_id__volatile)) {\n    static const G@Type@Value values[] = {"     \
	--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
	--vtail "      { 0, NULL, NULL }\n    };\n    GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n    g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n  }\n  return g_define_type_id__volatile;\n}\n" \
	$^ > $@

# a hack rule to make sure .Plo files exist because they get include'd
# from Makefile's
.deps/%-marshal.Plo:
	@touch $@

.deps/%-enumtypes.Plo:
	@touch $@

# 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:
farstream-0.2.7/gst/fsrtpconference/Makefile.am0000664000076400007640000000434512401500475016462 00000000000000plugin_LTLIBRARIES = libfsrtpconference.la

# First build a convenience lib with the common stuff so its not built twice

noinst_LTLIBRARIES = libfsrtpconference-convenience.la

libfsrtpconference_convenience_la_SOURCES = \
	fs-rtp-conference.c \
	fs-rtp-participant.c \
	fs-rtp-session.c \
	fs-rtp-stream.c \
	fs-rtp-substream.c \
	fs-rtp-discover-codecs.c \
	fs-rtp-codec-cache.c \
	fs-rtp-codec-negotiation.c \
	fs-rtp-codec-specific.c \
	fs-rtp-special-source.c \
	fs-rtp-dtmf-event-source.c \
	fs-rtp-dtmf-sound-source.c \
	fs-rtp-bin-error-downgrade.c \
	fs-rtp-bitrate-adapter.c \
	fs-rtp-keyunit-manager.c \
	fs-rtp-tfrc.c \
	fs-rtp-packet-modder.c \
	tfrc.c

noinst_HEADERS = \
	fs-rtp-conference.h \
	fs-rtp-participant.h \
	fs-rtp-session.h \
	fs-rtp-stream.h \
	fs-rtp-substream.h \
	fs-rtp-discover-codecs.h \
	fs-rtp-codec-cache.h \
	fs-rtp-codec-negotiation.h \
	fs-rtp-codec-specific.h \
	fs-rtp-special-source.h \
	fs-rtp-dtmf-event-source.h \
	fs-rtp-dtmf-sound-source.h \
	fs-rtp-bin-error-downgrade.h \
	fs-rtp-bitrate-adapter.h \
	fs-rtp-keyunit-manager.h \
	fs-rtp-tfrc.h \
	fs-rtp-packet-modder.h \
	tfrc.h

AM_CFLAGS = \
	$(FS_INTERNAL_CFLAGS) \
	$(FS_CFLAGS) \
	$(GST_PLUGINS_BASE_CFLAGS) \
	$(GST_CFLAGS)

# Build the main plugin

libfsrtpconference_la_SOURCES = fs-rtp-conference-plugin.c

libfsrtpconference_la_LIBADD = \
	libfsrtpconference-convenience.la \
	$(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \
	$(FS_LIBS) \
	$(GST_PLUGINS_BASE_LIBS) \
	$(GST_LIBS) \
	-lgstrtp-@GST_API_VERSION@ \
	-lm

libfsrtpconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

preferencesdir = $(datadir)/$(PACKAGE_TARNAME)/$(FS_APIVERSION)/fsrtpconference
preferences_DATA = \
	default-codec-preferences \
	default-element-properties

EXTRA_DIST = $(preferences_DATA)

# Optionally build a library to allow building the gtk-doc

if ENABLE_GTK_DOC
noinst_LTLIBRARIES += libfsrtpconference_doc.la

nodist_libfsrtpconference_doc_la_CFLAGS = -DBUILD_GTK_DOC

nodist_libfsrtpconference_doc_la_SOURCES = \
	$(libfsrtpconference_la_SOURCES)
libfsrtpconference_doc_la_LIBADD = $(libfsrtpconference_la_LIBADD)

endif

# Build the build sources


glib_enum_define=FS_RTP
glib_gen_prefix=_fs_rtp
glib_gen_basename=fs-rtp

include $(top_srcdir)/common/gst-glib-gen.mak
farstream-0.2.7/gst/fsrtpconference/fs-rtp-codec-negotiation.c0000664000076400007640000013055712461773672021424 00000000000000/*
 * Farstream - Farstream RTP Codec Negotiation
 *
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2007 Nokia Corp.
 *
 * fs-discover-codecs.h - A Farstream RTP Codec Negotiation
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-rtp-codec-negotiation.h"

#include 

#include 

#include "fs-rtp-bin-error-downgrade.h"
#include "fs-rtp-codec-specific.h"
#include "fs-rtp-conference.h"


#define GST_CAT_DEFAULT fsrtpconference_nego

#define SEND_PROFILE_ARG "farstream-send-profile"
#define RECV_PROFILE_ARG "farstream-recv-profile"


static CodecAssociation *
lookup_codec_association_by_pt_list (GList *codec_associations, gint pt,
    gboolean want_empty);

static CodecAssociation *
codec_association_copy (CodecAssociation *ca);

static CodecAssociation *
lookup_codec_association_custom_internal (GList *codec_associations,
    gboolean want_disabled, CAFindFunc func, gpointer user_data);

static gboolean
link_unlinked_pads (GstElement *bin,
    GstPadDirection dir,
    const gchar *pad_name,
    guint *pad_count,
    GError **error)
{
  GstPad *pad = NULL;
  guint i = 0;

  while ((pad = gst_bin_find_unlinked_pad (GST_BIN (bin), dir)))
  {
    GstPad *ghostpad;
    gchar *tmp;

    if (i)
      tmp = g_strdup_printf ("%s%d", pad_name, i);
    else
      tmp = g_strdup (pad_name);
    i++;

    ghostpad = gst_ghost_pad_new (tmp, pad);
    gst_object_unref (pad);
    g_free (tmp);

    if (!ghostpad)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
          "Could not create ghostpad for pad %s:%s",
          GST_DEBUG_PAD_NAME (pad));
      return FALSE;
    }

    if (!gst_element_add_pad (bin, ghostpad))
    {
      g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
          "Could not add pad %s to bin", GST_OBJECT_NAME (ghostpad));
      return FALSE;
    }
  }

  if (pad_count)
    *pad_count = i;

  return TRUE;
}

GstElement *
parse_bin_from_description_all_linked (const gchar *bin_description,
    FsStreamDirection direction, guint *src_pad_count, guint *sink_pad_count,
    GError **error)
{
  GstElement *bin;
  gchar *desc;

  if (direction == FS_DIRECTION_SEND)
  {
    desc = g_strdup_printf ("bin.( %s )", bin_description);
  }
  else if (direction == FS_DIRECTION_RECV)
  {
    fs_rtp_bin_error_downgrade_register ();
    desc = g_strdup_printf ("fsrtpbinerrordowngrade.( %s )", bin_description);
  }
  else
  {
    g_assert_not_reached ();
  }
  bin = gst_parse_launch_full (desc, NULL, GST_PARSE_FLAG_NONE,
      error);
  g_free (desc);

  if (!bin)
    return NULL;

  if (!link_unlinked_pads (bin, GST_PAD_SRC, "src", src_pad_count,
          error))
    goto error;

  if (!link_unlinked_pads (bin, GST_PAD_SINK, "sink", sink_pad_count,
          error))
    goto error;

  return bin;
 error:
  gst_object_unref (bin);
  return NULL;
}

static gint
find_matching_pad (gconstpointer a, gconstpointer b)
{
  const GValue *val = a;
  GstPad *pad = GST_PAD (g_value_get_object (val));
  GstCaps *caps = GST_CAPS (b);
  GstCaps *padcaps = NULL;
  gint ret = 1;

  padcaps = gst_pad_query_caps (pad, NULL);

  if (gst_caps_can_intersect (caps, padcaps))
    ret = 0;

  gst_caps_unref (padcaps);

  return ret;
}

static gboolean
validate_codec_profile (CodecPreference *cp, const gchar *bin_description,
    FsStreamDirection direction)
{
  GError *error = NULL;
  GstElement *codecbin = NULL;
  guint src_pad_count = 0, sink_pad_count = 0;
  GstCaps *caps;
  GstIterator *iter;
  gboolean has_matching_pad = FALSE;
  GValue val = {0,};
  gboolean ret = FALSE;

  codecbin = parse_bin_from_description_all_linked (bin_description, direction,
      &src_pad_count, &sink_pad_count, &error);

  /* if could not build bin, fail */
  if (!codecbin)
  {
    GST_WARNING ("Could not build profile (%s): %s", bin_description,
        error->message);
    g_clear_error (&error);
    return FALSE;
  }
  g_clear_error (&error);

  caps = fs_codec_to_gst_caps (cp->codec);

  if (direction == FS_DIRECTION_SEND)
    iter = gst_element_iterate_src_pads (codecbin);
  else if (direction == FS_DIRECTION_RECV)
    iter = gst_element_iterate_sink_pads (codecbin);
  else
    g_assert_not_reached ();

  has_matching_pad = gst_iterator_find_custom (iter, find_matching_pad,
      &val, caps);
  g_value_unset (&val);
  gst_iterator_free (iter);

  if (!has_matching_pad)
  {
    GST_WARNING ("Invalid profile (%s), has no %s pad that matches the codec"
        " details", (direction == FS_DIRECTION_SEND) ? "src" : "sink",
        bin_description);
    goto done;
  }
  if (direction == FS_DIRECTION_SEND)
  {
    if (src_pad_count == 0)
    {
      GST_WARNING ("Invalid profile (%s), has 0 src pad", bin_description);
      goto done;
    }
  }
  else if (direction == FS_DIRECTION_RECV)
  {
    if (src_pad_count != 1)
    {
      GST_WARNING ("Invalid profile (%s), has %u src pads, should have one",
          bin_description, src_pad_count);
      goto done;
    }
  }

  if (sink_pad_count != 1)
  {
    GST_WARNING ("Invalid profile (%s), has %u sink pads, should have one",
        bin_description, sink_pad_count);
    goto done;
  }

  if (direction == FS_DIRECTION_SEND)
  {
    cp->input_caps = codec_get_in_out_caps (cp->codec, caps, FS_DIRECTION_SEND,
        codecbin);
    if (!cp->input_caps)
      goto done;
  }
  else if (direction == FS_DIRECTION_RECV)
  {
    cp->output_caps = codec_get_in_out_caps (cp->codec, caps, FS_DIRECTION_RECV,
        codecbin);
    if (!cp->output_caps)
      goto done;
  }

  ret = TRUE;
done:

  gst_caps_unref (caps);
  gst_object_unref (codecbin);

  return ret;
}

static gboolean
codec_sdp_compare (FsCodec *local_codec, FsCodec *remote_codec)
{
  FsCodec *nego_codec = sdp_negotiate_codec (
      local_codec, FS_PARAM_TYPE_ALL & ~FS_PARAM_TYPE_CONFIG,
      remote_codec, FS_PARAM_TYPE_ALL & ~FS_PARAM_TYPE_CONFIG);

  if (!nego_codec)
    return FALSE;

  fs_codec_destroy (nego_codec);
  return TRUE;
}

/**
 * validate_codecs_configuration:
 * @media_type: The #FsMediaType these codecs should be for
 * @blueprints: A #GList of #CodecBlueprints to validate the codecs agsint
 * @codecs: a #GList of #FsCodec that represent the preferences
 *
 * This function validates a GList of passed FsCodec structures
 * against the valid discovered payloaders
 * It returns a list of the valid ones.
 *
 * Returns: a #GList of #CodecPreference
 */
GList *
validate_codecs_configuration (FsMediaType media_type, GList *blueprints,
  GList *codecs)
{
  GQueue result = G_QUEUE_INIT;
  GList *codec_e = codecs;

  for (codec_e = codecs; codec_e; codec_e = codec_e->next)
  {
    FsCodec *codec = codec_e->data;
    GList *blueprint_e = NULL;
    FsCodecParameter *param;
    CodecPreference *cp = NULL;

    /* Check if codec is for the wrong media_type.. this would be wrong
     */
    if (media_type != codec->media_type)
      goto ignore_this_codec;

    cp = g_slice_new0 (CodecPreference);
    cp->codec = fs_codec_copy (codec);

    if (codec->id >= 0 && codec->id < 128 && codec->encoding_name &&
        !g_ascii_strcasecmp (codec->encoding_name, "reserve-pt"))
      goto accept_codec;

    for (blueprint_e = g_list_first (blueprints);
         blueprint_e;
         blueprint_e = g_list_next (blueprint_e))
    {
      CodecBlueprint *blueprint = blueprint_e->data;

      /* First, lets check the encoding name */
      if (g_ascii_strcasecmp (blueprint->codec->encoding_name,
              codec->encoding_name))
        continue;
      /* If both have a clock_rate, it must be the same */
      if (blueprint->codec->clock_rate && codec->clock_rate &&
          blueprint->codec->clock_rate != codec->clock_rate)
        continue;
        /* At least one needs to have a clockrate */
      else if (!blueprint->codec->clock_rate && !codec->clock_rate)
        continue;

      if (codec_sdp_compare (blueprint->codec, codec))
        break;
    }

    /* If there are send and/or recv profiles, lets test them */
    param = fs_codec_get_optional_parameter (codec, RECV_PROFILE_ARG, NULL);
    if (param && !validate_codec_profile (cp, param->value,
            FS_DIRECTION_RECV))
      goto ignore_this_codec;

    param = fs_codec_get_optional_parameter (codec, SEND_PROFILE_ARG, NULL);
    if (param && !validate_codec_profile (cp, param->value,
            FS_DIRECTION_SEND))
      goto ignore_this_codec;

    /* If no blueprint was found */
    if (blueprint_e == NULL)
    {
      gchar *tmp;

      /* Accept codecs with no blueprints if they have a valid profile */
      if (fs_codec_get_optional_parameter (codec, RECV_PROFILE_ARG, NULL) &&
          codec->encoding_name && codec->clock_rate)
        goto accept_codec;

      tmp = fs_codec_to_string (codec);
      GST_DEBUG ("Preferred codec %s could not be matched with a blueprint",
          tmp);
      g_free (tmp);
      goto ignore_this_codec;
    }

  accept_codec:

    g_queue_push_tail (&result, cp);
    continue;
  ignore_this_codec:
    if (cp)
      codec_preference_destroy (cp);
    continue;
  }

  return result.head;
}


static void
_codec_association_destroy (CodecAssociation *ca)
{
  if (!ca)
    return;

  fs_codec_destroy (ca->codec);
  fs_codec_destroy (ca->send_codec);
  g_free (ca->send_profile);
  g_free (ca->recv_profile);
  g_slice_free (CodecAssociation, ca);
}


static CodecBlueprint *
_find_matching_blueprint (FsCodec *codec, GList *blueprints)
{
  GList *item = NULL;
  GstCaps *caps = NULL;

  caps = fs_codec_to_gst_caps (codec);

  if (!caps)
  {
    gchar *tmp = fs_codec_to_string (codec);
    GST_WARNING ("Could not transform codec into caps: %s", tmp);
    g_free (tmp);
    return NULL;
  }

  for (item = g_list_first (blueprints); item; item = g_list_next (item))
  {
    CodecBlueprint *bp = item->data;

    if (gst_caps_can_intersect (caps, bp->rtp_caps))
      break;
  }

  gst_caps_unref (caps);

  if (item)
    return item->data;
  else
    return NULL;
}

static gint
_find_first_empty_dynamic_entry (
    GList *new_codec_associations,
    GList *old_codec_associations)
{
  int id;

  for (id = 96; id < 128; id++)
  {
    if (lookup_codec_association_by_pt_list (new_codec_associations, id, TRUE))
      continue;
    if (lookup_codec_association_by_pt_list (old_codec_associations, id, TRUE))
      continue;
    return id;
  }

  return -1;
}

static gboolean
_is_disabled (GList *codec_prefs, CodecBlueprint *bp)
{
  GList *item = NULL;

  for (item = g_list_first (codec_prefs); item; item = g_list_next (item))
  {
    CodecPreference *cp = item->data;
    GstCaps *caps = NULL;
    gboolean ok = FALSE;

    /* Only check for DISABLE entries */
    if (cp->codec->id != FS_CODEC_ID_DISABLE)
      continue;

    caps = fs_codec_to_gst_caps (cp->codec);
    if (!caps)
      continue;

    if (gst_caps_can_intersect (caps, bp->rtp_caps))
      ok = TRUE;

    gst_caps_unref (caps);

    if (ok)
      return TRUE;
  }

  return FALSE;
}

/*
 * This function should return TRUE if the codec pref is a "base" of the
 * negotiated codec, but %FALSE otherwise.
 */

static gboolean
match_original_codec_and_codec_pref (CodecAssociation *ca, gpointer user_data)
{
  FsCodec *codec_pref = user_data;

  return codec_sdp_compare (codec_pref, ca->codec);
}

static void
codec_remove_parameter (FsCodec *codec, const gchar *param_name)
{
  FsCodecParameter *param;

  param = fs_codec_get_optional_parameter (codec, param_name, NULL);

  if (param)
    fs_codec_remove_optional_parameter (codec, param);
}

static gchar *
dup_param_value (FsCodec *codec, const gchar *param_name)
{
  FsCodecParameter *param;

  param = fs_codec_get_optional_parameter (codec, param_name, NULL);

  if (param)
    return g_strdup (param->value);
  else
    return NULL;
}

/*
 * Put the recv-only codecs after all of the codecs that are
 * valid for sending.
 * This should have the effect of putting stranges "codecs"
 * like telephone-event and CN at the end
 */

static GList *
list_insert_local_ca (GList *list, CodecAssociation *ca)
{
  if (codec_association_is_valid_for_sending (ca, TRUE))
  {
    GList *item;

    for (item = list; item; item = item->next)
      if (!codec_association_is_valid_for_sending (item->data, TRUE))
        break;
    if (item)
      return g_list_insert_before (list, item, ca);
  }

  return g_list_append (list, ca);
}

static gboolean
verify_caps (CodecPreference *cp, CodecBlueprint *bp, GstCaps *input_caps,
    GstCaps *output_caps)
{
  if (cp && cp->input_caps)
  {
    if (!gst_caps_can_intersect (input_caps, cp->input_caps))
    {
      GST_LOG ("Rejected codec " FS_CODEC_FORMAT " by input caps, filter: %"
          GST_PTR_FORMAT " pref caps: %" GST_PTR_FORMAT,
          FS_CODEC_ARGS (cp->codec), input_caps, cp->input_caps);
      return FALSE;
   }
  }
  else if (bp && bp->input_caps)
  {
    if (!gst_caps_can_intersect (input_caps, bp->input_caps))
    {
      GST_LOG ("Rejected codec " FS_CODEC_FORMAT " by input caps, filter: %"
          GST_PTR_FORMAT " blueprint caps: %" GST_PTR_FORMAT,
          FS_CODEC_ARGS (bp->codec), input_caps, bp->input_caps);
      return FALSE;
    }
  }

  if (cp && cp->output_caps)
  {
    if (!gst_caps_can_intersect (output_caps, cp->output_caps))
    {
      GST_LOG ("Rejected codec " FS_CODEC_FORMAT " by output caps, filter: %"
          GST_PTR_FORMAT " pref caps: %" GST_PTR_FORMAT,
          FS_CODEC_ARGS (cp->codec), output_caps, cp->output_caps);
      return FALSE;
   }
  }
  else if (bp && bp->output_caps)
  {
    if (!gst_caps_can_intersect (output_caps, bp->output_caps))
    {
      GST_LOG ("Rejected codec " FS_CODEC_FORMAT " by output caps, filter: %"
          GST_PTR_FORMAT " blueprint caps: %" GST_PTR_FORMAT,
          FS_CODEC_ARGS (bp->codec), output_caps, bp->output_caps);
      return FALSE;
    }
  }

  return TRUE;
}

/**
 * create_local_codec_associations:
 * @blueprints: The #GList of #CodecBlueprint
 * @codec_prefs: The #GList of #CodecPreference representing codec preferences
 * @current_codec_associations: The #GList of current #CodecAssociation
 *
 * This function creates a list of codec associations from installed codecs
 * and the preferences. It also takes into account the currently negotiated
 * codecs to keep the same payload types and optional parameters.
 *
 * Returns: a #GList of #CodecAssociation
 */

GList *
create_local_codec_associations (
    GList *blueprints,
    GList *codec_prefs,
    GList *current_codec_associations,
    GstCaps *input_caps,
    GstCaps *output_caps)
{
  GList *codec_associations = NULL;
  GList *bp_e = NULL;
  GList *codec_pref_e = NULL;
  GList *lca_e = NULL;
  gboolean has_valid_codec = FALSE;
  CodecAssociation *oldca = NULL;

  if (blueprints == NULL)
    return NULL;

  GST_DEBUG ("Creating local codec associations");

  /* First, lets create the original table by looking at our preferred codecs */
  for (codec_pref_e = codec_prefs;
       codec_pref_e;
       codec_pref_e = g_list_next (codec_pref_e))
  {
    CodecPreference *cp = codec_pref_e->data;
    CodecBlueprint *bp = _find_matching_blueprint (cp->codec,
        blueprints);
    CodecAssociation *ca = NULL;
    GList *bp_param_e = NULL;

    /* If its a negative pref, ignore it in this stage */
    if (cp->codec->id == FS_CODEC_ID_DISABLE)
      continue;

    /* If we want to disable a codec ID, we just insert a reserved codec assoc
     * in the list
     */
    if (cp->codec->id >= 0 && cp->codec->id < 128 &&
        cp->codec->encoding_name &&
        !g_ascii_strcasecmp (cp->codec->encoding_name, "reserve-pt"))
    {
      CodecAssociation *ca = g_slice_new0 (CodecAssociation);
      ca->codec = fs_codec_copy (cp->codec);
      ca->reserved = TRUE;
      codec_associations = g_list_append (codec_associations, ca);
      GST_DEBUG ("Add reserved payload type %d", cp->codec->id);
      continue;
    }

    /* No matching blueprint, can't use this codec */
    if (!bp &&
        !fs_codec_get_optional_parameter (cp->codec, RECV_PROFILE_ARG,
                NULL))
    {
      GST_LOG ("Could not find matching blueprint for preferred codec %s/%s",
          fs_media_type_to_string (cp->codec->media_type),
          cp->codec->encoding_name);
      continue;
    }

    if (!verify_caps (cp, bp, input_caps, output_caps))
      continue;

    /* Now lets see if there is an existing codec that matches this preference
     */

    if (cp->codec->id == FS_CODEC_ID_ANY)
    {
      oldca = lookup_codec_association_custom_internal (
          current_codec_associations, TRUE,
          match_original_codec_and_codec_pref, cp->codec);
    }
    else
    {
      oldca = lookup_codec_association_by_pt_list (current_codec_associations,
          cp->codec->id, FALSE);
      if (oldca && oldca->reserved)
        oldca = NULL;
    }

    /* In this case, we have a matching codec association, lets keep the
     * payload type from it
     */
    if (oldca)
    {
      FsCodec *codec = sdp_negotiate_codec (
          oldca->codec, FS_PARAM_TYPE_BOTH | FS_PARAM_TYPE_CONFIG,
          cp->codec, FS_PARAM_TYPE_ALL);
      FsCodec *send_codec;

      if (codec)
      {
        fs_codec_destroy (codec);

        send_codec = sdp_negotiate_codec (
            oldca->send_codec, FS_PARAM_TYPE_SEND,
            cp->codec,
            FS_PARAM_TYPE_SEND | FS_PARAM_TYPE_SEND_AVOID_NEGO);
        if (send_codec)
          fs_codec_destroy (send_codec);
        else
          oldca = NULL;
      }
      else
      {
        oldca = NULL;
      }
    }

    ca = g_slice_new0 (CodecAssociation);
    ca->blueprint = bp;
    ca->codec = fs_codec_copy (cp->codec);
    codec_remove_parameter (ca->codec, SEND_PROFILE_ARG);
    codec_remove_parameter (ca->codec, RECV_PROFILE_ARG);
    ca->send_codec = codec_copy_filtered (cp->codec,
        FS_PARAM_TYPE_CONFIG);
    codec_remove_parameter (ca->send_codec, SEND_PROFILE_ARG);
    codec_remove_parameter (ca->send_codec, RECV_PROFILE_ARG);
    if (oldca)
      ca->send_codec->id = ca->codec->id = oldca->codec->id;
    ca->send_profile = dup_param_value (cp->codec, SEND_PROFILE_ARG);
    ca->recv_profile = dup_param_value (cp->codec, RECV_PROFILE_ARG);

    if (bp)
    {
      /* Codec pref does not come with a number, but
       * The blueprint has its own id, lets use it */
      if (ca->codec->id == FS_CODEC_ID_ANY &&
          (bp->codec->id >= 0 && bp->codec->id < 128))
        ca->send_codec->id = ca->codec->id = bp->codec->id;

      if (ca->codec->clock_rate == 0)
        ca->codec->clock_rate = ca->send_codec->clock_rate =
            bp->codec->clock_rate;

      if (ca->codec->channels == 0)
        ca->codec->channels = ca->send_codec->channels = bp->codec->channels;

      for (bp_param_e = bp->codec->optional_params;
           bp_param_e;
           bp_param_e = g_list_next (bp_param_e))
      {
        FsCodecParameter *bp_param = bp_param_e->data;

        if (!fs_codec_get_optional_parameter (ca->codec, bp_param->name, NULL))
          fs_codec_add_optional_parameter (ca->codec, bp_param->name,
              bp_param->value);
        if (!fs_codec_get_optional_parameter (ca->send_codec, bp_param->name,
                NULL))
          fs_codec_add_optional_parameter (ca->send_codec, bp_param->name,
              bp_param->value);
      }
    }

    {
      gchar *tmp = fs_codec_to_string (ca->codec);
      GST_LOG ("Added preferred codec %s", tmp);
      g_free (tmp);
    }

    codec_associations = list_insert_local_ca (codec_associations, ca);
  }

  /* Now, only codecs with specified ids are here,
   * the rest are dynamic
   * Lets attribute them here */
  for (lca_e = codec_associations;
       lca_e;
       lca_e = g_list_next (lca_e))
  {
    CodecAssociation *lca = lca_e->data;

    if (lca->reserved)
      continue;

    if (lca->codec->id < 0)
    {
      lca->send_codec->id = lca->codec->id = _find_first_empty_dynamic_entry (
          current_codec_associations, codec_associations);
      if (lca->codec->id < 0)
      {
        GST_ERROR ("We've run out of dynamic payload types");
        goto error;
      }
    }
  }

  /* Now, lets add all other codecs from the blueprints */
  for (bp_e = g_list_first (blueprints); bp_e; bp_e = g_list_next (bp_e)) {
    CodecBlueprint *bp = bp_e->data;
    CodecAssociation *ca = NULL;
    GList *tmpca_e = NULL;
    gboolean next = FALSE;
    FsCodec *codec;

    /* Lets skip codecs that dont have all of the required informations */
    if (bp->codec->clock_rate == 0)
      continue;

    /* Check if its already used */
    for (tmpca_e = codec_associations;
         tmpca_e;
         tmpca_e = g_list_next (tmpca_e))
    {
      CodecAssociation *tmpca = tmpca_e->data;
      if (tmpca->blueprint == bp)
        break;
    }
    if (tmpca_e)
      continue;

    /* Check if it is disabled in the list of preferred codecs */
    if (_is_disabled (codec_prefs, bp))
    {
      gchar *tmp = fs_codec_to_string (bp->codec);
      GST_DEBUG ("Codec %s disabled by config", tmp);
      g_free (tmp);
      continue;
    }

    /* Re-use already existing codec associations with this blueprint
     * if any, we only keep the PT from the old assoc
     * (the rest will be regenerated by the renegotiation)
     */
    for (tmpca_e = current_codec_associations;
         tmpca_e;
         tmpca_e = g_list_next (tmpca_e))
    {
      CodecAssociation *tmpca = tmpca_e->data;

      if (tmpca->blueprint == bp)
      {
        /* Ignore reserved (we've just regenerated them )*/
        if (tmpca->reserved)
          continue;

        /* Ignore it if there is already something for this PT */
        if (lookup_codec_association_by_pt_list (codec_associations,
                tmpca->codec->id, TRUE))
          continue;

        /* Can't keep this codec, for some reason its wrong */
        codec = sdp_negotiate_codec (tmpca->codec, FS_PARAM_TYPE_CONFIG,
            bp->codec, FS_PARAM_TYPE_ALL);
        if (!codec)
          continue;
        fs_codec_destroy (codec);

        if (!verify_caps (NULL, bp, input_caps, output_caps))
          continue;

        ca = g_slice_new0 (CodecAssociation);
        ca->blueprint = bp;
        ca->codec = fs_codec_copy (bp->codec);
        ca->send_codec = codec_copy_filtered (bp->codec, FS_PARAM_TYPE_CONFIG);
        ca->codec->id = ca->send_codec->id = tmpca->codec->id;

        codec_associations = list_insert_local_ca (codec_associations, ca);
        next = TRUE;
      }
    }
    if (next)
      continue;

    codec = sdp_negotiate_codec (bp->codec, FS_PARAM_TYPE_ALL,
        bp->codec, FS_PARAM_TYPE_ALL);

    /* If it does not negotiate against itself, there must be something wrong */
    if (!codec)
      continue;
    fs_codec_destroy (codec);

    if (!verify_caps (NULL, bp, input_caps, output_caps))
      continue;

    ca = g_slice_new0 (CodecAssociation);
    ca->blueprint = bp;
    ca->codec = fs_codec_copy (bp->codec);

    if (ca->codec->id < 0)
    {
      ca->codec->id = _find_first_empty_dynamic_entry (
          current_codec_associations, codec_associations);
      if (ca->codec->id < 0)
      {
        GST_WARNING ("We've run out of dynamic payload types");
        goto error;
      }
    }

    ca->send_codec = codec_copy_filtered (ca->codec, FS_PARAM_TYPE_CONFIG);

    {
      gchar *tmp = fs_codec_to_string (ca->codec);
      GST_LOG ("Added discovered codec %s from blueprint", tmp);
      g_free (tmp);
    }

    codec_associations = list_insert_local_ca (codec_associations, ca);
  }

  for (lca_e = codec_associations;
       lca_e;
       lca_e = g_list_next (lca_e))
  {
    CodecAssociation *ca = lca_e->data;

    if (codec_association_is_valid_for_sending (ca, TRUE))
    {
      has_valid_codec = TRUE;
      break;
    }
  }

  if (!has_valid_codec)
  {
    GST_WARNING ("All codecs disabled by preferences");
    goto error;
  }

  return codec_associations;

 error:
  codec_association_list_destroy (codec_associations);

  return NULL;
}

static void
intersect_feedback_params (FsCodec *new_codec, FsCodec *orig_codec)
{
  GList *item = new_codec->feedback_params;

  while (item)
  {
    GList *nextitem = item->next;
    FsFeedbackParameter *param = item->data;

    if (!fs_codec_get_feedback_parameter (orig_codec, param->type,
            param->subtype, param->extra_params))
      fs_codec_remove_feedback_parameter (new_codec, item);

    item = nextitem;
  }
}

static void
negotiate_stream_codec (CodecAssociation *old_ca, FsCodec *remote_codec,
    gboolean multi_stream, FsCodec **nego_codec, FsCodec **nego_send_codec)
{
  if (multi_stream)
    *nego_codec = sdp_negotiate_codec (old_ca->codec, FS_PARAM_TYPE_ALL,
        remote_codec, FS_PARAM_TYPE_SEND | FS_PARAM_TYPE_SEND_AVOID_NEGO);
  else
    *nego_codec = sdp_negotiate_codec (old_ca->codec, FS_PARAM_TYPE_ALL,
        remote_codec, FS_PARAM_TYPE_SEND);

  if (*nego_codec)
  {
    if (multi_stream)
      *nego_send_codec = sdp_negotiate_codec (
          old_ca->send_codec,
          FS_PARAM_TYPE_BOTH | FS_PARAM_TYPE_SEND_AVOID_NEGO,
          remote_codec, FS_PARAM_TYPE_SEND | FS_PARAM_TYPE_SEND_AVOID_NEGO);
    else
      *nego_send_codec = sdp_negotiate_codec (
          old_ca->send_codec, FS_PARAM_TYPE_BOTH,
          remote_codec, FS_PARAM_TYPE_SEND | FS_PARAM_TYPE_SEND_AVOID_NEGO);

    /* If send codec can't be negotiated, try another one */
    if (!*nego_send_codec)
    {
      fs_codec_destroy (*nego_codec);
      *nego_codec = NULL;
    }
  }

  if (*nego_codec)
  {
    intersect_feedback_params (*nego_codec, old_ca->codec);
    intersect_feedback_params (*nego_send_codec, old_ca->send_codec);

    if (multi_stream)
    {
      (*nego_codec)->minimum_reporting_interval =
          old_ca->codec->minimum_reporting_interval;
      (*nego_send_codec)->minimum_reporting_interval =
          old_ca->send_codec->minimum_reporting_interval;
    }
  }
}

/**
 * negotiate_stream_codecs:
 * @remote_codecs: Remote codecs for the stream
 * @current_codec_assocations: The current list of #CodecAssociation
 * @multi_stream: %TRUE if there is more than one stream.
 *
 * This function performs codec negotiation for a single stream. It does an
 * intersection of the current codecs and the remote codecs.
 *
 * Returns: a #GList of #CodecAssociation
 */

GList *
negotiate_stream_codecs (
    const GList *remote_codecs,
    GList *current_codec_associations,
    gboolean multi_stream)
{
  GList *new_codec_associations = NULL;
  const GList *rcodec_e = NULL;
  GList *item = NULL;

  GST_DEBUG ("Negotiating stream codecs (for %s)",
      multi_stream ? "a single stream" : "multiple streams");

  for (rcodec_e = remote_codecs;
       rcodec_e;
       rcodec_e = g_list_next (rcodec_e)) {
    FsCodec *remote_codec = rcodec_e->data;
    FsCodec *nego_codec = NULL;
    FsCodec *nego_send_codec = NULL;
    CodecAssociation *old_ca = NULL;

    gchar *tmp = fs_codec_to_string (remote_codec);
    GST_DEBUG ("Remote codec %s", tmp);
    g_free (tmp);

    /* First lets try the codec that is in the same PT */

    old_ca = lookup_codec_association_by_pt_list (current_codec_associations,
        remote_codec->id, FALSE);

    if (old_ca) {
      GST_DEBUG ("Have local codec in the same PT, lets try it first");
      negotiate_stream_codec (old_ca, remote_codec, multi_stream,
          &nego_codec, &nego_send_codec);
    }

    if (!nego_codec) {

      for (item = current_codec_associations;
           item;
           item = g_list_next (item))
      {
        old_ca = item->data;

        if (old_ca->disable || old_ca->reserved)
          continue;

        negotiate_stream_codec (old_ca, remote_codec, multi_stream,
            &nego_codec, &nego_send_codec);

        if (nego_codec)
        {
          /* If we have multiple streams with codecs,
           * then priorize the local IDs */
          if (multi_stream)
            nego_send_codec->id = nego_codec->id = old_ca->codec->id;

          break;
        }
      }
    }

    if (nego_codec) {
      CodecAssociation *new_ca = g_slice_new0 (CodecAssociation);
      gchar *tmp;

      new_ca->need_config = old_ca->need_config;
      new_ca->codec = nego_codec;
      new_ca->send_codec = nego_send_codec;
      new_ca->blueprint = old_ca->blueprint;
      new_ca->send_profile = g_strdup (old_ca->send_profile);
      new_ca->recv_profile = g_strdup (old_ca->recv_profile);

      tmp = fs_codec_to_string (nego_codec);
      GST_DEBUG ("Negotiated codec %s", tmp);
      g_free (tmp);

      new_codec_associations = g_list_append (new_codec_associations,
          new_ca);
    } else {
      gchar *tmp = fs_codec_to_string (remote_codec);
      CodecAssociation *new_ca = g_slice_new0 (CodecAssociation);
      GST_DEBUG ("Could not find a valid intersection... for codec %s",
          tmp);
      g_free (tmp);

      new_ca->codec = fs_codec_copy (remote_codec);
      new_ca->disable = TRUE;

      new_codec_associations = g_list_append (new_codec_associations, new_ca);
    }
  }

  /*
   * Check if there is a non-disabled codec left that we can use
   * for sending
   */
  for (item = new_codec_associations;
       item;
       item = g_list_next (item))
  {
    CodecAssociation *ca = item->data;

    if (codec_association_is_valid_for_sending (ca, TRUE))
      return new_codec_associations;
  }

  /* Else we destroy when and return NULL.. ie .. an error */
  codec_association_list_destroy (new_codec_associations);

  return NULL;
}

static void
keep_config_from_old_codec (FsCodec *new_codec, FsCodec *old_codec)
{
  GList *item;

  for (item = old_codec->optional_params; item; item = item->next)
  {
    FsCodecParameter *oldparam = item->data;
    if (!fs_codec_get_optional_parameter (new_codec, oldparam->name, NULL)
        && codec_has_config_data_named (new_codec, oldparam->name))
      fs_codec_add_optional_parameter (new_codec, oldparam->name,
          oldparam->value);
  }
}

static gboolean
match_send_codec_no_pt (CodecAssociation *old_ca, gpointer user_data)
{
  FsCodec *old_send_codec;
  FsCodec *tmpcodec = NULL;
  CodecAssociation *new_ca = user_data;
  gboolean ret;

  if (old_ca->disable || old_ca->reserved || !old_ca->send_codec)
    return FALSE;

  if (new_ca->send_codec->id == old_ca->send_codec->id)
  {
    old_send_codec = old_ca->send_codec;
  }
  else
  {
    tmpcodec = old_send_codec = fs_codec_copy (old_ca->send_codec);
    old_send_codec->id = new_ca->codec->id;
  }

  ret = fs_codec_are_equal (old_send_codec, new_ca->send_codec);
  fs_codec_destroy (tmpcodec);

  return ret;
}

/**
 * finish_codec_negotiation:
 * @old_codec_associations: The previous list of negotiated #CodecAssociation
 * @new_codec_associations: The new list of negotiated #CodecAssociation,
 *   will be modified by the negotiation
 *
 * This function performs the last step of the codec negotiation after the
 * intersection will all of the remote codecs has been done. It will keep
 * old codecs in case the other end does the non-standard thing and sends
 * using the PT we offered instead of using the negotiated result.
 * It also adds a marker to the list for every previously disabled codec so
 * they're not re-used.
 *
 * It also keeps the old discovered codec parameters if the other parameters
 * are the same.
 *
 * Returns: a modified list of #CodecAssociation
 */

GList *
finish_codec_negotiation (
    GList *old_codec_associations,
    GList *new_codec_associations)
{
  int i;
  GList *item;

  /* Now, lets fill all of the PTs that were previously used in the session
   * even if they are not currently used, so they can't be re-used
   */

  for (i=0; i < 128; i++)
  {
    CodecAssociation *local_ca = NULL;

    /* We can skip ids where something already exists */
    if (lookup_codec_association_by_pt_list (new_codec_associations, i, TRUE))
      continue;

    /* We check if our local table (our offer) and if we offered
     * something, we add it. Some broken implementation (like Tandberg's)
     * send packets on PTs that they did not put in their response
     */
    local_ca = lookup_codec_association_by_pt_list (old_codec_associations,
        i, FALSE);
    if (local_ca) {
      CodecAssociation *new_ca = codec_association_copy (local_ca);
      new_ca->recv_only = TRUE;
      new_codec_associations = g_list_append (new_codec_associations, new_ca);
    }
  }

  for (item = new_codec_associations; item; item = g_list_next (item))
  {
    CodecAssociation *new_ca = item->data;
    CodecAssociation *old_ca = NULL;

    if (new_ca->disable || new_ca->reserved || new_ca->recv_only)
    {
      new_ca->need_config = FALSE;
      continue;
    }

    old_ca = lookup_codec_association_custom_internal (old_codec_associations,
        TRUE, match_send_codec_no_pt, new_ca);
    if (old_ca)
      keep_config_from_old_codec (new_ca->codec, old_ca->codec);

    new_ca->need_config = codec_needs_config (new_ca->codec);
  }

  return new_codec_associations;
}


static CodecAssociation *
lookup_codec_association_by_pt_list (GList *codec_associations, gint pt,
                                     gboolean want_disabled)
{
  while (codec_associations)
  {
    if (codec_associations->data)
    {
      CodecAssociation *ca = codec_associations->data;
      if (ca->codec->id == pt &&
          (want_disabled || (!ca->disable && !ca->reserved)))
        return ca;
    }
    codec_associations = g_list_next (codec_associations);
  }

  return NULL;
}


/**
 * lookup_codec_association_by_codec:
 * @codec_associations: a #GList of CodecAssociation
 * @pt: a payload-type number
 *
 * Finds the first #CodecAssociation that matches the payload type
 *
 * Returns: a #CodecAssociation
 */

CodecAssociation *
lookup_codec_association_by_pt (GList *codec_associations, gint pt)
{
  return lookup_codec_association_by_pt_list (codec_associations, pt, FALSE);
}

/**
 * lookup_codec_association_by_codec:
 * @codec_associations: a #GList of #CodecAssociation
 * @codec: The #FsCodec to look for
 *
 * Finds the first #CodecAssociation that matches the #FsCodec
 *
 * Returns: a #CodecAssociation
 */

CodecAssociation *
lookup_codec_association_by_codec (GList *codec_associations, FsCodec *codec)
{
  while (codec_associations)
  {
    if (codec_associations->data)
    {
      CodecAssociation *ca = codec_associations->data;
      if (fs_codec_are_equal (ca->codec, codec))
        return ca;
    }
    codec_associations = g_list_next (codec_associations);
  }

  return NULL;
}

/**
 * codec_association_list_destroy:
 * @list: a #GList of #CodecAssociation
 *
 * Frees a #GList of #CodecAssociation
 */

void
codec_association_list_destroy (GList *list)
{
  g_list_foreach (list, (GFunc) _codec_association_destroy, NULL);
  g_list_free (list);
}


static CodecAssociation *
codec_association_copy (CodecAssociation *ca)
{
  CodecAssociation *newca = g_slice_new (CodecAssociation);

  g_return_val_if_fail (ca, NULL);

  memcpy (newca, ca, sizeof(CodecAssociation));
  newca->codec = fs_codec_copy (ca->codec);
  newca->send_codec = fs_codec_copy (ca->send_codec);
  newca->send_profile = g_strdup (ca->send_profile);
  newca->recv_profile = g_strdup (ca->recv_profile);

  return newca;
}

GList *
codec_associations_to_codecs_internal (GList *codec_associations,
    gboolean include_config, gboolean send_codecs)
{
  GList *codecs = NULL;
  GList *item = NULL;

  for (item = g_list_first (codec_associations);
       item;
       item = g_list_next (item))
  {
    CodecAssociation *ca = item->data;
    if (!ca->disable && !ca->reserved && !ca->recv_only && ca->codec)
    {
      FsCodec *codec = NULL;

      if (send_codecs)
        codec = fs_codec_copy (ca->send_codec);
      else if (include_config)
        codec = fs_codec_copy (ca->codec);
      else
        codec = codec_copy_filtered (ca->codec, FS_PARAM_TYPE_CONFIG);

      codecs = g_list_append (codecs, codec);
    }
  }

  return codecs;
}


/**
 * codec_associations_to_codecs:
 * @codec_associations: a #GList of #CodecAssociation
 * @include_config: whether to include the config data
 *
 * Returns a #GList of the #FsCodec that are inside the list of associations
 * excluding those that are disabled or otherwise receive-only. It copies
 * the #FsCodec structures.
 *
 * Returns: a #GList of #FsCodec
 */
GList *
codec_associations_to_codecs (GList *codec_associations,
    gboolean include_config)
{
  return codec_associations_to_codecs_internal (codec_associations,
      include_config, FALSE);
}



/**
 * codec_associations_to_send_codecs
 * @codec_associations: a #GList of #CodecAssociation
 *
 * Returns a #GList of the #FsCodec that are inside the list of associations
 * excluding those that are disabled or otherwise receive-only. It copies
 * the #FsCodec structures. These codecs are to be used for sending
 *
 * Returns: a #GList of #FsCodec
 */
GList *
codec_associations_to_send_codecs (GList *codec_associations)
{
  return codec_associations_to_codecs_internal (codec_associations,
      FALSE, TRUE);
}

gboolean
codec_association_is_valid_for_sending (CodecAssociation *ca,
    gboolean needs_codecbin)
{
  if (ca->send_codec &&
      !ca->disable &&
      !ca->reserved &&
      !ca->recv_only &&
      (!needs_codecbin ||
          (ca->blueprint &&
              codec_blueprint_has_factory (ca->blueprint, FS_DIRECTION_SEND)) ||
          ca->send_profile))
    return TRUE;
  else
    return FALSE;
}


static CodecAssociation *
lookup_codec_association_custom_internal (GList *codec_associations,
    gboolean want_disabled, CAFindFunc func, gpointer user_data)
{
  GList *item;

  g_return_val_if_fail (func, NULL);

  for (item = codec_associations;
       item;
       item = g_list_next (item))
  {
    CodecAssociation *ca = item->data;
    if ((ca->disable && !want_disabled) || ca->reserved)
      continue;

    if (func (ca, user_data))
      return ca;
  }

  return NULL;
}


CodecAssociation *
lookup_codec_association_custom (GList *codec_associations,
    CAFindFunc func, gpointer user_data)
{

  return lookup_codec_association_custom_internal (codec_associations, FALSE,
      func, user_data);
}


/**
 * codec_association_list_are_equal
 * @list1: a #GList of #FsCodec
 * @list2: a #GList of #FsCodec
 *
 * Compares the non-disabled #FsCodec of two lists of #CodecAssociation
 *
 * Returns: TRUE if they are identical, FALSE otherwise
 */

gboolean
codec_associations_list_are_equal (GList *list1, GList *list2)
{
  for (;list1 && list2;
       list1 = g_list_next (list1), list2 = g_list_next (list2))
  {
    CodecAssociation *ca1 = NULL;
    CodecAssociation *ca2 = NULL;

    /* Skip disabled codecs */
    while (list1) {
      ca1 = list1->data;
      if (!ca1->disable || !ca1->reserved)
        break;
      list1 = g_list_next (list1);
    }
    while (list2) {
      ca2 = list2->data;
      if (!ca2->disable || !ca2->reserved)
        break;
      list2 = g_list_next (list2);
    }

    if (list1 == NULL || list2 == NULL)
      break;

    /* We must emit the notification if the recv-only status
     * of a codec has changed
     */
    if (ca1->recv_only != ca2->recv_only)
      return FALSE;

    if (!fs_codec_are_equal (ca1->codec, ca2->codec))
      return FALSE;
  }

  if (list1 == NULL && list2 == NULL)
    return TRUE;
  else
    return FALSE;
}


/**
 * lookup_codec_association_by_codec_for_sending
 * @codec_associations: a #GList of #CodecAssociation
 * @codec: The #FsCodec to look for
 *
 * Finds the first #CodecAssociation that matches the #FsCodec and that is
 * valid for sending, the config data inside both are ignored.
 *
 * Returns: a #CodecAssociation
 */

CodecAssociation *
lookup_codec_association_by_codec_for_sending (GList *codec_associations,
    FsCodec *codec)
{
  GList *item;
  CodecAssociation *res = NULL;
  FsCodec *tmpcodec = codec_copy_filtered (codec, FS_PARAM_TYPE_CONFIG);

  for (item = codec_associations; item; item = g_list_next (item))
  {
    CodecAssociation *ca = item->data;

    if (codec_association_is_valid_for_sending (ca, FALSE) &&
        fs_codec_are_equal (ca->send_codec, tmpcodec))
    {
      res = ca;
      break;
    }
  }

  fs_codec_destroy (tmpcodec);

  return res;
}

FsRtpHeaderExtension *
get_extension (GList *hdrexts, const gchar *uri, guint id)
{
  GList *item;

  for (item = hdrexts; item; item = item->next)
  {
    FsRtpHeaderExtension *hdrext = item->data;

    if ((!uri || !g_ascii_strcasecmp (hdrext->uri, uri)) &&
        (id == G_MAXUINT || hdrext->id == id))
      return hdrext;
  }

  return NULL;
}


static inline gboolean
read_bit (guint8 *array, guint8 bit)
{
  return array[bit/8] & (1 << (bit%8));
}

static inline void
write_bit (guint8 *array, guint8 bit)
{
  array[bit/8] |= 1 << (bit%8);
}

GList *
create_local_header_extensions (GList *hdrexts_old, GList *hdrexts_prefs,
    guint8 *used_ids)
{
  GList *hdrexts_new = fs_rtp_header_extension_list_copy (hdrexts_prefs);
  GList *item;

  for (item = hdrexts_new; item; item = item->next)
  {
    FsRtpHeaderExtension *hdrext = item->data;
    FsRtpHeaderExtension *hdrext_existing = get_extension (hdrexts_old,
        hdrext->uri, G_MAXUINT);

    if (hdrext_existing &&
        hdrext_existing->id < 256 &&
        !get_extension (hdrexts_prefs, NULL, hdrext->id))
      hdrext->id = hdrext_existing->id;
  }

  for (item = hdrexts_new; item; item = item->next)
  {
    FsRtpHeaderExtension *hdrext = item->data;
    if (hdrext->id < 256)
      write_bit (used_ids, hdrext->id);
  }

  return hdrexts_new;
}

static void
renumber_hdrext (GList *hdrexts, guint old_id, guint new_id)
{
   GList *item;

   for (item = hdrexts; item; item = item->next)
   {
     FsRtpHeaderExtension *hdrext = item->data;

     if (hdrext->id == old_id)
       hdrext->id = new_id;
   }
}

GList *
negotiate_stream_header_extensions (GList *hdrexts, GList *hdrexts_stream,
    gboolean favor_remote, guint8 *used_ids)
{
  GList *item;

  if (!hdrexts)
    return NULL;

  for (item = hdrexts_stream; item; item = item->next)
  {
    FsRtpHeaderExtension *hdrext_stream = item->data;
    if (hdrext_stream->id < 256)
      write_bit (used_ids, hdrext_stream->id);
  }

  for (item = hdrexts; item;)
  {
    FsRtpHeaderExtension *hdrext = item->data;
    FsRtpHeaderExtension *hdrext_stream = get_extension (hdrexts_stream,
        hdrext->uri, G_MAXUINT);
    GList *next = item->next;

    if (hdrext_stream)
    {
      /* Use the minimum direction */
      hdrext->direction &= hdrext_stream->direction;
      /* If favor remotes, then we use the remote one for all matching
       * extensions, we want to preserve duplicates, modules will pick
       * the one they prefer if they have a preference
       */
      if (favor_remote)
        renumber_hdrext (hdrexts, hdrext->id, hdrext_stream->id);
    }
    else
    {
      hdrexts = g_list_delete_link (hdrexts, item);
      fs_rtp_header_extension_destroy (hdrext);
    }

    item = next;
  }

  return hdrexts;
}

static GList *
hdrext_list_remove_by_id (GList *hdrexts, guint id)
{
  GList *item;

  for (item = hdrexts; item; item = item->next)
  {
      FsRtpHeaderExtension *hdrext = item->data;

      if (hdrext->id == id)
      {
        GList *next = item->next;

        hdrexts = g_list_delete_link (hdrexts, item);
        fs_rtp_header_extension_destroy (hdrext);
        item = next;
      }
    }

  return hdrexts;
}

GList *
finish_header_extensions_nego (GList *hdrexts, guint8 *used_ids)
{
  GList *item;
  guint min = 1;

  for (item = hdrexts; item;)
  {
    FsRtpHeaderExtension *hdrext = item->data;

    if (hdrext->id >= 256)
    {

      /* Find the next available ID */
      for (; min < 256; min++)
        if (!read_bit (used_ids, min))
          break;

      if (min < 256)
      {
        /* We have a valid ID, remove any other extension with the same ID */
        /* and then use it */
        item = hdrext_list_remove_by_id (item->next, hdrext->id);
        hdrext->id = min;
        write_bit (used_ids, min);
        min++;
      }
      else
      {
        /* We lost, we used all slots between 1 and 255... forget this extension
         */
        GList *next = item->next;

        hdrexts = g_list_delete_link (hdrexts, item);
        fs_rtp_header_extension_destroy (hdrext);
        item = next;
      }
    }
    else
    {
      /* Item already has a valid number, keep as-is */
      item = item->next;
    }
  }

  return hdrexts;

}

void
codec_preference_destroy (CodecPreference *cp)
{
  fs_codec_destroy (cp->codec);

  gst_caps_replace (&cp->input_caps, NULL);
  gst_caps_replace (&cp->output_caps, NULL);

  g_slice_free (CodecPreference, cp);
}
farstream-0.2.7/gst/fsrtpconference/default-codec-preferences0000664000076400007640000000220412401500475021337 00000000000000################
# Audio codecs #
################

# We love Opus !
# But please give us standardised payloading
[audio/X-GST-OPUS-DRAFT-SPITTKA-00]

[audio/SPEEX:8000]
clock-rate=8000

[audio/SPEEX:16000]
clock-rate=16000

[audio/AMR]

[audio/G729]

[audio/ILBC]

# It seems to be pretty common to hard-code that dynamic payload type 101
# is telephone-event at clock rate 8000. This also avoids an interop
# bug with Google Chrome's WebRTC, GMail and possibly other implementations.
[audio/telephone-event:8000]
clock-rate=8000
id=101

# Disabled audio codecs
# These are unsuitable for calling

[audio/DV]
id=-1

[audio/MPA]
id=-1

[audio/VORBIS]
id=-1

[audio/MP3]
id=-1

################
# Video codecs #
################

[video/H264]
#feedback:tfrc=
feedback:nack/pli=

# We like VP8, but H.264 is still better
[video/VP8-DRAFT-IETF-01]

[video/H263]
feedback:nack/pli=

[video/THEORA]
#feedback:tfrc=
feedback:nack/pli=

[video/JPEG]

# Disable the ones we don't want

[video/DV]
id=-1

[video/MPV]
id=-1

# Payloader is broken, see gnome bug #577784
[video/H263-2000]
id=-1

#[rtp-hdrext:video:0]
#id=3
#uri=urn:ietf:params:rtp-hdrext:rtt-sendts
farstream-0.2.7/gst/fsrtpconference/fs-rtp-dtmf-event-source.c0000664000076400007640000002367611710041462021360 00000000000000/*
 * Farstream - Farstream RTP DTMF Event Source
 *
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2007 Nokia Corp.
 *
 * fs-rtp-dtmf-event-source.c - A Farstream RTP Event Source gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-rtp-dtmf-event-source.h"

#include 

#include "fs-rtp-conference.h"
#include "fs-rtp-discover-codecs.h"
#include "fs-rtp-codec-negotiation.h"

#define GST_CAT_DEFAULT fsrtpconference_debug

/*
 * SECTION:fs-rtp-dtmf-event-source
 * @short_description: Class to create the source of DTMF events
 *
 * This class is manages the DTMF Event source and related matters
 *
 */


/* all privates variables are protected by the mutex */
struct _FsRtpDtmfEventSourcePrivate {
  gboolean disposed;
};

G_DEFINE_TYPE (FsRtpDtmfEventSource, fs_rtp_dtmf_event_source,
    FS_TYPE_RTP_SPECIAL_SOURCE);

#define FS_RTP_DTMF_EVENT_SOURCE_GET_PRIVATE(o)                         \
  (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RTP_DTMF_EVENT_SOURCE,     \
   FsRtpDtmfEventSourcePrivate))


static GstElement *
fs_rtp_dtmf_event_source_build (FsRtpSpecialSource *source,
    GList *negotiated_codec_associations,
    FsCodec *selected_codec);


static GList *fs_rtp_dtmf_event_source_class_add_blueprint (
    FsRtpSpecialSourceClass *klass,
    GList *blueprints);
static GList *fs_rtp_dtmf_event_source_negotiation_filter (
    FsRtpSpecialSourceClass *klass,
    GList *codec_associations);
static  FsCodec *fs_rtp_dtmf_event_source_get_codec (
    FsRtpSpecialSourceClass *klass,
    GList *negotiated_codec_associations,
    FsCodec *codec);

static void
fs_rtp_dtmf_event_source_class_init (FsRtpDtmfEventSourceClass *klass)
{
  FsRtpSpecialSourceClass *spsource_class = FS_RTP_SPECIAL_SOURCE_CLASS (klass);

  spsource_class->build = fs_rtp_dtmf_event_source_build;
  spsource_class->add_blueprint = fs_rtp_dtmf_event_source_class_add_blueprint;
  spsource_class->negotiation_filter =
    fs_rtp_dtmf_event_source_negotiation_filter;
  spsource_class->get_codec = fs_rtp_dtmf_event_source_get_codec;

  g_type_class_add_private (klass, sizeof (FsRtpDtmfEventSourcePrivate));
}

static void
fs_rtp_dtmf_event_source_init (FsRtpDtmfEventSource *self)
{
  self->priv = FS_RTP_DTMF_EVENT_SOURCE_GET_PRIVATE (self);
}

/**
 * fs_rtp_dtmf_event_source_class_add_blueprint:
 *
 * Add one blueprint for telephone-event for each different clock-rate that
 * exists in the request
 */

static GList*
fs_rtp_dtmf_event_source_class_add_blueprint (FsRtpSpecialSourceClass *klass,
    GList *blueprints)
{
  GList *item;
  GList *already_done = NULL;
  GstElementFactory *fact = NULL;
  GList *new_blueprints = NULL;

  fact = gst_element_factory_find ("rtpdtmfsrc");
  if (fact)
  {
    gst_object_unref (fact);
  }
  else
  {
    GST_CAT_WARNING (fsrtpconference_disco,
        "Could not find rtpdtmfsrc, will not offer DTMF events");
    return blueprints;
  }

  fact = gst_element_factory_find ("rtpdtmfdepay");
  if (!fact)
    GST_CAT_WARNING (fsrtpconference_disco,
        "Could not find rtpdtmfdepay, will not be able to receive DTMF events");

  for (item = g_list_first (blueprints);
       item;
       item = g_list_next (item))
  {
    CodecBlueprint *bp = item->data;
    GList *done_item = NULL;
    gboolean skip = FALSE;
    CodecBlueprint *new_bp = NULL;

    if (bp->codec->media_type != FS_MEDIA_TYPE_AUDIO)
      continue;

    if (!g_ascii_strcasecmp (bp->codec->encoding_name, "telephone-event"))
      continue;

    if (bp->codec->clock_rate == 0)
      continue;

    for (done_item = g_list_first (already_done);
         done_item;
         done_item = g_list_next (done_item))
    {
      if (GPOINTER_TO_UINT (done_item->data) == bp->codec->clock_rate)
      {
        skip = TRUE;
        break;
      }
    }
    if (skip)
      continue;

    new_bp = g_slice_new0 (CodecBlueprint);

    new_bp->codec = fs_codec_new (FS_CODEC_ID_ANY, "telephone-event",
        FS_MEDIA_TYPE_AUDIO, bp->codec->clock_rate);
    fs_codec_add_optional_parameter (new_bp->codec, "events", "0-15");
    new_bp->rtp_caps = fs_codec_to_gst_caps (new_bp->codec);
    new_bp->media_caps = gst_caps_new_any ();

    if (fact)
      new_bp->receive_pipeline_factory = g_list_prepend (NULL,
          g_list_prepend (NULL, gst_object_ref (fact)));

    new_blueprints = g_list_append (new_blueprints, new_bp);

    already_done = g_list_prepend (already_done,
        GUINT_TO_POINTER (bp->codec->clock_rate));
  }

  if (fact)
    gst_object_unref (fact);

  g_list_free (already_done);

  blueprints = g_list_concat (blueprints, new_blueprints);

  return blueprints;
}

static gboolean
_is_telephony_codec (CodecAssociation *ca, gpointer user_data)
{
  guint clock_rate = GPOINTER_TO_UINT (user_data);

  if (codec_association_is_valid_for_sending (ca, FALSE) &&
      ca->codec->media_type == FS_MEDIA_TYPE_AUDIO &&
      !g_ascii_strcasecmp (ca->codec->encoding_name, "telephone-event") &&
      ca->codec->clock_rate == clock_rate)
    return TRUE;
  else
    return FALSE;
}

/**
 * fs_rtp_dtmf_event_source_get_codec:
 * @negotiated_codec_associations: a #GList of currently negotiated
 *   #CodecAssociation
 * @selected_codec: The current #FsCodec
 *
 * Find the telephone-event codec with the proper clock rate in the list
 *
 * Returns: The #FsCodec of type "telephone-event" with the requested clock-rate
 *   from the list, or %NULL
 */
static  FsCodec *
fs_rtp_dtmf_event_source_get_codec (FsRtpSpecialSourceClass *klass,
    GList *negotiated_codec_associations, FsCodec *selected_codec)
{
  CodecAssociation *ca = NULL;

  if (selected_codec->media_type != FS_MEDIA_TYPE_AUDIO)
    return NULL;

  ca = lookup_codec_association_custom (negotiated_codec_associations,
      _is_telephony_codec, GUINT_TO_POINTER (selected_codec->clock_rate));

  if (ca)
    return ca->send_codec;
  else
    return NULL;
}

static GstElement *
fs_rtp_dtmf_event_source_build (FsRtpSpecialSource *source,
    GList *negotiated_codec_associations,
    FsCodec *selected_codec)
{
  FsCodec *telephony_codec = NULL;
  GstCaps *caps = NULL;
  GstPad *pad = NULL;
  GstElement *dtmfsrc = NULL;
  GstElement *capsfilter = NULL;
  GstPad *ghostpad = NULL;
  GstElement *bin = NULL;

  telephony_codec = fs_rtp_dtmf_event_source_get_codec (
      FS_RTP_SPECIAL_SOURCE_GET_CLASS(source), negotiated_codec_associations,
      selected_codec);

  g_return_val_if_fail (telephony_codec, NULL);

  source->codec = fs_codec_copy (telephony_codec);

  bin = gst_bin_new (NULL);

  GST_DEBUG ("Creating telephone-event source for " FS_CODEC_FORMAT,
      FS_CODEC_ARGS (telephony_codec));

  dtmfsrc = gst_element_factory_make ("rtpdtmfsrc", NULL);
  if (!dtmfsrc)
  {
    GST_ERROR ("Could not make rtpdtmfsrc");
    goto error;
  }
  if (!gst_bin_add (GST_BIN (bin), dtmfsrc))
  {
    GST_ERROR ("Could not add rtpdtmfsrc to bin");
    gst_object_unref (dtmfsrc);
    goto error;
  }

  capsfilter = gst_element_factory_make ("capsfilter", NULL);
  if (!capsfilter)
  {
    GST_ERROR ("Could not make capsfilter");
    goto error;
  }
  if (!gst_bin_add (GST_BIN (bin), capsfilter))
  {
    GST_ERROR ("Could not add capsfilter to bin");
    gst_object_unref (capsfilter);
    goto error;
  }

  caps = fs_codec_to_gst_caps (telephony_codec);
  g_object_set (capsfilter, "caps", caps, NULL);
  {
    gchar *str = gst_caps_to_string (caps);
    GST_DEBUG ("Using caps %s for dtmf", str);
    g_free (str);
  }
  gst_caps_unref (caps);

  if (!gst_element_link_pads (dtmfsrc, "src", capsfilter, "sink"))
  {
    GST_ERROR ("Could not link the rtpdtmfsrc and its capsfilter");
    goto error;
  }

  pad = gst_element_get_static_pad (capsfilter, "src");
  if (!pad)
  {
    GST_ERROR ("Could not get \"src\" pad from capsfilter");
    goto error;
  }
  ghostpad = gst_ghost_pad_new ("src", pad);
  if (!ghostpad)
  {
    GST_ERROR ("Could not create a ghostpad for capsfilter src pad for"
        " rtpdtmfsrc");
    goto error;
  }
  if (!gst_element_add_pad (bin, ghostpad))
  {
    GST_ERROR ("Could not get \"src\" ghostpad to dtmf source bin");
    gst_object_unref (pad);
    goto error;
  }
  gst_object_unref (pad);

  return bin;

 error:
  gst_object_unref (bin);

  return NULL;
}

/*
 * This looks if there is a non-disabled codec with the requested clock rate
 * other than telephone-event.
 */

static gboolean
has_rate (CodecAssociation *ca, gpointer user_data)
{
  guint clock_rate = GPOINTER_TO_UINT (user_data);

  if (ca->codec->clock_rate == clock_rate &&
      !ca->recv_only &&
      g_ascii_strcasecmp (ca->codec->encoding_name, "telephone-event"))
    return TRUE;
  else
    return FALSE;
}

static GList *
fs_rtp_dtmf_event_source_negotiation_filter (FsRtpSpecialSourceClass *klass,
      GList *codec_associations)
{
  GList *tmp;

  for (tmp = codec_associations; tmp; tmp = g_list_next (tmp))
  {
    CodecAssociation *ca = tmp->data;

    /* Ignore disabled or non telephone-event codecs*/
    if (ca->disable || ca->reserved || ca->recv_only ||
        g_ascii_strcasecmp (ca->codec->encoding_name, "telephone-event"))
      continue;

    /* Lets disable telephone-event codecs where we don't find */
    if (!lookup_codec_association_custom (codec_associations, has_rate,
            GUINT_TO_POINTER (ca->codec->clock_rate)))
      ca->disable = TRUE;
  }

  return codec_associations;
}
farstream-0.2.7/gst/fsrtpconference/fs-rtp-tfrc.c0000664000076400007640000011403412401500475016736 00000000000000/*
 * Farstream - Farstream RTP TFRC support
 *
 * Copyright 2010 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2010 Nokia Corp.
 *
 * fs-rtp-tfrc.c - Rate control for Farstream RTP sessions
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-rtp-tfrc.h"

#include 

#include "fs-rtp-packet-modder.h"
#include "farstream/fs-rtp.h"
#include "fs-rtp-codec-negotiation.h"

#include 
#include 

#define ONE_32BIT_CYCLE ((guint64) (((guint64)0xffffffff) + ((guint64)1)))


GST_DEBUG_CATEGORY_STATIC (fsrtpconference_tfrc);
#define GST_CAT_DEFAULT fsrtpconference_tfrc

G_DEFINE_TYPE (FsRtpTfrc, fs_rtp_tfrc, GST_TYPE_OBJECT);

/* props */
enum
{
  PROP_0,
  PROP_BITRATE,
  PROP_SENDING
};

static void fs_rtp_tfrc_get_property (GObject *object,
    guint prop_id,
    GValue *value,
    GParamSpec *pspec);
static void fs_rtp_tfrc_set_property (GObject *object,
    guint prop_id,
    const GValue *value,
    GParamSpec *pspec);
static void fs_rtp_tfrc_dispose (GObject *object);

static void fs_rtp_tfrc_update_sender_timer_locked (
  FsRtpTfrc *self,
  struct TrackedSource *src,
  guint64 now);

static gboolean feedback_timer_expired (GstClock *clock, GstClockTime time,
    GstClockID id, gpointer user_data);

static void fs_rtp_tfrc_clear_sender (FsRtpTfrc *self);

static void
fs_rtp_tfrc_class_init (FsRtpTfrcClass *klass)
{
  GObjectClass *gobject_class;

  gobject_class = (GObjectClass *) klass;

  gobject_class->get_property = fs_rtp_tfrc_get_property;
  gobject_class->set_property = fs_rtp_tfrc_set_property;
  gobject_class->dispose = fs_rtp_tfrc_dispose;

  g_object_class_install_property (gobject_class,
      PROP_BITRATE,
      g_param_spec_uint ("bitrate",
          "The bitrate at which data should be sent",
          "The bitrate that the session should try to send at in bits/sec",
          0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

 g_object_class_install_property (gobject_class,
      PROP_SENDING,
      g_param_spec_boolean ("sending",
          "The bitrate at which data should be sent",
          "The bitrate that the session should try to send at in bits/sec",
          FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
}


static struct TrackedSource *
tracked_src_new (FsRtpTfrc *self)
{
  struct TrackedSource *src;

  src = g_slice_new0 (struct TrackedSource);
  src->self = self;
  src->next_feedback_timer = G_MAXUINT64;

  return src;
}

static void
tracked_src_free (struct TrackedSource *src)
{
  if (src->sender_id)
  {
    gst_clock_id_unschedule (src->sender_id);
    gst_clock_id_unref (src->sender_id);
  }

  if (src->receiver_id)
  {
    gst_clock_id_unschedule (src->receiver_id);
    gst_clock_id_unref (src->receiver_id);
  }

  if (src->rtpsource)
    g_object_unref (src->rtpsource);

  if (src->sender)
    tfrc_sender_free (src->sender);
  if (src->receiver)
    tfrc_receiver_free (src->receiver);

  if (src->idl)
    tfrc_is_data_limited_free (src->idl);

  g_slice_free (struct TrackedSource, src);
}

static void
fs_rtp_tfrc_init (FsRtpTfrc *self)
{
  GST_DEBUG_CATEGORY_INIT (fsrtpconference_tfrc,
      "fsrtpconference_tfrc", 0,
      "Farstream RTP Conference Element Rate Control logic");

  /* member init */

  self->tfrc_sources = g_hash_table_new_full (g_direct_hash,
      g_direct_equal, NULL, (GDestroyNotify) tracked_src_free);

  fs_rtp_tfrc_clear_sender (self);
  self->send_bitrate = tfrc_sender_get_send_rate (NULL)  * 8;

  self->extension_type = EXTENSION_NONE;
  self->extension_id = 0;
  memset (self->pts, 0, 128);

  self->systemclock = gst_system_clock_obtain ();
}

void
fs_rtp_tfrc_destroy (FsRtpTfrc *self)
{
  GST_OBJECT_LOCK (self);

  if (self->modder_check_probe_id)
    gst_pad_remove_probe (self->in_rtp_pad, self->modder_check_probe_id);
  self->modder_check_probe_id = 0;

  if (self->in_rtp_probe_id)
    gst_pad_remove_probe (self->in_rtp_pad, self->in_rtp_probe_id);
  self->in_rtp_probe_id = 0;
  if (self->in_rtcp_probe_id)
    gst_pad_remove_probe (self->in_rtcp_pad, self->in_rtcp_probe_id);
  self->in_rtcp_probe_id = 0;


  if (self->on_ssrc_validated_id)
    g_signal_handler_disconnect (self->rtpsession, self->on_ssrc_validated_id);
  self->on_ssrc_validated_id = 0;
  if (self->on_sending_rtcp_id)
    g_signal_handler_disconnect (self->rtpsession, self->on_sending_rtcp_id);
  self->on_sending_rtcp_id = 0;

  g_hash_table_destroy (g_hash_table_ref (self->tfrc_sources));

  self->fsrtpsession = NULL;

  GST_OBJECT_UNLOCK (self);
}

static void
fs_rtp_tfrc_dispose (GObject *object)
{
  FsRtpTfrc *self = FS_RTP_TFRC (object);

  GST_OBJECT_LOCK (self);

  if (self->tfrc_sources)
    g_hash_table_destroy (self->tfrc_sources);
  self->tfrc_sources = NULL;
  self->last_src = NULL;

  if (self->initial_src)
    tracked_src_free (self->initial_src);
  self->initial_src = NULL;

  if (self->packet_modder)
  {
    gst_bin_remove (self->parent_bin, self->packet_modder);
    gst_element_set_state (self->packet_modder, GST_STATE_NULL);
    g_object_unref (self->packet_modder);
  }

  if (self->rtpsession)
      g_object_unref (self->rtpsession);
  if (self->in_rtp_pad)
    g_object_unref (self->in_rtp_pad);
  if (self->in_rtcp_pad)
    g_object_unref (self->in_rtcp_pad);
  if (self->out_rtp_pad)
    g_object_unref (self->out_rtp_pad);

  if (self->parent_bin)
    gst_object_unref (self->parent_bin);

  gst_object_unref (self->systemclock);
  self->systemclock = NULL;

  GST_OBJECT_UNLOCK (self);

  if (G_OBJECT_CLASS (fs_rtp_tfrc_parent_class)->dispose)
    G_OBJECT_CLASS (fs_rtp_tfrc_parent_class)->dispose (object);
}


static void
fs_rtp_tfrc_get_property (GObject *object,
    guint prop_id,
    GValue *value,
    GParamSpec *pspec)
{
  FsRtpTfrc *self = FS_RTP_TFRC (object);

  switch (prop_id)
  {
    case PROP_BITRATE:
      GST_OBJECT_LOCK (self);
      g_value_set_uint (value, self->send_bitrate);
      GST_OBJECT_UNLOCK (self);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }
}

gboolean
clear_sender (gpointer key, gpointer value, gpointer user_data)
{
  FsRtpTfrc *self = FS_RTP_TFRC (user_data);
  struct TrackedSource *src = value;

  src->send_ts_base = 0;
  src->send_ts_cycles = 0;
  src->fb_last_ts = 0;
  src->fb_ts_cycles = 0;

  if (src->sender_id)
  {
    gst_clock_id_unschedule (src->sender_id);
    gst_clock_id_unref (src->sender_id);
    src->sender_id = 0;
  }

  if (src->sender)
    tfrc_sender_free (src->sender);
  src->sender = NULL;

  if (src->idl)
  {
    tfrc_is_data_limited_free (src->idl);
    src->idl = NULL;
  }

  if (self->last_src == src)
    self->last_src = NULL;

  if (src->receiver)
    return FALSE;
  else
    return TRUE;
}

static void
fs_rtp_tfrc_clear_sender (FsRtpTfrc *self)
{
  g_hash_table_foreach_remove (self->tfrc_sources, clear_sender, self);
  if (self->initial_src)
    if (clear_sender (NULL, self->initial_src, self))
      self->initial_src = NULL;

  self->last_sent_ts = GST_CLOCK_TIME_NONE;
  self->byte_reservoir = 1500; /* About one packet */
}

static void
fs_rtp_tfrc_set_property (GObject *object,
    guint prop_id,
    const GValue *value,
    GParamSpec *pspec)
{
  FsRtpTfrc *self = FS_RTP_TFRC (object);

  switch (prop_id)
  {
    case PROP_SENDING:
      GST_OBJECT_LOCK (self);
      self->sending = g_value_get_boolean (value);
      if (!self->sending)
        fs_rtp_tfrc_clear_sender (self);
      GST_OBJECT_UNLOCK (self);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }
}


static gboolean
fs_rtp_tfrc_update_bitrate_locked (FsRtpTfrc *self, const gchar *source)
{
  guint byterate;
  guint new_bitrate;
  gboolean ret;

  if (self->last_src && self->last_src->sender)
    byterate = tfrc_sender_get_send_rate (self->last_src->sender);
  else
    byterate = tfrc_sender_get_send_rate (NULL);

  if (G_LIKELY (byterate < G_MAXUINT / 8))
    new_bitrate = byterate * 8;
  else
    new_bitrate = G_MAXUINT;

  ret = self->send_bitrate != new_bitrate;

  if (ret)
    GST_DEBUG_OBJECT (self, "Send rate changed (%s): %u -> %u", source,
        self->send_bitrate, new_bitrate);

  self->send_bitrate = new_bitrate;

  return ret;
}

static guint64
fs_rtp_tfrc_get_now (FsRtpTfrc *self)
{
  return GST_TIME_AS_USECONDS (gst_clock_get_time (self->systemclock));
}


static struct TrackedSource *
fs_rtp_tfrc_get_remote_ssrc_locked (FsRtpTfrc *self, guint ssrc,
  GObject *rtpsource)
{
  struct TrackedSource *src;

  src = g_hash_table_lookup (self->tfrc_sources, GUINT_TO_POINTER (ssrc));

  if (G_LIKELY (src))
  {
    if (G_UNLIKELY (rtpsource && !src->rtpsource))
      src->rtpsource = g_object_ref (rtpsource);

    return src;
  }

  if (self->initial_src)
  {
    src = self->initial_src;
    self->initial_src = NULL;
    src->ssrc = ssrc;
    if (rtpsource && !src->rtpsource)
      src->rtpsource = g_object_ref (rtpsource);
    g_hash_table_insert (self->tfrc_sources, GUINT_TO_POINTER (ssrc), src);
    return src;
  }

  src = tracked_src_new (self);
  src->ssrc = ssrc;
  if (rtpsource)
    src->rtpsource = g_object_ref (rtpsource);

  if (!self->last_src)
    self->last_src = src;

  g_hash_table_insert (self->tfrc_sources, GUINT_TO_POINTER (ssrc), src);

  return src;
}

static void
rtpsession_on_ssrc_validated (GObject *rtpsession, GObject *rtpsource,
    FsRtpTfrc *self)
{
  guint32 ssrc;

  g_object_get (rtpsource, "ssrc", &ssrc, NULL);

  GST_DEBUG_OBJECT (self, "ssrc validate: %X", ssrc);

  GST_OBJECT_LOCK (self);
  fs_rtp_tfrc_get_remote_ssrc_locked (self, ssrc, rtpsource);
  GST_OBJECT_UNLOCK (self);
}

struct TimerData
{
  FsRtpTfrc *self;
  guint ssrc;
};

static struct TimerData *
build_timer_data (FsRtpTfrc *self, guint ssrc)
{
  struct TimerData *td = g_slice_new0 (struct TimerData);

  td->self = g_object_ref (self);
  td->ssrc = ssrc;

  return td;
}

static void
free_timer_data (gpointer data)
{
  struct TimerData *td = data;
  g_object_unref (td->self);
  g_slice_free (struct TimerData, td);
}

static void
fs_rtp_tfrc_set_receiver_timer_locked (FsRtpTfrc *self,
    struct TrackedSource *src, guint64 now)
{
  guint64 expiry = tfrc_receiver_get_feedback_timer_expiry (src->receiver);
  GstClockReturn cret;

  if (expiry == 0)
    return;

  if (src->receiver_id)
  {
    if (src->next_feedback_timer <= expiry)
      return;

    gst_clock_id_unschedule (src->receiver_id);
    gst_clock_id_unref (src->receiver_id);
    src->receiver_id = NULL;
  }
  src->next_feedback_timer = expiry;

  g_assert (expiry != now);

  src->receiver_id = gst_clock_new_single_shot_id (self->systemclock,
      expiry * GST_USECOND);

  cret = gst_clock_id_wait_async (src->receiver_id, feedback_timer_expired,
      build_timer_data (self, src->ssrc), free_timer_data);
  if (cret != GST_CLOCK_OK)
    GST_ERROR_OBJECT (self,
        "Could not schedule feedback time for %" G_GUINT64_FORMAT
        " (now %" G_GUINT64_FORMAT ") error: %d", expiry, now, cret);
}

static void
fs_rtp_tfrc_receiver_timer_func_locked (FsRtpTfrc *self,
    struct TrackedSource *src, guint64 now)
{
  guint64 expiry;

  if (src->receiver_id)
  {
    gst_clock_id_unschedule (src->receiver_id);
    gst_clock_id_unref (src->receiver_id);
    src->receiver_id = NULL;
  }

  expiry = tfrc_receiver_get_feedback_timer_expiry (src->receiver);

  if (expiry <= now &&
      tfrc_receiver_feedback_timer_expired (src->receiver, now))
  {
    src->send_feedback = TRUE;
    g_signal_emit_by_name (self->rtpsession, "send-rtcp", (guint64) 0);
  }
  else
  {
    fs_rtp_tfrc_set_receiver_timer_locked (self, src, now);
  }
}

static gboolean
feedback_timer_expired (GstClock *clock, GstClockTime time, GstClockID id,
  gpointer user_data)
{
  struct TimerData *td = user_data;
  struct TrackedSource *src;
  guint64 now;

  if (time == GST_CLOCK_TIME_NONE)
    return FALSE;

  GST_OBJECT_LOCK (td->self);

  src = g_hash_table_lookup (td->self->tfrc_sources,
      GUINT_TO_POINTER (td->ssrc));

  now = fs_rtp_tfrc_get_now (td->self);

  if (G_LIKELY (src && src->receiver_id == id))
    fs_rtp_tfrc_receiver_timer_func_locked (td->self, src, now);

  GST_OBJECT_UNLOCK (td->self);

  return FALSE;
}


struct SendingRtcpData {
  FsRtpTfrc *self;
  GstRTCPBuffer rtcpbuffer;
  gboolean ret;
  guint32 ssrc;
  gboolean have_ssrc;
};

static void
tfrc_sources_process (gpointer key, gpointer value, gpointer user_data)
{
  struct SendingRtcpData *data = user_data;
  struct TrackedSource *src = value;
  GstRTCPPacket packet;
  guint8 *pdata;
  guint64 now;
  gdouble loss_event_rate;
  guint receive_rate;

  if (!src->receiver)
    return;

  if (src->got_nohdr_pkt)
    return;

  now = fs_rtp_tfrc_get_now (data->self);

  if (!src->send_feedback)
    goto done;

  if (!gst_rtcp_buffer_add_packet (&data->rtcpbuffer, GST_RTCP_TYPE_RTPFB,
          &packet))
    goto done;

  if (!gst_rtcp_packet_fb_set_fci_length (&packet, 4))
  {
    gst_rtcp_packet_remove (&packet);
    goto done;
  }

  if (!tfrc_receiver_send_feedback (src->receiver, now, &loss_event_rate,
          &receive_rate))
  {
    gst_rtcp_packet_remove (&packet);
    goto done;
  }

  if (!data->have_ssrc)
    g_object_get (data->self->rtpsession, "internal-ssrc", &data->ssrc, NULL);
  data->have_ssrc = TRUE;

  /* draft-ietf-avt-tfrc-profile-10 defines the type as 2 */
  gst_rtcp_packet_fb_set_type (&packet, 2);
  gst_rtcp_packet_fb_set_sender_ssrc (&packet, data->ssrc);
  gst_rtcp_packet_fb_set_media_ssrc (&packet, src->ssrc);
  pdata = gst_rtcp_packet_fb_get_fci (&packet);

  GST_WRITE_UINT32_BE (pdata, src->last_ts);
  GST_WRITE_UINT32_BE (pdata + 4, now - src->last_now);
  GST_WRITE_UINT32_BE (pdata + 8, receive_rate);
  GST_WRITE_UINT32_BE (pdata + 12, loss_event_rate * G_MAXUINT);

  GST_LOG_OBJECT (data->self, "Sending RTCP report last_ts: %d delay: %"
      G_GINT64_FORMAT", x_recv: %d, rate: %f",
      src->last_ts, now - src->last_now, receive_rate, loss_event_rate);

  src->send_feedback = FALSE;

  data->ret = TRUE;

done:
  fs_rtp_tfrc_set_receiver_timer_locked (data->self, src, now);
}

static gboolean
rtpsession_sending_rtcp (GObject *rtpsession, GstBuffer *buffer,
    gboolean is_early, FsRtpTfrc *self)
{
  struct SendingRtcpData data = {NULL, GST_RTCP_BUFFER_INIT};

  gst_rtcp_buffer_map (buffer, GST_MAP_READWRITE, &data.rtcpbuffer);

  data.self = self;
  data.ret = FALSE;
  data.have_ssrc = FALSE;


  GST_OBJECT_LOCK (self);
  g_hash_table_foreach (self->tfrc_sources, tfrc_sources_process, &data);
  GST_OBJECT_UNLOCK (self);

  gst_rtcp_buffer_unmap (&data.rtcpbuffer);

  /* Return TRUE if something was added */
  return data.ret;
}

static GstPadProbeReturn
incoming_rtp_probe (GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
{
  FsRtpTfrc *self = FS_RTP_TFRC (user_data);
  GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
  guint32 ssrc;
  guint8 *data;
  guint size;
  gboolean got_header = FALSE;
  struct TrackedSource *src = NULL;
  guint32 rtt, seq;
  gint64 ts_delta;
  guint64 ts;
  gboolean send_rtcp = FALSE;
  guint64 now;
  guint8 pt;
  gint seq_delta;
  GstRTPBuffer rtpbuffer = GST_RTP_BUFFER_INIT;

  if (!gst_rtp_buffer_map (buffer, GST_MAP_READ, &rtpbuffer))
    return GST_PAD_PROBE_OK;

  GST_OBJECT_LOCK (self);

  if (!self->fsrtpsession)
    goto out_no_header_unmap;

  ssrc = gst_rtp_buffer_get_ssrc (&rtpbuffer);
  pt = gst_rtp_buffer_get_payload_type (&rtpbuffer);
  seq = gst_rtp_buffer_get_seq (&rtpbuffer);

  if (pt >= 128 || !self->pts[pt])
    goto out_no_header_unmap;

  if (self->extension_type == EXTENSION_NONE)
    goto out_no_header_unmap;
  else if (self->extension_type == EXTENSION_ONE_BYTE)
    got_header = gst_rtp_buffer_get_extension_onebyte_header (&rtpbuffer,
        self->extension_id, 0, (gpointer *) &data, &size);
  else if (self->extension_type == EXTENSION_TWO_BYTES)
    got_header = gst_rtp_buffer_get_extension_twobytes_header (&rtpbuffer,
        NULL, self->extension_id, 0, (gpointer *) &data, &size);

  gst_rtp_buffer_unmap (&rtpbuffer);

  src = fs_rtp_tfrc_get_remote_ssrc_locked (self, ssrc, NULL);

  if (src->rtpsource == NULL)
  {
    GST_WARNING_OBJECT (self, "Got packet from unconfirmed source %X ?", ssrc);
    goto out;
  }

  if (!got_header || size != 7)
    goto out_no_header;

  src->got_nohdr_pkt = FALSE;

  now =  fs_rtp_tfrc_get_now (self);

  rtt = GST_READ_UINT24_BE (data);
  ts = GST_READ_UINT32_BE (data + 3);


  if (!src->receiver)
  {
    src->receiver = tfrc_receiver_new (now);
  }
  else if (rtt == 0 && src->last_rtt != 0)
  {
    /* Detect sender reset */
    src->seq_cycles = 0;
    src->last_seq = 0;
    src->ts_cycles = 0;
    src->last_now = 0;
    src->last_rtt = 0;
    tfrc_receiver_free (src->receiver);
    src->receiver = tfrc_receiver_new (now);
    if (src->receiver_id)
    {
      gst_clock_id_unschedule (src->receiver_id);
      gst_clock_id_unref (src->receiver_id);
      src->receiver_id = NULL;
    }
  }
  seq_delta = seq - src->last_seq;

  if (seq < src->last_seq && seq_delta < -3000)
    src->seq_cycles += 1 << 16;
  src->last_seq = seq;
  seq += src->seq_cycles;

  ts_delta = ts - src->last_ts;
  /* We declare there has been a cycle if the difference is more than
   * 5 minutes
   */
  if (ts < src->last_ts && ts_delta < -(5 * 60 * 1000 * 1000))
    src->ts_cycles += ONE_32BIT_CYCLE;
  src->last_ts = ts;
  ts += src->ts_cycles;

  send_rtcp = tfrc_receiver_got_packet (src->receiver, ts, now, seq, rtt,
      gst_rtp_buffer_get_packet_len (&rtpbuffer));

  GST_LOG_OBJECT (self, "Got RTP packet");

  if (rtt && src->last_rtt == 0)
    fs_rtp_tfrc_receiver_timer_func_locked (self, src, now);

  src->last_now = now;
  src->last_rtt = rtt;

out:

  if (send_rtcp)
  {
    src->send_feedback = TRUE;
    GST_OBJECT_UNLOCK (self);
    g_signal_emit_by_name (src->self->rtpsession, "send-rtcp", (guint64) 0);
  }
  else
  {
    GST_OBJECT_UNLOCK (self);
  }

  return GST_PAD_PROBE_OK;

out_no_header_unmap:

  gst_rtp_buffer_unmap (&rtpbuffer);

out_no_header:
  if (src)
    src->got_nohdr_pkt = TRUE;
  goto out;
}

static gboolean
no_feedback_timer_expired (GstClock *clock, GstClockTime time, GstClockID id,
  gpointer user_data)
{
  struct TimerData *td = user_data;
  struct TrackedSource *src;
  guint64 now;
  gboolean notify = FALSE;

  if (time == GST_CLOCK_TIME_NONE)
    return FALSE;

  GST_OBJECT_LOCK (td->self);

  if (!td->self->sending)
    goto out;

  src = g_hash_table_lookup (td->self->tfrc_sources,
      GUINT_TO_POINTER (td->ssrc));

  if (!src)
    goto out;

  if (src->sender_id != id)
    goto out;

  now = fs_rtp_tfrc_get_now (td->self);

  fs_rtp_tfrc_update_sender_timer_locked (td->self, src, now);

  if (fs_rtp_tfrc_update_bitrate_locked (td->self, "tm"))
    notify = TRUE;

out:

  GST_OBJECT_UNLOCK (td->self);

  if (notify)
    g_object_notify (G_OBJECT (td->self), "bitrate");

  return FALSE;
}

static void
fs_rtp_tfrc_update_sender_timer_locked (FsRtpTfrc *self,
    struct TrackedSource *src, guint64 now)
{
  guint64 expiry;
  GstClockReturn cret;

  if (src->sender_id)
  {
    gst_clock_id_unschedule (src->sender_id);
    gst_clock_id_unref (src->sender_id);
    src->sender_id = NULL;
  }

  if (src->sender == NULL)
    return;

  expiry = tfrc_sender_get_no_feedback_timer_expiry (src->sender);

  if (expiry <= now)
  {
    tfrc_sender_no_feedback_timer_expired (src->sender, now);
    expiry = tfrc_sender_get_no_feedback_timer_expiry (src->sender);
  }

  src->sender_id = gst_clock_new_single_shot_id (self->systemclock,
      expiry * GST_USECOND);

  cret = gst_clock_id_wait_async (src->sender_id,
      no_feedback_timer_expired, build_timer_data (self, src->ssrc),
      free_timer_data);
  if (cret != GST_CLOCK_OK)
    GST_ERROR_OBJECT (self,
        "Could not schedule feedback time for %" G_GUINT64_FORMAT
        " (now %" G_GUINT64_FORMAT ") error: %d",
        expiry, now, cret);
}

static void
tracked_src_add_sender (struct TrackedSource *src, guint64 now,
  guint initial_rate)
{
  src->sender = tfrc_sender_new (1460, now, initial_rate);
  src->idl = tfrc_is_data_limited_new (now);
  src->send_ts_base = now;
}

static GstPadProbeReturn
incoming_rtcp_probe (GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
{
  FsRtpTfrc *self = FS_RTP_TFRC (user_data);
  GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
  GstRTCPBuffer rtcpbuffer = GST_RTCP_BUFFER_INIT;
  GstRTCPPacket packet;
  gboolean notify = FALSE;

  if (!gst_rtcp_buffer_validate (buffer))
    return GST_PAD_PROBE_OK;

  gst_rtcp_buffer_map (buffer, GST_MAP_READ, &rtcpbuffer);

  if (!gst_rtcp_buffer_get_first_packet (&rtcpbuffer, &packet))
    goto out;

  do {
    if (gst_rtcp_packet_get_type (&packet) == GST_RTCP_TYPE_RTPFB &&
        gst_rtcp_packet_fb_get_type (&packet) == 2 &&
        gst_rtcp_packet_get_length (&packet) == 6)
    {
      /* We have a TFRC packet */
      guint32 media_ssrc;
      guint32 sender_ssrc;
      guint64 ts;
      guint32 delay;
      guint32 x_recv;
      gdouble loss_event_rate;
      guint8 *buf = rtcpbuffer.map.data + packet.offset;
      struct TrackedSource *src;
      guint64 now;
      guint64 rtt;
      guint32 local_ssrc;
      gboolean is_data_limited;

      media_ssrc = gst_rtcp_packet_fb_get_media_ssrc (&packet);

      g_object_get (self->rtpsession, "internal-ssrc", &local_ssrc, NULL);

      if (media_ssrc != local_ssrc)
        continue;

      sender_ssrc = gst_rtcp_packet_fb_get_sender_ssrc (&packet);

      buf += 4 * 3; /* skip the header, ssrc of sender and media sender */

      ts = GST_READ_UINT32_BE (buf);
      buf += 4;
      delay = GST_READ_UINT32_BE (buf);
      buf += 4;
      x_recv = GST_READ_UINT32_BE (buf);
      buf += 4;
      loss_event_rate = (gdouble) GST_READ_UINT32_BE (buf) / (gdouble) G_MAXUINT;
      GST_LOG_OBJECT (self, "Got RTCP TFRC packet last_sent_ts: %"
          G_GUINT64_FORMAT " delay: %u x_recv: %u loss_event_rate: %f", ts,
          delay, x_recv, loss_event_rate);

      GST_OBJECT_LOCK (self);

      if (!self->fsrtpsession || !self->sending)
        goto done;

      src = fs_rtp_tfrc_get_remote_ssrc_locked (self, sender_ssrc,
          NULL);

      now = fs_rtp_tfrc_get_now (self);

      if (G_UNLIKELY (!src->sender))
        tracked_src_add_sender (src, now, self->send_bitrate);

      /* Make sure we only use the RTT from the most recent packets from
       * the remote side, ignore anything that got delayed in between.
       */
      if (ts < src->fb_last_ts)
      {
        if (src->fb_ts_cycles + ONE_32BIT_CYCLE == src->send_ts_cycles)
        {
          src->fb_ts_cycles = src->send_ts_cycles;
        }
        else
        {
          GST_DEBUG_OBJECT (self, "Ignoring packet because the timestamp is "
              "older than one that has already been received,"
              " probably reordered.");
          goto done;
        }
      }

      src->fb_last_ts = ts;
      ts += src->fb_ts_cycles + src->send_ts_base;

      if (ts > now || now - ts < delay)
      {
        GST_ERROR_OBJECT (self, "Ignoring packet because ts > now ||"
            " now - ts < delay (ts: %" G_GUINT64_FORMAT
            " now: %" G_GUINT64_FORMAT " delay:%u",
            ts, now, delay);
        goto done;
      }

      rtt = now - ts - delay;

      if (rtt == 0)
        rtt = 1;

      if (rtt > 10 * 1000 * 1000)
      {
        GST_WARNING_OBJECT (self, "Impossible RTT %" G_GUINT64_FORMAT
            " ms, ignoring", rtt);
        goto done;
      }

      GST_LOG_OBJECT (self, "rtt: %" G_GUINT64_FORMAT
          " = now %" G_GUINT64_FORMAT
          " - ts %"G_GUINT64_FORMAT" - delay %u",
          rtt, now, ts, delay);

      if (G_UNLIKELY (tfrc_sender_get_averaged_rtt (src->sender) == 0))
        tfrc_sender_on_first_rtt (src->sender, now);

      is_data_limited =
          tfrc_is_data_limited_received_feedback (src->idl, now, ts,
              tfrc_sender_get_averaged_rtt (src->sender));

      tfrc_sender_on_feedback_packet (src->sender, now, rtt, x_recv,
          loss_event_rate, is_data_limited);

      fs_rtp_tfrc_update_sender_timer_locked (self, src, now);

      self->last_src = src;

      if (fs_rtp_tfrc_update_bitrate_locked (self, "fb"))
        notify = TRUE;

    done:
      GST_OBJECT_UNLOCK (self);
    }
  } while (gst_rtcp_packet_move_to_next (&packet));

  if (notify)
    g_object_notify (G_OBJECT (self), "bitrate");

out:

  gst_rtcp_buffer_unmap (&rtcpbuffer);

  return GST_PAD_PROBE_OK;
}

static GstClockTime
fs_rtp_tfrc_get_sync_time (FsRtpPacketModder *modder,
    GstBuffer *buffer, gpointer user_data)
{
  FsRtpTfrc *self = FS_RTP_TFRC (user_data);
  GstClockTime sync_time = GST_BUFFER_TIMESTAMP (buffer);
  gint bytes_for_one_rtt = 0;
  guint size = 0;
  guint send_rate;

  GST_OBJECT_LOCK (self);

  if (self->extension_type == EXTENSION_NONE || !self->sending)
  {
    GST_OBJECT_UNLOCK (self);
    return GST_CLOCK_TIME_NONE;
  }

  if (self->last_src && self->last_src->sender)
  {
    send_rate = tfrc_sender_get_send_rate (self->last_src->sender);
    bytes_for_one_rtt = send_rate *
        tfrc_sender_get_averaged_rtt (self->last_src->sender);
  }
  else
  {
    send_rate = tfrc_sender_get_send_rate (NULL);
    bytes_for_one_rtt = 0;
  }

  size = gst_buffer_get_size (buffer) + 10;

  if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
  {
    if (GST_CLOCK_TIME_IS_VALID (self->last_sent_ts) &&
        self->last_sent_ts < GST_BUFFER_TIMESTAMP (buffer))
      self->byte_reservoir +=
        gst_util_uint64_scale (
            (GST_BUFFER_TIMESTAMP (buffer) - self->last_sent_ts),
            send_rate,
            GST_SECOND);
    self->last_sent_ts = GST_BUFFER_TIMESTAMP (buffer);

    if (bytes_for_one_rtt &&
        self->byte_reservoir > bytes_for_one_rtt)
      self->byte_reservoir = bytes_for_one_rtt;
  }

  self->byte_reservoir -= size;

  if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
      self->byte_reservoir < 0)
  {
    GstClockTimeDiff diff = 0;

    diff = gst_util_uint64_scale_int (GST_SECOND,
        -self->byte_reservoir, send_rate);
    g_assert (diff > 0);


    GST_LOG_OBJECT (self, "Delaying packet by %"GST_TIME_FORMAT
        " = 1sec * bytes %d / rate %u",
        GST_TIME_ARGS (diff), self->byte_reservoir,
        send_rate);

    GST_BUFFER_TIMESTAMP (buffer) += diff;
  }

  GST_OBJECT_UNLOCK (self);


  return sync_time;
}


static GstBuffer *
fs_rtp_tfrc_outgoing_packets (FsRtpPacketModder *modder,
    GstBuffer *buffer, GstClockTime buffer_ts, gpointer user_data)
{
  FsRtpTfrc *self = FS_RTP_TFRC (user_data);
  gchar data[7];
  guint64 now;
  GstBuffer *headerbuf;
  GstBuffer *newbuf;
  gboolean is_data_limited;
  gsize header_size;
  gsize new_header_size;
  GstRTPBuffer rtpbuffer = GST_RTP_BUFFER_INIT;

  if (!GST_CLOCK_TIME_IS_VALID (buffer_ts))
    return buffer;

  GST_OBJECT_LOCK (self);

  if (!self->fsrtpsession || self->extension_type == EXTENSION_NONE ||
      !self->sending)
  {
    GST_OBJECT_UNLOCK (self);
    return buffer;
  }

  now = fs_rtp_tfrc_get_now (self);

  if (G_UNLIKELY (self->last_src == NULL))
    self->initial_src = self->last_src = tracked_src_new (self);

  if (G_UNLIKELY (self->last_src->sender == NULL))
  {
    tracked_src_add_sender (self->last_src, now, self->send_bitrate);
    fs_rtp_tfrc_update_sender_timer_locked (self, self->last_src, now);
  }

  GST_WRITE_UINT24_BE (data,
      tfrc_sender_get_averaged_rtt (self->last_src->sender));
  GST_WRITE_UINT32_BE (data+3, now - self->last_src->send_ts_base);

  if (now - self->last_src->send_ts_base > self->last_src->send_ts_cycles +
      ONE_32BIT_CYCLE)
    self->last_src->send_ts_cycles += ONE_32BIT_CYCLE;

  is_data_limited = (GST_BUFFER_PTS (buffer) == buffer_ts);

  gst_rtp_buffer_map (buffer, GST_MAP_READ, &rtpbuffer);
  header_size = gst_rtp_buffer_get_header_len (&rtpbuffer);
  gst_rtp_buffer_unmap (&rtpbuffer);

  headerbuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, 0,
      header_size);
  headerbuf = gst_buffer_make_writable (headerbuf);
  gst_buffer_set_size (headerbuf, header_size + 16);

  gst_rtp_buffer_map (headerbuf, GST_MAP_READWRITE, &rtpbuffer);

  if (self->extension_type == EXTENSION_ONE_BYTE)
  {
    if (!gst_rtp_buffer_add_extension_onebyte_header (&rtpbuffer,
            self->extension_id, data, 7))
      GST_WARNING_OBJECT (self,
          "Could not add extension to RTP header buf %p", headerbuf);
  }
  else if (self->extension_type == EXTENSION_TWO_BYTES)
  {
    if (!gst_rtp_buffer_add_extension_twobytes_header (&rtpbuffer, 0,
            self->extension_id, data, 7))
      GST_WARNING_OBJECT (self,
          "Could not add extension to RTP header in list %p", headerbuf);
  }

  /* FIXME:
   * This will break if any padding is applied
   */
  new_header_size = gst_rtp_buffer_get_header_len (&rtpbuffer);

  gst_rtp_buffer_unmap (&rtpbuffer);
  gst_buffer_set_size (headerbuf, new_header_size);

  /* append_region eats a ref */
  gst_buffer_ref (buffer);
  newbuf = gst_buffer_append_region (headerbuf, buffer, header_size, -1);

  GST_LOG_OBJECT (self, "Sending RTP");

  if (g_hash_table_size (self->tfrc_sources))
  {
    GHashTableIter ht_iter;
    struct TrackedSource *src;

    g_hash_table_iter_init (&ht_iter, self->tfrc_sources);

    while (g_hash_table_iter_next (&ht_iter, NULL,
            (gpointer *) &src))
    {
      if (src->sender)
      {
        if (!is_data_limited)
          tfrc_is_data_limited_not_limited_now (src->idl, now);
        tfrc_sender_sending_packet (src->sender, gst_buffer_get_size (newbuf));
      }
    }
  }
  if (self->initial_src)
  {
    if (!is_data_limited)
      tfrc_is_data_limited_not_limited_now (self->initial_src->idl, now);
    tfrc_sender_sending_packet (self->initial_src->sender,
        gst_buffer_get_size (newbuf));
  }


  GST_OBJECT_UNLOCK (self);

  gst_buffer_unref (buffer);

  return newbuf;
}

static GstPadProbeReturn
send_rtp_pad_blocked (GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
{
  FsRtpTfrc *self = user_data;
  gboolean need_modder;
  GstPad *peer = NULL;

  GST_OBJECT_LOCK (self);
  self->modder_check_probe_id = 0;
  need_modder = self->extension_type != EXTENSION_NONE;

  if (!self->fsrtpsession || !!self->packet_modder == need_modder)
    goto out;

  GST_DEBUG ("Pad blocked to possibly %s the tfrc packet modder",
      need_modder ? "add" : "remove");

  if (need_modder)
  {
    GstPadLinkReturn linkret;
    GstPad *modder_pad;

    self->packet_modder = GST_ELEMENT (fs_rtp_packet_modder_new (
          fs_rtp_tfrc_outgoing_packets, fs_rtp_tfrc_get_sync_time, self));
    g_object_ref (self->packet_modder);

    if (!gst_bin_add (self->parent_bin, self->packet_modder))
    {
      fs_session_emit_error (FS_SESSION (self->fsrtpsession),
          FS_ERROR_CONSTRUCTION,
          "Could not add tfrc packet modder to the pipeline");
      goto adding_failed;
    }

    peer = gst_pad_get_peer (pad);
    gst_pad_unlink (pad, peer);

    modder_pad = gst_element_get_static_pad (self->packet_modder, "src");
    linkret = gst_pad_link (modder_pad, peer);
    gst_object_unref (modder_pad);
    if (GST_PAD_LINK_FAILED (linkret))
    {
      fs_session_emit_error (FS_SESSION (self->fsrtpsession),
          FS_ERROR_CONSTRUCTION,
          "Could not link tfrc packet modder to rtp muxer");
      goto linking_failed;
    }

    modder_pad = gst_element_get_static_pad (self->packet_modder, "sink");
    linkret = gst_pad_link (pad, modder_pad);
    gst_object_unref (modder_pad);
    if (GST_PAD_LINK_FAILED (linkret))
    {
      fs_session_emit_error (FS_SESSION (self->fsrtpsession),
          FS_ERROR_CONSTRUCTION,
          "Could not link tfrc packet modder to the rtpbin");
      goto linking_failed;
    }

    if (gst_element_set_state (self->packet_modder, GST_STATE_PLAYING) ==
        GST_STATE_CHANGE_FAILURE)
    {
      fs_session_emit_error (FS_SESSION (self->fsrtpsession),
          FS_ERROR_CONSTRUCTION,
          "Could not set the TFRC packet modder to playing");
      goto linking_failed;
    }
  }
  else
  {
    GstPadLinkReturn linkret;
    GstPad *modder_src_pad;

    modder_src_pad = gst_element_get_static_pad (self->packet_modder, "src");
    peer = gst_pad_get_peer (modder_src_pad);
    gst_object_unref (modder_src_pad);

    gst_bin_remove (self->parent_bin, self->packet_modder);
    gst_element_set_state (self->packet_modder, GST_STATE_NULL);
    gst_object_unref (self->packet_modder);
    self->packet_modder = NULL;

    linkret = gst_pad_link (pad, peer);
    if (GST_PAD_LINK_FAILED (linkret))
      fs_session_emit_error (FS_SESSION (self->fsrtpsession),
          FS_ERROR_CONSTRUCTION,
          "Could not re-link after removing tfrc packet modder");
  }

out:
  gst_object_unref (peer);
  GST_OBJECT_UNLOCK (self);

  return GST_PAD_PROBE_REMOVE;

linking_failed:
  gst_bin_remove (self->parent_bin, self->packet_modder);
  gst_pad_link (pad, peer);
adding_failed:
  gst_object_unref (self->packet_modder);
  self->packet_modder = NULL;
  goto out;
}

static void
fs_rtp_tfrc_check_modder_locked (FsRtpTfrc *self)
{
  gboolean need_modder;

  need_modder = self->extension_type != EXTENSION_NONE;

  if (!!self->packet_modder == need_modder)
    return;

  if (self->modder_check_probe_id != 0)
    return;

  self->modder_check_probe_id =
      gst_pad_add_probe (self->out_rtp_pad,
          GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
          send_rtp_pad_blocked,
          g_object_ref (self), (GDestroyNotify) g_object_unref);
}


FsRtpTfrc *
fs_rtp_tfrc_new (FsRtpSession *fsrtpsession)
{
  FsRtpTfrc *self;
  GstElement *rtpmuxer;

  g_return_val_if_fail (fsrtpsession, NULL);

  self = g_object_new (FS_TYPE_RTP_TFRC, NULL);

  self->fsrtpsession = fsrtpsession;
  self->sending = FALSE;

  self->rtpsession = fs_rtp_session_get_rtpbin_internal_session (fsrtpsession);
  self->parent_bin = GST_BIN (fs_rtp_session_get_conference (fsrtpsession));
  self->in_rtp_pad = fs_rtp_session_get_rtpbin_recv_rtp_sink (fsrtpsession);;
  self->in_rtcp_pad = fs_rtp_session_get_rtpbin_recv_rtcp_sink (fsrtpsession);;

  rtpmuxer = fs_rtp_session_get_rtpmuxer (fsrtpsession);
  self->out_rtp_pad = gst_element_get_static_pad (rtpmuxer, "src");
  gst_object_unref (rtpmuxer);

  self->in_rtp_probe_id = gst_pad_add_probe (self->in_rtp_pad,
      GST_PAD_PROBE_TYPE_BUFFER, incoming_rtp_probe, self, NULL);
  self->in_rtcp_probe_id = gst_pad_add_probe (self->in_rtcp_pad,
      GST_PAD_PROBE_TYPE_BUFFER, incoming_rtcp_probe, self, NULL);


  self->on_ssrc_validated_id = g_signal_connect_object (self->rtpsession,
      "on-ssrc-validated", G_CALLBACK (rtpsession_on_ssrc_validated), self, 0);
  self->on_sending_rtcp_id = g_signal_connect_object (self->rtpsession,
      "on-sending-rtcp", G_CALLBACK (rtpsession_sending_rtcp), self, 0);

  return self;
}

gboolean
validate_ca_for_tfrc (CodecAssociation *ca, gpointer user_data)
{
  return codec_association_is_valid_for_sending (ca, TRUE) &&
      fs_codec_get_feedback_parameter (ca->codec, "tfrc", "",  "");
}

void
fs_rtp_tfrc_filter_codecs (GList **codec_associations,
    GList **header_extensions)
{
  gboolean has_header_ext = FALSE;
  gboolean has_codec_rtcpfb = FALSE;
  GList *item;

  has_codec_rtcpfb = !!lookup_codec_association_custom (*codec_associations,
      validate_ca_for_tfrc, NULL);

  for (item = *header_extensions; item;)
  {
    FsRtpHeaderExtension *hdrext = item->data;
    GList *next = item->next;

    if (!strcmp (hdrext->uri, "urn:ietf:params:rtp-hdrext:rtt-sendts"))
    {
      if (has_header_ext || !has_codec_rtcpfb)
      {
        GST_WARNING ("Removing rtt-sendts hdrext because matching tfrc"
            " feedback parameter not found or because rtp-hdrext"
            " is duplicated");
        fs_rtp_header_extension_destroy (item->data);
        *header_extensions = g_list_remove_link (*header_extensions, item);
      }
      else if (hdrext->direction == FS_DIRECTION_BOTH)
      {
        has_header_ext = TRUE;
      }
    }
    item = next;
  }

  if (!has_codec_rtcpfb || has_header_ext)
    return;

  for (item = *codec_associations; item; item = item->next)
  {
    CodecAssociation *ca = item->data;
    GList *item2;

    for (item2 = ca->codec->feedback_params; item2;)
    {
      GList *next2 = item2->next;
      FsFeedbackParameter *p = item2->data;

      if (!g_ascii_strcasecmp (p->type, "tfrc"))
      {
        GST_WARNING ("Removing tfrc from codec because no hdrext:rtt-sendts: "
            FS_CODEC_FORMAT, FS_CODEC_ARGS (ca->codec));
        fs_codec_remove_feedback_parameter (ca->codec, item2);
      }

      item2 = next2;
    }
  }

}

void
fs_rtp_tfrc_codecs_updated (FsRtpTfrc *self,
    GList *codec_associations,
    GList *header_extensions)
{
  GList *item;
  FsRtpHeaderExtension *hdrext;

  GST_OBJECT_LOCK (self);

  memset (self->pts, 0, 128);
  for (item = codec_associations; item; item = item->next)
  {
    CodecAssociation *ca = item->data;

    /* Also require nack/pli for tfrc to work, we really need to disable
     * automatic keyframes
     */

    if (fs_codec_get_feedback_parameter (ca->codec, "tfrc", NULL, NULL) &&
        fs_rtp_keyunit_manager_has_key_request_feedback (ca->codec))
    self->pts[ca->codec->id] = TRUE;
  }

  for (item = header_extensions; item; item = item->next)
  {
    hdrext = item->data;
    if (!strcmp (hdrext->uri, "urn:ietf:params:rtp-hdrext:rtt-sendts") &&
        hdrext->direction == FS_DIRECTION_BOTH)
      break;
  }

  if (!item)
  {
    self->extension_type = EXTENSION_NONE;
    goto out;
  }

  if (hdrext->id > 15)
    self->extension_type = EXTENSION_TWO_BYTES;
  else
    self->extension_type = EXTENSION_ONE_BYTE;

  self->extension_id = hdrext->id;

out:
  fs_rtp_tfrc_check_modder_locked (self);

  GST_OBJECT_UNLOCK (self);
}


gboolean
fs_rtp_tfrc_is_enabled (FsRtpTfrc *self, guint pt)
{
  gboolean is_enabled;

  g_return_val_if_fail (pt < 128, FALSE);

  GST_OBJECT_LOCK (self);
  is_enabled = (self->extension_type != EXTENSION_NONE) &&
      self->pts[pt];
  GST_OBJECT_UNLOCK (self);

  return is_enabled;
}
farstream-0.2.7/gst/fsrtpconference/fs-rtp-bitrate-adapter.c0000664000076400007640000004055712461773672021101 00000000000000/*
 * Farstream Voice+Video library
 *
 *  Copyright 2011 Collabora Ltd,
 *  Copyright 2011 Nokia Corporation
 *   @author: Olivier Crete 
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "fs-rtp-bitrate-adapter.h"

#include 

/* This is a magical value that smarter people discovered */
/* This is H.264... other codecs (H.265 / VP9 ) will have different numbers */
#define  H264_MAX_PIXELS_PER_BIT 25

GST_DEBUG_CATEGORY_STATIC (fs_rtp_bitrate_adapter_debug);
#define GST_CAT_DEFAULT fs_rtp_bitrate_adapter_debug

static GstStaticPadTemplate fs_rtp_bitrate_adapter_sink_template =
    GST_STATIC_PAD_TEMPLATE ("sink",
        GST_PAD_SINK,
        GST_PAD_ALWAYS,
        GST_STATIC_CAPS_ANY);

static GstStaticPadTemplate fs_rtp_bitrate_adapter_src_template =
    GST_STATIC_PAD_TEMPLATE ("src",
        GST_PAD_SRC,
        GST_PAD_ALWAYS,
        GST_STATIC_CAPS_ANY);
enum
{
  PROP_0,
  PROP_BITRATE,
  PROP_INTERVAL,
};

#define PROP_INTERVAL_DEFAULT (10 * GST_SECOND)

static void fs_rtp_bitrate_adapter_finalize (GObject *object);
static void fs_rtp_bitrate_adapter_set_property (GObject *object,
    guint prop_id,
    const GValue *value,
    GParamSpec *pspec);


G_DEFINE_TYPE (FsRtpBitrateAdapter, fs_rtp_bitrate_adapter, GST_TYPE_ELEMENT);

static GstFlowReturn fs_rtp_bitrate_adapter_chain (GstPad *pad,
    GstObject *parent, GstBuffer *buffer);
static gboolean fs_rtp_bitrate_adapter_query (GstPad *pad, GstObject *parent,
    GstQuery *query);

static GstStateChangeReturn
fs_rtp_bitrate_adapter_change_state (GstElement *element,
    GstStateChange transition);

static void
fs_rtp_bitrate_adapter_class_init (FsRtpBitrateAdapterClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);

  gobject_class->set_property = fs_rtp_bitrate_adapter_set_property;
  gobject_class->finalize = fs_rtp_bitrate_adapter_finalize;

  gstelement_class->change_state = fs_rtp_bitrate_adapter_change_state;

  GST_DEBUG_CATEGORY_INIT
      (fs_rtp_bitrate_adapter_debug, "fsrtpbitrateadapter", 0,
          "fsrtpbitrateadapter element");

  gst_element_class_set_details_simple (gstelement_class,
      "Farstream RTP Video Bitrate adater",
      "Generic",
      "Filter that can modify the resolution and framerate based"
      " on the bitrate",
      "Olivier Crete ");

  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_rtp_bitrate_adapter_sink_template));
  gst_element_class_add_pad_template (gstelement_class,
      gst_static_pad_template_get (&fs_rtp_bitrate_adapter_src_template));

  g_object_class_install_property (gobject_class,
      PROP_BITRATE,
      g_param_spec_uint ("bitrate",
          "Bitrate to adapt for",
          "The bitrate to adapt for (0 means no adaption)",
          0, G_MAXUINT, 0,
          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));

 g_object_class_install_property (gobject_class,
      PROP_INTERVAL,
      g_param_spec_uint64 ("interval",
          "Minimum interval before adaptation",
          "The minimum interval before adapting after a change",
          0, G_MAXUINT64, PROP_INTERVAL_DEFAULT,
          G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
}

struct BitratePoint
{
  GstClockTime timestamp;
  guint bitrate;
};

static struct BitratePoint *
bitrate_point_new (GstClockTime timestamp, guint bitrate)
{
  struct BitratePoint *bp = g_slice_new (struct BitratePoint);

  bp->timestamp = timestamp;
  bp->bitrate = bitrate;

  return bp;
}

static void
bitrate_point_free (struct BitratePoint *bp)
{
  g_slice_free (struct BitratePoint, bp);
}


static void
fs_rtp_bitrate_adapter_init (FsRtpBitrateAdapter *self)
{
  self->sinkpad = gst_pad_new_from_static_template (
    &fs_rtp_bitrate_adapter_sink_template, "sink");
  gst_pad_set_chain_function (self->sinkpad, fs_rtp_bitrate_adapter_chain);
  gst_pad_set_query_function (self->sinkpad, fs_rtp_bitrate_adapter_query);
  GST_PAD_SET_PROXY_CAPS (self->sinkpad);
  gst_element_add_pad (GST_ELEMENT (self), self->sinkpad);

  self->srcpad = gst_pad_new_from_static_template (
    &fs_rtp_bitrate_adapter_src_template, "src");
  gst_pad_set_query_function (self->sinkpad, fs_rtp_bitrate_adapter_query);
  gst_element_add_pad (GST_ELEMENT (self), self->srcpad);

  g_queue_init (&self->bitrate_history);
  self->system_clock = gst_system_clock_obtain ();
  self->interval = PROP_INTERVAL_DEFAULT;

  self->last_bitrate = G_MAXUINT;
}

static void
fs_rtp_bitrate_adapter_finalize (GObject *object)
{
  FsRtpBitrateAdapter *self = FS_RTP_BITRATE_ADAPTER (object);

  if (self->system_clock)
    gst_object_unref (self->system_clock);

  g_queue_foreach (&self->bitrate_history, (GFunc) bitrate_point_free, NULL);
  g_queue_clear(&self->bitrate_history);

  G_OBJECT_CLASS (fs_rtp_bitrate_adapter_parent_class)->finalize (object);
}

struct Resolution {
  guint width;
  guint height;
};

static const struct Resolution one_on_one_resolutions[] =
{
  {1920, 1200},
  {1920, 1080},
  {1600, 1200},
  {1680, 1050},
  {1280, 800},
  {1280, 768},
  {1280, 720},
  {1024, 768},
  {800, 600},
  {854, 480},
  {800, 480},
  {640, 480},
  {320, 240},
  {160, 120},
  {128, 96},
  {1, 1}
};

static const struct Resolution twelve_on_eleven_resolutions[] =
{
  {1480, 1152},
  {704, 576},
  {352, 288},
  {176, 144},
  {1, 1}
};

static void
video_caps_add (GstCaps *caps, const gchar *media_type,
    guint min_framerate, guint max_framerate, guint width, guint height,
    guint par_n, guint par_d)
{
  GstStructure *s;

  s = gst_structure_new (media_type,
      "pixel-aspect-ratio", GST_TYPE_FRACTION, par_n, par_d,
      "width", G_TYPE_INT, width,
      "height", G_TYPE_INT, height,
      NULL);

  gst_structure_set (s,
      "framerate", GST_TYPE_FRACTION_RANGE, min_framerate, 1,
      max_framerate, 1, NULL);

  gst_caps_append_structure (caps, s);
}

static void
add_one_resolution_inner (GstCaps *caps, const gchar *media_type,
    guint min_framerate, guint max_framerate, guint width, guint height,
    guint par_n, guint par_d)
{
  video_caps_add (caps, media_type, min_framerate, max_framerate,
      width, height, par_n, par_d);
}

static void
add_one_resolution (const gchar *media_type, GstCaps *caps,
    GstCaps *lower_caps,
    GstCaps *extra_low_caps,
    guint max_pixels_per_second,
    guint width, guint height,
    guint par_n, guint par_d)
{
  guint pixels_per_frame = width * height;
  guint max_framerate = max_pixels_per_second / pixels_per_frame;

  /* 66 as the max framerate is a arbitrary number that I'm getting from
   * being 2/3 of 666 which is clearly evil
   */

  if (max_framerate >= 20)
  {
    add_one_resolution_inner (caps, media_type, 20, 66, width, height,
        par_n, par_d);
    add_one_resolution_inner (lower_caps, media_type, 10, 66, width, height,
        par_n, par_d);
    add_one_resolution_inner (extra_low_caps, media_type, 1, 66, width, height,
        par_n, par_d);
  }
  else if (max_framerate >= 10)
  {
    add_one_resolution_inner (lower_caps, media_type, 10, 66, width, height,
        par_n, par_d);
    add_one_resolution_inner (extra_low_caps, media_type, 1, 66, width, height,
        par_n, par_d);
  }
  else if (max_framerate > 0)
  {
    add_one_resolution_inner (extra_low_caps, media_type, 1, 66, width, height,
        par_n, par_d);
  }
}


GstCaps *
caps_from_bitrate (const gchar *media_type, guint bitrate)
{
  GstCaps *caps = gst_caps_new_empty ();
  GstCaps *lower_caps = gst_caps_new_empty ();
  GstCaps *extra_low_caps = gst_caps_new_empty ();
  GstCaps *template_caps;
  guint max_pixels_per_second = bitrate * H264_MAX_PIXELS_PER_BIT;
  gint i;

  /* At least one FPS at a very low res */
  max_pixels_per_second = MAX (max_pixels_per_second, 128 * 96);

  for (i = 0; one_on_one_resolutions[i].width > 1; i++)
    add_one_resolution (media_type, caps, lower_caps, extra_low_caps,
        max_pixels_per_second,
        one_on_one_resolutions[i].width,
        one_on_one_resolutions[i].height, 1, 1);

  for (i = 0; twelve_on_eleven_resolutions[i].width > 1; i++)
    add_one_resolution (media_type, caps, lower_caps, extra_low_caps,
        twelve_on_eleven_resolutions[i].width,
        twelve_on_eleven_resolutions[i].height,
        max_pixels_per_second, 12, 11);

  gst_caps_append (caps, lower_caps);
  if (gst_caps_is_empty (caps))
    gst_caps_append (caps, extra_low_caps);
  else
    gst_caps_unref (extra_low_caps);

  template_caps =
      gst_static_pad_template_get_caps (&fs_rtp_bitrate_adapter_sink_template);
  template_caps = gst_caps_make_writable (template_caps);
  gst_caps_append (caps, template_caps);

  return caps;
}


static GstCaps *
fs_rtp_bitrate_adapter_getcaps (FsRtpBitrateAdapter *self, GstPad *pad,
    GstCaps *filter)
{
  GstPad *otherpad;
  GstCaps *peer_caps;
  GstCaps *result;
  guint bitrate;
  guint i;

  if (pad == self->srcpad)
    otherpad = self->sinkpad;
  else
    otherpad = self->srcpad;

  peer_caps = gst_pad_peer_query_caps (otherpad, filter);

  if (gst_caps_get_size (peer_caps) == 0)
    return peer_caps;

  GST_OBJECT_LOCK (self);
  bitrate = self->bitrate;
  if (pad == self->sinkpad)
    self->last_bitrate = self->bitrate;
  GST_OBJECT_UNLOCK (self);

  if (bitrate == G_MAXUINT)
    return peer_caps;

  result = gst_caps_new_empty ();

  for (i = 0; i < gst_caps_get_size (peer_caps); i++)
  {
    GstStructure *s = gst_caps_get_structure (peer_caps, i);

    if (g_str_has_prefix (gst_structure_get_name (s), "video/"))
    {
      GstCaps *rated_caps = caps_from_bitrate (gst_structure_get_name (s),
          bitrate);
      GstCaps *copy = gst_caps_copy_nth (peer_caps, i);

      gst_caps_set_features (rated_caps, 0,
          gst_caps_features_copy (gst_caps_get_features (peer_caps, i)));

      gst_caps_append (result, gst_caps_intersect (rated_caps, copy));
      gst_caps_unref (copy);
      gst_caps_unref (rated_caps);
    }
    else
    {
      gst_caps_append (result, gst_caps_copy_nth (peer_caps, i));
    }
  }

  return result;
}

static gboolean
fs_rtp_bitrate_adapter_query (GstPad *pad, GstObject *parent, GstQuery *query)
{
  FsRtpBitrateAdapter *self = FS_RTP_BITRATE_ADAPTER (parent);
  gboolean res;

  switch (GST_QUERY_TYPE (query)) {
    case GST_QUERY_CAPS:
    {
      GstCaps *caps, *filter;

      gst_query_parse_caps (query, &filter);
      caps = fs_rtp_bitrate_adapter_getcaps (self, pad, filter);
      gst_query_set_caps_result (query, caps);
      gst_caps_unref (caps);
      res = TRUE;
      break;
    }
    default:
      res = gst_pad_query_default (pad, parent, query);
      break;
  }

  return res;
}

static GstFlowReturn
fs_rtp_bitrate_adapter_chain (GstPad *pad, GstObject *parent,
    GstBuffer *buffer)
{
  FsRtpBitrateAdapter *self = FS_RTP_BITRATE_ADAPTER (parent);
  GstFlowReturn ret;

  if (!self)
    return GST_FLOW_NOT_LINKED;

  ret = gst_pad_push (self->srcpad, buffer);

  return ret;
}


static guint
fs_rtp_bitrate_adapter_get_bitrate_locked (FsRtpBitrateAdapter *self)
{
  gdouble mean = 0;
  guint count = 0;
  gdouble S = 0;
  GList *item;
  gdouble stddev;

  for (item = self->bitrate_history.head; item ;item = item->next) {
    struct BitratePoint *bp = item->data;
    gdouble delta;

    count++;
    delta = bp->bitrate - mean;
    mean = mean + delta/count;
    S = S + delta * (bp->bitrate - mean);
  }

  if (count == 0)
    return G_MAXUINT;

  g_assert (S >= 0);
  stddev = sqrt (S/count);

  if (mean > stddev)
    return (guint) (mean - stddev);
  else
    return G_MAXUINT;
}

static void
fs_rtp_bitrate_adapter_updated_unlock (FsRtpBitrateAdapter *self)
{
  gboolean changed = FALSE;

  self->bitrate = fs_rtp_bitrate_adapter_get_bitrate_locked (self);

  GST_DEBUG ("Computed average lower bitrate: %u", self->bitrate);
  if (self->bitrate != G_MAXUINT &&
      (self->bitrate > self->last_bitrate * 1.1 ||
          self->bitrate < self->last_bitrate * 0.9))
  {
    self->last_bitrate = self->bitrate;
    changed = TRUE;
  }
  GST_OBJECT_UNLOCK (self);

  if (changed)
    gst_pad_push_event (self->sinkpad, gst_event_new_reconfigure ());
}

static void
fs_rtp_bitrate_adapter_cleanup_locked (FsRtpBitrateAdapter *self,
    GstClockTime now)
{
  for (;;)
  {
    struct BitratePoint *bp = g_queue_peek_head (&self->bitrate_history);

    if (bp && (bp->timestamp < now - self->interval ||
            (GST_STATE (self) != GST_STATE_PLAYING &&
                g_queue_get_length (&self->bitrate_history) > 1)))
    {
      g_queue_pop_head (&self->bitrate_history);
      bitrate_point_free (bp);
    }
    else
    {
      break;
    }
  }
}

static gboolean
clock_callback (GstClock *clock, GstClockTime now, GstClockID clockid,
    gpointer user_data)
{
  FsRtpBitrateAdapter *self = user_data;

  GST_OBJECT_LOCK (self);
  if (self->clockid == clockid)
  {
    gst_clock_id_unref (self->clockid);
  }
  else
  {
    GST_OBJECT_UNLOCK (self);
    return TRUE;
  }
  self->clockid = NULL;

  fs_rtp_bitrate_adapter_updated_unlock (self);


  return TRUE;
}

static gboolean
fs_rtp_bitrate_adapter_add_bitrate_locked (FsRtpBitrateAdapter *self,
    guint bitrate)
{
  GstClockTime now = gst_clock_get_time (self->system_clock);
  gboolean first = FALSE;

  g_queue_push_tail (&self->bitrate_history, bitrate_point_new (now, bitrate));

  first = (g_queue_get_length (&self->bitrate_history) == 1);

  fs_rtp_bitrate_adapter_cleanup_locked (self, now);

  if (!self->clockid && GST_STATE (self) == GST_STATE_PLAYING)
  {
    self->clockid = gst_clock_new_single_shot_id (self->system_clock,
        now + self->interval);
    gst_clock_id_wait_async (self->clockid,
        clock_callback, gst_object_ref (self), gst_object_unref);
  }

  return first;
}


static void
fs_rtp_bitrate_adapter_set_property (GObject *object,
    guint prop_id,
    const GValue *value,
    GParamSpec *pspec)
{
  FsRtpBitrateAdapter *self = FS_RTP_BITRATE_ADAPTER (object);
  gboolean first = FALSE;

  GST_OBJECT_LOCK (self);
  switch (prop_id)
  {
    case PROP_BITRATE:
      first = fs_rtp_bitrate_adapter_add_bitrate_locked (self,
          g_value_get_uint (value));
      break;
    case PROP_INTERVAL:
      self->interval = g_value_get_uint64 (value);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }

  if (first)
    fs_rtp_bitrate_adapter_updated_unlock (self);
  else
    GST_OBJECT_UNLOCK (self);
}


static GstStateChangeReturn
fs_rtp_bitrate_adapter_change_state (GstElement *element,
    GstStateChange transition)
{
  FsRtpBitrateAdapter *self = FS_RTP_BITRATE_ADAPTER (element);
  GstStateChangeReturn result;

  switch (transition) {
    case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
      GST_OBJECT_LOCK (self);
      if (self->clockid)
      {
        gst_clock_id_unschedule (self->clockid);
        gst_clock_id_unref (self->clockid);
      }
      self->clockid = NULL;
      GST_OBJECT_UNLOCK (self);

      break;
    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
      GST_OBJECT_LOCK (self);
      if (g_queue_get_length (&self->bitrate_history))
        fs_rtp_bitrate_adapter_updated_unlock (self);
      else
        GST_OBJECT_UNLOCK (self);
      break;
    default:
      break;
  }

  if ((result =
          GST_ELEMENT_CLASS (fs_rtp_bitrate_adapter_parent_class)->change_state
          (element, transition)) == GST_STATE_CHANGE_FAILURE)
    goto failure;

  switch (transition) {
    case GST_STATE_CHANGE_PAUSED_TO_READY:
      self->last_bitrate = G_MAXUINT;
      g_queue_foreach (&self->bitrate_history, (GFunc) bitrate_point_free,
          NULL);
      g_queue_clear(&self->bitrate_history);
      break;
    default:
      break;
  }


  return result;

 failure:
  {
    GST_ERROR_OBJECT (element, "parent failed state change");
    return result;
  }
}

GstElement *
fs_rtp_bitrate_adapter_new (void)
{
  return g_object_new (FS_TYPE_RTP_BITRATE_ADAPTER, NULL);
}
farstream-0.2.7/gst/fsrtpconference/fs-rtp-session.c0000664000076400007640000046253512461775764017524 00000000000000/*
 * Farstream - Farstream RTP Session
 *
 * Copyright 2007 Collabora Ltd.
 *  @author: Olivier Crete 
 * Copyright 2007 Nokia Corp.
 *
 * fs-rtp-session.c - A Farstream RTP Session gobject
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

/**
 * SECTION:fs-rtp-session
 * @short_description: A  RTP session in a #FsRtpConference
 *
 * This object represents one session, it is created by called
 * fs_conference_new_session() on a #FsRtpConference. It can be either
 * Audio or Video. It also represents data send with one and only one
 * SSRC (although if there is a SSRC collision, that SSRC may change).
 *
 * Codec profiles
 * 
 * It is possible to define "codec profiles", that is non-autodetected
 * encoding and decoding pipelines for codecs. It is even possible to declare
 * entirely new codecs using this method.
 *
 * To create a profile for a codec, add it to the codec-preferences with
 * special optional parameters called "farstream-send-profile" and
 * "farstream-recv-profile", these should contain gst-launch style descriptions
 * of the encoding or decoding bin.
 *
 * As a special case, encoding profiles can have more than one unconnected
 * source pad, all of these pads should produce application/x-rtp of some kind.
 * The profile will be ignored if not ALL pads match currently negotiated
 * codecs.
 *
 * Also, it is possible to declare profiles with only a decoding pipeline,
 * you will only be able to receive from this codec, the encoding may be a
 * secondary pad of some other codec.
 * 
 * 
 * SRTP signature and encryption
 * 
 *
 * To tell #FsRtpSession to authenticate encrypt the media it is
 * sending using SRTP, one must set the parameters using a
 * #GstStructure named "FarstreamSRTP" and passing it to
 * fs_session_set_encryption_parameters().
 *
 * The cipher, auth, and key must be specified:
 * FarstreamSRTP
 * 
 *  
 *   
 *   
 *   
 *  
 *  
 *   
 *   
 *   
 *  
 *  
 *   
 *   
 *   
 *  
 *  
 *   
 *   
 *   
 *  
 *  
 *   
 *   
 *   
 *  
 * 
"rtp-cipher" and "rtcp-cipher"gchar * * Encryption algorithm * Possible values: "null", "aes-128-icm" or "aes-256-icm" *
"cipher"gchar *Default value for "rtp-cipher" and "rtcp-cipher" * Possible values: "null", "aes-128-icm" or "aes-256-icm" *
"rtp-auth" and "rtcp-auth"gchar * * Authentication algorithm, can never be null * Possible values: "hmac-sha1-32" or "hmac-sha1-80" *
"auth"gchar *Default value for "rtp-auth" and "rtcp-auth" * Possible values: "hmac-sha1-32" or "hmac-sha1-80" *
"key"#GstBufferSize must be 30 if cipher is "aes-128-icm" and 46 if cipher is * "aes-256-icm"
*
*
*
*/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-session.h" #include #include #include #include #include #include "farstream/fs-utils.h" #include #include "fs-rtp-bitrate-adapter.h" #include "fs-rtp-stream.h" #include "fs-rtp-participant.h" #include "fs-rtp-discover-codecs.h" #include "fs-rtp-codec-negotiation.h" #include "fs-rtp-substream.h" #include "fs-rtp-special-source.h" #include "fs-rtp-codec-specific.h" #include "fs-rtp-tfrc.h" #define GST_CAT_DEFAULT fsrtpconference_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_CONFERENCE, PROP_MEDIA_TYPE, PROP_ID, PROP_SINK_PAD, PROP_CODEC_PREFERENCES, PROP_CODECS, PROP_CODECS_WITHOUT_CONFIG, PROP_CURRENT_SEND_CODEC, PROP_NO_RTCP_TIMEOUT, PROP_SSRC, PROP_TOS, PROP_SEND_BITRATE, PROP_RTP_HEADER_EXTENSIONS, PROP_RTP_HEADER_EXTENSION_PREFERENCES, PROP_ALLOWED_SINK_CAPS, PROP_ALLOWED_SRC_CAPS, PROP_ENCRYPTION_PARAMETERS, PROP_INTERNAL_SESSION }; #define DEFAULT_NO_RTCP_TIMEOUT (7000) struct _FsRtpSessionPrivate { FsMediaType media_type; /* We hold a ref to this, needs the lock to access it */ FsRtpConference *conference; GHashTable *transmitters; /* We keep references to these elements */ GstElement *media_sink_valve; GstElement *send_bitrate_adapter; GstElement *send_tee; GstElement *send_capsfilter; GstElement *transmitter_rtp_tee; GstElement *transmitter_rtcp_tee; GstElement *transmitter_rtp_funnel; GstElement *transmitter_rtcp_funnel; GstElement *rtpmuxer; GstElement *srtpenc; GstElement *srtpdec; GObject *rtpbin_internal_session; /* Request pads that are disposed of when the tee is disposed of */ GstPad *send_tee_media_pad; GstPad *send_tee_discovery_pad; GstElement *discovery_valve; /* We dont keep explicit references to the pads, the Bin does that for us * only this element's methods can add/remote it */ GstPad *media_sink_pad; /* The discovery elements are only created when codec parameter discovery is * under progress. * They are normally destroyed when the caps are found but may be destroyed * by the dispose function too, we hold refs to them * These three elements can only be modified from the streaming threads * and are protected by the stream lock */ GstElement *discovery_fakesink; GstElement *discovery_capsfilter; GstElement *discovery_codecbin; /* This one is protected by the session lock */ FsCodec *discovery_codec; /* Request pad to release on dispose */ GstPad *rtpbin_send_rtp_sink; GstPad *rtpbin_send_rtcp_src; GstPad *rtpbin_recv_rtp_sink; GstPad *rtpbin_recv_rtcp_sink; /* Protected by the session mutex */ /* The codec bin is owned implicitely by the Conference bin for us */ FsCodec *current_send_codec; FsCodec *requested_send_codec; /* Can only be modified by the streaming thread with the pad blocked */ GstElement *send_codecbin; GList *extra_send_capsfilters; /* These lists are protected by the session mutex */ GList *streams; guint streams_cookie; GList *free_substreams; guint streams_sending; /* The static list of all the blueprints */ GList *blueprints; GList *codec_preferences; guint codec_preferences_generation; /* These are protected by the session mutex */ GList *codec_associations; GList *hdrext_negotiated; GList *hdrext_preferences; /* Protected by the session mutex */ gint no_rtcp_timeout; GQueue telephony_events; GstObject *running_telephony_src; gboolean telephony_event_running; GList *extra_sources; /* This is a ht of ssrc->streams * It is protected by the session mutex */ GHashTable *ssrc_streams; GHashTable *ssrc_streams_manual; GError *construction_error; gulong send_pad_block_id; gulong discovery_pad_block_id; /* IP Type of Service, protext by session mutex */ guint tos; /* Protected by session mutex */ guint send_bitrate; GstStructure *encryption_parameters; /* Protected by session mutex */ guint caps_generation; GstCaps *input_caps; GstCaps *output_caps; /* Set at construction time, can not change */ FsRtpTfrc *rtp_tfrc; FsRtpKeyunitManager *keyunit_manager; /* Can only be used while using the lock */ GRWLock disposed_lock; gboolean disposed; }; G_DEFINE_TYPE (FsRtpSession, fs_rtp_session, FS_TYPE_SESSION); #define FS_RTP_SESSION_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RTP_SESSION, FsRtpSessionPrivate)) static void fs_rtp_session_dispose (GObject *object); static void fs_rtp_session_finalize (GObject *object); static void fs_rtp_session_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_rtp_session_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void fs_rtp_session_constructed (GObject *object); static FsStream *fs_rtp_session_new_stream (FsSession *session, FsParticipant *participant, FsStreamDirection direction, GError **error); static gboolean fs_rtp_session_start_telephony_event (FsSession *session, guint8 event, guint8 volume); static gboolean fs_rtp_session_stop_telephony_event (FsSession *session); static gboolean fs_rtp_session_set_send_codec (FsSession *session, FsCodec *send_codec, GError **error); static gboolean fs_rtp_session_set_codec_preferences (FsSession *session, GList *codec_preferences, GError **error); static void fs_rtp_session_verify_send_codec_bin_locked (FsRtpSession *self); static gchar **fs_rtp_session_list_transmitters (FsSession *session); static GType fs_rtp_session_get_stream_transmitter_type (FsSession *session, const gchar *transmitter); static void _substream_no_rtcp_timedout_cb (FsRtpSubStream *substream, FsRtpSession *session); static GstElement *_substream_get_codec_bin (FsRtpSubStream *substream, FsRtpStream *stream, FsCodec **new_codec, guint current_builder_hash, guint *new_builder_hash, GError **error, FsRtpSession *session); static gboolean _stream_new_remote_codecs (FsRtpStream *stream, GList *codecs, GError **error, gpointer user_data); static FsStreamTransmitter* _stream_get_new_stream_transmitter ( FsRtpStream *stream, FsParticipant *participant, const gchar *transmitter_name, GParameter *parameters, guint n_parameters, GError **error, gpointer user_data); static GList *fs_rtp_session_get_codecs_need_resend (FsSession *session, GList *old_codecs, GList *new_codecs); static void _remove_stream (gpointer user_data, GObject *where_the_object_was); static gboolean fs_rtp_session_update_codecs (FsRtpSession *session, FsRtpStream *stream, GList *remote_codecs, GError **error); static CodecAssociation * fs_rtp_session_get_recv_codec_locked (FsRtpSession *session, guint pt, FsRtpStream *stream, FsCodec **recv_codec, GError **error); static void fs_rtp_session_start_codec_param_gathering_locked (FsRtpSession *session); static void fs_rtp_session_stop_codec_param_gathering_unlock (FsRtpSession *session); static void fs_rtp_session_associate_free_substreams (FsRtpSession *session, FsRtpStream *stream, guint32 ssrc); static void _send_caps_changed (GstPad *pad, GParamSpec *pspec, FsRtpSession *session); static GstPadProbeReturn _discovery_pad_blocked_callback (GstPad *pad, GstPadProbeInfo *info, gpointer user_data); static void fs_rtp_session_set_send_bitrate (FsRtpSession *self, guint bitrate); static gboolean codecbin_set_bitrate (GstElement *codecbin, guint bitrate); static gboolean fs_rtp_session_set_allowed_caps (FsSession *session, GstCaps *sink_caps, GstCaps *src_caps, GError **error); static gboolean fs_rtp_session_set_encryption_parameters (FsSession *session, GstStructure *parameters, GError **error); static GstCaps * _srtpdec_request_key (GstElement *srtpdec, guint ssrc, gpointer user_data); static gboolean _stream_decrypt_clear_locked_cb (FsRtpStream *stream, gpointer user_data); //static guint signals[LAST_SIGNAL] = { 0 }; static void fs_rtp_session_class_init (FsRtpSessionClass *klass) { GObjectClass *gobject_class; FsSessionClass *session_class; gobject_class = (GObjectClass *) klass; session_class = FS_SESSION_CLASS (klass); gobject_class->set_property = fs_rtp_session_set_property; gobject_class->get_property = fs_rtp_session_get_property; gobject_class->constructed = fs_rtp_session_constructed; session_class->new_stream = fs_rtp_session_new_stream; session_class->start_telephony_event = fs_rtp_session_start_telephony_event; session_class->stop_telephony_event = fs_rtp_session_stop_telephony_event; session_class->set_send_codec = fs_rtp_session_set_send_codec; session_class->set_codec_preferences = fs_rtp_session_set_codec_preferences; session_class->list_transmitters = fs_rtp_session_list_transmitters; session_class->get_stream_transmitter_type = fs_rtp_session_get_stream_transmitter_type; session_class->codecs_need_resend = fs_rtp_session_get_codecs_need_resend; session_class->set_allowed_caps = fs_rtp_session_set_allowed_caps; session_class->set_encryption_parameters = fs_rtp_session_set_encryption_parameters; g_object_class_override_property (gobject_class, PROP_CONFERENCE, "conference"); g_object_class_override_property (gobject_class, PROP_MEDIA_TYPE, "media-type"); g_object_class_override_property (gobject_class, PROP_ID, "id"); g_object_class_override_property (gobject_class, PROP_SINK_PAD, "sink-pad"); g_object_class_override_property (gobject_class, PROP_CODEC_PREFERENCES, "codec-preferences"); g_object_class_override_property (gobject_class, PROP_CODECS, "codecs"); g_object_class_override_property (gobject_class, PROP_CODECS_WITHOUT_CONFIG, "codecs-without-config"); g_object_class_override_property (gobject_class, PROP_CURRENT_SEND_CODEC, "current-send-codec"); g_object_class_override_property (gobject_class, PROP_TOS, "tos"); g_object_class_override_property (gobject_class, PROP_ALLOWED_SINK_CAPS, "allowed-sink-caps"); g_object_class_override_property (gobject_class, PROP_ALLOWED_SRC_CAPS, "allowed-src-caps"); g_object_class_override_property (gobject_class, PROP_ENCRYPTION_PARAMETERS, "encryption-parameters"); g_object_class_install_property (gobject_class, PROP_NO_RTCP_TIMEOUT, g_param_spec_int ("no-rtcp-timeout", "The timeout (in ms) before no RTCP is assumed", "This is the time (in ms) after which data received without RTCP" " is attached the FsStream, this only works if there is only one" " FsStream. -1 will wait forever. 0 will not wait for RTCP and" " attach it immediataly to the FsStream and prohibit the creation" " of a second FsStream", -1, G_MAXINT, DEFAULT_NO_RTCP_TIMEOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SSRC, g_param_spec_uint ("ssrc", "The SSRC of the sent data", "This is the current SSRC used to send data" " (defaults to a random value)", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SEND_BITRATE, g_param_spec_uint ("send-bitrate", "The bitrate at which data will be sent", "The bitrate that the session will try to send at in bits/sec", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_RTP_HEADER_EXTENSIONS, g_param_spec_boxed ("rtp-header-extensions", "Currently negotiated RTP header extensions", "GList of RTP Header extensions that have been negotiated and will" " be used when sending of receiving RTP packets", FS_TYPE_RTP_HEADER_EXTENSION_LIST, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_RTP_HEADER_EXTENSION_PREFERENCES, g_param_spec_boxed ("rtp-header-extension-preferences", "Desired RTP header extensions", "GList of RTP Header extensions that are locally supported and" " desired by the application", FS_TYPE_RTP_HEADER_EXTENSION_LIST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INTERNAL_SESSION, g_param_spec_object ("internal-session", "Internal RTP Session", "Internal RTPSession object from rtpbin", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); gobject_class->dispose = fs_rtp_session_dispose; gobject_class->finalize = fs_rtp_session_finalize; g_type_class_add_private (klass, sizeof (FsRtpSessionPrivate)); } static void fs_rtp_session_init (FsRtpSession *self) { /* member init */ self->priv = FS_RTP_SESSION_GET_PRIVATE (self); self->priv->disposed = FALSE; self->priv->construction_error = NULL; self->priv->transmitters = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); g_mutex_init (&self->mutex); g_rw_lock_init (&self->priv->disposed_lock); self->priv->media_type = FS_MEDIA_TYPE_LAST + 1; self->priv->no_rtcp_timeout = DEFAULT_NO_RTCP_TIMEOUT; self->priv->ssrc_streams = g_hash_table_new (g_direct_hash, g_direct_equal); self->priv->ssrc_streams_manual = g_hash_table_new (g_direct_hash, g_direct_equal); g_queue_init (&self->priv->telephony_events); } static void _remove_transmitter (gpointer key, gpointer value, gpointer user_data) { FsRtpSession *self = FS_RTP_SESSION (user_data); FsTransmitter *transmitter = FS_TRANSMITTER (value); GstElement *src, *sink; g_object_get (transmitter, "gst-sink", &sink, "gst-src", &src, NULL); gst_element_set_locked_state (src, TRUE); gst_element_set_state (src, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->conference), src); gst_element_set_locked_state (sink, TRUE); gst_element_set_state (sink, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->conference), sink); gst_object_unref (src); gst_object_unref (sink); } static void _stop_transmitter_elem (gpointer key, gpointer value, gpointer elem_name) { FsTransmitter *transmitter = FS_TRANSMITTER (value); GstElement *elem = NULL; g_object_get (transmitter, elem_name, &elem, NULL); gst_element_set_locked_state (elem, TRUE); gst_element_set_state (elem, GST_STATE_NULL); gst_object_unref (elem); } static void stop_and_remove (GstBin *conf, GstElement **element, gboolean unref) { if (*element == NULL) return; gst_element_set_locked_state (*element, TRUE); if (gst_element_set_state (*element, GST_STATE_NULL) != GST_STATE_CHANGE_SUCCESS) { gchar *elemname = gst_element_get_name (*element); GST_WARNING ("Could not set %s to GST_STATE_NULL", elemname); g_free (elemname); } if (!gst_bin_remove (conf, *element)) { gchar *binname = gst_element_get_name (conf); gchar *elemname = gst_element_get_name (*element); GST_WARNING ("Could not remove %s from %s", binname, elemname); g_free (binname); g_free (elemname); } if (unref) gst_object_unref (*element); *element = NULL; } static void fs_rtp_session_dispose (GObject *obj) { FsRtpSession *self = FS_RTP_SESSION (obj); GList *item = NULL; GstBin *conferencebin = NULL; if (fs_rtp_session_has_disposed_enter (self, NULL)) return; if (fs_rtp_conference_is_internal_thread (self->priv->conference)) { g_critical ("You MUST call fs_session_destroy() from your main thread, " "this FsSession may now be leaked"); fs_rtp_session_has_disposed_exit (self); return; } fs_rtp_session_has_disposed_exit (self); g_rw_lock_writer_lock (&self->priv->disposed_lock); if (self->priv->disposed) { g_rw_lock_writer_unlock (&self->priv->disposed_lock); return; } self->priv->disposed = TRUE; g_rw_lock_writer_unlock (&self->priv->disposed_lock); conferencebin = GST_BIN (self->priv->conference); if (self->priv->rtpbin_internal_session) g_object_unref (self->priv->rtpbin_internal_session); self->priv->rtpbin_internal_session = NULL; if (self->priv->keyunit_manager) g_object_unref (self->priv->keyunit_manager); self->priv->keyunit_manager = NULL; /* Lets stop all of the elements sink to source */ /* First the send pipeline */ if (self->priv->transmitters) g_hash_table_foreach (self->priv->transmitters, _stop_transmitter_elem, "gst-sink"); stop_and_remove (conferencebin, &self->priv->transmitter_rtp_tee, TRUE); stop_and_remove (conferencebin, &self->priv->transmitter_rtcp_tee, TRUE); if (self->priv->rtpbin_send_rtcp_src) gst_pad_set_active (self->priv->rtpbin_send_rtcp_src, FALSE); if (self->priv->rtpbin_send_rtp_sink) gst_pad_set_active (self->priv->rtpbin_send_rtp_sink, FALSE); if (self->priv->rtp_tfrc) { fs_rtp_tfrc_destroy (self->priv->rtp_tfrc); g_object_unref (self->priv->rtp_tfrc); } self->priv->rtp_tfrc = NULL; FS_RTP_SESSION_LOCK (self); fs_rtp_session_stop_codec_param_gathering_unlock (self); if (self->priv->discovery_valve) g_object_set (self->priv->discovery_valve, "drop", TRUE, NULL); stop_and_remove (conferencebin, &self->priv->discovery_valve, FALSE); if (self->priv->send_tee_discovery_pad) { gst_object_unref (self->priv->send_tee_discovery_pad); self->priv->send_tee_discovery_pad = NULL; } if (self->priv->send_tee_media_pad) { gst_object_unref (self->priv->send_tee_media_pad); self->priv->send_tee_media_pad = NULL; } if (self->priv->send_capsfilter && self->priv->rtpmuxer) { GstPad *srcpad = gst_element_get_static_pad (self->priv->send_capsfilter, "src"); if (srcpad) { GstPad *otherpad = gst_pad_get_peer (srcpad); if (otherpad) { gst_element_release_request_pad (self->priv->rtpmuxer, otherpad); gst_object_unref (otherpad); } gst_object_unref (srcpad); } } for (item = self->priv->extra_send_capsfilters; item; item = g_list_next (item)) { GstElement *cf = item->data; GstPad *ourpad = gst_element_get_static_pad (cf, "src"); GstPad *pad = NULL; if (ourpad) { pad = gst_pad_get_peer (ourpad); if (pad) { gst_element_release_request_pad (self->priv->rtpmuxer, pad); gst_object_unref (pad); } gst_object_unref (ourpad); } } stop_and_remove (conferencebin, &self->priv->rtpmuxer, TRUE); stop_and_remove (conferencebin, &self->priv->send_capsfilter, TRUE); while (self->priv->extra_send_capsfilters) { GstElement *cf = self->priv->extra_send_capsfilters->data; stop_and_remove (conferencebin, &cf, FALSE); self->priv->extra_send_capsfilters = g_list_delete_link ( self->priv->extra_send_capsfilters, self->priv->extra_send_capsfilters); } stop_and_remove (conferencebin, &self->priv->send_codecbin, FALSE); stop_and_remove (conferencebin, &self->priv->media_sink_valve, TRUE); stop_and_remove (conferencebin, &self->priv->send_tee, TRUE); stop_and_remove (conferencebin, &self->priv->send_bitrate_adapter, FALSE); if (self->priv->media_sink_pad) gst_pad_set_active (self->priv->media_sink_pad, FALSE); /* Now the recv pipeline */ if (self->priv->free_substreams) g_list_foreach (self->priv->free_substreams, (GFunc) fs_rtp_sub_stream_stop, NULL); if (self->priv->rtpbin_recv_rtp_sink) gst_pad_set_active (self->priv->rtpbin_recv_rtp_sink, FALSE); if (self->priv->rtpbin_recv_rtcp_sink) gst_pad_set_active (self->priv->rtpbin_recv_rtcp_sink, FALSE); stop_and_remove (conferencebin, &self->priv->transmitter_rtp_funnel, TRUE); stop_and_remove (conferencebin, &self->priv->transmitter_rtcp_funnel, TRUE); if (self->priv->transmitters) g_hash_table_foreach (self->priv->transmitters, _stop_transmitter_elem, "gst-src"); self->priv->extra_sources = fs_rtp_special_sources_destroy (self->priv->extra_sources); if (self->priv->running_telephony_src) gst_object_unref (self->priv->running_telephony_src); /* Now they should all be stopped, we can remove them in peace */ if (self->priv->media_sink_pad) { gst_pad_set_active (self->priv->media_sink_pad, FALSE); gst_element_remove_pad (GST_ELEMENT (self->priv->conference), self->priv->media_sink_pad); self->priv->media_sink_pad = NULL; } if (self->priv->rtpbin_send_rtcp_src) { gst_pad_set_active (self->priv->rtpbin_send_rtcp_src, FALSE); gst_element_release_request_pad (self->priv->conference->rtpbin, self->priv->rtpbin_send_rtcp_src); gst_object_unref (self->priv->rtpbin_send_rtcp_src); self->priv->rtpbin_send_rtcp_src = NULL; } if (self->priv->rtpbin_send_rtp_sink) { gst_pad_set_active (self->priv->rtpbin_send_rtp_sink, FALSE); gst_element_release_request_pad (self->priv->conference->rtpbin, self->priv->rtpbin_send_rtp_sink); gst_object_unref (self->priv->rtpbin_send_rtp_sink); self->priv->rtpbin_send_rtp_sink = NULL; } if (self->priv->rtpbin_recv_rtp_sink) { gst_pad_set_active (self->priv->rtpbin_recv_rtp_sink, FALSE); gst_element_release_request_pad (self->priv->conference->rtpbin, self->priv->rtpbin_recv_rtp_sink); gst_object_unref (self->priv->rtpbin_recv_rtp_sink); self->priv->rtpbin_recv_rtp_sink = NULL; } if (self->priv->rtpbin_recv_rtcp_sink) { gst_pad_set_active (self->priv->rtpbin_recv_rtcp_sink, FALSE); gst_element_release_request_pad (self->priv->conference->rtpbin, self->priv->rtpbin_recv_rtcp_sink); gst_object_unref (self->priv->rtpbin_recv_rtcp_sink); self->priv->rtpbin_recv_rtcp_sink = NULL; } g_clear_object (&self->priv->srtpenc); g_clear_object (&self->priv->srtpdec); if (self->priv->transmitters) { g_hash_table_foreach (self->priv->transmitters, _remove_transmitter, self); } if (self->priv->free_substreams) { g_list_foreach (self->priv->free_substreams, (GFunc) g_object_unref, NULL); g_list_free (self->priv->free_substreams); self->priv->free_substreams = NULL; } if (self->priv->conference) { g_object_unref (self->priv->conference); self->priv->conference = NULL; } for (item = g_list_first (self->priv->streams); item; item = g_list_next (item)) { g_object_weak_unref (G_OBJECT (item->data), _remove_stream, self); fs_stream_destroy (item->data); } g_list_free (self->priv->streams); self->priv->streams = NULL; self->priv->streams_cookie++; g_hash_table_remove_all (self->priv->ssrc_streams); g_hash_table_remove_all (self->priv->ssrc_streams_manual); if (self->priv->transmitters) { g_hash_table_destroy (self->priv->transmitters); self->priv->transmitters = NULL; } G_OBJECT_CLASS (fs_rtp_session_parent_class)->dispose (obj); } static void fs_rtp_session_finalize (GObject *object) { FsRtpSession *self = FS_RTP_SESSION (object); g_mutex_clear (&self->mutex); if (self->priv->blueprints) { fs_rtp_blueprints_unref (self->priv->media_type); self->priv->blueprints = NULL; } g_list_free_full (self->priv->codec_preferences, (GDestroyNotify) codec_preference_destroy); codec_association_list_destroy (self->priv->codec_associations); fs_rtp_header_extension_list_destroy (self->priv->hdrext_preferences); fs_rtp_header_extension_list_destroy (self->priv->hdrext_negotiated); if (self->priv->current_send_codec) fs_codec_destroy (self->priv->current_send_codec); if (self->priv->requested_send_codec) fs_codec_destroy (self->priv->requested_send_codec); if (self->priv->ssrc_streams) g_hash_table_destroy (self->priv->ssrc_streams); if (self->priv->ssrc_streams_manual) g_hash_table_destroy (self->priv->ssrc_streams_manual); gst_caps_unref (self->priv->input_caps); gst_caps_unref (self->priv->output_caps); g_queue_foreach (&self->priv->telephony_events, (GFunc) gst_event_unref, NULL); if (self->priv->encryption_parameters) gst_structure_free (self->priv->encryption_parameters); g_rw_lock_clear (&self->priv->disposed_lock); G_OBJECT_CLASS (fs_rtp_session_parent_class)->finalize (object); } gboolean fs_rtp_session_has_disposed_enter (FsRtpSession *self, GError **error) { g_rw_lock_reader_lock (&self->priv->disposed_lock); if (self->priv->disposed) { g_rw_lock_reader_unlock (&self->priv->disposed_lock); g_set_error (error, FS_ERROR, FS_ERROR_DISPOSED, "Called function after session has been disposed"); return TRUE; } return FALSE; } void fs_rtp_session_has_disposed_exit (FsRtpSession *self) { g_rw_lock_reader_unlock (&self->priv->disposed_lock); } static void fs_rtp_session_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsRtpSession *self = FS_RTP_SESSION (object); if (fs_rtp_session_has_disposed_enter (self, NULL)) return; switch (prop_id) { case PROP_MEDIA_TYPE: g_value_set_enum (value, self->priv->media_type); break; case PROP_ID: g_value_set_uint (value, self->id); break; case PROP_SINK_PAD: g_value_set_object (value, self->priv->media_sink_pad); break; case PROP_CODEC_PREFERENCES: { GQueue tmpqueue = G_QUEUE_INIT; GList *item; FS_RTP_SESSION_LOCK (self); for (item = self->priv->codec_preferences; item; item = item->next) { CodecPreference *cp = item->data; g_queue_push_tail (&tmpqueue, fs_codec_copy (cp->codec)); } g_value_take_boxed (value, tmpqueue.head); FS_RTP_SESSION_UNLOCK (self); break; } case PROP_CODECS: { GList *codecs = NULL; GList *item = NULL; FS_RTP_SESSION_LOCK (self); for (item = g_list_first (self->priv->codec_associations); item; item = g_list_next (item)) { CodecAssociation *ca = item->data; if (!ca->disable && ca->need_config) break; } if (item == NULL) codecs = codec_associations_to_codecs (self->priv->codec_associations, TRUE); FS_RTP_SESSION_UNLOCK (self); g_value_take_boxed (value, codecs); } break; case PROP_CODECS_WITHOUT_CONFIG: { GList *codecs = NULL; FS_RTP_SESSION_LOCK (self); codecs = codec_associations_to_codecs (self->priv->codec_associations, FALSE); FS_RTP_SESSION_UNLOCK (self); g_value_take_boxed (value, codecs); } break; case PROP_CONFERENCE: g_value_set_object (value, self->priv->conference); break; case PROP_CURRENT_SEND_CODEC: FS_RTP_SESSION_LOCK (self); g_value_set_boxed (value, self->priv->current_send_codec); FS_RTP_SESSION_UNLOCK (self); break; case PROP_NO_RTCP_TIMEOUT: FS_RTP_SESSION_LOCK (self); g_value_set_int (value, self->priv->no_rtcp_timeout); FS_RTP_SESSION_UNLOCK (self); break; case PROP_SSRC: if (self->priv->rtpbin_send_rtp_sink) { GstCaps *caps = NULL; g_object_get (self->priv->rtpbin_send_rtp_sink, "caps", &caps, NULL); if (caps) { if (gst_caps_get_size (caps) > 0) { const GstStructure *s = gst_caps_get_structure (caps, 0); guint ssrc; if (gst_structure_get_uint (s, "ssrc", &ssrc)) g_value_set_uint (value, ssrc); } gst_caps_unref (caps); } break; } case PROP_TOS: FS_RTP_SESSION_LOCK (self); g_value_set_uint (value, self->priv->tos); FS_RTP_SESSION_UNLOCK (self); break; case PROP_SEND_BITRATE: FS_RTP_SESSION_LOCK (self); g_value_set_uint (value, self->priv->send_bitrate); FS_RTP_SESSION_UNLOCK (self); break; case PROP_RTP_HEADER_EXTENSIONS: FS_RTP_SESSION_LOCK (self); g_value_set_boxed (value, self->priv->hdrext_negotiated); FS_RTP_SESSION_UNLOCK (self); break; case PROP_RTP_HEADER_EXTENSION_PREFERENCES: FS_RTP_SESSION_LOCK (self); g_value_set_boxed (value, self->priv->hdrext_preferences); FS_RTP_SESSION_UNLOCK (self); break; case PROP_ALLOWED_SINK_CAPS: FS_RTP_SESSION_LOCK (self); g_value_set_boxed (value, self->priv->input_caps); FS_RTP_SESSION_UNLOCK (self); break; case PROP_ALLOWED_SRC_CAPS: FS_RTP_SESSION_LOCK (self); g_value_set_boxed (value, self->priv->output_caps); FS_RTP_SESSION_UNLOCK (self); break; case PROP_ENCRYPTION_PARAMETERS: FS_RTP_SESSION_LOCK (self); g_value_set_boxed (value, self->priv->encryption_parameters); FS_RTP_SESSION_UNLOCK (self); break; case PROP_INTERNAL_SESSION: g_value_set_object (value, self->priv->rtpbin_internal_session); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } fs_rtp_session_has_disposed_exit (self); } static void set_tos (gpointer key, gpointer val, gpointer user_data) { FsTransmitter *trans = val; guint tos = GPOINTER_TO_UINT (user_data); g_object_set (trans, "tos", tos, NULL); } static void fs_rtp_session_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsRtpSession *self = FS_RTP_SESSION (object); if (fs_rtp_session_has_disposed_enter (self, NULL)) return; switch (prop_id) { case PROP_MEDIA_TYPE: self->priv->media_type = g_value_get_enum (value); break; case PROP_ID: self->id = g_value_get_uint (value); break; case PROP_CONFERENCE: self->priv->conference = FS_RTP_CONFERENCE (g_value_dup_object (value)); break; case PROP_NO_RTCP_TIMEOUT: FS_RTP_SESSION_LOCK (self); self->priv->no_rtcp_timeout = g_value_get_int (value); FS_RTP_SESSION_UNLOCK (self); break; case PROP_SSRC: g_object_set_property (G_OBJECT (self->priv->rtpbin_internal_session), "internal-ssrc", value); break; case PROP_TOS: FS_RTP_SESSION_LOCK (self); self->priv->tos = g_value_get_uint (value); g_hash_table_foreach (self->priv->transmitters, set_tos, GUINT_TO_POINTER (self->priv->tos)); FS_RTP_SESSION_UNLOCK (self); break; case PROP_SEND_BITRATE: fs_rtp_session_set_send_bitrate (self, g_value_get_uint (value)); break; case PROP_RTP_HEADER_EXTENSION_PREFERENCES: FS_RTP_SESSION_LOCK (self); fs_rtp_header_extension_list_destroy (self->priv->hdrext_preferences); self->priv->hdrext_preferences = g_value_dup_boxed (value); FS_RTP_SESSION_UNLOCK (self); /* This call can't fail because the codecs do NOT change */ fs_rtp_session_update_codecs (self, NULL, NULL, NULL); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } fs_rtp_session_has_disposed_exit (self); } static void _rtpbin_internal_session_notify_internal_ssrc (GObject *internal_session, GParamSpec *pspec, gpointer self) { g_object_notify (G_OBJECT (self), "ssrc"); } static void _rtpbin_send_rtp_sink_notify_caps (GstPad *pad, GParamSpec *param, gpointer self) { g_object_notify (G_OBJECT (self), "ssrc"); } static void _rtp_tfrc_bitrate_changed (GObject *rtp_tfrc, GParamSpec *pspec, FsRtpSession *self) { guint bitrate; g_object_get (rtp_tfrc, "bitrate", &bitrate, NULL); g_debug ("setting bitrate to: %u", bitrate); fs_rtp_session_set_send_bitrate (self, bitrate); } static GstElement * _rtpbin_request_encoder (GstElement *rtpbin, guint session_id, gpointer user_data) { FsRtpSession *self = FS_RTP_SESSION (user_data); if (self->id == session_id && self->priv->srtpenc) { return gst_object_ref (self->priv->srtpenc); } else { return NULL; } } static GstElement * _rtpbin_request_decoder (GstElement *rtpbin, guint session_id, gpointer user_data) { FsRtpSession *self = FS_RTP_SESSION (user_data); if (self->id == session_id && self->priv->srtpdec) return gst_object_ref (self->priv->srtpdec); else return NULL; } static void fs_rtp_session_constructed (GObject *object) { FsRtpSession *self = FS_RTP_SESSION_CAST (object); GstElement *valve = NULL; GstElement *capsfilter = NULL; GstElement *tee = NULL; GstElement *funnel = NULL; GstElement *muxer = NULL; GstPad *tee_sink_pad = NULL; GstPad *valve_sink_pad = NULL; GstPad *funnel_src_pad = NULL; GstPad *muxer_src_pad = NULL; GstPad *transmitter_rtcp_tee_sink_pad; GstPad *pad; GstPadLinkReturn ret; gchar *tmp; gulong request_rtp_encoder_id = 0; gulong request_rtp_decoder_id = 0; gulong request_rtcp_encoder_id = 0; gulong request_rtcp_decoder_id = 0; if (self->id == 0) { g_error ("You can no instantiate this element directly, you MUST" " call fs_rtp_session_new ()"); return; } self->priv->blueprints = fs_rtp_blueprints_get (self->priv->media_type, &self->priv->construction_error); if (!self->priv->blueprints) { if (!self->priv->construction_error) self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_INTERNAL, "Unknown error while trying to discover codecs"); return; } if (self->priv->media_type == FS_MEDIA_TYPE_AUDIO) self->priv->input_caps = gst_caps_new_empty_simple ("audio/x-raw"); else if (self->priv->media_type == FS_MEDIA_TYPE_VIDEO) self->priv->input_caps = gst_caps_new_empty_simple ("video/x-raw"); else if (self->priv->media_type == FS_MEDIA_TYPE_APPLICATION) self->priv->input_caps = gst_caps_new_any (); else g_assert_not_reached (); self->priv->output_caps = gst_caps_ref (self->priv->input_caps); tmp = g_strdup_printf ("send_tee_%u", self->id); tee = gst_element_factory_make ("tee", tmp); g_free (tmp); if (!tee) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the tee element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), tee)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the tee element to the FsRtpConference"); gst_object_unref (tee); return; } gst_element_set_state (tee, GST_STATE_PLAYING); self->priv->send_tee = gst_object_ref (tee); if (self->priv->media_type == FS_MEDIA_TYPE_VIDEO) { GstElement *bitrate_adapter = fs_rtp_bitrate_adapter_new (); if (!gst_bin_add (GST_BIN (self->priv->conference), bitrate_adapter)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the bitrate adapter to the FsRtpConference"); gst_object_unref (bitrate_adapter); return; } if (!gst_element_link (bitrate_adapter, tee)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link bitrate adapter to tee"); gst_object_unref (bitrate_adapter); return; } gst_element_set_state (bitrate_adapter, GST_STATE_PLAYING); self->priv->send_bitrate_adapter = bitrate_adapter; tee_sink_pad = gst_element_get_static_pad (bitrate_adapter, "sink"); } else { tee_sink_pad = gst_element_get_static_pad (tee, "sink"); } tmp = g_strdup_printf ("sink_%u", self->id); self->priv->media_sink_pad = gst_ghost_pad_new (tmp, tee_sink_pad); g_free (tmp); if (!self->priv->media_sink_pad) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create ghost pad for tee's sink pad"); return; } gst_pad_set_active (self->priv->media_sink_pad, TRUE); if (!gst_element_add_pad (GST_ELEMENT (self->priv->conference), self->priv->media_sink_pad)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add ghost pad to the conference bin"); gst_object_unref (self->priv->media_sink_pad); self->priv->media_sink_pad = NULL; return; } gst_object_unref (tee_sink_pad); /* Create the SRTP encoder & decoder */ tmp = g_strdup_printf ("srtpenc_%u", self->id); self->priv->srtpenc = gst_element_factory_make ("srtpenc", tmp); g_free (tmp); if (self->priv->srtpenc) { GstPad *tmppad; gst_object_ref_sink (self->priv->srtpenc); g_object_set (self->priv->srtpenc, "rtp-cipher", 0, "rtp-auth", 0, "rtcp-cipher", 0, "rtcp-auth", 0, NULL); tmp = g_strdup_printf ("rtp_sink_%u", self->id); tmppad = gst_element_get_request_pad (self->priv->srtpenc, tmp); gst_object_unref (tmppad); g_free (tmp); tmp = g_strdup_printf ("rtcp_sink_%u", self->id); tmppad = gst_element_get_request_pad (self->priv->srtpenc, tmp); gst_object_unref (tmppad); g_free (tmp); } tmp = g_strdup_printf ("srtpdec_%u", self->id); self->priv->srtpdec = gst_element_factory_make ("srtpdec", tmp); g_free (tmp); if (self->priv->srtpdec) { gst_object_ref_sink (self->priv->srtpdec); g_signal_connect_object (self->priv->srtpdec, "request-key", G_CALLBACK (_srtpdec_request_key), self, 0); } request_rtp_encoder_id = g_signal_connect (self->priv->conference->rtpbin, "request-rtp-encoder", G_CALLBACK (_rtpbin_request_encoder), self); request_rtp_decoder_id = g_signal_connect (self->priv->conference->rtpbin, "request-rtp-decoder", G_CALLBACK (_rtpbin_request_decoder), self); request_rtcp_encoder_id = g_signal_connect (self->priv->conference->rtpbin, "request-rtcp-encoder", G_CALLBACK (_rtpbin_request_encoder), self); request_rtcp_decoder_id = g_signal_connect (self->priv->conference->rtpbin, "request-rtcp-decoder", G_CALLBACK (_rtpbin_request_decoder), self); /* Request the parts of rtpbin */ tmp = g_strdup_printf ("recv_rtp_sink_%u", self->id); self->priv->rtpbin_recv_rtp_sink = gst_element_get_request_pad (self->priv->conference->rtpbin, tmp); g_free (tmp); tmp = g_strdup_printf ("recv_rtcp_sink_%u", self->id); self->priv->rtpbin_recv_rtcp_sink = gst_element_get_request_pad (self->priv->conference->rtpbin, tmp); g_free (tmp); tmp = g_strdup_printf ("send_rtp_sink_%u", self->id); self->priv->rtpbin_send_rtp_sink = gst_element_get_request_pad (self->priv->conference->rtpbin, tmp); g_free (tmp); tmp = g_strdup_printf ("send_rtcp_src_%u", self->id); self->priv->rtpbin_send_rtcp_src = gst_element_get_request_pad (self->priv->conference->rtpbin, tmp); g_free (tmp); g_signal_handler_disconnect (self->priv->conference->rtpbin, request_rtp_encoder_id); g_signal_handler_disconnect (self->priv->conference->rtpbin, request_rtp_decoder_id); g_signal_handler_disconnect (self->priv->conference->rtpbin, request_rtcp_encoder_id); g_signal_handler_disconnect (self->priv->conference->rtpbin, request_rtcp_decoder_id); if (!self->priv->rtpbin_recv_rtp_sink) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get recv_rtp_sink_%u request pad from the rtpbin", self->id); return; } if (!self->priv->rtpbin_recv_rtcp_sink) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get recv_rtcp_sink_%u request pad from the rtpbin", self->id); return; } if (!self->priv->rtpbin_send_rtp_sink) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get send_rtp_sink_%u request pad from the rtpbin", self->id); return; } if (!self->priv->rtpbin_send_rtcp_src) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get send_rtcp_src_%u request pad from the rtpbin", self->id); return; } self->priv->send_tee_discovery_pad = gst_element_get_request_pad (tee, "src_%u"); self->priv->send_tee_media_pad = gst_element_get_request_pad (tee, "src_%u"); if (!self->priv->send_tee_discovery_pad || !self->priv->send_tee_media_pad) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the send tee request src pads"); } tmp = g_strdup_printf ("valve_discovery_%u", self->id); self->priv->discovery_valve = gst_element_factory_make ("valve", tmp); g_free (tmp); if (!self->priv->discovery_valve) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the valve element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->discovery_valve)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the valve element to the FsRtpConference"); gst_object_unref (valve); return; } if (!gst_element_sync_state_with_parent (self->priv->discovery_valve)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the discovery valve's state with its parent"); return; } pad = gst_element_get_static_pad (self->priv->discovery_valve, "sink"); ret = gst_pad_link (self->priv->send_tee_discovery_pad, pad); gst_object_unref (pad); if (GST_PAD_LINK_FAILED (ret)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link discovery pad to discovery valve"); return; } tmp = g_strdup_printf ("valve_send_%u", self->id); valve = gst_element_factory_make ("valve", tmp); g_free (tmp); if (!valve) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the valve element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), valve)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the valve element to the FsRtpConference"); gst_object_unref (valve); return; } g_object_set (G_OBJECT (valve), "drop", TRUE, NULL); gst_element_set_state (valve, GST_STATE_PLAYING); self->priv->media_sink_valve = gst_object_ref (valve); valve_sink_pad = gst_element_get_static_pad (valve, "sink"); if (GST_PAD_LINK_FAILED (gst_pad_link (self->priv->send_tee_media_pad, valve_sink_pad))) { gst_object_unref (valve_sink_pad); self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link send tee and valve"); return; } gst_object_unref (valve_sink_pad); /* Now create the transmitter RTP funnel */ tmp = g_strdup_printf ("recv_rtp_funnel_%u", self->id); funnel = gst_element_factory_make ("funnel", tmp); g_free (tmp); if (!funnel) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the rtp funnel element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), funnel)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the rtp funnel element to the FsRtpConference"); gst_object_unref (funnel); return; } self->priv->transmitter_rtp_funnel = gst_object_ref (funnel); funnel_src_pad = gst_element_get_static_pad (funnel, "src"); ret = gst_pad_link (funnel_src_pad, self->priv->rtpbin_recv_rtp_sink); if (GST_PAD_LINK_FAILED (ret)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link pad %s with pad %s", GST_PAD_NAME (funnel_src_pad), GST_PAD_NAME (self->priv->rtpbin_recv_rtp_sink)); gst_object_unref (funnel_src_pad); return; } gst_object_unref (funnel_src_pad); gst_element_set_state (funnel, GST_STATE_PLAYING); /* Now create the transmitter RTCP funnel */ tmp = g_strdup_printf ("recv_rtcp_funnel_%u", self->id); funnel = gst_element_factory_make ("funnel", tmp); g_free (tmp); if (!funnel) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the rtcp funnel element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), funnel)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the rtcp funnel element to the FsRtcpConference"); gst_object_unref (funnel); return; } self->priv->transmitter_rtcp_funnel = gst_object_ref (funnel); funnel_src_pad = gst_element_get_static_pad (funnel, "src"); ret = gst_pad_link (funnel_src_pad, self->priv->rtpbin_recv_rtcp_sink); if (GST_PAD_LINK_FAILED (ret)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link pad %s with pad %s", GST_PAD_NAME (funnel_src_pad), GST_PAD_NAME (self->priv->rtpbin_recv_rtcp_sink)); gst_object_unref (funnel_src_pad); return; } gst_object_unref (funnel_src_pad); gst_element_set_state (funnel, GST_STATE_PLAYING); /* Lets get the internal RTP session */ g_signal_emit_by_name (self->priv->conference->rtpbin, "get-internal-session", self->id, &self->priv->rtpbin_internal_session); if (!self->priv->rtpbin_internal_session) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get the rtpbin's internal session"); return; } g_signal_connect (self->priv->rtpbin_internal_session, "notify::internal-ssrc", G_CALLBACK (_rtpbin_internal_session_notify_internal_ssrc), self); g_object_set (self->priv->rtpbin_internal_session, "favor-new", TRUE, "bandwidth", (gdouble) 0, "rtcp-fraction", (gdouble) 0.05, NULL); /* Lets now create the RTP muxer */ tmp = g_strdup_printf ("send_rtp_muxer_%u", self->id); muxer = gst_element_factory_make ("rtpdtmfmux", tmp); g_free (tmp); if (!muxer) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the rtp muxer element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), muxer)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the rtp muxer element to the FsRtpConference"); gst_object_unref (muxer); return; } self->priv->rtpmuxer = gst_object_ref (muxer); g_signal_connect_object (self->priv->rtpbin_send_rtp_sink, "notify::caps", G_CALLBACK (_rtpbin_send_rtp_sink_notify_caps), self, 0); muxer_src_pad = gst_element_get_static_pad (muxer, "src"); ret = gst_pad_link (muxer_src_pad, self->priv->rtpbin_send_rtp_sink); if (GST_PAD_LINK_FAILED (ret)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link pad %s with pad %s", GST_PAD_NAME (muxer_src_pad), GST_PAD_NAME (self->priv->rtpbin_send_rtp_sink)); gst_object_unref (muxer_src_pad); return; } gst_object_unref (muxer_src_pad); gst_element_set_state (muxer, GST_STATE_PLAYING); if (self->priv->media_type == FS_MEDIA_TYPE_VIDEO) { self->priv->rtp_tfrc = fs_rtp_tfrc_new (self); g_signal_connect_object (self->priv->rtp_tfrc, "notify::bitrate", G_CALLBACK (_rtp_tfrc_bitrate_changed), self, 0); } self->priv->keyunit_manager = fs_rtp_keyunit_manager_new ( self->priv->rtpbin_internal_session); /* Now create the transmitter RTP tee */ tmp = g_strdup_printf ("send_rtp_tee_%u", self->id); tee = gst_element_factory_make ("tee", tmp); g_free (tmp); if (!tee) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the rtp tee element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), tee)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the rtp tee element to the FsRtpConference"); gst_object_unref (tee); return; } gst_element_set_state (tee, GST_STATE_PLAYING); self->priv->transmitter_rtp_tee = gst_object_ref (tee); tmp = g_strdup_printf ("send_rtp_src_%u", self->id); if (!gst_element_link_pads ( self->priv->conference->rtpbin, tmp, self->priv->transmitter_rtp_tee, "sink")) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link rtpbin %s pad to tee sink", tmp); g_free (tmp); return; } g_free (tmp); /* Now create the transmitter RTCP tee */ tmp = g_strdup_printf ("send_rtcp_tee_%u", self->id); tee = gst_element_factory_make ("tee", tmp); g_free (tmp); if (!tee) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the rtcp tee element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), tee)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the rtcp tee element to the FsRtpConference"); gst_object_unref (tee); return; } gst_element_set_state (tee, GST_STATE_PLAYING); self->priv->transmitter_rtcp_tee = gst_object_ref (tee); transmitter_rtcp_tee_sink_pad = gst_element_get_static_pad (self->priv->transmitter_rtcp_tee, "sink"); g_assert (transmitter_rtcp_tee_sink_pad); ret = gst_pad_link (self->priv->rtpbin_send_rtcp_src, transmitter_rtcp_tee_sink_pad); gst_object_unref (transmitter_rtcp_tee_sink_pad); if (GST_PAD_LINK_FAILED (ret)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link rtpbin network rtcp src to tee"); return; } /* Lets now do the send_capsfilter */ tmp = g_strdup_printf ("send_rtp_capsfilter_%u", self->id); capsfilter = gst_element_factory_make ("capsfilter", tmp); g_free (tmp); if (!capsfilter) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the rtp capsfilter element"); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), capsfilter)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the rtp capsfilter element to the FsRtpConference"); gst_object_unref (capsfilter); return; } pad = gst_element_get_static_pad (capsfilter, "src"); g_signal_connect (pad, "notify::caps", G_CALLBACK (_send_caps_changed), self); gst_object_unref (pad); self->priv->send_capsfilter = gst_object_ref (capsfilter); if (!gst_element_link_pads (capsfilter, "src", muxer, "sink_%u")) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link pad capsfilter src pad to the rtpmux"); return; } gst_element_set_state (capsfilter, GST_STATE_PLAYING); if (!fs_rtp_session_update_codecs (self, NULL, NULL, &self->priv->construction_error)) { g_assert (self->priv->construction_error); return; } if (G_OBJECT_CLASS (fs_rtp_session_parent_class)->constructed) G_OBJECT_CLASS (fs_rtp_session_parent_class)->constructed(object); } #define GET_MEMBER(Type, name) \ Type * \ fs_rtp_session_get_##name (FsRtpSession *self) \ { \ Type *tmp = self->priv->name; \ \ if (tmp) \ gst_object_ref (tmp); \ return tmp; \ } GET_MEMBER (FsRtpConference, conference) GET_MEMBER (GstPad, rtpbin_recv_rtp_sink) GET_MEMBER (GstPad, rtpbin_recv_rtcp_sink) GET_MEMBER (GObject, rtpbin_internal_session) GET_MEMBER (GstElement, rtpmuxer) #undef GET_MEMBER static gboolean fs_rtp_session_add_ssrc_stream_locked (FsRtpSession *self, guint32 ssrc, FsRtpStream *stream) { if (!g_hash_table_lookup (self->priv->ssrc_streams, GUINT_TO_POINTER (ssrc))) { g_hash_table_insert (self->priv->ssrc_streams, GUINT_TO_POINTER (ssrc), stream); if (self->priv->srtpdec) g_signal_emit_by_name (self->priv->srtpdec, "remove-key", ssrc); return TRUE; } else { return FALSE; } } static void _stream_known_source_packet_received (FsRtpStream *stream, guint component, GstBuffer *buffer, gpointer user_data) { guint32 ssrc; FsRtpSession *self = FS_RTP_SESSION_CAST (user_data); gboolean valid = FALSE; GstRTPBuffer rtpbuffer = GST_RTP_BUFFER_INIT; if (fs_rtp_session_has_disposed_enter (self, NULL)) return; if (gst_rtp_buffer_map (buffer, GST_MAP_READ, &rtpbuffer)) { ssrc = gst_rtp_buffer_get_ssrc (&rtpbuffer); gst_rtp_buffer_unmap (&rtpbuffer); valid = TRUE; } else { GstRTCPPacket rtcppacket; GstRTCPBuffer rtcpbuffer = GST_RTCP_BUFFER_INIT; if (gst_rtcp_buffer_map (buffer, GST_MAP_READ, &rtcpbuffer)) { if (gst_rtcp_buffer_get_first_packet (&rtcpbuffer, &rtcppacket)) { GstRTCPType type; do { type = gst_rtcp_packet_get_type (&rtcppacket); switch (type) { case GST_RTCP_TYPE_RR: ssrc = gst_rtcp_packet_rr_get_ssrc (&rtcppacket); valid = TRUE; break; case GST_RTCP_TYPE_SR: gst_rtcp_packet_sr_get_sender_info (&rtcppacket, &ssrc, NULL, NULL, NULL, NULL); valid = TRUE; break; case GST_RTCP_TYPE_SDES: ssrc = gst_rtcp_packet_sdes_get_ssrc (&rtcppacket); valid = TRUE; break; default: break; } } while (valid == FALSE && type != GST_RTCP_TYPE_INVALID && gst_rtcp_packet_move_to_next (&rtcppacket)); } gst_rtcp_buffer_unmap (&rtcpbuffer); } } if (!valid) { fs_rtp_session_has_disposed_exit (self); return; } FS_RTP_SESSION_LOCK (self); if (fs_rtp_session_add_ssrc_stream_locked (self, ssrc, stream)) { FS_RTP_SESSION_UNLOCK (self); fs_rtp_session_associate_free_substreams (self, stream, ssrc); } else { FS_RTP_SESSION_UNLOCK (self); } fs_rtp_session_has_disposed_exit (self); } static void _stream_sending_changed_locked (FsRtpStream *stream, gboolean sending, gpointer user_data) { FsRtpSession *session = user_data; if (sending) session->priv->streams_sending++; else session->priv->streams_sending--; if (fs_rtp_session_has_disposed_enter (session, NULL)) return; if (session->priv->streams_sending && session->priv->send_codecbin && g_hash_table_size (session->priv->transmitters)) g_object_set (session->priv->media_sink_valve, "drop", FALSE, NULL); else g_object_set (session->priv->media_sink_valve, "drop", TRUE, NULL); if (session->priv->rtp_tfrc) g_object_set (session->priv->rtp_tfrc, "sending", (session->priv->streams_sending > 0), NULL); fs_rtp_session_has_disposed_exit (session); } static void _stream_ssrc_added_cb (FsRtpStream *stream, guint32 ssrc, gpointer user_data) { FsRtpSession *self = user_data; if (fs_rtp_session_has_disposed_enter (self, NULL)) return; FS_RTP_SESSION_LOCK (self); fs_rtp_session_add_ssrc_stream_locked (self, ssrc, stream); g_hash_table_insert (self->priv->ssrc_streams_manual, GUINT_TO_POINTER (ssrc), stream); FS_RTP_SESSION_UNLOCK (self); fs_rtp_session_associate_free_substreams (self, stream, ssrc); fs_rtp_session_has_disposed_exit (self); } static gboolean _remove_stream_from_ht (gpointer key, gpointer value, gpointer user_data) { return (value == user_data); } static void _remove_stream (gpointer user_data, GObject *where_the_object_was) { FsRtpSession *self = FS_RTP_SESSION (user_data); if (fs_rtp_session_has_disposed_enter (self, NULL)) return; FS_RTP_SESSION_LOCK (self); self->priv->streams = g_list_remove_all (self->priv->streams, where_the_object_was); self->priv->streams_cookie++; g_hash_table_foreach_remove (self->priv->ssrc_streams, _remove_stream_from_ht, where_the_object_was); g_hash_table_foreach_remove (self->priv->ssrc_streams_manual, _remove_stream_from_ht, where_the_object_was); FS_RTP_SESSION_UNLOCK (self); fs_rtp_session_has_disposed_exit (self); } /** * fs_rtp_session_new_stream: * @session: an #FsRtpSession * @participant: #FsParticipant of a participant for the new stream * @direction: #FsStreamDirection describing the direction of the new stream that will * be created for this participant * @error: location of a #GError, or NULL if no error occured * * This function creates a stream for the given participant into the active session. * * Returns: the new #FsStream that has been created. User must unref the * #FsStream when the stream is ended. If an error occured, returns NULL. */ static FsStream * fs_rtp_session_new_stream (FsSession *session, FsParticipant *participant, FsStreamDirection direction, GError **error) { FsRtpSession *self = FS_RTP_SESSION (session); FsRtpParticipant *rtpparticipant = NULL; FsStream *new_stream = NULL; if (!FS_IS_RTP_PARTICIPANT (participant)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You have to provide a participant of type RTP"); return NULL; } if (fs_rtp_session_has_disposed_enter (self, error)) return NULL; rtpparticipant = FS_RTP_PARTICIPANT (participant); new_stream = FS_STREAM_CAST (fs_rtp_stream_new (self, rtpparticipant, direction, _stream_new_remote_codecs, _stream_known_source_packet_received, _stream_sending_changed_locked, _stream_ssrc_added_cb, _stream_get_new_stream_transmitter, _stream_decrypt_clear_locked_cb, self)); if (new_stream) { FS_RTP_SESSION_LOCK (self); self->priv->streams = g_list_append (self->priv->streams, new_stream); self->priv->streams_cookie++; FS_RTP_SESSION_UNLOCK (self); } g_object_weak_ref (G_OBJECT (new_stream), _remove_stream, self); fs_rtp_session_has_disposed_exit (self); return new_stream; } static GstEvent * fs_rtp_session_set_next_telephony_method (FsRtpSession *self, gint method) { GstEvent *event; GstStructure *s; gboolean start; FS_RTP_SESSION_LOCK (self); event = g_queue_peek_tail (&self->priv->telephony_events); if (gst_structure_get_boolean (gst_event_get_structure (event), "start", &start) && !start) goto out; g_queue_pop_tail (&self->priv->telephony_events); event = GST_EVENT (gst_mini_object_make_writable (GST_MINI_OBJECT (event))); s = (GstStructure *) gst_event_get_structure (event); gst_structure_set (s, "method", G_TYPE_INT, method, NULL); g_queue_push_tail (&self->priv->telephony_events, event); out: gst_event_ref (event); self->priv->telephony_event_running = TRUE; FS_RTP_SESSION_UNLOCK (self); return event; } static void fs_rtp_session_try_sending_dtmf_event (FsRtpSession *self) { GstElement *rtpmuxer = NULL; GstPad *pad; gboolean ret = FALSE; GstEvent *event; FS_RTP_SESSION_LOCK (self); if (self->priv->telephony_event_running || g_queue_get_length (&self->priv->telephony_events) == 0) { FS_RTP_SESSION_UNLOCK (self); return; } g_assert (self->priv->rtpmuxer); rtpmuxer = gst_object_ref (self->priv->rtpmuxer); FS_RTP_SESSION_UNLOCK (self); pad = gst_element_get_static_pad (rtpmuxer, "src"); event = fs_rtp_session_set_next_telephony_method (self, 1); ret = gst_pad_send_event (pad, event); if (!ret) { event = fs_rtp_session_set_next_telephony_method (self, 2); ret = gst_pad_send_event (pad, event); } if (!ret) { FS_RTP_SESSION_LOCK (self); self->priv->telephony_event_running = FALSE; FS_RTP_SESSION_UNLOCK (self); } gst_object_unref (pad); gst_object_unref (rtpmuxer); } static gboolean fs_rtp_session_check_telephony_event_queue_start_locked (FsRtpSession *self, gboolean desired_start) { GstEvent *event = g_queue_peek_head (&self->priv->telephony_events); if (event) { const GstStructure *s = gst_event_get_structure (event); gboolean start; if (gst_structure_get_boolean (s, "start", &start) && start != desired_start) { GST_WARNING ("Tried to start an event while another is playing"); return FALSE; } } return TRUE; } /** * fs_rtp_session_start_telephony_event: * @session: an #FsRtpSession * @event: A #FsStreamDTMFEvent or another number defined at * http://www.iana.org/assignments/audio-telephone-event-registry * @volume: The volume in dBm0 without the negative sign. Should be between * 0 and 36. Higher values mean lower volume * * This function will start sending a telephony event (such as a DTMF * tone) on the #FsRtpSession. You have to call the function * #fs_rtp_session_stop_telephony_event () to stop it. * * Returns: %TRUE if sucessful, it can return %FALSE if the #FsStream * does not support this telephony event. */ static gboolean fs_rtp_session_start_telephony_event (FsSession *session, guint8 event, guint8 volume) { FsRtpSession *self = FS_RTP_SESSION (session); gboolean ret = FALSE; if (fs_rtp_session_has_disposed_enter (self, NULL)) return FALSE; FS_RTP_SESSION_LOCK (self); if (!fs_rtp_session_check_telephony_event_queue_start_locked (self, FALSE)) { GST_WARNING ("Tried to start an event without stopping the previous one"); goto out; } GST_DEBUG ("sending telephony event %d", event); g_queue_push_head (&self->priv->telephony_events, gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, gst_structure_new ("dtmf-event", "number", G_TYPE_INT, event, "volume", G_TYPE_INT, volume, "start", G_TYPE_BOOLEAN, TRUE, "type", G_TYPE_INT, 1, NULL))); ret = TRUE; out: FS_RTP_SESSION_UNLOCK (self); if (ret) fs_rtp_session_try_sending_dtmf_event (self); fs_rtp_session_has_disposed_exit (self); return ret; } /** * fs_rtp_session_stop_telephony_event: * @session: an #FsRtpSession * * This function will stop sending a telephony event started by * #fs_rtp_session_start_telephony_event (). If the event was being sent * for less than 50ms, it will be sent for 50ms minimum. If the * duration was a positive and the event is not over, it will cut it * short. * * Returns: %TRUE if sucessful, it can return %FALSE if the #FsRtpSession * does not support telephony events or if no telephony event is being sent */ static gboolean fs_rtp_session_stop_telephony_event (FsSession *session) { FsRtpSession *self = FS_RTP_SESSION (session); gboolean ret = FALSE; if (fs_rtp_session_has_disposed_enter (self, NULL)) return FALSE; FS_RTP_SESSION_LOCK (self); if (!fs_rtp_session_check_telephony_event_queue_start_locked (self, TRUE)) { GST_WARNING ("Tried to stop a telephony event without starting one first"); goto out; } GST_DEBUG ("stopping telephony event"); g_queue_push_head (&self->priv->telephony_events, gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, gst_structure_new ("dtmf-event", "start", G_TYPE_BOOLEAN, FALSE, "type", G_TYPE_INT, 1, NULL))); ret = TRUE; out: FS_RTP_SESSION_UNLOCK (self); if (ret) fs_rtp_session_try_sending_dtmf_event (self); fs_rtp_session_has_disposed_exit (self); return ret; } /** * fs_rtp_session_set_send_codec: * @session: an #FsRtpSession * @send_codec: an #FsCodec representing the codec to send * @error: location of a #GError, or NULL if no error occured * * This function will set the currently being sent codec for all streams in this * session. The given #FsCodec must be taken directly from the #FsSession:codecs * property of the session. If the given codec is not in the codecs * list, @error will be set and %FALSE will be returned. The @send_codec will be * copied so it must be free'd using fs_codec_destroy () when done. * * Returns: %FALSE if the send codec couldn't be set. */ static gboolean fs_rtp_session_set_send_codec (FsSession *session, FsCodec *send_codec, GError **error) { FsRtpSession *self = FS_RTP_SESSION (session); gboolean ret; if (fs_rtp_session_has_disposed_enter (self, error)) return FALSE; FS_RTP_SESSION_LOCK (self); if (lookup_codec_association_by_codec_for_sending ( self->priv->codec_associations, send_codec)) { if (self->priv->requested_send_codec) fs_codec_destroy (self->priv->requested_send_codec); self->priv->requested_send_codec = fs_codec_copy (send_codec); fs_rtp_session_verify_send_codec_bin_locked (self); ret = TRUE; } else { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The passed codec is not part of the list of codecs"); ret = FALSE; } FS_RTP_SESSION_UNLOCK (self); fs_rtp_session_has_disposed_exit (self); return ret; } static gboolean fs_rtp_session_set_codec_preferences (FsSession *session, GList *codec_preferences, GError **error) { FsRtpSession *self = FS_RTP_SESSION (session); GList *old_codec_prefs = NULL; GList *new_codec_prefs = NULL; gboolean ret; guint current_generation; if (fs_rtp_session_has_disposed_enter (self, error)) return FALSE; new_codec_prefs = validate_codecs_configuration ( self->priv->media_type, self->priv->blueprints, codec_preferences); if (new_codec_prefs == NULL) GST_DEBUG ("None of the new codec preferences passed are usable," " this will restore the original list of detected codecs"); FS_RTP_SESSION_LOCK (self); old_codec_prefs = self->priv->codec_preferences; self->priv->codec_preferences = new_codec_prefs; current_generation = self->priv->codec_preferences_generation; self->priv->codec_preferences_generation++; FS_RTP_SESSION_UNLOCK (self); ret = fs_rtp_session_update_codecs (self, NULL, NULL, error); if (ret) { g_list_free_full (old_codec_prefs, (GDestroyNotify) codec_preference_destroy); g_object_notify ((GObject*) self, "codec-preferences"); } else { FS_RTP_SESSION_LOCK (self); if (self->priv->codec_preferences_generation == current_generation) { g_list_free_full (self->priv->codec_preferences, (GDestroyNotify) codec_preference_destroy); self->priv->codec_preferences = old_codec_prefs; self->priv->codec_preferences_generation++; } else { g_list_free_full (old_codec_prefs, (GDestroyNotify) codec_preference_destroy); } FS_RTP_SESSION_UNLOCK (self); GST_WARNING ("Invalid new codec preferences"); } fs_rtp_session_has_disposed_exit (self); return ret; } FsRtpSession * fs_rtp_session_new (FsMediaType media_type, FsRtpConference *conference, guint id, GError **error) { FsRtpSession *session = g_object_new (FS_TYPE_RTP_SESSION, "media-type", media_type, "conference", conference, "id", id, NULL); if (session->priv->construction_error) { g_propagate_error (error, session->priv->construction_error); g_object_unref (session); return NULL; } return session; } GstCaps * fs_rtp_session_request_pt_map (FsRtpSession *session, guint pt) { GstCaps *caps = NULL; CodecAssociation *ca = NULL; if (fs_rtp_session_has_disposed_enter (session, NULL)) return NULL; FS_RTP_SESSION_LOCK (session); ca = lookup_codec_association_by_pt ( session->priv->codec_associations, pt); if (ca) { FsCodec *tmpcodec = codec_copy_filtered (ca->codec, FS_PARAM_TYPE_CONFIG); caps = fs_codec_to_gst_caps (tmpcodec); fs_codec_destroy (tmpcodec); } FS_RTP_SESSION_UNLOCK (session); if (!caps) GST_WARNING ("Could not get caps for payload type %u in session %d", pt, session->id); fs_rtp_session_has_disposed_exit (session); return caps; } static gboolean _get_request_pad_and_link (GstElement *tee_funnel, const gchar *tee_funnel_name, GstElement *sinksrc, const gchar *sinksrc_padname, GstPadDirection direction, GError **error) { GstPad *requestpad = NULL; GstPad *transpad = NULL; GstPadLinkReturn ret; gchar *requestpad_name = (direction == GST_PAD_SINK) ? "src_%u" : "sink_%u"; /* The transmitter will only be removed when the whole session is disposed, * then the */ requestpad = gst_element_get_request_pad (tee_funnel, requestpad_name); if (!requestpad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Can not get the %s pad from the transmitter %s element", requestpad_name, tee_funnel_name); return FALSE; } transpad = gst_element_get_static_pad (sinksrc, sinksrc_padname); if (direction == GST_PAD_SINK) ret = gst_pad_link (requestpad, transpad); else ret = gst_pad_link (transpad, requestpad); gst_object_unref (requestpad); gst_object_unref (transpad); if (GST_PAD_LINK_FAILED (ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Can not link the %s to the transmitter %s", tee_funnel_name, (direction == GST_PAD_SINK) ? "sink" : "src"); return FALSE; } return TRUE; } static void _transmitter_error ( FsStreamTransmitter *stream_transmitter, gint errorno, gchar *error_msg, gpointer user_data) { FsSession *session = FS_SESSION (user_data); fs_session_emit_error (session, errorno, error_msg); } static gboolean fs_rtp_session_add_transmitter_gst_sink (FsRtpSession *self, FsTransmitter *transmitter, GError **error) { GstElement *sink; g_object_get (transmitter, "gst-sink", &sink, NULL); if (!gst_bin_add (GST_BIN (self->priv->conference), sink)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the transmitter sink for %s to the conference", G_OBJECT_TYPE_NAME(transmitter)); goto error; } gst_element_sync_state_with_parent (sink); if (!_get_request_pad_and_link (self->priv->transmitter_rtp_tee, "rtp tee", sink, "sink_1", GST_PAD_SINK, error)) goto error; if (!_get_request_pad_and_link (self->priv->transmitter_rtcp_tee, "rtcp tee", sink, "sink_2", GST_PAD_SINK, error)) goto error; gst_object_unref (sink); return TRUE; error: if (sink) gst_object_unref (sink); return FALSE; } /** * fs_rtp_session_get_transmitter: * @self: a #FsRtpSession * @transmitter_name: The name of the transmitter * @error: a #GError or %NULL * * Returns the requested #FsTransmitter, possibly creating it if it * does not exist. * * Returns: a #FsTransmitter or %NULL on error */ static FsTransmitter * fs_rtp_session_get_transmitter (FsRtpSession *self, const gchar *transmitter_name, GError **error) { FsTransmitter *transmitter; GstElement *src = NULL; guint tos; FS_RTP_SESSION_LOCK (self); transmitter = g_hash_table_lookup (self->priv->transmitters, transmitter_name); if (transmitter) { g_object_ref (transmitter); FS_RTP_SESSION_UNLOCK (self); return transmitter; } tos = self->priv->tos; FS_RTP_SESSION_UNLOCK (self); transmitter = fs_transmitter_new (transmitter_name, 2, tos, error); if (!transmitter) return NULL; g_signal_connect (transmitter, "error", G_CALLBACK (_transmitter_error), self); if (!fs_rtp_session_add_transmitter_gst_sink (self, transmitter, error)) goto error; g_object_get (transmitter, "gst-src", &src, NULL); if (!gst_bin_add (GST_BIN (self->priv->conference), src)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the transmitter src for %s to the conference", transmitter_name); goto error; } if (!_get_request_pad_and_link (self->priv->transmitter_rtp_funnel, "rtp funnel", src, "src_1", GST_PAD_SRC, error)) goto error; if (!_get_request_pad_and_link (self->priv->transmitter_rtcp_funnel, "rtcp funnel", src, "src_2", GST_PAD_SRC, error)) goto error; gst_element_sync_state_with_parent (src); FS_RTP_SESSION_LOCK (self); /* Check if two were added at the same time */ if (g_hash_table_lookup (self->priv->transmitters, transmitter_name)) { FS_RTP_SESSION_UNLOCK (self); gst_element_set_locked_state (src, TRUE); gst_element_set_state (src, GST_STATE_NULL); goto error; } g_object_ref (transmitter); g_hash_table_insert (self->priv->transmitters, g_strdup (transmitter_name), transmitter); FS_RTP_SESSION_UNLOCK (self); gst_object_unref (src); return transmitter; /* * TODO: * The transmitters sink/sources should be cleanly removed if there is * an error */ error: if (src) gst_object_unref (src); if (transmitter) g_object_unref (transmitter); return NULL; } static FsStreamTransmitter * _stream_get_new_stream_transmitter (FsRtpStream *stream, FsParticipant *participant, const gchar *transmitter_name, GParameter *parameters, guint n_parameters, GError **error, gpointer user_data) { FsTransmitter *transmitter; FsStreamTransmitter *st = NULL; FsRtpSession *self = user_data; if (fs_rtp_session_has_disposed_enter (self, error)) return NULL; transmitter = fs_rtp_session_get_transmitter (self, transmitter_name, error); if (!transmitter) { fs_rtp_session_has_disposed_exit (self); return NULL; } st = fs_transmitter_new_stream_transmitter (transmitter, participant, n_parameters, parameters, error); g_object_unref (transmitter); fs_rtp_session_has_disposed_exit (self); return st; } /** * fs_rtp_session_get_stream_by_ssrc_locked * @self: The #FsRtpSession * @stream_ssrc: The stream ssrc * * Gets the #FsRtpStream for the SSRC or %NULL if it doesnt exist * * Return value: A #FsRtpStream (unref after use) or %NULL if it doesn't exist */ static FsRtpStream * fs_rtp_session_get_stream_by_ssrc_locked (FsRtpSession *self, guint32 ssrc) { FsRtpStream *stream = NULL; stream = g_hash_table_lookup (self->priv->ssrc_streams, GUINT_TO_POINTER (ssrc)); if (stream) g_object_ref (stream); return stream; } /** * fs_rtp_session_verify_recv_codecs_locked * @session: A #FsRtpSession * * Verifies that the various substreams still have the right codec, otherwise * re-sets it. */ static void fs_rtp_session_verify_recv_codecs_locked (FsRtpSession *session) { GList *item, *item2; for (item = g_list_first (session->priv->free_substreams); item; item = g_list_next (item)) fs_rtp_sub_stream_verify_codec_locked (item->data); for (item = g_list_first (session->priv->streams); item; item = g_list_next (item)) { FsRtpStream *stream = item->data; for (item2 = g_list_first (stream->substreams); item2; item2 = g_list_next (item2)) fs_rtp_sub_stream_verify_codec_locked (item2->data); } } /** * fs_rtp_session_distribute_recv_codecs_locked: * @session: a #FsRtpSession * @force_stream: The #FsRtpStream to which the new remote codecs belong * @forced_remote_codecs: The #GList of remote codecs to use for that stream * * This function distributes the codecs to the streams including their * own config data. * * If a stream is specified, it will use the specified remote codecs * instead of the ones currently in the stream. */ static void fs_rtp_session_distribute_recv_codecs_locked (FsRtpSession *session, FsRtpStream *force_stream, GList *forced_remote_codecs) { GList *item = NULL; guint cookie; restart: cookie = session->priv->streams_cookie; for (item = session->priv->streams; item; item = g_list_next (item)) { FsRtpStream *stream = item->data; GList *remote_codecs = NULL; if (stream == force_stream) remote_codecs = forced_remote_codecs; else remote_codecs = stream->remote_codecs; if (remote_codecs) { GList *new_codecs = codec_associations_to_codecs ( session->priv->codec_associations, FALSE); GList *item2 = NULL; for (item2 = new_codecs; item2; item2 = g_list_next (item2)) { FsCodec *codec = item2->data; GList *item3 = NULL; FsCodec *remote_codec = NULL; for (item3 = remote_codecs; item3; item3 = g_list_next (item3)) { FsCodec *tmpcodec = NULL; remote_codec = item3->data; tmpcodec = sdp_negotiate_codec (codec, FS_PARAM_TYPE_RECV, remote_codec, FS_PARAM_TYPE_RECV | FS_PARAM_TYPE_CONFIG); if (tmpcodec) { fs_codec_destroy (tmpcodec); break; } } if (item3 == NULL) remote_codec = NULL; GST_LOG ("Adding codec to stream %p " FS_CODEC_FORMAT, stream, FS_CODEC_ARGS (codec)); if (remote_codec) { for (item3 = remote_codec->optional_params; item3; item3 = g_list_next (item3)) { FsCodecParameter *param = item3->data; if (codec_has_config_data_named (codec, param->name)) { GST_LOG ("Adding parameter to stream %p %s=%s", stream, param->name, param->value); fs_codec_add_optional_parameter (codec, param->name, param->value); } } } } /* This function unlocks the lock, so we have to check the cookie * when we come back */ g_object_ref (stream); fs_rtp_stream_set_negotiated_codecs_unlock (stream, new_codecs); g_object_unref (stream); FS_RTP_SESSION_LOCK (session); if (cookie != session->priv->streams_cookie) goto restart; } } } /** * fs_rtp_session_negotiate_codecs_locked: * @session: a #FsRtpSession * @stream: The #FsRtpStream to which the new remote codecs belong * @remote_codecs: The #GList of remote codecs to use for that stream * @has_remotes: Set to %TRUE if at least one stream has remote codecs * set to %FALSE otherwise * @is_new: Set to %TRUE if the codecs associations have changed * * Negotiates the codecs using the current (stored) codecs * and the remote codecs from each stream. * If a stream is specified, it will use the specified remote codecs * instead of the ones currently in the stream * * Returns: %TRUE if a new list could be negotiated, otherwise %FALSE and sets * @error */ static gboolean fs_rtp_session_negotiate_codecs_locked (FsRtpSession *session, FsRtpStream *stream, GList *remote_codecs, gboolean *has_remotes, gboolean *is_new, GError **error) { gint streams_with_codecs = 0; gboolean has_many_streams = FALSE; GList *new_negotiated_codec_associations = NULL; GList *item; guint8 hdrext_used_ids[8]; GList *new_hdrexts = NULL; *has_remotes = FALSE; for (item = g_list_first (session->priv->streams); item; item = g_list_next (item)) { FsRtpStream *mystream = item->data; if (mystream == stream) { if (remote_codecs) streams_with_codecs ++; } else if (mystream->remote_codecs) { streams_with_codecs ++; } } if (streams_with_codecs >= 2) has_many_streams = TRUE; new_negotiated_codec_associations = create_local_codec_associations ( session->priv->blueprints, session->priv->codec_preferences, session->priv->codec_associations, session->priv->input_caps, session->priv->output_caps); if (!new_negotiated_codec_associations) { g_set_error (error, FS_ERROR, FS_ERROR_NO_CODECS_LEFT, "Codec config would leave no valid local codecs"); goto error; } new_hdrexts = create_local_header_extensions ( session->priv->hdrext_negotiated, session->priv->hdrext_preferences, hdrext_used_ids); for (item = g_list_first (session->priv->streams); item; item = g_list_next (item)) { FsRtpStream *mystream = item->data; GList *codecs = NULL; if (mystream == stream) codecs = remote_codecs; else codecs = mystream->remote_codecs; if (codecs) { GList *tmp_codec_associations = NULL; *has_remotes = TRUE; tmp_codec_associations = negotiate_stream_codecs (codecs, new_negotiated_codec_associations, has_many_streams); codec_association_list_destroy (new_negotiated_codec_associations); new_negotiated_codec_associations = tmp_codec_associations; if (!new_negotiated_codec_associations) break; new_hdrexts = negotiate_stream_header_extensions (new_hdrexts, mystream->hdrext, !has_many_streams, hdrext_used_ids); } } if (!new_negotiated_codec_associations) { g_set_error (error, FS_ERROR, FS_ERROR_NEGOTIATION_FAILED, "There was no intersection between the remote codecs" " and the local ones"); goto error; } new_negotiated_codec_associations = finish_codec_negotiation ( session->priv->codec_associations, new_negotiated_codec_associations); new_negotiated_codec_associations = fs_rtp_special_sources_negotiation_filter ( new_negotiated_codec_associations); fs_rtp_tfrc_filter_codecs (&new_negotiated_codec_associations, &new_hdrexts); if (session->priv->codec_associations) *is_new = ! codec_associations_list_are_equal ( session->priv->codec_associations, new_negotiated_codec_associations); codec_association_list_destroy (session->priv->codec_associations); session->priv->codec_associations = new_negotiated_codec_associations; new_hdrexts = finish_header_extensions_nego (new_hdrexts, hdrext_used_ids); fs_rtp_header_extension_list_destroy (session->priv->hdrext_negotiated); session->priv->hdrext_negotiated = new_hdrexts; return TRUE; error: fs_rtp_header_extension_list_destroy (new_hdrexts); return FALSE; } /** * fs_rtp_session_update_codecs: * @session: a #FsRtpSession * @stream: The #FsRtpStream to which the new remote codecs belong * @remote_codecs: The #GList of remote codecs to use for that stream * * Negotiates the codecs using the current (stored) codecs * and the remote codecs from each stream. * If a stream is specified, it will use the specified remote codecs * instead of the ones currently in the stream * * MT safe * * Returns: TRUE if the negotiation succeeds, FALSE otherwise */ static gboolean fs_rtp_session_update_codecs (FsRtpSession *session, FsRtpStream *stream, GList *remote_codecs, GError **error) { gboolean is_new = TRUE; gboolean has_remotes = FALSE; FS_RTP_SESSION_LOCK (session); if (!fs_rtp_session_negotiate_codecs_locked ( session, stream, remote_codecs, &has_remotes, &is_new, error)) { FS_RTP_SESSION_UNLOCK (session); return FALSE; } if (session->priv->rtp_tfrc) fs_rtp_tfrc_codecs_updated (session->priv->rtp_tfrc, session->priv->codec_associations, session->priv->hdrext_negotiated); fs_rtp_session_distribute_recv_codecs_locked (session, stream, remote_codecs); fs_rtp_session_verify_recv_codecs_locked (session); if (is_new) g_signal_emit_by_name (session->priv->conference->rtpbin, "clear-pt-map"); fs_rtp_session_start_codec_param_gathering_locked (session); if (has_remotes) { fs_rtp_session_verify_send_codec_bin_locked (session); } FS_RTP_SESSION_UNLOCK (session); if (is_new) { g_object_notify (G_OBJECT (session), "codecs"); g_object_notify (G_OBJECT (session), "codecs-without-config"); gst_element_post_message (GST_ELEMENT (session->priv->conference), gst_message_new_element (GST_OBJECT (session->priv->conference), gst_structure_new ("farstream-codecs-changed", "session", FS_TYPE_SESSION, session, NULL))); } return TRUE; } static gboolean _stream_new_remote_codecs (FsRtpStream *stream, GList *codecs, GError **error, gpointer user_data) { FsRtpSession *session = FS_RTP_SESSION_CAST (user_data); gboolean ret; if (fs_rtp_session_has_disposed_enter (session, error)) return FALSE; ret = fs_rtp_session_update_codecs (session, stream, codecs, error); fs_rtp_session_has_disposed_exit (session); return ret; } static void _substream_error (FsRtpSubStream *substream, gint errorno, gchar *error_msg, gchar *debug_msg, gpointer user_data) { FsSession *session = FS_SESSION (user_data); fs_session_emit_error (session, errorno, error_msg); } static void fs_rtp_session_update_minimum_rtcp_interval (FsRtpSession *self, FsRtpSubStream *skip_substream) { guint min_interval = 5000; GList *item, *item2; FS_RTP_SESSION_LOCK (self); if (self->priv->current_send_codec) min_interval = MIN (min_interval, self->priv->current_send_codec->minimum_reporting_interval); for (item = self->priv->free_substreams; item; item = item->next) { FsRtpSubStream *substream = item->data; if (substream == skip_substream) continue; if (substream->codec) min_interval = MIN (min_interval, substream->codec->minimum_reporting_interval); } for (item2 = self->priv->streams; item2; item2 = item2->next) { FsRtpStream *stream = item2->data; for (item = stream->substreams; item; item = item->next) { FsRtpSubStream *substream = item->data; if (substream == skip_substream) continue; if (substream->codec) min_interval = MIN (min_interval, substream->codec->minimum_reporting_interval); } } FS_RTP_SESSION_UNLOCK (self); g_object_set (self->priv->rtpbin_internal_session, "rtcp-min-interval", (guint64) min_interval * GST_MSECOND, NULL); } static void _substream_unlinked (FsRtpSubStream *substream, gpointer user_data) { FsRtpSession *self = FS_RTP_SESSION (user_data); if (fs_rtp_session_has_disposed_enter (self, NULL)) return; fs_rtp_session_update_minimum_rtcp_interval (self, substream); FS_RTP_SESSION_LOCK (self); if (g_list_find (self->priv->free_substreams, substream)) { self->priv->free_substreams = g_list_remove (self->priv->free_substreams, substream); FS_RTP_SESSION_UNLOCK (self); fs_rtp_sub_stream_stop (substream); g_object_unref (substream); } else { FS_RTP_SESSION_UNLOCK (self); } fs_rtp_session_has_disposed_exit (self); } static void _substream_codec_changed (FsRtpSubStream *substream, FsRtpSession *self) { if (fs_rtp_session_has_disposed_enter (self, NULL)) return; fs_rtp_session_update_minimum_rtcp_interval (self, NULL); fs_rtp_session_has_disposed_exit (self); } /** * fs_rtp_session_new_recv_pad: * @session: a #FsSession * @new_pad: the newly created pad * @ssrc: the ssrc for this new pad * @pt: the pt for this new pad * * This function is called by the #FsRtpConference when a new src pad appears. * It can will be called on the streaming thread. * * MT safe. */ void fs_rtp_session_new_recv_pad (FsRtpSession *session, GstPad *new_pad, guint32 ssrc, guint pt) { FsRtpSubStream *substream = NULL; FsRtpStream *stream = NULL; GError *error = NULL; gint no_rtcp_timeout; if (fs_rtp_session_has_disposed_enter (session, NULL)) return; FS_RTP_SESSION_LOCK (session); no_rtcp_timeout = session->priv->no_rtcp_timeout; FS_RTP_SESSION_UNLOCK (session); substream = fs_rtp_sub_stream_new (session->priv->conference, session, new_pad, ssrc, pt, no_rtcp_timeout, &error); if (substream == NULL) { g_prefix_error (&error, "Could not create a substream for the new pad: "); fs_session_emit_error (FS_SESSION (session), error ? error->code : FS_ERROR_CONSTRUCTION, error ? error->message : "No error details returned"); g_clear_error (&error); fs_rtp_session_has_disposed_exit (session); return; } g_signal_connect_object (substream, "get-codec-bin", G_CALLBACK (_substream_get_codec_bin), session, 0); g_signal_connect_object (substream, "unlinked", G_CALLBACK (_substream_unlinked), session, 0); g_signal_connect_object (substream, "codec-changed", G_CALLBACK (_substream_codec_changed), session, 0); /* Lets find the FsRtpStream for this substream, if no Stream claims it * then we just store it */ FS_RTP_SESSION_LOCK (session); stream = fs_rtp_session_get_stream_by_ssrc_locked (session, ssrc); if (stream) GST_DEBUG ("Already have a stream with SSRC %x, using it", ssrc); /* Add the substream directly if the no_rtcp_timeout is 0 and * there is only one stream */ if (!stream) { if (no_rtcp_timeout == 0 && g_list_length (session->priv->streams) == 1) { stream = g_object_ref (g_list_first (session->priv->streams)->data); GST_DEBUG ("No RTCP timeout and only one stream, giving it substream" " for SSRC %x in session %u", ssrc, session->id); } else { session->priv->free_substreams = g_list_prepend (session->priv->free_substreams, substream); g_signal_connect_object (substream, "error", G_CALLBACK (_substream_error), session, 0); if (no_rtcp_timeout > 0) { g_signal_connect_object (substream, "no-rtcp-timedout", G_CALLBACK (_substream_no_rtcp_timedout_cb), session, 0); GST_DEBUG ("No stream for SSRC %x, waiting for %d ms before associating" "in session %u", ssrc, no_rtcp_timeout, session->id); } else if (no_rtcp_timeout < 0) { GST_DEBUG ("No RTCP timeout is < 0, we will wait forever for an" " RTCP SDES to arrive for SSRC %x in session %u", ssrc, session->id); } else { GST_WARNING ("No RTCP timeout is 0, but there is more than one stream," " we will wait forever for an RTCP SDES to arrive for SSRC %u in" " session %u", ssrc, session->id); } } } if (stream) { if (!fs_rtp_stream_add_substream_unlock (stream, substream, &error)) { g_prefix_error (&error, "Could not add the output ghostpad to the new substream: "); fs_session_emit_error (FS_SESSION (session), error->code, error->message); } g_clear_error (&error); } else { fs_rtp_sub_stream_verify_codec_locked (substream); FS_RTP_SESSION_UNLOCK (session); } if (stream) g_object_unref (stream); fs_rtp_session_has_disposed_exit (session); } static gboolean validate_src_pads (const GValue *item, GValue *ret, gpointer user_data) { GstPad *pad = g_value_get_object (item); GList *codecs = user_data; GstCaps *caps; GList *listitem = NULL; gboolean retval = FALSE; caps = gst_pad_query_caps (pad, NULL); if (gst_caps_is_empty (caps)) { GST_WARNING_OBJECT (pad, "Caps on pad are empty"); goto error; } for (listitem = codecs; listitem; listitem = g_list_next (listitem)) { FsCodec *codec = listitem->data; GstCaps *tmpcaps = fs_codec_to_gst_caps (codec); if (gst_caps_can_intersect (tmpcaps, caps)) { GST_LOG_OBJECT (pad, "Pad matches " FS_CODEC_FORMAT, FS_CODEC_ARGS (codec)); retval = TRUE; } gst_caps_unref (tmpcaps); if (retval) break; } error: gst_caps_unref (caps); if (!retval) g_value_set_boolean (ret, FALSE); return retval; } static GstElement * _create_codec_bin (const CodecAssociation *ca, const FsCodec *codec, const gchar *name, FsStreamDirection direction, GList *codecs, guint current_builder_hash, guint *new_builder_hash, GError **error) { GstElement *codec_bin = NULL; const gchar *direction_str; gchar *profile = NULL; if (direction == FS_DIRECTION_SEND) { direction_str = "send"; profile = ca->send_profile; } else if (direction == FS_DIRECTION_RECV) { direction_str = "receive"; profile = ca->recv_profile; } else { g_assert_not_reached (); } if (profile) { GError *tmperror = NULL; guint src_pad_count = 0, sink_pad_count = 0; /* Return nothing if the builder hash is the same, it would just return * the same thing */ if (new_builder_hash) { *new_builder_hash = g_str_hash (profile); if (*new_builder_hash == current_builder_hash) { GST_DEBUG ("profile builder hash is the same for "FS_CODEC_FORMAT, FS_CODEC_ARGS (ca->codec)); return NULL; } GST_DEBUG ("profile builder hash is different (new: %u != old: %u)" " for " FS_CODEC_FORMAT, *new_builder_hash, current_builder_hash, FS_CODEC_ARGS (ca->codec)); } codec_bin = parse_bin_from_description_all_linked (profile, direction, &src_pad_count, &sink_pad_count, &tmperror); if (codec_bin) { if (sink_pad_count != 1 || src_pad_count == 0) { GST_ERROR ("Invalid pad count (src:%u sink:%u)" " from codec profile: %s", src_pad_count, sink_pad_count, profile); gst_object_unref (codec_bin); codec_bin = NULL; goto try_factory; } if (codecs && src_pad_count > 1) { GstIterator *iter; GValue valid = {0}; GstIteratorResult res; iter = gst_element_iterate_src_pads (codec_bin); g_value_init (&valid, G_TYPE_BOOLEAN); g_value_set_boolean (&valid, TRUE); res = gst_iterator_fold (iter, validate_src_pads, &valid, codecs); gst_iterator_free (iter); if (!g_value_get_boolean (&valid) || res == GST_ITERATOR_ERROR) { gst_object_unref (codec_bin); codec_bin = NULL; goto try_factory; } } GST_DEBUG ("creating %s codec bin for id %d, profile: %s", direction_str, codec->id, profile); gst_element_set_name (codec_bin, name); return codec_bin; } else if (!codec_blueprint_has_factory (ca->blueprint, direction)) { g_propagate_error (error, tmperror); return NULL; } } try_factory: if (new_builder_hash) { /* If its the same blueprint, it will be the same result, * so return NULL without an error. */ *new_builder_hash = g_direct_hash (ca->blueprint); if (ca->blueprint && current_builder_hash == *new_builder_hash) { GST_DEBUG ("blueprint builder hash is the same for "FS_CODEC_FORMAT, FS_CODEC_ARGS (ca->codec)); return NULL; } GST_DEBUG ("blueprint builder hash is different (new: %u != old: %u)" " for " FS_CODEC_FORMAT, *new_builder_hash, current_builder_hash, FS_CODEC_ARGS (ca->codec)); } if (!ca->blueprint) { g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Codec Association has neither blueprint nor profile"); return NULL; } return create_codec_bin_from_blueprint (codec, ca->blueprint, name, direction, error); } /** * fs_rtp_session_get_recv_codec_locked: * @session: a #FsRtpSession * @pt: The payload type to find the codec for * @stream: an optional #FsRtpStream for which this data is received * @recv_codec: The codec one wants to receive one * * This function returns the #CodecAssociation that will be used to receive * data on a specific payload type, optionally from a specific stream. * * MUST be called with the FsRtpSession lock held * * Returns: a #CodecAssociation, the caller doesn't own it */ static CodecAssociation * fs_rtp_session_get_recv_codec_locked (FsRtpSession *session, guint pt, FsRtpStream *stream, FsCodec **recv_codec, GError **error) { FsCodec *recv_codec_tmp = NULL; CodecAssociation *ca = NULL; GList *item = NULL; if (!session->priv->codec_associations) { g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "No codecs yet"); return NULL; } ca = lookup_codec_association_by_pt (session->priv->codec_associations, pt); if (!ca) { g_set_error (error, FS_ERROR, FS_ERROR_UNKNOWN_CODEC, "There is no negotiated codec with pt %d", pt); return NULL; } if (stream) { for (item = stream->negotiated_codecs; item; item = g_list_next (item)) { recv_codec_tmp = item->data; if (recv_codec_tmp->id == pt) break; } if (item) { GST_DEBUG ("Receiving on stream codec " FS_CODEC_FORMAT, FS_CODEC_ARGS (recv_codec_tmp)); } else { GST_DEBUG ("Have stream, but it does not have negotiatied codec"); recv_codec_tmp = NULL; } } if (recv_codec_tmp) { *recv_codec = fs_codec_copy (recv_codec_tmp); } else { *recv_codec = codec_copy_filtered (ca->codec, FS_PARAM_TYPE_CONFIG); GST_DEBUG ("Receiving on session codec " FS_CODEC_FORMAT, FS_CODEC_ARGS (ca->codec)); } return ca; } /** * fs_rtp_session_select_send_codec_locked: * @session: the #FsRtpSession * * This function selects the codec to send using either the user preference * or the remote preference (from the negotiation). * * You MUST own the FsRtpSession mutex to call this function * * Returns: a #CodecAssociation, the caller doesn't own it */ static CodecAssociation * fs_rtp_session_select_send_codec_locked (FsRtpSession *session, GError **error) { CodecAssociation *ca = NULL; GList *ca_e = NULL; if (!session->priv->codec_associations) { g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Tried to call fs_rtp_session_select_send_codec_bin before the codec" " negotiation has taken place"); return NULL; } if (session->priv->requested_send_codec) { ca = lookup_codec_association_by_codec_for_sending ( session->priv->codec_associations, session->priv->requested_send_codec); if (ca) return ca; /* The requested send codec no longer exists */ fs_codec_destroy (session->priv->requested_send_codec); session->priv->requested_send_codec = NULL; GST_WARNING_OBJECT (session->priv->conference, "The current requested codec no longer exists, resetting"); } /* * We don't have a requested codec, or it was not valid, lets use the first * codec from the list */ for (ca_e = g_list_first (session->priv->codec_associations); ca_e; ca_e = g_list_next (ca_e)) { if (codec_association_is_valid_for_sending (ca_e->data, TRUE)) { ca = ca_e->data; break; } } if (ca == NULL) g_set_error (error, FS_ERROR, FS_ERROR_NEGOTIATION_FAILED, "Could not get a valid send codec"); return ca; } struct link_data { FsRtpSession *session; GstCaps *caps; FsCodec *codec; GList *all_codecs; GList *other_codecs; GError **error; }; /* * This is a GstIteratorFoldFunction * It returns FALSE when it wants to stop the iteration */ static gboolean link_main_pad (const GValue *item, GValue *ret, gpointer user_data) { GstPad *pad = g_value_get_object (item); struct link_data *data = user_data; GstCaps *caps; GstPad *other_pad; caps = gst_pad_query_caps (pad, data->caps); if (!gst_caps_can_intersect (caps, data->caps)) { gst_caps_unref (caps); return TRUE; } gst_caps_unref (caps); other_pad = gst_element_get_static_pad (data->session->priv->send_capsfilter, "sink"); if (!other_pad) { g_set_error (data->error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get the sink pad of the send capsfilter"); goto error; } if (GST_PAD_LINK_SUCCESSFUL(gst_pad_link (pad, other_pad))) g_value_set_boolean (ret, TRUE); else g_set_error (data->error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the send codec bin for pt %d to the send capsfilter", data->codec->id); error: gst_object_unref (other_pad); return FALSE; } /* * This is a GstIteratorFoldFunction * It returns FALSE when it wants to stop the iteration */ static gboolean link_other_pads (const GValue *item, GValue *ret, gpointer user_data) { GstPad *pad = g_value_get_object (item); struct link_data *data = user_data; GstCaps *caps; GstCaps *filter_caps = NULL; GList *listitem; GstElement *capsfilter; GstPad *otherpad; if (gst_pad_is_linked (pad)) { return TRUE; } caps = gst_pad_query_caps (pad, NULL); if (gst_caps_is_empty (caps)) { GST_WARNING_OBJECT (pad, "Caps on pad are empty"); return TRUE; } for (listitem = data->all_codecs; listitem; listitem = g_list_next (listitem)) { FsCodec *codec = listitem->data; filter_caps = fs_codec_to_gst_caps (codec); if (gst_caps_can_intersect (filter_caps, caps)) { GST_LOG_OBJECT (pad, "Pad matches " FS_CODEC_FORMAT, FS_CODEC_ARGS (codec)); break; } gst_caps_unref (filter_caps); } gst_caps_unref (caps); if (!listitem) { g_set_error (data->error, FS_ERROR, FS_ERROR_INTERNAL, "Could not find codec that matches the src pad"); g_value_set_boolean (ret, FALSE); return FALSE; } capsfilter = gst_element_factory_make ("capsfilter", NULL); g_object_set (capsfilter, "caps", filter_caps, NULL); if (!gst_bin_add (GST_BIN (data->session->priv->conference), capsfilter)) { g_set_error (data->error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add send capsfilter to the conference"); gst_object_unref (capsfilter); goto error; } data->session->priv->extra_send_capsfilters = g_list_append (data->session->priv->extra_send_capsfilters, capsfilter); otherpad = gst_element_get_static_pad (capsfilter, "sink"); if (!otherpad) { g_set_error (data->error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get sink pad on capsfilter"); goto error; } if (GST_PAD_LINK_FAILED (gst_pad_link (pad, otherpad))) { g_set_error (data->error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get sink pad on capsfilter"); gst_object_unref (otherpad); goto error; } gst_object_unref (otherpad); if (!gst_element_link_pads (capsfilter, NULL, data->session->priv->rtpmuxer, "sink_%u")) { g_set_error (data->error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not an extra capsfilter to the muxer"); goto error; } if (!gst_element_sync_state_with_parent (capsfilter)) { g_set_error (data->error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the extra send capsfilter" " with the state of the conference"); goto error; } data->other_codecs = g_list_append (data->other_codecs, filter_caps); return TRUE; error: g_value_set_boolean (ret, FALSE); gst_bin_remove (GST_BIN (data->session->priv->conference), capsfilter); data->session->priv->extra_send_capsfilters = g_list_remove (data->session->priv->extra_send_capsfilters, capsfilter); gst_caps_unref (filter_caps); return FALSE; } static void special_source_stopped (FsRtpSpecialSource *source, gpointer data) { FsRtpSession *self = FS_RTP_SESSION (data); if (fs_rtp_session_has_disposed_enter (self, NULL)) return; fs_rtp_special_sources_remove_finish (&self->priv->extra_sources, FS_RTP_SESSION_GET_LOCK (self), source); fs_rtp_session_has_disposed_exit (self); } /* * @codec: The currently selected codec for sending (but not the send_codec) */ static gboolean fs_rtp_session_remove_send_codec_bin (FsRtpSession *self, FsCodec *codec, GstElement *send_codecbin, gboolean error_emit) { FS_RTP_SESSION_LOCK (self); if (self->priv->send_codecbin || send_codecbin) { GstElement *codecbin = self->priv->send_codecbin; self->priv->send_codecbin = NULL; FS_RTP_SESSION_UNLOCK (self); if (!codecbin) codecbin = send_codecbin; gst_element_set_locked_state (codecbin, TRUE); if (gst_element_set_state (codecbin, GST_STATE_NULL) != GST_STATE_CHANGE_SUCCESS) { gst_element_set_locked_state (codecbin, FALSE); GST_ERROR ("Could not stop the codec bin, setting it to NULL did not" " succeed"); if (error_emit) fs_session_emit_error (FS_SESSION (self), FS_ERROR_INTERNAL, "Setting the codec bin to NULL did not succeed"); return FALSE; } gst_bin_remove (GST_BIN (self->priv->conference), codecbin); FS_RTP_SESSION_LOCK (self); } fs_codec_destroy (self->priv->current_send_codec); self->priv->current_send_codec = NULL; FS_RTP_SESSION_UNLOCK (self); while (self->priv->extra_send_capsfilters) { GstElement *cf = self->priv->extra_send_capsfilters->data; GstPad *ourpad = gst_element_get_static_pad (cf, "src"); GstPad *pad = NULL; if (ourpad) { pad = gst_pad_get_peer (ourpad); if (pad) { gst_pad_set_active (pad, FALSE); gst_element_release_request_pad (self->priv->rtpmuxer, pad); gst_object_unref (pad); } gst_object_unref (ourpad); } gst_element_set_locked_state (cf, TRUE); gst_element_set_state (cf, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->conference), cf); self->priv->extra_send_capsfilters = g_list_delete_link ( self->priv->extra_send_capsfilters, self->priv->extra_send_capsfilters); } if (codec) fs_rtp_special_sources_remove ( &self->priv->extra_sources, &self->priv->codec_associations, FS_RTP_SESSION_GET_LOCK (self), codec, special_source_stopped, self); return TRUE; } /** * fs_rtp_session_add_send_codec_bin_unlock: * @session: a #FsRtpSession * @ca: the #CodecAssociation to use * * This function creates, adds and links a codec bin for the current send remote * codec * * Needs the Session lock to be held. and releases it * * Returns: The new codec bin (or NULL if there is an error) */ static GstElement * fs_rtp_session_add_send_codec_bin_unlock (FsRtpSession *session, const CodecAssociation *ca, GList **other_codecs, GError **error) { GstElement *codecbin = NULL; gchar *name; GstCaps *sendcaps; GList *codecs; GstIterator *iter; GValue link_rv = {0}; struct link_data data; FsCodec *send_codec_copy = fs_codec_copy (ca->send_codec); FsCodec *codec_copy = fs_codec_copy (ca->codec); GST_DEBUG ("Trying to add send codecbin for " FS_CODEC_FORMAT, FS_CODEC_ARGS (ca->send_codec)); name = g_strdup_printf ("send_%u_%u", session->id, ca->send_codec->id); codecs = codec_associations_to_send_codecs ( session->priv->codec_associations); codecbin = _create_codec_bin (ca, ca->send_codec, name, FS_DIRECTION_SEND, codecs, 0, NULL, error); g_free (name); sendcaps = fs_codec_to_gst_caps (ca->send_codec); if (session->priv->rtp_tfrc && fs_rtp_tfrc_is_enabled (session->priv->rtp_tfrc, ca->codec->id)) { guint bitrate; g_object_get (session->priv->rtp_tfrc, "bitrate", &bitrate, NULL); session->priv->send_bitrate = bitrate; } if (codecbin) codecbin_set_bitrate (codecbin, session->priv->send_bitrate); FS_RTP_SESSION_UNLOCK (session); if (!codecbin) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create codec bin for : " FS_CODEC_FORMAT, FS_CODEC_ARGS (send_codec_copy)); fs_codec_destroy (send_codec_copy); fs_codec_destroy (codec_copy); fs_codec_list_destroy (codecs); return NULL; } gst_element_set_locked_state (codecbin, TRUE); if (!gst_bin_add (GST_BIN (session->priv->conference), codecbin)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the send codec bin for: " FS_CODEC_FORMAT, FS_CODEC_ARGS (send_codec_copy)); gst_object_unref (codecbin); fs_codec_list_destroy (codecs); fs_codec_destroy (send_codec_copy); fs_codec_destroy (codec_copy); gst_caps_unref (sendcaps); return NULL; } fs_rtp_keyunit_manager_codecbin_changed (session->priv->keyunit_manager, codecbin, send_codec_copy); if (!gst_element_link_pads (session->priv->media_sink_valve, "src", codecbin, "sink")) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the send codec bin sink pad"); gst_bin_remove (GST_BIN (session->priv->conference), (codecbin)); fs_codec_list_destroy (codecs); gst_caps_unref (sendcaps); fs_codec_destroy (codec_copy); fs_codec_destroy (send_codec_copy); return NULL; } g_object_set (G_OBJECT (session->priv->send_capsfilter), "caps", sendcaps, NULL); iter = gst_element_iterate_src_pads (codecbin); g_value_init (&link_rv, G_TYPE_BOOLEAN); g_value_set_boolean (&link_rv, FALSE); data.session = session; data.caps = sendcaps; data.all_codecs = codecs; data.error = error; data.other_codecs = NULL; data.codec = send_codec_copy; if (gst_iterator_fold (iter, link_main_pad, &link_rv, &data) == GST_ITERATOR_ERROR) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not iterate over the src pads of the send codec bin to link" " the main pad for: " FS_CODEC_FORMAT, FS_CODEC_ARGS (send_codec_copy)); gst_iterator_free (iter); goto error; } gst_caps_unref (sendcaps); if (!g_value_get_boolean (&link_rv)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link codec bin's main pads for : " FS_CODEC_FORMAT, FS_CODEC_ARGS (send_codec_copy)); gst_iterator_free (iter); goto error; } gst_iterator_resync (iter); if (gst_iterator_fold (iter, link_other_pads, &link_rv, &data) == GST_ITERATOR_ERROR) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not iterate over the src pads of the send codec bin to link" " the main pad for: " FS_CODEC_FORMAT, FS_CODEC_ARGS (send_codec_copy)); gst_iterator_free (iter); goto error; } gst_iterator_free (iter); if (!g_value_get_boolean (&link_rv)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link codec bin's other pads for : " FS_CODEC_FORMAT, FS_CODEC_ARGS (send_codec_copy)); goto error; } gst_element_set_locked_state (codecbin, FALSE); if (!gst_element_sync_state_with_parent (codecbin)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the codec bin with parent for pt: " FS_CODEC_FORMAT, FS_CODEC_ARGS (send_codec_copy)); goto error; } FS_RTP_SESSION_LOCK (session); /* Re-set it here in case in changed while we were unlocked */ codecbin_set_bitrate (codecbin, session->priv->send_bitrate); if (session->priv->streams_sending && g_hash_table_size (session->priv->transmitters)) g_object_set (session->priv->media_sink_valve, "drop", FALSE, NULL); while (data.other_codecs) { FsCodec *other_send_codec = data.other_codecs->data; CodecAssociation *ca; data.other_codecs = g_list_remove (data.other_codecs, other_send_codec); ca = lookup_codec_association_by_pt (session->priv->codec_associations, other_send_codec->id); if (ca) *other_codecs = g_list_append (*other_codecs, fs_codec_copy (ca->codec)); } session->priv->send_codecbin = codecbin; session->priv->current_send_codec = codec_copy; FS_RTP_SESSION_UNLOCK (session); fs_codec_list_destroy (codecs); fs_codec_destroy (send_codec_copy); return codecbin; error: g_list_free (data.other_codecs); fs_rtp_session_remove_send_codec_bin (session, NULL, codecbin, FALSE); fs_codec_list_destroy (codecs); fs_codec_destroy (codec_copy); fs_codec_destroy (send_codec_copy); return NULL; } /** * _send_src_pad_blocked_callback: * * This is the callback for the pad blocking on the media src pad * It is used to replace the codec bin when the send codec has been changed. */ static GstPadProbeReturn _send_src_pad_blocked_callback (GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { FsRtpSession *self = FS_RTP_SESSION (user_data); CodecAssociation *ca = NULL; FsCodec *send_codec_copy = NULL; FsCodec *codec_copy = NULL; GError *error = NULL; gboolean changed = FALSE; GList *other_codecs = NULL; if (fs_rtp_session_has_disposed_enter (self, NULL)) { FS_RTP_SESSION_LOCK (self); self->priv->send_pad_block_id = 0; FS_RTP_SESSION_UNLOCK (self); return GST_PAD_PROBE_REMOVE; } FS_RTP_SESSION_LOCK (self); self->priv->send_pad_block_id = 0; ca = fs_rtp_session_select_send_codec_locked (self, &error); if (!ca) { g_prefix_error (&error, "Could not select a new send codec: "); fs_session_emit_error (FS_SESSION (self), error->code, error->message); goto done_locked; } g_clear_error (&error); send_codec_copy = fs_codec_copy (ca->send_codec); if (fs_codec_are_equal (ca->codec, self->priv->current_send_codec)) { codec_copy = fs_codec_copy (ca->codec); FS_RTP_SESSION_UNLOCK (self); /* If the main codec has not changed, the special codecs could still * have changed, so lets try to see if it is necessary to do something * about it. */ changed |= fs_rtp_special_sources_remove ( &self->priv->extra_sources, &self->priv->codec_associations, FS_RTP_SESSION_GET_LOCK (self), codec_copy, special_source_stopped, self); goto skip_main_codec; } FS_RTP_SESSION_UNLOCK (self); g_object_set (self->priv->media_sink_valve, "drop", TRUE, NULL); if (!fs_rtp_session_remove_send_codec_bin (self, send_codec_copy, NULL, TRUE)) goto done; FS_RTP_SESSION_LOCK (self); /* We have to re-fetch the ca because we lifted the lock */ fs_codec_destroy (send_codec_copy); send_codec_copy = NULL; ca = fs_rtp_session_select_send_codec_locked (self, &error); if (!ca) { g_prefix_error (&error, "Could not select a new send codec: "); fs_session_emit_error (FS_SESSION (self), error->code, error->message); goto done_locked; } g_clear_error (&error); send_codec_copy = fs_codec_copy (ca->send_codec); codec_copy = fs_codec_copy (ca->codec); if (!fs_rtp_session_add_send_codec_bin_unlock (self, ca, &other_codecs, &error)) { g_prefix_error (&error, "Could not build a new send codec bin: "); fs_session_emit_error (FS_SESSION (self), error->code, error->message); } changed = TRUE; skip_main_codec: changed |= fs_rtp_special_sources_create ( &self->priv->extra_sources, &self->priv->codec_associations, FS_RTP_SESSION_GET_LOCK (self), codec_copy, GST_ELEMENT (self->priv->conference), self->priv->rtpmuxer); if (changed && !error) { GList *secondary_codecs; FS_RTP_SESSION_LOCK (self); secondary_codecs = fs_rtp_special_sources_get_codecs_locked ( self->priv->extra_sources, self->priv->codec_associations, codec_copy); FS_RTP_SESSION_UNLOCK (self); secondary_codecs = g_list_concat (secondary_codecs, other_codecs); g_object_notify (G_OBJECT (self), "current-send-codec"); gst_element_post_message (GST_ELEMENT (self->priv->conference), gst_message_new_element (GST_OBJECT (self->priv->conference), gst_structure_new ("farstream-send-codec-changed", "session", FS_TYPE_SESSION, self, "codec", FS_TYPE_CODEC, codec_copy, "secondary-codecs", FS_TYPE_CODEC_LIST, secondary_codecs, NULL))); fs_codec_list_destroy (secondary_codecs); fs_rtp_session_try_sending_dtmf_event (self); } done: g_clear_error (&error); fs_codec_destroy (send_codec_copy); fs_codec_destroy (codec_copy); /* If we have a codec bin, the required/preferred caps may have changed, * in this case, we need to drop the current buffer and wait for a buffer * with the right caps to come in. Only then can we drop the pad block */ fs_rtp_session_has_disposed_exit (self); return GST_PAD_PROBE_REMOVE; done_locked: FS_RTP_SESSION_UNLOCK (self); goto done; } /** * fs_rtp_session_verify_send_codec_bin_locked: * * Verify that the current send codec is still valid and if it is not * do whats required to have the right one be used. * * Does not care about locks * */ static void fs_rtp_session_verify_send_codec_bin_locked (FsRtpSession *self) { if (self->priv->send_pad_block_id == 0) self->priv->send_pad_block_id = gst_pad_add_probe (self->priv->send_tee_media_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, _send_src_pad_blocked_callback, g_object_ref (self), g_object_unref); } /* * This callback is called when the pad of a substream has been locked because * the codec needs to be changed. * * It will return a new codecbin if it needs changing. If there is an error, * the GError * will be set. */ static GstElement * _substream_get_codec_bin (FsRtpSubStream *substream, FsRtpStream *stream, FsCodec **new_codec, guint current_builder_hash, guint *new_builder_hash, GError **error, FsRtpSession *session) { GstElement *codecbin = NULL; gchar *name; CodecAssociation *ca = NULL; if (fs_rtp_session_has_disposed_enter (session, NULL)) return NULL; FS_RTP_SESSION_LOCK (session); ca = fs_rtp_session_get_recv_codec_locked (session, substream->pt, stream, new_codec, error); if (!ca) goto out; name = g_strdup_printf ("recv_%u_%u_%u", session->id, substream->ssrc, substream->pt); codecbin = _create_codec_bin (ca, *new_codec, name, FS_DIRECTION_RECV, NULL, current_builder_hash, new_builder_hash, error); g_free (name); out: fs_rtp_session_has_disposed_exit (session); FS_RTP_SESSION_UNLOCK (session); return codecbin; } static void fs_rtp_session_associate_free_substreams (FsRtpSession *session, FsRtpStream *stream, guint32 ssrc) { gboolean added = FALSE; FS_RTP_SESSION_LOCK (session); for (;;) { FsRtpSubStream *substream = NULL; GList *item = NULL; GError *error = NULL; for (item = g_list_first (session->priv->free_substreams); item; item = g_list_next (item)) { FsRtpSubStream *localsubstream = item->data; GST_LOG ("Have substream with ssrc %x, looking for %x", localsubstream->ssrc, ssrc); if (ssrc == localsubstream->ssrc) { substream = localsubstream; session->priv->free_substreams = g_list_delete_link ( session->priv->free_substreams, item); break; } } if (!substream) break; added = TRUE; while ( g_signal_handlers_disconnect_by_func (substream, "error", session) > 0); while ( g_signal_handlers_disconnect_by_func (substream, "no-rtcp-timedout", session) > 0); if (fs_rtp_stream_add_substream_unlock (stream, substream, &error)) { GST_DEBUG ("Associated SSRC %x in session %u", ssrc, session->id); } else { GST_ERROR ("Could not associate a substream with its stream : %s", error->message); g_prefix_error (&error, "Could not associate a substream with its stream: "); fs_session_emit_error (FS_SESSION (session), error->code, error->message); } g_clear_error (&error); FS_RTP_SESSION_LOCK (session); } FS_RTP_SESSION_UNLOCK (session); if (added == FALSE) GST_DEBUG ("No free substream with SSRC %x in session %u", ssrc, session->id); } void fs_rtp_session_associate_ssrc_cname (FsRtpSession *session, guint32 ssrc, const gchar *cname) { FsRtpStream *stream = NULL; GList *item = NULL; if (fs_rtp_session_has_disposed_enter (session, NULL)) return; FS_RTP_SESSION_LOCK (session); if (!session->priv->free_substreams) { FS_RTP_SESSION_UNLOCK (session); fs_rtp_session_has_disposed_exit (session); return; } for (item = g_list_first (session->priv->streams); item; item = g_list_next (item)) { FsRtpStream *localstream = item->data; gchar *localcname = NULL; g_object_get (localstream->participant, "cname", &localcname, NULL); if (localcname && !strcmp (localcname, cname)) { stream = localstream; g_free (localcname); break; } g_free (localcname); } if (!stream) { GST_LOG ("There is no participant with cname %s, but" " we have streams of unknown origin", cname); FS_RTP_SESSION_UNLOCK (session); fs_rtp_session_has_disposed_exit (session); return; } fs_rtp_session_add_ssrc_stream_locked (session, ssrc, stream); g_object_ref (stream); FS_RTP_SESSION_UNLOCK (session); fs_rtp_session_associate_free_substreams (session, stream, ssrc); g_object_unref (stream); fs_rtp_session_has_disposed_exit (session); } static void _substream_no_rtcp_timedout_cb (FsRtpSubStream *substream, FsRtpSession *session) { GError *error = NULL; FsRtpStream *first_stream = NULL; if (fs_rtp_session_has_disposed_enter (session, NULL)) return; FS_RTP_SESSION_LOCK (session); if (g_list_length (session->priv->streams) != 1) { GST_WARNING ("The substream for SSRC %x and pt %u did not receive RTCP" " for %d milliseconds, but we have more than one stream so we can" " not associate it.", substream->ssrc, substream->pt, substream->no_rtcp_timeout); FS_RTP_SESSION_UNLOCK (session); fs_rtp_session_has_disposed_exit (session); return; } if (!g_list_find (session->priv->free_substreams, substream)) { GST_WARNING ("Could not find substream %p in the list of free substreams", substream); FS_RTP_SESSION_UNLOCK (session); fs_rtp_session_has_disposed_exit (session); return; } session->priv->free_substreams = g_list_remove (session->priv->free_substreams, substream); while ( g_signal_handlers_disconnect_by_func (substream, "error", session) > 0); while ( g_signal_handlers_disconnect_by_func (substream, "no-rtcp-timedout", session) > 0); first_stream = g_list_first (session->priv->streams)->data; g_object_ref (first_stream); if (!fs_rtp_stream_add_substream_unlock (first_stream, substream, &error)) { g_prefix_error (&error, "Could not link the substream to a stream: "); fs_session_emit_error (FS_SESSION (session), error ? error->code : FS_ERROR_INTERNAL, error ? error->message : "No error message"); } g_clear_error (&error); g_object_unref (first_stream); fs_rtp_session_has_disposed_exit (session); } /** * fs_rtp_session_bye_ssrc: * @session: a #FsRtpSession * @ssrc: The ssrc * * This function is called when a RTCP BYE is received */ void fs_rtp_session_bye_ssrc (FsRtpSession *session, guint32 ssrc) { if (fs_rtp_session_has_disposed_enter (session, NULL)) return; /* First remove it from the known SSRCs */ FS_RTP_SESSION_LOCK (session); if (!g_hash_table_lookup (session->priv->ssrc_streams_manual, GUINT_TO_POINTER (ssrc))) g_hash_table_remove (session->priv->ssrc_streams, GUINT_TO_POINTER (ssrc)); FS_RTP_SESSION_UNLOCK (session); /* * TODO: * * Remove running substreams with that SSRC .. lets also check if they * come from the right ip/port/etc ?? */ fs_rtp_session_has_disposed_exit (session); } static gboolean gather_caps_parameters (CodecAssociation *ca, GstCaps *caps) { GstStructure *s = NULL; int i; gboolean new_config = FALSE; s = gst_caps_get_structure (caps, 0); for (i = 0; i < gst_structure_n_fields (s); i++) { const gchar *name = gst_structure_nth_field_name (s, i); if (name) { const gchar *value = gst_structure_get_string (s, name); if (value) { if (codec_has_config_data_named (ca->codec, name)) { GList *item = NULL; for (item = ca->codec->optional_params; item; item = g_list_next (item)) { FsCodecParameter *param = item->data; if (!g_ascii_strcasecmp (param->name, name)) { if (!g_ascii_strcasecmp (param->value, value)) break; GST_DEBUG ("%d/%s: replacing param %s=%s with %s", ca->codec->id, ca->codec->encoding_name, name, param->value, value); /* replace the value if its different */ fs_codec_remove_optional_parameter (ca->codec, param); fs_codec_add_optional_parameter (ca->codec, name, value); new_config = TRUE; break; } } /* Add it if it wasn't there */ if (item == NULL) { GST_DEBUG ("%d/%s: adding param %s=%s", ca->codec->id, ca->codec->encoding_name, name, value); fs_codec_add_optional_parameter (ca->codec, name, value); new_config = TRUE; } } } } } ca->need_config = FALSE; return new_config; } static void _send_caps_changed (GstPad *pad, GParamSpec *pspec, FsRtpSession *session) { GstCaps *caps = NULL; CodecAssociation *ca = NULL; g_object_get (pad, "caps", &caps, NULL); if (!caps) return; g_return_if_fail (GST_CAPS_IS_SIMPLE(caps)); if (fs_rtp_session_has_disposed_enter (session, NULL)) { gst_caps_unref (caps); return; } FS_RTP_SESSION_LOCK (session); if (!session->priv->current_send_codec) goto out; ca = lookup_codec_association_by_codec (session->priv->codec_associations, session->priv->current_send_codec); if (!ca) goto out; /* * Emit farstream-codecs-changed if the sending thread finds the config * for the last codec that needed it */ if (gather_caps_parameters (ca, caps)) { GList *item = NULL; for (item = g_list_first (session->priv->codec_associations); item; item = g_list_next (item)) { ca = item->data; if (ca->need_config) break; } if (!item) { FS_RTP_SESSION_UNLOCK (session); g_object_notify (G_OBJECT (session), "codecs"); gst_element_post_message (GST_ELEMENT (session->priv->conference), gst_message_new_element (GST_OBJECT (session->priv->conference), gst_structure_new ("farstream-codecs-changed", "session", FS_TYPE_SESSION, session, NULL))); goto out_unlocked; } } out: FS_RTP_SESSION_UNLOCK (session); out_unlocked: gst_caps_unref (caps); fs_rtp_session_has_disposed_exit (session); } static void _discovery_caps_changed (GstPad *pad, GParamSpec *pspec, FsRtpSession *session) { CodecAssociation *ca = NULL; GstCaps *caps = NULL; gboolean block = TRUE; g_object_get (pad, "caps", &caps, NULL); if (!caps) return; g_return_if_fail (GST_CAPS_IS_SIMPLE(caps)); if (fs_rtp_session_has_disposed_enter (session, NULL)) { gst_caps_unref (caps); return; } FS_RTP_SESSION_LOCK (session); /* If there is no codec, its because we're shutting down */ if (!session->priv->discovery_codec) { GST_DEBUG ("Got caps while discovery is stopping"); goto out; } ca = lookup_codec_association_by_codec_for_sending ( session->priv->codec_associations, session->priv->discovery_codec); if (ca && ca->need_config) { gather_caps_parameters (ca, caps); fs_codec_destroy (session->priv->discovery_codec); session->priv->discovery_codec = fs_codec_copy (ca->codec); block = !ca->need_config; } out: gst_caps_unref (caps); if (block && session->priv->discovery_pad_block_id == 0) session->priv->discovery_pad_block_id = gst_pad_add_probe (session->priv->send_tee_discovery_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, _discovery_pad_blocked_callback, g_object_ref (session), g_object_unref); FS_RTP_SESSION_UNLOCK (session); fs_rtp_session_has_disposed_exit (session); } /** * fs_rtp_session_get_codec_params_unlock: * @session: a #FsRtpSession * @ca: the #CodecAssociaton to get params for * * Gets the parameters for the specified #CodecAssociation * * Returns: %TRUE on success, %FALSE on error */ static gboolean fs_rtp_session_get_codec_params_unlock (FsRtpSession *session, CodecAssociation *ca, GError **error) { GstPad *pad = NULL; gchar *tmp; GstCaps *caps; FsCodec *discovery_codec = fs_codec_copy (ca->codec); FsCodec *send_codec = fs_codec_copy (ca->send_codec); GstElement *codecbin = NULL; GST_LOG ("Gathering params for codec " FS_CODEC_FORMAT, FS_CODEC_ARGS (ca->send_codec)); fs_codec_destroy (session->priv->discovery_codec); session->priv->discovery_codec = NULL; tmp = g_strdup_printf ("discoverAA_%u_%u", session->id, ca->send_codec->id); codecbin = _create_codec_bin (ca, ca->send_codec, tmp, FS_DIRECTION_SEND, NULL, 0, NULL, error); g_free (tmp); FS_RTP_SESSION_UNLOCK (session); /* Invalidate CA because we've just unlocked */ ca = NULL; if (session->priv->discovery_codecbin) { gst_element_set_locked_state (session->priv->discovery_codecbin, TRUE); gst_element_set_state (session->priv->discovery_codecbin, GST_STATE_NULL); gst_bin_remove (GST_BIN (session->priv->conference), session->priv->discovery_codecbin); session->priv->discovery_codecbin = NULL; } /* They must both exist or neither exists, anything else is wrong */ if ((session->priv->discovery_fakesink == NULL || session->priv->discovery_capsfilter == NULL) && session->priv->discovery_fakesink != session->priv->discovery_capsfilter) { g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Capsfilter and fakesink not synchronized, fakesink:%p capsfilter:%p", session->priv->discovery_fakesink, session->priv->discovery_capsfilter); goto error; } if (session->priv->discovery_fakesink == NULL && session->priv->discovery_capsfilter == NULL) { tmp = g_strdup_printf ("discovery_fakesink_%u", session->id); session->priv->discovery_fakesink = gst_element_factory_make ("fakesink", tmp); g_free (tmp); if (!session->priv->discovery_fakesink) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make fakesink element"); goto error; } g_object_set (session->priv->discovery_fakesink, "sync", FALSE, "async", FALSE, NULL); if (!gst_bin_add (GST_BIN (session->priv->conference), session->priv->discovery_fakesink)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the discovery fakesink to the bin"); goto error; } if (!gst_element_sync_state_with_parent (session->priv->discovery_fakesink)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the discovery fakesink's state with its parent"); goto error; } tmp = g_strdup_printf ("discovery_capsfilter_%u", session->id); session->priv->discovery_capsfilter = gst_element_factory_make ("capsfilter", tmp); g_free (tmp); if (!session->priv->discovery_capsfilter) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make capsfilter element"); goto error; } if (!gst_bin_add (GST_BIN (session->priv->conference), session->priv->discovery_capsfilter)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the discovery capsfilter to the bin"); goto error; } if (!gst_element_sync_state_with_parent ( session->priv->discovery_capsfilter)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the discovery capsfilter's state with its parent"); goto error; } if (!gst_element_link_pads (session->priv->discovery_capsfilter, "src", session->priv->discovery_fakesink, "sink")) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link discovery capsfilter and fakesink"); goto error; } pad = gst_element_get_static_pad (session->priv->discovery_capsfilter, "src"); g_signal_connect_object (pad, "notify::caps", G_CALLBACK (_discovery_caps_changed), session, 0); gst_object_unref (pad); } if (!codecbin) goto error; session->priv->discovery_codecbin = codecbin; codecbin = NULL; if (!gst_bin_add (GST_BIN (session->priv->conference), session->priv->discovery_codecbin)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the discovery codecbin to the bin"); goto error; } if (!gst_element_sync_state_with_parent (session->priv->discovery_codecbin)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the discovery codecbin's state with its parent"); goto error; } caps = fs_codec_to_gst_caps (send_codec); g_object_set (session->priv->discovery_capsfilter, "caps", caps, NULL); gst_caps_unref (caps); if (!gst_element_link_pads (session->priv->discovery_codecbin, "src", session->priv->discovery_capsfilter, "sink")) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link discovery codecbin and capsfilter"); goto error; } if (!gst_element_link (session->priv->discovery_valve, session->priv->discovery_codecbin)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the valve and the discovery codecbin"); gst_object_unref (pad); goto error; } g_object_set (session->priv->discovery_valve, "drop", FALSE, NULL); fs_codec_destroy (send_codec); session->priv->discovery_codec = discovery_codec; return TRUE; error: g_object_set (session->priv->discovery_valve, "drop", TRUE, NULL); fs_codec_destroy (send_codec); fs_codec_destroy (discovery_codec); if (codecbin) gst_object_unref (codecbin); if (session->priv->discovery_fakesink) { gst_element_set_locked_state (session->priv->discovery_fakesink, TRUE); gst_element_set_state (session->priv->discovery_fakesink, GST_STATE_NULL); gst_bin_remove (GST_BIN (session->priv->conference), session->priv->discovery_fakesink); session->priv->discovery_fakesink = NULL; } if (session->priv->discovery_capsfilter) { gst_element_set_locked_state (session->priv->discovery_capsfilter, TRUE); gst_element_set_state (session->priv->discovery_capsfilter, GST_STATE_NULL); gst_bin_remove (GST_BIN (session->priv->conference), session->priv->discovery_capsfilter); session->priv->discovery_capsfilter = NULL; } if (session->priv->discovery_codecbin) { gst_element_set_locked_state (session->priv->discovery_codecbin, TRUE); gst_element_set_state (session->priv->discovery_codecbin, GST_STATE_NULL); gst_bin_remove (GST_BIN (session->priv->conference), session->priv->discovery_codecbin); session->priv->discovery_codecbin = NULL; } return FALSE; } /** * _discovery_pad_blocked_callback: * * This is the callback to change the discovery codecbin */ static GstPadProbeReturn _discovery_pad_blocked_callback (GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { FsRtpSession *session = user_data; GError *error = NULL; GList *item = NULL; CodecAssociation *ca = NULL; if (fs_rtp_session_has_disposed_enter (session, NULL)) { FS_RTP_SESSION_LOCK (session); session->priv->discovery_pad_block_id = 0; FS_RTP_SESSION_UNLOCK (session); return GST_PAD_PROBE_REMOVE; } FS_RTP_SESSION_LOCK (session); session->priv->discovery_pad_block_id = 0; /* Find out if there is a codec that needs the config to be fetched */ for (item = g_list_first (session->priv->codec_associations); item; item = g_list_next (item)) { ca = item->data; if (ca->need_config) break; } if (!item) { fs_rtp_session_stop_codec_param_gathering_unlock (session); g_object_notify (G_OBJECT (session), "codecs"); gst_element_post_message (GST_ELEMENT (session->priv->conference), gst_message_new_element (GST_OBJECT (session->priv->conference), gst_structure_new ("farstream-codecs-changed", "session", FS_TYPE_SESSION, session, NULL))); goto out_unlocked; } if (fs_codec_are_equal (ca->codec, session->priv->discovery_codec)) goto out_locked; if (!fs_rtp_session_get_codec_params_unlock (session, ca, &error)) { FS_RTP_SESSION_LOCK (session); fs_rtp_session_stop_codec_param_gathering_unlock (session); g_prefix_error (&error, "Error while discovering codec data, discovery cancelled: "); fs_session_emit_error (FS_SESSION (session), error->code, error->message); } g_clear_error (&error); out_unlocked: fs_rtp_session_has_disposed_exit (session); return GST_PAD_PROBE_REMOVE; out_locked: FS_RTP_SESSION_UNLOCK (session); goto out_unlocked; } /** * fs_rtp_session_start_codec_param_gathering_locked * @session: a #FsRtpSession * * Check if there is any codec associations that requires codec discovery and * if there is, starts the gathering process by adding a pad block to the * tee's discovery src pad */ static void fs_rtp_session_start_codec_param_gathering_locked (FsRtpSession *session) { GList *item = NULL; /* Find out if there is a codec that needs the config to be fetched */ for (item = g_list_first (session->priv->codec_associations); item; item = g_list_next (item)) { CodecAssociation *ca = item->data; if (ca->need_config) break; } if (!item) return; GST_DEBUG ("Starting Codec Param discovery for session %d", session->id); if (session->priv->discovery_pad_block_id == 0) session->priv->discovery_pad_block_id = gst_pad_add_probe (session->priv->send_tee_discovery_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, _discovery_pad_blocked_callback, g_object_ref (session), g_object_unref); } /** * fs_rtp_session_stop_codec_param_gathering_unlock: * @session: a #FsRtpSession * * Stop the codec config gathering and remove the elements used for that */ static void fs_rtp_session_stop_codec_param_gathering_unlock (FsRtpSession *session) { GST_DEBUG ("Stopping Codec Param discovery for session %d", session->id); if (session->priv->discovery_codec) { fs_codec_destroy (session->priv->discovery_codec); session->priv->discovery_codec = NULL; } if (session->priv->discovery_valve) g_object_set (session->priv->discovery_valve, "drop", TRUE, NULL); FS_RTP_SESSION_UNLOCK (session); if (session->priv->discovery_fakesink) { gst_element_set_locked_state (session->priv->discovery_fakesink, TRUE); gst_element_set_state (session->priv->discovery_fakesink, GST_STATE_NULL); gst_bin_remove (GST_BIN (session->priv->conference), session->priv->discovery_fakesink); session->priv->discovery_fakesink = NULL; } if (session->priv->discovery_capsfilter) { gst_element_set_locked_state (session->priv->discovery_capsfilter, TRUE); gst_element_set_state (session->priv->discovery_capsfilter, GST_STATE_NULL); gst_bin_remove (GST_BIN (session->priv->conference), session->priv->discovery_capsfilter); session->priv->discovery_capsfilter = NULL; } if (session->priv->discovery_codecbin) { gst_element_set_locked_state (session->priv->discovery_codecbin, TRUE); gst_element_set_state (session->priv->discovery_codecbin, GST_STATE_NULL); gst_bin_remove (GST_BIN (session->priv->conference), session->priv->discovery_codecbin); session->priv->discovery_codecbin = NULL; } } static gchar ** fs_rtp_session_list_transmitters (FsSession *session) { gchar **rv; g_return_val_if_fail (FS_IS_RTP_SESSION (session), NULL); rv = fs_transmitter_list_available (); if (!rv) rv = g_malloc0 (1); return rv; } static GType fs_rtp_session_get_stream_transmitter_type (FsSession *session, const gchar *transmitter) { FsRtpSession *self = FS_RTP_SESSION (session); GType st_type = 0; FsTransmitter *trans; trans = fs_rtp_session_get_transmitter (self, transmitter, NULL); if (transmitter) st_type = fs_transmitter_get_stream_transmitter_type (trans); g_object_unref (trans); return st_type; } void fs_rtp_session_ssrc_validated (FsRtpSession *session, guint32 ssrc) { if (fs_rtp_session_has_disposed_enter (session, NULL)) return; gst_element_send_event (session->priv->rtpmuxer, gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, gst_structure_new ("GstForceKeyUnit", "all-headers", G_TYPE_BOOLEAN, TRUE, NULL))); fs_rtp_session_has_disposed_exit (session); } struct CodecBinSetBitrateData { guint bitrate; gboolean ret; }; static void codecbin_set_bitrate_func (const GValue *item, gpointer user_data) { GstElement *elem = g_value_get_object (item); struct CodecBinSetBitrateData *data = user_data; if (g_object_class_find_property (G_OBJECT_GET_CLASS (elem), "bitrate")) { fs_utils_set_bitrate (elem, data->bitrate); data->ret = TRUE; } } static gboolean codecbin_set_bitrate (GstElement *codecbin, guint bitrate) { GstIterator *it; struct CodecBinSetBitrateData data; if (bitrate == 0) return FALSE; GST_DEBUG ("Setting bitrate to %u bits/sec", bitrate); data.bitrate = bitrate; data.ret = FALSE; it = gst_bin_iterate_recurse (GST_BIN (codecbin)); gst_iterator_foreach (it, codecbin_set_bitrate_func, &data); gst_iterator_free (it); return data.ret; } static void fs_rtp_session_set_send_bitrate (FsRtpSession *self, guint bitrate) { FS_RTP_SESSION_LOCK (self); if (bitrate) self->priv->send_bitrate = bitrate; if (self->priv->send_codecbin) codecbin_set_bitrate (self->priv->send_codecbin, bitrate); if (self->priv->send_bitrate_adapter) g_object_set (self->priv->send_bitrate_adapter, "bitrate", bitrate, NULL); FS_RTP_SESSION_UNLOCK (self); } static GList * fs_rtp_session_get_codecs_need_resend (FsSession *session, GList *old_codecs, GList *new_codecs) { g_return_val_if_fail (FS_IS_RTP_SESSION (session), FALSE); return codecs_list_has_codec_config_changed (old_codecs, new_codecs); } /* * TODO: This is horribly too complicated. * What is need is a real async API on dtmfsrc and rtpdtmfsrc */ gboolean fs_rtp_session_handle_dtmf_event_message (FsRtpSession *self, GstMessage *message) { GstEvent *event; const GstStructure *ms; const GstStructure *es; gboolean m_start, e_start; gint m_method, e_method; gint m_number = -1, e_number = -1; gint m_volume; gboolean matching; GstMessage *post_message = NULL; FS_RTP_SESSION_LOCK (self); if (g_queue_get_length (&self->priv->telephony_events) == 0 || !fs_rtp_special_sources_claim_message_locked ( self->priv->extra_sources, message)) { FS_RTP_SESSION_UNLOCK (self); return FALSE; } event = g_queue_peek_tail (&self->priv->telephony_events); ms = gst_message_get_structure (message); es = gst_event_get_structure (event); if (!gst_structure_get_boolean (ms, "start", &m_start)) goto invalid; gst_structure_get_boolean (es, "start", &e_start); if (!gst_structure_get_int (ms, "method", &m_method)) goto invalid; gst_structure_get_int (es, "method", &e_method); if (m_start) { if (!gst_structure_get_int (ms, "number", &m_number)) goto invalid; gst_structure_get_int (es, "number", &e_number); if (!gst_structure_get_int (ms, "volume", &m_volume)) goto invalid; } matching = ((!m_start && !e_start) || (m_start == e_start && m_method == e_method && m_number == e_number)); if (gst_structure_has_name (ms, "dtmf-event-processed")) { if (matching) { if (m_start) { if (self->priv->running_telephony_src) { GST_WARNING ("Got a second start from %s", self->priv->running_telephony_src == GST_MESSAGE_SRC (message) ? "the same source" : "a different source"); gst_object_unref (self->priv->running_telephony_src); } self->priv->running_telephony_src = gst_object_ref ( GST_MESSAGE_SRC (message)); } else /* is a stop */ { if (self->priv->running_telephony_src) { if (self->priv->running_telephony_src == GST_MESSAGE_SRC (message)) { gst_object_unref (self->priv->running_telephony_src); self->priv->running_telephony_src = NULL; } else { GST_DEBUG ("Received stop event from another source, ignoring"); return TRUE; } } } g_queue_pop_tail (&self->priv->telephony_events); gst_event_unref (event); self->priv->telephony_event_running = FALSE; GST_DEBUG ("Got processed telepathy event %s for %d", m_start ? "start" : "stop", m_number); if (m_start) post_message = gst_message_new_element ( GST_OBJECT (self->priv->conference), gst_structure_new ("farstream-telephony-event-started", "session", FS_TYPE_SESSION, self, "method", FS_TYPE_DTMF_METHOD, m_method, "event", FS_TYPE_DTMF_EVENT, m_number, "volume", G_TYPE_UCHAR, m_volume, NULL)); else post_message = gst_message_new_element ( GST_OBJECT (self->priv->conference), gst_structure_new ("farstream-telephony-event-stopped", "session", FS_TYPE_SESSION, self, "method", FS_TYPE_DTMF_METHOD, m_method, NULL)); } else { GST_WARNING ("Got dtmf-event-processed message that does not match the" " currently running event, ignoring"); } } else if (gst_structure_has_name (ms, "dtmf-event-dropped")) { if (m_start == FALSE && e_start == FALSE) { if (self->priv->running_telephony_src == GST_MESSAGE_SRC (message)) { gst_object_unref (self->priv->running_telephony_src); self->priv->running_telephony_src = NULL; } g_queue_pop_tail (&self->priv->telephony_events); gst_event_unref (event); self->priv->telephony_event_running = FALSE; post_message = gst_message_new_element ( GST_OBJECT (self->priv->conference), gst_structure_new ("farstream-telephony-event-stopped", "session", FS_TYPE_SESSION, self, "type", G_TYPE_INT, 1, "method", G_TYPE_INT, m_method, NULL)); } else if (matching) { self->priv->telephony_event_running = FALSE; } else { GST_WARNING ("Got dtmf-event-dropped message that does not match the" " currently running event"); } } invalid: FS_RTP_SESSION_UNLOCK (self); if (post_message) gst_element_post_message (GST_ELEMENT (self->priv->conference), post_message); fs_rtp_session_try_sending_dtmf_event (self); return TRUE; } static gboolean fs_rtp_session_set_allowed_caps (FsSession *session, GstCaps *sink_caps, GstCaps *src_caps, GError **error) { FsRtpSession *self = FS_RTP_SESSION (session); GstCaps *old_input_caps = NULL; GstCaps *old_output_caps = NULL; gboolean ret; guint current_generation; if (fs_rtp_session_has_disposed_enter (self, error)) return FALSE; FS_RTP_SESSION_LOCK (self); if (sink_caps) { old_input_caps = gst_caps_ref (self->priv->input_caps); gst_caps_replace (&self->priv->input_caps, sink_caps); } if (src_caps) { old_output_caps = gst_caps_ref (self->priv->output_caps); gst_caps_replace (&self->priv->output_caps, src_caps); } current_generation = self->priv->caps_generation; self->priv->caps_generation++; FS_RTP_SESSION_UNLOCK (self); ret = fs_rtp_session_update_codecs (self, NULL, NULL, error); if (ret) { if (sink_caps) g_object_notify ((GObject *) self, "allowed-sink-caps"); if (src_caps) g_object_notify ((GObject *) self, "allowed-src-caps"); } else { FS_RTP_SESSION_LOCK (self); if (self->priv->caps_generation == current_generation) { if (old_input_caps) gst_caps_replace (&self->priv->input_caps, old_input_caps); if (old_output_caps) gst_caps_replace (&self->priv->output_caps, old_output_caps); self->priv->caps_generation++; } FS_RTP_SESSION_UNLOCK (self); GST_WARNING ("Invalid new codec preferences"); } gst_caps_replace (&old_input_caps, NULL); gst_caps_replace (&old_output_caps, NULL); fs_rtp_session_has_disposed_exit (self); return ret; } static gboolean fs_rtp_session_set_encryption_parameters (FsSession *session, GstStructure *parameters, GError **error) { FsRtpSession *self = FS_RTP_SESSION (session); gboolean ret = FALSE; GstBuffer *key; gint rtp_cipher; gint rtcp_cipher; gint rtp_auth; gint rtcp_auth; guint replay_window_size; g_return_val_if_fail (FS_IS_RTP_SESSION (session), FALSE); g_return_val_if_fail (parameters == NULL || GST_IS_STRUCTURE (parameters), FALSE); if (!validate_srtp_parameters (parameters, &rtp_cipher, &rtcp_cipher, &rtp_auth, &rtcp_auth, &key, &replay_window_size, error)) return FALSE; if (fs_rtp_session_has_disposed_enter (self, error)) return FALSE; if (!self->priv->srtpenc) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Can't set encryption because srtpenc is not installed"); goto done; } FS_RTP_SESSION_LOCK (self); if (self->priv->encryption_parameters) gst_structure_free (self->priv->encryption_parameters); if (parameters) self->priv->encryption_parameters = gst_structure_copy (parameters); else self->priv->encryption_parameters = NULL; FS_RTP_SESSION_UNLOCK (self); g_object_set (self->priv->srtpenc, "replay-window-size", replay_window_size, "rtp-auth", rtp_auth, "rtcp-auth", rtcp_auth, "rtp-cipher", rtp_cipher, "rtcp-cipher", rtcp_cipher, "key", key, NULL); ret = TRUE; done: fs_rtp_session_has_disposed_exit (self); return ret; } static GstCaps * _srtpdec_request_key (GstElement *srtpdec, guint ssrc, gpointer user_data) { FsRtpSession *self = FS_RTP_SESSION (user_data); FsRtpStream *stream; GstCaps *caps = NULL; if (fs_rtp_session_has_disposed_enter (self, NULL)) return NULL; FS_RTP_SESSION_LOCK (self); stream = fs_rtp_session_get_stream_by_ssrc_locked (self, ssrc); if (stream) { caps = fs_rtp_stream_get_srtp_caps_locked (stream); g_object_unref (stream); } FS_RTP_SESSION_UNLOCK (self); fs_rtp_session_has_disposed_exit (self); if (caps) return caps; else return gst_caps_new_simple ("application/x-srtp", "srtp-cipher", G_TYPE_STRING, "null", "srtcp-cipher", G_TYPE_STRING, "null", "srtp-auth", G_TYPE_STRING, "null", "srtcp-auth", G_TYPE_STRING, "null", NULL); } static gboolean _stream_decrypt_clear_locked_cb (FsRtpStream *stream, gpointer user_data) { FsRtpSession *self = FS_RTP_SESSION (user_data); GHashTableIter iter; gpointer key, value; if (!self->priv->srtpdec) return FALSE; g_hash_table_iter_init (&iter, self->priv->ssrc_streams); while (g_hash_table_iter_next (&iter, &key, &value)) { guint32 ssrc = GPOINTER_TO_UINT (key); FsRtpStream *tmp_stream = value; if (tmp_stream == stream) g_signal_emit_by_name (self->priv->srtpdec, "remove-key", ssrc); } return TRUE; } farstream-0.2.7/gst/fsrtpconference/fs-rtp-codec-specific.h0000664000076400007640000000466111710041462020647 00000000000000/* * fs-rtp-codec-specific.h - Per-codec SDP negotiation * * Farstream RTP/AVP/SAVP/AVPF Module * Copyright (C) 2007-2010 Collabora Ltd. * Copyright (C) 2007-2010 Nokia Corporation * @author Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_SPECIFIC_NEGO_H__ #define __FS_RTP_SPECIFIC_NEGO_H__ #include #include #include G_BEGIN_DECLS /* * These are the basic types: * * @FS_PARAM_TYPE_SEND: The parameter define what we are allowed to send * @FS_PARAM_TYPE_RECV: The parameter defines what will be received, * @FS_PARAM_TYPE_CONFIG: The parameter is some configuration that must be * fed to the decoder to be able to decode the stream * @FS_PARAM_TYPE_SEND_AVOID_NEGO: The parameter is not negotiated and can * be different on both sides * @FS_PARAM_TYPE_MANDATORY: This parameter is mandatory and the codec's * definition is not useful without it. */ typedef enum { FS_PARAM_TYPE_SEND = 1 << 0, FS_PARAM_TYPE_RECV = 1 << 1, FS_PARAM_TYPE_BOTH = FS_PARAM_TYPE_SEND | FS_PARAM_TYPE_RECV, FS_PARAM_TYPE_CONFIG = 1 << 2, FS_PARAM_TYPE_SEND_AVOID_NEGO = 1 << 3, FS_PARAM_TYPE_MANDATORY = 1 << 4, FS_PARAM_TYPE_ALL = FS_PARAM_TYPE_BOTH | FS_PARAM_TYPE_CONFIG | FS_PARAM_TYPE_SEND_AVOID_NEGO } FsParamType; FsCodec * sdp_negotiate_codec (FsCodec *local_recv_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes); gboolean codec_needs_config (FsCodec *codec); gboolean codec_has_config_data_named (FsCodec *codec, const gchar *name); FsCodec * codec_copy_filtered (FsCodec *codec, FsParamType types); GList * codecs_list_has_codec_config_changed (GList *old, GList *new); G_END_DECLS #endif farstream-0.2.7/gst/fsrtpconference/fs-rtp-stream.h0000664000076400007640000001053312461773672017320 00000000000000/* * Farstream - Farstream RTP Stream * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-stream.h - A Farstream RTP Stream * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_STREAM_H__ #define __FS_RTP_STREAM_H__ #include #include #include "fs-rtp-participant.h" #include "fs-rtp-session.h" #include "fs-rtp-substream.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RTP_STREAM \ (fs_rtp_stream_get_type ()) #define FS_RTP_STREAM(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_STREAM, FsRtpStream)) #define FS_RTP_STREAM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_STREAM, FsRtpStreamClass)) #define FS_IS_RTP_STREAM(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_STREAM)) #define FS_IS_RTP_STREAM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_STREAM)) #define FS_RTP_STREAM_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_STREAM, FsRtpStreamClass)) #define FS_RTP_STREAM_CAST(obj) ((FsRtpStream*) (obj)) typedef struct _FsRtpStream FsRtpStream; typedef struct _FsRtpStreamClass FsRtpStreamClass; typedef struct _FsRtpStreamPrivate FsRtpStreamPrivate; struct _FsRtpStreamClass { FsStreamClass parent_class; }; /** * FsRtpStream: * */ struct _FsRtpStream { FsStream parent; /*< private >*/ /* Can only be accessed while holding the FsRtpSession lock */ /* Dont modify, call set_remote_codecs() */ GList *remote_codecs; GList *negotiated_codecs; /* Same as codecs, hold FsRtpSession lock and modify by * setting the property */ GList *hdrext; /* Dont modify, call add_substream() */ GList *substreams; FsRtpParticipant *participant; FsRtpStreamPrivate *priv; }; GType fs_rtp_stream_get_type (void); typedef gboolean (*stream_new_remote_codecs_cb) (FsRtpStream *stream, GList *codecs, GError **error, gpointer user_data); typedef void (*stream_known_source_packet_receive_cb) (FsRtpStream *stream, guint component, GstBuffer *buffer, gpointer user_data); typedef void (*stream_sending_changed_locked_cb) (FsRtpStream *stream, gboolean sending, gpointer user_data); typedef void (*stream_ssrc_added_cb) (FsRtpStream *stream, guint32 ssrc, gpointer user_data); typedef FsStreamTransmitter* (*stream_get_new_stream_transmitter_cb) ( FsRtpStream *stream, FsParticipant *participant, const gchar *transmitter_name, GParameter *parameters, guint n_parameters, GError **error, gpointer user_data); typedef gboolean (*stream_decrypt_clear_locked_cb) (FsRtpStream *stream, gpointer user_data); FsRtpStream *fs_rtp_stream_new (FsRtpSession *session, FsRtpParticipant *participant, FsStreamDirection direction, stream_new_remote_codecs_cb new_remote_codecs_cb, stream_known_source_packet_receive_cb known_source_packet_received_cb, stream_sending_changed_locked_cb sending_changed_locked_cb, stream_ssrc_added_cb ssrc_added_cb, stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb, stream_decrypt_clear_locked_cb decrypt_clear_locked_cb, gpointer user_data_for_cb); gboolean fs_rtp_stream_add_substream_unlock (FsRtpStream *stream, FsRtpSubStream *substream, GError **error); void fs_rtp_stream_set_negotiated_codecs_unlock (FsRtpStream *stream, GList *codecs); gboolean validate_srtp_parameters (GstStructure *parameters, gint *srtp_cipher, gint *srtcp_cipher, gint *srtp_auth, gint *srtcp_auth, GstBuffer **key, guint *replay_window, GError **error); GstCaps * fs_rtp_stream_get_srtp_caps_locked (FsRtpStream *self); G_END_DECLS #endif /* __FS_RTP_STREAM_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-special-source.c0000664000076400007640000004423512401500475020723 00000000000000/* * Farstream - Farstream RTP Special Codec * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-special-source.c - A Farstream RTP Special Source gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-special-source.h" #include #include "fs-rtp-conference.h" #include "fs-rtp-codec-negotiation.h" #include "fs-rtp-dtmf-event-source.h" #include "fs-rtp-dtmf-sound-source.h" #define GST_CAT_DEFAULT fsrtpconference_debug /* * SECTION:fs-rtp-special-source * @short_description: Base class to abstract how special sources are handled * * This class defines how special sources can be handled, it is the base * for DMTF and CN sources. * */ /* props */ enum { PROP_0, }; struct _FsRtpSpecialSourcePrivate { gboolean disposed; GstElement *outer_bin; GstElement *rtpmuxer; GstPad *muxer_request_pad; GstElement *src; GThread *stop_thread; fs_rtp_special_source_stopped_callback stopped_callback; gpointer stopped_data; /* Protects the content of this struct after object has been disposed of */ GMutex mutex; }; static GList *classes = NULL; G_DEFINE_ABSTRACT_TYPE(FsRtpSpecialSource, fs_rtp_special_source, G_TYPE_OBJECT); #define FS_RTP_SPECIAL_SOURCE_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RTP_SPECIAL_SOURCE, \ FsRtpSpecialSourcePrivate)) #define FS_RTP_SPECIAL_SOURCE_LOCK(src) g_mutex_lock (&(src)->priv->mutex) #define FS_RTP_SPECIAL_SOURCE_UNLOCK(src) g_mutex_unlock (&(src)->priv->mutex) static void fs_rtp_special_source_dispose (GObject *object); static void fs_rtp_special_source_finalize (GObject *object); static FsRtpSpecialSource * fs_rtp_special_source_new (FsRtpSpecialSourceClass *klass, GList **negotiated_codec_associations, GMutex *mutex, FsCodec *selected_codec, GstElement *bin, GstElement *rtpmuxer); static FsCodec* fs_rtp_special_source_class_get_codec ( FsRtpSpecialSourceClass *klass, GList *negotiated_codec_associations, FsCodec *selected_codec); static gpointer register_classes (gpointer data) { GList *my_classes = NULL; my_classes = g_list_prepend (my_classes, g_type_class_ref (FS_TYPE_RTP_DTMF_EVENT_SOURCE)); my_classes = g_list_prepend (my_classes, g_type_class_ref (FS_TYPE_RTP_DTMF_SOUND_SOURCE)); return my_classes; } static void fs_rtp_special_sources_init (void) { static GOnce my_once = G_ONCE_INIT; classes = g_once (&my_once, register_classes, NULL); } static void fs_rtp_special_source_class_init (FsRtpSpecialSourceClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = fs_rtp_special_source_dispose; gobject_class->finalize = fs_rtp_special_source_finalize; g_type_class_add_private (klass, sizeof (FsRtpSpecialSourcePrivate)); } static void fs_rtp_special_source_init (FsRtpSpecialSource *self) { self->priv = FS_RTP_SPECIAL_SOURCE_GET_PRIVATE (self); self->priv->disposed = FALSE; g_mutex_init (&self->priv->mutex); } /** * stop_source_thread: * @data: a pointer to the current #FsRtpSpecialSource * * This functioin will lock on the source's state change until its release * and only then let the source be disposed of */ static gpointer stop_source_thread (gpointer data) { FsRtpSpecialSource *self = FS_RTP_SPECIAL_SOURCE (data); gst_element_set_locked_state (self->priv->src, TRUE); gst_element_set_state (self->priv->src, GST_STATE_NULL); FS_RTP_SPECIAL_SOURCE_LOCK (self); if (self->priv->muxer_request_pad) { gst_element_release_request_pad (self->priv->rtpmuxer, self->priv->muxer_request_pad); gst_object_unref (self->priv->muxer_request_pad); } self->priv->muxer_request_pad = NULL; gst_bin_remove (GST_BIN (self->priv->outer_bin), self->priv->src); self->priv->src = NULL; FS_RTP_SPECIAL_SOURCE_UNLOCK (self); if (self->priv->stopped_callback) self->priv->stopped_callback (self, self->priv->stopped_data); g_object_unref (self); return NULL; } static gboolean fs_rtp_special_source_is_stopping (FsRtpSpecialSource *self) { gboolean stopping; FS_RTP_SPECIAL_SOURCE_LOCK (self); stopping = !!self->priv->stop_thread; FS_RTP_SPECIAL_SOURCE_UNLOCK (self); return stopping; } /* * Returns TRUE if the source is already stopped */ static gboolean fs_rtp_special_source_stop_locked (FsRtpSpecialSource *self) { if (self->priv->src) { if (self->priv->stop_thread) { GST_DEBUG ("stopping thread for special source already running"); return TRUE; } g_object_ref (self); self->priv->stop_thread = g_thread_new ("special-source-stop", stop_source_thread, self); g_thread_unref (self->priv->stop_thread); return TRUE; } else { self->priv->stop_thread = GUINT_TO_POINTER (1); return FALSE; } } static void fs_rtp_special_source_dispose (GObject *object) { FsRtpSpecialSource *self = FS_RTP_SPECIAL_SOURCE (object); if (self->priv->disposed) return; FS_RTP_SPECIAL_SOURCE_LOCK (self); if (self->priv->disposed) { FS_RTP_SPECIAL_SOURCE_UNLOCK (self); return; } if (fs_rtp_special_source_stop_locked (self)) { FS_RTP_SPECIAL_SOURCE_UNLOCK (self); return; } if (self->priv->rtpmuxer) { gst_object_unref (self->priv->rtpmuxer); self->priv->rtpmuxer = NULL; } if (self->priv->outer_bin) { gst_object_unref (self->priv->outer_bin); self->priv->outer_bin = NULL; } self->priv->disposed = TRUE; FS_RTP_SPECIAL_SOURCE_UNLOCK (self); G_OBJECT_CLASS (fs_rtp_special_source_parent_class)->dispose (object); } static void fs_rtp_special_source_finalize (GObject *object) { FsRtpSpecialSource *self = FS_RTP_SPECIAL_SOURCE (object); if (self->priv->rtpmuxer) { gst_object_unref (self->priv->rtpmuxer); self->priv->rtpmuxer = NULL; } if (self->priv->outer_bin) { gst_object_unref (self->priv->outer_bin); self->priv->outer_bin = NULL; } if (self->codec) fs_codec_destroy (self->codec); self->codec = NULL; g_mutex_clear (&self->priv->mutex); G_OBJECT_CLASS (fs_rtp_special_source_parent_class)->finalize (object); } static GList* fs_rtp_special_source_class_add_blueprint (FsRtpSpecialSourceClass *klass, GList *blueprints) { if (klass->add_blueprint) return klass->add_blueprint (klass, blueprints); else GST_CAT_DEBUG (fsrtpconference_disco, "Class %s has no add_blueprint function", G_OBJECT_CLASS_NAME(klass)); return blueprints; } static GList* fs_rtp_special_source_class_negotiation_filter (FsRtpSpecialSourceClass *klass, GList *codec_associations) { if (klass->negotiation_filter) return klass->negotiation_filter (klass, codec_associations); else GST_CAT_DEBUG (fsrtpconference_disco, "Class %s has no negotiation_filter function", G_OBJECT_CLASS_NAME(klass)); return codec_associations; } /** * fs_rtp_special_sources_add_blueprints: * @blueprints: a #GList of #CodecBlueprint * * This function will add blueprints to the current list of blueprints based * on which elements are installed and on which codecs are already in the list * of blueprints. * * Returns: The updated #GList of #CodecBlueprint */ GList * fs_rtp_special_sources_add_blueprints (GList *blueprints) { GList *item = NULL; fs_rtp_special_sources_init (); for (item = g_list_first (classes); item; item = g_list_next (item)) { FsRtpSpecialSourceClass *klass = item->data; blueprints = fs_rtp_special_source_class_add_blueprint (klass, blueprints); } return blueprints; } /** * fs_rtp_special_sources_negotiation_filter: * @codec_associations: A #GList of negotiation Codec Associations * * This will apply all of the source specific negotiation filters to the list * of just negotiated codec associations and modify it in the appropriate way. */ GList * fs_rtp_special_sources_negotiation_filter (GList *codec_associations) { GList *item = NULL; fs_rtp_special_sources_init (); for (item = g_list_first (classes); item; item = g_list_next (item)) { FsRtpSpecialSourceClass *klass = item->data; codec_associations = fs_rtp_special_source_class_negotiation_filter (klass, codec_associations); } return codec_associations; } void fs_rtp_special_sources_remove_finish (GList **extra_sources, GMutex *mutex, FsRtpSpecialSource *source) { g_mutex_lock (mutex); *extra_sources = g_list_remove (*extra_sources, source); g_mutex_unlock (mutex); g_object_unref (source); } /** * fs_rtp_special_sources_remove: * @extra_sources: A pointer to the #GList returned by previous calls to this * function * @negotiated_codec_associations: A pointer to the #GList of current negotiated * #CodecAssociation * @mutex: the mutex protecting the last two things * @selected_codec: A pointer to the currently selected codec for sending, * but not send_codec * * This function removes any special source that are not compatible with the * currently selected send codec. * * Returns: %TRUE if a source was removed */ gboolean fs_rtp_special_sources_remove ( GList **extra_sources, GList **negotiated_codec_associations, GMutex *mutex, FsCodec *selected_codec, fs_rtp_special_source_stopped_callback stopped_callback, gpointer stopped_data) { GList *klass_item = NULL; gboolean changed = FALSE; fs_rtp_special_sources_init (); for (klass_item = g_list_first (classes); klass_item; klass_item = g_list_next (klass_item)) { FsRtpSpecialSourceClass *klass = klass_item->data; GList *obj_item; FsRtpSpecialSource *obj = NULL; restart: g_mutex_lock (mutex); /* Check if we already have an object for this type */ for (obj_item = g_list_first (*extra_sources); obj_item; obj_item = g_list_next (obj_item)) { obj = obj_item->data; if (G_OBJECT_TYPE(obj) == G_OBJECT_CLASS_TYPE(klass) && !fs_rtp_special_source_is_stopping (obj)) break; } if (obj_item) { FsCodec *telephony_codec = fs_rtp_special_source_class_get_codec (klass, *negotiated_codec_associations, selected_codec); if (!telephony_codec || !fs_codec_are_equal (telephony_codec, obj->codec)) { FsRtpSpecialSource *self = FS_RTP_SPECIAL_SOURCE (obj); self->priv->stopped_callback = stopped_callback; self->priv->stopped_data = stopped_data; if (!fs_rtp_special_source_stop_locked (self)) { *extra_sources = g_list_remove (*extra_sources, obj); changed = TRUE; g_mutex_unlock (mutex); g_object_unref (obj); goto restart; } } } g_mutex_unlock (mutex); } return changed; } /** * fs_rtp_special_sources_create: * @current_extra_sources: A pointer to the #GList returned by previous calls * to this function * @negotiated_codec_associations: A pointer to the #GList of current negotiated * #CodecAssociation * @mutex: the mutex protecting the last two things * @selected_codec: The currently selected codec for sending (but not * send_codec) * @bin: The #GstBin to add the stuff to * @rtpmuxer: The rtpmux element * * This function add special sources that don't already exist but are needed * * Returns: %TRUE if at least one source was added */ gboolean fs_rtp_special_sources_create ( GList **extra_sources, GList **negotiated_codec_associations, GMutex *mutex, FsCodec *selected_codec, GstElement *bin, GstElement *rtpmuxer) { GList *klass_item = NULL; gboolean changed = FALSE; fs_rtp_special_sources_init (); g_mutex_lock (mutex); for (klass_item = g_list_first (classes); klass_item; klass_item = g_list_next (klass_item)) { FsRtpSpecialSourceClass *klass = klass_item->data; GList *obj_item; FsRtpSpecialSource *obj = NULL; /* Check if we already have an object for this type */ for (obj_item = g_list_first (*extra_sources); obj_item; obj_item = g_list_next (obj_item)) { obj = obj_item->data; if (G_OBJECT_TYPE(obj) == G_OBJECT_CLASS_TYPE(klass) && !fs_rtp_special_source_is_stopping (obj)) break; } if (!obj_item && fs_rtp_special_source_class_get_codec (klass, *negotiated_codec_associations, selected_codec)) { g_mutex_unlock (mutex); obj = fs_rtp_special_source_new (klass, negotiated_codec_associations, mutex, selected_codec, bin, rtpmuxer); if (!obj) { GST_WARNING ("Failed to make new special source"); return changed; } g_mutex_lock (mutex); /* Check again if we already have an object for this type */ for (obj_item = g_list_first (*extra_sources); obj_item; obj_item = g_list_next (obj_item)) if (G_OBJECT_TYPE(obj_item->data) == G_OBJECT_CLASS_TYPE(klass) && !fs_rtp_special_source_is_stopping (obj_item->data)) break; if (obj_item) { g_mutex_unlock (mutex); g_object_unref (obj); g_mutex_lock (mutex); } else { *extra_sources = g_list_prepend (*extra_sources, obj); changed = TRUE; } } } g_mutex_unlock (mutex); return changed; } static FsRtpSpecialSource * fs_rtp_special_source_new (FsRtpSpecialSourceClass *klass, GList **negotiated_codec_associations, GMutex *mutex, FsCodec *selected_codec, GstElement *bin, GstElement *rtpmuxer) { FsRtpSpecialSource *source = NULL; GstPad *pad = NULL; g_return_val_if_fail (klass, NULL); g_return_val_if_fail (klass->build, NULL); g_return_val_if_fail (GST_IS_BIN (bin), NULL); g_return_val_if_fail (GST_IS_ELEMENT (rtpmuxer), NULL); source = g_object_new (G_OBJECT_CLASS_TYPE (klass), NULL); g_return_val_if_fail (source, NULL); g_mutex_lock (mutex); source->priv->rtpmuxer = gst_object_ref (rtpmuxer); source->priv->outer_bin = gst_object_ref (bin); source->priv->src = klass->build (source, *negotiated_codec_associations, selected_codec); g_mutex_unlock (mutex); if (!source->priv->src) goto error; if (!gst_bin_add (GST_BIN (source->priv->outer_bin), source->priv->src)) { GST_ERROR ("Could not add bin to outer bin"); gst_object_unref (source->priv->src); source->priv->src = NULL; goto error; } source->priv->muxer_request_pad = gst_element_get_request_pad (rtpmuxer, "priority_sink_%u"); if (!source->priv->muxer_request_pad) source->priv->muxer_request_pad = gst_element_get_request_pad (rtpmuxer, "sink_%u"); if (!source->priv->muxer_request_pad) { GST_ERROR ("Could not get request pad from muxer"); goto error_added; } pad = gst_element_get_static_pad (source->priv->src, "src"); if (GST_PAD_LINK_FAILED (gst_pad_link (pad, source->priv->muxer_request_pad))) { GST_ERROR ("Could not link rtpdtmfsrc src to muxer sink"); gst_object_unref (pad); goto error_added; } gst_object_unref (pad); if (!gst_element_sync_state_with_parent (source->priv->src)) { GST_ERROR ("Could not sync capsfilter state with its parent"); goto error_added; } return source; error_added: gst_element_set_state (source->priv->src, GST_STATE_NULL); gst_bin_remove (GST_BIN (source->priv->outer_bin), source->priv->src); source->priv->src = NULL; error: g_object_unref (source); return NULL; } GList * fs_rtp_special_sources_destroy (GList *current_extra_sources) { while (current_extra_sources) { FsRtpSpecialSource *self = current_extra_sources->data; self->priv->stopped_callback = NULL; g_object_unref (self); current_extra_sources = g_list_remove (current_extra_sources, self); } return NULL; } /** * fs_rtp_special_source_class_get_codec: * * Returns the codec that will be selected by this source if it is used * * Returns: The codec or %NULL. This returns the codec, not a copy */ static FsCodec* fs_rtp_special_source_class_get_codec (FsRtpSpecialSourceClass *klass, GList *negotiated_codec_associations, FsCodec *selected_codec) { if (klass->get_codec) return klass->get_codec (klass, negotiated_codec_associations, selected_codec); return NULL; } /** * fs_rtp_special_sources_get_codecs_locked: * @special_sources: The #GList of special sources * @codec_associations: The #GList of current codec associations * * Gets the list of the codecs that are used by special sources, excluding * the main codec * * Returns: a #GList of #FsCodec */ GList * fs_rtp_special_sources_get_codecs_locked (GList *special_sources, GList *codec_associations, FsCodec *main_codec) { GQueue result = G_QUEUE_INIT; for (; special_sources; special_sources = special_sources->next) { FsRtpSpecialSource *source = special_sources->data; if (fs_rtp_special_source_is_stopping (source)) continue; if (main_codec->id != source->codec->id) { CodecAssociation *ca = lookup_codec_association_by_pt (codec_associations, source->codec->id); g_queue_push_tail (&result, fs_codec_copy (ca->codec)); } } return result.head; } gboolean fs_rtp_special_sources_claim_message_locked (GList *special_sources, GstMessage *message) { GList *item; for (item = special_sources; item; item = item->next) { FsRtpSpecialSource *source = item->data; if (gst_object_has_ancestor (GST_OBJECT (GST_MESSAGE_SRC (message)), GST_OBJECT (source->priv->src))) return TRUE; } return FALSE; } farstream-0.2.7/gst/fsrtpconference/tfrc.c0000664000076400007640000010353011710041462015522 00000000000000/* * Farstream - Farstream TFRC implementation * * Copyright 2010 Collabora Ltd. * @author: Olivier Crete * Copyright 2010 Nokia Corp. * * tfrc.c - An implemention of TCP Friendly rate control, RFCs 5348 and 4828 * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "tfrc.h" #include #include /* for gst_util_uint64_scale_round */ #include /* * ALL TIMES ARE IN MICROSECONDS * bitrates are in bytes/sec */ #if 0 #define DEBUG_RECEIVER(receiver, format, ...) \ g_debug ("TFRC-R (%p): " format , receiver, __VA_ARGS__) #else #define DEBUG_RECEIVER(...) #endif #if 0 #define DEBUG_SENDER(sender, format, ...) \ g_debug ("TFRC-S (%p): " format, sender, __VA_ARGS__) #else #define DEBUG_SENDER(...) #endif #define DEFAULT_MSS 1460 #define SECOND (1000 * 1000) #define MIN_NOFEEDBACK_TIMER (20 * 1000) /* * @s: segment size in bytes * @R: RTT in milli seconds (instead of seconds) * @p: loss event per packet transmitted * * s * X_Bps = ----------------------------------------------- * R * (sqrt(2*p/3) + 12*sqrt(3*p/8)*p*(1+32*p^2)) * * Returns: The bitrate in bytes/s */ static gdouble calculate_bitrate (gdouble s, gdouble R, gdouble p) { gdouble f = sqrt (2 * p / 3) + 12 * sqrt (3 * p / 8) * p * (1 + 32 * p * p); return (SECOND * s) / (R * f); } #define RECEIVE_RATE_HISTORY_SIZE (4) /* Specified in RFC 4828 Section 3 second bullet */ #define HEADER_SIZE (40) struct ReceiveRateItem { guint64 timestamp; guint rate; }; struct _TfrcSender { guint computed_rate; /* The rate computer from the TCP throughput equation */ gboolean sp; guint average_packet_size; /* 16 times larger */ gboolean use_inst_rate; /* use inst_rate instead of rate */ guint mss; /* max segment size */ guint rate; /* maximum allowed sending rate in bytes/sec */ guint inst_rate; /* corrected maximum allowed sending rate */ guint averaged_rtt; guint sqmean_rtt; guint last_sqrt_rtt; guint64 tld; /* Time Last Doubled during slow-start */ guint64 nofeedback_timer_expiry; guint retransmission_timeout; /* RTO */ struct ReceiveRateItem receive_rate_history[RECEIVE_RATE_HISTORY_SIZE]; gdouble last_loss_event_rate; gboolean sent_packet; }; TfrcSender * tfrc_sender_new (guint segment_size, guint64 now, guint initial_rate) { TfrcSender *sender = g_slice_new0 (TfrcSender); /* initialized as described in RFC 5348 4.2 */ sender->use_inst_rate = TRUE; sender->mss = DEFAULT_MSS; sender->average_packet_size = segment_size << 4; if (initial_rate) sender->rate = initial_rate; else sender->rate = segment_size; sender->retransmission_timeout = 2 * SECOND; sender->nofeedback_timer_expiry = now + sender->retransmission_timeout; return sender; } TfrcSender * tfrc_sender_new_sp (guint64 now, guint initial_average_packet_size) { TfrcSender *sender = tfrc_sender_new (1460, now, 0); sender->sp = TRUE; sender->average_packet_size = initial_average_packet_size << 4; return sender; } void tfrc_sender_use_inst_rate (TfrcSender *sender, gboolean use_inst_rate) { sender->use_inst_rate = use_inst_rate; } void tfrc_sender_free (TfrcSender *sender) { g_slice_free (TfrcSender, sender); } static guint sender_get_segment_size (TfrcSender *sender) { if (sender->sp) return sender->mss; else return sender->average_packet_size >> 4; } void tfrc_sender_on_first_rtt (TfrcSender *sender, guint64 now) { sender->receive_rate_history[0].rate = G_MAXUINT; sender->receive_rate_history[0].timestamp = now; } static guint get_max_receive_rate (TfrcSender *sender, gboolean ignore_max_uint) { guint max_rate = 0; guint i; for (i = 0; i < RECEIVE_RATE_HISTORY_SIZE; i++) { if (G_UNLIKELY (sender->receive_rate_history[i].rate == G_MAXUINT)) { if (ignore_max_uint) return max_rate; else return G_MAXUINT; } max_rate = MAX (max_rate, sender->receive_rate_history[i].rate); } return max_rate; } static void add_to_receive_rate_history (TfrcSender *sender, guint receive_rate, guint64 now) { int i; for (i = RECEIVE_RATE_HISTORY_SIZE - 1; i > 0; i --) sender->receive_rate_history[i] = sender->receive_rate_history[i-1]; sender->receive_rate_history[0].rate = receive_rate; sender->receive_rate_history[0].timestamp = now; } static guint maximize_receive_rate_history (TfrcSender *sender, guint receive_rate, guint64 now) { guint max_rate; add_to_receive_rate_history (sender, receive_rate, now); max_rate = get_max_receive_rate (sender, TRUE); DEBUG_SENDER (sender, "MAXIMIZE recv: %u max: %u", receive_rate, max_rate); memset (sender->receive_rate_history, 0, sizeof(struct ReceiveRateItem) * RECEIVE_RATE_HISTORY_SIZE); sender->receive_rate_history[0].rate = max_rate; sender->receive_rate_history[0].timestamp = now; return max_rate; } static void update_receive_rate_history (TfrcSender *sender, guint receive_rate, guint64 now) { guint i; add_to_receive_rate_history (sender, receive_rate, now); for (i = 1; i < RECEIVE_RATE_HISTORY_SIZE; i++) if (sender->receive_rate_history[i].rate && sender->receive_rate_history[i].timestamp < now - (2 * sender->averaged_rtt)) sender->receive_rate_history[i].rate = 0; } const guint T_MBI = 64; /* the maximum backoff interval of 64 seconds */ static guint compute_initial_rate (guint mss, guint rtt) { if (G_UNLIKELY (rtt == 0)) return 0; return (SECOND * MIN (4 * mss, MAX (2 * mss, 4380))) / rtt; } /* RFC 5348 section 4.3 step 4 second part */ static void recompute_sending_rate (TfrcSender *sender, guint recv_limit, gdouble loss_event_rate, guint64 now) { if (loss_event_rate > 0) { /* congestion avoidance phase */ sender->computed_rate = calculate_bitrate (sender_get_segment_size (sender), sender->averaged_rtt, loss_event_rate); sender->rate = MAX (MIN (sender->computed_rate, recv_limit), sender_get_segment_size (sender)/T_MBI); DEBUG_SENDER (sender, "congestion avoidance: %u (computed: %u ss: %u)", sender->rate, sender->computed_rate, sender_get_segment_size (sender)); } else if (now - sender->tld >= sender->averaged_rtt) { /* initial slow-start */ sender->rate = MAX (MIN (2 * sender->rate, recv_limit), compute_initial_rate (sender->mss, sender->averaged_rtt)); sender->tld = now; DEBUG_SENDER (sender, "initial slow start: %u", sender->rate); } } static void tfrc_sender_update_inst_rate (TfrcSender *sender) { if (!sender->last_sqrt_rtt) return; /* * Update the instantaneous * transmit rate, X_inst, following RFC 5348 Section 4.5. */ if (sender->sqmean_rtt) sender->sqmean_rtt = 0.9 * sender->sqmean_rtt + sender->last_sqrt_rtt / 10; else sender->sqmean_rtt = sender->last_sqrt_rtt; sender->inst_rate = sender->rate * sender->sqmean_rtt / sender->last_sqrt_rtt; if (sender->inst_rate < sender_get_segment_size (sender) / T_MBI) sender->inst_rate = sender_get_segment_size (sender) / T_MBI; } void tfrc_sender_on_feedback_packet (TfrcSender *sender, guint64 now, guint rtt, guint receive_rate, gdouble loss_event_rate, gboolean is_data_limited) { guint recv_limit; /* the limit on the sending rate computed from X_recv_set */ g_return_if_fail (rtt > 0 && rtt <= 10 * SECOND); /* On first feedback packet, set he rate based on the mss and rtt */ if (sender->tld == 0) { sender->rate = compute_initial_rate (sender->mss, rtt); sender->tld = now; DEBUG_SENDER (sender, "fb: initial rate: %u", sender->rate); } /* Apply the steps from RFC 5348 section 4.3 */ /* Step 1 (calculating the rtt) is done before calling this function */ /* Step 2: Update the RTT */ if (sender->averaged_rtt == 0) sender->averaged_rtt = rtt; else sender->averaged_rtt = (sender->averaged_rtt * 9 + rtt) / 10; if (sender->averaged_rtt == 0) sender->averaged_rtt = 1; /* Step 3: Update the timeout interval */ sender->retransmission_timeout = MAX (MAX (4 * sender->averaged_rtt, SECOND * 2 * sender_get_segment_size (sender) / sender->rate ), MIN_NOFEEDBACK_TIMER); /* Step 4: Update the allowed sending rate */ if (G_UNLIKELY (is_data_limited)) { /* the entire interval covered by the feedback packet was a data-limited interval */ if (loss_event_rate > sender->last_loss_event_rate) { guint i; /* the feedback packet reports a new loss event or an increase in the loss event rate p */ /* Halve entries in the receive rate history */ for (i = 0; i < RECEIVE_RATE_HISTORY_SIZE; i++) sender->receive_rate_history[i].rate /= 2; receive_rate *= 0.85; recv_limit = maximize_receive_rate_history (sender, receive_rate, now); DEBUG_SENDER (sender, "fb: data limited, new loss event %f > %f," " recv_limit: %u", loss_event_rate, sender->last_loss_event_rate, recv_limit); } else { recv_limit = 2 * maximize_receive_rate_history (sender, receive_rate, now); DEBUG_SENDER (sender, "fb: data limited, no new loss event %f <= %f," " recv_limit: %u", loss_event_rate, sender->last_loss_event_rate, recv_limit); } } else { /* typical behavior */ update_receive_rate_history (sender, receive_rate, now); recv_limit = get_max_receive_rate (sender, FALSE); if (recv_limit < G_MAXUINT / 2) recv_limit *= 2; else recv_limit = G_MAXUINT; DEBUG_SENDER (sender, "fb: not data limited, recv_limit: %u", recv_limit); } recompute_sending_rate (sender, recv_limit, loss_event_rate, now); /* Step 5: update the instantaneous transmit rate, X_inst, following Section 4.5. */ sender->last_sqrt_rtt = sqrt (rtt); tfrc_sender_update_inst_rate (sender); /* Step 6: Reset the nofeedback timer to expire after RTO seconds. */ sender->nofeedback_timer_expiry = now + sender->retransmission_timeout; sender->sent_packet = FALSE; sender->last_loss_event_rate = loss_event_rate; } static void update_limits(TfrcSender *sender, guint timer_limit, guint64 now) { if (timer_limit < sender_get_segment_size (sender) / T_MBI) timer_limit = sender_get_segment_size (sender) / T_MBI; memset (sender->receive_rate_history, 0, sizeof(struct ReceiveRateItem) * RECEIVE_RATE_HISTORY_SIZE); sender->receive_rate_history[0].rate = timer_limit / 2; sender->receive_rate_history[0].timestamp = now; recompute_sending_rate (sender, timer_limit, sender->last_loss_event_rate, now); } void tfrc_sender_no_feedback_timer_expired (TfrcSender *sender, guint64 now) { guint receive_rate = get_max_receive_rate (sender, FALSE); guint recover_rate = compute_initial_rate (sender->mss, sender->averaged_rtt); if (sender->averaged_rtt == 0 && sender->sent_packet) { /* We do not have X_Bps or recover_rate yet. * Halve the allowed sending rate. */ sender->rate = MAX ( sender->rate / 2, sender_get_segment_size (sender) / T_MBI); DEBUG_SENDER (sender, "no_fb: no p, initial, halve rate: %u", sender->rate); tfrc_sender_update_inst_rate (sender); } else if (((sender->last_loss_event_rate > 0 && receive_rate < recover_rate) || (sender->last_loss_event_rate == 0 && sender->rate < 2 * recover_rate)) && !sender->sent_packet) { /* Don't halve the allowed sending rate. */ /* do nothing */ DEBUG_SENDER (sender, "no_fb: idle, do nothing recv: %u recover: %u", receive_rate, recover_rate); } else if (sender->last_loss_event_rate == 0) { /* We do not have X_Bps yet. * Halve the allowed sending rate. */ sender->rate = MAX ( sender->rate / 2, sender_get_segment_size (sender) / T_MBI); DEBUG_SENDER (sender, "no_fb: no p, halve rate: %u recover: %u, sent: %u", sender->rate, recover_rate, sender->sent_packet); tfrc_sender_update_inst_rate (sender); } else if (sender->computed_rate / 2 > receive_rate) { /* 2 * X_recv was already limiting the sending rate. * Halve the allowed sending rate. */ DEBUG_SENDER (sender, "no_fb: computed rate %u > 2 * recv_rate %u", sender->computed_rate, receive_rate); update_limits(sender, receive_rate, now); } else { DEBUG_SENDER (sender, "no_fb: ELSE computed: %u", sender->computed_rate); update_limits(sender, sender->computed_rate / 2, now); } g_assert (sender->rate != 0); sender->nofeedback_timer_expiry = now + MAX (MAX ( 4 * sender->averaged_rtt, SECOND * 2 * sender_get_segment_size (sender) / sender->rate), MIN_NOFEEDBACK_TIMER); sender->sent_packet = FALSE; } void tfrc_sender_sending_packet (TfrcSender *sender, guint size) { /* this should be: * avg = size + (avg * 15/16) */ sender->average_packet_size = size + ((15 * sender->average_packet_size) >> 4); sender->sent_packet = TRUE; } guint tfrc_sender_get_send_rate (TfrcSender *sender) { guint rate; if (!sender) return DEFAULT_MSS; if (sender->use_inst_rate && sender->inst_rate) rate = sender->inst_rate; else rate = sender->rate; if (sender->sp) return rate * (sender->average_packet_size >> 4) / ((sender->average_packet_size >> 4) + HEADER_SIZE); else return rate; } guint64 tfrc_sender_get_no_feedback_timer_expiry (TfrcSender *sender) { return sender->nofeedback_timer_expiry; } guint tfrc_sender_get_averaged_rtt (TfrcSender *sender) { return sender->averaged_rtt; } #define NDUPACK 3 /* Number of packets to receive after a loss before declaring the loss event */ #define LOSS_EVENTS_MAX (9) #define LOSS_INTERVALS_MAX (8) #define MAX_HISTORY_SIZE (LOSS_EVENTS_MAX * 2) /* 2 is a random number */ #define MIN_HISTORY_DURATION (10) typedef struct { guint64 first_timestamp; guint first_seqnum; guint64 first_recvtime; guint64 last_timestamp; guint last_seqnum; guint64 last_recvtime; } ReceivedInterval; struct _TfrcReceiver { GQueue received_intervals; gboolean sp; guint sender_rtt; guint receive_rate; guint max_receive_rate; guint max_receive_rate_ss; guint64 feedback_timer_expiry; guint first_loss_interval; gdouble loss_event_rate; gboolean feedback_sent_on_last_timer; guint received_bytes; guint prev_received_bytes; guint64 received_bytes_reset_time; guint64 prev_received_bytes_reset_time; guint received_packets; guint prev_received_packets; guint sender_rtt_on_last_feedback; }; TfrcReceiver * tfrc_receiver_new (guint64 now) { TfrcReceiver *receiver = g_slice_new0 (TfrcReceiver); g_queue_init (&receiver->received_intervals); receiver->received_bytes_reset_time = now; receiver->prev_received_bytes_reset_time = now; return receiver; } TfrcReceiver * tfrc_receiver_new_sp (guint64 now) { TfrcReceiver *receiver = tfrc_receiver_new (now); receiver->sp = TRUE; return receiver; } void tfrc_receiver_free (TfrcReceiver *receiver) { ReceivedInterval *ri; while ((ri = g_queue_pop_tail (&receiver->received_intervals))) g_slice_free (ReceivedInterval, ri); g_slice_free (TfrcReceiver, receiver); } /* * @s: segment size in bytes * @R: RTT in milli seconds (instead of seconds) * @rate: the sending rate * * Returns the 1/p that would produce this sending rate * This is used to compute the first loss interval */ static gdouble compute_first_loss_interval (gdouble s, gdouble R, gdouble rate) { gdouble p_min = 0; gdouble p_max = 1; gdouble p; gdouble computed_rate; /* Use an iterative process to find p * it would be faster to use a table, but I'm lazy */ do { p = (p_min + p_max) / 2; computed_rate = calculate_bitrate (s, R, p); if (computed_rate < rate) p_max = p; else p_min = p; } while (computed_rate < 0.95 * rate || computed_rate > 1.05 * rate); return 1 / p; } /* Implements RFC 5348 section 5 */ static gdouble calculate_loss_event_rate (TfrcReceiver *receiver, guint64 now) { guint64 loss_event_times[LOSS_EVENTS_MAX]; guint loss_event_seqnums[LOSS_EVENTS_MAX]; guint loss_event_pktcount[LOSS_EVENTS_MAX]; guint loss_intervals[LOSS_EVENTS_MAX]; const gdouble weights[8] = { 1.0, 1.0, 1.0, 1.0, 0.8, 0.6, 0.4, 0.2 }; gint max_index = -1; GList *item; guint max_seqnum = 0; gint i; guint max_interval; gdouble I_tot0 = 0; gdouble I_tot1 = 0; gdouble W_tot = 0; gdouble I_tot; if (receiver->sender_rtt == 0) return 0; if (receiver->received_intervals.length < 2) return 0; DEBUG_RECEIVER (receiver, "start loss event rate computation (rtt: %u)", receiver->sender_rtt); for (item = g_queue_peek_head_link (&receiver->received_intervals)->next; item; item = item->next) { ReceivedInterval *current = item->data; ReceivedInterval *prev = item->prev->data; guint64 start_ts; guint start_seqnum; max_seqnum = current->last_seqnum; DEBUG_RECEIVER (receiver, "Loss: ts %"G_GUINT64_FORMAT "->%"G_GUINT64_FORMAT" seq %u->%u", prev->last_timestamp, current->first_timestamp, prev->last_seqnum, current->first_seqnum); /* If the current loss is entirely within one RTT of the beginning of the * last loss, lets merge it into there */ if (max_index >= 0 && current->first_timestamp < loss_event_times[max_index % LOSS_EVENTS_MAX] + receiver->sender_rtt) { loss_event_pktcount[max_index % LOSS_EVENTS_MAX] += current->first_seqnum - prev->last_seqnum; DEBUG_RECEIVER (receiver, "Merged: pktcount[%u] = %u", max_index, loss_event_pktcount[max_index % LOSS_EVENTS_MAX]); continue; } if (max_index >= 0 && prev->last_timestamp < loss_event_times[max_index % LOSS_EVENTS_MAX] + receiver->sender_rtt) { /* This is the case where a loss event ends in a middle of an interval * without packets, then we close this loss event and start a new one */ start_ts = loss_event_times[max_index % LOSS_EVENTS_MAX] + receiver->sender_rtt; start_seqnum = prev->last_seqnum + gst_util_uint64_scale_round ( current->first_seqnum - prev->last_seqnum, start_ts - prev->last_timestamp, 1 + current->first_timestamp - prev->last_timestamp); loss_event_pktcount[max_index % LOSS_EVENTS_MAX] += start_seqnum - prev->last_seqnum - 1; DEBUG_RECEIVER (receiver, "Loss ends inside loss interval pktcount[%u] = %u", max_index, loss_event_pktcount[max_index % LOSS_EVENTS_MAX]); } else { /* this is the case where the packet loss starts an entirely new loss * event */ start_ts = prev->last_timestamp + gst_util_uint64_scale_round (1, current->first_timestamp - prev->last_timestamp, current->first_seqnum - prev->last_seqnum); start_seqnum = prev->last_seqnum + 1; } DEBUG_RECEIVER (receiver, "start_ts: %" G_GUINT64_FORMAT " seqnum: %u", start_ts, start_seqnum); /* Now we have one or more loss events that start * during this interval of lost packets, if there is more than one * all but the last one are of RTT length */ while (start_ts <= current->first_timestamp) { max_index ++; loss_event_times[max_index % LOSS_EVENTS_MAX] = start_ts; loss_event_seqnums[max_index % LOSS_EVENTS_MAX] = start_seqnum; if (current->first_timestamp == prev->last_timestamp) { /* if current->first_ts == prev->last_ts, * then the computation of start_seqnum below will yield a division * by 0 */ loss_event_pktcount[max_index % LOSS_EVENTS_MAX] = current->first_seqnum - start_seqnum; break; } start_ts += receiver->sender_rtt; start_seqnum = prev->last_seqnum + gst_util_uint64_scale_round ( current->first_seqnum - prev->last_seqnum, start_ts - prev->last_timestamp, current->first_timestamp - prev->last_timestamp); /* Make sure our interval has at least one packet in it */ if (G_UNLIKELY (start_seqnum <= loss_event_seqnums[max_index % LOSS_EVENTS_MAX])) { start_seqnum = loss_event_seqnums[max_index % LOSS_EVENTS_MAX] + 1; start_ts = prev->last_timestamp + gst_util_uint64_scale_round ( current->first_timestamp - prev->last_timestamp, start_seqnum - prev->last_seqnum, current->first_seqnum - prev->last_seqnum); } if (start_seqnum > current->first_seqnum) { g_assert (start_ts > current->first_timestamp); start_seqnum = current->first_seqnum; /* No need top change start_ts, the loop will stop anyway */ } loss_event_pktcount[max_index % LOSS_EVENTS_MAX] = start_seqnum - loss_event_seqnums[max_index % LOSS_EVENTS_MAX]; DEBUG_RECEIVER (receiver, "loss %u times: %" G_GUINT64_FORMAT " seqnum: %u pktcount: %u", max_index, loss_event_times[max_index % LOSS_EVENTS_MAX], loss_event_seqnums[max_index % LOSS_EVENTS_MAX], loss_event_pktcount[max_index % LOSS_EVENTS_MAX]); } } if (max_index < 0 || (max_index < 1 && receiver->max_receive_rate == 0)) return 0; /* RFC 5348 Section 5.3: The size of loss events */ loss_intervals[0] = max_seqnum - loss_event_seqnums[max_index % LOSS_EVENTS_MAX] + 1; DEBUG_RECEIVER (receiver, "intervals[0] = %u", loss_intervals[0]); for (i = max_index - 1, max_interval = 1; max_interval < LOSS_INTERVALS_MAX && i >= 0 && i > max_index - LOSS_EVENTS_MAX; i--, max_interval++) { guint cur_i = i % LOSS_EVENTS_MAX; guint prev_i = (i + 1) % LOSS_EVENTS_MAX; /* if its Small Packet variant and the loss event is short, * that is less than 2 * RTT, then the loss interval is divided by the * number of packets lost * see RFC 4828 section 3 bullet 3 paragraph 2 */ if (receiver->sp && loss_event_times[prev_i] - loss_event_times[cur_i] < 2 * receiver->sender_rtt) loss_intervals[max_interval] = (loss_event_seqnums[prev_i] - loss_event_seqnums[cur_i]) / loss_event_pktcount[cur_i]; else loss_intervals[max_interval] = loss_event_seqnums[prev_i] - loss_event_seqnums[cur_i]; DEBUG_RECEIVER (receiver, "intervals[%u] = %u", max_interval, loss_intervals[max_interval]); } /* If the first loss interval is still used, use the computed * value according to RFC 5348 section 6.3.1 */ if (max_interval < LOSS_INTERVALS_MAX) { if (!receiver->first_loss_interval) { receiver->first_loss_interval = /* segment size is 1 because we're computing it based on the * X_pps equation.. in packets/s */ compute_first_loss_interval (receiver->max_receive_rate_ss, receiver->sender_rtt, receiver->max_receive_rate); DEBUG_RECEIVER (receiver, "Computed the first loss interval to %u" " (rtt: %u s: %u rate:%u)", receiver->first_loss_interval, receiver->sender_rtt, receiver->max_receive_rate_ss, receiver->max_receive_rate); } loss_intervals[max_interval] = receiver->first_loss_interval; DEBUG_RECEIVER (receiver, "intervals[%u] = %u", max_interval, loss_intervals[max_interval]); max_interval++; } /* Section 5.4: Average loss rate */ for (i = 1; i < max_interval; i++) { I_tot1 += loss_intervals[i] * weights[i - 1]; W_tot += weights[i - 1]; } /* Modified according to RFC 4828 section 3 bullet 3 paragraph 4*/ if (receiver->sp && now - loss_event_times[0] < 2 * receiver->sender_rtt) { I_tot = I_tot1; } else { for (i = 0; i < max_interval - 1; i++) I_tot0 += loss_intervals[i] * weights[i]; I_tot = MAX (I_tot0, I_tot1); } return W_tot / I_tot; } /* Implements RFC 5348 section 6.1 */ gboolean tfrc_receiver_got_packet (TfrcReceiver *receiver, guint64 timestamp, guint64 now, guint seqnum, guint sender_rtt, guint packet_size) { GList *item = NULL; ReceivedInterval *current = NULL; ReceivedInterval *prev = NULL; gboolean recalculate_loss_rate = FALSE; gboolean retval = FALSE; gboolean history_too_short = !sender_rtt; /* No RTT, keep all history */ receiver->received_bytes += packet_size; receiver->received_packets++; g_assert (sender_rtt != 0 || receiver->sender_rtt == 0); if (receiver->sender_rtt) receiver->sender_rtt = (0.9 * receiver->sender_rtt) + (sender_rtt / 10); else receiver->sender_rtt = sender_rtt; /* RFC 5348 section 6.3: First packet received */ if (g_queue_get_length (&receiver->received_intervals) == 0 || receiver->sender_rtt == 0) { if (receiver->sender_rtt) receiver->feedback_timer_expiry = now + receiver->sender_rtt; /* First packet or no RTT yet, lets send a feedback packet */ retval = TRUE; } /* RFC 5348 section 6.1 Step 1: Add to packet history */ for (item = g_queue_peek_tail_link (&receiver->received_intervals); item; item = item->prev) { current = item->data; prev = item->prev ? item->prev->data : NULL; if (G_LIKELY (seqnum == current->last_seqnum + 1)) { /* Extend the current packet forwardd */ current->last_seqnum = seqnum; current->last_timestamp = timestamp; current->last_recvtime = now; } else if (seqnum >= current->first_seqnum && seqnum <= current->last_seqnum) { /* Is inside the current interval, must be duplicate, ignore */ } else if (seqnum > current->last_seqnum + 1) { /* We had a loss, lets add a new one */ prev = current; current = g_slice_new (ReceivedInterval); current->first_timestamp = current->last_timestamp = timestamp; current->first_seqnum = current->last_seqnum = seqnum; current->first_recvtime = current->last_recvtime = now; g_queue_push_tail (&receiver->received_intervals, current); item = g_queue_peek_tail_link (&receiver->received_intervals); } else if (seqnum == current->first_seqnum - 1) { /* Extend the current packet backwards */ current->first_seqnum = seqnum; current->first_timestamp = timestamp; current->first_recvtime = now; } else if (seqnum < current->first_timestamp && (!prev || seqnum > prev->last_seqnum + 1)) { /* We have something that goes in the middle of a gap, so lets created a new received interval */ current = g_slice_new (ReceivedInterval); current->first_timestamp = current->last_timestamp = timestamp; current->first_seqnum = current->last_seqnum = seqnum; current->first_recvtime = current->last_recvtime = now; g_queue_insert_before (&receiver->received_intervals, item, current); item = item->prev; prev = item->prev ? item->prev->data : NULL; } else continue; break; } /* Don't forget history if we have aless than MIN_HISTORY_DURATION * rtt * of history */ if (!history_too_short) { ReceivedInterval *newest = g_queue_peek_tail (&receiver->received_intervals); ReceivedInterval *oldest = g_queue_peek_head (&receiver->received_intervals); if (newest && oldest) history_too_short = newest->last_timestamp - oldest->first_timestamp < MIN_HISTORY_DURATION * receiver->sender_rtt; else history_too_short = TRUE; } /* It's the first one or we're at the start */ if (G_UNLIKELY (!current)) { /* If its before MAX_HISTORY_SIZE, its too old, just discard it */ if (!history_too_short && g_queue_get_length (&receiver->received_intervals) > MAX_HISTORY_SIZE) return retval; current = g_slice_new (ReceivedInterval); current->first_timestamp = current->last_timestamp = timestamp; current->first_seqnum = current->last_seqnum = seqnum; current->first_recvtime = current->last_recvtime = now; g_queue_push_head (&receiver->received_intervals, current); } if (!history_too_short && g_queue_get_length (&receiver->received_intervals) > MAX_HISTORY_SIZE) { ReceivedInterval *remove = g_queue_pop_head (&receiver->received_intervals); if (remove == prev) prev = NULL; g_slice_free (ReceivedInterval, remove); } if (prev && (current->last_seqnum - current->first_seqnum == NDUPACK)) recalculate_loss_rate = TRUE; if (prev && G_UNLIKELY (prev->last_seqnum + 1 == current->first_seqnum)) { /* Merge closed gap if any */ current->first_seqnum = prev->first_seqnum; current->first_timestamp = prev->first_timestamp; current->first_recvtime = prev->first_recvtime; g_slice_free (ReceivedInterval, prev); g_queue_delete_link (&receiver->received_intervals, item->prev); prev = item->prev ? item->prev->data : NULL; recalculate_loss_rate = TRUE; } /* RFC 5348 section 6.1 Step 2, 3, 4: * Check if done * If not done, recalculte the loss event rate, * and possibly send a feedback message */ if (receiver->sender_rtt && (recalculate_loss_rate || !receiver->feedback_sent_on_last_timer)) { gdouble new_loss_event_rate = calculate_loss_event_rate (receiver, now); if (new_loss_event_rate > receiver->loss_event_rate || !receiver->feedback_sent_on_last_timer) retval |= tfrc_receiver_feedback_timer_expired (receiver, now); } return retval; } gboolean tfrc_receiver_feedback_timer_expired (TfrcReceiver *receiver, guint64 now) { if (receiver->received_bytes == 0 || receiver->prev_received_bytes_reset_time == now) { g_assert (receiver->sender_rtt != 0); receiver->feedback_timer_expiry = now + receiver->sender_rtt; receiver->feedback_sent_on_last_timer = FALSE; return FALSE; } else { return TRUE; } } gboolean tfrc_receiver_send_feedback (TfrcReceiver *receiver, guint64 now, double *loss_event_rate, guint *receive_rate) { guint received_bytes; guint64 received_bytes_reset_time; guint received_packets; if (now == receiver->prev_received_bytes_reset_time) return FALSE; if (now - receiver->received_bytes_reset_time > receiver->sender_rtt_on_last_feedback ) { receiver->prev_received_bytes_reset_time = receiver->received_bytes_reset_time; receiver->prev_received_bytes = receiver->received_bytes; receiver->prev_received_packets = receiver->received_packets; received_bytes = receiver->received_bytes; received_packets = receiver->received_packets; received_bytes_reset_time = receiver->received_bytes_reset_time; } else { receiver->prev_received_bytes += receiver->received_bytes; receiver->prev_received_packets += receiver->received_packets; received_bytes = receiver->prev_received_bytes; received_packets = receiver->prev_received_packets; received_bytes_reset_time = receiver->prev_received_bytes_reset_time; } receiver->received_bytes_reset_time = now; receiver->received_bytes = 0; receiver->received_packets = 0; receiver->receive_rate = gst_util_uint64_scale_round (SECOND, received_bytes, now - received_bytes_reset_time); if (receiver->sender_rtt_on_last_feedback && receiver->receive_rate > receiver->max_receive_rate) { receiver->max_receive_rate = receiver->receive_rate; receiver->max_receive_rate_ss = received_bytes / received_packets; } receiver->loss_event_rate = calculate_loss_event_rate (receiver, now); if (receiver->sender_rtt) receiver->feedback_timer_expiry = now + receiver->sender_rtt; receiver->sender_rtt_on_last_feedback = receiver->sender_rtt; receiver->feedback_sent_on_last_timer = TRUE; DEBUG_RECEIVER (receiver, "P: %f recv_rate: %u", receiver->loss_event_rate, receiver->receive_rate); *receive_rate = receiver->receive_rate; *loss_event_rate = receiver->loss_event_rate; return TRUE; } guint64 tfrc_receiver_get_feedback_timer_expiry (TfrcReceiver *receiver) { g_assert (receiver->sender_rtt || receiver->feedback_timer_expiry == 0); return receiver->feedback_timer_expiry; } struct _TfrcIsDataLimited { guint64 not_limited_1; guint64 not_limited_2; guint64 t_new; guint64 t_next; }; /* * This implements the algorithm proposed in RFC 5248 section 8.2.1 */ TfrcIsDataLimited * tfrc_is_data_limited_new (guint64 now) { TfrcIsDataLimited *idl = g_slice_new0 (TfrcIsDataLimited); return idl; } void tfrc_is_data_limited_free (TfrcIsDataLimited *idl) { g_slice_free (TfrcIsDataLimited, idl); } void tfrc_is_data_limited_not_limited_now (TfrcIsDataLimited *idl, guint64 now) { /* Sender is not data-limited at this instant. */ if (idl->not_limited_1 <= idl->t_new) /* Goal: NotLimited1 > t_new. */ idl->not_limited_1 = now; else if (idl->not_limited_2 <= idl->t_next) /* Goal: NotLimited2 > t_next. */ idl->not_limited_2 = now; } /* * Returns TRUE if the period since the previous feedback packet * was data limited */ gboolean tfrc_is_data_limited_received_feedback (TfrcIsDataLimited *idl, guint64 now, guint64 last_packet_timestamp, guint rtt) { gboolean ret; guint64 t_old; idl->t_new = last_packet_timestamp; t_old = idl->t_new - rtt; idl->t_next = now; if ((t_old < idl->not_limited_1 && idl->not_limited_1 <= idl->t_new) || (t_old < idl->not_limited_2 && idl->not_limited_2 <= idl->t_new)) /* This was NOT a data-limited interval */ ret = FALSE; else /* This was a data-limited interval. */ ret = TRUE; if (idl->not_limited_1 <= idl->t_new && idl->not_limited_2 > idl->t_new) idl->not_limited_1 = idl->not_limited_2; return ret; } farstream-0.2.7/gst/fsrtpconference/fs-rtp-codec-specific.c0000664000076400007640000013261712461775764020674 00000000000000/* * fs-rtp-codec-specific.c - Per-codec SDP negotiation * * Farstream RTP/AVP/SAVP/AVPF Module * Copyright (C) 2007-2010 Collabora Ltd. * Copyright (C) 2007-2010 Nokia Corporation * @author Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-codec-specific.h" #include #include #include #include #include #include "fs-rtp-conference.h" #define GST_CAT_DEFAULT fsrtpconference_nego /* * This must be kept to the maximum number of parameters + 1 */ #define MAX_PARAMS 20 struct SdpParam { gchar *name; /* The param type tell us if they should be added to the send or recv pipelines or both */ FsParamType paramtype; gboolean (*negotiate_param) (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); const gchar *default_value; }; struct SdpNegoFunction { FsMediaType media_type; const gchar *encoding_name; FsCodec * (* sdp_negotiate_codec) (FsCodec *local_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes, const struct SdpNegoFunction *nf); const struct SdpParam params[MAX_PARAMS]; }; struct SdpParamMinMax { const gchar *encoding_name; const gchar *param_name; guint min; guint max; }; static FsCodec * sdp_negotiate_codec_default ( FsCodec *local_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes, const struct SdpNegoFunction *nf); static FsCodec * sdp_negotiate_codec_h263_2000 ( FsCodec *local_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes, const struct SdpNegoFunction *nf); static FsCodec * sdp_negotiate_codec_mandatory ( FsCodec *local_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes, const struct SdpNegoFunction *nf); /* Generic param negotiation functions */ static gboolean param_minimum (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_maximum (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_both_maximum (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_equal_or_ignore (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_equal_or_not_default (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_equal_or_reject (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_list_commas (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_copy (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); /* Codec specific negotiation functions */ static gboolean param_ilbc_mode (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_h263_1998_custom (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_h263_1998_cpcf (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_telephone_events (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_h264_profile_level_id (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); static gboolean param_h264_min_req_profile (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec); const static struct SdpParamMinMax sdp_min_max_params[] = { {"H261", "qcif", 1, 4}, {"H261", "cif", 1, 4}, {"H263-1998", "sqcif", 1, 32}, {"H263-1998", "qcif", 1, 32}, {"H263-1998", "cif", 1, 32}, {"H263-1998", "cif4", 1, 32}, {"H263-1998", "cif16", 1, 32}, {"H263-1998", "bpp", 1, 65536}, {"H263-2000", "level", 0, 100}, {NULL, NULL} }; static const struct SdpNegoFunction sdp_nego_functions[] = { /* iLBC: RFC 3959 */ {FS_MEDIA_TYPE_AUDIO, "iLBC", sdp_negotiate_codec_default, { {"mode", FS_PARAM_TYPE_BOTH, param_ilbc_mode}, {NULL, 0, NULL} } }, /* H261: RFC 4587 */ {FS_MEDIA_TYPE_VIDEO, "H261", sdp_negotiate_codec_default, { {"qcif", FS_PARAM_TYPE_SEND, param_maximum}, {"cif", FS_PARAM_TYPE_SEND, param_both_maximum}, {"d", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {NULL, 0, NULL} } }, /* H263-1998 and H263-2000: RFC 4629 */ {FS_MEDIA_TYPE_VIDEO, "H263-1998", sdp_negotiate_codec_default, { {"sqcif", FS_PARAM_TYPE_SEND, param_maximum}, {"qcif", FS_PARAM_TYPE_SEND, param_maximum}, {"cif", FS_PARAM_TYPE_SEND, param_both_maximum}, {"cif4", FS_PARAM_TYPE_SEND, param_both_maximum}, {"cif16", FS_PARAM_TYPE_SEND, param_both_maximum}, {"custom", FS_PARAM_TYPE_SEND, param_h263_1998_custom}, {"f", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"i", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"j", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"t", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"k", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"n", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"p", FS_PARAM_TYPE_SEND, param_list_commas}, {"par", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"cpcf", FS_PARAM_TYPE_SEND, param_h263_1998_cpcf}, {"bpp", FS_PARAM_TYPE_SEND, param_minimum}, {"hrd", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"interlace", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {NULL, 0, NULL} } }, {FS_MEDIA_TYPE_VIDEO, "H263-2000", sdp_negotiate_codec_h263_2000, { /* Add H263-1998 params here */ {"profile", FS_PARAM_TYPE_BOTH, param_equal_or_reject, "0"}, {"level", FS_PARAM_TYPE_SEND, param_minimum, "0"}, {NULL, 0, NULL} } }, /* VORBIS: RFC 5215 */ {FS_MEDIA_TYPE_AUDIO, "VORBIS", sdp_negotiate_codec_default, { {"configuration", FS_PARAM_TYPE_CONFIG | FS_PARAM_TYPE_MANDATORY, param_copy}, {NULL, 0, NULL} } }, /* THEORA: as an extension from vorbis using RFC 5215 */ {FS_MEDIA_TYPE_VIDEO, "THEORA", sdp_negotiate_codec_default, { {"configuration", FS_PARAM_TYPE_CONFIG | FS_PARAM_TYPE_MANDATORY, param_copy}, {"delivery-method", FS_PARAM_TYPE_CONFIG, param_copy}, {NULL, 0, NULL} } }, {FS_MEDIA_TYPE_AUDIO, "G729", sdp_negotiate_codec_default, { {"annexb", FS_PARAM_TYPE_SEND, param_equal_or_not_default, "yes"}, {NULL, 0, NULL} } }, {FS_MEDIA_TYPE_VIDEO, "H264", sdp_negotiate_codec_default, { {"profile-level-id", FS_PARAM_TYPE_SEND, param_h264_profile_level_id}, {"max-mbps", FS_PARAM_TYPE_SEND, param_h264_min_req_profile}, {"max-fs", FS_PARAM_TYPE_SEND, param_h264_min_req_profile}, {"max-cpb", FS_PARAM_TYPE_SEND, param_h264_min_req_profile}, {"max-dpb", FS_PARAM_TYPE_SEND, param_h264_min_req_profile}, {"max-br", FS_PARAM_TYPE_SEND, param_h264_min_req_profile}, {"redundant-pic-cap", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"parameter-add", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"packetization-mode", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"deint-buf-cap", FS_PARAM_TYPE_SEND, param_minimum}, {"max-rcmd-nalu-size", FS_PARAM_TYPE_SEND, param_minimum}, {"sprop-parameter-sets", FS_PARAM_TYPE_CONFIG | FS_PARAM_TYPE_MANDATORY, param_copy}, {"sprop-interleaving-depth", FS_PARAM_TYPE_CONFIG, param_copy}, {"sprop-deint-buf-req", FS_PARAM_TYPE_CONFIG, param_copy}, {"sprop-init-buf-time", FS_PARAM_TYPE_CONFIG, param_copy}, {"sprop-max-don-diff", FS_PARAM_TYPE_CONFIG, param_copy}, {NULL, 0, NULL} } }, {FS_MEDIA_TYPE_AUDIO, "telephone-event", sdp_negotiate_codec_default, { {"", FS_PARAM_TYPE_SEND, param_telephone_events}, {"events", FS_PARAM_TYPE_SEND, param_telephone_events}, {NULL, 0, NULL} } }, /* JPEG2000: RFC 5371 */ {FS_MEDIA_TYPE_VIDEO, "JPEG2000", sdp_negotiate_codec_mandatory, { {"sampling", FS_PARAM_TYPE_BOTH | FS_PARAM_TYPE_MANDATORY, param_equal_or_reject}, {"interlace", FS_PARAM_TYPE_SEND, param_equal_or_ignore}, {"width", FS_PARAM_TYPE_SEND, param_minimum}, {"height", FS_PARAM_TYPE_SEND, param_minimum} } }, {0, NULL, NULL} }; static const struct SdpNegoFunction * get_sdp_nego_function (FsMediaType media_type, const gchar *encoding_name) { int i; for (i = 0; sdp_nego_functions[i].sdp_negotiate_codec; i++) if (sdp_nego_functions[i].media_type == media_type && !g_ascii_strcasecmp (sdp_nego_functions[i].encoding_name, encoding_name)) return &sdp_nego_functions[i]; return NULL; } /* * This function currently returns %TRUE if any configuration parameter is there * if some codecs require something more complicated, we will need a custom * functions for each codec */ gboolean codec_needs_config (FsCodec *codec) { const struct SdpNegoFunction *nf; int i; g_return_val_if_fail (codec, FALSE); nf = get_sdp_nego_function (codec->media_type, codec->encoding_name); if (!nf) return FALSE; for (i = 0; nf->params[i].name; i++) { if (nf->params[i].paramtype & FS_PARAM_TYPE_CONFIG && nf->params[i].paramtype & FS_PARAM_TYPE_MANDATORY) { if (!fs_codec_get_optional_parameter (codec, nf->params[i].name, NULL)) return TRUE; } } return FALSE; } static gboolean codec_param_check_type (const struct SdpNegoFunction *nf, const gchar *param_name, FsParamType paramtypes) { gint i; if (!nf) return FALSE; for (i = 0; nf->params[i].name; i++) if (nf->params[i].paramtype & paramtypes && !g_ascii_strcasecmp (nf->params[i].name, param_name)) return TRUE; return FALSE; } gboolean codec_has_config_data_named (FsCodec *codec, const gchar *param_name) { const struct SdpNegoFunction *nf; g_return_val_if_fail (codec, FALSE); g_return_val_if_fail (param_name, FALSE); nf = get_sdp_nego_function (codec->media_type, codec->encoding_name); if (nf) return codec_param_check_type (nf, param_name, FS_PARAM_TYPE_CONFIG); else return FALSE; } /** * codec_copy_filtered * @codec: a #FsCodec * @paramtypes: bitmask of types of parameters to remove * * Makes a copy of a #FsCodec, but removes all parameters that match * of the bits from the paramtypes element * * Returns: the newly-allocated #FsCodec */ FsCodec * codec_copy_filtered (FsCodec *codec, FsParamType paramtypes) { FsCodec *copy = fs_codec_copy (codec); GList *item = NULL; const struct SdpNegoFunction *nf; nf = get_sdp_nego_function (codec->media_type, codec->encoding_name); if (nf) { for (item = copy->optional_params; item;) { FsCodecParameter *param = item->data; GList *next = g_list_next (item); if (codec_param_check_type (nf, param->name, paramtypes)) fs_codec_remove_optional_parameter (copy, param); item = next; } } return copy; } /** * sdp_negotiate_codec: * * This function performs SDP offer-answer negotiation on a codec, it compares * the local codec (the one that would be sent in an offer) and the remote * codec (the one that would be received from the other side) and tries to see * if they can be negotiated into a new codec (what would be sent in a reply). * If such a codec can be created, it returns it, otherwise it returns NULL. * * RFC 3264 */ FsCodec * sdp_negotiate_codec (FsCodec *local_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes) { const struct SdpNegoFunction *nf; g_return_val_if_fail (local_codec, NULL); g_return_val_if_fail (remote_codec, NULL); if (local_codec->media_type != remote_codec->media_type) { GST_LOG ("Wrong media type, local: %s, remote: %s", fs_media_type_to_string (local_codec->media_type), fs_media_type_to_string (remote_codec->media_type)); return NULL; } if (g_ascii_strcasecmp (local_codec->encoding_name, remote_codec->encoding_name)) { GST_LOG ("Encoding names dont match, local: %s, remote: %s", local_codec->encoding_name, remote_codec->encoding_name); return NULL; } if (local_codec->clock_rate && remote_codec->clock_rate && local_codec->clock_rate != remote_codec->clock_rate) { GST_LOG ("Clock rates differ local=%u remote=%u", local_codec->clock_rate, remote_codec->clock_rate); return NULL; } nf = get_sdp_nego_function (local_codec->media_type, local_codec->encoding_name); if (nf) return nf->sdp_negotiate_codec (local_codec, local_paramtypes, remote_codec, remote_paramtypes, nf); else return sdp_negotiate_codec_default (local_codec, local_paramtypes, remote_codec, remote_paramtypes, NULL); } static const struct SdpParam * get_sdp_param (const struct SdpNegoFunction *nf, const gchar *param_name) { static const struct SdpParam ptime_params = { "ptime", FS_PARAM_TYPE_SEND_AVOID_NEGO, param_minimum }; static const struct SdpParam maxptime_params = { "maxptime", FS_PARAM_TYPE_SEND_AVOID_NEGO, param_minimum }; if (nf) { gint i; for (i = 0; nf->params[i].name; i++) if (!g_ascii_strcasecmp (param_name, nf->params[i].name)) return &nf->params[i]; if (nf->media_type != FS_MEDIA_TYPE_AUDIO) return NULL; } if (!g_ascii_strcasecmp (param_name, "ptime")) return &ptime_params; if (!g_ascii_strcasecmp (param_name, "maxptime")) return &maxptime_params; return NULL; } static gboolean param_negotiate (const struct SdpNegoFunction *nf, const gchar *param_name, FsCodec *local_codec, FsCodecParameter *local_param, FsParamType local_paramtypes, FsCodec *remote_codec, FsCodecParameter *remote_param, FsParamType remote_paramtypes, FsCodec *negotiated_codec) { const struct SdpParam *sdp_param = NULL; sdp_param = get_sdp_param (nf, param_name); if (sdp_param) { if ((sdp_param->paramtype & FS_PARAM_TYPE_BOTH) != FS_PARAM_TYPE_BOTH) { if (!(sdp_param->paramtype & local_paramtypes)) local_param = NULL; if (!(sdp_param->paramtype & remote_paramtypes)) remote_param = NULL; } if (local_param || remote_param) return sdp_param->negotiate_param (sdp_param, local_codec, local_param, remote_codec, remote_param, negotiated_codec); else return TRUE; } else { /* Assume unknown parameters are of type SEND */ if (!((remote_paramtypes | local_paramtypes) & FS_PARAM_TYPE_SEND)) return TRUE; if (local_param && remote_param) { /* Only accept codecs where unknown parameters are IDENTICAL if * they are present on both sides */ if (!g_ascii_strcasecmp (local_param->value, remote_param->value)) { fs_codec_add_optional_parameter (negotiated_codec, local_param->name, local_param->value); } else { GST_LOG ("Codec %s has different values for %s (\"%s\" and \"%s\")", local_codec->encoding_name, param_name, local_param->value, remote_param->value); return FALSE; } } else if (local_param) { fs_codec_add_optional_parameter (negotiated_codec, local_param->name, local_param->value); } else if (remote_param) { fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, remote_param->value); } } return TRUE; } static FsCodec * sdp_negotiate_codec_default (FsCodec *local_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes, const struct SdpNegoFunction *nf) { FsCodec *negotiated_codec = NULL; FsCodec *local_codec_copy = NULL; GList *local_param_e = NULL, *remote_param_e = NULL; GST_LOG ("Using default codec negotiation function for %s", local_codec->encoding_name); if (local_codec->channels && remote_codec->channels && local_codec->channels != remote_codec->channels) { GST_LOG ("Channel counts differ local=%u remote=%u", local_codec->channels, remote_codec->channels); return NULL; } negotiated_codec = fs_codec_copy (remote_codec); while (negotiated_codec->optional_params) fs_codec_remove_optional_parameter (negotiated_codec, negotiated_codec->optional_params->data); /* Lets fix here missing clock rates and channels counts */ if (negotiated_codec->channels == 0 && local_codec->channels) negotiated_codec->channels = local_codec->channels; if (negotiated_codec->clock_rate == 0) negotiated_codec->clock_rate = local_codec->clock_rate; local_codec_copy = fs_codec_copy (local_codec); for (remote_param_e = remote_codec->optional_params; remote_param_e; remote_param_e = g_list_next (remote_param_e)) { FsCodecParameter *remote_param = remote_param_e->data; FsCodecParameter *local_param = fs_codec_get_optional_parameter ( local_codec_copy, remote_param->name, NULL); if (!param_negotiate (nf, remote_param->name, local_codec, local_param, local_paramtypes, remote_codec, remote_param, remote_paramtypes, negotiated_codec)) goto non_matching_codec; if (local_param) fs_codec_remove_optional_parameter (local_codec_copy, local_param); } for (local_param_e = local_codec_copy->optional_params; local_param_e; local_param_e = g_list_next (local_param_e)) { FsCodecParameter *local_param = local_param_e->data; if (!param_negotiate (nf, local_param->name, local_codec, local_param, local_paramtypes, remote_codec, NULL, remote_paramtypes, negotiated_codec)) goto non_matching_codec; } fs_codec_destroy (local_codec_copy); return negotiated_codec; non_matching_codec: GST_LOG ("Codecs don't really match"); fs_codec_destroy (local_codec_copy); fs_codec_destroy (negotiated_codec); return NULL; } /* * sdp_negotiate_codec_h263_2000: * * For H263-2000, the "profile" must be exactly the same. If it is not, * it must be rejected. If there is none, we assume its 0. * * If profile or level is used, no other parameter should be there. * * RFC 4629 */ static FsCodec * sdp_negotiate_codec_h263_2000 ( FsCodec *local_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes, const struct SdpNegoFunction *nf) { const struct SdpNegoFunction *h263_1998_nf; GST_DEBUG ("Using H263-2000 negotiation function"); if (fs_codec_get_optional_parameter (remote_codec, "profile", NULL) && !fs_codec_get_optional_parameter (remote_codec, "level", NULL)) { GST_WARNING ("Can not accept a profile without a level"); return NULL; } if (fs_codec_get_optional_parameter (local_codec, "profile", NULL) && !fs_codec_get_optional_parameter (local_codec, "level", NULL)) { GST_WARNING ("Can not accept a profile without a level"); return NULL; } if (fs_codec_get_optional_parameter (remote_codec, "profile", NULL) || fs_codec_get_optional_parameter (remote_codec, "level", NULL) || fs_codec_get_optional_parameter (local_codec, "profile", NULL) || fs_codec_get_optional_parameter (local_codec, "level", NULL)) return sdp_negotiate_codec_default (local_codec, local_paramtypes, remote_codec, remote_paramtypes, nf); h263_1998_nf = get_sdp_nego_function (FS_MEDIA_TYPE_VIDEO, "H263-1998"); return sdp_negotiate_codec_default (local_codec, local_paramtypes, remote_codec, remote_paramtypes, h263_1998_nf); } static FsCodec * sdp_negotiate_codec_mandatory ( FsCodec *local_codec, FsParamType local_paramtypes, FsCodec *remote_codec, FsParamType remote_paramtypes, const struct SdpNegoFunction *nf) { gint i; for (i = 0; nf->params[i].name; i++) { if (nf->params[i].paramtype & FS_PARAM_TYPE_MANDATORY) { if ((nf->params[i].paramtype & local_paramtypes) || ((nf->params[i].paramtype & FS_PARAM_TYPE_BOTH) == FS_PARAM_TYPE_BOTH)) if (!fs_codec_get_optional_parameter (local_codec, nf->params[i].name, NULL)) return NULL; if ((nf->params[i].paramtype & remote_paramtypes) || ((nf->params[i].paramtype & FS_PARAM_TYPE_BOTH) == FS_PARAM_TYPE_BOTH)) if (!fs_codec_get_optional_parameter (remote_codec, nf->params[i].name, NULL)) return NULL; } } return sdp_negotiate_codec_default (local_codec, local_paramtypes, remote_codec, remote_paramtypes, nf); } struct event_range { int first; int last; }; static gint event_range_cmp (gconstpointer a, gconstpointer b) { const struct event_range *era = a; const struct event_range *erb = b; return era->first - erb->first; } static GList * parse_events (const gchar *events) { gchar **ranges_strv; GList *ranges = NULL; int i; ranges_strv = g_strsplit (events, ",", 0); for (i = 0; ranges_strv[i]; i++) { struct event_range *er = g_slice_new (struct event_range); gchar *p = NULL; er->first = atoi (ranges_strv[i]); p = strchr (ranges_strv[i], '-'); if (p) er->last = atoi (p + 1); else er->last = er->first; ranges = g_list_insert_sorted (ranges, er, event_range_cmp); } g_strfreev (ranges_strv); return ranges; } static void event_range_free (gpointer data) { g_slice_free (struct event_range, data); } static gchar * event_intersection (const gchar *remote_events, const gchar *local_events) { GList *remote_ranges = NULL; GList *local_ranges = NULL; GList *intersected_ranges = NULL; GList *item; GString *intersection_gstr; if (!g_regex_match_simple ("^[0-9]+(-[0-9]+)?(,[0-9]+(-[0-9]+)?)*$", remote_events, 0, 0)) { GST_WARNING ("Invalid remote events (events=%s)", remote_events); return NULL; } if (!g_regex_match_simple ("^[0-9]+(-[0-9]+)?(,[0-9]+(-[0-9]+)?)*$", local_events, 0, 0)) { GST_WARNING ("Invalid local events (events=%s)", local_events); return NULL; } remote_ranges = parse_events (remote_events); local_ranges = parse_events (local_events); while ((item = remote_ranges) != NULL) { struct event_range *er1 = item->data; GList *item2; item2 = local_ranges; while (item2) { struct event_range *er2 = item2->data; if (er1->last < er2->first) { break; } if (er1->first <= er2->last) { struct event_range *new_er = g_slice_new (struct event_range); new_er->first = MAX (er1->first, er2->first); new_er->last = MIN (er1->last, er2->last); intersected_ranges = g_list_append (intersected_ranges, new_er); } item2 = item2->next; if (er2->last < er1->last) { local_ranges = g_list_remove (local_ranges, er2); event_range_free (er2); } } remote_ranges = g_list_delete_link (remote_ranges, item); event_range_free (er1); } while (local_ranges) { event_range_free (local_ranges->data); local_ranges = g_list_delete_link (local_ranges, local_ranges); } if (!intersected_ranges) { GST_DEBUG ("There is no intersection before the events %s and %s", remote_events, local_events); return NULL; } intersection_gstr = g_string_new (""); while ((item = intersected_ranges) != NULL) { struct event_range *er = item->data; if (intersection_gstr->len) g_string_append_c (intersection_gstr, ','); if (er->first == er->last) g_string_append_printf (intersection_gstr, "%d", er->first); else g_string_append_printf (intersection_gstr, "%d-%d", er->first, er->last); intersected_ranges = g_list_delete_link (intersected_ranges, item); event_range_free (er); } return g_string_free (intersection_gstr, FALSE); } /** * param_telephone_events: * * For telephone events, it finds the list of events that are the same. * So it tried to intersect both lists to come up with a list of events that * both sides support. * * RFC 4733 */ static gboolean param_telephone_events (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { gchar *events; if (fs_codec_get_optional_parameter (negotiated_codec, "", NULL) || fs_codec_get_optional_parameter (negotiated_codec, "events", NULL)) return TRUE; if (!local_param) local_param = fs_codec_get_optional_parameter (local_codec, "", NULL); if (!local_param) local_param = fs_codec_get_optional_parameter (local_codec, "events", NULL); if (!remote_param) remote_param = fs_codec_get_optional_parameter (remote_codec, "", NULL); if (!remote_param) remote_param = fs_codec_get_optional_parameter (remote_codec, "events", NULL); if (!local_param) { fs_codec_add_optional_parameter (negotiated_codec, "events", remote_param->value); return TRUE; } if (!remote_param) { fs_codec_add_optional_parameter (negotiated_codec, "events", local_param->value); return TRUE; } events = event_intersection (local_param->value, remote_param->value); if (!events) { GST_LOG ("Non-intersecting values for \"events\" local=%s remote=%s", local_param->value, remote_param->value); return FALSE; } fs_codec_add_optional_parameter (negotiated_codec, "events", events); g_free (events); return TRUE; } /** * param_min_max: * * Expects both parameters to have numerical values. * If the type is known, verifies that is is valid. If it is, puts the * minimum or maximum depending on the gboolean value in the result. */ static gboolean param_min_max (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec, gboolean min, gboolean keep_single) { guint local_value = 0; gboolean local_valid = FALSE; guint remote_value = 0; gboolean remote_valid = FALSE; gchar *encoding_name = remote_codec ? remote_codec->encoding_name : local_codec->encoding_name; gchar *param_name = remote_param ? remote_param->name : local_param->name; int i; if (local_param) { local_value = strtol (local_param->value, NULL, 10); if (local_value || errno != EINVAL) local_valid = TRUE; } else if (sdp_param->default_value) { local_value = strtol (sdp_param->default_value, NULL, 10); if (local_value || errno != EINVAL) local_valid = TRUE; } if (remote_param) { remote_value = strtol (remote_param->value, NULL, 10); if (remote_value || errno != EINVAL) remote_valid = TRUE; } else if (sdp_param->default_value) { remote_value = strtol (sdp_param->default_value, NULL, 10); if (remote_value || errno != EINVAL) remote_valid = TRUE; } /* Validate values against min/max from table */ for (i = 0; sdp_min_max_params[i].encoding_name; i++) { if (!g_ascii_strcasecmp (encoding_name, sdp_min_max_params[i].encoding_name) && !g_ascii_strcasecmp (param_name, sdp_min_max_params[i].param_name)) { if (local_valid && (local_value < sdp_min_max_params[i].min || local_value > sdp_min_max_params[i].max)) local_valid = FALSE; if (remote_valid && (remote_value < sdp_min_max_params[i].min || remote_value > sdp_min_max_params[i].max)) return TRUE; break; } } if (local_valid && remote_valid) { gchar *tmp = g_strdup_printf ("%d", min ? MIN (local_value, remote_value):MAX (local_value, remote_value)); fs_codec_add_optional_parameter (negotiated_codec, param_name, tmp); g_free (tmp); } else if (remote_valid && keep_single) { fs_codec_add_optional_parameter (negotiated_codec, param_name, remote_param ? remote_param->value : sdp_param->default_value); } else if (local_valid && keep_single) { fs_codec_add_optional_parameter (negotiated_codec, param_name, local_param->value); } return TRUE; } /** * param_equal_or_ignore: * * If both params are equal, it is the result, otherwise they are removed. * Otherwise the result is nothing */ static gboolean param_equal_or_ignore (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { if (local_param && remote_param && !strcmp (local_param->value, remote_param->value)) fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, remote_param->value); return TRUE; } /** * param_equal_or_not_default: * * If both params are equal, it is the result. Otherwise, if one is not equal to * the default, the result is this param. */ static gboolean param_equal_or_not_default (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { if (local_param && remote_param && !strcmp (local_param->value, remote_param->value)) fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, remote_param->value); else if (remote_param && g_ascii_strcasecmp (remote_param->value, sdp_param->default_value)) fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, remote_param->value); else if (local_param && g_ascii_strcasecmp (local_param->value, sdp_param->default_value)) fs_codec_add_optional_parameter (negotiated_codec, local_param->name, local_param->value); return TRUE; } /** * param_minimum: * * Expects both parameters to have numerical values. * If the type is known, verifies that is is valid. If it is, puts the * minimum value in the result. */ static gboolean param_minimum (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { return param_min_max (sdp_param, local_codec, local_param, remote_codec, remote_param, negotiated_codec, TRUE, TRUE); } /** * param_maximum: * * Expects both parameters to have numerical values. * If the type is known, verifies that is is valid. If it is, puts the * maximum value in the result. */ static gboolean param_maximum (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { return param_min_max (sdp_param, local_codec, local_param, remote_codec, remote_param, negotiated_codec, FALSE, TRUE); } /** * param_both_maximum: * * Expects both parameters to have numerical values. * If the type is known, verifies that is is valid. If it is, puts the * maximum value in the result. * * Only gives a result if both sides have a value */ static gboolean param_both_maximum (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { return param_min_max (sdp_param, local_codec, local_param, remote_codec, remote_param, negotiated_codec, FALSE, FALSE); } /** * param_equal_or_reject: * * Reject the codec if both params are not equal (taking into account the * default value if there is one). * */ static gboolean param_equal_or_reject (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { const gchar *local_value = NULL; const gchar *remote_value = NULL; if (local_param) local_value = local_param->value; else if (sdp_param->default_value) local_value = sdp_param->default_value; if (remote_param) remote_value = remote_param->value; else if (sdp_param->default_value) remote_value = sdp_param->default_value; if (!local_value || !remote_value) { GST_DEBUG ("Missed a remote or a local value and don't have a default"); return FALSE; } if (strcmp (local_value, remote_value)) { GST_DEBUG ("Local value and remove value differ (%s != %s)", local_value, remote_value); return FALSE; } if (remote_param) fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, remote_param->value); else if (local_param) fs_codec_add_optional_parameter (negotiated_codec, local_param->name, local_param->value); return TRUE; } /** * param_list_commas: * * Does the intersection of two comma separated lists, returns a list * of elements that are in both. */ static gboolean param_list_commas (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { gchar **remote_strv = NULL; gchar **local_strv = NULL; GString *result = NULL; gint i; /* If one of them does not have it, just ignore it */ if (!remote_param || !local_param) return TRUE; remote_strv = g_strsplit (remote_param->value, ",", -1); local_strv = g_strsplit (local_param->value, ",", -1); for (i = 0; remote_strv[i]; i++) { gint j; for (j = 0; local_strv[j]; j++) { if (!g_ascii_strcasecmp (remote_strv[i], local_strv[j])) { if (!result) result = g_string_new (remote_strv[i]); else g_string_append_printf (result, ",%s", remote_strv[i]); } } } if (result) { fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, result->str); g_string_free (result, TRUE); } g_strfreev (remote_strv); g_strfreev (local_strv); return TRUE; } /** * param_copy: * * Copies the incoming parameter */ static gboolean param_copy (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { if (remote_param) fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, remote_param->value); else if (local_param) fs_codec_add_optional_parameter (negotiated_codec, local_param->name, local_param->value); return TRUE; } /** * param_ilbc_mode: * * For iLBC, the mode is 20 is both sides agree on 20, otherwise it is 30. * * RFC 3952 */ static gboolean param_ilbc_mode (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { if (local_param && strcmp (local_param->value, "20") && strcmp (local_param->value, "30")) { GST_DEBUG ("local iLBC has mode that is not 20 or 30 but %s", local_param->value); return FALSE; } if (remote_param && strcmp (remote_param->value, "20") && strcmp (remote_param->value, "30")) { GST_DEBUG ("remote iLBC has mode that is not 20 or 30 but %s", remote_param->value); return FALSE; } /* Only do mode=20 if both have it */ if (!local_param || !remote_param) return TRUE; if (!strcmp (local_param->value, "20") && !strcmp (remote_param->value, "20")) fs_codec_add_optional_parameter (negotiated_codec, "mode", "20"); else fs_codec_add_optional_parameter (negotiated_codec, "mode", "30"); return TRUE; } /** * param_h263_1998_custom * * If the first two params (x/y) are the same, it takes the maximum of the * 3rd params. */ static gboolean param_h263_1998_custom (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { guint remote_x, remote_y; gchar *match_string; guint match_len; guint final_mpi; GList *elem; gboolean got_one = FALSE; gchar *tmp; if (!remote_param || !local_param) return TRUE; /* Invalid param, can't parse, ignore it */ if (sscanf (remote_param->value, "%u,%u,%u", &remote_x, &remote_y, &final_mpi) != 3) return TRUE; match_string = g_strdup_printf ("%u,%u,", remote_x, remote_y); match_len = strlen (match_string); for (elem = local_codec->optional_params; elem; elem = g_list_next (elem)) { FsCodecParameter *local_param = elem->data; if (!g_ascii_strcasecmp (local_param->name, remote_param->name)) { if (!strncmp (local_param->value, match_string, match_len)) { guint local_x, local_y, local_mpi; if (sscanf (local_param->value, "%u,%u,%u", &local_x, &local_y, &local_mpi) == 3 && local_x == remote_x && local_y == remote_y) { final_mpi = MAX (final_mpi, local_mpi); got_one = TRUE; } } } } g_free (match_string); if (got_one) { tmp = g_strdup_printf ("%u,%u,%u", remote_x, remote_y, final_mpi); fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, tmp); g_free (tmp); } return TRUE; } /** * param_h263_1998_cpcf * * If the first two params (x/y) are the same, it takes the maximum of the * 6 other params */ static gboolean param_h263_1998_cpcf (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { guint remote_cd, remote_cf; gchar *match_string; guint match_len; guint final_sqcif, final_qcif, final_cif, final_4cif, final_16cif, final_custom; GList *elem; gboolean got_one = FALSE; gchar *tmp; if (!remote_param || !local_param) return TRUE; /* Invalid param, can't parse, ignore it */ if (sscanf (remote_param->value, "%u,%u,%u,%u,%u,%u,%u,%u", &remote_cd, &remote_cf, &final_sqcif, &final_qcif, &final_cif, &final_4cif, &final_16cif, &final_custom) != 8) return TRUE; match_string = g_strdup_printf ("%u,%u,", remote_cd, remote_cf); match_len = strlen (match_string); for (elem = local_codec->optional_params; elem; elem = g_list_next (elem)) { FsCodecParameter *local_param = elem->data; if (!g_ascii_strcasecmp (local_param->name, remote_param->name)) { if (!strncmp (local_param->value, match_string, match_len)) { guint local_cd, local_cf, local_sqcif, local_qcif, local_cif, local_4cif, local_16cif, local_custom; if (sscanf (local_param->value, "%u,%u,%u,%u,%u,%u,%u,%u", &local_cd, &local_cf, &local_sqcif, &local_qcif, &local_cif, &local_4cif, &local_16cif, &local_custom) == 8 && local_cd == remote_cd && local_cf == remote_cf) { final_sqcif = MAX(final_sqcif, local_sqcif); final_qcif = MAX (final_qcif, local_qcif); final_cif = MAX(final_cif, local_cif); final_4cif = MAX(final_4cif, local_4cif); final_16cif = MAX(final_16cif, local_16cif); final_custom = MAX(final_custom, local_custom); got_one = TRUE; } } } } g_free (match_string); if (got_one) { tmp = g_strdup_printf ("%u,%u,%u,%u,%u,%u,%u,%u", remote_cd, remote_cf, final_sqcif, final_qcif, final_cif, final_4cif, final_16cif, final_custom); fs_codec_add_optional_parameter (negotiated_codec, remote_param->name, tmp); g_free (tmp); } return TRUE; } static gboolean param_h264_profile_level_id (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { guint remote_value; guint local_value; guint remote_profile_idc; guint local_profile_idc; guint remote_profile_iop; guint local_profile_iop; guint nego_profile_iop; guint remote_level_idc; guint local_level_idc; guint nego_level_idc; gchar buf[7]; /* If either of them is not present, then we can only do baseline profile * with the minimum level */ if (!remote_param || !local_param) return TRUE; remote_value = strtol (remote_param->value, NULL, 16); if (remote_value == 0 && errno == EINVAL) return TRUE; local_value = strtol (local_param->value, NULL, 16); if (local_value == 0 && errno == EINVAL) return TRUE; remote_profile_idc = 0xFF & (remote_value>>16); local_profile_idc = 0xFF & (local_value>>16); if (remote_profile_idc != local_profile_idc) return TRUE; remote_profile_iop = 0xFF & (remote_value>>8); local_profile_iop = 0xFF & (local_value>>8); nego_profile_iop = remote_profile_iop | local_profile_iop; remote_level_idc = 0xFF & remote_value; local_level_idc = 0xFF & local_value; nego_level_idc = MIN (remote_level_idc, local_level_idc); g_snprintf (buf, 7, "%02X%02X%02X", local_profile_idc, nego_profile_iop, nego_level_idc); fs_codec_add_optional_parameter (negotiated_codec, sdp_param->name, buf); return TRUE; } static gboolean param_h264_min_req_profile (const struct SdpParam *sdp_param, FsCodec *local_codec, FsCodecParameter *local_param, FsCodec *remote_codec, FsCodecParameter *remote_param, FsCodec *negotiated_codec) { if (!fs_codec_get_optional_parameter (negotiated_codec, "profile-level-id", NULL)) { FsCodecParameter *local_profile = fs_codec_get_optional_parameter (local_codec, "profile-level-id", NULL); FsCodecParameter *remote_profile = fs_codec_get_optional_parameter (remote_codec, "profile-level-id", NULL); if (!local_profile || !remote_profile) return TRUE; param_h264_profile_level_id (NULL, local_codec, local_profile, remote_codec, remote_profile, negotiated_codec); if (!fs_codec_get_optional_parameter (negotiated_codec, "profile-level-id", NULL)) return TRUE; } return param_minimum (sdp_param, local_codec, local_param, remote_codec, remote_param, negotiated_codec); } static gboolean has_config_param_changed (FsCodec *codec1, FsCodec *codec2) { GList *itemp; for (itemp = codec1->optional_params; itemp; itemp = g_list_next (itemp)) { FsCodecParameter *param1 = itemp->data; if (codec_has_config_data_named (codec1, param1->name)) { FsCodecParameter *param2 = fs_codec_get_optional_parameter (codec2, param1->name, NULL); if (!param2 || strcmp (param1->value, param2->value)) return TRUE; } } return FALSE; } /** * codecs_list_has_codec_config_changed: * * Compares two lists of codecs and returns the codecs present in the * @new list have any of their config param changed since old (meaning that * this list should be sent to the other side in a reliable way). */ GList * codecs_list_has_codec_config_changed (GList *old, GList *new) { GList *item_new, *item_old; GQueue result = G_QUEUE_INIT; for (item_new = new; item_new; item_new = g_list_next (item_new)) { FsCodec *codec_new = item_new->data; for (item_old = old; item_old; item_old = g_list_next (item_old)) { FsCodec *codec_old = item_old->data; FsCodec *nego = sdp_negotiate_codec (codec_new, FS_PARAM_TYPE_BOTH, item_old->data, FS_PARAM_TYPE_BOTH); fs_codec_destroy (nego); if (nego) { if (has_config_param_changed (codec_new, codec_old) || has_config_param_changed (codec_old, codec_new)) { g_queue_push_tail (&result, fs_codec_copy (codec_new)); break; } } } } return result.head; } farstream-0.2.7/gst/fsrtpconference/fs-rtp-substream.h0000664000076400007640000000550111710041462020006 00000000000000/* * Farstream - Farstream RTP Sub Stream * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-substream.h - A Farstream RTP Substream gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_SUBSTREAM_H__ #define __FS_RTP_SUBSTREAM_H__ #include #include "fs-rtp-conference.h" #include "fs-rtp-session.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RTP_SUB_STREAM \ (fs_rtp_sub_stream_get_type ()) #define FS_RTP_SUB_STREAM(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_SUB_STREAM, FsRtpSubStream)) #define FS_RTP_SUB_STREAM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_SUB_STREAM, FsRtpSubStreamClass)) #define FS_IS_RTP_SUB_STREAM(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_SUB_STREAM)) #define FS_IS_RTP_SUB_STREAM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_SUB_STREAM)) #define FS_RTP_SUB_STREAM_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_SUB_STREAM, \ FsRtpSubStreamClass)) #define FS_RTP_SUB_STREAM_CAST(obj) ((FsRtpSubStream*) (obj)) typedef struct _FsRtpSubStream FsRtpSubStream; typedef struct _FsRtpSubStreamClass FsRtpSubStreamClass; typedef struct _FsRtpSubStreamPrivate FsRtpSubStreamPrivate; struct _FsRtpSubStreamClass { GObjectClass parent_class; }; /** * FsRtpSubStream: * */ struct _FsRtpSubStream { GObject parent; /* Those are read-only and can only be accessed while holding the session lock */ FsCodec *codec; guint32 ssrc; guint pt; gint no_rtcp_timeout; FsRtpSubStreamPrivate *priv; }; GType fs_rtp_sub_stream_get_type (void); FsRtpSubStream *fs_rtp_sub_stream_new (FsRtpConference *conference, FsRtpSession *session, GstPad *pad, guint32 ssrc, guint pt, gint no_rtcp_timeout, GError **error); void fs_rtp_sub_stream_stop (FsRtpSubStream *substream); gboolean fs_rtp_sub_stream_add_output_ghostpad_unlock ( FsRtpSubStream *substream, GError **error); void fs_rtp_sub_stream_verify_codec_locked (FsRtpSubStream *substream); G_END_DECLS #endif /* __FS_RTP_SUBSTREAM_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-codec-negotiation.h0000664000076400007640000001061312461773672021417 00000000000000/* * Farstream - Farstream RTP Codec Negotiation * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-discover-codecs.h - A Farstream RTP Codec Negotiation * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_CODEC_NEGOTIATION_H__ #define __FS_RTP_CODEC_NEGOTIATION_H__ #include "fs-rtp-discover-codecs.h" G_BEGIN_DECLS /** * CodecAssociation: * @blueprint: Blueprint used to construct this CodecAssociation (or NULL if * this is strictly from profiles) * @codec: The codec this represents.. With the receive-side paremeters * @send_codec: The same codec, but with the send-side parameters * @reserved: Marks a payload-type reserved at the users request * @disable: means that its not a real association, just a spot thats disabled, * its marks the PT of a remote codec that has been refused * @need_config: means that the config has to be retreived from the codec data * @recv_only: means thats its not a real negotiated codec, just a codec that * we have offered from which we have to be ready to receive stuff, just in case * * The codec association structure represents the link between a #FsCodec and * a CodecBlueprint that implements it. * * It should be treated as opaque by any function outside of * fs-rtp-codec-negotiation.c * */ typedef struct _CodecAssociation { CodecBlueprint *blueprint; FsCodec *codec; FsCodec *send_codec; gchar *send_profile; gchar *recv_profile; /*< private >*/ gboolean reserved; gboolean disable; gboolean need_config; gboolean recv_only; } CodecAssociation; typedef struct _CodecPreference { FsCodec *codec; GstCaps *input_caps; GstCaps *output_caps; } CodecPreference; GList *validate_codecs_configuration ( FsMediaType media_type, GList *blueprints, GList *codecs); GList * create_local_codec_associations ( GList *blueprints, GList *codec_prefs, GList *current_codec_associations, GstCaps *input_caps, GstCaps *output_caps); GList * negotiate_stream_codecs ( const GList *remote_codecs, GList *current_codec_associations, gboolean multi_stream); GList * finish_codec_negotiation ( GList *old_codec_associations, GList *new_codec_associations); CodecAssociation * lookup_codec_association_by_pt (GList *codec_associations, gint pt); CodecAssociation * lookup_codec_association_by_codec (GList *codec_associations, FsCodec *codec); CodecAssociation * lookup_codec_association_by_codec_for_sending (GList *codec_associations, FsCodec *codec); gboolean codec_association_is_valid_for_sending (CodecAssociation *ca, gboolean needs_codecbin); GList * codec_associations_to_codecs (GList *codec_associations, gboolean include_config); GList * codec_associations_to_send_codecs (GList *codec_associations); gboolean codec_associations_list_are_equal (GList *list1, GList *list2); void codec_association_list_destroy (GList *list); typedef gboolean (*CAFindFunc) (CodecAssociation *ca, gpointer user_data); CodecAssociation * lookup_codec_association_custom (GList *codec_associations, CAFindFunc func, gpointer user_data); GstElement * parse_bin_from_description_all_linked (const gchar *bin_description, FsStreamDirection direction, guint *src_pad_count, guint *sink_pad_count, GError **error); GList * create_local_header_extensions (GList *hdrext_old, GList *hdrext_prefs, guint8 *used_ids); GList * negotiate_stream_header_extensions (GList *hdrext, GList *hdrext_remote, gboolean favor_remote, guint8 *used_ids); GList * finish_header_extensions_nego (GList *hdrexts, guint8 *used_ids); void codec_preference_destroy (CodecPreference *cp); G_END_DECLS #endif /* __FS_RTP_CODEC_NEGOTIATION_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-dtmf-sound-source.c0000664000076400007640000002402012461773672021372 00000000000000/* * Farstream - Farstream RTP DTMF Sound Source * * Copyright 2007-2009 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2009 Nokia Corp. * * fs-rtp-dtmf-sound-source.c - A Farstream RTP Sound Source gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-dtmf-sound-source.h" #include #include "fs-rtp-conference.h" #include "fs-rtp-discover-codecs.h" #include "fs-rtp-codec-negotiation.h" #include "fs-rtp-codec-specific.h" #define GST_CAT_DEFAULT fsrtpconference_debug /* * SECTION:fs-rtp-dtmf-sound-source * @short_description: Class to create the source of DTMF sounds * * This class is manages the DTMF Sound source and related matters * */ /* all privates variables are protected by the mutex */ struct _FsRtpDtmfSoundSourcePrivate { gboolean disposed; }; G_DEFINE_TYPE(FsRtpDtmfSoundSource, fs_rtp_dtmf_sound_source, FS_TYPE_RTP_SPECIAL_SOURCE); #define FS_RTP_DTMF_SOUND_SOURCE_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RTP_DTMF_SOUND_SOURCE, \ FsRtpDtmfSoundSourcePrivate)) static GstElement * fs_rtp_dtmf_sound_source_build (FsRtpSpecialSource *source, GList *negotiated_codec_associations, FsCodec *selected_codec); static FsCodec *fs_rtp_dtmf_sound_source_get_codec ( FsRtpSpecialSourceClass *klass, GList *negotiated_codec_associations, FsCodec *selected_codec); static void fs_rtp_dtmf_sound_source_class_init (FsRtpDtmfSoundSourceClass *klass) { FsRtpSpecialSourceClass *spsource_class = FS_RTP_SPECIAL_SOURCE_CLASS (klass); spsource_class->build = fs_rtp_dtmf_sound_source_build; spsource_class->get_codec = fs_rtp_dtmf_sound_source_get_codec; g_type_class_add_private (klass, sizeof (FsRtpDtmfSoundSourcePrivate)); } static void fs_rtp_dtmf_sound_source_init (FsRtpDtmfSoundSource *self) { self->priv = FS_RTP_DTMF_SOUND_SOURCE_GET_PRIVATE (self); } static gboolean _is_law_codec (CodecAssociation *ca, gpointer user_data) { if (codec_association_is_valid_for_sending (ca, FALSE) && (ca->codec->id == 0 || ca->codec->id == 8)) return TRUE; else return FALSE; } /** * get_telephone_sound_codec: * @codecs: a #GList of #FsCodec * * Find the first occurence of PCMA or PCMU codecs * * Returns: The #FsCodec of type PCMA/U from the list or %NULL */ static FsCodec * get_pcm_law_sound_codec (GList *codecs, gchar **encoder_name, gchar **payloader_name, CodecAssociation **out_ca) { CodecAssociation *ca = NULL; ca = lookup_codec_association_custom (codecs, _is_law_codec, NULL); if (!ca) return NULL; if (ca->codec->id == 0) { if (encoder_name) *encoder_name = "mulawenc"; if (payloader_name) *payloader_name = "rtppcmupay"; } else if (ca->codec->id == 8) { if (encoder_name) *encoder_name = "alawenc"; if (payloader_name) *payloader_name = "rtppcmapay"; } if (out_ca) *out_ca = ca; return ca->send_codec; } static gboolean _check_element_factory (gchar *name) { GstElementFactory *fact = NULL; g_return_val_if_fail (name, FALSE); fact = gst_element_factory_find (name); if (fact) gst_object_unref (fact); return (fact != NULL); } static CodecAssociation * _get_main_codec_association (GList *codec_associations, FsCodec *codec) { CodecAssociation *ca = lookup_codec_association_by_codec_for_sending ( codec_associations, codec); if (ca && codec_association_is_valid_for_sending (ca, TRUE) && codec_blueprint_has_factory (ca->blueprint, FS_DIRECTION_SEND)) return ca; else return NULL; } static FsCodec * fs_rtp_dtmf_sound_source_get_codec (FsRtpSpecialSourceClass *klass, GList *negotiated_codec_associations, FsCodec *selected_codec) { FsCodec *codec = NULL; gchar *encoder_name = NULL; gchar *payloader_name = NULL; CodecAssociation *ca; if (selected_codec->media_type != FS_MEDIA_TYPE_AUDIO) return NULL; if (!_check_element_factory ("dtmfsrc")) return NULL; if (selected_codec->clock_rate == 8000) { codec = get_pcm_law_sound_codec (negotiated_codec_associations, &encoder_name, &payloader_name, NULL); if (codec) { if (!_check_element_factory (encoder_name)) return NULL; if (!_check_element_factory (payloader_name)) return NULL; return codec; } } ca = _get_main_codec_association (negotiated_codec_associations, selected_codec); if (ca) return ca->send_codec; else return NULL; } static GstElement * fs_rtp_dtmf_sound_source_build (FsRtpSpecialSource *source, GList *negotiated_codec_associations, FsCodec *selected_codec) { FsCodec *telephony_codec = NULL; GstCaps *caps = NULL; GstPad *pad = NULL; GstElement *dtmfsrc = NULL; GstElement *capsfilter = NULL; GstPad *ghostpad = NULL; GstElement *bin = NULL; GstElement *encoder = NULL; GstElement *payloader = NULL; gchar *encoder_name = NULL; gchar *payloader_name = NULL; CodecAssociation *ca = NULL; if (selected_codec->clock_rate == 8000) telephony_codec = get_pcm_law_sound_codec (negotiated_codec_associations, &encoder_name, &payloader_name, &ca); if (!telephony_codec) { ca = _get_main_codec_association (negotiated_codec_associations, selected_codec); if (ca) telephony_codec = ca->send_codec; } g_return_val_if_fail (telephony_codec, NULL); source->codec = fs_codec_copy (telephony_codec); GST_DEBUG ("Creating dtmf sound source for " FS_CODEC_FORMAT, FS_CODEC_ARGS (telephony_codec)); bin = gst_bin_new (NULL); dtmfsrc = gst_element_factory_make ("dtmfsrc", NULL); if (!dtmfsrc) { GST_ERROR ("Could not make rtpdtmfsrc"); goto error; } if (!gst_bin_add (GST_BIN (bin), dtmfsrc)) { GST_ERROR ("Could not add rtpdtmfsrc to bin"); gst_object_unref (dtmfsrc); goto error; } capsfilter = gst_element_factory_make ("capsfilter", NULL); if (!capsfilter) { GST_ERROR ("Could not make capsfilter"); goto error; } if (!gst_bin_add (GST_BIN (bin), capsfilter)) { GST_ERROR ("Could not add capsfilter to bin"); gst_object_unref (capsfilter); goto error; } caps = fs_codec_to_gst_caps (telephony_codec); g_object_set (capsfilter, "caps", caps, NULL); { gchar *str = gst_caps_to_string (caps); GST_DEBUG ("Using caps %s for dtmf", str); g_free (str); } gst_caps_unref (caps); pad = gst_element_get_static_pad (capsfilter, "src"); if (!pad) { GST_ERROR ("Could not get \"src\" pad from capsfilter"); goto error; } ghostpad = gst_ghost_pad_new ("src", pad); if (!ghostpad) { GST_ERROR ("Could not create a ghostpad for capsfilter src pad" " for dtmfsrc"); goto error; } if (!gst_element_add_pad (bin, ghostpad)) { GST_ERROR ("Could not get \"src\" ghostpad to dtmf sound source bin"); gst_object_unref (pad); goto error; } gst_object_unref (pad); if (ca) { gchar *codec_bin_name = g_strdup_printf ("dtmf_send_codecbin_%d", telephony_codec->id); GError *error = NULL; GstElement *codecbin = create_codec_bin_from_blueprint ( telephony_codec, ca->blueprint, codec_bin_name, FS_DIRECTION_SEND, &error); if (!codecbin) { GST_ERROR ("Could not make %s: %s", codec_bin_name, error ? error->message : "No error message!"); g_clear_error (&error); g_free (codec_bin_name); goto error; } if (!gst_bin_add (GST_BIN (bin), codecbin)) { GST_ERROR ("Could not add %s to bin", codec_bin_name); gst_object_unref (codecbin); g_free (codec_bin_name); goto error; } if (!gst_element_link_pads (dtmfsrc, "src", codecbin, "sink")) { GST_ERROR ("Could not link the rtpdtmfsrc and %s", codec_bin_name); g_free (codec_bin_name); goto error; } if (!gst_element_link_pads (codecbin, "src", capsfilter, "sink")) { GST_ERROR ("Could not link the %s and its capsfilter", codec_bin_name); g_free (codec_bin_name); goto error; } g_free (codec_bin_name); } else { encoder = gst_element_factory_make (encoder_name, NULL); if (!encoder) { GST_ERROR ("Could not make %s", encoder_name); goto error; } if (!gst_bin_add (GST_BIN (bin), encoder)) { GST_ERROR ("Could not add %s to bin", encoder_name); gst_object_unref (encoder); goto error; } if (!gst_element_link_pads (dtmfsrc, "src", encoder, "sink")) { GST_ERROR ("Could not link the rtpdtmfsrc and %s", encoder_name); goto error; } payloader = gst_element_factory_make (payloader_name, NULL); if (!payloader) { GST_ERROR ("Could not make %s", payloader_name); goto error; } if (!gst_bin_add (GST_BIN (bin), payloader)) { GST_ERROR ("Could not add %s to bin", payloader_name); gst_object_unref (payloader); goto error; } if (!gst_element_link_pads (encoder, "src", payloader, "sink")) { GST_ERROR ("Could not link the %s and %s", encoder_name, payloader_name); goto error; } if (!gst_element_link_pads (payloader, "src", capsfilter, "sink")) { GST_ERROR ("Could not link the %s and its capsfilter", payloader_name); goto error; } } return bin; error: gst_object_unref (bin); return NULL; } farstream-0.2.7/gst/fsrtpconference/fs-rtp-keyunit-manager.h0000664000076400007640000000477711710041462021117 00000000000000/* * Farstream - Farstream RTP Keyunit request manager * * Copyright 2011 Collabora Ltd. * @author: Olivier Crete * Copyright 2011 Nokia Corp. * * fs-rtp-keyunit-request.h - A Farstream RTP Key Unit request manager * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_KEYUNIT_MANAGER_H__ #define __FS_RTP_KEYUNIT_MANAGER_H__ #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RTP_KEYUNIT_MANAGER \ (fs_rtp_keyunit_manager_get_type ()) #define FS_RTP_KEYUNIT_MANAGER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_KEYUNIT_MANAGER, \ FsRtpKeyunitManager)) #define FS_RTP_KEYUNIT_MANAGER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_KEYUNIT_MANAGER, \ FsRtpKeyunitManagerClass)) #define FS_IS_RTP_KEYUNIT_MANAGER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_KEYUNIT_MANAGER)) #define FS_IS_RTP_KEYUNIT_MANAGER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_KEYUNIT_MANAGER)) #define FS_RTP_KEYUNIT_MANAGER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_KEYUNIT_MANAGER, \ FsRtpKeyunitManagerClass)) #define FS_RTP_KEYUNIT_MANAGER_CAST(obj) ((FsRtpKeyunitManager *) (obj)) typedef struct _FsRtpKeyunitManager FsRtpKeyunitManager; typedef struct _FsRtpKeyunitManagerClass FsRtpKeyunitManagerClass; typedef struct _FsRtpKeyunitManagerPrivate FsRtpKeyunitManagerPrivate; GType fs_rtp_keyunit_manager_get_type (void); FsRtpKeyunitManager *fs_rtp_keyunit_manager_new ( GObject *rtpbin_internal_session); void fs_rtp_keyunit_manager_codecbin_changed (FsRtpKeyunitManager *self, GstElement *codecbin, FsCodec *send_codec); gboolean fs_rtp_keyunit_manager_has_key_request_feedback (FsCodec *send_codec); G_END_DECLS #endif /* __FS_RTP_KEYUNIT_MANAGER_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-codec-cache.h0000664000076400007640000000242311710041462020117 00000000000000/* * Farstream - Farstream RTP Discovered Codecs cache * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-codec-cache.c - A Farstream RTP Codec Caching gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_CODEC_CACHE_H__ #define __FS_RTP_CODEC_CACHE_H__ #include "fs-rtp-discover-codecs.h" G_BEGIN_DECLS GList *load_codecs_cache (FsMediaType media_type); gboolean save_codecs_cache (FsMediaType media_type, GList *codec_blueprints); G_END_DECLS #endif /* __FS_RTP_CODEC_CACHE_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-conference.c0000664000076400007640000005544112401500475020115 00000000000000/* * Farstream - Farstream RTP Conference Implementation * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-conference.c - RTP implementation for Farstream Conference Gstreamer * Elements * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:element-fsrtpconference * @short_description: Farstream RTP Conference Gstreamer Elements * * This is the core gstreamer element for a RTP conference. It must be added * to your pipeline before anything else is done. Then you create the session, * participants and streams according to the #FsConference interface. * * The various sdes property allow you to set the content of the SDES packet * in the sent RTCP reports. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-conference.h" #include #include #include #include "fs-rtp-session.h" #include "fs-rtp-stream.h" #include "fs-rtp-participant.h" GST_DEBUG_CATEGORY (fsrtpconference_debug); GST_DEBUG_CATEGORY (fsrtpconference_disco); GST_DEBUG_CATEGORY (fsrtpconference_nego); #define GST_CAT_DEFAULT fsrtpconference_debug /* Signals */ enum { LAST_SIGNAL }; /* Properties */ enum { PROP_0, PROP_SDES, }; static GstStaticPadTemplate fs_rtp_conference_sink_template = GST_STATIC_PAD_TEMPLATE ("sink_%u", GST_PAD_SINK, GST_PAD_SOMETIMES, GST_STATIC_CAPS_ANY); static GstStaticPadTemplate fs_rtp_conference_src_template = GST_STATIC_PAD_TEMPLATE ("src_%u_%u_%u", GST_PAD_SRC, GST_PAD_SOMETIMES, GST_STATIC_CAPS_ANY); #define FS_RTP_CONFERENCE_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FS_TYPE_RTP_CONFERENCE, FsRtpConferencePrivate)) struct _FsRtpConferencePrivate { gboolean disposed; /* Protected by GST_OBJECT_LOCK */ GList *sessions; guint sessions_cookie; guint max_session_id; GList *participants; /* Array of all internal threads, as GThreads */ GPtrArray *threads; }; G_DEFINE_TYPE (FsRtpConference, fs_rtp_conference, FS_TYPE_CONFERENCE); static void fs_rtp_conference_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_rtp_conference_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void fs_rtp_conference_finalize (GObject *object); static FsSession *fs_rtp_conference_new_session (FsConference *conf, FsMediaType media_type, GError **error); static FsParticipant *fs_rtp_conference_new_participant (FsConference *conf, GError **error); static FsRtpSession *fs_rtp_conference_get_session_by_id_locked ( FsRtpConference *self, guint session_id); static FsRtpSession *fs_rtp_conference_get_session_by_id ( FsRtpConference *self, guint session_id); static GstCaps *_rtpbin_request_pt_map (GstElement *element, guint session_id, guint pt, gpointer user_data); static void _rtpbin_pad_added (GstElement *rtpbin, GstPad *new_pad, gpointer user_data); static void _rtpbin_on_bye_ssrc (GstElement *rtpbin, guint session_id, guint ssrc, gpointer user_data); static void _rtpbin_on_ssrc_validated (GstElement *rtpbin, guint session_id, guint ssrc, gpointer user_data); static void _remove_session (gpointer user_data, GObject *where_the_object_was); static void _remove_participant (gpointer user_data, GObject *where_the_object_was); static void fs_rtp_conference_handle_message ( GstBin * bin, GstMessage * message); static GstStateChangeReturn fs_rtp_conference_change_state ( GstElement *element, GstStateChange transition); static void fs_rtp_conference_dispose (GObject * object) { FsRtpConference *self = FS_RTP_CONFERENCE (object); GList *item; if (self->priv->disposed) return; if (self->rtpbin) { gst_object_unref (self->rtpbin); self->rtpbin = NULL; } for (item = g_list_first (self->priv->sessions); item; item = g_list_next (item)) g_object_weak_unref (G_OBJECT (item->data), _remove_session, self); g_list_free (self->priv->sessions); self->priv->sessions = NULL; self->priv->sessions_cookie++; for (item = g_list_first (self->priv->participants); item; item = g_list_next (item)) g_object_weak_unref (G_OBJECT (item->data), _remove_participant, self); g_list_free (self->priv->participants); self->priv->participants = NULL; self->priv->disposed = TRUE; G_OBJECT_CLASS (fs_rtp_conference_parent_class)->dispose (object); } static void fs_rtp_conference_finalize (GObject * object) { FsRtpConference *self = FS_RTP_CONFERENCE (object); /* Peek will always succeed here because we 'refed the class in the _init */ g_type_class_unref (g_type_class_peek (FS_TYPE_RTP_SUB_STREAM)); g_ptr_array_free (self->priv->threads, TRUE); G_OBJECT_CLASS (fs_rtp_conference_parent_class)->finalize (object); } static void fs_rtp_conference_class_init (FsRtpConferenceClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); FsConferenceClass *baseconf_class = FS_CONFERENCE_CLASS (klass); GstBinClass *gstbin_class = GST_BIN_CLASS (klass); g_type_class_add_private (klass, sizeof (FsRtpConferencePrivate)); GST_DEBUG_CATEGORY_INIT (fsrtpconference_debug, "fsrtpconference", 0, "Farstream RTP Conference Element"); GST_DEBUG_CATEGORY_INIT (fsrtpconference_disco, "fsrtpconference_disco", 0, "Farstream RTP Codec Discovery"); GST_DEBUG_CATEGORY_INIT (fsrtpconference_nego, "fsrtpconference_nego", 0, "Farstream RTP Codec Negotiation"); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&fs_rtp_conference_sink_template)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&fs_rtp_conference_src_template)); gst_element_class_set_metadata (gstelement_class, "Farstream RTP Conference", "Generic/Bin/RTP", "A Farstream RTP Conference", "Olivier Crete "); baseconf_class->new_session = GST_DEBUG_FUNCPTR (fs_rtp_conference_new_session); baseconf_class->new_participant = GST_DEBUG_FUNCPTR (fs_rtp_conference_new_participant); gstbin_class->handle_message = GST_DEBUG_FUNCPTR (fs_rtp_conference_handle_message); gstelement_class->change_state = GST_DEBUG_FUNCPTR (fs_rtp_conference_change_state); gobject_class->finalize = GST_DEBUG_FUNCPTR (fs_rtp_conference_finalize); gobject_class->dispose = GST_DEBUG_FUNCPTR (fs_rtp_conference_dispose); gobject_class->set_property = GST_DEBUG_FUNCPTR (fs_rtp_conference_set_property); gobject_class->get_property = GST_DEBUG_FUNCPTR (fs_rtp_conference_get_property); g_object_class_install_property (gobject_class, PROP_SDES, g_param_spec_boxed ("sdes", "SDES Items for this conference", "SDES items to use for sessions in this conference", GST_TYPE_STRUCTURE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void fs_rtp_conference_init (FsRtpConference *conf) { GST_DEBUG_OBJECT (conf, "fs_rtp_conference_init"); conf->priv = FS_RTP_CONFERENCE_GET_PRIVATE (conf); conf->priv->disposed = FALSE; conf->priv->max_session_id = 1; conf->priv->threads = g_ptr_array_new (); conf->rtpbin = gst_element_factory_make ("rtpbin", NULL); if (!conf->rtpbin) { GST_ERROR_OBJECT (conf, "Could not create Rtpbin element"); return; } if (!gst_bin_add (GST_BIN (conf), conf->rtpbin)) { GST_ERROR_OBJECT (conf, "Could not add Rtpbin element"); gst_object_unref (conf->rtpbin); conf->rtpbin = NULL; return; } gst_object_ref (conf->rtpbin); g_signal_connect (conf->rtpbin, "request-pt-map", G_CALLBACK (_rtpbin_request_pt_map), conf); g_signal_connect (conf->rtpbin, "pad-added", G_CALLBACK (_rtpbin_pad_added), conf); g_signal_connect (conf->rtpbin, "on-bye-ssrc", G_CALLBACK (_rtpbin_on_bye_ssrc), conf); g_signal_connect (conf->rtpbin, "on-ssrc-validated", G_CALLBACK (_rtpbin_on_ssrc_validated), conf); /* We have to ref the class here because the class initialization * in GLib is not thread safe * http://bugzilla.gnome.org/show_bug.cgi?id=349410 * http://bugzilla.gnome.org/show_bug.cgi?id=64764 */ g_type_class_ref (FS_TYPE_RTP_SUB_STREAM); } static void fs_rtp_conference_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsRtpConference *self = FS_RTP_CONFERENCE (object); if (!self->rtpbin) return; switch (prop_id) { case PROP_SDES: g_object_get_property (G_OBJECT (self->rtpbin), "sdes", value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_rtp_conference_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsRtpConference *self = FS_RTP_CONFERENCE (object); if (!self->rtpbin) return; switch (prop_id) { case PROP_SDES: g_object_set_property (G_OBJECT (self->rtpbin), "sdes", value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static GstCaps * _rtpbin_request_pt_map (GstElement *element, guint session_id, guint pt, gpointer user_data) { FsRtpConference *self = FS_RTP_CONFERENCE (user_data); FsRtpSession *session = NULL; GstCaps *caps = NULL; session = fs_rtp_conference_get_session_by_id (self, session_id); if (session) { caps = fs_rtp_session_request_pt_map (session, pt); g_object_unref (session); } else { GST_WARNING_OBJECT (self,"Rtpbin %p tried to request the caps for " " payload type %u for non-existent session %u", element, pt, session_id); } return caps; } static void _rtpbin_pad_added (GstElement *rtpbin, GstPad *new_pad, gpointer user_data) { FsRtpConference *self = FS_RTP_CONFERENCE (user_data); gchar *name; GST_DEBUG_OBJECT (self, "pad %s:%s added", GST_DEBUG_PAD_NAME (new_pad)); name = gst_pad_get_name (new_pad); if (g_str_has_prefix (name, "recv_rtp_src_")) { guint session_id, ssrc, pt; if (sscanf (name, "recv_rtp_src_%u_%u_%u", &session_id, &ssrc, &pt) == 3 && ssrc <= G_MAXUINT32) { FsRtpSession *session = fs_rtp_conference_get_session_by_id (self, session_id); if (session) { fs_rtp_session_new_recv_pad (session, new_pad, ssrc, pt); g_object_unref (session); } } } g_free (name); } static void _rtpbin_on_bye_ssrc (GstElement *rtpbin, guint session_id, guint ssrc, gpointer user_data) { FsRtpConference *self = FS_RTP_CONFERENCE (user_data); FsRtpSession *session = fs_rtp_conference_get_session_by_id (self, session_id); if (session) { fs_rtp_session_bye_ssrc (session, ssrc); g_object_unref (session); } } /** * fs_rtp_conference_get_session_by_id_locked * @self: The #FsRtpConference * @session_id: The session id * * Gets the #FsRtpSession from a list of sessions or NULL if it doesnt exist * You have to hold the GST_OBJECT_LOCK to call this function. * * Return value: A #FsRtpSession (unref after use) or NULL if it doesn't exist */ static FsRtpSession * fs_rtp_conference_get_session_by_id_locked (FsRtpConference *self, guint session_id) { GList *item = NULL; for (item = g_list_first (self->priv->sessions); item; item = g_list_next (item)) { FsRtpSession *session = item->data; if (session->id == session_id) { g_object_ref (session); break; } } if (item) return FS_RTP_SESSION (item->data); else return NULL; } /** * fs_rtp_conference_get_session_by_id * @self: The #FsRtpConference * @session_id: The session id * * Gets the #FsRtpSession from a list of sessions or NULL if it doesnt exist * * Return value: A #FsRtpSession (unref after use) or NULL if it doesn't exist */ static FsRtpSession * fs_rtp_conference_get_session_by_id (FsRtpConference *self, guint session_id) { FsRtpSession *session = NULL; GST_OBJECT_LOCK (self); session = fs_rtp_conference_get_session_by_id_locked (self, session_id); GST_OBJECT_UNLOCK (self); return session; } static void _remove_session (gpointer user_data, GObject *where_the_object_was) { FsRtpConference *self = FS_RTP_CONFERENCE (user_data); GST_OBJECT_LOCK (self); self->priv->sessions = g_list_remove_all (self->priv->sessions, where_the_object_was); self->priv->sessions_cookie++; GST_OBJECT_UNLOCK (self); } static void _remove_participant (gpointer user_data, GObject *where_the_object_was) { FsRtpConference *self = FS_RTP_CONFERENCE (user_data); GST_OBJECT_LOCK (self); self->priv->participants = g_list_remove_all (self->priv->participants, where_the_object_was); GST_OBJECT_UNLOCK (self); } static FsSession * fs_rtp_conference_new_session (FsConference *conf, FsMediaType media_type, GError **error) { FsRtpConference *self = FS_RTP_CONFERENCE (conf); FsSession *new_session = NULL; guint id; if (!self->rtpbin) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create Rtpbin"); return NULL; } GST_OBJECT_LOCK (self); do { id = self->priv->max_session_id++; } while (fs_rtp_conference_get_session_by_id_locked (self, id)); GST_OBJECT_UNLOCK (self); new_session = FS_SESSION_CAST (fs_rtp_session_new (media_type, self, id, error)); if (!new_session) { return NULL; } GST_OBJECT_LOCK (self); self->priv->sessions = g_list_append (self->priv->sessions, new_session); self->priv->sessions_cookie++; GST_OBJECT_UNLOCK (self); g_object_weak_ref (G_OBJECT (new_session), _remove_session, self); return new_session; } static FsParticipant * fs_rtp_conference_new_participant (FsConference *conf, GError **error) { FsRtpConference *self = FS_RTP_CONFERENCE (conf); FsParticipant *new_participant = NULL; if (!self->rtpbin) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create Rtpbin"); return NULL; } new_participant = FS_PARTICIPANT_CAST (fs_rtp_participant_new ()); GST_OBJECT_LOCK (self); self->priv->participants = g_list_append (self->priv->participants, new_participant); GST_OBJECT_UNLOCK (self); g_object_weak_ref (G_OBJECT (new_participant), _remove_participant, self); return new_participant; } static void fs_rtp_conference_handle_message ( GstBin * bin, GstMessage * message) { FsRtpConference *self = FS_RTP_CONFERENCE (bin); if (!self->rtpbin) goto out; switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_ELEMENT: { const GstStructure *s = gst_message_get_structure (message); /* we change the structure name and add the session ID to it */ if (gst_structure_has_name (s, "application/x-rtp-source-sdes") && gst_structure_has_field_typed (s, "session", G_TYPE_UINT) && gst_structure_has_field_typed (s, "ssrc", G_TYPE_UINT) && gst_structure_has_field_typed (s, "cname", G_TYPE_STRING)) { guint session_id; guint ssrc; const GValue *val; FsRtpSession *session; const gchar *cname; val = gst_structure_get_value (s, "session"); session_id = g_value_get_uint (val); val = gst_structure_get_value (s, "ssrc"); ssrc = g_value_get_uint (val); cname = gst_structure_get_string (s, "cname"); if (!ssrc || !cname) { GST_WARNING_OBJECT (self, "Got GstRTPBinSDES without a ssrc or a cname (ssrc:%u cname:%p)", ssrc, cname); break; } session = fs_rtp_conference_get_session_by_id (self, session_id); if (session) { fs_rtp_session_associate_ssrc_cname (session, ssrc, cname); g_object_unref (session); } else { GST_WARNING_OBJECT (self,"Our RtpBin announced a new association" "for non-existent session %u for ssrc: %u and cname %s", session_id, ssrc, cname); } } else if (gst_structure_has_name (s, "dtmf-event-processed") || gst_structure_has_name (s, "dtmf-event-dropped")) { GList *item; guint cookie; GST_OBJECT_LOCK (self); restart: cookie = self->priv->sessions_cookie; for (item = self->priv->sessions; item; item = item->next) { GST_OBJECT_UNLOCK (self); if (fs_rtp_session_handle_dtmf_event_message (item->data, message)) { gst_message_unref (message); message = NULL; goto out; } GST_OBJECT_LOCK (self); if (cookie != self->priv->sessions_cookie) goto restart; } GST_OBJECT_UNLOCK (self); } } break; case GST_MESSAGE_STREAM_STATUS: { GstStreamStatusType type; guint i; gst_message_parse_stream_status (message, &type, NULL); switch (type) { case GST_STREAM_STATUS_TYPE_ENTER: GST_OBJECT_LOCK (self); for (i = 0; i < self->priv->threads->len; i++) { if (g_ptr_array_index (self->priv->threads, i) == g_thread_self ()) goto done; } g_ptr_array_add (self->priv->threads, g_thread_self ()); done: GST_OBJECT_UNLOCK (self); break; case GST_STREAM_STATUS_TYPE_LEAVE: GST_OBJECT_LOCK (self); while (g_ptr_array_remove_fast (self->priv->threads, g_thread_self ())); GST_OBJECT_UNLOCK (self); break; default: /* Do nothing */ break; } } break; default: break; } out: /* forward all messages to the parent */ if (message) GST_BIN_CLASS (fs_rtp_conference_parent_class)->handle_message (bin, message); } static GstStateChangeReturn fs_rtp_conference_change_state (GstElement *element, GstStateChange transition) { FsRtpConference *self = FS_RTP_CONFERENCE (element); GstStateChangeReturn result; switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: if (!self->rtpbin) { GST_ERROR_OBJECT (element, "Could not create the RtpBin subelement"); result = GST_STATE_CHANGE_FAILURE; goto failure; } break; default: break; } if ((result = GST_ELEMENT_CLASS (fs_rtp_conference_parent_class)->change_state ( element, transition)) == GST_STATE_CHANGE_FAILURE) goto failure; return result; failure: { GST_ERROR_OBJECT (element, "parent failed state change"); return result; } } /** * fs_codec_to_gst_caps * @codec: A #FsCodec to be converted * * This function converts a #FsCodec to a fixed #GstCaps with media type * application/x-rtp. * * Return value: A newly-allocated #GstCaps or %NULL if the codec was %NULL */ GstCaps * fs_codec_to_gst_caps (const FsCodec *codec) { GstCaps *caps; GstStructure *structure; GList *item; if (codec == NULL) return NULL; caps = gst_caps_new_empty_simple ("application/x-rtp"); structure = gst_caps_get_structure (caps, 0); if (codec->encoding_name) { gchar *encoding_name = g_ascii_strup (codec->encoding_name, -1); gst_structure_set (structure, "encoding-name", G_TYPE_STRING, encoding_name, NULL); g_free (encoding_name); } if (codec->clock_rate) gst_structure_set (structure, "clock-rate", G_TYPE_INT, codec->clock_rate, NULL); if (fs_media_type_to_string (codec->media_type)) gst_structure_set (structure, "media", G_TYPE_STRING, fs_media_type_to_string (codec->media_type), NULL); if (codec->id >= 0 && codec->id < 128) gst_structure_set (structure, "payload", G_TYPE_INT, codec->id, NULL); if (codec->channels) gst_structure_set (structure, "channels", G_TYPE_INT, codec->channels, NULL); for (item = codec->optional_params; item; item = g_list_next (item)) { FsCodecParameter *param = item->data; gchar *lower_name = g_ascii_strdown (param->name, -1); if (!strcmp (lower_name, "ptime") || !strcmp (lower_name, "maxptime")) gst_structure_set (structure, lower_name, G_TYPE_UINT, atoi (param->value), NULL); else gst_structure_set (structure, lower_name, G_TYPE_STRING, param->value, NULL); g_free (lower_name); } for (item = codec->feedback_params; item; item = g_list_next (item)) { FsFeedbackParameter *param = item->data; gchar *lower_type = g_ascii_strdown (param->type, -1); gchar *rtcpfb_name; if (param->subtype[0]) { gchar *lower_subt = g_ascii_strdown (param->subtype, -1); rtcpfb_name = g_strdup_printf ("rtcp-fb-%s-%s", lower_type, lower_subt); g_free (lower_subt); } else { rtcpfb_name = g_strdup_printf ("rtcp-fb-%s", lower_type); } gst_structure_set (structure, rtcpfb_name, G_TYPE_STRING, param->extra_params, NULL); g_free (lower_type); g_free (rtcpfb_name); } return caps; } static void _rtpbin_on_ssrc_validated (GstElement *rtpbin, guint session_id, guint ssrc, gpointer user_data) { FsRtpConference *self = FS_RTP_CONFERENCE (user_data); FsRtpSession *session = fs_rtp_conference_get_session_by_id (self, session_id); if (session) { fs_rtp_session_ssrc_validated (session, ssrc); g_object_unref (session); } } gboolean fs_rtp_conference_is_internal_thread (FsRtpConference *self) { guint i; gboolean ret = FALSE; GST_OBJECT_LOCK (self); for (i = 0; i < self->priv->threads->len; i++) { if (g_ptr_array_index (self->priv->threads, i) == g_thread_self ()) { ret = TRUE; break; } } GST_OBJECT_UNLOCK (self); return ret; } farstream-0.2.7/gst/fsrtpconference/fs-rtp-participant.c0000664000076400007640000001025011710041462020307 00000000000000/* * Farstream - Farstream RTP Participant * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-participant.c - A RTP Farstream Participant gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-rtp-participant * @short_description: A RTP participant in a #FsRtpConference * * This object represents one participant or person in a RTP conference */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-participant.h" /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_CNAME }; G_DEFINE_TYPE(FsRtpParticipant, fs_rtp_participant, FS_TYPE_PARTICIPANT); struct _FsRtpParticipantPrivate { gchar *cname; }; #define FS_RTP_PARTICIPANT_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RTP_PARTICIPANT, \ FsRtpParticipantPrivate)) static void fs_rtp_participant_finalize (GObject *object); static void fs_rtp_participant_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_rtp_participant_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); // static guint signals[LAST_SIGNAL] = { 0 }; static void fs_rtp_participant_class_init (FsRtpParticipantClass *klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; gobject_class->set_property = fs_rtp_participant_set_property; gobject_class->get_property = fs_rtp_participant_get_property; gobject_class->finalize = fs_rtp_participant_finalize; /** * FsParticipant:cname: * * A string representing the cname of the current participant. * User must free the string after getting it. * */ g_object_class_install_property (gobject_class, PROP_CNAME, g_param_spec_string ("cname", "The cname of the participant", "A string of the cname of the participant", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_type_class_add_private (klass, sizeof (FsRtpParticipantPrivate)); } static void fs_rtp_participant_init (FsRtpParticipant *self) { /* member init */ self->priv = FS_RTP_PARTICIPANT_GET_PRIVATE (self); } static void fs_rtp_participant_finalize (GObject *object) { FsRtpParticipant *self = FS_RTP_PARTICIPANT (object); if (self->priv->cname) { g_free (self->priv->cname); self->priv->cname = NULL; } G_OBJECT_CLASS (fs_rtp_participant_parent_class)->finalize (object); } static void fs_rtp_participant_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsRtpParticipant *self = FS_RTP_PARTICIPANT (object); switch (prop_id) { case PROP_CNAME: g_value_set_string (value, self->priv->cname); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_rtp_participant_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsRtpParticipant *self = FS_RTP_PARTICIPANT (object); switch (prop_id) { case PROP_CNAME: self->priv->cname = g_value_dup_string (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } FsRtpParticipant *fs_rtp_participant_new (void) { return g_object_new (FS_TYPE_RTP_PARTICIPANT, NULL); } farstream-0.2.7/gst/fsrtpconference/fs-rtp-packet-modder.h0000664000076400007640000000547111710542735020537 00000000000000/* * Farstream - Farstream RTP Packet modder * * Copyright 2010 Collabora Ltd. * @author: Olivier Crete * Copyright 2010 Nokia Corp. * * fs-rtp-packet-modder.h - Filter to modify RTP packets * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_PACKET_MODDER_H__ #define __FS_RTP_PACKET_MODDER_H__ #include G_BEGIN_DECLS #define FS_TYPE_RTP_PACKET_MODDER \ (fs_rtp_packet_modder_get_type ()) #define FS_RTP_PACKET_MODDER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),FS_TYPE_RTP_PACKET_MODDER, \ FsRtpPacketModder)) #define FS_RTP_PACKET_MODDER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass),FS_TYPE_RTP_PACKET_MODDER, \ FsRtpPacketModderClass)) #define FS_IS_RTP_PACKET_MODDER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RTP_PACKET_MODDER)) #define FS_IS_RTP_PACKET_MODDER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RTP_PACKET_MODDER)) typedef struct _FsRtpPacketModder FsRtpPacketModder; typedef struct _FsRtpPacketModderClass FsRtpPacketModderClass; typedef GstBuffer *(*FsRtpPacketModderFunc) (FsRtpPacketModder *modder, GstBuffer *buffer, GstClockTime sync_time, gpointer user_data); typedef GstClockTime (*FsRtpPacketModderSyncTimeFunc) ( FsRtpPacketModder *modder, GstBuffer *buffer, gpointer user_data); /** * FsRtpPacketModder: * * Opaque #FsRtpPacketModder data structure. */ struct _FsRtpPacketModder { GstElement element; GstPad *srcpad; GstPad *sinkpad; FsRtpPacketModderFunc modder_func; FsRtpPacketModderSyncTimeFunc sync_func; gpointer user_data; /* for sync */ GstSegment segment; GstClockID clock_id; gboolean unscheduled; /* the latency of the upstream peer, we have to take this into account when * synchronizing the buffers. */ GstClockTime peer_latency; }; struct _FsRtpPacketModderClass { GstElementClass parent_class; }; GType fs_rtp_packet_modder_get_type (void); FsRtpPacketModder *fs_rtp_packet_modder_new ( FsRtpPacketModderFunc modder_func, FsRtpPacketModderSyncTimeFunc sync_func, gpointer user_data); G_END_DECLS #endif /* __FS_RTP_PACKET_MODDER_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-substream.c0000664000076400007640000011513612401500475020011 00000000000000/* * Farstream - Farstream RTP Sub Stream * * Copyright 2007-2009 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2009 Nokia Corp. * * fs-rtp-substream.c - A Farstream RTP Substream gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-substream.h" #include #include #include "fs-rtp-stream.h" #define GST_CAT_DEFAULT fsrtpconference_debug /* * SECTION:fs-rtp-sub-stream * @short_description: The receive codec bin for a ssrc and a pt * * This object controls a part of the receive pipeline, with the following shape * * rtpbin_pad -> input_valve -> capsfilter -> codecbin -> output_valve -> output_ghostad * */ /* signals */ enum { NO_RTCP_TIMEDOUT, SRC_PAD_ADDED, CODEC_CHANGED, ERROR_SIGNAL, GET_CODEC_BIN, UNLINKED, LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_CONFERENCE, PROP_SESSION, PROP_STREAM, PROP_RTPBIN_PAD, PROP_SSRC, PROP_PT, PROP_CODEC, PROP_RECEIVING, PROP_OUTPUT_GHOSTPAD, PROP_NO_RTCP_TIMEOUT }; #define DEFAULT_NO_RTCP_TIMEOUT (7000) struct _FsRtpSubStreamPrivate { /* These are only pointers, we don't own references */ FsRtpConference *conference; FsRtpSession *session; FsRtpStream *stream; /* only set once, protected by session lock */ GstPad *rtpbin_pad; gulong rtpbin_unlinked_sig; GstElement *input_valve; GstElement *output_valve; GstElement *capsfilter; /* This only exists if the codec is valid, * otherwise the rtpbin_pad is blocked */ /* Protected by the session mutex */ GstElement *codecbin; guint builder_hash; /* This is only created when the substream is associated with a FsRtpStream */ GstPad *output_ghostpad; /* Set to TRUE if the ghostpad is already being added */ /* Proteced by the session mutex */ gboolean adding_output_ghostpad; /* The id of the pad probe used to block the stream while the recv codec * is changed * Protected by the session mutex */ gulong blocking_id; gulong check_caps_id; /* This is protected by the session lock... the caller takes the lock * before updating the property.. yea nasty I know */ gboolean receiving; /* Protected by the this mutex */ GMutex mutex; GstClockID no_rtcp_timeout_id; GstClockTime next_no_rtcp_timeout; GThread *no_rtcp_timeout_thread; /* Can only be used while using the lock */ GRWLock stopped_lock; gboolean stopped; GError *construction_error; }; static GObjectClass *parent_class = NULL; static guint signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE(FsRtpSubStream, fs_rtp_sub_stream, G_TYPE_OBJECT); #define FS_RTP_SUB_STREAM_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RTP_SUB_STREAM, \ FsRtpSubStreamPrivate)) #define FS_RTP_SUB_STREAM_LOCK(substream) \ g_mutex_lock (&substream->priv->mutex) #define FS_RTP_SUB_STREAM_UNLOCK(substream) \ g_mutex_unlock (&substream->priv->mutex) static void fs_rtp_sub_stream_dispose (GObject *object); static void fs_rtp_sub_stream_finalize (GObject *object); static void fs_rtp_sub_stream_constructed (GObject *object); static void fs_rtp_sub_stream_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_rtp_sub_stream_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void fs_rtp_sub_stream_emit_error (FsRtpSubStream *substream, gint error_no, gchar *error_msg, gchar *debug_msg); static gboolean fs_rtp_sub_stream_has_stopped_enter (FsRtpSubStream *self) { g_rw_lock_reader_lock (&self->priv->stopped_lock); if (self->priv->stopped) { g_rw_lock_reader_unlock (&self->priv->stopped_lock); return TRUE; } return FALSE; } static void fs_rtp_sub_stream_has_stopped_exit (FsRtpSubStream *self) { g_rw_lock_reader_unlock (&self->priv->stopped_lock); } static void fs_rtp_sub_stream_class_init (FsRtpSubStreamClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); parent_class = fs_rtp_sub_stream_parent_class; gobject_class->constructed = fs_rtp_sub_stream_constructed; gobject_class->dispose = fs_rtp_sub_stream_dispose; gobject_class->finalize = fs_rtp_sub_stream_finalize; gobject_class->set_property = fs_rtp_sub_stream_set_property; gobject_class->get_property = fs_rtp_sub_stream_get_property; g_object_class_install_property (gobject_class, PROP_CONFERENCE, g_param_spec_object ("conference", "The FsRtpConference this substream stream refers to", "This is a convience pointer for the Conference", FS_TYPE_RTP_CONFERENCE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SESSION, g_param_spec_object ("session", "The FsRtpSession this substream stream refers to", "This is a convience pointer for the parent FsRtpSession", FS_TYPE_RTP_SESSION, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STREAM, g_param_spec_object ("stream", "The FsRtpStream this substream stream refers to", "This is a convience pointer for the parent FsRtpStream", FS_TYPE_RTP_STREAM, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_RTPBIN_PAD, g_param_spec_object ("rtpbin-pad", "The GstPad this substrea is linked to", "This is the pad on which this substream will attach itself", GST_TYPE_PAD, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SSRC, g_param_spec_uint ("ssrc", "The ssrc this stream is used for", "This is the SSRC from the pad", 0, G_MAXUINT32, 0, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PT, g_param_spec_uint ("pt", "The payload type this stream is used for", "This is the payload type from the pad", 0, 128, 0, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CODEC, g_param_spec_boxed ("codec", "The FsCodec this substream is received", "The FsCodec currently received from this substream", FS_TYPE_CODEC, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_RECEIVING, g_param_spec_boolean ("receiving", "Whether this substream will receive any data", "A toggle that prevents the substream from outputting any data", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OUTPUT_GHOSTPAD, g_param_spec_object ("output-ghostpad", "The output ghostpad for this substream", "The GstPad which is on the outside of the fsrtpconference element" " for this substream", GST_TYPE_PAD, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_NO_RTCP_TIMEOUT, g_param_spec_int ("no-rtcp-timeout", "The timeout (in ms) before no RTCP is assumed", "This is the time (in ms) after which data received without RTCP" " is attached the FsStream, this only works if there is only one" " FsStream. <=0 will do nothing", -1, G_MAXINT, DEFAULT_NO_RTCP_TIMEOUT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsRtpSubStream::no-rtcp-timedout: * @self: #FsSubStream that emitted the signal * * This signal is emitted after the timeout specified by * #FsRtpSubStream:no-rtcp-timeout if this sub-stream has not been attached * to a stream. * */ signals[NO_RTCP_TIMEDOUT] = g_signal_new ("no-rtcp-timedout", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * FsRtpSubStream::src-pad-added: * @self: #FsRtpSubStream that emitted the signal * @pad: #GstPad of the new source pad * @codec: #FsCodec of the codec being received on the new source pad * * This signal is emitted when a new gst source pad has been created for a * specific codec being received. There will be a different source pad for * each codec that is received. The user must ref the #GstPad if he wants to * keep it. The user should not modify the #FsCodec and must copy it if he * wants to use it outside the callback scope. * * This signal is not emitted on the main thread, but on GStreamer's streaming * thread! * * This is re-emited by the FsStream * */ signals[SRC_PAD_ADDED] = g_signal_new ("src-pad-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, GST_TYPE_PAD, FS_TYPE_CODEC); /** * FsRtpSubStream::error: * @self: #FsRtpSubStream that emitted the signal * @errorno: The number of the error * @error_msg: Error message to be displayed to user * @debug_msg: Debugging error message * * This signal is emitted in any error condition * */ signals[ERROR_SIGNAL] = g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING); /** * FsRtpSubStream:codec-changed * @self: #FsRtpSubStream that emitted the signal * * This signal is emitted when the code for this substream has * changed. It can be fetched from the #FsRtpSubStream:codec property * This is useful for displaying the current active reception codecs. */ signals[CODEC_CHANGED] = g_signal_new ("codec-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * FsRtpSubStream:get-codec-bin-locked * @self: #FsRtpSubStream that emitted the signal * @stream: the #FsRtpStream this substream is attached to if any (or %NULL) * @current_codec: The current codec * @new_codec: A pointer to a location where the codec can be stored * @current_builder_hash: The hash of the current codecbin builder * @new_builder_hash: A location to store the hash of the new codecbin * builder * @error: The location of a GError where an error can be stored * * This emitted when the substream want to get a codecbin or replace * the current one. * * Returns: The Codec Bin */ signals[GET_CODEC_BIN] = g_signal_new ("get-codec-bin", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_POINTER, 5, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_POINTER, G_TYPE_POINTER); /** * FsRtpSubStream:unlinked * @self: #FsRtpSubStream that emitted the signal * * This signal is emitted when the rtpbin pad that this substream decodes * from is unlinked. */ signals[UNLINKED] = g_signal_new ("unlinked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE); g_type_class_add_private (klass, sizeof (FsRtpSubStreamPrivate)); } static void fs_rtp_sub_stream_init (FsRtpSubStream *self) { self->priv = FS_RTP_SUB_STREAM_GET_PRIVATE (self); self->priv->receiving = TRUE; g_mutex_init (&self->priv->mutex); g_rw_lock_init (&self->priv->stopped_lock); } static gpointer no_rtcp_timeout_func (gpointer user_data) { FsRtpSubStream *self = FS_RTP_SUB_STREAM (user_data); GstClock *sysclock = NULL; GstClockID id; gboolean emit = TRUE; sysclock = gst_system_clock_obtain (); if (sysclock == NULL) goto no_sysclock; FS_RTP_SUB_STREAM_LOCK(self); id = self->priv->no_rtcp_timeout_id = gst_clock_new_single_shot_id (sysclock, self->priv->next_no_rtcp_timeout); FS_RTP_SUB_STREAM_UNLOCK(self); gst_clock_id_wait (id, NULL); FS_RTP_SUB_STREAM_LOCK(self); gst_clock_id_unref (id); self->priv->no_rtcp_timeout_id = NULL; if (self->priv->next_no_rtcp_timeout == 0) emit = FALSE; FS_RTP_SUB_STREAM_UNLOCK(self); gst_object_unref (sysclock); if (emit) g_signal_emit (self, signals[NO_RTCP_TIMEDOUT], 0); return NULL; no_sysclock: { fs_rtp_sub_stream_emit_error (self, FS_ERROR_INTERNAL, "Could not get system clock", "Could not get system clock"); return NULL; } } static gboolean fs_rtp_sub_stream_start_no_rtcp_timeout_thread (FsRtpSubStream *self, GError **error) { gboolean res = TRUE; GstClock *sysclock = NULL; sysclock = gst_system_clock_obtain (); if (sysclock == NULL) { g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Could not obtain gst system clock"); return FALSE; } FS_RTP_SESSION_LOCK (self->priv->session); FS_RTP_SUB_STREAM_LOCK(self); self->priv->next_no_rtcp_timeout = gst_clock_get_time (sysclock) + (self->no_rtcp_timeout * GST_MSECOND); gst_object_unref (sysclock); if (self->priv->no_rtcp_timeout_thread == NULL) { /* only create a new thread if the old one was stopped. Otherwise we can * just reuse the currently running one. */ self->priv->no_rtcp_timeout_thread = g_thread_try_new ("no rtcp timeout", no_rtcp_timeout_func, self, error); } res = (self->priv->no_rtcp_timeout_thread != NULL); if (res == FALSE && error && *error == NULL) g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Unknown error creating" " thread"); FS_RTP_SUB_STREAM_UNLOCK(self); FS_RTP_SESSION_UNLOCK (self->priv->session); return res; } static void fs_rtp_sub_stream_stop_no_rtcp_timeout_thread (FsRtpSubStream *self) { FS_RTP_SUB_STREAM_LOCK(self); self->priv->next_no_rtcp_timeout = 0; if (self->priv->no_rtcp_timeout_id) gst_clock_id_unschedule (self->priv->no_rtcp_timeout_id); if (self->priv->no_rtcp_timeout_thread == NULL) { FS_RTP_SUB_STREAM_UNLOCK(self); return; } else { FS_RTP_SUB_STREAM_UNLOCK(self); } g_thread_join (self->priv->no_rtcp_timeout_thread); FS_RTP_SUB_STREAM_LOCK(self); self->priv->no_rtcp_timeout_thread = NULL; FS_RTP_SUB_STREAM_UNLOCK(self); } static void rtpbin_pad_unlinked (GstPad *pad, GstPad *peer, gpointer user_data) { FsRtpSubStream *self = user_data; g_signal_emit (self, signals[UNLINKED], 0); } static void fs_rtp_sub_stream_constructed (GObject *object) { FsRtpSubStream *self = FS_RTP_SUB_STREAM (object); GstPad *valve_sink_pad = NULL; GstPadLinkReturn linkret; gchar *tmp; GST_DEBUG ("New substream in session %u for ssrc %x and pt %u", self->priv->session->id, self->ssrc, self->pt); if (!self->priv->conference) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "A Substream needs a conference object"); return; } self->priv->rtpbin_unlinked_sig = g_signal_connect_object ( self->priv->rtpbin_pad, "unlinked", G_CALLBACK (rtpbin_pad_unlinked), self, 0); tmp = g_strdup_printf ("output_recv_valve_%u_%u_%u", self->priv->session->id, self->ssrc, self->pt); self->priv->output_valve = gst_element_factory_make ("valve", tmp); g_free (tmp); if (!self->priv->output_valve) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create a valve element for" " session substream with ssrc: %u and pt:%d", self->ssrc, self->pt); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->output_valve)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the valve element for session" " substream with ssrc: %u and pt:%d to the conference bin", self->ssrc, self->pt); return; } /* We set the valve to dropping, the stream will unblock it when its linked */ g_object_set (self->priv->output_valve, "drop", TRUE, NULL); if (gst_element_set_state (self->priv->output_valve, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not set the valve element for session" " substream with ssrc: %u and pt:%d to the playing state", self->ssrc, self->pt); return; } tmp = g_strdup_printf ("recv_capsfilter_%u_%u_%u", self->priv->session->id, self->ssrc, self->pt); self->priv->capsfilter = gst_element_factory_make ("capsfilter", tmp); g_free (tmp); if (!self->priv->capsfilter) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create a capsfilter element for" " session substream with ssrc: %u and pt:%d", self->ssrc, self->pt); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->capsfilter)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the capsfilter element for session" " substream with ssrc: %u and pt:%d to the conference bin", self->ssrc, self->pt); return; } if (gst_element_set_state (self->priv->capsfilter, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not set the capsfilter element for session" " substream with ssrc: %u and pt:%d to the playing state", self->ssrc, self->pt); return; } tmp = g_strdup_printf ("input_recv_valve_%u_%u_%u", self->priv->session->id, self->ssrc, self->pt); self->priv->input_valve = gst_element_factory_make ("valve", tmp); g_free (tmp); if (!self->priv->input_valve) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create a valve element for" " session substream with ssrc: %u and pt:%d", self->ssrc, self->pt); return; } if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->input_valve)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the valve element for session" " substream with ssrc: %u and pt:%d to the conference bin", self->ssrc, self->pt); return; } if (gst_element_set_state (self->priv->input_valve, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not set the valve element for session" " substream with ssrc: %u and pt:%d to the playing state", self->ssrc, self->pt); return; } if (!gst_element_link (self->priv->input_valve, self->priv->capsfilter)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the input valve" " and the capsfilter"); return; } valve_sink_pad = gst_element_get_static_pad (self->priv->input_valve, "sink"); if (!valve_sink_pad) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get the valve's sink pad"); return; } linkret = gst_pad_link (self->priv->rtpbin_pad, valve_sink_pad); gst_object_unref (valve_sink_pad); if (GST_PAD_LINK_FAILED (linkret)) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the rtpbin to the codec bin (%d)", linkret); return; } if (self->no_rtcp_timeout > 0) if (!fs_rtp_sub_stream_start_no_rtcp_timeout_thread (self, &self->priv->construction_error)) return; GST_CALL_PARENT (G_OBJECT_CLASS, constructed, (object)); } static void fs_rtp_sub_stream_dispose (GObject *object) { FsRtpSubStream *self = FS_RTP_SUB_STREAM (object); fs_rtp_sub_stream_stop_no_rtcp_timeout_thread (self); if (self->priv->output_ghostpad) { gst_element_remove_pad (GST_ELEMENT (self->priv->conference), self->priv->output_ghostpad); self->priv->output_ghostpad = NULL; } if (self->priv->output_valve) { gst_element_set_locked_state (self->priv->output_valve, TRUE); gst_element_set_state (self->priv->output_valve, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->conference), self->priv->output_valve); self->priv->output_valve = NULL; } if (self->priv->codecbin) { gst_element_set_locked_state (self->priv->codecbin, TRUE); gst_element_set_state (self->priv->codecbin, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->conference), self->priv->codecbin); self->priv->codecbin = NULL; } if (self->priv->capsfilter) { gst_element_set_locked_state (self->priv->capsfilter, TRUE); gst_element_set_state (self->priv->capsfilter, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->conference), self->priv->capsfilter); self->priv->capsfilter = NULL; } if (self->priv->input_valve) { gst_element_set_locked_state (self->priv->input_valve, TRUE); gst_element_set_state (self->priv->input_valve, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->conference), self->priv->input_valve); self->priv->input_valve = NULL; } if (self->priv->rtpbin_pad) { gst_object_unref (self->priv->rtpbin_pad); self->priv->rtpbin_pad = NULL; } G_OBJECT_CLASS (fs_rtp_sub_stream_parent_class)->dispose (object); } static void fs_rtp_sub_stream_finalize (GObject *object) { FsRtpSubStream *self = FS_RTP_SUB_STREAM (object); fs_codec_destroy (self->codec); g_mutex_clear (&self->priv->mutex); g_rw_lock_clear (&self->priv->stopped_lock); G_OBJECT_CLASS (fs_rtp_sub_stream_parent_class)->finalize (object); } /* * These properties can only be accessed while holding the session lock * */ static void fs_rtp_sub_stream_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsRtpSubStream *self = FS_RTP_SUB_STREAM (object); switch (prop_id) { case PROP_CONFERENCE: self->priv->conference = g_value_get_object (value); break; case PROP_SESSION: self->priv->session = g_value_get_object (value); break; case PROP_STREAM: if (self->priv->stream) GST_WARNING ("Stream already set, not re-setting"); else self->priv->stream = g_value_get_object (value); break; case PROP_RTPBIN_PAD: self->priv->rtpbin_pad = GST_PAD (g_value_dup_object (value)); break; case PROP_SSRC: self->ssrc = g_value_get_uint (value); break; case PROP_PT: self->pt = g_value_get_uint (value); break; case PROP_RECEIVING: self->priv->receiving = g_value_get_boolean (value); if (self->priv->input_valve) g_object_set (G_OBJECT (self->priv->input_valve), "drop", !self->priv->receiving, NULL); break; case PROP_NO_RTCP_TIMEOUT: self->no_rtcp_timeout = g_value_get_int (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } /* * These properties can only be accessed while holding the session lock * */ static void fs_rtp_sub_stream_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsRtpSubStream *self = FS_RTP_SUB_STREAM (object); switch (prop_id) { case PROP_CONFERENCE: g_value_set_object (value, self->priv->conference); break; case PROP_SESSION: g_value_set_object (value, self->priv->session); break; case PROP_STREAM: g_value_set_object (value, self->priv->stream); break; case PROP_RTPBIN_PAD: g_value_set_object (value, self->priv->rtpbin_pad); break; case PROP_SSRC: g_value_set_uint (value, self->ssrc); break; case PROP_PT: g_value_set_uint (value, self->pt); break; case PROP_CODEC: g_value_set_boxed (value, self->codec); break; case PROP_RECEIVING: g_value_set_boolean (value, self->priv->receiving); break; case PROP_OUTPUT_GHOSTPAD: g_value_set_object (value, self->priv->output_ghostpad); break; case PROP_NO_RTCP_TIMEOUT: g_value_set_int (value, self->no_rtcp_timeout); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } /** * fs_rtp_sub_stream_set_codecbin: * * Add and links the rtpbin for a given substream. * Removes any codecbin that was previously there. * * This function will swallow one ref to the codecbin and the codec. * * Returns: TRUE on success */ static gboolean fs_rtp_sub_stream_set_codecbin (FsRtpSubStream *substream, GstElement *codecbin, guint builder_hash, GError **error) { gboolean ret = FALSE; GstPad *pad; if (substream->priv->codecbin) { gst_element_set_locked_state (substream->priv->codecbin, TRUE); if (gst_element_set_state (substream->priv->codecbin, GST_STATE_NULL) != GST_STATE_CHANGE_SUCCESS) { gst_element_set_locked_state (substream->priv->codecbin, FALSE); g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Could not set the codec bin for ssrc %u" " and payload type %d to the state NULL", substream->ssrc, substream->pt); gst_object_unref (codecbin); return FALSE; } gst_bin_remove (GST_BIN (substream->priv->conference), substream->priv->codecbin); FS_RTP_SESSION_LOCK (substream->priv->session); substream->priv->codecbin = NULL; substream->priv->builder_hash = 0; FS_RTP_SESSION_UNLOCK (substream->priv->session); } if (!gst_bin_add (GST_BIN (substream->priv->conference), codecbin)) { gst_object_unref (codecbin); g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the codec bin to the conference"); return FALSE; } if (gst_element_set_state (codecbin, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not set the codec bin to the playing state"); goto error; } if (!gst_element_link_pads (codecbin, "src", substream->priv->output_valve, "sink")) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the codec bin to the output_valve"); goto error; } if (!gst_element_link_pads (substream->priv->capsfilter, "src", codecbin, "sink")) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the receive capsfilter and the codecbin for pt %d", substream->pt); goto error; } pad = gst_element_get_static_pad (codecbin, "sink"); if (!pad) { g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Could not get sink pad" " from codecbin"); goto error; } gst_object_unref (pad); FS_RTP_SESSION_LOCK (substream->priv->session); substream->priv->codecbin = codecbin; substream->priv->builder_hash = builder_hash; if (substream->priv->stream && !substream->priv->output_ghostpad) { if (!fs_rtp_sub_stream_add_output_ghostpad_unlock (substream, error)) goto error; } else { FS_RTP_SESSION_UNLOCK (substream->priv->session); g_signal_emit (substream, signals[CODEC_CHANGED], 0); } return TRUE; error: gst_element_set_locked_state (codecbin, TRUE); gst_element_set_state (codecbin, GST_STATE_NULL); gst_bin_remove (GST_BIN (substream->priv->conference), codecbin); return ret; } FsRtpSubStream * fs_rtp_sub_stream_new (FsRtpConference *conference, FsRtpSession *session, GstPad *rtpbin_pad, guint32 ssrc, guint pt, gint no_rtcp_timeout, GError **error) { FsRtpSubStream *substream = g_object_new (FS_TYPE_RTP_SUB_STREAM, "conference", conference, "session", session, "rtpbin-pad", rtpbin_pad, "ssrc", ssrc, "pt", pt, "no-rtcp-timeout", no_rtcp_timeout, NULL); if (substream->priv->construction_error) { g_propagate_error (error, substream->priv->construction_error); g_object_unref (substream); return NULL; } return substream; } /** * fs_rtp_sub_stream_stop: * * Stops all of the elements on a #FsRtpSubstream */ void fs_rtp_sub_stream_stop (FsRtpSubStream *substream) { substream->priv->stopped = TRUE; g_rw_lock_writer_lock (&substream->priv->stopped_lock); substream->priv->stopped = TRUE; g_rw_lock_writer_unlock (&substream->priv->stopped_lock); if (substream->priv->rtpbin_unlinked_sig) { g_signal_handler_disconnect (substream->priv->rtpbin_pad, substream->priv->rtpbin_unlinked_sig); substream->priv->rtpbin_unlinked_sig = 0; } FS_RTP_SESSION_LOCK (substream->priv->session); if (substream->priv->blocking_id != 0) { gst_pad_remove_probe (substream->priv->rtpbin_pad, substream->priv->blocking_id); substream->priv->blocking_id = 0; } FS_RTP_SESSION_UNLOCK (substream->priv->session); if (substream->priv->check_caps_id != 0) { gst_pad_remove_probe (substream->priv->rtpbin_pad, substream->priv->check_caps_id); substream->priv->check_caps_id = 0; } if (substream->priv->output_ghostpad) gst_pad_set_active (substream->priv->output_ghostpad, FALSE); if (substream->priv->output_valve) { gst_element_set_locked_state (substream->priv->output_valve, TRUE); gst_element_set_state (substream->priv->output_valve, GST_STATE_NULL); } if (substream->priv->codecbin) { gst_element_set_locked_state (substream->priv->codecbin, TRUE); gst_element_set_state (substream->priv->codecbin, GST_STATE_NULL); } if (substream->priv->capsfilter) { gst_element_set_locked_state (substream->priv->capsfilter, TRUE); gst_element_set_state (substream->priv->capsfilter, GST_STATE_NULL); } if (substream->priv->input_valve) { gst_element_set_locked_state (substream->priv->input_valve, TRUE); gst_element_set_state (substream->priv->input_valve, GST_STATE_NULL); } } /** * fs_rtp_sub_stream_add_output_ghostpad_unlock: * * Creates and adds an output ghostpad for this substreams * * The caller MUST hold the session lock * * Returns: TRUE on Success, FALSE on error */ gboolean fs_rtp_sub_stream_add_output_ghostpad_unlock (FsRtpSubStream *substream, GError **error) { GstPad *valve_srcpad; gchar *padname = NULL; GstPad *ghostpad = NULL; FsCodec *codec = NULL; if (fs_rtp_sub_stream_has_stopped_enter (substream)) { FS_RTP_SESSION_UNLOCK (substream->priv->session); return TRUE; } if (substream->priv->adding_output_ghostpad) { FS_RTP_SESSION_UNLOCK (substream->priv->session); goto out; } g_assert (substream->priv->output_ghostpad == NULL); substream->priv->adding_output_ghostpad = TRUE; padname = g_strdup_printf ("src_%u_%u_%u", substream->priv->session->id, substream->ssrc, substream->pt); FS_RTP_SESSION_UNLOCK (substream->priv->session); valve_srcpad = gst_element_get_static_pad (substream->priv->output_valve, "src"); g_assert (valve_srcpad); ghostpad = gst_ghost_pad_new_from_template (padname, valve_srcpad, gst_element_class_get_pad_template ( GST_ELEMENT_GET_CLASS (substream->priv->conference), "src_%u_%u_%u")); gst_object_unref (valve_srcpad); g_free (padname); if (!ghostpad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build ghostpad src_%u_%u_%u", substream->priv->session->id, substream->ssrc, substream->pt); goto error; } if (!gst_pad_set_active (ghostpad, TRUE)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not activate the src_%u_%u_%u", substream->priv->session->id, substream->ssrc, substream->pt); gst_object_unref (ghostpad); goto error; } if (!gst_element_add_pad (GST_ELEMENT (substream->priv->conference), ghostpad)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add ghostpad src_%u_%u_%u to the conference", substream->priv->session->id, substream->ssrc, substream->pt); gst_object_unref (ghostpad); goto error; } FS_RTP_SESSION_LOCK (substream->priv->session); substream->priv->output_ghostpad = ghostpad; GST_DEBUG ("Src pad added on substream for ssrc:%X pt:%u " FS_CODEC_FORMAT, substream->ssrc, substream->pt, FS_CODEC_ARGS (substream->codec)); codec = fs_codec_copy (substream->codec); FS_RTP_SESSION_UNLOCK (substream->priv->session); g_signal_emit (substream, signals[SRC_PAD_ADDED], 0, ghostpad, codec); g_signal_emit (substream, signals[CODEC_CHANGED], 0); fs_codec_destroy (codec); g_object_set (substream->priv->output_valve, "drop", FALSE, NULL); out: fs_rtp_sub_stream_has_stopped_exit (substream); return TRUE; error: substream->priv->adding_output_ghostpad = FALSE; fs_rtp_sub_stream_has_stopped_exit (substream); return FALSE; } static GstPadProbeReturn _probe_check_caps (GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { FsRtpSubStream *self = FS_RTP_SUB_STREAM (user_data); GstEvent *event; GstPadProbeReturn ret = GST_PAD_PROBE_DROP; /* drop buffers before we have the right caps */ if (!(GST_PAD_PROBE_INFO_TYPE(info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)) return GST_PAD_PROBE_DROP; event = GST_PAD_PROBE_INFO_EVENT (info); /* let other events like segments through before the caps we like */ if (GST_EVENT_TYPE (event) != GST_EVENT_CAPS) return GST_PAD_PROBE_PASS; if (fs_rtp_session_has_disposed_enter (self->priv->session, NULL)) return GST_PAD_PROBE_REMOVE; if (fs_rtp_sub_stream_has_stopped_enter (self)) { fs_rtp_session_has_disposed_exit (self->priv->session); return GST_PAD_PROBE_REMOVE; } FS_RTP_SESSION_LOCK (self->priv->session); if (self->priv->codecbin && self->codec) { GstCaps *caps; gst_event_parse_caps (event, &caps); if (gst_pad_set_caps (pad, caps)) ret = GST_PAD_PROBE_REMOVE; } FS_RTP_SESSION_UNLOCK (self->priv->session); fs_rtp_sub_stream_has_stopped_exit (self); fs_rtp_session_has_disposed_exit (self->priv->session); return ret; } static GstPadProbeReturn _rtpbin_pad_blocked_callback (GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { FsRtpSubStream *substream = user_data; GError *error = NULL; GstElement *codecbin = NULL; guint new_builder_hash = 0; FsCodec *codec = NULL; FsRtpSession *session; GstCaps *caps = NULL; FS_RTP_SESSION_LOCK (substream->priv->session); substream->priv->blocking_id = 0; FS_RTP_SESSION_UNLOCK (substream->priv->session); if (fs_rtp_session_has_disposed_enter (substream->priv->session, NULL)) { return GST_PAD_PROBE_REMOVE; } if (fs_rtp_sub_stream_has_stopped_enter (substream)) { fs_rtp_session_has_disposed_exit (substream->priv->session); return GST_PAD_PROBE_REMOVE; } g_object_ref (substream); session = g_object_ref (substream->priv->session); GST_DEBUG ("Substream blocked for codec change (session:%d SSRC:%x pt:%d)", substream->priv->session->id, substream->ssrc, substream->pt); g_signal_emit (substream, signals[GET_CODEC_BIN], 0, substream->priv->stream, &codec, substream->priv->builder_hash, &new_builder_hash, &error, &codecbin); if (error) goto error; FS_RTP_SESSION_LOCK (substream->priv->session); if (codec && (!substream->codec || !fs_codec_are_equal (codec, substream->codec))) { gchar *tmp; if (substream->codec) fs_codec_destroy (substream->codec); substream->codec = codec; caps = fs_codec_to_gst_caps (codec); tmp = gst_caps_to_string (caps); GST_DEBUG ("Setting caps %s on recv substream", tmp); g_free (tmp); g_object_set (substream->priv->capsfilter, "caps", caps, NULL); } else if (codec) { fs_codec_destroy (codec); } FS_RTP_SESSION_UNLOCK (substream->priv->session); if (codecbin) { if (!fs_rtp_sub_stream_set_codecbin (substream, codecbin, new_builder_hash, &error)) goto error; } if (caps) { if (!gst_pad_set_caps (substream->priv->rtpbin_pad, caps)) { if (substream->priv->check_caps_id == 0) substream->priv->check_caps_id = gst_pad_add_probe (substream->priv->rtpbin_pad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, _probe_check_caps, g_object_ref (substream), g_object_unref); } gst_caps_unref (caps); } out: g_clear_error (&error); fs_rtp_sub_stream_has_stopped_exit (substream); fs_rtp_session_has_disposed_exit (substream->priv->session); g_object_unref (substream); g_object_unref (session); return GST_PAD_PROBE_REMOVE; error: g_prefix_error (&error, "Could not add the new recv codec bin for" " ssrc %u and payload type %d to the state NULL: ", substream->ssrc, substream->pt); if (substream->priv->stream) fs_stream_emit_error (FS_STREAM (substream->priv->stream), FS_ERROR_CONSTRUCTION, error->message); else fs_session_emit_error (FS_SESSION (substream->priv->session), FS_ERROR_CONSTRUCTION, error->message); if (caps) gst_caps_unref (caps); goto out; } /** * fs_rtp_sub_stream_verify_codec_locked: * @substream: A #FsRtpSubStream * * This function will start the process that invalidates the codec * for this rtpbin. * * You must hold the session lock to call it. */ void fs_rtp_sub_stream_verify_codec_locked (FsRtpSubStream *substream) { if (fs_rtp_sub_stream_has_stopped_enter (substream)) return; GST_LOG ("Starting codec verification process for substream with" " SSRC:%x pt:%d", substream->ssrc, substream->pt); if (!substream->priv->blocking_id) substream->priv->blocking_id = gst_pad_add_probe ( substream->priv->rtpbin_pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, _rtpbin_pad_blocked_callback, g_object_ref (substream), g_object_unref); fs_rtp_sub_stream_has_stopped_exit (substream); } static void fs_rtp_sub_stream_emit_error (FsRtpSubStream *substream, gint error_no, gchar *error_msg, gchar *debug_msg) { g_signal_emit (substream, signals[ERROR_SIGNAL], 0, error_no, error_msg, debug_msg); } farstream-0.2.7/gst/fsrtpconference/fs-rtp-conference-plugin.c0000664000076400007640000000325112401500475021401 00000000000000/* * Farstream - Farstream RTP Conference Implementation * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * gstfsrtpconference.c - RTP implementation for Farstream Conference Gstreamer * Elements * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "fs-rtp-conference.h" static gboolean plugin_init (GstPlugin * plugin) { return gst_element_register (plugin, "fsrtpconference", GST_RANK_NONE, FS_TYPE_RTP_CONFERENCE); } #ifdef BUILD_GTK_DOC void fs_rtp_plugin_init_real (void) { gst_plugin_register_static ( #else GST_PLUGIN_DEFINE ( #endif GST_VERSION_MAJOR, GST_VERSION_MINOR, fsrtpconference, "Farstream RTP Conference plugin", plugin_init, VERSION, "LGPL", "Farstream", "http://www.freedesktop.org/wiki/Software/Farstream" #ifdef BUILD_GTK_DOC ); } #else ) #endif farstream-0.2.7/gst/fsrtpconference/default-element-properties0000664000076400007640000000242412401500475021612 00000000000000# Put the desired properties in the style of # # [element name] # prop1=val1 # # Video codecs default to 256 kbps # # 100ms for the jitterbuffer is a good tradeoff [rtpbin] latency=100 [x264enc] byte-stream=1 bitrate=256 profile=baseline # Zerolatency is needed because the default latency is pretty high tune=zerolatency # 3 is "veryfast", presets go from 1 (ultrafast) to 10 (veryslow) speed-preset=3 # These are all included in profile=baseline but stay here for older versions bframes=0 b-adapt=0 cabac=0 dct8x8=0 # With zerolatency, threads are per slice, but slices confuse some decoders threads=1 # Access-Unit Delimiters are a waste of bandwidth aud=0 # Try to make GOBs as small as possible [ffenc_h263] rtp-payload-size=1 [theoraenc] bitrate=256 [vp8enc] target-bitrate=256000 deadline=1 cpu-used=4 lag-in-frames=0 error-resilient=1 [rtppcmupay] ptime-multiple=20000000 [rtppcmapay] ptime-multiple=20000000 # Set appropriate buffer/latency parameters for voip. The key parameter is # buffer-time, which determines the latency in the conventional sense (X us of # buffering between client and playback/capture. We take a conservatively high # value for these to lower CPU load on less powerful systems. [pulsesink] buffer-time=40000 latency-time=20000 [pulsesrc] buffer-time=20000 farstream-0.2.7/gst/fsrtpconference/fs-rtp-bin-error-downgrade.h0000664000076400007640000000425212401500475021654 00000000000000/* * Farstream Voice+Video library * * Copyright 2012 Collabora Ltd, * @author: Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_BIN_ERROR_DOWNGRADE_H__ #define __FS_RTP_BIN_ERROR_DOWNGRADE_H__ #include G_BEGIN_DECLS /* #define's don't like whitespacey bits */ #define FS_TYPE_RTP_BIN_ERROR_DOWNGRADE \ (fs_rtp_bin_error_downgrade_get_type()) #define FS_RTP_BIN_ERROR_DOWNGRADE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), \ FS_TYPE_RTP_BIN_ERROR_DOWNGRADE,FsRtpBinErrorDowngrade)) #define FS_RTP_BIN_ERROR_DOWNGRADE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), \ FS_TYPE_RTP_BIN_ERROR_DOWNGRADE,FsRtpBinErrorDowngradeClass)) #define FS_IS_RTP_BIN_ERROR_DOWNGRADE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_RTP_BIN_ERROR_DOWNGRADE)) #define FS_IS_RTP_BIN_ERROR_DOWNGRADE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_RTP_BIN_ERROR_DOWNGRADE)) typedef struct _FsRtpBinErrorDowngrade FsRtpBinErrorDowngrade; typedef struct _FsRtpBinErrorDowngradeClass FsRtpBinErrorDowngradeClass; typedef struct _FsRtpBinErrorDowngradePrivate FsRtpBinErrorDowngradePrivate; struct _FsRtpBinErrorDowngrade { GstBin parent; }; struct _FsRtpBinErrorDowngradeClass { GstBinClass parent_class; }; GType fs_rtp_bin_error_downgrade_get_type (void); void fs_rtp_bin_error_downgrade_register (void); GstElement *fs_rtp_bin_error_downgrade_new (const gchar *name); G_END_DECLS #endif /* __FS_RTP_BIN_ERROR_DOWNGRADE_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-participant.h0000664000076400007640000000474611710041462020331 00000000000000/* * Farstream - Farstream RTP Participant * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-participant.h - A Farstream RTP Participant gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_PARTICIPANT_H__ #define __FS_RTP_PARTICIPANT_H__ #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RTP_PARTICIPANT (fs_rtp_participant_get_type()) #define FS_RTP_PARTICIPANT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_PARTICIPANT, \ FsRtpParticipant)) #define FS_RTP_PARTICIPANT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_PARTICIPANT, \ FsRtpParticipantClass)) #define FS_IS_RTP_PARTICIPANT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_PARTICIPANT)) #define FS_IS_RTP_PARTICIPANT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_PARTICIPANT)) #define FS_RTP_PARTICIPANT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_PARTICIPANT, \ FsRtpParticipantClass)) #define FS_RTP_PARTICIPANT_CAST(obj) ((FsRtpParticipant *) (obj)) typedef struct _FsRtpParticipant FsRtpParticipant; typedef struct _FsRtpParticipantClass FsRtpParticipantClass; typedef struct _FsRtpParticipantPrivate FsRtpParticipantPrivate; struct _FsRtpParticipantClass { FsParticipantClass parent_class; /*virtual functions */ /*< private >*/ FsRtpParticipantPrivate *priv; }; /** * FsRtpParticipant: * */ struct _FsRtpParticipant { FsParticipant parent; FsRtpParticipantPrivate *priv; /*< private >*/ }; GType fs_rtp_participant_get_type (void); FsRtpParticipant *fs_rtp_participant_new (void); G_END_DECLS #endif /* __FS_RTP_PARTICIPANT_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-codec-cache.c0000664000076400007640000004017112461773672020137 00000000000000/* * Farstream - Farstream RTP Discovered Codecs cache * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-codec-cache.c - A Farstream RTP Codec Caching gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-codec-cache.h" #include #ifdef HAVE_UNISTD_H # include #endif #include #include #include #include #include "fs-rtp-conference.h" /* Because of annoying CRTs */ #if defined (_MSC_VER) && _MSC_VER >= 1400 # include # define open _open # define close _close # define read _read # define write _write # define stat _stat # define STAT_TYPE struct _stat #else # define STAT_TYPE struct stat #endif #define GST_CAT_DEFAULT fsrtpconference_disco static gboolean codecs_cache_valid (gchar *cache_path) { time_t cache_ts = 0; time_t registry_ts = 0; STAT_TYPE cache_stat; STAT_TYPE registry_stat; gchar *registry_xml_path; gchar *registry_bin_path; registry_xml_path = g_strdup (g_getenv ("GST_REGISTRY")); if (registry_xml_path == NULL) { registry_bin_path = g_build_filename (g_get_home_dir (), ".gstreamer-" GST_API_VERSION, "registry." HOST_CPU ".bin", NULL); registry_xml_path = g_build_filename (g_get_home_dir (), ".gstreamer-" GST_API_VERSION, "registry." HOST_CPU ".xml", NULL); } else { registry_bin_path = g_strdup (registry_xml_path); } if (stat (registry_xml_path, ®istry_stat) == 0) { registry_ts = registry_stat.st_mtime; } if (stat (registry_bin_path, ®istry_stat) == 0) { if (registry_ts < registry_stat.st_mtime) { registry_ts = registry_stat.st_mtime; } } if (stat (cache_path, &cache_stat) == 0) { cache_ts = cache_stat.st_mtime; } g_free (registry_bin_path); g_free (registry_xml_path); return (registry_ts != 0 && cache_ts > registry_ts); } static gchar * get_codecs_cache_path (FsMediaType media_type) { gchar *cache_path; if (media_type == FS_MEDIA_TYPE_AUDIO) { cache_path = g_strdup (g_getenv ("FS_AUDIO_CODECS_CACHE")); if (cache_path == NULL) { cache_path = g_build_filename (g_get_user_cache_dir (), "farstream", "codecs.audio." HOST_CPU ".cache", NULL); } } else if (media_type == FS_MEDIA_TYPE_VIDEO) { cache_path = g_strdup (g_getenv ("FS_VIDEO_CODECS_CACHE")); if (cache_path == NULL) { cache_path = g_build_filename (g_get_user_cache_dir (), "farstream", "codecs.video." HOST_CPU ".cache", NULL); } } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { cache_path = g_strdup (g_getenv ("FS_APPLICATION_CODECS_CACHE")); if (cache_path == NULL) { cache_path = g_build_filename (g_get_user_cache_dir (), "farstream", "codecs.application." HOST_CPU ".cache", NULL); } } else { GST_ERROR ("Unknown media type %d for cache loading", media_type); return NULL; } return cache_path; } static gboolean read_codec_blueprint_uint (gchar **in, gsize *size, guint *val) { if (*size < sizeof (guint)) return FALSE; memcpy (val, *in, sizeof(guint)); *in += sizeof (guint); *size -= sizeof (guint); return TRUE; } static gboolean read_codec_blueprint_int (gchar **in, gsize *size, gint *val) { if (*size < sizeof (gint)) return FALSE; memcpy (val, *in, sizeof(gint)); *in += sizeof (gint); *size -= sizeof (gint); return TRUE; } static gboolean read_codec_blueprint_string (gchar **in, gsize *size, gchar **str) { gint str_length; if (!read_codec_blueprint_int (in, size, &str_length)) return FALSE; if (*size < str_length) return FALSE; *str = g_new0 (gchar, str_length +1); memcpy (*str, *in, str_length); *in += str_length; *size -= str_length; return TRUE; } #define READ_CHECK(x) if (!x) goto error; static CodecBlueprint * load_codec_blueprint (FsMediaType media_type, gchar **in, gsize *size) { CodecBlueprint *codec_blueprint = g_slice_new0 (CodecBlueprint); gchar *tmp; gint tmp_size; int i; gint id; gchar *encoding_name = NULL; guint clock_rate; READ_CHECK (read_codec_blueprint_int (in, size, &(id))); READ_CHECK (read_codec_blueprint_string (in, size, &(encoding_name))); READ_CHECK (read_codec_blueprint_uint (in, size, &(clock_rate))); codec_blueprint->codec = fs_codec_new (id, encoding_name, media_type, clock_rate); g_free (encoding_name); READ_CHECK (read_codec_blueprint_uint (in, size, &(codec_blueprint->codec->channels))); READ_CHECK (read_codec_blueprint_int (in, size, &tmp_size)); for (i = 0; i < tmp_size; i++) { gchar *name, *value; READ_CHECK (read_codec_blueprint_string (in, size, &(name))); READ_CHECK (read_codec_blueprint_string (in, size, &(value))); fs_codec_add_optional_parameter (codec_blueprint->codec, name, value); g_free (name); g_free (value); } READ_CHECK (read_codec_blueprint_string (in, size, &tmp)); codec_blueprint->media_caps = gst_caps_from_string (tmp); g_free (tmp); READ_CHECK (read_codec_blueprint_string (in, size, &tmp)); codec_blueprint->rtp_caps = gst_caps_from_string (tmp); g_free (tmp); READ_CHECK (read_codec_blueprint_string (in, size, &tmp)); codec_blueprint->input_caps = gst_caps_from_string (tmp); g_free (tmp); READ_CHECK (read_codec_blueprint_string (in, size, &tmp)); codec_blueprint->output_caps = gst_caps_from_string (tmp); g_free (tmp); READ_CHECK (read_codec_blueprint_int (in, size, &tmp_size)); for (i = 0; i < tmp_size; i++) { int j, tmp_size2; GList *tmplist = NULL; READ_CHECK (read_codec_blueprint_int (in, size, &tmp_size2)); for (j = 0; j < tmp_size2; j++) { GstElementFactory *fact = NULL; READ_CHECK (read_codec_blueprint_string (in, size, &(tmp))); fact = gst_element_factory_find (tmp); g_free (tmp); if (!fact) goto error; tmplist = g_list_append (tmplist, fact); } codec_blueprint->send_pipeline_factory = g_list_append (codec_blueprint->send_pipeline_factory, tmplist); } READ_CHECK (read_codec_blueprint_int (in, size, &tmp_size)); for (i = 0; i < tmp_size; i++) { int j, tmp_size2; GList *tmplist = NULL; READ_CHECK (read_codec_blueprint_int (in, size, &tmp_size2)); for (j = 0; j < tmp_size2; j++) { GstElementFactory *fact = NULL; READ_CHECK (read_codec_blueprint_string (in, size, &(tmp))); fact = gst_element_factory_find (tmp); g_free (tmp); if (!fact) goto error; tmplist = g_list_append (tmplist, fact); } codec_blueprint->receive_pipeline_factory = g_list_append (codec_blueprint->receive_pipeline_factory, tmplist); } GST_DEBUG ("adding codec %s with pt %d, send_pipeline %p, receive_pipeline %p", codec_blueprint->codec->encoding_name, codec_blueprint->codec->id, codec_blueprint->send_pipeline_factory, codec_blueprint->receive_pipeline_factory); return codec_blueprint; error: codec_blueprint_destroy (codec_blueprint); return NULL; } /** * load_codecs_cache * @media_type: a #FsMediaType * * Will load the codecs blueprints from the cache. * * Returns: TRUE if successful, FALSE if error, or cache outdated * */ GList * load_codecs_cache (FsMediaType media_type) { GMappedFile *mapped = NULL; gchar *contents = NULL; gchar *in = NULL; gsize size; GError *err = NULL; GList *blueprints = NULL; gchar magic[8] = {0}; gchar magic_media = '?'; gint num_blueprints; gchar *cache_path; int i; if (media_type == FS_MEDIA_TYPE_AUDIO) { magic_media = 'A'; } else if (media_type == FS_MEDIA_TYPE_VIDEO) { magic_media = 'V'; } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { magic_media = 'P'; } else { GST_ERROR ("Invalid media type %d", media_type); return NULL; } cache_path = get_codecs_cache_path (media_type); if (!cache_path) return NULL; if (!codecs_cache_valid (cache_path)) { GST_DEBUG ("Codecs cache %s is outdated or does not exist", cache_path); g_free (cache_path); return NULL; } GST_DEBUG ("Loading codecs cache %s", cache_path); mapped = g_mapped_file_new (cache_path, FALSE, &err); if (mapped == NULL) { GST_DEBUG ("Unable to mmap file %s : %s", cache_path, err ? err->message: "unknown error"); g_clear_error (&err); if (!g_file_get_contents (cache_path, &contents, &size, NULL)) goto error; } else { if ((contents = g_mapped_file_get_contents (mapped)) == NULL) { GST_WARNING ("Can't load file %s : %s", cache_path, g_strerror (errno)); goto error; } /* check length for header */ size = g_mapped_file_get_length (mapped); } /* in is a cursor pointer on the file contents */ in = contents; if (size < sizeof (magic)) { GST_WARNING ("Cache file corrupt"); goto error; } memcpy (magic, in, sizeof (magic)); in += sizeof (magic); size -= sizeof (magic); if (magic[0] != 'F' || magic[1] != 'S' || magic[2] != magic_media || magic[3] != 'C' || magic[4] != '1' || /* This is the version number */ magic[5] != '2') { GST_WARNING ("Cache file has incorrect magic header. File corrupted"); goto error; } if (size < sizeof (gint)) { GST_WARNING ("Cache file corrupt (size: %"G_GSIZE_FORMAT" < sizeof (int))", size); goto error; } memcpy (&num_blueprints, in, sizeof(gint)); in += sizeof (gint); size -= sizeof (gint); if (num_blueprints > 50) { GST_WARNING ("Impossible number of blueprints in cache %d, ignoring", num_blueprints); goto error; } for (i = 0; i < num_blueprints; i++) { CodecBlueprint *blueprint = load_codec_blueprint (media_type, &in, &size); if (!blueprint) { GST_WARNING ("Can not load all of the blueprints, cache corrupted"); if (blueprints) { g_list_foreach (blueprints, (GFunc) codec_blueprint_destroy, NULL); g_list_free (blueprints); blueprints = NULL; } goto error; } blueprints = g_list_append (blueprints, blueprint); } error: if (mapped) { #if GLIB_CHECK_VERSION(2,22,0) g_mapped_file_unref (mapped); #else g_mapped_file_free (mapped); #endif } else { g_free (contents); } g_free (cache_path); return blueprints; } #define WRITE_CHECK(x) if (!x) return FALSE; static gboolean write_codec_blueprint_int (int fd, gint val) { return write (fd, &val, sizeof (gint)) == sizeof (gint); } static gboolean write_codec_blueprint_string (int fd, const gchar *str) { gint size; size = strlen (str); WRITE_CHECK (write_codec_blueprint_int (fd, size)); return write (fd, str, size) == size; } static gboolean save_codec_blueprint (int fd, CodecBlueprint *codec_blueprint) { gchar *caps; const gchar *factory_name; GList *walk; gint size; WRITE_CHECK (write_codec_blueprint_int (fd, codec_blueprint->codec->id)); WRITE_CHECK (write_codec_blueprint_string (fd, codec_blueprint->codec->encoding_name)); WRITE_CHECK (write_codec_blueprint_int (fd, codec_blueprint->codec->clock_rate)); WRITE_CHECK (write_codec_blueprint_int (fd, codec_blueprint->codec->channels)); size = g_list_length (codec_blueprint->codec->optional_params); WRITE_CHECK (write_codec_blueprint_int (fd, size)); for (walk = codec_blueprint->codec->optional_params; walk; walk = g_list_next (walk)) { FsCodecParameter *param = walk->data; WRITE_CHECK (write_codec_blueprint_string (fd, param->name)); WRITE_CHECK (write_codec_blueprint_string (fd, param->value)); } caps = gst_caps_to_string (codec_blueprint->media_caps); WRITE_CHECK (write_codec_blueprint_string (fd, caps)); g_free (caps); caps = gst_caps_to_string (codec_blueprint->rtp_caps); WRITE_CHECK (write_codec_blueprint_string (fd, caps)); g_free (caps); caps = gst_caps_to_string (codec_blueprint->input_caps); WRITE_CHECK (write_codec_blueprint_string (fd, caps)); g_free (caps); caps = gst_caps_to_string (codec_blueprint->output_caps); WRITE_CHECK (write_codec_blueprint_string (fd, caps)); g_free (caps); walk = codec_blueprint->send_pipeline_factory; size = g_list_length (walk); if (write (fd, &size, sizeof (gint)) != sizeof (gint)) return FALSE; for (; walk; walk = g_list_next (walk)) { GList *walk2 = walk->data; size = g_list_length (walk2); if (write (fd, &size, sizeof (gint)) != sizeof (gint)) return FALSE; for (; walk2; walk2 = g_list_next (walk2)) { GstElementFactory *fact = walk2->data; factory_name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (fact)); WRITE_CHECK (write_codec_blueprint_string (fd, factory_name)); } } walk = codec_blueprint->receive_pipeline_factory; size = g_list_length (walk); if (write (fd, &size, sizeof (gint)) != sizeof (gint)) return FALSE; for (; walk; walk = g_list_next (walk)) { GList *walk2 = walk->data; size = g_list_length (walk2); if (write (fd, &size, sizeof (gint)) != sizeof (gint)) return FALSE; for (; walk2; walk2 = g_list_next (walk2)) { GstElementFactory *fact = walk2->data; factory_name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (fact)); WRITE_CHECK (write_codec_blueprint_string (fd, factory_name)); } } return TRUE; } gboolean save_codecs_cache (FsMediaType media_type, GList *blueprints) { gchar *cache_path; GList *item; gchar *tmp_path; int fd; int size; gchar magic[8] = {0}; cache_path = get_codecs_cache_path (media_type); if (!cache_path) return FALSE; GST_DEBUG ("Saving codecs cache to %s", cache_path); tmp_path = g_strconcat (cache_path, ".tmpXXXXXX", NULL); fd = g_mkstemp (tmp_path); if (fd == -1) { gchar *dir; /* oops, I bet the directory doesn't exist */ dir = g_path_get_dirname (cache_path); g_mkdir_with_parents (dir, 0777); g_free (dir); /* the previous g_mkstemp call overwrote the XXXXXX placeholder ... */ g_free (tmp_path); tmp_path = g_strconcat (cache_path, ".tmpXXXXXX", NULL); fd = g_mkstemp (tmp_path); if (fd == -1) { GST_DEBUG ("Unable to save codecs cache. g_mkstemp () failed: %s", g_strerror (errno)); g_free (tmp_path); g_free (cache_path); return FALSE; } } magic[0] = 'F'; magic[1] = 'S'; magic[2] = '?'; magic[3] = 'C'; if (media_type == FS_MEDIA_TYPE_AUDIO) { magic[2] = 'A'; } else if (media_type == FS_MEDIA_TYPE_VIDEO) { magic[2] = 'V'; } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { magic[2] = 'P'; } /* version of the binary format */ magic[4] = '1'; magic[5] = '2'; if (write (fd, magic, 8) != 8) return FALSE; size = g_list_length (blueprints); if (write (fd, &size, sizeof (gint)) != sizeof (gint)) return FALSE; for (item = g_list_first (blueprints); item; item = g_list_next (item)) { CodecBlueprint *codec_blueprint = item->data; if (!save_codec_blueprint (fd, codec_blueprint)) { GST_WARNING ("Unable to save codec cache"); close (fd); g_free (tmp_path); g_free (cache_path); return FALSE; } } if (close (fd) < 0) { GST_DEBUG ("Can't close codecs cache file : %s", g_strerror (errno)); g_free (tmp_path); g_free (cache_path); return FALSE; } if (g_file_test (tmp_path, G_FILE_TEST_EXISTS)) { #ifdef WIN32 remove (cache_path); #endif rename (tmp_path, cache_path); } g_free (tmp_path); g_free (cache_path); GST_DEBUG ("Wrote binary codecs cache"); return TRUE; } farstream-0.2.7/gst/fsrtpconference/fs-rtp-dtmf-event-source.h0000664000076400007640000000470311710041462021353 00000000000000/* * Farstream - Farstream RTP DTMF Event Source * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-dtmf-event-source.h - A Farstream RTP Event Source gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_DTMF_EVENT_SOURCE_H__ #define __FS_RTP_DTMF_EVENT_SOURCE_H__ #include "fs-rtp-special-source.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RTP_DTMF_EVENT_SOURCE \ (fs_rtp_dtmf_event_source_get_type ()) #define FS_RTP_DTMF_EVENT_SOURCE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_DTMF_EVENT_SOURCE, \ FsRtpDtmfEventSource)) #define FS_RTP_DTMF_EVENT_SOURCE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_DTMF_EVENT_SOURCE, \ FsRtpDtmfEventSourceClass)) #define FS_IS_RTP_DTMF_EVENT_SOURCE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_DTMF_EVENT_SOURCE)) #define FS_IS_RTP_DTMF_EVENT_SOURCE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_DTMF_EVENT_SOURCE)) #define FS_RTP_DTMF_EVENT_SOURCE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_DTMF_EVENT_SOURCE, \ FsRtpDtmfEventSourceClass)) #define FS_RTP_DTMF_EVENT_SOURCE_CAST(obj) ((FsRtpDtmfEventSource*) (obj)) typedef struct _FsRtpDtmfEventSource FsRtpDtmfEventSource; typedef struct _FsRtpDtmfEventSourceClass FsRtpDtmfEventSourceClass; typedef struct _FsRtpDtmfEventSourcePrivate FsRtpDtmfEventSourcePrivate; struct _FsRtpDtmfEventSourceClass { FsRtpSpecialSourceClass parent_class; }; /** * FsRtpDtmfEventSource: * */ struct _FsRtpDtmfEventSource { FsRtpSpecialSource parent; FsRtpDtmfEventSourcePrivate *priv; }; GType fs_rtp_dtmf_event_source_get_type (void); G_END_DECLS #endif /* __FS_RTP_DTMF_EVENT_SOURCE_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-tfrc.h0000664000076400007640000000714612401500475016750 00000000000000/* * Farstream - Farstream RTP TFRC Support * * Copyright 2010 Collabora Ltd. * @author: Olivier Crete * Copyright 2010 Nokia Corp. * * fs-rtp-tfrc.h - Rate control for Farstream RTP sessions * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_TFRC_H__ #define __FS_RTP_TFRC_H__ #include #include "tfrc.h" #include "fs-rtp-session.h" #include "fs-rtp-keyunit-manager.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RTP_TFRC \ (fs_rtp_tfrc_get_type ()) #define FS_RTP_TFRC(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_TFRC, FsRtpTfrc)) #define FS_RTP_TFRC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_TFRC, FsRtpTfrcClass)) #define FS_IS_RTP_TFRC(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_TFRC)) #define FS_IS_RTP_TFRC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_TFRC)) #define FS_RTP_TFRC_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_TFRC, FsRtpTfrcClass)) #define FS_RTP_TFRC_CAST(obj) ((FsRtpTfrc *) (obj)) typedef struct _FsRtpTfrc FsRtpTfrc; typedef struct _FsRtpTfrcClass FsRtpTfrcClass; typedef enum { EXTENSION_NONE, EXTENSION_ONE_BYTE, EXTENSION_TWO_BYTES } ExtensionType; struct TrackedSource { FsRtpTfrc *self; guint32 ssrc; GObject *rtpsource; TfrcSender *sender; GstClockID sender_id; TfrcIsDataLimited *idl; guint64 send_ts_base; guint64 send_ts_cycles; guint32 fb_last_ts; guint64 fb_ts_cycles; TfrcReceiver *receiver; GstClockID receiver_id; guint32 seq_cycles; guint32 last_seq; guint64 ts_cycles; guint32 last_ts; guint64 last_now; guint32 last_rtt; gboolean send_feedback; guint64 next_feedback_timer; gboolean got_nohdr_pkt; }; /** * FsRtpTfrc: * */ struct _FsRtpTfrc { GstObject parent; GstClock *systemclock; FsRtpSession *fsrtpsession; GstBin *parent_bin; GObject *rtpsession; GstPad *in_rtp_pad; GstPad *in_rtcp_pad; GstPad *out_rtp_pad; gulong in_rtp_probe_id; gulong in_rtcp_probe_id; gulong on_ssrc_validated_id; gulong on_sending_rtcp_id; gulong modder_check_probe_id; GstElement *packet_modder; GHashTable *tfrc_sources; struct TrackedSource *initial_src; struct TrackedSource *last_src; /* Sender stuff */ gboolean sending; gint byte_reservoir; GstClockTime last_sent_ts; guint send_bitrate; ExtensionType extension_type; guint extension_id; gboolean pts[128]; }; struct _FsRtpTfrcClass { GstObjectClass parent_class; }; GType fs_rtp_tfrc_get_type (void); FsRtpTfrc *fs_rtp_tfrc_new (FsRtpSession *fsrtpsession); void fs_rtp_tfrc_destroy (FsRtpTfrc *self); void fs_rtp_tfrc_filter_codecs (GList **codec_associations, GList **header_extensions); void fs_rtp_tfrc_codecs_updated (FsRtpTfrc *self, GList *codec_associations, GList *header_extensions); gboolean fs_rtp_tfrc_is_enabled (FsRtpTfrc *self, guint pt); G_END_DECLS #endif /* __FS_RTP_TFRC_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-packet-modder.c0000664000076400007640000002432412401500475020521 00000000000000/* * Farstream - Farstream RTP Packet modder * * Copyright 2010 Collabora Ltd. * @author: Olivier Crete * Copyright 2010 Nokia Corp. * * fs-rtp-packet-modder.c - Filter to modify RTP packets * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "fs-rtp-packet-modder.h" GST_DEBUG_CATEGORY_STATIC (fs_rtp_packet_modder_debug); #define GST_CAT_DEFAULT fs_rtp_packet_modder_debug static GstStaticPadTemplate fs_rtp_packet_modder_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp")); static GstStaticPadTemplate fs_rtp_packet_modder_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp")); G_DEFINE_TYPE (FsRtpPacketModder, fs_rtp_packet_modder, GST_TYPE_ELEMENT); static GstFlowReturn fs_rtp_packet_modder_chain (GstPad *pad, GstObject *parent, GstBuffer *buffer); static GstCaps *fs_rtp_packet_modder_getcaps (FsRtpPacketModder *self, GstPad *pad, GstCaps *filter); static gboolean fs_rtp_packet_modder_sink_event (GstPad *pad, GstObject *parent, GstEvent *event); static gboolean fs_rtp_packet_modder_query (GstPad *pad, GstObject *parent, GstQuery *query); static GstStateChangeReturn fs_rtp_packet_modder_change_state ( GstElement *element, GstStateChange transition); static void fs_rtp_packet_modder_class_init (FsRtpPacketModderClass *klass) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); GST_DEBUG_CATEGORY_INIT (fs_rtp_packet_modder_debug, "fsrtppacketmodder", 0, "fsrtppacketmodder element"); gst_element_class_set_details_simple (gstelement_class, "Farstream RTP Packet modder", "Generic", "Filter that can modify RTP packets", "Olivier Crete "); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&fs_rtp_packet_modder_sink_template)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&fs_rtp_packet_modder_src_template)); gstelement_class->change_state = fs_rtp_packet_modder_change_state; } static void fs_rtp_packet_modder_init (FsRtpPacketModder *self) { gst_segment_init (&self->segment, GST_FORMAT_TIME); self->sinkpad = gst_pad_new_from_static_template ( &fs_rtp_packet_modder_sink_template, "sink"); gst_pad_set_chain_function (self->sinkpad, fs_rtp_packet_modder_chain); gst_pad_set_query_function (self->sinkpad, fs_rtp_packet_modder_query); gst_pad_set_event_function (self->sinkpad, fs_rtp_packet_modder_sink_event); GST_PAD_SET_PROXY_CAPS (self->sinkpad); gst_element_add_pad (GST_ELEMENT (self), self->sinkpad); self->srcpad = gst_pad_new_from_static_template ( &fs_rtp_packet_modder_src_template, "src"); gst_pad_set_query_function (self->srcpad, fs_rtp_packet_modder_query); gst_element_add_pad (GST_ELEMENT (self), self->srcpad); } FsRtpPacketModder * fs_rtp_packet_modder_new (FsRtpPacketModderFunc modder_func, FsRtpPacketModderSyncTimeFunc sync_func, gpointer user_data) { FsRtpPacketModder *self; g_return_val_if_fail (modder_func != NULL, NULL); g_return_val_if_fail (sync_func != NULL, NULL); self = g_object_new (FS_TYPE_RTP_PACKET_MODDER, NULL); self->modder_func = modder_func; self->sync_func = sync_func; self->user_data = user_data; return self; } static void fs_rtp_packet_modder_sync_to_clock (FsRtpPacketModder *self, GstClockTime buffer_ts) { GstClockTime running_time; GstClockTime sync_time; GstClockID id; GstClock *clock; GstClockReturn clockret; GST_OBJECT_LOCK (self); running_time = gst_segment_to_running_time (&self->segment, GST_FORMAT_TIME, buffer_ts); do { sync_time = running_time + GST_ELEMENT_CAST (self)->base_time + self->peer_latency; clock = GST_ELEMENT_CLOCK (self); if (!clock) { GST_OBJECT_UNLOCK (self); /* let's just push if there is no clock */ GST_LOG_OBJECT (self, "No clock, push right away"); return; } GST_LOG_OBJECT (self, "sync to running timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (running_time)); id = self->clock_id = gst_clock_new_single_shot_id (clock, sync_time); self->unscheduled = FALSE; GST_OBJECT_UNLOCK (self); clockret = gst_clock_id_wait (id, NULL); GST_OBJECT_LOCK (self); gst_clock_id_unref (id); self->clock_id = NULL; } while (clockret == GST_CLOCK_UNSCHEDULED && !self->unscheduled); GST_OBJECT_UNLOCK (self); } static GstFlowReturn fs_rtp_packet_modder_chain (GstPad *pad, GstObject *parent, GstBuffer *buffer) { FsRtpPacketModder *self = FS_RTP_PACKET_MODDER (parent); GstFlowReturn ret = GST_FLOW_ERROR; GstClockTime buffer_ts = GST_BUFFER_TIMESTAMP (buffer); if (GST_CLOCK_TIME_IS_VALID (buffer_ts)) buffer_ts = self->sync_func (self, buffer, self->user_data); if (GST_CLOCK_TIME_IS_VALID (buffer_ts)) fs_rtp_packet_modder_sync_to_clock (self, buffer_ts); buffer = self->modder_func (self, buffer, buffer_ts, self->user_data); if (!buffer) { GST_LOG_OBJECT (self, "Got NULL from FsRtpPacketModderFunc"); goto invalid; } ret = gst_pad_push (self->srcpad, buffer); invalid: return ret; } static GstCaps * fs_rtp_packet_modder_getcaps (FsRtpPacketModder *self, GstPad *pad, GstCaps *filter) { GstPad *peer; GstCaps *caps; GstPad *otherpad = self->sinkpad == pad ? self->srcpad : self->sinkpad; peer = gst_pad_get_peer (otherpad); if (peer) { GstCaps *peercaps; peercaps = gst_pad_query_caps (peer, filter); caps = gst_caps_intersect (peercaps, gst_pad_get_pad_template_caps (pad)); gst_caps_unref (peercaps); gst_object_unref (peer); } else { caps = gst_caps_intersect (gst_pad_get_pad_template_caps (pad), filter); } return caps; } static gboolean fs_rtp_packet_modder_sink_event (GstPad *pad, GstObject *parent, GstEvent *event) { FsRtpPacketModder *self = FS_RTP_PACKET_MODDER (parent); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEGMENT: { gst_event_copy_segment (event, &self->segment); if (self->segment.format != GST_FORMAT_TIME) goto newseg_wrong_format; break; } case GST_EVENT_FLUSH_START: GST_OBJECT_LOCK (self); if (self->clock_id) { gst_clock_id_unschedule (self->clock_id); self->unscheduled = TRUE; } GST_OBJECT_UNLOCK (self); break; default: break; } return gst_pad_push_event (self->srcpad, event); newseg_wrong_format: GST_DEBUG_OBJECT (self, "received non TIME segment"); gst_event_unref (event); return FALSE; } static GstStateChangeReturn fs_rtp_packet_modder_change_state (GstElement *element, GstStateChange transition) { FsRtpPacketModder *self; GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; self = FS_RTP_PACKET_MODDER (element); switch (transition) { case GST_STATE_CHANGE_READY_TO_PAUSED: GST_OBJECT_LOCK (self); /* reset negotiated values */ self->peer_latency = 0; GST_OBJECT_UNLOCK (self); break; default: break; } ret = GST_ELEMENT_CLASS (fs_rtp_packet_modder_parent_class)->change_state ( element, transition); switch (transition) { case GST_STATE_CHANGE_READY_TO_PAUSED: /* we are a live element because we sync to the clock, which we can only * do in the PLAYING state */ if (ret != GST_STATE_CHANGE_FAILURE) ret = GST_STATE_CHANGE_NO_PREROLL; break; case GST_STATE_CHANGE_PLAYING_TO_PAUSED: GST_OBJECT_LOCK (self); if (self->clock_id) { gst_clock_id_unschedule (self->clock_id); self->unscheduled = TRUE; } GST_OBJECT_UNLOCK (self); break; default: break; } return ret; } static gboolean fs_rtp_packet_modder_query (GstPad *pad, GstObject *parent, GstQuery *query) { FsRtpPacketModder *self = FS_RTP_PACKET_MODDER (parent); gboolean res = FALSE; switch (GST_QUERY_TYPE (query)) { case GST_QUERY_CAPS: { GstCaps *caps, *filter; gst_query_parse_caps (query, &filter); caps = fs_rtp_packet_modder_getcaps (self, pad, filter); gst_query_set_caps_result (query, caps); gst_caps_unref (caps); res = TRUE; break; } case GST_QUERY_LATENCY: { /* We need to send the query upstream and add the returned latency to our * own */ GstClockTime min_latency, max_latency; gboolean us_live; if ((res = gst_pad_peer_query (self->sinkpad, query))) { gst_query_parse_latency (query, &us_live, &min_latency, &max_latency); GST_DEBUG_OBJECT (self, "Peer latency: min %" GST_TIME_FORMAT " max %" GST_TIME_FORMAT, GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); /* store this so that we can safely sync on the peer buffers. */ GST_OBJECT_LOCK (self); self->peer_latency = min_latency; if (self->clock_id) gst_clock_id_unschedule (self->clock_id); GST_OBJECT_UNLOCK (self); /* we add some latency but can buffer an infinite amount of time */ GST_DEBUG_OBJECT (self, "Calculated total latency : min %" GST_TIME_FORMAT " max %" GST_TIME_FORMAT, GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); gst_query_set_latency (query, TRUE, min_latency, max_latency); } break; } default: res = gst_pad_query_default (pad, parent, query); break; } return res; } farstream-0.2.7/gst/fsrtpconference/tfrc.h0000664000076400007640000000564411710041462015536 00000000000000/* * Farstream - Farstream TFRC implementation * * Copyright 2010 Collabora Ltd. * @author: Olivier Crete * Copyright 2010 Nokia Corp. * * tfrc.h - An implemention of TCP Friendly rate control, RFCs 5348 and 4828 * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #ifndef __TFRC_H__ #define __TFRC_H__ typedef struct _TfrcSender TfrcSender; typedef struct _TfrcReceiver TfrcReceiver; typedef struct _TfrcIsDataLimited TfrcIsDataLimited; TfrcSender *tfrc_sender_new (guint segment_size, guint64 now, guint initial_rate); TfrcSender *tfrc_sender_new_sp (guint64 now, guint initial_average_packet_size); void tfrc_sender_free (TfrcSender *sender); void tfrc_sender_use_inst_rate (TfrcSender *sender, gboolean use_inst_rate); void tfrc_sender_on_first_rtt (TfrcSender *sender, guint64 now); void tfrc_sender_on_feedback_packet (TfrcSender *sender, guint64 now, guint rtt, guint receive_rate, gdouble loss_event_rate, gboolean is_data_limited); void tfrc_sender_no_feedback_timer_expired (TfrcSender *sender, guint64 now); void tfrc_sender_sending_packet (TfrcSender *sender, guint size); guint tfrc_sender_get_send_rate (TfrcSender *sender); guint64 tfrc_sender_get_no_feedback_timer_expiry (TfrcSender *sender); guint tfrc_sender_get_averaged_rtt (TfrcSender *sender); TfrcReceiver *tfrc_receiver_new (guint64 now); TfrcReceiver *tfrc_receiver_new_sp (guint64 now); void tfrc_receiver_free (TfrcReceiver *receiver); gboolean tfrc_receiver_got_packet (TfrcReceiver *receiver, guint64 timestamp, guint64 now, guint seqnum, guint sender_rtt, guint packet_size); gboolean tfrc_receiver_feedback_timer_expired (TfrcReceiver *receiver, guint64 now); guint64 tfrc_receiver_get_feedback_timer_expiry (TfrcReceiver *receiver); gboolean tfrc_receiver_send_feedback (TfrcReceiver *receiver, guint64 now, double *loss_event_rate, guint *receive_rate); TfrcIsDataLimited *tfrc_is_data_limited_new (guint64 now); void tfrc_is_data_limited_free (TfrcIsDataLimited *idl); void tfrc_is_data_limited_not_limited_now (TfrcIsDataLimited *idl, guint64 now); gboolean tfrc_is_data_limited_received_feedback (TfrcIsDataLimited *idl, guint64 now, guint64 last_packet_timestamp, guint rtt); #endif /* __TFRC_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-discover-codecs.c0000664000076400007640000014560112461775764021105 00000000000000/* * Farstream - Farstream RTP Discover Codecs * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * @author Rob Taylor * @author Philippe Kalaf * Copyright 2007 Nokia Corp. * Copyright 2005 INdT * @author Andre Moreira Magalhaes * * fs-discover-codecs.c - A Farstream RTP Codec Discovery * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "fs-rtp-discover-codecs.h" #include #include #include "fs-rtp-bin-error-downgrade.h" #include "fs-rtp-conference.h" #include "fs-rtp-codec-cache.h" #include "fs-rtp-special-source.h" #define GST_CAT_DEFAULT fsrtpconference_disco /* * Local TYPES */ typedef struct _CodecCap { GstCaps *caps; /* media caps */ GstCaps *rtp_caps; /* RTP caps of given media caps */ /* 2 list approach so we can have a separation after an intersection is * calculted */ GList *element_list1; /* elements for media, enc, dec, pay, depay */ GList *element_list2; /* elements for media, enc, dec, pay, depay */ } CodecCap; typedef gboolean (*FilterFunc) (GstElementFactory *factory); /* Static Functions */ static gboolean create_codec_lists (FsMediaType media_type, GList *recv_list, GList *send_list); static GList *remove_dynamic_duplicates (GList *list); static GList *remove_duplicates (GList *list); static void parse_codec_cap_list (GList *list, FsMediaType media_type); static GList *detect_send_codecs (GstCaps *caps); static GList *detect_recv_codecs (GstCaps *caps); static GList *codec_cap_list_intersect (GList *list1, GList *list2, gboolean one_is_enough); static GList *get_plugins_filtered_from_caps (FilterFunc filter, GstCaps *caps, GstPadDirection direction); static gboolean extract_field_data (GQuark field_id, const GValue *value, gpointer user_data); static void codec_blueprints_add_caps (FsMediaType media_type); /* GLOBAL variables */ static GList *list_codec_blueprints[FS_MEDIA_TYPE_LAST+1] = { NULL }; static gint codecs_lists_ref[FS_MEDIA_TYPE_LAST+1] = { 0 }; G_LOCK_DEFINE_STATIC (codecs_lists); static void debug_pipeline (GstDebugLevel level, const gchar *prefix, GList *pipeline) { GList *walk; GString *str; gboolean first = TRUE; if (gst_debug_category_get_threshold (GST_CAT_DEFAULT) < level) return; str = g_string_new (prefix); for (walk = pipeline; walk; walk = g_list_next (walk)) { GList *walk2; gboolean first_alt = TRUE; if (!first) g_string_append (str, " ->"); first = FALSE; for (walk2 = g_list_first (walk->data); walk2; walk2 = g_list_next (walk2)) { if (first_alt) g_string_append_printf (str, " %s", gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (walk2->data))); else g_string_append_printf (str, " | %s", gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (walk2->data))); first_alt = FALSE; } } GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, level, NULL, "%s", str->str); g_string_free (str, TRUE); } static void debug_codec_cap (CodecCap *codec_cap) { if (codec_cap->caps) GST_LOG ("%p:%d:media_caps %" GST_PTR_FORMAT, codec_cap->caps, GST_CAPS_REFCOUNT_VALUE (codec_cap->caps), codec_cap->caps); if (codec_cap->rtp_caps) { GST_LOG ("%p:%d:rtp_caps %" GST_PTR_FORMAT, codec_cap->rtp_caps, GST_CAPS_REFCOUNT_VALUE (codec_cap->rtp_caps), codec_cap->rtp_caps); g_assert (gst_caps_get_size (codec_cap->rtp_caps) == 1); } debug_pipeline (GST_LEVEL_LOG, "element_list1: ", codec_cap->element_list1); debug_pipeline (GST_LEVEL_LOG, "element_list2: ", codec_cap->element_list2); } static void debug_codec_cap_list (GList *codec_cap_list) { GList *walk; GST_LOG ("size of codec_cap list is %d", g_list_length (codec_cap_list)); for (walk = codec_cap_list; walk; walk = g_list_next (walk)) { debug_codec_cap ((CodecCap *)walk->data); } } static void codec_cap_free (CodecCap *codec_cap) { GList *walk; if (codec_cap->caps) { gst_caps_unref (codec_cap->caps); } if (codec_cap->rtp_caps) { gst_caps_unref (codec_cap->rtp_caps); } for (walk = codec_cap->element_list1; walk; walk = g_list_next (walk)) { if (walk->data) { g_list_foreach (walk->data, (GFunc) gst_object_unref, NULL); g_list_free (walk->data); } } for (walk = codec_cap->element_list2; walk; walk = g_list_next (walk)) { if (walk->data) { g_list_foreach (walk->data, (GFunc) gst_object_unref, NULL); g_list_free (walk->data); } } if (codec_cap->element_list1) { g_list_free (codec_cap->element_list1); } if (codec_cap->element_list2) { g_list_free (codec_cap->element_list2); } g_slice_free (CodecCap, codec_cap); } static void codec_cap_list_free (GList *list) { GList *mwalk; for (mwalk = list; mwalk; mwalk = g_list_next (mwalk)) { codec_cap_free ((CodecCap *)mwalk->data); } g_list_free (list); } /** * fs_rtp_blueprints_get * @media_type: a #FsMediaType * * find all plugins that follow the pattern: * input (microphone) -> N* -> rtp payloader -> network * network -> rtp depayloader -> N* -> output (soundcard) * media_type defines if we want audio or video codecs * * Returns: a #GList of #CodecBlueprint or NULL on error */ GList * fs_rtp_blueprints_get (FsMediaType media_type, GError **error) { GstCaps *caps; GList *recv_list = NULL; GList *send_list = NULL; GList *ret = NULL; if (media_type > FS_MEDIA_TYPE_LAST) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid media type given"); return NULL; } G_LOCK (codecs_lists); codecs_lists_ref[media_type]++; /* if already computed just return list */ if (codecs_lists_ref[media_type] > 1) { if (!list_codec_blueprints[media_type]) g_set_error (error, FS_ERROR, FS_ERROR_NO_CODECS, "No codecs for media type %s detected", fs_media_type_to_string (media_type)); ret = list_codec_blueprints[media_type]; goto out; } list_codec_blueprints[media_type] = load_codecs_cache (media_type); if (list_codec_blueprints[media_type]) { GST_DEBUG ("Loaded codec blueprints from cache file"); ret = list_codec_blueprints[media_type]; goto out; } /* caps used to find the payloaders and depayloaders based on media type */ if (media_type == FS_MEDIA_TYPE_AUDIO) { caps = gst_caps_new_simple ("application/x-rtp", "media", G_TYPE_STRING, "audio", NULL); } else if (media_type == FS_MEDIA_TYPE_VIDEO) { caps = gst_caps_new_simple ("application/x-rtp", "media", G_TYPE_STRING, "video", NULL); } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { caps = gst_caps_new_simple ("application/x-rtp", "media", G_TYPE_STRING, "application", NULL); } else { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid media type given to load_codecs"); codecs_lists_ref[media_type]--; goto out; } recv_list = detect_recv_codecs (caps); send_list = detect_send_codecs (caps); gst_caps_unref (caps); /* if we can't send or recv let's just stop here */ if (!recv_list && !send_list) { codecs_lists_ref[media_type]--; g_set_error (error, FS_ERROR, FS_ERROR_NO_CODECS, "No codecs for media type %s detected", fs_media_type_to_string (media_type)); list_codec_blueprints[media_type] = NULL; goto out; } create_codec_lists (media_type, recv_list, send_list); /* Save the codecs blueprint cache */ save_codecs_cache (media_type, list_codec_blueprints[media_type]); ret = list_codec_blueprints[media_type]; out: G_UNLOCK (codecs_lists); if (recv_list) codec_cap_list_free (recv_list); if (send_list) codec_cap_list_free (send_list); return ret; } static gboolean create_codec_lists (FsMediaType media_type, GList *recv_list, GList *send_list) { GList *duplex_list = NULL; list_codec_blueprints[media_type] = NULL; /* TODO we should support non duplex as well, as in have some caps that are * only sendable or only receivable */ duplex_list = codec_cap_list_intersect (recv_list, send_list, FALSE); if (!duplex_list) { GST_WARNING ("There are no send/recv codecs"); return FALSE; } GST_LOG ("*******Intersection of send_list and recv_list"); debug_codec_cap_list (duplex_list); duplex_list = remove_dynamic_duplicates (duplex_list); duplex_list = remove_duplicates (duplex_list); if (!duplex_list) { GST_WARNING ("Dynamic duplicate removal left us with nothing"); return FALSE; } parse_codec_cap_list (duplex_list, media_type); codec_cap_list_free (duplex_list); list_codec_blueprints[media_type] = fs_rtp_special_sources_add_blueprints (list_codec_blueprints[media_type]); codec_blueprints_add_caps (media_type); return (list_codec_blueprints[media_type] != NULL); } static gboolean struct_field_has_line (GstStructure *s, const gchar *field, const gchar *value) { const gchar *tmp = gst_structure_get_string (s, field); const GValue *v = NULL; gint i; if (tmp) return !strcmp (value, tmp); if (!gst_structure_has_field_typed (s, field, GST_TYPE_LIST)) return FALSE; v = gst_structure_get_value (s, field); for (i=0; i < gst_value_list_get_size (v); i++) { const GValue *listval = gst_value_list_get_value (v, i); if (G_VALUE_HOLDS_STRING(listval) && !strcmp (value, g_value_get_string (listval))) return TRUE; } return FALSE; } /* * This function returns TRUE if the codec_cap should be accepted, * FALSE otherwise */ static gboolean validate_h263_codecs (CodecCap *codec_cap) { /* we assume we have just one structure per caps as it should be */ GstStructure *media_struct = gst_caps_get_structure (codec_cap->caps, 0); const gchar *name = gst_structure_get_name (media_struct); GstStructure *rtp_struct; const gchar *encoding_name; if (!name) return FALSE; /* let's check if it's h263 */ if (strcmp (name, "video/x-h263")) return TRUE; /* If we don't have a h263version field, accept everything */ if (!gst_structure_has_field (media_struct, "h263version")) return TRUE; rtp_struct = gst_caps_get_structure (codec_cap->rtp_caps, 0); if (!rtp_struct) return FALSE; encoding_name = gst_structure_get_string (rtp_struct, "encoding-name"); /* If there is no encoding name, we have a problem, lets refuse it */ if (!encoding_name) return FALSE; if (struct_field_has_line (media_struct, "h263version", "h263")) { /* baseline H263 can only be encoding name H263 or H263-1998 */ if (strcmp (encoding_name, "H263") && strcmp (encoding_name, "H263-1998")) return FALSE; } else if (struct_field_has_line (media_struct, "h263version", "h263p")) { /* has to be H263-1998 */ if (strcmp (encoding_name, "H263-1998")) return FALSE; } else if (struct_field_has_line (media_struct, "h263version", "h263pp")) { /* has to be H263-2000 */ if (strcmp (encoding_name, "H263-2000")) return FALSE; } /* if no h263version specified, we assume it's all h263 versions */ return TRUE; } static gboolean validate_amr_codecs (CodecCap *codec_cap) { /* we assume we have just one structure per caps as it should be */ GstStructure *media_struct = gst_caps_get_structure (codec_cap->caps, 0); const gchar *name = gst_structure_get_name (media_struct); GstStructure *rtp_struct; const gchar *encoding_name; rtp_struct = gst_caps_get_structure (codec_cap->rtp_caps, 0); encoding_name = gst_structure_get_string (rtp_struct, "encoding-name"); /* let's check if it's AMRWB */ if (!strcmp (name, "audio/AMR-WB")) { if (!strcmp (encoding_name, "AMR-WB")) return TRUE; else return FALSE; } else if (!strcmp (name, "audio/AMR")) { if (!strcmp (encoding_name, "AMR")) return TRUE; else return FALSE; } /* Everything else is invalid */ return TRUE; } /* Removes all dynamic pts that already have a static pt in the list */ static GList * remove_dynamic_duplicates (GList *list) { GList *walk1, *walk2; CodecCap *codec_cap, *cur_codec_cap; GstStructure *rtp_struct, *cur_rtp_struct; const gchar *encoding_name, *cur_encoding_name; GList *remove_us = NULL; for (walk1 = list; walk1; walk1 = g_list_next (walk1)) { const GValue *value; GType type; codec_cap = (CodecCap *)(walk1->data); rtp_struct = gst_caps_get_structure (codec_cap->rtp_caps, 0); encoding_name = gst_structure_get_string (rtp_struct, "encoding-name"); if (!encoding_name) continue; /* let's skip all non static payload types */ value = gst_structure_get_value (rtp_struct, "payload"); if (!value) continue; type = G_VALUE_TYPE (value); if (type != G_TYPE_INT) { continue; } else { gint payload_type; payload_type = g_value_get_int (value); if (payload_type >= 96) { continue; } } for (walk2 = list; walk2; walk2 = g_list_next (walk2)) { cur_codec_cap = (CodecCap *)(walk2->data); cur_rtp_struct = gst_caps_get_structure (cur_codec_cap->rtp_caps, 0); cur_encoding_name = gst_structure_get_string (cur_rtp_struct, "encoding-name"); if (!cur_encoding_name) continue; if (g_ascii_strcasecmp (encoding_name, cur_encoding_name) == 0) { const GValue *value = gst_structure_get_value (cur_rtp_struct, "payload"); GType type = G_VALUE_TYPE (value); /* this is a dynamic pt that has a static one , let's remove it */ if (type == GST_TYPE_INT_RANGE) remove_us = g_list_prepend (remove_us, cur_codec_cap); } } } for (walk1 = remove_us; walk1; walk1 = g_list_next (walk1)) { list = g_list_remove_all (list, walk1->data); codec_cap_free (walk1->data); } g_list_free (remove_us); return list; } /* Removes duplicate codecs that have the same RTP expression */ static GList * remove_duplicates (GList *list) { GList *walk1, *walk2; for (walk1 = list; walk1; walk1 = g_list_next (walk1)) { CodecCap *codec_cap1 = walk1->data; again: for (walk2 = walk1->next; walk2; walk2 = g_list_next (walk2)) { CodecCap *codec_cap2 = walk2->data; if (gst_caps_is_equal (codec_cap1->rtp_caps, codec_cap2->rtp_caps)) { codec_cap_free (codec_cap2); walk1 = g_list_delete_link (walk1, walk2); goto again; } } } return list; } static GList * copy_element_list (GList *inlist) { GQueue outqueue = G_QUEUE_INIT; GList *tmp1; for (tmp1 = g_list_first (inlist); tmp1; tmp1 = g_list_next (tmp1)) { g_queue_push_tail (&outqueue, g_list_copy (tmp1->data)); g_list_foreach (tmp1->data, (GFunc) gst_object_ref, NULL); } return outqueue.head; } /* insert given codec_cap list into list_codecs and list_codec_blueprints */ static void parse_codec_cap_list (GList *list, FsMediaType media_type) { GList *walk; CodecCap *codec_cap; FsCodec *codec; CodecBlueprint *codec_blueprint; gint i; GstElementFactory *tmpfact; /* go thru all common caps */ for (walk = list; walk; walk = g_list_next (walk)) { codec_cap = (CodecCap *)(walk->data); codec = fs_codec_new (FS_CODEC_ID_ANY, NULL, media_type, 0); for (i = 0; i < gst_caps_get_size (codec_cap->rtp_caps); i++) { GstStructure *structure = gst_caps_get_structure (codec_cap->rtp_caps, i); gst_structure_foreach (structure, extract_field_data, (gpointer) codec); } if (!codec->encoding_name) { GstStructure *caps = gst_caps_get_structure (codec_cap->rtp_caps, 0); const gchar *encoding_name = codec->encoding_name ? codec->encoding_name : gst_structure_get_string (caps, "encoding-name"); GST_DEBUG ("skipping codec %s/%s, no encoding name specified" " (pt: %d clock_rate:%u", fs_media_type_to_string (media_type), encoding_name ? encoding_name : "unknown", codec->id, codec->clock_rate); encoding_name = NULL; fs_codec_destroy (codec); continue; } switch (codec->media_type) { case FS_MEDIA_TYPE_VIDEO: if (!validate_h263_codecs (codec_cap)) { fs_codec_destroy (codec); continue; } break; case FS_MEDIA_TYPE_AUDIO: if (!validate_amr_codecs (codec_cap)) { fs_codec_destroy (codec); continue; } break; default: break; } codec_blueprint = g_slice_new0 (CodecBlueprint); codec_blueprint->codec = codec; codec_blueprint->media_caps = gst_caps_copy (codec_cap->caps); codec_blueprint->rtp_caps = gst_caps_copy (codec_cap->rtp_caps); codec_blueprint->send_pipeline_factory = copy_element_list (codec_cap->element_list2); codec_blueprint->receive_pipeline_factory = copy_element_list (codec_cap->element_list1); /* Lets add the converters at the beginning of the encoding pipelines */ if (media_type == FS_MEDIA_TYPE_VIDEO) { tmpfact = gst_element_factory_find ("fsvideoanyrate"); if (tmpfact) { codec_blueprint->send_pipeline_factory = g_list_append ( codec_blueprint->send_pipeline_factory, g_list_append (NULL, tmpfact)); } tmpfact = gst_element_factory_find ("videoconvert"); if (tmpfact) { codec_blueprint->send_pipeline_factory = g_list_append ( codec_blueprint->send_pipeline_factory, g_list_append (NULL, tmpfact)); } tmpfact = gst_element_factory_find ("videoscale"); if (tmpfact) { codec_blueprint->send_pipeline_factory = g_list_append ( codec_blueprint->send_pipeline_factory, g_list_append (NULL, tmpfact)); } } else if (media_type == FS_MEDIA_TYPE_AUDIO) { tmpfact = gst_element_factory_find ("audioconvert"); if (tmpfact) { codec_blueprint->send_pipeline_factory = g_list_append ( codec_blueprint->send_pipeline_factory, g_list_append (NULL, tmpfact)); } tmpfact = gst_element_factory_find ("audioresample"); if (tmpfact) { codec_blueprint->send_pipeline_factory = g_list_append ( codec_blueprint->send_pipeline_factory, g_list_append (NULL, tmpfact)); } tmpfact = gst_element_factory_find ("audioconvert"); if (tmpfact) { codec_blueprint->send_pipeline_factory = g_list_append ( codec_blueprint->send_pipeline_factory, g_list_append (NULL, tmpfact)); } tmpfact = gst_element_factory_find ("spanplc"); if (tmpfact) { GstElementFactory *tmpfact2; tmpfact2 = gst_element_factory_find ("audioconvert"); if (tmpfact2) { codec_blueprint->receive_pipeline_factory = g_list_append ( codec_blueprint->receive_pipeline_factory, g_list_append (NULL, tmpfact2)); codec_blueprint->receive_pipeline_factory = g_list_append ( codec_blueprint->receive_pipeline_factory, g_list_append (NULL, tmpfact)); } } } /* insert new information into tables */ list_codec_blueprints[media_type] = g_list_append ( list_codec_blueprints[media_type], codec_blueprint); GST_DEBUG ("adding codec %s with pt %d, send_pipeline %p, receive_pipeline %p", codec->encoding_name, codec->id, codec_blueprint->send_pipeline_factory, codec_blueprint->receive_pipeline_factory); GST_DEBUG ("media_caps: %" GST_PTR_FORMAT, codec_blueprint->media_caps); GST_DEBUG ("rtp_caps: %" GST_PTR_FORMAT, codec_blueprint->rtp_caps); debug_pipeline (GST_LEVEL_DEBUG, "send pipeline: ", codec_blueprint->send_pipeline_factory); debug_pipeline (GST_LEVEL_DEBUG, "receive pipeline: ", codec_blueprint->receive_pipeline_factory); } } static gboolean klass_contains (const gchar *klass, const gchar *needle) { gchar *found = strstr (klass, needle); if (!found) return FALSE; if (found != klass && *(found-1) != '/') return FALSE; if (found[strlen (needle)] != 0 && found[strlen (needle)] != '/') return FALSE; return TRUE; } static gboolean is_payloader (GstElementFactory *factory) { const gchar *klass = gst_element_factory_get_klass (factory); return (klass_contains (klass, "Payloader") && klass_contains (klass, "Network")); } static gboolean is_depayloader (GstElementFactory *factory) { const gchar *klass = gst_element_factory_get_klass (factory); return (klass_contains (klass, "Network") && (klass_contains (klass, "Depayloader") || klass_contains (klass, "Depayr"))); } static gboolean is_encoder (GstElementFactory *factory) { const gchar *klass = gst_element_factory_get_klass (factory); /* we might have some sources that provide a non raw stream */ return (klass_contains (klass, "Encoder")); } static gboolean is_decoder (GstElementFactory *factory) { const gchar *klass = gst_element_factory_get_klass (factory); /* we might have some sinks that provide decoding */ return (klass_contains (klass, "Decoder")); } /* find all encoder/payloader combos and build list for them */ static GList * detect_send_codecs (GstCaps *caps) { GList *payloaders, *encoders; GList *send_list = NULL; /* find all payloader caps. All payloaders should be from klass * Codec/Payloader/Network and have as output a data of the mimetype * application/x-rtp */ payloaders = get_plugins_filtered_from_caps (is_payloader, caps, GST_PAD_SINK); /* no payloader found. giving up */ if (!payloaders) { GST_WARNING ("No RTP Payloaders found"); return NULL; } else { GST_LOG ("**Payloaders"); debug_codec_cap_list (payloaders); } /* find all encoders based on is_encoder filter */ encoders = get_plugins_filtered_from_caps (is_encoder, NULL, GST_PAD_SRC); if (!encoders) { codec_cap_list_free (payloaders); GST_WARNING ("No encoders found"); return NULL; } else { GST_LOG ("**Encoders"); debug_codec_cap_list (encoders); } /* create intersection list of codecs common * to encoders and payloaders lists */ send_list = codec_cap_list_intersect (payloaders, encoders, TRUE); if (!send_list) { GST_WARNING ("No compatible encoder/payloader pairs found"); } else { GST_LOG ("**intersection of payloaders and encoders"); debug_codec_cap_list (send_list); } codec_cap_list_free (payloaders); codec_cap_list_free (encoders); return send_list; } /* find all decoder/depayloader combos and build list for them */ static GList * detect_recv_codecs (GstCaps *caps) { GList *depayloaders, *decoders; GList *recv_list = NULL; /* find all depayloader caps. All depayloaders should be from klass * Codec/Depayr/Network and have as input a data of the mimetype * application/x-rtp */ depayloaders = get_plugins_filtered_from_caps (is_depayloader, caps, GST_PAD_SRC); /* no depayloader found. giving up */ if (!depayloaders) { GST_WARNING ("No RTP Depayloaders found"); return NULL; } else { GST_LOG ("**Depayloaders"); debug_codec_cap_list (depayloaders); } /* find all decoders based on is_decoder filter */ decoders = get_plugins_filtered_from_caps (is_decoder, NULL, GST_PAD_SINK); if (!decoders) { codec_cap_list_free (depayloaders); GST_WARNING ("No decoders found"); return NULL; } else { GST_LOG ("**Decoders"); debug_codec_cap_list (decoders); } /* create intersection list of codecs common * to decoders and depayloaders lists */ recv_list = codec_cap_list_intersect (depayloaders, decoders, TRUE); if (!recv_list) { GST_WARNING ("No compatible decoder/depayloader pairs found"); } else { GST_LOG ("**intersection of depayloaders and decoders"); debug_codec_cap_list (recv_list); } codec_cap_list_free (depayloaders); codec_cap_list_free (decoders); return recv_list; } /* returns the intersection of two lists */ static GList * codec_cap_list_intersect (GList *list1, GList *list2, gboolean one_is_enough) { GList *walk1, *walk2; CodecCap *codec_cap1, *codec_cap2; GstCaps *caps1, *caps2; GstCaps *rtp_caps1, *rtp_caps2; GList *intersection_list = NULL; for (walk1 = g_list_first (list1); walk1; walk1 = g_list_next (walk1)) { CodecCap *item = NULL; codec_cap1 = (CodecCap *)(walk1->data); caps1 = codec_cap1->caps; rtp_caps1 = codec_cap1->rtp_caps; for (walk2 = list2; walk2; walk2 = g_list_next (walk2)) { GstCaps *intersection = NULL; GstCaps *rtp_intersection = NULL; codec_cap2 = (CodecCap *)(walk2->data); caps2 = codec_cap2->caps; rtp_caps2 = codec_cap2->rtp_caps; //g_debug ("intersecting %s AND %s", gst_caps_to_string (caps1), gst_caps_to_string (caps2)); intersection = gst_caps_intersect (caps1, caps2); if (rtp_caps1 && rtp_caps2) { //g_debug ("RTP intersecting %s AND %s", gst_caps_to_string (rtp_caps1), gst_caps_to_string (rtp_caps2)); rtp_intersection = gst_caps_intersect (rtp_caps1, rtp_caps2); } if (!gst_caps_is_empty (intersection) && (rtp_intersection == NULL || !gst_caps_is_empty (rtp_intersection))) { if (item) { GList *tmplist; item->caps = gst_caps_merge (item->caps, intersection); for (tmplist = g_list_first (codec_cap2->element_list1->data); tmplist; tmplist = g_list_next (tmplist)) { if (g_list_index (item->element_list2->data, tmplist->data) < 0) { item->element_list2->data = g_list_concat ( item->element_list2->data, g_list_copy (codec_cap2->element_list1->data)); g_list_foreach (codec_cap2->element_list1->data, (GFunc) gst_object_ref, NULL); } } } else { item = g_slice_new0 (CodecCap); item->caps = intersection; if (rtp_caps1 && rtp_caps2) { item->rtp_caps = rtp_intersection; } else if (rtp_caps1) { item->rtp_caps = rtp_caps1; gst_caps_ref (rtp_caps1); } else if (rtp_caps2) { item->rtp_caps = rtp_caps2; gst_caps_ref (rtp_caps2); } /* during an intersect, we concat/copy previous lists together and put them * into 1 and 2 */ item->element_list1 = g_list_concat ( copy_element_list (codec_cap1->element_list1), copy_element_list (codec_cap1->element_list2)); item->element_list2 = g_list_concat ( copy_element_list (codec_cap2->element_list1), copy_element_list (codec_cap2->element_list2)); intersection_list = g_list_append (intersection_list, item); if (rtp_intersection) { break; } } } else { if (rtp_intersection) gst_caps_unref (rtp_intersection); gst_caps_unref (intersection); } } if (!item && one_is_enough) { item = g_slice_new0 (CodecCap); item->caps = gst_caps_ref (codec_cap1->caps); item->rtp_caps = gst_caps_ref (codec_cap1->rtp_caps); item->element_list1 = copy_element_list (codec_cap1->element_list1); item->element_list2 = copy_element_list (codec_cap1->element_list2); intersection_list = g_list_append (intersection_list, item); } } return intersection_list; } void codec_blueprint_destroy (CodecBlueprint *codec_blueprint) { GList *walk; if (codec_blueprint->codec) { fs_codec_destroy (codec_blueprint->codec); } if (codec_blueprint->media_caps) { gst_caps_unref (codec_blueprint->media_caps); } if (codec_blueprint->rtp_caps) { gst_caps_unref (codec_blueprint->rtp_caps); } if (codec_blueprint->input_caps) { gst_caps_unref (codec_blueprint->input_caps); } if (codec_blueprint->output_caps) { gst_caps_unref (codec_blueprint->output_caps); } for (walk = codec_blueprint->send_pipeline_factory; walk; walk = g_list_next (walk)) { if (walk->data) { g_list_foreach (walk->data, (GFunc) gst_object_unref, NULL); g_list_free (walk->data); } } for (walk = codec_blueprint->receive_pipeline_factory; walk; walk = g_list_next (walk)) { if (walk->data) { g_list_foreach (walk->data, (GFunc) gst_object_unref, NULL); g_list_free (walk->data); } } g_list_free (codec_blueprint->send_pipeline_factory); g_list_free (codec_blueprint->receive_pipeline_factory); g_slice_free (CodecBlueprint, codec_blueprint); } void fs_rtp_blueprints_unref (FsMediaType media_type) { G_LOCK (codecs_lists); codecs_lists_ref[media_type]--; if (!codecs_lists_ref[media_type]) { if (list_codec_blueprints[media_type]) { GList *item; for (item = list_codec_blueprints[media_type]; item; item = g_list_next (item)) { codec_blueprint_destroy (item->data); } g_list_free (list_codec_blueprints[media_type]); list_codec_blueprints[media_type] = NULL; } } G_UNLOCK (codecs_lists); } /* check if caps are found on given element */ static gboolean check_caps_compatibility (GstElementFactory *factory, GstCaps *caps, GstCaps **matched_caps) { const GList *pads; GstStaticPadTemplate *padtemplate; GstCaps *padtemplate_caps = NULL; if (!gst_element_factory_get_num_pad_templates (factory)) { return FALSE; } pads = gst_element_factory_get_static_pad_templates (factory); while (pads) { padtemplate = (GstStaticPadTemplate *) (pads->data); pads = g_list_next (pads); padtemplate_caps = gst_static_caps_get (&padtemplate->static_caps); if (gst_caps_is_any (padtemplate_caps)) { goto next; } if (caps) { GstCaps *intersection = gst_caps_intersect (padtemplate_caps, caps); gboolean have_intersection = !gst_caps_is_empty (intersection); if (have_intersection) { *matched_caps = intersection; gst_caps_unref (padtemplate_caps); return TRUE; } gst_caps_unref (intersection); } next: if (padtemplate_caps) { gst_caps_unref (padtemplate_caps); } } *matched_caps = NULL; return FALSE; } /* GCompareFunc for list_find_custom */ /* compares caps and returns 0 if they intersect */ static gint compare_media_caps (gconstpointer a, gconstpointer b) { CodecCap *element = (CodecCap *)a; GstCaps *c_caps = (GstCaps *)b; return !gst_caps_can_intersect (element->caps, c_caps); } static gint compare_rtp_caps (CodecCap *element, GstCaps *c_caps) { return !gst_caps_can_intersect (element->rtp_caps, c_caps); } /* adds the given element to a list of CodecCap */ /* if element has several caps, several CodecCap elements will be added */ /* if element caps already in list, will make sure Transform elements have * priority and replace old ones */ static GList * create_codec_cap_list (GstElementFactory *factory, GstPadDirection direction, GList *list, GstCaps *rtp_caps) { const GList *pads = gst_element_factory_get_static_pad_templates (factory); gint i; /* Let us look at each pad for stuff to add*/ while (pads) { GstCaps *caps = NULL; GstStaticPadTemplate *padtemplate = NULL; padtemplate = (GstStaticPadTemplate *) (pads->data); pads = g_list_next (pads); if (padtemplate->direction != direction) continue; if (padtemplate->presence != GST_PAD_ALWAYS) { continue; } caps = gst_static_pad_template_get_caps (padtemplate); /* DEBUG ("%s caps are %s", gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)), gst_caps_to_string (caps)); */ /* skips caps ANY */ if (!caps || gst_caps_is_any (caps)) { goto done; } /* let us add one entry to the list per media type */ for (i = 0; i < gst_caps_get_size (caps); i++) { CodecCap *entry = NULL; GList *found_item = NULL; GstStructure *structure = gst_caps_get_structure (caps, i); GstCaps *cur_caps = NULL; /* FIXME fix this in gstreamer! The rtpdepay element is bogus, it claims to * be a depayloader yet has application/x-rtp on both sides and does * absolutely nothing */ /* Let's check if media caps are really media caps, this is to deal with * wierd elements such as rtpdepay that says it's a depayloader but has * application/x-rtp on src and sink pads */ const gchar *name = gst_structure_get_name (structure); if (g_ascii_strcasecmp (name, "application/x-rtp") == 0) { GST_DEBUG ("skipping %s : %s", gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)), name); continue; } cur_caps = gst_caps_new_full (gst_structure_copy (structure), NULL); /* let's check if this caps is already in the list, if so let's replace * that CodecCap list instead of creating a new one */ /* we need to compare both media caps and rtp caps */ found_item = g_list_find_custom (list, cur_caps, (GCompareFunc)compare_media_caps); if (found_item) { entry = (CodecCap *)found_item->data; /* if RTP caps exist and don't match nullify entry */ if (rtp_caps && compare_rtp_caps (found_item->data, rtp_caps)) { entry = NULL; } } if (!entry) { entry = g_slice_new0 (CodecCap); entry->caps = cur_caps; if (rtp_caps) { entry->rtp_caps = rtp_caps; gst_caps_ref (rtp_caps); } list = g_list_append (list, entry); entry->element_list1 = g_list_prepend (NULL, g_list_prepend (NULL, factory)); gst_object_ref (factory); } else { entry->element_list1->data = g_list_append (entry->element_list1->data, factory); gst_object_ref (factory); if (rtp_caps) { if (entry->rtp_caps) { GstCaps *tmp = gst_caps_intersect (rtp_caps, entry->rtp_caps); gst_caps_unref (entry->rtp_caps); entry->rtp_caps = tmp; } else { entry->rtp_caps = gst_caps_ref (rtp_caps); /* This shouldn't happen, its we're looking at rtp elements * or we're not */ g_assert_not_reached (); } } entry->caps = gst_caps_merge (cur_caps, entry->caps); } } done: if (caps != NULL) { gst_caps_unref (caps); } } return list; } /* function used to sort element features */ /* Copy-pasted from decodebin */ static gint compare_ranks (GstPluginFeature * f1, GstPluginFeature * f2) { gint diff; const gchar *rname1, *rname2; diff = gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1); if (diff != 0) return diff; rname1 = gst_plugin_feature_get_name (f1); rname2 = gst_plugin_feature_get_name (f2); diff = strcmp (rname2, rname1); return diff; } /* creates/returns a list of CodecCap based on given filter function and caps */ static GList * get_plugins_filtered_from_caps (FilterFunc filter, GstCaps *caps, GstPadDirection direction) { GList *walk, *result; GList *list = NULL; GstCaps *matched_caps = NULL; result = gst_registry_get_feature_list (gst_registry_get (), GST_TYPE_ELEMENT_FACTORY); result = g_list_sort (result, (GCompareFunc) compare_ranks); for (walk = result; walk; walk = walk->next) { GstElementFactory *factory = GST_ELEMENT_FACTORY (walk->data); /* Ignore unranked plugins */ if (gst_plugin_feature_get_rank (GST_PLUGIN_FEATURE (factory)) == GST_RANK_NONE) continue; if (!filter (factory)) continue; if (caps && !check_caps_compatibility (factory, caps, &matched_caps)) continue; if (!matched_caps) { list = create_codec_cap_list (factory, direction, list, NULL); } else { gint i; GPtrArray *capslist = g_ptr_array_new_with_free_func ( (GDestroyNotify) gst_caps_unref); while (gst_caps_get_size (matched_caps) > 0) { GstCaps *stolencaps = gst_caps_new_full ( gst_caps_steal_structure (matched_caps, 0), NULL); gboolean got_match = FALSE; for (i = 0; i < capslist->len; i++) { GstCaps *intersect = gst_caps_intersect (stolencaps, g_ptr_array_index (capslist, i)); if (gst_caps_is_empty (intersect)) { gst_caps_unref (intersect); } else { got_match = TRUE; gst_caps_unref (g_ptr_array_index (capslist, i)); g_ptr_array_index (capslist, i) = intersect; } } if (got_match) gst_caps_unref (stolencaps); else g_ptr_array_add (capslist, stolencaps); } gst_caps_unref (matched_caps); for (i = 0; i < capslist->len; i++) list = create_codec_cap_list (factory, direction, list, g_ptr_array_index (capslist, i)); g_ptr_array_unref (capslist); } } gst_plugin_feature_list_free (result); return list; } /* * fill FarstreamCodec fields based on payloader capabilities * TODO: optimise using quarks */ static gboolean extract_field_data (GQuark field_id, const GValue *value, gpointer user_data) { /* TODO : This can be called several times from different rtp caps for the * same codec, it would be good to make sure any duplicate values are the * same, if not then we have several rtp elements that are giving different * caps information, therefore they need to be fixed */ FsCodec *codec = (FsCodec *) user_data; GType type = G_VALUE_TYPE (value); const gchar *field_name = g_quark_to_string (field_id); const gchar *tmp; if (0 == strcmp (field_name, "media")) { if (type != G_TYPE_STRING) { return FALSE; } tmp = g_value_get_string (value); if (strcmp (tmp, "audio") == 0) { codec->media_type = FS_MEDIA_TYPE_AUDIO; } else if (strcmp (tmp, "video") == 0) { codec->media_type = FS_MEDIA_TYPE_VIDEO; } else if (strcmp (tmp, "application") == 0) { codec->media_type = FS_MEDIA_TYPE_APPLICATION; } } else if (0 == strcmp (field_name, "payload")) { if (type == GST_TYPE_INT_RANGE) { if (gst_value_get_int_range_min (value) < 96 || gst_value_get_int_range_max (value) > 255) { return FALSE; } } else if (type == G_TYPE_INT) { int id; id = g_value_get_int (value); if (id > 96) { /* Dynamic id that was explicitelly set ?? shouldn't happen */ return FALSE; } codec->id = id; } else { return FALSE; } } else if (0 == strcmp (field_name, "clock-rate")) { if (type == GST_TYPE_INT_RANGE) { /* set to 0, this should be checked by the optional parameters code later * in Farstream */ codec->clock_rate = 0; return TRUE; } else if (type != G_TYPE_INT) { return FALSE; } codec->clock_rate = g_value_get_int (value); } else if (0 == strcmp (field_name, "ssrc") || 0 == strcmp (field_name, "clock-base") || 0 == strcmp (field_name, "seqnum-base")) { // ignore these fields for now ; } else if (0 == strcmp (field_name, "encoding-name")) { if (type != G_TYPE_STRING) { return FALSE; } if (!codec->encoding_name) { codec->encoding_name = g_value_dup_string (value); } } else if (0 == strcmp (field_name, "encoding-params")) { if (type != G_TYPE_STRING) { return FALSE; } codec->channels = (guint) g_ascii_strtoull ( g_value_get_string (value), NULL, 10); } else { if (type == G_TYPE_STRING) fs_codec_add_optional_parameter (codec, field_name, g_value_get_string (value)); } return TRUE; } gboolean codec_blueprint_has_factory (CodecBlueprint *blueprint, FsStreamDirection direction) { if (direction == FS_DIRECTION_SEND) return (blueprint->send_pipeline_factory != NULL); else if (direction == FS_DIRECTION_RECV) return (blueprint->receive_pipeline_factory != NULL); else g_assert_not_reached (); } static gboolean _g_object_has_property (GObject *object, const gchar *property) { GObjectClass *klass; klass = G_OBJECT_GET_CLASS (object); return NULL != g_object_class_find_property (klass, property); } static gboolean _create_ghost_pad (GstElement *current_element, const gchar *padname, GstElement *codec_bin, GError **error) { GstPad *ghostpad; GstPad *pad = gst_element_get_static_pad (current_element, padname); gboolean ret = FALSE; if (!pad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not find the %s pad on the element", padname); return FALSE; } ghostpad = gst_ghost_pad_new (padname, pad); if (!ghostpad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create a ghost pad for pad %s", padname); goto done; } if (!gst_pad_set_active (ghostpad, TRUE)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not active ghostpad %s", padname); gst_object_unref (ghostpad); goto done; } if (!gst_element_add_pad (codec_bin, ghostpad)) g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add ghostpad %s to the codec bin", padname); ret = TRUE; done: gst_object_unref (pad); return ret; } /* * Builds a codec bin in the specified direction for the specified codec * using the specified blueprint */ GstElement * create_codec_bin_from_blueprint (const FsCodec *codec, CodecBlueprint *blueprint, const gchar *name, FsStreamDirection direction, GError **error) { GstElement *codec_bin = NULL; const gchar *direction_str; GList *walk = NULL; GstElement *current_element = NULL; GstElement *previous_element = NULL; GList *pipeline_factory = NULL; if (direction == FS_DIRECTION_SEND) { direction_str = "send"; pipeline_factory = blueprint->send_pipeline_factory; } else if (direction == FS_DIRECTION_RECV) { direction_str = "receive"; pipeline_factory = blueprint->receive_pipeline_factory; } else { g_assert_not_reached (); } if (!pipeline_factory) { g_set_error (error, FS_ERROR, FS_ERROR_UNKNOWN_CODEC, "The %s codec %s does not have a pipeline," " its probably a special codec", fs_media_type_to_string (codec->media_type), codec->encoding_name); return NULL; } GST_DEBUG ("creating %s codec bin for id %d, pipeline_factory %p", direction_str, codec->id, pipeline_factory); if (direction == FS_DIRECTION_SEND) codec_bin = gst_bin_new (name); else if (direction == FS_DIRECTION_RECV) codec_bin = fs_rtp_bin_error_downgrade_new (name); else g_assert_not_reached (); for (walk = g_list_first (pipeline_factory); walk; walk = g_list_next (walk)) { if (g_list_next (g_list_first (walk->data))) { /* We have to check some kind of configuration to see if we have a favorite */ current_element = gst_element_factory_make ("autoconvert", NULL); if (!current_element) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create autoconvert element"); goto error; } g_object_set (current_element, "factories", walk->data, NULL); } else { current_element = gst_element_factory_create ( GST_ELEMENT_FACTORY (g_list_first (walk->data)->data), NULL); if (!current_element) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create element for pt %d", codec->id); goto error; } } if (!gst_bin_add (GST_BIN (codec_bin), current_element)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add new element to %s codec_bin for pt %d", direction_str, codec->id); goto error; } if (_g_object_has_property (G_OBJECT (current_element), "pt")) g_object_set (current_element, "pt", codec->id, NULL); /* Lets create the ghost pads on the codec bin */ if (g_list_previous (walk) == NULL) /* if its the first element of the codec bin */ if (!_create_ghost_pad (current_element, (direction == FS_DIRECTION_SEND) ? "src" : "sink", codec_bin, error)) goto error; if (g_list_next (walk) == NULL) /* if its the last element of the codec bin */ if (!_create_ghost_pad (current_element, (direction == FS_DIRECTION_SEND) ? "sink" : "src" , codec_bin, error)) goto error; /* let's link them together using the specified media_caps if any * this will ensure that multi-codec encoders/decoders will select the * appropriate codec based on caps negotiation */ if (previous_element) { GstPad *sinkpad; GstPad *srcpad; GstPadLinkReturn ret; if (direction == FS_DIRECTION_SEND) sinkpad = gst_element_get_static_pad (previous_element, "sink"); else if (direction == FS_DIRECTION_RECV) sinkpad = gst_element_get_static_pad (current_element, "sink"); else g_assert_not_reached (); if (!sinkpad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get the sink pad one of the elements in the %s codec bin" " for pt %d", direction_str, codec->id); goto error; } if (direction == FS_DIRECTION_SEND) srcpad = gst_element_get_static_pad (current_element, "src"); else if (direction == FS_DIRECTION_RECV) srcpad = gst_element_get_static_pad (previous_element, "src"); else g_assert_not_reached (); if (!srcpad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get the src pad one of the elements in the %s codec bin" " for pt %d", direction_str, codec->id); gst_object_unref (sinkpad); goto error; } ret = gst_pad_link (srcpad, sinkpad); gst_object_unref (srcpad); gst_object_unref (sinkpad); if (GST_PAD_LINK_FAILED (ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link element inside the %s codec bin for pt %d", direction_str, codec->id); goto error; } } previous_element = current_element; } return codec_bin; error: gst_object_unref (codec_bin); return NULL; } GstCaps * codec_get_in_out_caps (FsCodec *codec, GstCaps *rtp_caps, FsStreamDirection direction, GstElement *codecbin) { GstElement *capsfilter = NULL; GstPad *pad = NULL; gboolean r; const gchar *padname = (direction == FS_DIRECTION_SEND) ? "sink" : "src"; GstCaps *caps = NULL; capsfilter = gst_element_factory_make ("capsfilter", NULL); g_object_set (capsfilter, "caps", rtp_caps, NULL); if (direction == FS_DIRECTION_SEND) r = gst_element_link (codecbin, capsfilter); else if (direction == FS_DIRECTION_RECV) r = gst_element_link (capsfilter, codecbin); else g_assert_not_reached (); if (!r) { GST_WARNING ("Could not link capsfilter to codecbin for " FS_CODEC_FORMAT, FS_CODEC_ARGS (codec)); goto done; } pad = gst_element_get_static_pad (codecbin, padname); if (!pad) { GST_WARNING ("Could not get %s pad on codecbin for " FS_CODEC_FORMAT, padname, FS_CODEC_ARGS (codec)); goto done; } caps = gst_pad_query_caps (pad, NULL); if (!caps) { GST_WARNING ("Query for caps on codecbin failed for " FS_CODEC_FORMAT, FS_CODEC_ARGS (codec)); goto done; } done: g_clear_object (&pad); g_clear_object (&capsfilter); return caps; } static void codec_blueprints_add_caps (FsMediaType media_type) { GList *item; for (item = list_codec_blueprints[media_type]; item;) { GList *next = item->next; CodecBlueprint *blueprint = item->data; gboolean success = FALSE; GError *error = NULL; FsCodec *codec_copy = NULL; /* If there are no pipelines, it's all ok */ if (!blueprint->send_pipeline_factory && !blueprint->receive_pipeline_factory) { success = TRUE; goto next; } codec_copy = fs_codec_copy (blueprint->codec); if (codec_copy->id == FS_CODEC_ID_ANY) codec_copy->id = 96; if (blueprint->send_pipeline_factory) { GstElement *codecbin; codecbin = create_codec_bin_from_blueprint (codec_copy, blueprint, "gather_send_codecbin", FS_DIRECTION_SEND, &error); if (!codecbin) { GST_WARNING ("Could not create send codec bin from blueprint for " FS_CODEC_FORMAT": %s", FS_CODEC_ARGS (blueprint->codec), error->message); goto next; } blueprint->input_caps = codec_get_in_out_caps (blueprint->codec, blueprint->rtp_caps, FS_DIRECTION_SEND, codecbin); gst_object_unref (codecbin); if (blueprint->input_caps == NULL) goto next; } if (blueprint->receive_pipeline_factory) { GstElement *codecbin; codecbin = create_codec_bin_from_blueprint (codec_copy, blueprint, "gather_recv_codecbin", FS_DIRECTION_RECV, &error); if (!codecbin) { GST_WARNING ("Could not create receive codec bin from blueprint for " FS_CODEC_FORMAT": %s", FS_CODEC_ARGS (blueprint->codec), error->message); goto next; } blueprint->output_caps = codec_get_in_out_caps (blueprint->codec, blueprint->rtp_caps, FS_DIRECTION_RECV, codecbin); gst_object_unref (codecbin); if (!blueprint->output_caps) goto next; } if (blueprint->input_caps == NULL) blueprint->input_caps = gst_caps_new_any (); if (blueprint->output_caps == NULL) blueprint->output_caps = gst_caps_new_any (); success = TRUE; next: if (codec_copy) fs_codec_destroy (codec_copy); g_clear_error (&error); if (!success) { codec_blueprint_destroy (blueprint); list_codec_blueprints[media_type] = g_list_delete_link ( list_codec_blueprints[media_type], item); } item = next; } } farstream-0.2.7/gst/fsrtpconference/fs-rtp-discover-codecs.h0000664000076400007640000000435112461773672021102 00000000000000/* * Farstream - Farstream RTP Discover Codecs * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-discover-codecs.h - A Farstream RTP Codec Discovery * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_DISCOVER_CODECS_H__ #define __FS_RTP_DISCOVER_CODECS_H__ #include #include #include G_BEGIN_DECLS /** * CodecBlueprint: * * All the members MUST be filled, except for send_pipeline_factory in the * case of a #FsRtpSpecialSource */ typedef struct _CodecBlueprint { FsCodec *codec; GstCaps *media_caps; GstCaps *rtp_caps; GstCaps *input_caps; GstCaps *output_caps; /* * These are #GList of #GList of #GstElementFactory */ GList *send_pipeline_factory; GList *receive_pipeline_factory; } CodecBlueprint; GList *fs_rtp_blueprints_get (FsMediaType media_type, GError **error); void fs_rtp_blueprints_unref (FsMediaType media_type); gboolean codec_blueprint_has_factory (CodecBlueprint *blueprint, FsStreamDirection direction); GstElement * create_codec_bin_from_blueprint (const FsCodec *codec, CodecBlueprint *blueprint, const gchar *name, FsStreamDirection direction, GError **error); GstCaps *codec_get_in_out_caps (FsCodec *codec, GstCaps *rtp_caps, FsStreamDirection direction, GstElement *codecbin); /* * Only exported for the caching stuff */ void codec_blueprint_destroy (CodecBlueprint *codec_blueprint); G_END_DECLS #endif /* __FS_RTP_DISCOVER_CODECS_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-bin-error-downgrade.c0000664000076400007640000000617212401500475021652 00000000000000/* * Farstream Voice+Video library * * Copyright 2012 Collabora Ltd, * @author: Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp-bin-error-downgrade.h" GST_DEBUG_CATEGORY (fs_rtp_bin_error_downgrade_debug); #define GST_CAT_DEFAULT (fs_rtp_bin_error_downgrade_debug) static void fs_rtp_bin_error_downgrade_handle_message (GstBin * bin, GstMessage * message); G_DEFINE_TYPE (FsRtpBinErrorDowngrade, fs_rtp_bin_error_downgrade, GST_TYPE_BIN); static void fs_rtp_bin_error_downgrade_class_init (FsRtpBinErrorDowngradeClass *klass) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); GstBinClass *gstbin_class = GST_BIN_CLASS (klass); GST_DEBUG_CATEGORY_INIT (fs_rtp_bin_error_downgrade_debug, "fsrtpbinerrordowngrade", 0, "fsrtpbinerrordowngrade"); gst_element_class_set_metadata (gstelement_class, "Farstream Bin Error Downgrader", "Bin", "Bin that downgrades error messages into warnings", "Olivier Crete "); gstbin_class->handle_message = fs_rtp_bin_error_downgrade_handle_message; } static void fs_rtp_bin_error_downgrade_init (FsRtpBinErrorDowngrade *self) { } static void fs_rtp_bin_error_downgrade_handle_message (GstBin* bin, GstMessage* message) { if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) { GError *error = NULL; gchar *debug = NULL; gchar *debug2; GstMessage *message2; gst_message_parse_error (message, &error, &debug); debug2 = g_strdup_printf ("FS-WAS-ERROR: %s", debug); message2 = gst_message_new_warning (GST_MESSAGE_SRC (message), error, debug2); g_error_free (error); g_free (debug); g_free (debug2); gst_message_unref (message); message = message2; } GST_BIN_CLASS (fs_rtp_bin_error_downgrade_parent_class)->handle_message (bin, message); } GstElement * fs_rtp_bin_error_downgrade_new (const gchar *name) { fs_rtp_bin_error_downgrade_register (); return gst_element_factory_make ("fsrtpbinerrordowngrade", name); } void fs_rtp_bin_error_downgrade_register (void) { static gsize initialization_value = 0; if (g_once_init_enter (&initialization_value)) { gsize setup_value = gst_element_register (NULL, "fsrtpbinerrordowngrade", GST_RANK_MARGINAL, FS_TYPE_RTP_BIN_ERROR_DOWNGRADE); g_once_init_leave (&initialization_value, setup_value); } } farstream-0.2.7/gst/fsrtpconference/fs-rtp-dtmf-sound-source.h0000664000076400007640000000470311710041462021362 00000000000000/* * Farstream - Farstream RTP DTMF Sound Source * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-dtmf-sound-source.h - A Farstream RTP Sound Source gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_DTMF_SOUND_SOURCE_H__ #define __FS_RTP_DTMF_SOUND_SOURCE_H__ #include "fs-rtp-special-source.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RTP_DTMF_SOUND_SOURCE \ (fs_rtp_dtmf_sound_source_get_type ()) #define FS_RTP_DTMF_SOUND_SOURCE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_DTMF_SOUND_SOURCE, \ FsRtpDtmfSoundSource)) #define FS_RTP_DTMF_SOUND_SOURCE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_DTMF_SOUND_SOURCE, \ FsRtpDtmfSoundSourceClass)) #define FS_IS_RTP_DTMF_SOUND_SOURCE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_DTMF_SOUND_SOURCE)) #define FS_IS_RTP_DTMF_SOUND_SOURCE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_DTMF_SOUND_SOURCE)) #define FS_RTP_DTMF_SOUND_SOURCE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_DTMF_SOUND_SOURCE, \ FsRtpDtmfSoundSourceClass)) #define FS_RTP_DTMF_SOUND_SOURCE_CAST(obj) ((FsRtpDtmfSoundSource*) (obj)) typedef struct _FsRtpDtmfSoundSource FsRtpDtmfSoundSource; typedef struct _FsRtpDtmfSoundSourceClass FsRtpDtmfSoundSourceClass; typedef struct _FsRtpDtmfSoundSourcePrivate FsRtpDtmfSoundSourcePrivate; struct _FsRtpDtmfSoundSourceClass { FsRtpSpecialSourceClass parent_class; }; /** * FsRtpDtmfSoundSource: * */ struct _FsRtpDtmfSoundSource { FsRtpSpecialSource parent; FsRtpDtmfSoundSourcePrivate *priv; }; GType fs_rtp_dtmf_sound_source_get_type (void); G_END_DECLS #endif /* __FS_RTP_DTMF_SOUND_SOURCE_H__ */ farstream-0.2.7/gst/fsrtpconference/fs-rtp-special-source.h0000664000076400007640000001161211710041462020717 00000000000000/* * Farstream - Farstream RTP Special Source * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rtp-special-source.h - A Farstream RTP Special Source gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_SPECIAL_SOURCE_H__ #define __FS_RTP_SPECIAL_SOURCE_H__ #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RTP_SPECIAL_SOURCE \ (fs_rtp_special_source_get_type ()) #define FS_RTP_SPECIAL_SOURCE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RTP_SPECIAL_SOURCE, \ FsRtpSpecialSource)) #define FS_RTP_SPECIAL_SOURCE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RTP_SPECIAL_SOURCE, \ FsRtpSpecialSourceClass)) #define FS_IS_RTP_SPECIAL_SOURCE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RTP_SPECIAL_SOURCE)) #define FS_IS_RTP_SPECIAL_SOURCE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RTP_SPECIAL_SOURCE)) #define FS_RTP_SPECIAL_SOURCE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RTP_SPECIAL_SOURCE, \ FsRtpSpecialSourceClass)) #define FS_RTP_SPECIAL_SOURCE_CAST(obj) ((FsRtpSpecialSource*) (obj)) typedef struct _FsRtpSpecialSource FsRtpSpecialSource; typedef struct _FsRtpSpecialSourceClass FsRtpSpecialSourceClass; typedef struct _FsRtpSpecialSourcePrivate FsRtpSpecialSourcePrivate; /** * FsRtpSpecialSourceClass: * @build: The method builds the source #GstElement from the list of negotiated * codecs and selected codecs, it returns %NULL on error * @add_blueprint: Adds #CodecBlueprint structs to the list if the proper * elements are installed, the result should always be the same if the elements * installed don't change. It must fill the #CodecBlueprint completely except * for the send_pipeline_factory field. If no blueprints are installed by this * class, this method is not required. * @negotiation_filter: This filters out the invalid CodecAssociation according * to the special source specific rules. * @get_codec: Gets the codec used by this source * * Class structure for #FsRtpSpecialSource, the build() and get_codec() * methods are required. */ struct _FsRtpSpecialSourceClass { GObjectClass parent_class; /* Object methods */ GstElement* (*build) (FsRtpSpecialSource *source, GList *negotiated_codec_associations, FsCodec *selected_codec); /* Class methods */ GList* (*add_blueprint) (FsRtpSpecialSourceClass *klass, GList *blueprints); GList* (*negotiation_filter) (FsRtpSpecialSourceClass *klass, GList *codec_associations); FsCodec* (*get_codec) (FsRtpSpecialSourceClass *klass, GList *negotiated_codec_associations, FsCodec *selected_codec); }; /** * FsRtpSpecialSource: * @order: a number between 0 and 100 that defines in which order the sources * will be traversed in order to send events to them. */ struct _FsRtpSpecialSource { GObject parent; FsCodec *codec; FsRtpSpecialSourcePrivate *priv; }; GType fs_rtp_special_source_get_type (void); typedef void (*fs_rtp_special_source_stopped_callback) ( FsRtpSpecialSource *self, gpointer data); gboolean fs_rtp_special_sources_remove ( GList **current_extra_sources, GList **negotiated_codec_associations, GMutex *mutex, FsCodec *selected_codec, fs_rtp_special_source_stopped_callback stopped_callback, gpointer stopped_data); void fs_rtp_special_sources_remove_finish (GList **extra_sources, GMutex *mutex, FsRtpSpecialSource *source); gboolean fs_rtp_special_sources_create ( GList **extra_sources, GList **negotiated_codec_associations, GMutex *mutex, FsCodec *selected_codec, GstElement *bin, GstElement *rtpmuxer); GList * fs_rtp_special_sources_destroy (GList *current_extra_sources); GList * fs_rtp_special_sources_add_blueprints (GList *blueprints); GList * fs_rtp_special_sources_negotiation_filter (GList *codec_associations); GList * fs_rtp_special_sources_get_codecs_locked (GList *special_sources, GList *codec_associations, FsCodec *main_codec); gboolean fs_rtp_special_sources_claim_message_locked (GList *special_sources, GstMessage *message); G_END_DECLS #endif /* __FS_RTP_SPECIAL_SOURCE_H__ */ farstream-0.2.7/gst/fsvideoanyrate/0000775000076400007640000000000012462323000014327 500000000000000farstream-0.2.7/gst/fsvideoanyrate/Makefile.in0000664000076400007640000006277512462321046016345 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = gst/fsvideoanyrate DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libfsvideoanyrate_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libfsvideoanyrate_la_OBJECTS = \ libfsvideoanyrate_la-videoanyrate.lo libfsvideoanyrate_la_OBJECTS = $(am_libfsvideoanyrate_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libfsvideoanyrate_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libfsvideoanyrate_la_CFLAGS) $(CFLAGS) \ $(libfsvideoanyrate_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfsvideoanyrate_la_SOURCES) DIST_SOURCES = $(libfsvideoanyrate_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = libfsvideoanyrate.la libfsvideoanyrate_la_SOURCES = videoanyrate.c libfsvideoanyrate_la_CFLAGS = \ $(FS_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) libfsvideoanyrate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libfsvideoanyrate_la_LIBADD = \ $(FS_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) noinst_HEADERS = videoanyrate.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(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 gst/fsvideoanyrate/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gst/fsvideoanyrate/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-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ } uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfsvideoanyrate.la: $(libfsvideoanyrate_la_OBJECTS) $(libfsvideoanyrate_la_DEPENDENCIES) $(EXTRA_libfsvideoanyrate_la_DEPENDENCIES) $(AM_V_CCLD)$(libfsvideoanyrate_la_LINK) -rpath $(plugindir) $(libfsvideoanyrate_la_OBJECTS) $(libfsvideoanyrate_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfsvideoanyrate_la-videoanyrate.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libfsvideoanyrate_la-videoanyrate.lo: videoanyrate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfsvideoanyrate_la_CFLAGS) $(CFLAGS) -MT libfsvideoanyrate_la-videoanyrate.lo -MD -MP -MF $(DEPDIR)/libfsvideoanyrate_la-videoanyrate.Tpo -c -o libfsvideoanyrate_la-videoanyrate.lo `test -f 'videoanyrate.c' || echo '$(srcdir)/'`videoanyrate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfsvideoanyrate_la-videoanyrate.Tpo $(DEPDIR)/libfsvideoanyrate_la-videoanyrate.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='videoanyrate.c' object='libfsvideoanyrate_la-videoanyrate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfsvideoanyrate_la_CFLAGS) $(CFLAGS) -c -o libfsvideoanyrate_la-videoanyrate.lo `test -f 'videoanyrate.c' || echo '$(srcdir)/'`videoanyrate.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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)$(plugindir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-pluginLTLIBRARIES \ 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-pluginLTLIBRARIES 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-pluginLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pluginLTLIBRARIES 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 tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES # 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: farstream-0.2.7/gst/fsvideoanyrate/Makefile.am0000664000076400007640000000052311710041462016307 00000000000000plugin_LTLIBRARIES = libfsvideoanyrate.la libfsvideoanyrate_la_SOURCES = videoanyrate.c libfsvideoanyrate_la_CFLAGS = \ $(FS_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) libfsvideoanyrate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libfsvideoanyrate_la_LIBADD = \ $(FS_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) noinst_HEADERS = videoanyrate.h farstream-0.2.7/gst/fsvideoanyrate/videoanyrate.c0000664000076400007640000001257512401500475017125 00000000000000/* * Farstream Voice+Video library * * Copyright 2007-2012 Collabora Ltd, * Copyright 2007 Nokia Corporation * @author: Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:element-fsvideoanyrate * @short_description: Removes the framerate from video caps * * This element will remove the framerate from video caps, it is a poor man's * videorate for live pipelines. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "videoanyrate.h" #include GST_DEBUG_CATEGORY (videoanyrate_debug); #define GST_CAT_DEFAULT (videoanyrate_debug) static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); /* Videoanyrate signals and args */ enum { /* FILL ME */ LAST_SIGNAL }; enum { ARG_0, }; static GstCaps * fs_videoanyrate_transform_caps (GstBaseTransform *trans, GstPadDirection direction, GstCaps *caps, GstCaps *filter); static GstCaps * fs_videoanyrate_fixate_caps (GstBaseTransform * base, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps); G_DEFINE_TYPE (FsVideoanyrate, fs_videoanyrate, GST_TYPE_BASE_TRANSFORM); static void fs_videoanyrate_class_init (FsVideoanyrateClass *klass) { GstElementClass *element_class; GstBaseTransformClass *gstbasetransform_class; element_class = GST_ELEMENT_CLASS (klass); gstbasetransform_class = GST_BASE_TRANSFORM_CLASS (klass); GST_DEBUG_CATEGORY_INIT (videoanyrate_debug, "fsvideoanyrate", 0, "fsvideoanyrate"); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&srctemplate)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sinktemplate)); gst_element_class_set_metadata (element_class, "Videoanyrate element", "Filter", "This element removes the framerate from caps", "Olivier Crete "); gstbasetransform_class->transform_caps = GST_DEBUG_FUNCPTR (fs_videoanyrate_transform_caps); gstbasetransform_class->fixate_caps = GST_DEBUG_FUNCPTR (fs_videoanyrate_fixate_caps); } static void fs_videoanyrate_init (FsVideoanyrate *videoanyrate) { } static GstCaps * fs_videoanyrate_transform_caps (GstBaseTransform *trans, GstPadDirection direction, GstCaps *caps, GstCaps *filter) { GstCaps *mycaps = gst_caps_copy (caps); guint i; if (gst_caps_get_size (mycaps) == 0) return mycaps; GST_DEBUG_OBJECT (trans, "Transforming caps"); for (i = 0; i < gst_caps_get_size (mycaps); i++) { GstStructure *s; s = gst_caps_get_structure (mycaps, i); if (gst_structure_has_field (s, "framerate")) gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL); } if (filter) { GstCaps *intersected = gst_caps_intersect (mycaps, filter); gst_caps_unref (mycaps); mycaps = intersected; } return mycaps; } static GstCaps * fs_videoanyrate_fixate_caps (GstBaseTransform * base, GstPadDirection direction, GstCaps * caps, GstCaps * othercaps) { GstStructure *ins, *outs; const GValue *from_fr, *to_fr; g_return_val_if_fail (gst_caps_is_fixed (caps), othercaps); othercaps = gst_caps_make_writable (othercaps); GST_DEBUG_OBJECT (base, "trying to fixate othercaps %" GST_PTR_FORMAT " based on caps %" GST_PTR_FORMAT, othercaps, caps); ins = gst_caps_get_structure (caps, 0); outs = gst_caps_get_structure (othercaps, 0); from_fr = gst_structure_get_value (ins, "framerate"); to_fr = gst_structure_get_value (outs, "framerate"); /* we have both PAR but they might not be fixated */ if (from_fr && to_fr && !gst_value_is_fixed (to_fr)) { gint from_fr_n, from_fr_d; /* from_fr should be fixed */ g_return_val_if_fail (gst_value_is_fixed (from_fr), othercaps); from_fr_n = gst_value_get_fraction_numerator (from_fr); from_fr_d = gst_value_get_fraction_denominator (from_fr); GST_DEBUG_OBJECT (base, "fixating to_fr nearest to %d/%d", from_fr_n, from_fr_d); gst_structure_fixate_field_nearest_fraction (outs, "framerate", from_fr_n, from_fr_d); } return gst_caps_fixate (othercaps); } gboolean fs_videoanyrate_plugin_init (GstPlugin *plugin) { return gst_element_register (plugin, "fsvideoanyrate", GST_RANK_MARGINAL, FS_TYPE_VIDEOANYRATE); } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, fsvideoanyrate, "Videoanyrate", fs_videoanyrate_plugin_init, VERSION, "LGPL", "Farstream", "http://www.freedesktop.org/wiki/Software/Farstream") farstream-0.2.7/gst/fsvideoanyrate/videoanyrate.h0000664000076400007640000000356112401500475017125 00000000000000/* * Farstream Voice+Video library * * Copyright 2008 Collabora Ltd * Copyright 2008 Nokia Corporation * @author: Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_VIDEOANYRATE_H__ #define __FS_VIDEOANYRATE_H__ #include #include G_BEGIN_DECLS /* #define's don't like whitespacey bits */ #define FS_TYPE_VIDEOANYRATE \ (fs_videoanyrate_get_type()) #define FS_VIDEOANYRATE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), \ FS_TYPE_VIDEOANYRATE,FsVideoanyrate)) #define FS_VIDEOANYRATE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), \ FS_TYPE_VIDEOANYRATE,FsVideoanyrateClass)) #define FS_IS_VIDEOANYRATE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_VIDEOANYRATE)) #define FS_IS_VIDEOANYRATE_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_VIDEOANYRATE)) typedef struct _FsVideoanyrate FsVideoanyrate; typedef struct _FsVideoanyrateClass FsVideoanyrateClass; struct _FsVideoanyrate { GstBaseTransform parent; }; struct _FsVideoanyrateClass { GstBaseTransformClass parent_class; }; GType fs_videoanyrate_get_type (void); G_END_DECLS #endif /* __FS_VIDEOANYRATE_H__ */ farstream-0.2.7/install-sh0000755000076400007640000003325512073410014012441 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: farstream-0.2.7/configure0000775000076400007640000207425112462321047012362 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Farstream 0.2.7. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) 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 for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # 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 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+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 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 else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # 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 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+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $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 and $0: https://bugs.freedesktop.org/enter_bug.cgi?product=Farstream $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # 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. as_fn_error () { 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: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO 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'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Farstream' PACKAGE_TARNAME='farstream' PACKAGE_VERSION='0.2.7' PACKAGE_STRING='Farstream 0.2.7' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Farstream' PACKAGE_URL='' ac_unique_file="farstream/fs-conference.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS GUPNP_LIBS GUPNP_CFLAGS GST_PLUGIN_LDFLAGS FS_PLUGIN_LDFLAGS FS_LIB_LDFLAGS FS_ALL_LDFLAGS FS_LIBS FS_CFLAGS FS_INTERNAL_CFLAGS FS_OPTION_CFLAGS PROFILE_CFLAGS GST_LEVEL_DEFAULT ERROR_CFLAGS WARNING_CFLAGS plugindir PLUGINDIR FS_LICENSE FS_PREFIX GLIB_PREFIX HAVE_GST_CHECK_FALSE HAVE_GST_CHECK_TRUE GSTPB_PLUGINS_DIR GST_PLUGINS_BASE_DIR GST_PLUGINS_BASE_LIBS GST_PLUGINS_BASE_CFLAGS GST_CHECK_LIBS GST_CHECK_CFLAGS GST_BASE_LIBS GST_BASE_CFLAGS GST_PLUGINS_DIR GST_TOOLS_DIR GST_LIBS GST_CFLAGS HAVE_GIO_UNIX_FALSE HAVE_GIO_UNIX_TRUE GIO_UNIX_LIBS GIO_UNIX_CFLAGS GIO_LDFLAGS GIO_LIBS GIO_CFLAGS GLIB_EXTRA_CFLAGS GLIB_LIBS GLIB_CFLAGS GLIB_REQ ENABLE_PLUGIN_DOCS_FALSE ENABLE_PLUGIN_DOCS_TRUE pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON GTK_DOC_USE_REBASE_FALSE GTK_DOC_USE_REBASE_TRUE GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_BUILD_PDF_FALSE GTK_DOC_BUILD_PDF_TRUE GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC_DEPS_LIBS GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK HAVE_INTROSPECTION_FALSE HAVE_INTROSPECTION_TRUE INTROSPECTION_MAKEFILE INTROSPECTION_LIBS INTROSPECTION_CFLAGS INTROSPECTION_TYPELIBDIR INTROSPECTION_GIRDIR INTROSPECTION_GENERATE INTROSPECTION_COMPILER INTROSPECTION_SCANNER HAVE_VALGRIND_FALSE HAVE_VALGRIND_TRUE VALGRIND_PATH HAVE_CPU_CRISV32_FALSE HAVE_CPU_CRISV32_TRUE HAVE_CPU_CRIS_FALSE HAVE_CPU_CRIS_TRUE HAVE_CPU_X86_64_FALSE HAVE_CPU_X86_64_TRUE HAVE_CPU_M68K_FALSE HAVE_CPU_M68K_TRUE HAVE_CPU_IA64_FALSE HAVE_CPU_IA64_TRUE HAVE_CPU_S390_FALSE HAVE_CPU_S390_TRUE HAVE_CPU_MIPS_FALSE HAVE_CPU_MIPS_TRUE HAVE_CPU_HPPA_FALSE HAVE_CPU_HPPA_TRUE HAVE_CPU_SPARC_FALSE HAVE_CPU_SPARC_TRUE HAVE_CPU_ARM_FALSE HAVE_CPU_ARM_TRUE HAVE_CPU_ALPHA_FALSE HAVE_CPU_ALPHA_TRUE HAVE_CPU_PPC64_FALSE HAVE_CPU_PPC64_TRUE HAVE_CPU_PPC_FALSE HAVE_CPU_PPC_TRUE HAVE_CPU_I386_FALSE HAVE_CPU_I386_TRUE FS_PLUGIN_PATH FS_TRANSMITTER_PLUGINS_SELECTED NICE_LIBS NICE_CFLAGS FS_TRANSMITTER_PLUGINS_ALL FS_PLUGINS_SELECTED FS_PLUGINS_ALL GST_INSTALL_PLUGINS_HELPER GST_PACKAGE_ORIGIN GST_PACKAGE_NAME GST_GCOV_ENABLED_FALSE GST_GCOV_ENABLED_TRUE CCASFLAGS FFLAGS CXXFLAGS GCOV GCOV_LIBS GCOV_CFLAGS VALGRIND_LIBS VALGRIND_CFLAGS PKG_CONFIG ACLOCAL_AMFLAGS CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL OBJDUMP DLLTOOL AS FS_LT_LDFLAGS FS_LIBVERSION FS_AGE FS_REVISION FS_CURRENT GST_API_VERSION FS_API_VERSION FS_APIVERSION PACKAGE_VERSION_RELEASE PACKAGE_VERSION_NANO PACKAGE_VERSION_MICRO PACKAGE_VERSION_MINOR PACKAGE_VERSION_MAJOR AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_static enable_shared with_pic enable_fast_install enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock with_autoconf with_autoheader with_automake with_aclocal enable_debug enable_profiling enable_valgrind enable_gcov with_pkg_config_path with_package_name with_package_origin with_install_plugins_helper with_plugins with_transmitter_plugins enable_introspection with_html_dir enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf enable_gobject_cast_checks enable_glib_asserts enable_gupnp ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG VALGRIND_CFLAGS VALGRIND_LIBS NICE_CFLAGS NICE_LIBS GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS GLIB_CFLAGS GLIB_LIBS GIO_CFLAGS GIO_LIBS GIO_UNIX_CFLAGS GIO_UNIX_LIBS GST_CFLAGS GST_LIBS GST_BASE_CFLAGS GST_BASE_LIBS GST_CHECK_CFLAGS GST_CHECK_LIBS GST_PLUGINS_BASE_CFLAGS GST_PLUGINS_BASE_LIBS GUPNP_CFLAGS GUPNP_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --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" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # 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'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $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}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` 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" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac 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' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null 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" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no 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" 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" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # 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 Farstream 0.2.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --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 --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 --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/farstream] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Farstream 0.2.7:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --disable-debug disable addition of -g debugging info --enable-profiling adds -pg to compiler commandline, for profiling --disable-valgrind disable run-time valgrind detection --enable-gcov compile with coverage profiling instrumentation (gcc only) --enable-introspection=[no/auto/yes] Enable introspection for this build --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] --enable-gobject-cast-checks=[no/auto/yes] Enable GObject cast checks --enable-glib-asserts=[no/auto/yes] Enable GLib assertion --disable-gupnp Disable GUPnP IGD support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] 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-autoconf use a different autoconf for regeneration of Makefiles --with-autoheader use a different autoheader for regeneration of Makefiles --with-automake use a different automake for regeneration of Makefiles --with-aclocal use a different aclocal for regeneration of Makefiles --with-pkg-config-path colon-separated list of pkg-config(1) dirs --with-package-name specify package name to use in plugins --with-package-origin specify package origin URL to use in plugins --with-install-plugins-helper specify path of helper script to call to install plugins --with-plugins comma-separated list of plug-ins to compile --with-transmitter-plugins comma-separated list of plug-ins to compile --with-html-dir=PATH path to installed docs Some influential environment variables: CC C compiler command CFLAGS C compiler flags 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 (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 VALGRIND_CFLAGS C compiler flags for VALGRIND, overriding pkg-config VALGRIND_LIBS linker flags for VALGRIND, overriding pkg-config NICE_CFLAGS C compiler flags for NICE, overriding pkg-config NICE_LIBS linker flags for NICE, overriding pkg-config GTKDOC_DEPS_CFLAGS C compiler flags for GTKDOC_DEPS, overriding pkg-config GTKDOC_DEPS_LIBS linker flags for GTKDOC_DEPS, overriding pkg-config GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config GIO_CFLAGS C compiler flags for GIO, overriding pkg-config GIO_LIBS linker flags for GIO, overriding pkg-config GIO_UNIX_CFLAGS C compiler flags for GIO_UNIX, overriding pkg-config GIO_UNIX_LIBS linker flags for GIO_UNIX, overriding pkg-config GST_CFLAGS C compiler flags for GST, overriding pkg-config GST_LIBS linker flags for GST, overriding pkg-config GST_BASE_CFLAGS C compiler flags for GST_BASE, overriding pkg-config GST_BASE_LIBS linker flags for GST_BASE, overriding pkg-config GST_CHECK_CFLAGS C compiler flags for GST_CHECK, overriding pkg-config GST_CHECK_LIBS linker flags for GST_CHECK, overriding pkg-config GST_PLUGINS_BASE_CFLAGS C compiler flags for GST_PLUGINS_BASE, overriding pkg-config GST_PLUGINS_BASE_LIBS linker flags for GST_PLUGINS_BASE, overriding pkg-config GUPNP_CFLAGS C compiler flags for GUPNP, overriding pkg-config GUPNP_LIBS linker flags for GUPNP, 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 . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Farstream configure 0.2.7 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" 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_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { 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>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # 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; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { 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 eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" 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_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { 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; } && { ac_try='./conftest$ac_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 : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { 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 eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------------------------------------------------- ## ## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Farstream ## ## --------------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member 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 Farstream $as_me 0.2.7, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # 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 else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue 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" \ || { { $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. 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 [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $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 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 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 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # 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_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } 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 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 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;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } 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 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $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 ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL 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. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) 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;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # 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 alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else 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 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 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 ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $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 STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $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_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" 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 STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $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 ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # 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. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk 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 ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $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 AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $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 eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # 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;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." 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 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='farstream' VERSION='0.2.7' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi PACKAGE_VERSION_MAJOR=$(echo 0.2.7 | cut -d'.' -f1) PACKAGE_VERSION_MINOR=$(echo 0.2.7 | cut -d'.' -f2) PACKAGE_VERSION_MICRO=$(echo 0.2.7 | cut -d'.' -f3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 $as_echo_n "checking nano version... " >&6; } NANO=$(echo 0.2.7 | 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 FS_GIT="no" 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` if test "x$NANO" != "x1" ; then FS_GIT="no" else FS_GIT="yes" fi fi PACKAGE_VERSION_NANO=$NANO ac_config_headers="$ac_config_headers config.h" # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' FS_APIVERSION=0.2 FS_API_VERSION=0_2 cat >>confdefs.h <<_ACEOF #define FS_APIVERSION "$FS_APIVERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define FS_API_VERSION "$FS_APIVERSION" _ACEOF GST_API_VERSION=1.0 cat >>confdefs.h <<_ACEOF #define GST_API_VERSION "$GST_API_VERSION" _ACEOF case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 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 ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $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_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" 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 CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 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 ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. 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 ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $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 if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe 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 ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $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_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" 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 CC=$ac_ct_CC fi fi fi 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; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" 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_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 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. */ int main () { ; 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" # 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 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: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" 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_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $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_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 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $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" 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; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done 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; } fi 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 ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" 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_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $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_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext 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 ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} 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 ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi 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 ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } 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 # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $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 ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done 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 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $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 ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done 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 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done 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 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } 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 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done 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 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $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 { $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 ${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. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $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 ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. 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 ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $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 DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN 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 ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $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_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" 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 DUMPBIN=$ac_ct_DUMPBIN fi 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 { $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 ${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:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&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:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; 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, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # 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 ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). 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. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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"`env 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` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $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 ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; 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' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. 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 ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $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 OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="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 OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $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 ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # 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. # 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 # 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*) # 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' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) 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 ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' 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])(-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_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac 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 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 as_fn_executable_p "$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 as_fn_executable_p "$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 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 ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 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 done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR 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 ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 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 done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="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 AR=$ac_ct_AR fi fi : ${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 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 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 ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $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 STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $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_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" 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 STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 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 ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $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 RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $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_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" 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 RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # 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 ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. 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'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" 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 rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF 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; }; 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 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. 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 _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext 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 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $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 { $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; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext 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; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext 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; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" 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 ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext 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; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac 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 as_fn_executable_p "$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 as_fn_executable_p "$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 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. 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 ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $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 DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $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_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" 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 DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. 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 ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $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 NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" 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 NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. 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 ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $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 LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $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_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" 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 LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. 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 ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $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 OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $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_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" 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 OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. 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 ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $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 OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $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_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" 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 OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $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 ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $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 ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" 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 -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; 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' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 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; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $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 ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : 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 " 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 fi done for ac_header in dlfcn.h 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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done FS_CURRENT=5 FS_REVISION=0 FS_AGE=0 FS_LIBVERSION=5:0:0 FS_LT_LDFLAGS="$FS_LT_LDFLAGS -version-info $FS_LIBVERSION" if test ! -z "" then FS_LT_LDFLAGS="$FS_LT_LDFLAGS -release " fi # Set options enable_dlopen=yes enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; 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_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $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 AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; 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_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $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_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="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 AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi 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 as_fn_executable_p "$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 as_fn_executable_p "$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 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. 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 ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $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 OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="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 OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) 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 ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then 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 ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then 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 ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&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 "$_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 fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files 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 # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; 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,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; 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\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # 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='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $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. # 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 ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&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 "$_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 fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # 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 ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" 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_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $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 ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&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 "$_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 fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $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 ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&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 "$_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 fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=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}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= 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 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** 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 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 ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _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/;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' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no 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 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 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 | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; 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' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in 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='${wl}-rpath ${wl}$libdir' 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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else 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 ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 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 ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 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' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 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 ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" 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") || (\$ 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 aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. 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 main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : 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 "$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 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' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. 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 main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : 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 "$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' 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' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. 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 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 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*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported 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 ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then 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}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) 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 ;; hpux9*) if test "$GCC" = yes; then 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 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) 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 if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) 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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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 case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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 if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then 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. # 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) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : 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" 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" && 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' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) 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' 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" && 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" && 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' hardcode_libdir_separator=: ;; 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} $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" && 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 "-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' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' 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 $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"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # 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; } 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 (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 (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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac 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 '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= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ 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 ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # 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 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; 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=`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 ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no 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}`~ 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~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in 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="$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}' ;; 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 # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no 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 ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no 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 # correct to gnu/linux during the next big refactor 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 ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # 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]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' 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 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 main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : 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 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 # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # 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;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no 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 dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no 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=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor 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 case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $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= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # 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 ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" 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 ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = 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" = 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 ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = 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 ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = 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 ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS 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" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $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 ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* 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); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then 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 ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* 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); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $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; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: GST_REQ=1.4 GSTPB_REQ=1.4 # Check whether --with-autoconf was given. if test "${with_autoconf+set}" = set; then : withval=$with_autoconf; unset AUTOCONF AUTOCONF=${AUTOCONF-"${am_missing_run}${withval}"} { $as_echo "$as_me:${as_lineno-$LINENO}: Using $AUTOCONF as autoconf" >&5 $as_echo "$as_me: Using $AUTOCONF as autoconf" >&6;} fi # Check whether --with-autoheader was given. if test "${with_autoheader+set}" = set; then : withval=$with_autoheader; unset AUTOHEADER AUTOHEADER=${AUTOHEADER-"${am_missing_run}${withval}"} { $as_echo "$as_me:${as_lineno-$LINENO}: Using $AUTOHEADER as autoheader" >&5 $as_echo "$as_me: Using $AUTOHEADER as autoheader" >&6;} fi # Check whether --with-automake was given. if test "${with_automake+set}" = set; then : withval=$with_automake; unset AUTOMAKE AUTOMAKE=${AUTOMAKE-"${am_missing_run}${withval}"} { $as_echo "$as_me:${as_lineno-$LINENO}: Using $AUTOMAKE as automake" >&5 $as_echo "$as_me: Using $AUTOMAKE as automake" >&6;} fi # Check whether --with-aclocal was given. if test "${with_aclocal+set}" = set; then : withval=$with_aclocal; unset ACLOCAL ACLOCAL=${ACLOCAL-"${am_missing_run}${withval}"} { $as_echo "$as_me:${as_lineno-$LINENO}: Using $ACLOCAL as aclocal" >&5 $as_echo "$as_me: Using $ACLOCAL as aclocal" >&6;} fi ACLOCAL_AMFLAGS="-I m4 -I common/m4" # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; case "${enableval}" in yes) USE_DEBUG=yes ;; no) USE_DEBUG=no ;; *) as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;; esac else USE_DEBUG=yes fi # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; case "${enableval}" in yes) USE_PROFILING=yes ;; no) USE_PROFILING=no ;; *) as_fn_error $? "bad value ${enableval} for --enable-profiling" "$LINENO" 5 ;; esac else USE_PROFILING=no fi 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 ${ac_cv_path_PKG_CONFIG+:} false; 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 as_fn_executable_p "$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 ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; 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 as_fn_executable_p "$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 # Check whether --enable-valgrind was given. if test "${enable_valgrind+set}" = set; then : enableval=$enable_valgrind; case "${enableval}" in yes) USE_VALGRIND="$USE_DEBUG" ;; no) USE_VALGRIND=no ;; *) as_fn_error $? "bad value ${enableval} for --enable-valgrind" "$LINENO" 5 ;; esac else USE_VALGRIND="$USE_DEBUG" fi VALGRIND_REQ="3.0" if test "x$USE_VALGRIND" = xyes; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND" >&5 $as_echo_n "checking for VALGRIND... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$VALGRIND_CFLAGS"; then pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= \$VALGRIND_REQ\""; } >&5 ($PKG_CONFIG --exists --print-errors "valgrind >= $VALGRIND_REQ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_VALGRIND_CFLAGS=`$PKG_CONFIG --cflags "valgrind >= $VALGRIND_REQ" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$VALGRIND_LIBS"; then pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= \$VALGRIND_REQ\""; } >&5 ($PKG_CONFIG --exists --print-errors "valgrind >= $VALGRIND_REQ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_VALGRIND_LIBS=`$PKG_CONFIG --libs "valgrind >= $VALGRIND_REQ" 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 VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "valgrind >= $VALGRIND_REQ"` else VALGRIND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "valgrind >= $VALGRIND_REQ"` fi # Put the nasty error message in config.log where it belongs echo "$VALGRIND_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } USE_VALGRIND="no" elif test $pkg_failed = untried; then USE_VALGRIND="no" else VALGRIND_CFLAGS=$pkg_cv_VALGRIND_CFLAGS VALGRIND_LIBS=$pkg_cv_VALGRIND_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } USE_VALGRIND="yes" fi fi if test "x$USE_VALGRIND" = xyes; then $as_echo "#define HAVE_VALGRIND 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: Using extra code paths for valgrind" >&5 $as_echo "$as_me: Using extra code paths for valgrind" >&6;} fi # Check whether --enable-gcov was given. if test "${enable_gcov+set}" = set; then : enableval=$enable_gcov; enable_gcov=$enableval else enable_gcov=no fi if test x$enable_gcov = xyes ; then if test "x$GCC" != "xyes" then as_fn_error $? "gcov only works if gcc is used" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands \"-fprofile-arcs\"" >&5 $as_echo_n "checking to see if compiler understands \"-fprofile-arcs\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-fprofile-arcs"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then GCOV_CFLAGS="$GCOV_CFLAGS -fprofile-arcs" true else true true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands \"-ftest-coverage\"" >&5 $as_echo_n "checking to see if compiler understands \"-ftest-coverage\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-ftest-coverage"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then GCOV_CFLAGS="$GCOV_CFLAGS -ftest-coverage" true else true true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } GCOV_CFLAGS=`echo "$GCOV_CFLAGS" | sed -e 's/-O[0-9]*//g'` GCOV_LIBS=-lgcov GCOV=`echo $CC | sed s/gcc/gcov/g` GST_GCOV_ENABLED=yes cat >>confdefs.h <<_ACEOF #define GST_GCOV_ENABLED 1 _ACEOF if test "x$GST_GCOV_ENABLED" = "xyes" then CFLAGS="$CFLAGS -O0" CXXFLAGS="$CXXFLAGS -O0" FFLAGS="$FFLAGS -O0" CCASFLAGS="$CCASFLAGS -O0" { $as_echo "$as_me:${as_lineno-$LINENO}: gcov enabled, setting CFLAGS and friends to $CFLAGS" >&5 $as_echo "$as_me: gcov enabled, setting CFLAGS and friends to $CFLAGS" >&6;} fi fi if test x$enable_gcov = xyes; then GST_GCOV_ENABLED_TRUE= GST_GCOV_ENABLED_FALSE='#' else GST_GCOV_ENABLED_TRUE='#' GST_GCOV_ENABLED_FALSE= fi # Check whether --with-pkg-config-path was given. if test "${with_pkg_config_path+set}" = set; then : withval=$with_pkg_config_path; export PKG_CONFIG_PATH=${withval} { $as_echo "$as_me:${as_lineno-$LINENO}: Set PKG_CONFIG_PATH to $PKG_CONFIG_PATH" >&5 $as_echo "$as_me: Set PKG_CONFIG_PATH to $PKG_CONFIG_PATH" >&6;} fi # Check whether --with-package-name was given. if test "${with_package_name+set}" = set; then : withval=$with_package_name; case "${withval}" in yes) as_fn_error $? "bad value ${withval} for --with-package-name" "$LINENO" 5 ;; no) as_fn_error $? "bad value ${withval} for --with-package-name" "$LINENO" 5 ;; *) GST_PACKAGE_NAME="${withval}" ;; esac else P= if test "x$P" = "x" then P=$PACKAGE_NAME fi if test "x$PACKAGE_VERSION_NANO" = "x0" then GST_PACKAGE_NAME="$P source release" else if test "x$PACKAGE_VERSION_NANO" = "x1" then GST_PACKAGE_NAME="$P git" else GST_PACKAGE_NAME="$P prerelease" fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: Using $GST_PACKAGE_NAME as package name" >&5 $as_echo "$as_me: Using $GST_PACKAGE_NAME as package name" >&6;} cat >>confdefs.h <<_ACEOF #define GST_PACKAGE_NAME "$GST_PACKAGE_NAME" _ACEOF # Check whether --with-package-origin was given. if test "${with_package_origin+set}" = set; then : withval=$with_package_origin; case "${withval}" in yes) as_fn_error $? "bad value ${withval} for --with-package-origin" "$LINENO" 5 ;; no) as_fn_error $? "bad value ${withval} for --with-package-origin" "$LINENO" 5 ;; *) GST_PACKAGE_ORIGIN="${withval}" ;; esac else GST_PACKAGE_ORIGIN="Unknown package origin" fi { $as_echo "$as_me:${as_lineno-$LINENO}: Using $GST_PACKAGE_ORIGIN as package origin" >&5 $as_echo "$as_me: Using $GST_PACKAGE_ORIGIN as package origin" >&6;} cat >>confdefs.h <<_ACEOF #define GST_PACKAGE_ORIGIN "$GST_PACKAGE_ORIGIN" _ACEOF # Check whether --with-install-plugins-helper was given. if test "${with_install_plugins_helper+set}" = set; then : withval=$with_install_plugins_helper; case "${withval}" in yes) as_fn_error $? "bad value ${withval} for --with-install-plugins-helper" "$LINENO" 5 ;; no) as_fn_error $? "bad value ${withval} for --with-install-plugins-helper" "$LINENO" 5 ;; *) GST_INSTALL_PLUGINS_HELPER="${withval}" ;; esac else EXP_VAR=GST_INSTALL_PLUGINS_HELPER FROM_VAR=${libexecdir}/gst-install-plugins-helper prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var GST_INSTALL_PLUGINS_HELPER="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save fi { $as_echo "$as_me:${as_lineno-$LINENO}: Using $GST_INSTALL_PLUGINS_HELPER as plugin install helper" >&5 $as_echo "$as_me: Using $GST_INSTALL_PLUGINS_HELPER as plugin install helper" >&6;} cat >>confdefs.h <<_ACEOF #define GST_INSTALL_PLUGINS_HELPER "$GST_INSTALL_PLUGINS_HELPER" _ACEOF FS_PLUGINS_ALL=" \ fsrawconference \ fsrtpconference \ fsmsnconference \ fsvideoanyrate \ fsrtpxdata \ " FS_PLUGINS_SELECTED="" # Check whether --with-plugins was given. if test "${with_plugins+set}" = set; then : withval=$with_plugins; for i in `echo $withval | tr , ' '`; do if echo $FS_PLUGINS_ALL | grep $i > /dev/null then FS_PLUGINS_SELECTED="$FS_PLUGINS_SELECTED $i" else echo "plug-in $i not recognized, ignoring..." fi done else FS_PLUGINS_SELECTED=$FS_PLUGINS_ALL fi FS_TRANSMITTER_PLUGINS_ALL=" \ rawudp \ multicast \ nice \ shm " FS_TRANSMITTER_PLUGINS_SELECTED="" TRANSMITTERS_DEFAULT=yes # Check whether --with-transmitter-plugins was given. if test "${with_transmitter_plugins+set}" = set; then : withval=$with_transmitter_plugins; for i in `echo $withval | tr , ' '`; do if echo $FS_TRANSMITTER_PLUGINS_ALL | grep $i > /dev/null then FS_TRANSMITTER_PLUGINS_SELECTED="$FS_TRANSMITTER_PLUGINS_SELECTED $i" else echo "plug-in $i not recognized, ignoring..." fi done TRANSMITTERS_DEFAULT=no else FS_TRANSMITTER_PLUGINS_SELECTED=$FS_TRANSMITTER_PLUGINS_ALL fi NICE_REQUIRED=0.1.8 pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5 $as_echo_n "checking for NICE... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$NICE_CFLAGS"; then pkg_cv_NICE_CFLAGS="$NICE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\\ nice >= \$NICE_REQUIRED\""; } >&5 ($PKG_CONFIG --exists --print-errors "\ nice >= $NICE_REQUIRED") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NICE_CFLAGS=`$PKG_CONFIG --cflags "\ nice >= $NICE_REQUIRED" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$NICE_LIBS"; then pkg_cv_NICE_LIBS="$NICE_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\\ nice >= \$NICE_REQUIRED\""; } >&5 ($PKG_CONFIG --exists --print-errors "\ nice >= $NICE_REQUIRED") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NICE_LIBS=`$PKG_CONFIG --libs "\ nice >= $NICE_REQUIRED" 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 NICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "\ nice >= $NICE_REQUIRED"` else NICE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "\ nice >= $NICE_REQUIRED"` fi # Put the nasty error message in config.log where it belongs echo "$NICE_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "Need libnice >= $NICE_REQUIRED" "$LINENO" 5 elif test $pkg_failed = untried; then as_fn_error $? "Need libnice >= $NICE_REQUIRED" "$LINENO" 5 else NICE_CFLAGS=$pkg_cv_NICE_CFLAGS NICE_LIBS=$pkg_cv_NICE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi EXP_VAR=FS_PLUGIN_PATH FROM_VAR=${libdir}/farstream-$FS_APIVERSION prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var FS_PLUGIN_PATH="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save cat >>confdefs.h <<_ACEOF #define FS_PLUGIN_PATH "${FS_PLUGIN_PATH}" _ACEOF case "x${target_cpu}" in xi?86 | xk? | xi?86_64) case $target_os in solaris*) ac_fn_c_check_decl "$LINENO" "__i386" "ac_cv_have_decl___i386" "$ac_includes_default" if test "x$ac_cv_have_decl___i386" = xyes; then : I386_ABI="yes" else I386_ABI="no" fi ac_fn_c_check_decl "$LINENO" "__amd64" "ac_cv_have_decl___amd64" "$ac_includes_default" if test "x$ac_cv_have_decl___amd64" = xyes; then : AMD64_ABI="yes" else AMD64_ABI="no" fi if test "x$I386_ABI" = "xyes" ; then HAVE_CPU_I386=yes $as_echo "#define HAVE_CPU_I386 1" >>confdefs.h fi if test "x$AMD64_ABI" = "xyes" ; then HAVE_CPU_X86_64=yes $as_echo "#define HAVE_CPU_X86_64 1" >>confdefs.h fi ;; *) HAVE_CPU_I386=yes $as_echo "#define HAVE_CPU_I386 1" >>confdefs.h case "x${target_cpu}" in xi386 | xi486) ;; *) $as_echo "#define HAVE_RDTSC 1" >>confdefs.h ;; esac ;; esac ;; xpowerpc) HAVE_CPU_PPC=yes $as_echo "#define HAVE_CPU_PPC 1" >>confdefs.h ;; xpowerpc64) HAVE_CPU_PPC64=yes $as_echo "#define HAVE_CPU_PPC64 1" >>confdefs.h ;; xalpha*) HAVE_CPU_ALPHA=yes $as_echo "#define HAVE_CPU_ALPHA 1" >>confdefs.h ;; xarm*) HAVE_CPU_ARM=yes $as_echo "#define HAVE_CPU_ARM 1" >>confdefs.h ;; xsparc*) HAVE_CPU_SPARC=yes $as_echo "#define HAVE_CPU_SPARC 1" >>confdefs.h ;; xmips*) HAVE_CPU_MIPS=yes $as_echo "#define HAVE_CPU_MIPS 1" >>confdefs.h ;; xhppa*) HAVE_CPU_HPPA=yes $as_echo "#define HAVE_CPU_HPPA 1" >>confdefs.h ;; xs390*) HAVE_CPU_S390=yes $as_echo "#define HAVE_CPU_S390 1" >>confdefs.h ;; xia64*) HAVE_CPU_IA64=yes $as_echo "#define HAVE_CPU_IA64 1" >>confdefs.h ;; xm68k*) HAVE_CPU_M68K=yes $as_echo "#define HAVE_CPU_M68K 1" >>confdefs.h ;; xx86_64) HAVE_CPU_X86_64=yes $as_echo "#define HAVE_CPU_X86_64 1" >>confdefs.h ;; xcris) HAVE_CPU_CRIS=yes $as_echo "#define HAVE_CPU_CRIS 1" >>confdefs.h ;; xcrisv32) HAVE_CPU_CRISV32=yes $as_echo "#define HAVE_CPU_CRISV32 1" >>confdefs.h ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac if test "x$HAVE_CPU_I386" = "xyes"; then HAVE_CPU_I386_TRUE= HAVE_CPU_I386_FALSE='#' else HAVE_CPU_I386_TRUE='#' HAVE_CPU_I386_FALSE= fi if test "x$HAVE_CPU_PPC" = "xyes"; then HAVE_CPU_PPC_TRUE= HAVE_CPU_PPC_FALSE='#' else HAVE_CPU_PPC_TRUE='#' HAVE_CPU_PPC_FALSE= fi if test "x$HAVE_CPU_PPC64" = "xyes"; then HAVE_CPU_PPC64_TRUE= HAVE_CPU_PPC64_FALSE='#' else HAVE_CPU_PPC64_TRUE='#' HAVE_CPU_PPC64_FALSE= fi if test "x$HAVE_CPU_ALPHA" = "xyes"; then HAVE_CPU_ALPHA_TRUE= HAVE_CPU_ALPHA_FALSE='#' else HAVE_CPU_ALPHA_TRUE='#' HAVE_CPU_ALPHA_FALSE= fi if test "x$HAVE_CPU_ARM" = "xyes"; then HAVE_CPU_ARM_TRUE= HAVE_CPU_ARM_FALSE='#' else HAVE_CPU_ARM_TRUE='#' HAVE_CPU_ARM_FALSE= fi if test "x$HAVE_CPU_SPARC" = "xyes"; then HAVE_CPU_SPARC_TRUE= HAVE_CPU_SPARC_FALSE='#' else HAVE_CPU_SPARC_TRUE='#' HAVE_CPU_SPARC_FALSE= fi if test "x$HAVE_CPU_HPPA" = "xyes"; then HAVE_CPU_HPPA_TRUE= HAVE_CPU_HPPA_FALSE='#' else HAVE_CPU_HPPA_TRUE='#' HAVE_CPU_HPPA_FALSE= fi if test "x$HAVE_CPU_MIPS" = "xyes"; then HAVE_CPU_MIPS_TRUE= HAVE_CPU_MIPS_FALSE='#' else HAVE_CPU_MIPS_TRUE='#' HAVE_CPU_MIPS_FALSE= fi if test "x$HAVE_CPU_S390" = "xyes"; then HAVE_CPU_S390_TRUE= HAVE_CPU_S390_FALSE='#' else HAVE_CPU_S390_TRUE='#' HAVE_CPU_S390_FALSE= fi if test "x$HAVE_CPU_IA64" = "xyes"; then HAVE_CPU_IA64_TRUE= HAVE_CPU_IA64_FALSE='#' else HAVE_CPU_IA64_TRUE='#' HAVE_CPU_IA64_FALSE= fi if test "x$HAVE_CPU_M68K" = "xyes"; then HAVE_CPU_M68K_TRUE= HAVE_CPU_M68K_FALSE='#' else HAVE_CPU_M68K_TRUE='#' HAVE_CPU_M68K_FALSE= fi if test "x$HAVE_CPU_X86_64" = "xyes"; then HAVE_CPU_X86_64_TRUE= HAVE_CPU_X86_64_FALSE='#' else HAVE_CPU_X86_64_TRUE='#' HAVE_CPU_X86_64_FALSE= fi if test "x$HAVE_CPU_CRIS" = "xyes"; then HAVE_CPU_CRIS_TRUE= HAVE_CPU_CRIS_FALSE='#' else HAVE_CPU_CRIS_TRUE='#' HAVE_CPU_CRIS_FALSE= fi if test "x$HAVE_CPU_CRISV32" = "xyes"; then HAVE_CPU_CRISV32_TRUE= HAVE_CPU_CRISV32_FALSE='#' else HAVE_CPU_CRISV32_TRUE='#' HAVE_CPU_CRISV32_FALSE= fi cat >>confdefs.h <<_ACEOF #define HOST_CPU "$host_cpu" _ACEOF cat >>confdefs.h <<_ACEOF #define TARGET_CPU "$target_cpu" _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 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 ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. 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 ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $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_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" 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 CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 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 ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. 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 ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $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 if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe 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 ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $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_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" 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 CC=$ac_ct_CC fi fi fi 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; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" 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_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $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 ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} 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 ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi 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 ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } 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 # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Extract the first word of "valgrind", so it can be a program name with args. set dummy valgrind; 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_path_VALGRIND_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $VALGRIND_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_VALGRIND_PATH="$VALGRIND_PATH" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_VALGRIND_PATH="$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 test -z "$ac_cv_path_VALGRIND_PATH" && ac_cv_path_VALGRIND_PATH="no" ;; esac fi VALGRIND_PATH=$ac_cv_path_VALGRIND_PATH if test -n "$VALGRIND_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND_PATH" >&5 $as_echo "$VALGRIND_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test ! "x$VALGRIND_PATH" = "xno"; then HAVE_VALGRIND_TRUE= HAVE_VALGRIND_FALSE='#' else HAVE_VALGRIND_TRUE='#' HAVE_VALGRIND_FALSE= fi # Check whether --enable-introspection was given. if test "${enable_introspection+set}" = set; then : enableval=$enable_introspection; else enable_introspection=auto fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-introspection" >&5 $as_echo_n "checking for gobject-introspection... " >&6; } case $enable_introspection in #( no) : found_introspection="no (disabled, use --enable-introspection to enable)" ;; #( yes) : if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error $? "gobject-introspection-1.0 is not installed" "$LINENO" 5 fi if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.10.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.10.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then found_introspection=yes else as_fn_error $? "You need to have gobject-introspection >= 0.10.1 installed to build Farstream" "$LINENO" 5 fi ;; #( auto) : if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.10.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.10.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then found_introspection=yes else found_introspection=no fi ;; #( *) : as_fn_error $? "invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5 $as_echo "$found_introspection" >&6; } INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi if test "x$found_introspection" = "xyes"; then HAVE_INTROSPECTION_TRUE= HAVE_INTROSPECTION_FALSE='#' else HAVE_INTROSPECTION_TRUE='#' HAVE_INTROSPECTION_FALSE= fi # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; 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_path_GTKDOC_CHECK+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK="$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 GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in gtkdoc-rebase 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 ${ac_cv_path_GTKDOC_REBASE+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_REBASE in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$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 GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE if test -n "$GTKDOC_REBASE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 $as_echo "$GTKDOC_REBASE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_REBASE" && break done test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. set dummy gtkdoc-mkpdf; 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_path_GTKDOC_MKPDF+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_MKPDF in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$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 GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF if test -n "$GTKDOC_MKPDF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 $as_echo "$GTKDOC_MKPDF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then : withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then : enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.18\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.18") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error $? "You need to have gtk-doc >= 1.18 installed to build $PACKAGE_NAME" "$LINENO" 5 fi if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 $as_echo_n "checking for GTKDOC_DEPS... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTKDOC_DEPS_CFLAGS"; then pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTKDOC_DEPS_LIBS"; then pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.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 GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0"` else GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0"` fi # Put the nasty error message in config.log where it belongs echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0) were not met: $GTKDOC_DEPS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS and GTKDOC_DEPS_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 GTKDOC_DEPS_CFLAGS and GTKDOC_DEPS_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 GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi fi if test -z "$SED"; then { $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 ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done 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 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; else enable_gtk_doc_html=yes fi # Check whether --enable-gtk-doc-pdf was given. if test "${enable_gtk_doc_pdf+set}" = set; then : enableval=$enable_gtk_doc_pdf; else enable_gtk_doc_pdf=no fi if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test x$enable_gtk_doc_html = xyes; then GTK_DOC_BUILD_HTML_TRUE= GTK_DOC_BUILD_HTML_FALSE='#' else GTK_DOC_BUILD_HTML_TRUE='#' GTK_DOC_BUILD_HTML_FALSE= fi if test x$enable_gtk_doc_pdf = xyes; then GTK_DOC_BUILD_PDF_TRUE= GTK_DOC_BUILD_PDF_FALSE='#' else GTK_DOC_BUILD_PDF_TRUE='#' GTK_DOC_BUILD_PDF_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi if test -n "$GTKDOC_REBASE"; then GTK_DOC_USE_REBASE_TRUE= GTK_DOC_USE_REBASE_FALSE='#' else GTK_DOC_USE_REBASE_TRUE='#' GTK_DOC_USE_REBASE_FALSE= fi PYTHON_CANDIDATES="python python2.2 python2.1 python2.0 python2 \ python1.6 python1.5" { $as_echo "$as_me:${as_lineno-$LINENO}: Looking for Python version >= 2.1" >&5 $as_echo "$as_me: Looking for Python version >= 2.1" >&6;} prog=" import sys, string minver = '2.1' # split string by '.' and convert to numeric minver_info = map(string.atoi, string.split(minver, '.')) # we can now do comparisons on the two lists: if sys.version_info >= tuple(minver_info): sys.exit(0) else: sys.exit(1)" python_good=false for python_candidate in $PYTHON_CANDIDATES; 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 ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$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 PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 1> /dev/null 2> /dev/null if test "x$PYTHON" = "x"; then continue; fi if $PYTHON -c "$prog" 1>&5 2>&5; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"$PYTHON\":" >&5 $as_echo_n "checking \"$PYTHON\":... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: okay" >&5 $as_echo "okay" >&6; } python_good=true break; else unset ac_cv_path_PYTHON fi done if test "$python_good" != "true"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No suitable version of python found" >&5 $as_echo "$as_me: WARNING: No suitable version of python found" >&2;} PYTHON= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking local Python configuration" >&5 $as_echo_n "checking local Python configuration... " >&6; } PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"` pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages pkgpythondir=\${pythondir}/$PACKAGE pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages pkgpyexecdir=\${pyexecdir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: result: looks good" >&5 $as_echo "looks good" >&6; } fi build_plugin_docs=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build plugin documentation" >&5 $as_echo_n "checking whether to build plugin documentation... " >&6; } if test x$enable_gtk_doc = xyes; then build_plugin_docs=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (gtk-doc disabled or not available)" >&5 $as_echo "no (gtk-doc disabled or not available)" >&6; } fi if test x$build_plugin_docs = xyes; then ENABLE_PLUGIN_DOCS_TRUE= ENABLE_PLUGIN_DOCS_FALSE='#' else ENABLE_PLUGIN_DOCS_TRUE='#' ENABLE_PLUGIN_DOCS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_strerror+:} false; then : break fi done if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $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 ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in malloc.h do : ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" if test "x$ac_cv_header_malloc_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MALLOC_H 1 _ACEOF fi done ac_fn_c_check_member "$LINENO" "struct ip_mreqn" "imr_ifindex" "ac_cv_member_struct_ip_mreqn_imr_ifindex" " #include #include " if test "x$ac_cv_member_struct_ip_mreqn_imr_ifindex" = xyes; then : $as_echo "#define HAVE_IP_MREQN 1" >>confdefs.h fi GLIB_REQ=2.32 if test "x$GLIB_REQ" = "x" then as_fn_error $? "Please specify a required version for GLib 2.0" "$LINENO" 5 fi which="glib-2.0 >= $GLIB_REQ gobject-2.0 gthread-2.0 gmodule-no-export-2.0" required="no" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5 ($PKG_CONFIG --exists --print-errors "$which") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "$which" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$which\""; } >&5 ($PKG_CONFIG --exists --print-errors "$which") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "$which" 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 GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$which"` else GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$which"` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_GLIB="no" if test "x$required" = "xyes"; then as_fn_error $? "$GLIB_PKG_ERRORS" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: $GLIB_PKG_ERRORS" >&5 $as_echo "$as_me: $GLIB_PKG_ERRORS" >&6;} fi elif test $pkg_failed = untried; then HAVE_GLIB="no" if test "x$required" = "xyes"; then as_fn_error $? "$GLIB_PKG_ERRORS" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: $GLIB_PKG_ERRORS" >&5 $as_echo "$as_me: $GLIB_PKG_ERRORS" >&6;} fi else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GLIB="yes" fi if test "x$HAVE_GLIB" = "xno"; then as_fn_error $? "This package requires GLib >= $GLIB_REQ to compile." "$LINENO" 5 fi GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_THREADS_MANDATORY" if test "x$PACKAGE_VERSION_NANO" = "x1"; then GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_DEPRECATED" fi # Check whether --enable-gobject-cast-checks was given. if test "${enable_gobject_cast_checks+set}" = set; then : enableval=$enable_gobject_cast_checks; else enable_gobject_cast_checks=auto fi if test "x$enable_gobject_cast_checks" = "xauto"; then if test "x$PACKAGE_VERSION_NANO" = "x1"; then enable_gobject_cast_checks=yes else enable_gobject_cast_checks=no fi fi if test "x$enable_gobject_cast_checks" = "xno"; then GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_CAST_CHECKS" fi # Check whether --enable-glib-asserts was given. if test "${enable_glib_asserts+set}" = set; then : enableval=$enable_glib_asserts; else enable_glib_assertions=auto fi if test "x$enable_glib_assertions" = "xauto"; then if test "x$PACKAGE_VERSION_NANO" = "x1"; then enable_glib_assertions=yes else enable_glib_assertions=no fi fi if test "x$enable_glib_assertions" = "xno"; then GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_ASSERT" fi GIVEN_CFLAGS=$GLIB_CFLAGS INCLUDE_DIRS=`echo | cpp -v 2>&1` INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'` for dir in $INCLUDE_DIRS; do GIVEN_CFLAGS=`echo $GIVEN_CFLAGS | sed -e "s#-I$dir ##"` done GLIB_CFLAGS=$GIVEN_CFLAGS pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO" >&5 $as_echo_n "checking for GIO... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GIO_CFLAGS"; then pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= \$GLIB_REQ\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0 >= $GLIB_REQ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= $GLIB_REQ" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GIO_LIBS"; then pkg_cv_GIO_LIBS="$GIO_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= \$GLIB_REQ\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0 >= $GLIB_REQ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= $GLIB_REQ" 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 GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gio-2.0 >= $GLIB_REQ"` else GIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= $GLIB_REQ"` fi # Put the nasty error message in config.log where it belongs echo "$GIO_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gio-2.0 >= $GLIB_REQ) were not met: $GIO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GIO_CFLAGS and GIO_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 GIO_CFLAGS and GIO_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 GIO_CFLAGS=$pkg_cv_GIO_CFLAGS GIO_LIBS=$pkg_cv_GIO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi if test "x$HAVE_GIO" = "xno"; then as_fn_error $? "This package requires GIO >= $GLIB_REQ to compile." "$LINENO" 5 fi GIO_MODULE_DIR="`$PKG_CONFIG --variable=giomoduledir gio-2.0`" cat >>confdefs.h <<_ACEOF #define GIO_MODULE_DIR "$GIO_MODULE_DIR" _ACEOF GIO_LIBDIR="`$PKG_CONFIG --variable=libdir gio-2.0`" cat >>confdefs.h <<_ACEOF #define GIO_LIBDIR "$GIO_LIBDIR" _ACEOF $as_echo "#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_32" >>confdefs.h $as_echo "#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_32" >>confdefs.h pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO_UNIX" >&5 $as_echo_n "checking for GIO_UNIX... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GIO_UNIX_CFLAGS"; then pkg_cv_GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.32\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.32") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIO_UNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0 >= 2.32" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GIO_UNIX_LIBS"; then pkg_cv_GIO_UNIX_LIBS="$GIO_UNIX_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.32\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.32") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIO_UNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-2.0 >= 2.32" 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 GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gio-unix-2.0 >= 2.32"` else GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-unix-2.0 >= 2.32"` fi # Put the nasty error message in config.log where it belongs echo "$GIO_UNIX_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_GIO_UNIX=false elif test $pkg_failed = untried; then HAVE_GIO_UNIX=false else GIO_UNIX_CFLAGS=$pkg_cv_GIO_UNIX_CFLAGS GIO_UNIX_LIBS=$pkg_cv_GIO_UNIX_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GIO_UNIX=true fi if test "x$HAVE_GIO_UNIX" = "xyes"; then HAVE_GIO_UNIX_TRUE= HAVE_GIO_UNIX_FALSE='#' else HAVE_GIO_UNIX_TRUE='#' HAVE_GIO_UNIX_FALSE= fi module=gstreamer-$GST_API_VERSION minver=$GST_REQ name="GStreamer" required="yes" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GST" >&5 $as_echo_n "checking for GST... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_CFLAGS"; then pkg_cv_GST_CFLAGS="$GST_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\""; } >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_CFLAGS=`$PKG_CONFIG --cflags "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_LIBS"; then pkg_cv_GST_LIBS="$GST_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\""; } >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_LIBS=`$PKG_CONFIG --libs "$module >= $minver" 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 GST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$module >= $minver"` else GST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$module >= $minver"` fi # Put the nasty error message in config.log where it belongs echo "$GST_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_GST="no" { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then as_fn_error $? "no $module >= $minver ($name) found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi elif test $pkg_failed = untried; then HAVE_GST="no" { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then as_fn_error $? "no $module >= $minver ($name) found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi else GST_CFLAGS=$pkg_cv_GST_CFLAGS GST_LIBS=$pkg_cv_GST_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST="yes" fi if test -z $GST_TOOLS_DIR; then GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-$GST_API_VERSION` if test -z $GST_TOOLS_DIR; then as_fn_error $? "no tools dir set in GStreamer pkg-config file, core upgrade needed." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: using GStreamer tools in $GST_TOOLS_DIR" >&5 $as_echo "$as_me: using GStreamer tools in $GST_TOOLS_DIR" >&6;} if test -z $GST_PLUGINS_DIR; then GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-$GST_API_VERSION` if test -z $GST_PLUGINS_DIR; then as_fn_error $? "no pluginsdir set in GStreamer pkg-config file, core upgrade needed." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: using GStreamer plug-ins in $GST_PLUGINS_DIR" >&5 $as_echo "$as_me: using GStreamer plug-ins in $GST_PLUGINS_DIR" >&6;} module=gstreamer-base-$GST_API_VERSION minver=$GST_REQ name="GStreamer Base Libraries" required="yes" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GST_BASE" >&5 $as_echo_n "checking for GST_BASE... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_BASE_CFLAGS"; then pkg_cv_GST_BASE_CFLAGS="$GST_BASE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\""; } >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_BASE_CFLAGS=`$PKG_CONFIG --cflags "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_BASE_LIBS"; then pkg_cv_GST_BASE_LIBS="$GST_BASE_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\""; } >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_BASE_LIBS=`$PKG_CONFIG --libs "$module >= $minver" 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 GST_BASE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$module >= $minver"` else GST_BASE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$module >= $minver"` fi # Put the nasty error message in config.log where it belongs echo "$GST_BASE_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_GST_BASE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_BASE_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_BASE_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then as_fn_error $? "no $module >= $minver ($name) found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi elif test $pkg_failed = untried; then HAVE_GST_BASE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_BASE_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_BASE_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then as_fn_error $? "no $module >= $minver ($name) found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi else GST_BASE_CFLAGS=$pkg_cv_GST_BASE_CFLAGS GST_BASE_LIBS=$pkg_cv_GST_BASE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST_BASE="yes" fi module=gstreamer-check-$GST_API_VERSION minver=$GST_REQ name="GStreamer Check unittest Library" required=no pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GST_CHECK" >&5 $as_echo_n "checking for GST_CHECK... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_CHECK_CFLAGS"; then pkg_cv_GST_CHECK_CFLAGS="$GST_CHECK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\""; } >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_CHECK_CFLAGS=`$PKG_CONFIG --cflags "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_CHECK_LIBS"; then pkg_cv_GST_CHECK_LIBS="$GST_CHECK_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\""; } >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_CHECK_LIBS=`$PKG_CONFIG --libs "$module >= $minver" 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 GST_CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$module >= $minver"` else GST_CHECK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$module >= $minver"` fi # Put the nasty error message in config.log where it belongs echo "$GST_CHECK_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_GST_CHECK="no" { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_CHECK_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_CHECK_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then as_fn_error $? "no $module >= $minver ($name) found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi elif test $pkg_failed = untried; then HAVE_GST_CHECK="no" { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_CHECK_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_CHECK_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then as_fn_error $? "no $module >= $minver ($name) found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi else GST_CHECK_CFLAGS=$pkg_cv_GST_CHECK_CFLAGS GST_CHECK_LIBS=$pkg_cv_GST_CHECK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST_CHECK="yes" fi module=gstreamer-plugins-base-$GST_API_VERSION minver=$GSTPB_REQ name="GStreamer Base Plugins" required="yes" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GST_PLUGINS_BASE" >&5 $as_echo_n "checking for GST_PLUGINS_BASE... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GST_PLUGINS_BASE_CFLAGS"; then pkg_cv_GST_PLUGINS_BASE_CFLAGS="$GST_PLUGINS_BASE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\""; } >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_PLUGINS_BASE_CFLAGS=`$PKG_CONFIG --cflags "$module >= $minver" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GST_PLUGINS_BASE_LIBS"; then pkg_cv_GST_PLUGINS_BASE_LIBS="$GST_PLUGINS_BASE_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$module >= \$minver\""; } >&5 ($PKG_CONFIG --exists --print-errors "$module >= $minver") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GST_PLUGINS_BASE_LIBS=`$PKG_CONFIG --libs "$module >= $minver" 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 GST_PLUGINS_BASE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$module >= $minver"` else GST_PLUGINS_BASE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$module >= $minver"` fi # Put the nasty error message in config.log where it belongs echo "$GST_PLUGINS_BASE_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_GST_PLUGINS_BASE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_PLUGINS_BASE_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_PLUGINS_BASE_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then as_fn_error $? "no $module >= $minver ($name) found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi elif test $pkg_failed = untried; then HAVE_GST_PLUGINS_BASE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: $GST_PLUGINS_BASE_PKG_ERRORS" >&5 $as_echo "$as_me: $GST_PLUGINS_BASE_PKG_ERRORS" >&6;} if test "x$required" = "xyes"; then as_fn_error $? "no $module >= $minver ($name) found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: no $module >= $minver ($name) found" >&5 $as_echo "$as_me: no $module >= $minver ($name) found" >&6;} fi else GST_PLUGINS_BASE_CFLAGS=$pkg_cv_GST_PLUGINS_BASE_CFLAGS GST_PLUGINS_BASE_LIBS=$pkg_cv_GST_PLUGINS_BASE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GST_PLUGINS_BASE="yes" fi if test "x$HAVE_GST_PLUGINS_BASE" = "xyes"; then if test -z $GSTPB_PLUGINS_DIR; then GSTPB_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-base-$GST_API_VERSION` if test -z $GSTPB_PLUGINS_DIR; then as_fn_error $? "no pluginsdir set in GStreamer Base Plugins pkg-config file" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR" >&5 $as_echo "$as_me: using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR" >&6;} GST_PLUGINS_BASE_DIR="$GSTPB_PLUGINS_DIR/gst:$GSTPB_PLUGINS_DIR/sys:$GSTPB_PLUGINS_DIR/ext" fi if test "x$HAVE_GST_CHECK" = "xyes"; then HAVE_GST_CHECK_TRUE= HAVE_GST_CHECK_FALSE='#' else HAVE_GST_CHECK_TRUE='#' HAVE_GST_CHECK_FALSE= fi GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`" FS_PREFIX="`$PKG_CONFIG --variable=prefix farstream-$FS_APIVERSION`" FS_LICENSE="LGPL" cat >>confdefs.h <<_ACEOF #define FS_LICENSE "$FS_LICENSE" _ACEOF EXP_VAR=PLUGINDIR FROM_VAR=${libdir}/gstreamer-$GST_API_VERSION prefix_save=$prefix exec_prefix_save=$exec_prefix if test "x$prefix" = "xNONE"; then prefix="$ac_default_prefix" fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=$prefix fi full_var="$FROM_VAR" while true; do new_full_var="`eval echo $full_var`" if test "x$new_full_var" = "x$full_var"; then break; fi full_var=$new_full_var done full_var=$new_full_var PLUGINDIR="$full_var" prefix=$prefix_save exec_prefix=$exec_prefix_save cat >>confdefs.h <<_ACEOF #define PLUGINDIR "$PLUGINDIR" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: Using $PLUGINDIR as the plugin install location" >&5 $as_echo "$as_me: Using $PLUGINDIR as the plugin install location" >&6;} plugindir="\$(libdir)/gstreamer-$GST_API_VERSION" WARNING_CFLAGS="" ERROR_CFLAGS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wall" >&5 $as_echo_n "checking to see if compiler understands -Wall... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then WARNING_CFLAGS="$WARNING_CFLAGS -Wall" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wdeclaration-after-statement" >&5 $as_echo_n "checking to see if compiler understands -Wdeclaration-after-statement... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wdeclaration-after-statement" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then WARNING_CFLAGS="$WARNING_CFLAGS -Wdeclaration-after-statement" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wvla" >&5 $as_echo_n "checking to see if compiler understands -Wvla... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wvla" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then WARNING_CFLAGS="$WARNING_CFLAGS -Wvla" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wpointer-arith" >&5 $as_echo_n "checking to see if compiler understands -Wpointer-arith... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wpointer-arith" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then WARNING_CFLAGS="$WARNING_CFLAGS -Wpointer-arith" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test "x$FS_GIT" != "xno" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Werror" >&5 $as_echo_n "checking to see if compiler understands -Werror... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="$ERROR_CFLAGS -Werror" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test "x$ERROR_CFLAGS" = "x" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -errwarn=%all" >&5 $as_echo_n "checking to see if compiler understands -errwarn=%all... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -errwarn=%all" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="-errwarn=%all" for f in 'no%E_EMPTY_DECLARATION' \ 'no%E_STATEMENT_NOT_REACHED' \ 'no%E_ARGUEMENT_MISMATCH' \ 'no%E_MACRO_REDEFINED' \ 'no%E_LOOP_NOT_ENTERED_AT_TOP' do { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -errwarn=%all,$f" >&5 $as_echo_n "checking to see if compiler understands -errwarn=%all,$f... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -errwarn=%all,$f" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="$ERROR_CFLAGS,$f" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } done true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 < 2.19.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 < 2.19.8") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -fno-strict-aliasing" >&5 $as_echo_n "checking to see if compiler understands -fno-strict-aliasing... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-strict-aliasing" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then ERROR_CFLAGS="$ERROR_CFLAGS -fno-strict-aliasing" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } fi fi fi if test "x" != "x" then UNSUPPORTED="" list="" for each in $list do { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands $each" >&5 $as_echo_n "checking to see if compiler understands $each... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $each" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then WARNING_CFLAGS="$WARNING_CFLAGS $each" true else UNSUPPORTED="$UNSUPPORTED $each" true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } done if test "X$UNSUPPORTED" != X ; then { $as_echo "$as_me:${as_lineno-$LINENO}: unsupported compiler flags: $UNSUPPORTED" >&5 $as_echo "$as_me: unsupported compiler flags: $UNSUPPORTED" >&6;} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: set WARNING_CFLAGS to $WARNING_CFLAGS" >&5 $as_echo "$as_me: set WARNING_CFLAGS to $WARNING_CFLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: set ERROR_CFLAGS to $ERROR_CFLAGS" >&5 $as_echo "$as_me: set ERROR_CFLAGS to $ERROR_CFLAGS" >&6;} if test "x$FS_GIT" = "xyes"; then GST_LEVEL_DEFAULT=GST_LEVEL_ERROR else GST_LEVEL_DEFAULT=GST_LEVEL_NONE fi cat >>confdefs.h <<_ACEOF #define GST_LEVEL_DEFAULT $GST_LEVEL_DEFAULT _ACEOF for ac_func in getifaddrs do : ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" if test "x$ac_cv_func_getifaddrs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETIFADDRS 1 _ACEOF fi done if test "x$USE_DEBUG" = xyes; then PROFILE_CFLAGS="-g" fi FS_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) -Wno-error=deprecated-declarations " FS_INTERNAL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir)" FS_CFLAGS="$GST_CFLAGS \$(FS_OPTION_CFLAGS)" FS_LIBS="$GST_LIBS \$(GCOV_LIBS)" FS_ALL_LDFLAGS="-no-undefined" FS_LIB_LDFLAGS="-export-symbols-regex ^fs_.*" FS_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^_*fs_init_plugin\$\$' $FS_ALL_LDFLAGS" GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^_*gst_plugin_desc\$\$' $FS_ALL_LDFLAGS" # Check whether --enable-gupnp was given. if test "${enable_gupnp+set}" = set; then : enableval=$enable_gupnp; case "${enableval}" in yes) WANT_GUPNP=yes ;; no) WANT_GUPNP=no ;; *) as_fn_error $? "bad value ${enableval} for --enable-gupnp" "$LINENO" 5 ;; esac else WANT_GUPNP=test fi HAVE_GUPNP=no if test "x$WANT_GUPNP" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUPNP" >&5 $as_echo_n "checking for GUPNP... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GUPNP_CFLAGS"; then pkg_cv_GUPNP_CFLAGS="$GUPNP_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gupnp-igd-1.0 >= 0.2 \""; } >&5 ($PKG_CONFIG --exists --print-errors " gupnp-igd-1.0 >= 0.2 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GUPNP_CFLAGS=`$PKG_CONFIG --cflags " gupnp-igd-1.0 >= 0.2 " 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GUPNP_LIBS"; then pkg_cv_GUPNP_LIBS="$GUPNP_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gupnp-igd-1.0 >= 0.2 \""; } >&5 ($PKG_CONFIG --exists --print-errors " gupnp-igd-1.0 >= 0.2 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GUPNP_LIBS=`$PKG_CONFIG --libs " gupnp-igd-1.0 >= 0.2 " 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 GUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " gupnp-igd-1.0 >= 0.2 "` else GUPNP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " gupnp-igd-1.0 >= 0.2 "` fi # Put the nasty error message in config.log where it belongs echo "$GUPNP_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_GUPNP=no elif test $pkg_failed = untried; then HAVE_GUPNP=no else GUPNP_CFLAGS=$pkg_cv_GUPNP_CFLAGS GUPNP_LIBS=$pkg_cv_GUPNP_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GUPNP=yes fi fi if test "x$WANT_GUPNP" = "xyes" && test "x$HAVE_GUPNP" = "xno"; then as_fn_error $? "Requested GUPnP IGD, but it is not available" "$LINENO" 5 fi if test "x$HAVE_GUPNP" = "xyes"; then $as_echo "#define HAVE_GUPNP /**/" >>confdefs.h fi ac_config_files="$ac_config_files Makefile farstream.pc farstream-uninstalled.pc common/Makefile common/m4/Makefile common-modified/Makefile gst/Makefile gst/fsrawconference/Makefile gst/fsrtpconference/Makefile gst/fsmsnconference/Makefile gst/fsvideoanyrate/Makefile gst/fsrtpxdata/Makefile farstream/Makefile transmitters/Makefile transmitters/rawudp/Makefile transmitters/multicast/Makefile transmitters/nice/Makefile transmitters/shm/Makefile tests/Makefile tests/check/Makefile tests/rtp/Makefile examples/Makefile examples/gui/Makefile examples/commandline/Makefile docs/Makefile docs/libs/Makefile docs/plugins/Makefile docs/version.entities m4/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then 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;} 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;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H 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$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 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. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GST_GCOV_ENABLED_TRUE}" && test -z "${GST_GCOV_ENABLED_FALSE}"; then as_fn_error $? "conditional \"GST_GCOV_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_I386_TRUE}" && test -z "${HAVE_CPU_I386_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_I386\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_PPC_TRUE}" && test -z "${HAVE_CPU_PPC_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_PPC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_PPC64_TRUE}" && test -z "${HAVE_CPU_PPC64_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_PPC64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_ALPHA_TRUE}" && test -z "${HAVE_CPU_ALPHA_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_ALPHA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_ARM_TRUE}" && test -z "${HAVE_CPU_ARM_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_ARM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_SPARC_TRUE}" && test -z "${HAVE_CPU_SPARC_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_SPARC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_HPPA_TRUE}" && test -z "${HAVE_CPU_HPPA_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_HPPA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_MIPS_TRUE}" && test -z "${HAVE_CPU_MIPS_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_MIPS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_S390_TRUE}" && test -z "${HAVE_CPU_S390_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_S390\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_IA64_TRUE}" && test -z "${HAVE_CPU_IA64_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_IA64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_M68K_TRUE}" && test -z "${HAVE_CPU_M68K_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_M68K\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_X86_64_TRUE}" && test -z "${HAVE_CPU_X86_64_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_X86_64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_CRIS_TRUE}" && test -z "${HAVE_CPU_CRIS_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_CRIS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CPU_CRISV32_TRUE}" && test -z "${HAVE_CPU_CRISV32_FALSE}"; then as_fn_error $? "conditional \"HAVE_CPU_CRISV32\" 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. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_VALGRIND_TRUE}" && test -z "${HAVE_VALGRIND_FALSE}"; then as_fn_error $? "conditional \"HAVE_VALGRIND\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_PLUGIN_DOCS_TRUE}" && test -z "${ENABLE_PLUGIN_DOCS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_PLUGIN_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GIO_UNIX_TRUE}" && test -z "${HAVE_GIO_UNIX_FALSE}"; then as_fn_error $? "conditional \"HAVE_GIO_UNIX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GST_CHECK_TRUE}" && test -z "${HAVE_GST_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAVE_GST_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) 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 for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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. as_fn_error () { 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: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Farstream $as_me 0.2.7, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -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 --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Farstream config.status 0.2.7 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: 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 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 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;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $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"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $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"`' 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"`' 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_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 AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ 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 \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ 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 \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ 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 \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "farstream.pc") CONFIG_FILES="$CONFIG_FILES farstream.pc" ;; "farstream-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES farstream-uninstalled.pc" ;; "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;; "common/m4/Makefile") CONFIG_FILES="$CONFIG_FILES common/m4/Makefile" ;; "common-modified/Makefile") CONFIG_FILES="$CONFIG_FILES common-modified/Makefile" ;; "gst/Makefile") CONFIG_FILES="$CONFIG_FILES gst/Makefile" ;; "gst/fsrawconference/Makefile") CONFIG_FILES="$CONFIG_FILES gst/fsrawconference/Makefile" ;; "gst/fsrtpconference/Makefile") CONFIG_FILES="$CONFIG_FILES gst/fsrtpconference/Makefile" ;; "gst/fsmsnconference/Makefile") CONFIG_FILES="$CONFIG_FILES gst/fsmsnconference/Makefile" ;; "gst/fsvideoanyrate/Makefile") CONFIG_FILES="$CONFIG_FILES gst/fsvideoanyrate/Makefile" ;; "gst/fsrtpxdata/Makefile") CONFIG_FILES="$CONFIG_FILES gst/fsrtpxdata/Makefile" ;; "farstream/Makefile") CONFIG_FILES="$CONFIG_FILES farstream/Makefile" ;; "transmitters/Makefile") CONFIG_FILES="$CONFIG_FILES transmitters/Makefile" ;; "transmitters/rawudp/Makefile") CONFIG_FILES="$CONFIG_FILES transmitters/rawudp/Makefile" ;; "transmitters/multicast/Makefile") CONFIG_FILES="$CONFIG_FILES transmitters/multicast/Makefile" ;; "transmitters/nice/Makefile") CONFIG_FILES="$CONFIG_FILES transmitters/nice/Makefile" ;; "transmitters/shm/Makefile") CONFIG_FILES="$CONFIG_FILES transmitters/shm/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/check/Makefile") CONFIG_FILES="$CONFIG_FILES tests/check/Makefile" ;; "tests/rtp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rtp/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/gui/Makefile") CONFIG_FILES="$CONFIG_FILES examples/gui/Makefile" ;; "examples/commandline/Makefile") CONFIG_FILES="$CONFIG_FILES examples/commandline/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/libs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/libs/Makefile" ;; "docs/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES docs/plugins/Makefile" ;; "docs/version.entities") CONFIG_FILES="$CONFIG_FILES docs/version.entities" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap '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 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || 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. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' 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' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && 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 '^'` 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 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 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat 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 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) 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 `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || 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'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$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' "$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 $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;} rm -f "$ac_tmp/stdin" case $ac_file in -) 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 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # 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, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # 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 PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # 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 # 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". 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 # 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 # Commands used to install an old-style archive. RANLIB=$lt_RANLIB 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 # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # 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 # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # 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 # 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 # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # 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 # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # 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 # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # 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 # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # 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 # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # 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 '$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 mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 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 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 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi farstream-0.2.7/config.h.in0000664000076400007640000001034712462321053012465 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Farstream x.y API version */ #undef FS_APIVERSION /* Farstream x_y API version */ #undef FS_API_VERSION /* Farstream license */ #undef FS_LICENSE /* The path were plugins are installed and search by default */ #undef FS_PLUGIN_PATH /* The GIO library directory. */ #undef GIO_LIBDIR /* The GIO modules directory. */ #undef GIO_MODULE_DIR /* Prevent post 2.32 APIs */ #undef GLIB_VERSION_MAX_ALLOWED /* Ignore post 2.32 deprecations */ #undef GLIB_VERSION_MIN_REQUIRED /* GStreamer major.minor version */ #undef GST_API_VERSION /* Defined if gcov is enabled to force a rebuild due to config.h changing */ #undef GST_GCOV_ENABLED /* plugin install helper script */ #undef GST_INSTALL_PLUGINS_HELPER /* Default errorlevel to use */ #undef GST_LEVEL_DEFAULT /* package name in plugins */ #undef GST_PACKAGE_NAME /* package origin */ #undef GST_PACKAGE_ORIGIN /* Define if the target CPU is an Alpha */ #undef HAVE_CPU_ALPHA /* Define if the target CPU is an ARM */ #undef HAVE_CPU_ARM /* Define if the target CPU is a CRIS */ #undef HAVE_CPU_CRIS /* Define if the target CPU is a CRISv32 */ #undef HAVE_CPU_CRISV32 /* Define if the target CPU is a HPPA */ #undef HAVE_CPU_HPPA /* Define if the target CPU is an x86 */ #undef HAVE_CPU_I386 /* Define if the target CPU is a IA64 */ #undef HAVE_CPU_IA64 /* Define if the target CPU is a M68K */ #undef HAVE_CPU_M68K /* Define if the target CPU is a MIPS */ #undef HAVE_CPU_MIPS /* Define if the target CPU is a PowerPC */ #undef HAVE_CPU_PPC /* Define if the target CPU is a 64 bit PowerPC */ #undef HAVE_CPU_PPC64 /* Define if the target CPU is a S390 */ #undef HAVE_CPU_S390 /* Define if the target CPU is a SPARC */ #undef HAVE_CPU_SPARC /* Define if the target CPU is a x86_64 */ #undef HAVE_CPU_X86_64 /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Have the GUPnP IGD library */ #undef HAVE_GUPNP /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Have the struct ip_mreqn */ #undef HAVE_IP_MREQN /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define if RDTSC is available */ #undef HAVE_RDTSC /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if valgrind should be used */ #undef HAVE_VALGRIND /* the host CPU */ #undef HOST_CPU /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* directory where plugins are located */ #undef PLUGINDIR /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* the target CPU */ #undef TARGET_CPU /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif farstream-0.2.7/config.guess0000755000076400007640000012743212073410014012756 00000000000000#! /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, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-06-10' # 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 # 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, see . # # 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. # 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. # # 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,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ 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, 2009, 2010, 2011, 2012 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # 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'` # 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 # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # 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} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # 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 ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *: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 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 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" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #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); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 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 ;; 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}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-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 ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else 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:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-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 exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF 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 ${UNAME_MACHINE}-unknown-linux-gnu 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 PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; 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 exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu 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 # sysname and nodename. 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, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi 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. # 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 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /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; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi 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 echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *: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} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *: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 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) 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` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: farstream-0.2.7/depcomp0000755000076400007640000005055212073410016012013 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999-2012 Free Software Foundation, Inc. # 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, 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # A tabulation character. tab=' ' # A newline character. nl=' ' if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. # However on # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... # tcc 0.9.26 (FIXME still under development at the moment of writing) # will emit a similar output, but also prepend the continuation lines # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form 'foo.o: dependent.h', # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ < "$tmpdepfile" > "$depfile" sed ' s/[ '"$tab"'][ '"$tab"']*/ /g s/^ *// s/ *\\*$// s/^[^:]*: *// /^$/d /:$/d s/$/ :/ ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: farstream-0.2.7/docs/0000775000076400007640000000000012462323000011437 500000000000000farstream-0.2.7/docs/libs/0000775000076400007640000000000012462323000012370 500000000000000farstream-0.2.7/docs/libs/farstream-libs.types0000664000076400007640000000144012462323000016310 00000000000000% add a _get_type for every GObject whose properties and signals you want % documented % add the relevant includes to be able to call those _get_type functions % adding a get_type here will: % - change output file name from gstreamer-(whatever).html to (whatever).html % - document properties and signals #include "../../farstream/fs-participant.h" #include "../../farstream/fs-session.h" #include "../../farstream/fs-stream.h" #include "../../farstream/fs-conference.h" #include "../../farstream/fs-transmitter.h" #include "../../farstream/fs-stream-transmitter.h" #include "../../farstream/fs-element-added-notifier.h" fs_participant_get_type fs_session_get_type fs_stream_get_type fs_conference_get_type fs_transmitter_get_type fs_stream_transmitter_get_type fs_element_added_notifier_get_type farstream-0.2.7/docs/libs/Makefile.in0000664000076400007640000006674512462321046014407 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ # FIXME: fix the docs then remove this variable # DOCS_ARE_INCOMPLETE_PLEASE_FIXME=yespleasedo ########################################################################### # Everything below here is generic and you shouldn't need to change it. ########################################################################### # thomas: except of course that we did VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/common-modified/gtk-doc.mak \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am subdir = docs/libs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module, e.g. 'glib'. #DOC_MODULE=gst-plugins-libs-@GST_API_VERSION@ DOC_MODULE = farstream-libs # generated basefiles basefiles = \ $(DOC_MODULE).types \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-docs.sgml # The top-level SGML file. Change it if you want. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(top_srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting functions and macros. DOC_SOURCE_DIR = $(top_srcdir)/farstream DOC_BUILD_DIR = $(top_builddir)/farstream # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS = # FIXME : # there's something wrong with gstreamer-sections.txt not being in the dist # maybe it doesn't resolve; we're adding it below for now #EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE) # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS = --sgml-mode --output-format=xml # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS = --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html \ --extra-dir=$(GST_PREFIX)/share/gtk-doc/html # Used for dependencies. HFILE_GLOB = $(DOC_SOURCE_DIR)/*.h CFILE_GLOB = $(DOC_SOURCE_DIR)/*.c # this is a wingo addition # thomasvs: another nice wingo addition would be an explanation on why # this is useful ;) SCANOBJ_DEPS = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la # Header files to ignore when scanning. IGNORE_HFILES = fs-enumtypes.h fs-private.h # Images to copy into HTML directory. HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). content_files = # Other files to distribute. extra_files = # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = $(FS_INTERNAL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) GTKDOC_LIBS = -static \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(GST_BASE_LIBS) \ $(GCOV_LIBS) GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) # If you need to override some of the declarations, place them in this file # and uncomment this line. DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt # thomas: copied from glib-2 # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) # thomas: make docs parallel installable TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)-@FS_APIVERSION@ EXTRA_DIST = \ $(content_files) \ $(extra_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE).types \ $(DOC_OVERRIDES) \ $(DOC_MODULE)-sections.txt DOC_STAMPS = \ setup-build.stamp \ scan-build.stamp \ sgml-build.stamp \ html-build.stamp \ sgml.stamp \ html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals \ .libs/$(DOC_MODULE)-scan.o REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) doc-registry.xml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common-modified/gtk-doc.mak $(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 docs/libs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/libs/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_srcdir)/common-modified/gtk-doc.mak: $(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 tags TAGS: ctags CTAGS: cscope cscopelist: 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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local 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 \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local cscopelist-am ctags-am dist-hook \ distclean distclean-generic distclean-libtool distclean-local \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-data-local \ 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 \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp #### setup #### @ENABLE_GTK_DOC_TRUE@setup-build.stamp: $(content_files) @ENABLE_GTK_DOC_TRUE@ -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ @ENABLE_GTK_DOC_TRUE@ echo ' DOC Preparing build'; \ @ENABLE_GTK_DOC_TRUE@ files=`echo $(DOC_MAIN_SGML_FILE) $(DOC_OVERRIDES) $(DOC_MODULE)-sections.txt $(DOC_MODULE).types $(content_files)`; \ @ENABLE_GTK_DOC_TRUE@ if test "x$$files" != "x" ; then \ @ENABLE_GTK_DOC_TRUE@ for file in $$files ; do \ @ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && \ @ENABLE_GTK_DOC_TRUE@ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ @ENABLE_GTK_DOC_TRUE@ done; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ @touch setup-build.stamp #### scan #### # in the case of non-srcdir builds, the built gst directory gets added # to gtk-doc scanning; but only then, to avoid duplicates @ENABLE_GTK_DOC_TRUE@scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Scanning header files' @ENABLE_GTK_DOC_TRUE@ @_source_dir='' ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \ @ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @ENABLE_GTK_DOC_TRUE@ done ; \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-scan \ @ENABLE_GTK_DOC_TRUE@ $(SCAN_OPTIONS) $(EXTRA_HFILES) \ @ENABLE_GTK_DOC_TRUE@ --module=$(DOC_MODULE) \ @ENABLE_GTK_DOC_TRUE@ $${_source_dir} \ @ENABLE_GTK_DOC_TRUE@ --ignore-headers="$(IGNORE_HFILES)" @ENABLE_GTK_DOC_TRUE@ @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; then \ @ENABLE_GTK_DOC_TRUE@ echo " DOC Introspecting gobjects"; \ @ENABLE_GTK_DOC_TRUE@ GST_PLUGIN_SYSTEM_PATH=`cd $(top_builddir) && pwd` \ @ENABLE_GTK_DOC_TRUE@ GST_PLUGIN_PATH= \ @ENABLE_GTK_DOC_TRUE@ GST_REGISTRY=doc-registry.xml \ @ENABLE_GTK_DOC_TRUE@ $(GTKDOC_EXTRA_ENVIRONMENT) \ @ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ @ENABLE_GTK_DOC_TRUE@ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ @ENABLE_GTK_DOC_TRUE@ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj --type-init-func="gst_init(NULL,NULL)" \ @ENABLE_GTK_DOC_TRUE@ --module=$(DOC_MODULE) ; \ @ENABLE_GTK_DOC_TRUE@ else \ @ENABLE_GTK_DOC_TRUE@ for i in $(SCANOBJ_FILES) ; do \ @ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \ @ENABLE_GTK_DOC_TRUE@ done \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ @touch scan-build.stamp @ENABLE_GTK_DOC_TRUE@$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### xml #### @ENABLE_GTK_DOC_TRUE@sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files) @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Building XML' @ENABLE_GTK_DOC_TRUE@ @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) @ENABLE_GTK_DOC_TRUE@ @cp ../version.entities xml @ENABLE_GTK_DOC_TRUE@ @touch sgml-build.stamp @ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### html #### @ENABLE_GTK_DOC_TRUE@html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Building HTML' @ENABLE_GTK_DOC_TRUE@ @rm -rf html @ENABLE_GTK_DOC_TRUE@ @mkdir html @ENABLE_GTK_DOC_TRUE@ @cp -pr xml html @ENABLE_GTK_DOC_TRUE@ @cp ../version.entities ./ @ENABLE_GTK_DOC_TRUE@ @mkhtml_options=""; \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ @ENABLE_GTK_DOC_TRUE@ if test "$(?)" = "0"; then \ @ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \ @ENABLE_GTK_DOC_TRUE@ mkhtml_options="$$mkhtml_options --verbose"; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ @gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ @ENABLE_GTK_DOC_TRUE@ if test "$(?)" = "0"; then \ @ENABLE_GTK_DOC_TRUE@ mkhtml_options=--path="$(abs_srcdir)"; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @ENABLE_GTK_DOC_TRUE@ @mv html/index.sgml html/index.sgml.bak @ENABLE_GTK_DOC_TRUE@ @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_API_VERSION@\//g" html/index.sgml.bak >html/index.sgml @ENABLE_GTK_DOC_TRUE@ @rm -f html/index.sgml.bak @ENABLE_GTK_DOC_TRUE@ @rm -rf html/xml @ENABLE_GTK_DOC_TRUE@ @rm -f version.entities @ENABLE_GTK_DOC_TRUE@ @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html ) @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Fixing cross-references' @ENABLE_GTK_DOC_TRUE@ @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @ENABLE_GTK_DOC_TRUE@ @touch html-build.stamp @ENABLE_GTK_DOC_TRUE@clean-local-gtkdoc: @ENABLE_GTK_DOC_TRUE@ @rm -rf xml tmpl html # clean files copied for nonsrcdir templates build @ENABLE_GTK_DOC_TRUE@ @if test x"$(srcdir)" != x. ; then \ @ENABLE_GTK_DOC_TRUE@ rm -rf $(DOC_MODULE).types; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_FALSE@all-local: @ENABLE_GTK_DOC_FALSE@clean-local-gtkdoc: clean-local: clean-local-gtkdoc @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -f $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @rm -rf tmpl/*.sgml.bak @rm -f $(DOC_MODULE).hierarchy @rm -f *.stamp || true @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(DOC_MAIN_SGML_FILE) ; \ rm -f $(DOC_OVERRIDES) ; \ rm -f $(DOC_MODULE).types ; \ rm -f $(DOC_MODULE).interfaces ; \ rm -f $(DOC_MODULE).prerequisites ; \ rm -f $(DOC_MODULE)-sections.txt ; \ rm -f $(content_files) ; \ rm -rf tmpl/*.sgml ; \ fi @rm -rf *.o maintainer-clean-local: clean @cd $(srcdir) && rm -rf html \ xml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt # thomas: make docs parallel installable; devhelp requires majorminor too install-data-local: (installfiles=`echo $(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css`; \ if test "$$installfiles" = '$(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css'; \ then echo '-- Nothing to install' ; \ else \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \ if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \ $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \ $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@FS_APIVERSION@.devhelp2; \ fi; \ (which gtkdoc-rebase >/dev/null && \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \ fi) uninstall-local: if test -d $(DESTDIR)$(TARGET_DIR); then \ rm -rf $(DESTDIR)$(TARGET_DIR)/*; \ rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \ else \ echo '-- Nothing to uninstall' ; \ fi; # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/html cp html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs # avoid spurious build errors when distchecking with -jN .NOTPARALLEL: #DOC_OVERRIDES = # 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: farstream-0.2.7/docs/libs/Makefile.am0000664000076400007640000000475112401500475014361 00000000000000## Process this file with automake to produce Makefile.in # FIXME: fix the docs then remove this variable # DOCS_ARE_INCOMPLETE_PLEASE_FIXME=yespleasedo # The name of the module, e.g. 'glib'. #DOC_MODULE=gst-plugins-libs-@GST_API_VERSION@ DOC_MODULE=farstream-libs # generated basefiles basefiles = \ $(DOC_MODULE).types \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-docs.sgml # The top-level SGML file. Change it if you want. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(top_srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting functions and macros. DOC_SOURCE_DIR=$(top_srcdir)/farstream DOC_BUILD_DIR=$(top_builddir)/farstream # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS= # FIXME : # there's something wrong with gstreamer-sections.txt not being in the dist # maybe it doesn't resolve; we're adding it below for now #EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE) # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--sgml-mode --output-format=xml # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS=--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html \ --extra-dir=$(GST_PREFIX)/share/gtk-doc/html # Used for dependencies. HFILE_GLOB=$(DOC_SOURCE_DIR)/*.h CFILE_GLOB=$(DOC_SOURCE_DIR)/*.c # this is a wingo addition # thomasvs: another nice wingo addition would be an explanation on why # this is useful ;) SCANOBJ_DEPS = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la # Header files to ignore when scanning. IGNORE_HFILES = fs-enumtypes.h fs-private.h # Images to copy into HTML directory. HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). content_files = # Other files to distribute. extra_files = # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = $(FS_INTERNAL_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) GTKDOC_LIBS = -static \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(GST_BASE_LIBS) \ $(GCOV_LIBS) GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC) GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=link $(CC) # If you need to override some of the declarations, place them in this file # and uncomment this line. DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt #DOC_OVERRIDES = include $(top_srcdir)/common-modified/gtk-doc.mak farstream-0.2.7/docs/libs/farstream-libs-sections.txt0000664000076400007640000001564712462323000017626 00000000000000
fs-participant FsParticipant farstream/fs-conference.h FsParticipant FsParticipantClass FS_PARTICIPANT_DATA_LOCK FS_PARTICIPANT_DATA_UNLOCK FS_PARTICIPANT FS_IS_PARTICIPANT FS_TYPE_PARTICIPANT fs_participant_get_type FS_PARTICIPANT_CLASS FS_IS_PARTICIPANT_CLASS FS_PARTICIPANT_GET_CLASS FS_PARTICIPANT_CAST FsParticipantPrivate
fs-stream FsStream farstream/fs-conference.h FsStream FsStreamClass FsStreamDirection FsStreamState fs_stream_set_transmitter fs_stream_set_transmitter_ht fs_stream_add_remote_candidates fs_stream_set_remote_codecs fs_stream_force_remote_candidates fs_stream_set_decryption_parameters fs_stream_destroy fs_stream_iterate_src_pads fs_stream_add_id fs_stream_emit_error fs_stream_emit_src_pad_added FS_STREAM FS_IS_STREAM FS_TYPE_STREAM fs_stream_get_type FS_STREAM_CLASS FS_IS_STREAM_CLASS FS_STREAM_GET_CLASS FS_STREAM_CAST FsStreamPrivate
fs-session FsSession farstream/fs-conference.h FsSession FsSessionClass FsDTMFEvent FsDTMFMethod fs_session_new_stream fs_session_set_codec_preferences fs_session_destroy fs_session_start_telephony_event fs_session_stop_telephony_event fs_session_set_send_codec fs_session_list_transmitters fs_session_get_stream_transmitter_type fs_session_codecs_need_resend fs_session_set_allowed_caps fs_session_set_encryption_parameters fs_session_emit_error fs_session_parse_codecs_changed fs_session_parse_send_codec_changed fs_session_parse_telephony_event_started fs_session_parse_telephony_event_stopped FS_SESSION FS_IS_SESSION FS_TYPE_SESSION FS_SESSION_CAST fs_session_get_type FS_SESSION_CLASS FS_IS_SESSION_CLASS FS_SESSION_GET_CLASS FsSessionPrivate FS_CONFERENCE_CAST FS_CONFERENCE_CLASS FS_CONFERENCE_GET_CLASS FS_IS_CONFERENCE_CLASS
fs-conference FsConference farstream/fs-conference.h FsConference fs_conference_new_session fs_conference_new_participant FS_ERROR FsError FS_ERROR_IS_FATAL fs_parse_error FS_CONFERENCE FS_IS_CONFERENCE FS_TYPE_CONFERENCE fs_conference_get_type FS_CONFERENCE_GET_IFACE FsConferenceClass fs_error_quark
fs-candidate FsCandidate farstream/fs-conference.h FsCandidate FsCandidateType FsNetworkProtocol FsComponentType fs_candidate_new fs_candidate_new_full fs_candidate_destroy fs_candidate_copy fs_candidate_list_destroy fs_candidate_list_copy fs_value_set_candidate_list FS_TYPE_CANDIDATE fs_candidate_get_type FS_TYPE_CANDIDATE_LIST fs_candidate_list_get_type
fs-codec FsCodec farstream/fs-conference.h FsCodec FsMediaType FsCodecParameter FsFeedbackParameter FS_CODEC_ID_ANY FS_CODEC_ID_DISABLE fs_codec_new fs_codec_destroy fs_codec_copy fs_codec_are_equal fs_codec_list_from_keyfile fs_codec_list_destroy fs_codec_list_copy fs_codec_list_are_equal fs_codec_to_string fs_codec_add_optional_parameter fs_codec_remove_optional_parameter fs_codec_get_optional_parameter fs_codec_parameter_copy fs_codec_parameter_free fs_codec_add_feedback_parameter fs_codec_get_feedback_parameter fs_codec_remove_feedback_parameter fs_feedback_parameter_copy fs_feedback_parameter_free FS_CODEC_FORMAT FS_CODEC_ARGS fs_media_type_to_string FS_TYPE_CODEC FS_TYPE_CODEC_LIST fs_codec_get_type fs_codec_list_get_type FS_TYPE_CODEC_PARAMETER FS_TYPE_FEEDBACK_PARAMETER fs_codec_parameter_get_type fs_feedback_parameter_get_type
fs-transmitter FsTransmitter farstream/fs-transmitter.h FsTransmitter FsTransmitterClass fs_transmitter_new fs_transmitter_new_stream_transmitter fs_transmitter_get_stream_transmitter_type fs_transmitter_emit_error fs_transmitter_list_available FS_IS_TRANSMITTER FS_IS_TRANSMITTER_CLASS FS_TRANSMITTER FS_TRANSMITTER_CLASS FS_TRANSMITTER_GET_CLASS FS_TYPE_TRANSMITTER FsTransmitterPrivate FS_TRANSMITTER_CAST fs_transmitter_get_type
fs-stream-transmitter FsStreamTransmitter farstream/fs-transmitter.h FsStreamTransmitter FsStreamTransmitterClass fs_stream_transmitter_add_remote_candidates fs_stream_transmitter_gather_local_candidates fs_stream_transmitter_force_remote_candidates fs_stream_transmitter_stop fs_stream_transmitter_emit_error fs_stream_parse_component_state_changed fs_stream_parse_local_candidates_prepared fs_stream_parse_new_active_candidate_pair fs_stream_parse_new_local_candidate fs_stream_parse_recv_codecs_changed FS_IS_STREAM_TRANSMITTER FS_IS_STREAM_TRANSMITTER_CLASS FS_STREAM_TRANSMITTER FS_STREAM_TRANSMITTER_CLASS FS_STREAM_TRANSMITTER_GET_CLASS FS_TYPE_STREAM_TRANSMITTER FS_STREAM_TRANSMITTER_CAST FsStreamTransmitterPrivate fs_stream_transmitter_get_type
fs-plugin FsPlugin farstream/fs-plugin.h FsPlugin fs_plugin_create_valist fs_plugin_create FS_INIT_PLUGIN fs_plugin_list_available FsPluginClass FS_IS_PLUGIN FS_IS_PLUGIN_CLASS FS_PLUGIN FS_PLUGIN_CLASS FS_PLUGIN_GET_CLASS FS_TYPE_PLUGIN FsPluginPrivate fs_plugin_get_type
fs-element-added-notifier FsElementAddedNotifier farstream/fs-element-added-notifier.h FsElementAddedNotifier fs_element_added_notifier_new fs_element_added_notifier_add fs_element_added_notifier_remove fs_element_added_notifier_set_properties_from_keyfile fs_element_added_notifier_set_properties_from_file fs_element_added_notifier_set_default_properties FsElementAddedNotifierClass FsElementAddedNotifierPrivate FS_ELEMENT_ADDED_NOTIFIER FS_ELEMENT_ADDED_NOTIFIER_CLASS FS_ELEMENT_ADDED_NOTIFIER_GET_CLASS FS_IS_ELEMENT_ADDED_NOTIFIER FS_IS_ELEMENT_ADDED_NOTIFIER_CLASS FS_TYPE_ELEMENT_ADDED_NOTIFIER fs_element_added_notifier_get_type
fs-rtp RTP Specific types farstream/fs-rtp.h FsRtpHeaderExtension fs_rtp_header_extension_new fs_rtp_header_extension_copy fs_rtp_header_extension_destroy fs_rtp_header_extension_are_equal fs_rtp_header_extension_list_copy fs_rtp_header_extension_list_destroy fs_rtp_header_extension_list_from_keyfile FS_RTP_HEADER_EXTENSION_FORMAT FS_RTP_HEADER_EXTENSION_ARGS FS_TYPE_RTP_HEADER_EXTENSION FS_TYPE_RTP_HEADER_EXTENSION_LIST fs_rtp_header_extension_get_type fs_rtp_header_extension_list_get_type
fs-utils Utility functions farstream/fs-utils.h fs_utils_set_bitrate fs_utils_get_default_codec_preferences fs_utils_get_default_element_properties fs_utils_get_default_rtp_header_extension_preferences
farstream-0.2.7/docs/libs/farstream-libs-overrides.txt0000664000076400007640000000000011710041460017754 00000000000000farstream-0.2.7/docs/libs/html/0000775000076400007640000000000012462323000013334 500000000000000farstream-0.2.7/docs/libs/html/FsElementAddedNotifier.html0000664000076400007640000005766612462323000020472 00000000000000 Farstream Reference Manual: FsElementAddedNotifier

FsElementAddedNotifier

FsElementAddedNotifier — Recursive element addition notifier

Signals

void element-added Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── FsElementAddedNotifier

Includes

#include <farstream/fs-element-added-notifier.h>

Description

This object can be attach to any GstBin and will emit a the “element-added” signal for every element inside the GstBin or any sub-bin and any element added in the future to the bin or its sub-bins. There is also a utility method to have it used to set the properties of elements based on a GKeyfile.

Functions

fs_element_added_notifier_new ()

FsElementAddedNotifier *
fs_element_added_notifier_new (void);

Creates a new FsElementAddedNotifier object

Returns

the newly-created FsElementAddedNotifier


fs_element_added_notifier_add ()

void
fs_element_added_notifier_add (FsElementAddedNotifier *notifier,
                               GstBin *bin);

Add a GstBin to on which the “element-added” signal will be called on every element and sub-element present and added in the future.

Parameters

notifier

a FsElementAddedNotifier

 

bin

A GstBin to watch to added elements

 

fs_element_added_notifier_remove ()

gboolean
fs_element_added_notifier_remove (FsElementAddedNotifier *notifier,
                                  GstBin *bin);

Stop watching the passed bin and its subbins.

Parameters

notifier

a FsElementAddedNotifier

 

bin

A GstBin to stop watching

 

Returns

TRUE if the GstBin was being watched, FALSE otherwise


fs_element_added_notifier_set_properties_from_keyfile ()

gulong
fs_element_added_notifier_set_properties_from_keyfile
                               (FsElementAddedNotifier *notifier,
                                GKeyFile *keyfile);

Using a GKeyFile where the groups are the element's type or name and the key=value are the property and its value, this function will set the properties on the elements added to this object after this function has been called. It will take ownership of the GKeyFile structure. It will first try the group as the element type, if that does not match, it will check its name.

Parameters

notifier

a FsElementAddedNotifier

 

keyfile

a GKeyFile.

[transfer full]

Returns

The id of the signal connection, this can be used to disconnect this property setter using g_signal_handler_disconnect().


fs_element_added_notifier_set_properties_from_file ()

gboolean
fs_element_added_notifier_set_properties_from_file
                               (FsElementAddedNotifier *notifier,
                                const gchar *filename,
                                GError **error);

Same as fs_element_added_notifier_set_properties_from_keyfile() but using the name of the file to load instead of the GKeyFile directly.

Parameters

notifier

a FsElementAddedNotifier

 

filename

The name of the keyfile to use

 

error

location of a GError, or NULL if no error occured

 

Returns

TRUE if the file was successfully loaded, FALSE otherwise


fs_element_added_notifier_set_default_properties ()

gulong
fs_element_added_notifier_set_default_properties
                               (FsElementAddedNotifier *notifier,
                                GstElement *element);

Same as first calling fs_utils_get_default_element_properties() and using the result with fs_element_added_notifier_set_properties_from_keyfile() .

This is binding friendly (since GKeyFile doesn't have a boxed type).

Parameters

notifier

a FsElementAddedNotifier

 

element

Element for which to set the default codec preferences

 

Returns

The id of the signal connection, this can be used to disconnect this property setter using g_signal_handler_disconnect().

Types and Values

struct FsElementAddedNotifier

struct FsElementAddedNotifier;

All members are private

Signal Details

The “element-added” signal

void
user_function (FsElementAddedNotifier *self,
               GstBin                 *bin,
               GstElement             *element,
               gpointer                user_data)

This signal is emitted when an element is added to a GstBin that was added to this object or one of its sub-bins. Be careful, there is no guarantee that this will be emitted on your main thread, it will be emitted in the thread that added the element. The bin may be NULL if this is the top-level bin.

Parameters

self

FsElementAddedNotifier that emitted the signal

 

bin

The GstBin to which this object was added

 

element

The GstElement that was added

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

farstream-0.2.7/docs/libs/html/farstream-libs-FsCandidate.html0000664000076400007640000010515012462323000021222 00000000000000 Farstream Reference Manual: FsCandidate

FsCandidate

FsCandidate — Structure describing a transport candidate.

Types and Values

Includes

#include <farstream/fs-conference.h>

Description

An FsCandidate is a way to exchange candidate information between the client and Farstream. This description is compatible with ICE-13. It can also be a multicast address. Candidates are linked to streams. The information specified in this structure is usually representative of the codec information exchanged in the signaling.

Functions

fs_candidate_new ()

FsCandidate *
fs_candidate_new (const gchar *foundation,
                  guint component_id,
                  FsCandidateType type,
                  FsNetworkProtocol proto,
                  const gchar *ip,
                  guint port);

Allocates a new FsCandidate, the rest of the fields can be optionally filled manually. See also fs_candidate_new_full()

Parameters

foundation

The foundation of the candidate

 

component_id

The component this candidate is for

 

type

The type of candidate

 

proto

The protocol this component is for

 

ip

The IP address of this component (can be NULL for local candidate to mean any address).

[allow-none]

port

the UDP/TCP port

 

Returns

a newly-allocated FsCandidate


fs_candidate_new_full ()

FsCandidate *
fs_candidate_new_full (const gchar *foundation,
                       guint component_id,
                       const gchar *ip,
                       guint16 port,
                       const gchar *base_ip,
                       guint16 base_port,
                       FsNetworkProtocol proto,
                       guint32 priority,
                       FsCandidateType type,
                       const gchar *username,
                       const gchar *password,
                       guint ttl);

Allocates a new FsCandidate, filling all the fields. See also fs_candidate_new()

Parameters

foundation

The foundation of the candidate

 

component_id

The component this candidate is for

 

ip

The IP address of this component (can be NULL for local candidate to mean any address).

[allow-none]

port

the UDP/TCP port

 

base_ip

IP of base in dotted format as defined in ICE-19.

[allow-none]

base_port

Port of base as defined in ICE-19.

 

proto

The protocol this component is for

 

priority

Value between 0 and (2^31 - 1) representing the priority

 

type

The type of candidate

 

username

Username to use to connect to client if necessary, NULL otherwise.

[allow-none]

password

Username to use to connect to client if necessary, NULL otherwise.

[allow-none]

ttl

The TTL used when sending Multicast packet (0 = auto)

 

Returns

a newly-allocated FsCandidate


fs_candidate_destroy ()

void
fs_candidate_destroy (FsCandidate *cand);

Frees a FsCandidate and all its contents

Parameters

cand

a FsCandidate to delete

 

fs_candidate_copy ()

FsCandidate *
fs_candidate_copy (const FsCandidate *cand);

Copies a FsCandidate and its contents.

Parameters

cand

a FsCandidate to copy

 

Returns

a new FsCandidate


fs_candidate_list_destroy ()

void
fs_candidate_list_destroy (GList *candidate_list);

Deletes a GList of FsCandidate and its contents

Parameters

candidate_list

A GList of FsCandidate

 

fs_candidate_list_copy ()

GList *
fs_candidate_list_copy (const GList *candidate_list);

Copies a GList of FsCandidate and its contents

Parameters

candidate_list

A GList of FsCandidate.

[element-type FsCodec]

Returns

a new GList of FsCandidate.

[element-type FsCodec][transfer full]


fs_value_set_candidate_list ()

void
fs_value_set_candidate_list (GValue *value,
                             GList *candidates);

This is for the bindings benefit. Works around the limitations of GObject introspection.

Parameters

value

a GValue of type FS_TYPE_CANDIDATE_LIST

 

candidates

A GList of FsCandidate.

[element-type FsCandidate][allow-none]

Types and Values

struct FsCandidate

struct FsCandidate {
  gchar *foundation;
  guint component_id;
  gchar *ip;
  guint16 port;
  gchar *base_ip;
  guint16 base_port;
  FsNetworkProtocol proto;
  guint32 priority;
  FsCandidateType type;
  gchar *username;
  gchar *password;
  guint ttl;
};

Struct to hold information about ICE-19 compliant candidates

Members

gchar *foundation;

a string representing the foundation of this candidate (maximum 32 chars)

 

guint component_id;

value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP, FsComponentType can be used here)

 

gchar *ip;

IP in dotted format

 

guint16 port;

Port to use

 

gchar *base_ip;

IP of base in dotted format as defined in ICE-19.

 

guint16 base_port;

Port of base as defined in ICE-19.

 

FsNetworkProtocol proto;

FsNetworkProtocol for ip protocol to use as candidate

 

guint32 priority;

Value between 0 and (2^31 - 1) representing the priority

 

FsCandidateType type;

The FsCandidateType of the candidate

 

gchar *username;

Username to use to connect to client if necessary, NULL otherwise

 

gchar *password;

Username to use to connect to client if necessary, NULL otherwise

 

guint ttl;

The TTL used when sending Multicast packet (0 = auto)

 

enum FsCandidateType

An enum for the type of candidate used/reported

Members

FS_CANDIDATE_TYPE_HOST

A host candidate (local)

 

FS_CANDIDATE_TYPE_SRFLX

A server reflexive candidate.

 

FS_CANDIDATE_TYPE_PRFLX

A peer reflexive candidate

 

FS_CANDIDATE_TYPE_RELAY

An relay candidate

 

FS_CANDIDATE_TYPE_MULTICAST

A multicast address

 

enum FsNetworkProtocol

An enum for the base IP protocol

Members

FS_NETWORK_PROTOCOL_UDP

A UDP based protocol

 

FS_NETWORK_PROTOCOL_TCP

A TCP based protocol, will listen for incoming connections

 

FS_NETWORK_PROTOCOL_TCP_PASSIVE

A TCP based protocol, will listen for incoming connections

 

FS_NETWORK_PROTOCOL_TCP_ACTIVE

A TCP based protocol, will attempt to open an outbound connection

 

FS_NETWORK_PROTOCOL_TCP_SO

A TCP based protocol, will listen for incoming connections and attempt an outbound connection at the same time as the peer (Simultanuous-Open)

 

enum FsComponentType

This enum contains the component IDs defined in ICE-19

Members

FS_COMPONENT_NONE

Use this when specifying a component is innapropriate

 

FS_COMPONENT_RTP

This component is for RTP data

 

FS_COMPONENT_RTCP

This component is for RTCP control

 
farstream-0.2.7/docs/libs/html/FsParticipant.html0000664000076400007640000002023212462323000016710 00000000000000 Farstream Reference Manual: FsParticipant

FsParticipant

FsParticipant — A participant in a conference

Types and Values

Object Hierarchy

    GObject
    ╰── FsParticipant

Includes

#include <farstream/fs-conference.h>

Description

This object is the base implementation of a Farstream Participant. It needs to be derived and implemented by a farstream conference gstreamer element. A participant represents any source of media in a conference. This could be a human-participant or an automaton.

Functions

FS_PARTICIPANT_DATA_LOCK()

#define             FS_PARTICIPANT_DATA_LOCK(participant)

Locks the participant for data set with g_object_set_data() or g_object_set_qdata().

Parameters

participant

A FsParticipant

 

FS_PARTICIPANT_DATA_UNLOCK()

#define             FS_PARTICIPANT_DATA_UNLOCK(participant)

Unlocks the participant for data set with g_object_set_data() or g_object_set_qdata().

Parameters

participant

A FsParticipant

 

Types and Values

struct FsParticipant

struct FsParticipant;

All members are private (access them using the properties)


struct FsParticipantClass

struct FsParticipantClass {
  GObjectClass parent_class;

  /* virtual functions */
};

The FsParticipant class has no virtual methods to implement, but you may want to override the properties or attach more date to it

Members

GObjectClass parent_class;

Our parent

 
farstream-0.2.7/docs/libs/html/farstream-libs.devhelp20000664000076400007640000005676312462323000017643 00000000000000 farstream-0.2.7/docs/libs/html/pt02.html0000664000076400007640000000504312462323000014731 00000000000000 Farstream Reference Manual: Part II. Classes used to implement Farstream plugins

Part II. Classes used to implement Farstream plugins

Table of Contents

Farstream Transmitter Classes
FsTransmitter — A transmitter object linked to a session
FsStreamTransmitter — A stream transmitter object used to convey per-stream information to a transmitter.
Farstream Plugins Infrastructure
FsPlugin — A class for defining Farstream plugins
farstream-0.2.7/docs/libs/html/FsStreamTransmitter.html0000664000076400007640000015633312462323000020136 00000000000000 Farstream Reference Manual: FsStreamTransmitter

FsStreamTransmitter

FsStreamTransmitter — A stream transmitter object used to convey per-stream information to a transmitter.

Properties

gboolean associate-on-source Read / Write / Construct Only
FsCandidateList * preferred-local-candidates Read / Write / Construct Only
gboolean sending Read / Write

Signals

void error Run Last
void known-source-packet-received Run Last
void local-candidates-prepared Run Last
void new-active-candidate-pair Run Last
void new-local-candidate Run Last
void state-changed Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── FsStreamTransmitter

Includes

#include <farstream/fs-transmitter.h>

Description

This object is the base implementation of a Farstream Stream Transmitter. It needs to be derived and implement by a Farstream transmitter. A Farstream Stream transmitter is used to convery per-stream information to a transmitter, this is mostly local and remote candidates

Functions

fs_stream_transmitter_add_remote_candidates ()

gboolean
fs_stream_transmitter_add_remote_candidates
                               (FsStreamTransmitter *streamtransmitter,
                                GList *candidates,
                                GError **error);

This function is used to add remote candidates to the transmitter

Parameters

streamtransmitter

a FsStreamTranmitter

 

candidates

a GList of the remote candidates.

[element-type FsCandidate]

error

location of a GError, or NULL if no error occured

 

Returns

TRUE of the candidate could be added, FALSE if it couldnt (and the GError will be set)


fs_stream_transmitter_gather_local_candidates ()

gboolean
fs_stream_transmitter_gather_local_candidates
                               (FsStreamTransmitter *streamtransmitter,
                                GError **error);

This function tells the transmitter to start gathering local candidates, signals for new candidates and newly active candidates can be emitted during the call to this function.

Parameters

streamtransmitter

a FsStreamTransmitter

 

error

location of a GErrorh, or NULL if no error occured

 

Returns

TRUE if it succeeds (or is not implemented), FALSE otherwise


fs_stream_transmitter_force_remote_candidates ()

gboolean
fs_stream_transmitter_force_remote_candidates
                               (FsStreamTransmitter *streamtransmitter,
                                GList *remote_candidates,
                                GError **error);

This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component.

Parameters

streamtransmitter

a FsStreamTransmitter

 

remote_candidates

a GList of FsCandidate to force.

[element-type FsCandidate]

error

location of a GError, or NULL if no error occured

 

Returns

TRUE if the candidates could be forced, FALSE otherwise


fs_stream_transmitter_stop ()

void
fs_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter);

This functions stops the FsStreamTransmitter, it must be called before the last reference is dropped.

Parameters

streamtransmitter

a FsStreamTransmitter

 

fs_stream_transmitter_emit_error ()

void
fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter,
                                  gint error_no,
                                  const gchar *error_msg);

This function emit the "error" signal on a FsStreamTransmitter, it should only be called by subclasses.

Parameters

streamtransmitter

FsStreamTransmitter on which to emit the error signal

 

error_no

The number of the error

 

error_msg

Error message (for the programmer)

 

fs_stream_parse_component_state_changed ()

gboolean
fs_stream_parse_component_state_changed
                               (FsStream *stream,
                                GstMessage *message,
                                guint *component,
                                FsStreamState *state);

Parses a "farstream-component-state-changed" message and checks if it matches the stream parameters.

Parameters

stream

a FsStream to match against the message

 

message

a GstMessage to parse

 

component

Returns the component from the GstMessage if not NULL.

[out]

state

Returns the FsStreamState from the GstMessage if not NULL.

[out]

Returns

TRUE if the message matches the stream and is valid.


fs_stream_parse_local_candidates_prepared ()

gboolean
fs_stream_parse_local_candidates_prepared
                               (FsStream *stream,
                                GstMessage *message);

Parses a "farstream-local-candidates-prepared" message and checks if it matches the stream parameters.

Parameters

stream

a FsStream to match against the message

 

message

a GstMessage to parse

 

Returns

TRUE if the message matches the stream and is valid.


fs_stream_parse_new_active_candidate_pair ()

gboolean
fs_stream_parse_new_active_candidate_pair
                               (FsStream *stream,
                                GstMessage *message,
                                FsCandidate **local_candidate,
                                FsCandidate **remote_candidate);

Parses a "farstream-new-active-candidate-pair" message and checks if it matches the stream parameters.

Parameters

stream

a FsStream to match against the message

 

message

a GstMessage to parse

 

local_candidate

Returns the local FsCandidate in the message if not NULL.

[out][transfer none]

remote_candidate

Returns the remote FsCandidate in the message if not NULL.

[out][transfer none]

Returns

TRUE if the message matches the stream and is valid.


fs_stream_parse_new_local_candidate ()

gboolean
fs_stream_parse_new_local_candidate (FsStream *stream,
                                     GstMessage *message,
                                     FsCandidate **candidate);

Parses a "farstream-new-local-candidate" message and checks if it matches the stream parameters.

Parameters

stream

a FsStream to match against the message

 

message

a GstMessage to parse

 

candidate

Returns the FsCandidate in the message if not NULL.

[out][transfer none]

Returns

TRUE if the message matches the stream and is valid.


fs_stream_parse_recv_codecs_changed ()

gboolean
fs_stream_parse_recv_codecs_changed (FsStream *stream,
                                     GstMessage *message,
                                     GList **codecs);

Parses a "farstream-recv-codecs-changed" message and checks if it matches the stream parameters.

Parameters

stream

a FsStream to match against the message

 

message

a GstMessage to parse

 

codecs

Returns a GList of FsCodec of the message if not NULL.

[out][transfer none][element-type FsCodec]

Returns

TRUE if the message matches the stream and is valid.

Types and Values

struct FsStreamTransmitter

struct FsStreamTransmitter;

All members are private, access them using methods and properties


struct FsStreamTransmitterClass

struct FsStreamTransmitterClass {
  GObjectClass parent_class;

  /*virtual functions */
  gboolean (*add_remote_candidates) (FsStreamTransmitter *streamtransmitter,
                                     GList *candidates, GError **error);

  gboolean (*force_remote_candidates) (FsStreamTransmitter *streamtransmitter,
      GList *remote_candidates,
      GError **error);
  gboolean (*gather_local_candidates) (FsStreamTransmitter *streamtransmitter,
                                       GError **error);
  void (*stop) (FsStreamTransmitter *streamtransmitter);
};

You must override the add_remote_candidate in a subclass

Members

GObjectClass parent_class;

Our parent

 

add_remote_candidates ()

Sets the remote candidates

 

force_remote_candidates ()

Forces certain remote candidates

 

gather_local_candidates ()

Starts the gathering of local candidates

 

stop ()

Stop the stream transmitter synchronously (does any Gst stopping that needs to be done)

 

Property Details

The “associate-on-source” property

  “associate-on-source”      gboolean

This tells the stream transmitter to associate incoming data with this based on the source without looking at the content if possible.

Flags: Read / Write / Construct Only

Default value: TRUE


The “preferred-local-candidates” property

  “preferred-local-candidates” FsCandidateList *

A GList of FsCandidates.

Flags: Read / Write / Construct Only


The “sending” property

  “sending”                  gboolean

A network source GstElement to be used by the FsSession

Flags: Read / Write

Default value: TRUE

Signal Details

The “error” signal

void
user_function (FsStreamTransmitter *self,
               FsError              errorno,
               gchar               *error_msg,
               gpointer             user_data)

This signal is emitted in any error condition

Parameters

self

FsStreamTransmitter that emitted the signal

 

errorno

The number of the error

 

error_msg

Error message (for the programmer)

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “known-source-packet-received” signal

void
user_function (FsStreamTransmitter *self,
               guint                component,
               gpointer             buffer,
               gpointer             user_data)

This signal is emitted when a buffer coming from a confirmed known source is received.

Parameters

self

FsStreamTransmitter that emitted the signal

 

component

The Component on which this buffer was received

 

buffer

the GstBuffer coming from the known source

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “local-candidates-prepared” signal

void
user_function (FsStreamTransmitter *self,
               gpointer             user_data)

This signal is emitted when all local candidates have been prepared, an ICE implementation would send its SDP offer or answer.

Parameters

self

FsStreamTransmitter that emitted the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “new-active-candidate-pair” signal

void
user_function (FsStreamTransmitter *self,
               FsCandidate         *local_candidate,
               FsCandidate         *remote_candidate,
               gpointer             user_data)

This signal is emitted when there is a new active chandidate pair that has been established. This is specially useful for ICE where the active candidate pair can change automatically due to network conditions. The user must not modify the candidates and must copy them if he wants to use them outside the callback scope.

Parameters

self

FsStreamTransmitter that emitted the signal

 

local_candidate

FsCandidate of the local candidate being used

 

remote_candidate

FsCandidate of the remote candidate being used

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “new-local-candidate” signal

void
user_function (FsStreamTransmitter *self,
               FsCandidate         *local_candidate,
               gpointer             user_data)

This signal is emitted when a new local candidate is discovered.

Parameters

self

FsStream that emitted the signal

 

local_candidate

FsCandidate of the local candidate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “state-changed” signal

void
user_function (FsStreamTransmitter *self,
               guint                component,
               FsStreamState        state,
               gpointer             user_data)

This signal is emitted when the ICE state (or equivalent) of the component changes

Parameters

self

FsStreamTransmitter that emitted the signal

 

component

the id of the component which state has changed

 

state

the new state of the component

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

farstream-0.2.7/docs/libs/html/style.css0000644000076400007640000002077012462323000015132 00000000000000body { font-family: cantarell, sans-serif; } .synopsis, .classsynopsis { /* tango:aluminium 1/2 */ background: #eeeeec; background: rgba(238, 238, 236, 0.5); border: solid 1px rgb(238, 238, 236); padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ /* fallback for no rgba support */ background: #e6f3ff; border: solid 1px #729fcf; background: rgba(114, 159, 207, 0.1); border: solid 1px rgba(114, 159, 207, 0.2); padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a, a:visited { text-decoration: none; /* tango:sky blue 2 */ color: #3465a4; } a:hover { text-decoration: underline; /* tango:sky blue 1 */ color: #729fcf; } div.informaltable table { border-collapse: separate; border-spacing: 1em 0.5em; border: none; } div.informaltable table td, div.informaltable table th { vertical-align: top; } .function_type, .variable_type, .property_type, .signal_type, .parameter_name, .struct_member_name, .union_member_name, .define_keyword, .datatype_keyword, .typedef_keyword { text-align: right; } /* dim non-primary columns */ .c_punctuation, .function_type, .variable_type, .property_type, .signal_type, .define_keyword, .datatype_keyword, .typedef_keyword, .property_flags, .signal_flags, .parameter_annotations, .enum_member_annotations, .struct_member_annotations, .union_member_annotations { color: #888a85; } .function_type a, .function_type a:visited, .function_type a:hover, .property_type a, .property_type a:visited, .property_type a:hover, .signal_type a, .signal_type a:visited, .signal_type a:hover, .signal_flags a, .signal_flags a:visited, .signal_flags a:hover { color: #729fcf; } td p { margin: 0.25em; } div.table table { border-collapse: collapse; border-spacing: 0px; /* tango:aluminium 3 */ border: solid 1px #babdb6; } div.table table td, div.table table th { /* tango:aluminium 3 */ border: solid 1px #babdb6; padding: 3px; vertical-align: top; } div.table table th { /* tango:aluminium 2 */ background-color: #d3d7cf; } h4 { color: #555753; } hr { /* tango:aluminium 1 */ color: #d3d7cf; background: #d3d7cf; border: none 0px; height: 1px; clear: both; margin: 2.0em 0em 2.0em 0em; } dl.toc dt { padding-bottom: 0.25em; } dl.toc > dd > dl > dt { padding-top: 0.25em; padding-bottom: 0.25em; } dl.toc > dt { padding-top: 1em; padding-bottom: 0.5em; font-weight: bold; } .parameter { font-style: normal; } .footer { padding-top: 3.5em; /* tango:aluminium 3 */ color: #babdb6; text-align: center; font-size: 80%; } .informalfigure, .figure { margin: 1em; } .informalexample, .example { margin-top: 1em; margin-bottom: 1em; } .warning { /* tango:orange 0/1 */ background: #ffeed9; background: rgba(252, 175, 62, 0.1); border-color: #ffb04f; border-color: rgba(252, 175, 62, 0.2); } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; background: rgba(138, 226, 52, 0.1); border-color: #abf562; border-color: rgba(138, 226, 52, 0.2); } div.blockquote { border-color: #eeeeec; } .note, .warning, div.blockquote { padding: 0.5em; border-width: 1px; border-style: solid; margin: 2em; } .note p, .warning p { margin: 0; } div.warning h3.title, div.note h3.title { display: none; } p + div.section { margin-top: 1em; } div.refnamediv, div.refsynopsisdiv, div.refsect1, div.refsect2, div.toc, div.section { margin-bottom: 1em; } /* blob links */ h2 .extralinks, h3 .extralinks { float: right; /* tango:aluminium 3 */ color: #babdb6; font-size: 80%; font-weight: normal; } .lineart { color: #d3d7cf; font-weight: normal; } .annotation { /* tango:aluminium 5 */ color: #555753; font-weight: normal; } .structfield { font-style: normal; font-weight: normal; } acronym,abbr { border-bottom: 1px dotted gray; } /* code listings */ .listing_code .programlisting .normal, .listing_code .programlisting .normal a, .listing_code .programlisting .number, .listing_code .programlisting .cbracket, .listing_code .programlisting .symbol { color: #555753; } .listing_code .programlisting .comment, .listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ .listing_code .programlisting .function, .listing_code .programlisting .function a, .listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ .listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ .listing_code .programlisting .keyword, .listing_code .programlisting .usertype, .listing_code .programlisting .type, .listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; border: solid 1px rgba(114, 159, 207, 0.2); padding: 0px; } .listing_lines, .listing_code { margin-top: 0px; margin-bottom: 0px; padding: 0.5em; } .listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; background: rgba(114, 159, 207, 0.2); /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; background: rgba(114, 159, 207, 0.1); } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; background: none; } .listing_lines pre, .listing_code pre { margin: 0px; } @media screen { sup a.footnote { position: relative; top: 0em ! important; } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] { display: inline-block; position: relative; top:-5em; } /* this seems to be a bug in the xsl style sheets when generating indexes */ div.index div.index { top: 0em; } /* make space for the fixed navigation bar and add space at the bottom so that * link targets appear somewhat close to top */ body { padding-top: 2.5em; padding-bottom: 500px; max-width: 60em; } p { max-width: 60em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; background: #e2e2e2; border-bottom: solid 1px #babdb6; border-spacing: 5px; margin-top: 0; margin-bottom: 0; top: 0; left: 0; z-index: 10; } table.navigation#top td { padding-left: 6px; padding-right: 6px; } .navigation a, .navigation a:visited { /* tango:sky blue 3 */ color: #204a87; } .navigation a:hover { /* tango:sky blue 2 */ color: #3465a4; } td.shortcuts { /* tango:sky blue 2 */ color: #3465a4; font-size: 80%; white-space: nowrap; } td.shortcuts .dim { color: #babdb6; } .navigation .title { font-size: 80%; max-width: none; margin: 0px; font-weight: normal; } } @media screen and (min-width: 60em) { /* screen larger than 60em */ body { margin: auto; } } @media screen and (max-width: 60em) { /* screen less than 60em */ #nav_hierarchy { display: none; } #nav_interfaces { display: none; } #nav_prerequisites { display: none; } #nav_derived_interfaces { display: none; } #nav_implementations { display: none; } #nav_child_properties { display: none; } #nav_style_properties { display: none; } #nav_index { display: none; } #nav_glossary { display: none; } .gallery_image { display: none; } .property_flags { display: none; } .signal_flags { display: none; } .parameter_annotations { display: none; } .enum_member_annotations { display: none; } .struct_member_annotations { display: none; } .union_member_annotations { display: none; } /* now that a column is hidden, optimize space */ col.parameters_name { width: auto; } col.parameters_description { width: auto; } col.struct_members_name { width: auto; } col.struct_members_description { width: auto; } col.enum_members_name { width: auto; } col.enum_members_description { width: auto; } col.union_members_name { width: auto; } col.union_members_description { width: auto; } .listing_lines { display: none; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; background: #e2e2e2; border: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; } } farstream-0.2.7/docs/libs/html/up-insensitive.png0000644000076400007640000000056612462323000016751 00000000000000PNG  IHDRabKGD pHYs B(xtIMEwIIDAT8?/Qϙ?[u$VHTDۈBM+! Farstream Reference Manual: Part I. User-oriented classes, interfaces and functions

Part I. User-oriented classes, interfaces and functions

Table of Contents

Farstream Core Library
FsConference — Interface for farstream conference elements
FsParticipant — A participant in a conference
FsSession — A session in a conference
FsStream — A stream in a session in a conference
FsCandidate — Structure describing a transport candidate.
FsCodec — Structure representing a media codec
Protocol Specific types
RTP Specific types
Farstream Utility Functions and Objects
FsElementAddedNotifier — Recursive element addition notifier
Utility functions — Miscellaneous useful functions
farstream-0.2.7/docs/libs/html/left-insensitive.png0000644000076400007640000000061312462323000017250 00000000000000PNG  IHDRabKGD pHYs B(xtIMEƫqIDAT8͒NQ@pds`*4@W@ A!Ԇ@6^ 5hxIH R`sQp̙339B|sKEQTK@۝΁i^~Wʆ`0TJ6TcYn6A ƀ~߱>}ǭs; lYkwr 5U= /" "uU=ɲlArDzp5I4^E+P3Ɯq_p ̥iUYp=#IENDB`farstream-0.2.7/docs/libs/html/FsSession.html0000664000076400007640000024643612462323000016075 00000000000000 Farstream Reference Manual: FsSession

FsSession

FsSession — A session in a conference

Properties

GstCaps * allowed-sink-caps Read
GstCaps * allowed-src-caps Read
FsCodecGList * codec-preferences Read
FsCodecGList * codecs Read
FsCodecGList * codecs-without-config Read
FsConference * conference Read / Write / Construct Only
FsCodec * current-send-codec Read
GstStructure * encryption-parameters Read
guint id Read / Write / Construct Only
FsMediaType media-type Read / Write / Construct Only
GstPad * sink-pad Read
guint tos Read / Write

Signals

void error Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── FsSession

Includes

#include <farstream/fs-conference.h>

Description

This object is the base implementation of a Farstream Session. It needs to be derived and implemented by a farstream conference gstreamer element. A Farstream session is defined in the same way as an RTP session. It can contain one or more participants but represents only one media stream (i.e. One session for video and one session for audio in an AV conference). Sessions contained in the same conference will be synchronised together during playback.

This will communicate asynchronous events to the user through GstMessage of type GST_MESSAGE_ELEMENT sent over the GstBus.

The "farstream-send-codec-changed" message

"session" FsSession The session that emits the message
"codec" FsCodec The new send codec
"secondary-codecs" GList A GList of FsCodec (to be freed with fs_codec_list_destroy())

This message is sent on the bus when the value of the “current-send-codec” property changes.


The "farstream-codecs-changed" message

"session" FsSession The session that emits the message

This message is sent on the bus when the value of the “codecs” or “codecs-without-config” properties change. If one is using codecs that have configuration data that needs to be transmitted reliably, one should fetch “codecs”, otherwise, “codecs-without-config” should be enough.


The "farstream-telephony-event-started" message

"session" FsSession The session that emits the message
"method" FsDTMFMethod The method used to send the DTMF
"event" FSDTMFEvent The event number
"volume" guchar The volume of the event

This message is emitted after a succesful call to fs_session_start_telephony_event() to inform the application that the telephony event has started.


The "farstream-telephony-event-stopped" message

"session" FsSession The session that emits the message
"method" FsDTMFMethod The method used to send the DTMF

This message is emitted after a succesful call to fs_session_stop_telephony_event() to inform the application that the telephony event has stopped.

Functions

fs_session_new_stream ()

FsStream *
fs_session_new_stream (FsSession *session,
                       FsParticipant *participant,
                       FsStreamDirection direction,
                       GError **error);

This function creates a stream for the given participant into the active session.

Parameters

session

a FsSession

 

participant

FsParticipant of a participant for the new stream

 

direction

FsStreamDirection describing the direction of the new stream that will be created for this participant

 

error

location of a GError, or NULL if no error occured

 

Returns

the new FsStream that has been created. User must unref the FsStream when the stream is ended. If an error occured, returns NULL.

[transfer full]


fs_session_set_codec_preferences ()

gboolean
fs_session_set_codec_preferences (FsSession *session,
                                  GList *codec_preferences,
                                  GError **error);

Set the list of desired codec preferences. The user may change this value during an ongoing session. Note that doing this can cause the codecs to change. Therefore this requires the user to fetch the new codecs and renegotiate them with the peers. It is a GList of FsCodec. The changes are immediately effective. The function does not take ownership of the list.

The payload type may be a valid dynamic PT (96-127), FS_CODEC_ID_DISABLE or FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the payload type of the codec will be "reserved" and not be used by any dynamically assigned payload type.

If the list of specifications would invalidate all codecs, an error will be returned.

Parameters

session

a FsSession

 

codec_preferences

a GList of FsCodec with the desired configuration.

[element-type FsCodec][allow-none]

error

location of a GError, or NULL if no error occured

 

Returns

TRUE on success, FALSE on error.


fs_session_destroy ()

void
fs_session_destroy (FsSession *session);

This will cause the session to remove all links to other objects and to remove itself from the FsConference, it will also destroy all FsStream inside this FsSession Once a FsSession has been destroyed, it can not be used anymore.

It is strongly recommended to call this function from the main thread because releasing the application's reference to a session.

Parameters

session

a FsSession

 

fs_session_start_telephony_event ()

gboolean
fs_session_start_telephony_event (FsSession *session,
                                  guint8 event,
                                  guint8 volume);

This function will start sending a telephony event (such as a DTMF tone) on the FsSession. You have to call the function fs_session_stop_telephony_event() to stop it.

If this function returns TRUE, a "farstream-telephony-event-started" will always be emitted when the event is actually played out.

Parameters

session

a FsSession

 

event

A FsStreamDTMFEvent or another number defined at http://www.iana.org/assignments/audio-telephone-event-registry

 

volume

The volume in dBm0 without the negative sign. Should be between 0 and 36. Higher values mean lower volume

 

Returns

TRUE if sucessful, it can return FALSE if the FsStream does not support this telephony event.


fs_session_stop_telephony_event ()

gboolean
fs_session_stop_telephony_event (FsSession *session);

This function will stop sending a telephony event started by fs_session_start_telephony_event(). If the event was being sent for less than 50ms, it will be sent for 50ms minimum. If the duration was a positive and the event is not over, it will cut it short.

If this function returns TRUE, a "farstream-telephony-event-stopped" will always be emitted when the event is actually stopped.

Parameters

session

an FsSession

 

Returns

TRUE if sucessful, it can return FALSE if the FsSession does not support telephony events or if no telephony event is being sent


fs_session_set_send_codec ()

gboolean
fs_session_set_send_codec (FsSession *session,
                           FsCodec *send_codec,
                           GError **error);

This function will set the currently being sent codec for all streams in this session. The given FsCodec must be taken directly from the codecs property of the session. If the given codec is not in the codecs list, error will be set and FALSE will be returned. The send_codec will be copied so it must be free'd using fs_codec_destroy() when done.

Parameters

session

a FsSession

 

send_codec

a FsCodec representing the codec to send

 

error

location of a GError, or NULL if no error occured

 

Returns

FALSE if the send codec couldn't be set.


fs_session_list_transmitters ()

gchar **
fs_session_list_transmitters (FsSession *session);

Get the list of all available transmitters for this session.

Parameters

session

A FsSession

 

Returns

a newly-allocagted NULL terminated array of named of transmitters or NULL if no transmitter is needed for this type of session. It should be freed with g_strfreev().

[transfer full]


fs_session_get_stream_transmitter_type ()

GType
fs_session_get_stream_transmitter_type
                               (FsSession *session,
                                const gchar *transmitter);

Returns the GType of the stream transmitter, bindings can use it to validate/convert the parameters passed to fs_session_new_stream().

Parameters

session

A FsSession

 

transmitter

The name of the transmitter

 

Returns

The GType of the stream transmitter


fs_session_codecs_need_resend ()

GList *
fs_session_codecs_need_resend (FsSession *session,
                               GList *old_codecs,
                               GList *new_codecs);

Some codec updates need to be reliably transmitted to the other side because they contain important parameters required to decode the media. Other codec updates, caused by user action, don't.

Parameters

session

a FsSession

 

old_codecs

Codecs previously retrieved from the “codecs” property.

[element-type FsCodec][transfer none][allow-none]

new_codecs

Codecs recently retrieved from the “codecs” property.

[element-type FsCodec][transfer none][allow-none]

Returns

A new GList of FsCodec that need to be resent or NULL if there are none. This list must be freed with fs_codec_list_destroy().

[element-type FsCodec][transfer full]


fs_session_set_allowed_caps ()

gboolean
fs_session_set_allowed_caps (FsSession *session,
                             GstCaps *sink_caps,
                             GstCaps *src_caps,
                             GError **error);

Sets the allowed caps for the sink and source pads for this FsSession. Only codecs that can take the input specified by the sink_caps and can produce output as specified by the src_caps will be produced in the “codecs” property and so only those will be negotiated.

If NULL is passed to either src_caps or sink_caps , it is not changed.

The default is "video/x-raw" for a video stream, "audio/x-raw" for an audio stream and "ANY" for an application stream.

The values can be retrived using the “allowed-src-caps” and “allowed-sink-caps” properties.

Parameters

session

a FsSession

 

sink_caps

Caps for the sink pad or NULL.

[allow-none]

src_caps

Caps for the src pad or NULL.

[allow-none]

error

the location where a GError can be stored or NULL

 

Returns

TRUE if the new filter caps were acceptable.

Since UNRELEASED


fs_session_set_encryption_parameters ()

gboolean
fs_session_set_encryption_parameters (FsSession *session,
                                      GstStructure *parameters,
                                      GError **error);

Sets encryption parameters. The exact parameters depend on the type of plugin being used.

Parameters

session

a FsSession

 

parameters

a GstStructure containing the encryption parameters or NULL to disable encryption.

[transfer none][allow-none]

error

the location where to store a GError or NULL

 

Returns

TRUE if the encryption parameters could be set, FALSE otherwise

Since UNRELEASED


fs_session_emit_error ()

void
fs_session_emit_error (FsSession *session,
                       gint error_no,
                       const gchar *error_msg);

This function emit the "error" signal on a FsSession, it should only be called by subclasses.

Parameters

session

FsSession on which to emit the error signal

 

error_no

The number of the error of type FsError

 

error_msg

Error message

 

fs_session_parse_codecs_changed ()

gboolean
fs_session_parse_codecs_changed (FsSession *session,
                                 GstMessage *message);

Parses a "farstream-codecs-changed" message and checks if it matches the session parameters.

Parameters

session

a FsSession to match against the message

 

message

a GstMessage to parse

 

Returns

TRUE if the message matches the session and is valid.


fs_session_parse_send_codec_changed ()

gboolean
fs_session_parse_send_codec_changed (FsSession *session,
                                     GstMessage *message,
                                     FsCodec **codec,
                                     GList **secondary_codecs);

Parses a "farstream-send-codec-changed" message and checks if it matches the session parameters.

Parameters

session

a FsSession to match against the message

 

message

a GstMessage to parse

 

codec

Returns the FsCodec in the message if not NULL.

[out][transfer none]

secondary_codecs

Returns a GList of FsCodec of the message if not NULL.

[out][transfer none][element-type FsCodec]

Returns

TRUE if the message matches the session and is valid.


fs_session_parse_telephony_event_started ()

gboolean
fs_session_parse_telephony_event_started
                               (FsSession *session,
                                GstMessage *message,
                                FsDTMFMethod *method,
                                FsDTMFEvent *event,
                                guint8 *volume);

Parses a "farstream-telephony-event-started" message and checks if it matches the session parameters.

Parameters

session

a FsSession to match against the message

 

message

a GstMessage to parse

 

method

Returns the FsDTMFMethod in the message if not NULL.

[out]

event

Returns the FsDTMFEvent in the message if not NULL.

[out]

volume

Returns the volume in the message if not NULL.

[out]

Returns

TRUE if the message matches the session and is valid.


fs_session_parse_telephony_event_stopped ()

gboolean
fs_session_parse_telephony_event_stopped
                               (FsSession *session,
                                GstMessage *message,
                                FsDTMFMethod *method);

Parses a "farstream-telephony-event-stopped" message and checks if it matches the session parameters.

Parameters

session

a FsSession to match against the message

 

message

a GstMessage to parse

 

method

Returns the FsDTMFMethod in the message if not NULL.

[out]

Returns

TRUE if the message matches the session and is valid.

Types and Values

struct FsSession

struct FsSession;

All members are private, access them using methods and properties


struct FsSessionClass

struct FsSessionClass {
  GObjectClass parent_class;

  /*virtual functions */
  FsStream *(* new_stream) (FsSession *session,
                            FsParticipant *participant,
                            FsStreamDirection direction,
                            GError **error);

  gboolean (* start_telephony_event) (FsSession *session, guint8 event,
                                      guint8 volume);
  gboolean (* stop_telephony_event) (FsSession *session);

  gboolean (* set_send_codec) (FsSession *session, FsCodec *send_codec,
                               GError **error);
  gboolean (* set_codec_preferences) (FsSession *session,
      GList *codec_preferences,
      GError **error);

  gchar** (* list_transmitters) (FsSession *session);

  GType (* get_stream_transmitter_type) (FsSession *session,
                                         const gchar *transmitter);

  GList* (* codecs_need_resend) (FsSession *session, GList *old_codecs,
      GList *new_codecs);

  gboolean (* set_allowed_caps) (FsSession *session, GstCaps *sink_caps,
      GstCaps *src_caps, GError **error);

  gboolean (* set_encryption_parameters) (FsSession *session,
      GstStructure *parameters, GError **error);
};

You must override at least new_stream in a subclass.

Members

GObjectClass parent_class;

Our parent

 

new_stream ()

Create a new FsStream

 

start_telephony_event ()

Starts a telephony event

 

stop_telephony_event ()

Stops a telephony event

 

set_send_codec ()

Forces sending with a specific codec

 

set_codec_preferences ()

Specifies the codec preferences

 

list_transmitters ()

Returns a list of the available transmitters

 

get_stream_transmitter_type ()

Returns the GType of the stream transmitter

 

codecs_need_resend ()

Returns the list of codecs that need resending

 

set_allowed_caps ()

Set the possible allowed src and sink caps

 

set_encryption_parameters ()

Set encryption parameters

 

enum FsDTMFEvent

An enum that represents the different DTMF event that can be sent to a FsSession. The values corresponds those those defined in RFC 4733 The rest of the possibles values are in the IANA registry at: http://www.iana.org/assignments/audio-telephone-event-registry

Members


enum FsDTMFMethod

An enum that represents the different ways a DTMF event can be sent

Members

FS_DTMF_METHOD_RTP_RFC4733

Send as a special payload type defined by RFC 4733 (which obsoletes RFC 2833)

 

FS_DTMF_METHOD_SOUND

Send as tones as in-band audio sound

 

Property Details

The “allowed-sink-caps” property

  “allowed-sink-caps”        GstCaps *

These are the GstCaps that can be fed into the session, they are used to filter the codecs to only those that can accepted those caps as input.

Flags: Read


The “allowed-src-caps” property

  “allowed-src-caps”         GstCaps *

These are the GstCaps that the session can produce, they are used to filter the codecs to only those that can accepted those caps as output.

Flags: Read


The “codec-preferences” property

  “codec-preferences”        FsCodecGList *

A GList of FsCodecs that allows user to set his codec options and priorities.

Flags: Read


The “codecs” property

  “codecs”                   FsCodecGList *

A GList of FsCodecs indicating the codecs for this session.

Flags: Read


The “codecs-without-config” property

  “codecs-without-config”    FsCodecGList *

A GList of FsCodecs indicating the codecs for this session without any configuration data.

Flags: Read


The “conference” property

  “conference”               FsConference *

The FsConference parent of this session. This property is a construct param and is read-only.

Flags: Read / Write / Construct Only


The “current-send-codec” property

  “current-send-codec”       FsCodec *

Indicates the currently active send codec. A user can change the active send codec by calling fs_session_set_send_codec(). The send codec could also be automatically changed by Farstream. This property is an FsCodec. User must free the codec using fs_codec_destroy() when done. The "farstream-send-codec-changed" message is emitted on the bus when the value of this property changes.

Flags: Read


The “encryption-parameters” property

  “encryption-parameters”    GstStructure *

Retrieves previously set encryption parameters

Flags: Read


The “id” property

  “id”                       guint

The ID of the session, the first number of the pads linked to this session will be this id

Flags: Read / Write / Construct Only

Default value: 0


The “media-type” property

  “media-type”               FsMediaType

The media-type of the session. This is either Audio, Video or both. This is a constructor parameter that cannot be changed.

Flags: Read / Write / Construct Only

Default value: FS_MEDIA_TYPE_AUDIO


The “sink-pad” property

  “sink-pad”                 GstPad *

The Gstreamer sink pad that must be used to send media data on this session. User must unref this GstPad when done with it.

Flags: Read


The “tos” property

  “tos”                      guint

Sets the IP ToS field (and if possible the IPv6 TCLASS field

Flags: Read / Write

Allowed values: <= 255

Default value: 0

Signal Details

The “error” signal

void
user_function (FsSession *self,
               GObject   *object,
               FsError    error_no,
               gchar     *error_msg,
               gpointer   user_data)

This signal is emitted in any error condition, it can be emitted on any thread. Applications should listen to the GstBus for errors.

Parameters

self

FsSession that emitted the signal

 

object

The Gobject that emitted the signal

 

error_no

The number of the error

 

error_msg

Error message

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

farstream-0.2.7/docs/libs/html/right.png0000644000076400007640000000040512462323000015074 00000000000000PNG  IHDRabKGD pHYs B(xtIME!GIDAT8үa?MIdEr,-hAIl ry}sX6 !9#D r$-Br$G"$;WZ&!cq \`軀O=QoufIENDB`farstream-0.2.7/docs/libs/html/farstream-libs-FsPlugin.html0000664000076400007640000003343312462323000020610 00000000000000 Farstream Reference Manual: FsPlugin

FsPlugin

FsPlugin — A class for defining Farstream plugins

Types and Values

struct FsPlugin

Includes

#include <farstream/fs-plugin.h>

Description

This class is a generic class to load GType plugins based on their name. With this simple class, you can only have one type per plugin.

Functions

fs_plugin_create_valist ()

GObject *
fs_plugin_create_valist (const gchar *name,
                         const gchar *type_suffix,
                         GError **error,
                         const gchar *first_property_name,
                         va_list var_args);

Loads the appropriate plugin if necessary and creates a GObject of the requested type

Parameters

name

The name of the plugin to load

 

type_suffix

The type of plugin to load (normally "transmitter")

 

error

location of a GError, or NULL if no error occured

 

first_property_name

The name of the first property to be set on the object

 

var_args

The rest of the arguments

 

Returns

The object created (or NULL if there is an error).

[transfer full]


fs_plugin_create ()

GObject *
fs_plugin_create (const gchar *name,
                  const gchar *type_suffix,
                  GError **error,
                  const gchar *first_property_name,
                  ...);

Loads the appropriate plugin if necessary and creates a GObject of the requested type

Parameters

name

The name of the plugin to load

 

type_suffix

The type of plugin to load (normally "transmitter")

 

error

location of a GError, or NULL if no error occured

 

first_property_name

The name of the first property to be set on the object

 

...

The NULL-terminated list of properties to set on the transmitter

 

Returns

The object created (or NULL if there is an error).

[transfer full]


FS_INIT_PLUGIN()

#define             FS_INIT_PLUGIN(type_register_func)

This macro is used to declare Farstream plugins and must be used once in any farstream plugin.

Parameters

type_register_func

A function that register a GType and returns it

 

fs_plugin_list_available ()

gchar **
fs_plugin_list_available (const gchar *type_suffix);

Gets the list of all available plugins of a certain type

Parameters

type_suffix

Get list of plugins with this type suffix

 

Returns

a newly allocated NULL terminated array of strings or NULL if no strings were found. It should be freed with g_strfreev().

[transfer full]

Types and Values

struct FsPlugin

struct FsPlugin {
  GTypeModule parent;
};

This structure represents a plugin, it is opaque.

Members

GTypeModule parent;

the parent object

 
farstream-0.2.7/docs/libs/html/index.html0000664000076400007640000001055412462323000015256 00000000000000 Farstream Reference Manual: Farstream Reference Manual

for version 0.2.7. The latest version of this documentation can be found on-line at http://www.freedesktop.org/software/farstream/apidoc/farstream/. The bases classes are implemented by multiple plugins described in the Farstream Plugins Manual.


I. User-oriented classes, interfaces and functions
Farstream Core Library
FsConference — Interface for farstream conference elements
FsParticipant — A participant in a conference
FsSession — A session in a conference
FsStream — A stream in a session in a conference
FsCandidate — Structure describing a transport candidate.
FsCodec — Structure representing a media codec
Protocol Specific types
RTP Specific types
Farstream Utility Functions and Objects
FsElementAddedNotifier — Recursive element addition notifier
Utility functions — Miscellaneous useful functions
II. Classes used to implement Farstream plugins
Farstream Transmitter Classes
FsTransmitter — A transmitter object linked to a session
FsStreamTransmitter — A stream transmitter object used to convey per-stream information to a transmitter.
Farstream Plugins Infrastructure
FsPlugin — A class for defining Farstream plugins
farstream-0.2.7/docs/libs/html/home.png0000644000076400007640000000040012462323000014702 00000000000000PNG  IHDRabKGD pHYs B(xtIME &IDAT8ҽ Aߞf`n v`6`/`Yܡ`f&k$,} 0b+ԸaQW~b O e{y N[L}.piBzmm o.I]7^[;%:VIENDB`farstream-0.2.7/docs/libs/html/ch02.html0000664000076400007640000000362312462323000014702 00000000000000 Farstream Reference Manual: Protocol Specific types

Protocol Specific types

farstream-0.2.7/docs/libs/html/FsTransmitter.html0000664000076400007640000006714512462323000016764 00000000000000 Farstream Reference Manual: FsTransmitter

FsTransmitter

FsTransmitter — A transmitter object linked to a session

Properties

guint components Read / Write / Construct Only
gboolean do-timestamp Read / Write
GstElement * gst-sink Read
GstElement * gst-src Read
guint tos Read / Write

Signals

void error Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── FsTransmitter

Includes

#include <farstream/fs-transmitter.h>

Description

This object is the base implementation of a Farstream Transmitter. It needs to be derived and implement by a Farstream transmitter. A Farstream Transmitter provides a GStreamer network sink and source to be used for the Farstream Session. It creates FsStreamTransmitter objects which are used to set the different per-stream properties

Functions

fs_transmitter_new ()

FsTransmitter *
fs_transmitter_new (const gchar *type,
                    guint components,
                    guint tos,
                    GError **error);

This function creates a new transmitter of the requested type. It will load the appropriate plugin as required.

Parameters

type

The type of transmitter to create

 

components

The number of components to create

 

tos

The Type of Service of the socket, max is 255

 

error

location of a GError, or NULL if no error occured

 

Returns

a newly-created FsTransmitter of the requested type (or NULL if there is an error)


fs_transmitter_new_stream_transmitter ()

FsStreamTransmitter *
fs_transmitter_new_stream_transmitter (FsTransmitter *transmitter,
                                       FsParticipant *participant,
                                       guint n_parameters,
                                       GParameter *parameters,
                                       GError **error);

This function will create a new FsStreamTransmitter element for a specific participant for this FsTransmitter

Parameters

transmitter

a FsTranmitter

 

participant

the FsParticipant for which the FsStream using this new FsStreamTransmitter is created

 

n_parameters

The number of parameters to pass to the newly created FsStreamTransmitter

 

parameters

an array of GParameter

 

error

location of a GError, or NULL if no error occured

 

Returns

a new FsStreamTransmitter, or NULL if there is an error.

[transfer full]


fs_transmitter_get_stream_transmitter_type ()

GType
fs_transmitter_get_stream_transmitter_type
                               (FsTransmitter *transmitter);

This function returns the GObject type for the stream transmitter. This is meant for bindings that need to introspect the type of arguments that can be passed to the _new_stream_transmitter.

Parameters

transmitter

A FsTransmitter object

 

Returns

the GType


fs_transmitter_emit_error ()

void
fs_transmitter_emit_error (FsTransmitter *transmitter,
                           gint error_no,
                           const gchar *error_msg);

This function emit the "error" signal on a FsTransmitter, it should only be called by subclasses.

Parameters

transmitter

FsTransmitter on which to emit the error signal

 

error_no

The number of the error

 

error_msg

Error message to be displayed to user

 

fs_transmitter_list_available ()

char **
fs_transmitter_list_available (void);

Get the list of all available transmitters

Returns

a newly allocated array of strings containing the list of all available transmitters or NULL if there are none. It should be freed with g_strfreev().

[transfer full]

Types and Values

struct FsTransmitter

struct FsTransmitter;

All members are private, access them using methods and properties


struct FsTransmitterClass

struct FsTransmitterClass {
  GObjectClass parent_class;

  /*virtual functions */
  FsStreamTransmitter *(*new_stream_transmitter) (FsTransmitter *transmitter,
                                                  FsParticipant *participant,
                                                  guint n_parameters,
                                                  GParameter *parameters,
                                                  GError **error);
  GType (*get_stream_transmitter_type) (FsTransmitter *transmitter);
};

You must override both methods in a subclass.

Members

GObjectClass parent_class;

Our parent

 

new_stream_transmitter ()

Creates a new FsStreamTransmitter

 

get_stream_transmitter_type ()

Returns the GType of the stream transmitter created by this class (useful for bindings)

 

Property Details

The “components” property

  “components”               guint

The number of components to create

Flags: Read / Write / Construct Only

Allowed values: [1,255]

Default value: 1


The “do-timestamp” property

  “do-timestamp”             gboolean

Apply current stream time to buffers or provide buffers without timestamps. Must be set before creating a stream transmitter.

Flags: Read / Write

Default value: TRUE


The “gst-sink” property

  “gst-sink”                 GstElement *

A network source GstElement to be used by the FsSession These element's sink must have async=FALSE This element MUST provide a pad named "sink_%u" per component. These pads number must start at 1 (the %u corresponds to the component number). These pads MUST be static pads.

Flags: Read


The “gst-src” property

  “gst-src”                  GstElement *

A network source GstElement to be used by the FsSession This element MUST provide a source pad named "src_u" per component. These pads number must start at 1 (the u corresponds to the component number). These pads MUST be static pads.

Flags: Read


The “tos” property

  “tos”                      guint

Sets the IP ToS field (and if possible the IPv6 TCLASS field

Flags: Read / Write

Allowed values: <= 255

Default value: 0

Signal Details

The “error” signal

void
user_function (FsTransmitter *self,
               FsError        errorno,
               gchar         *error_msg,
               gpointer       user_data)

This signal is emitted in any error condition

Parameters

self

FsTransmitter that emitted the signal

 

errorno

The number of the error

 

error_msg

Error message to be displayed to user

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

farstream-0.2.7/docs/libs/html/ch05.html0000664000076400007640000000364112462323000014705 00000000000000 Farstream Reference Manual: Farstream Plugins Infrastructure

Farstream Plugins Infrastructure

FsPlugin — A class for defining Farstream plugins
farstream-0.2.7/docs/libs/html/farstream-libs-FsCodec.html0000664000076400007640000017453012462323000020373 00000000000000 Farstream Reference Manual: FsCodec

FsCodec

FsCodec — Structure representing a media codec

Types and Values

Includes

#include <farstream/fs-conference.h>

Description

An FsCodec is a way to exchange codec information between the client and Farstream. The information specified in this structure is usually representative of the codec information exchanged in the signaling.

Functions

FS_CODEC_ID_ANY

#define FS_CODEC_ID_ANY            (-1)

If the id of a FsCodec is FS_CODEC_ID_ANY, then it will be replaced with a dynamic payload type at runtime


FS_CODEC_ID_DISABLE

#define FS_CODEC_ID_DISABLE        (-2)

If the id of a FsCodec is FS_CODEC_ID_DISABLE, then this codec will not be used


fs_codec_new ()

FsCodec *
fs_codec_new (int id,
              const char *encoding_name,
              FsMediaType media_type,
              guint clock_rate);

Allocates and initializes a FsCodec structure

Parameters

id

codec identifier, if RTP this should be based on IETF RTP payload types

 

encoding_name

Name of media type this encodes

 

media_type

FsMediaType for type of codec

 

clock_rate

The clock rate this codec encodes at, if applicable

 

Returns

A newly allocated FsCodec


fs_codec_destroy ()

void
fs_codec_destroy (FsCodec *codec);

Deletes a FsCodec structure and all its data. Is a no-op on NULL codec

Parameters

codec

FsCodec structure to free

 

fs_codec_copy ()

FsCodec *
fs_codec_copy (const FsCodec *codec);

Copies a FsCodec structure.

Parameters

codec

codec to copy

 

Returns

a copy of the codec


fs_codec_are_equal ()

gboolean
fs_codec_are_equal (const FsCodec *codec1,
                    const FsCodec *codec2);

Compare two codecs, it will declare two codecs to be identical even if their optional parameters are in a different order. NULL encoding names are ignored.

Parameters

codec1

First codec

 

codec2

Second codec

 

Returns

TRUE of the codecs are identical, FALSE otherwise


fs_codec_list_from_keyfile ()

GList *
fs_codec_list_from_keyfile (const gchar *filename,
                            GError **error);

Reads the content of a GKeyFile of the following format into a GList of FsCodec structures.

Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[audio/codec1]
clock-rate=8000

[audio/codec1:1]
clock-rate=16000

[audio/codec2]
one_param=QCIF
another_param=WOW

[video/codec3]
wierd_param=42
feedback:nack/pli=1
feedback:tfrc=

Parameters

filename

Name of the GKeyFile to read the codecs parameters from

 

error

location of a GError, or NULL if no error occured

 

Returns

The GList of FsCodec or NULL if the keyfile was empty or an error occured.

[element-type FsCodec][transfer full]


fs_codec_list_destroy ()

void
fs_codec_list_destroy (GList *codec_list);

Deletes a list of FsCodec structures and the list itself. Does nothing on NULL lists.

Parameters

codec_list

a GList of FsCodec to delete

 

fs_codec_list_copy ()

GList *
fs_codec_list_copy (const GList *codec_list);

Copies a list of FsCodec structures.

Parameters

codec_list

a GList of FsCodec to copy.

[transfer none][element-type FsCodec]

Returns

The new list.

[element-type FsCodec][transfer full]


fs_codec_list_are_equal ()

gboolean
fs_codec_list_are_equal (GList *list1,
                         GList *list2);

Verifies if two glist of fscodecs are identical

Parameters

list1

a GList of FsCodec.

[element-type FsCodec][allow-none]

list2

a GList of FsCodec.

[element-type FsCodec][allow-none]

Returns

TRUE if they are identical, FALSE otherwise


fs_codec_to_string ()

gchar *
fs_codec_to_string (const FsCodec *codec);

Returns a newly-allocated string representing the codec

Parameters

codec

A farstream codec

 

Returns

the newly-allocated string


fs_codec_add_optional_parameter ()

void
fs_codec_add_optional_parameter (FsCodec *codec,
                                 const gchar *name,
                                 const gchar *value);

This function adds an new optional parameter to a FsCodec

Parameters

codec

The FsCodec to add the parameter to

 

name

The name of the optional parameter

 

value

The extra_params of the optional parameter

 

fs_codec_remove_optional_parameter ()

void
fs_codec_remove_optional_parameter (FsCodec *codec,
                                    FsCodecParameter *param);

Removes an optional parameter from a codec.

NULL param will do nothing.

Parameters

codec

a FsCodec

 

param

a pointer to the FsCodecParameter to remove

 

fs_codec_get_optional_parameter ()

FsCodecParameter *
fs_codec_get_optional_parameter (FsCodec *codec,
                                 const gchar *name,
                                 const gchar *value);

Finds the FsCodecParameter in the FsCodec that has the requested name and, if not NULL, the requested value

Parameters

codec

a FsCodec

 

name

The name of the parameter to search for

 

value

The value of the parameter to search for or NULL for any value.

[allow-none]

Returns

the FsCodecParameter from the FsCodec or NULL.

[transfer none]


fs_codec_parameter_copy ()

FsCodecParameter *
fs_codec_parameter_copy (const FsCodecParameter *param);

Makes a copy of a FsCodecParameter

Parameters

param

a FsCodecParameter

 

Returns

a newly allocated FsCodecParameter


fs_codec_parameter_free ()

void
fs_codec_parameter_free (FsCodecParameter *param);

Frees a FsCodecParameter

Parameters

param

a FsCodecParameter to free

 

fs_codec_add_feedback_parameter ()

void
fs_codec_add_feedback_parameter (FsCodec *codec,
                                 const gchar *type,
                                 const gchar *subtype,
                                 const gchar *extra_params);

This function adds an new feedback parameter to a FsCodec

Parameters

codec

The FsCodec to add the parameter to

 

type

The type of the feedback parameter

 

subtype

The subtype of the feedback parameter

 

extra_params

The extra_params of the feeback parameter

 

fs_codec_get_feedback_parameter ()

FsFeedbackParameter *
fs_codec_get_feedback_parameter (FsCodec *codec,
                                 const gchar *type,
                                 const gchar *subtype,
                                 const gchar *extra_params);

Finds the FsFeedbackParameter in the FsCodec that has the requested subtype, type and extra_params. One of which must be non-NULL;

Parameters

codec

a FsCodec

 

type

The subtype of the parameter to search for or NULL for any type.

[allow-none]

subtype

The subtype of the parameter to search for or NULL for any subtype.

[allow-none]

extra_params

The extra_params of the parameter to search for or NULL for any extra_params.

[allow-none]

Returns

the FsFeedbackParameter from the FsCodec or NULL


fs_codec_remove_feedback_parameter ()

void
fs_codec_remove_feedback_parameter (FsCodec *codec,
                                    GList *item);

Removes an optional parameter from a codec.

NULL param will do nothing.

Parameters

codec

a FsCodec

 

item

a pointer to the GList element to remove that contains a FsFeedbackParameter.

[transfer none][element-type FsFeedbackParameter]

fs_feedback_parameter_copy ()

FsFeedbackParameter *
fs_feedback_parameter_copy (const FsFeedbackParameter *param);

Makes a copy of a FsFeedbackParameter

Parameters

param

a FsFeedbackParameter

 

Returns

a newly allocated FsFeedbackParameter


fs_feedback_parameter_free ()

void
fs_feedback_parameter_free (FsFeedbackParameter *param);

Frees a FsFeedbackParameter

Parameters

param

a FsFeedbackParameter to free

 

FS_CODEC_ARGS()

#define             FS_CODEC_ARGS(codec)

Formats the codec in args for FS_CODEC_FORMAT

Parameters

codec

a FsCodec

 

fs_media_type_to_string ()

const gchar *
fs_media_type_to_string (FsMediaType media_type);

Gives a user-printable string representing the media type

Parameters

media_type

A media type

 

Returns

a static string representing the media type

Types and Values

struct FsCodec

struct FsCodec {
  gint id;
  char *encoding_name;
  FsMediaType media_type;
  guint clock_rate;
  guint channels;
  guint minimum_reporting_interval;
  GList *optional_params;
  GList *feedback_params;
};

This structure reprensents one codec that can be offered or received

Members

gint id;

numeric identifier for encoding, eg. PT for SDP

 

char *encoding_name;

the name of the codec

 

FsMediaType media_type;

type of media this codec is for

 

guint clock_rate;

clock rate of this stream

 

guint channels;

Number of channels codec should decode

 

guint minimum_reporting_interval;

The minimum interval between two RTCP reports, If it is not specified (G_MAXUINT), it is up to the protocol to decide (it is 5 seconds for RTP).

 

GList *optional_params;

key pairs of param name to param data.

[element-type FsCodecParameter]

GList *feedback_params;

key triplets of feedbck param type, subtype and extra string that is supported for this codec.

[element-type FsFeedbackParameter]

enum FsMediaType

Enum used to signify the media type of a codec or stream.

Members

FS_MEDIA_TYPE_AUDIO

A media type that encodes audio.

 

FS_MEDIA_TYPE_VIDEO

A media type that encodes video.

 

FS_MEDIA_TYPE_APPLICATION

A media type for application data.

 

FS_MEDIA_TYPE_LAST

Largest valid FsMediaType

 

struct FsCodecParameter

struct FsCodecParameter {
    gchar *name;
    gchar *value;
};

Used to store arbitary parameters for a codec

Members

gchar *name;

paramter name.

 

gchar *value;

parameter value.

 

struct FsFeedbackParameter

struct FsFeedbackParameter {
  gchar *type;
  gchar *subtype;
  gchar *extra_params;
};

Use to store feedback parameters

Members

gchar *type;

the type of feedback, like "ack", "name", "ccm"

 

gchar *subtype;

the subtype of feedback (can be an empty string)

 

gchar *extra_params;

a string containing extra parameters (can be empty)

 

FS_CODEC_FORMAT

#define FS_CODEC_FORMAT "%d: %s %s clock:%d channels:%d params:%p"

A format that can be used in printf like format strings to format a FsCodec

farstream-0.2.7/docs/libs/html/index.sgml0000664000076400007640000010030612462323000015247 00000000000000 farstream-0.2.7/docs/libs/html/ch03.html0000664000076400007640000000423412462323000014702 00000000000000 Farstream Reference Manual: Farstream Utility Functions and Objects

Farstream Utility Functions and Objects

FsElementAddedNotifier — Recursive element addition notifier
Utility functions — Miscellaneous useful functions
farstream-0.2.7/docs/libs/html/farstream-libs-RTP-Specific-types.html0000664000076400007640000006561612462323000022423 00000000000000 Farstream Reference Manual: RTP Specific types

RTP Specific types

RTP Specific types

Includes

#include <farstream/fs-rtp.h>

Description

Functions

fs_rtp_header_extension_new ()

FsRtpHeaderExtension *
fs_rtp_header_extension_new (guint id,
                             FsStreamDirection direction,
                             const gchar *uri);

Creates a new FsRtpHeaderExtension

Parameters

id

The identifier of the RTP header extension

 

direction

the direction in which this extension can be used

 

uri

The URI that defines this extension

 

Returns

a new FsRtpHeaderExtension


fs_rtp_header_extension_copy ()

FsRtpHeaderExtension *
fs_rtp_header_extension_copy (FsRtpHeaderExtension *extension);

Copies a FsRtpHeaderExtension

Parameters

extension

The RTP header extension definition to copy

 

Returns

a new FsRtpHeaderExtension


fs_rtp_header_extension_destroy ()

void
fs_rtp_header_extension_destroy (FsRtpHeaderExtension *extension);

Frees the passed FsRtpHeaderExtension

Parameters

extension

A RTP header extension to free

 

fs_rtp_header_extension_are_equal ()

gboolean
fs_rtp_header_extension_are_equal (FsRtpHeaderExtension *extension1,
                                   FsRtpHeaderExtension *extension2);

Compares two FsRtpHeaderExtension structures

Parameters

extension1

The first FsRtpHeaderExtension

 

extension2

The second FsRtpHeaderExtension

 

Returns

TRUE if they are identical, FALSE otherwise


fs_rtp_header_extension_list_copy ()

GList *
fs_rtp_header_extension_list_copy (GList *extensions);

Does a deep copy of a GList of FsRtpHeaderExtension

Parameters

extensions

a GList of FsRtpHeaderExtension.

[element-type FsRtpHeaderExtension][transfer none]

Returns

a new GList of FsRtpHeaderExtension.

[element-type FsRtpHeaderExtension][transfer full]


fs_rtp_header_extension_list_destroy ()

void
fs_rtp_header_extension_list_destroy (GList *extensions);

Frees the passed GList of FsRtpHeaderExtension

Parameters

extensions

a GList of FsRtpHeaderExtension

 

fs_rtp_header_extension_list_from_keyfile ()

GList *
fs_rtp_header_extension_list_from_keyfile
                               (const gchar *filename,
                                FsMediaType media_type,
                                GError **error);

Reads the content of a GKeyFile of the following format into a GList of FsRtpHeaderExtension structures.

The groups have a format "rtp-hdrext:audio:XXX" or "rtp-hdrext:video:XXX" where XXX is a unique string (per media type).

The valid keys are:

  • id: a int between in the 1-255 and 4096-4351 ranges
  • uri: a URI describing the RTP Header Extension
  • direction (optional): To only send or receive a RTP Header Extension, possible values are "send", "receive", "none" or "both". Defaults to "both"

Example:

1
2
3
4
5
6
7
8
[rtp-hdrext:audio:a]
id=1
uri=urn:ietf:params:rtp-hdrext:toffset

[rtp-hdrext:audio:abc]
id=3
uri=urn:ietf:params:rtp-hdrext:ntp-64
direction=receive

Parameters

filename

Name of the GKeyFile to read the RTP Header Extensions from

 

media_type

The media type for which to get header extensions

 

error

location of a GError, or NULL if no error occured

 

Returns

a GList of FsRtpHeaderExtension that must be freed with fs_rtp_header_extension_list_destroy().

[element-type FsRtpHeaderExtension][transfer full]


FS_RTP_HEADER_EXTENSION_ARGS()

#define             FS_RTP_HEADER_EXTENSION_ARGS(hdrext)

Formats the codec in args for FS_RTP_HEADER_EXTENSION_ARGS

Parameters

hdrext

a FsRtpHeaderExtension

 

Types and Values

FsRtpHeaderExtension

typedef struct {
  guint id;
  FsStreamDirection direction;
  gchar *uri;
} FsRtpHeaderExtension;

Defines a RTP header extension with its negotiated identifier, direction and URI. They should only be created with fs_rtp_header_extension_new().

Members

guint id;

The identifier of the RTP header extension

 

FsStreamDirection direction;

the direction in which this extension can be used

 

gchar *uri;

The URI that defines this extension

 

FS_RTP_HEADER_EXTENSION_FORMAT

#define FS_RTP_HEADER_EXTENSION_FORMAT "%d: (%s) %s"

A format that can be used in printf like format strings to format a FsRtpHeaderExtension

farstream-0.2.7/docs/libs/html/right-insensitive.png0000644000076400007640000000056512462323000017441 00000000000000PNG  IHDRabKGD pHYs B(xtIME ^IDAT8͒J` /S_$AqrW(>m"]\(49.Nd39{eM#MSIιEiHz|3{̲l3,KkV'@EEQlwyiq]Kh4:mĦ,;ts\aR5/7'Wps׭I,K1=0j0Wg> PU𻤝0 ]?qCҫιg~kA_IENDB`farstream-0.2.7/docs/libs/html/FsConference.html0000664000076400007640000005456412462323000016520 00000000000000 Farstream Reference Manual: FsConference

FsConference

FsConference — Interface for farstream conference elements

Types and Values

struct FsConference
enum FsError

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBin
                    ╰── FsConference

Implemented Interfaces

FsConference implements GstChildProxy.

Includes

#include <farstream/fs-conference.h>

Description

A Farstream conference is a conversation space that takes place between 2 or more participants. Each conference must have one or more Farstream sessions that are associated to the conference participants.

This will communicate asynchronous events to the user through GstMessage of type GST_MESSAGE_ELEMENT sent over the GstBus.

The "farstream-error" message

1
2
3
"src-object"       #GObject           The object (#FsConference, #FsSession or #FsStream) that emitted the error
"error-no"         #FsError           The Error number
"error-msg"        #gchar*            The error message

The message is sent on asynchronous errors.

Functions

fs_conference_new_session ()

FsSession *
fs_conference_new_session (FsConference *conference,
                           FsMediaType media_type,
                           GError **error);

Create a new Farstream session for the given conference.

Parameters

conference

FsConference interface of a GstElement

 

media_type

FsMediaType of the new session

 

error

location of a GError, or NULL if no error occured

 

Returns

the new FsSession that has been created. The FsSession must be unref'd by the user when closing the session.

[transfer full]


fs_conference_new_participant ()

FsParticipant *
fs_conference_new_participant (FsConference *conference,
                               GError **error);

Create a new Farstream Participant for the type of the given conference.

Parameters

conference

FsConference interface of a GstElement

 

error

location of a GError, or NULL if no error occured

 

Returns

the new FsParticipant that has been created. The FsParticipant is owned by the user and he must unref it when he is done with it.

[transfer full]


FS_ERROR

#define FS_ERROR (fs_error_quark ())

This quark is used to denote errors coming from Farstream objects


FS_ERROR_IS_FATAL()

#define             FS_ERROR_IS_FATAL(error)

Tells the programmer if an error if fatal or not, if it returns TRUE, the error is fatal, and the object that created it should be discarded. It returns FALSE otherwise.

Parameters

error

a FsError

 

fs_parse_error ()

gboolean
fs_parse_error (GObject *object,
                GstMessage *message,
                FsError *error,
                const gchar **error_msg);

Parses a "farstream-farstream" message and checks if it matches the object parameters.

Parameters

object

a GObject to match against the message

 

message

a GstMessage to parse

 

error

Returns the FsError error number in the message if not NULL.

[out]

error_msg

Returns the error message if not NULL.

[out][transfer none]

Returns

TRUE if the message matches the object and is valid.

Types and Values

struct FsConference

struct FsConference;

The FsConference structure, all the members are private


enum FsError

This is the enum of error numbers that will come either on the "error" signal, from the Gst Bus or for error in the FS_ERROR domain in GErrors

Members

FS_ERROR_CONSTRUCTION

Error constructing some of the sub-elements, this probably denotes an error in the installation of the gstreamer elements. It is a fatal error.

 

FS_ERROR_INTERNAL

An internal error happened in Farstream, it may be in an inconsistent state. The object from which this error comes should be discarded.

 

FS_ERROR_INVALID_ARGUMENTS

Invalid arguments to the function, this is a programming error and should not be reported to the user

 

FS_ERROR_NETWORK

A network related error, this should probably be reported to the user.

 

FS_ERROR_NOT_IMPLEMENTED

The optional functionality is not implemented by this plugin.

 

FS_ERROR_NEGOTIATION_FAILED

The codec negotiation has failed, this means that there are no common codecs between the local and remote codecs.

 

FS_ERROR_UNKNOWN_CODEC

Data is received on an unknown codec, this most likely denotes an error on the remote side, the buffers will be ignored. It can safely be ignored in most cases (but may result in a call with no media received).

 

FS_ERROR_NO_CODECS

There are no codecs detected for that media type.

 

FS_ERROR_NO_CODECS_LEFT

All of the codecs have been disabled by the codec preferences, one should try less strict codec preferences.

 

FS_ERROR_CONNECTION_FAILED

Could not connect to the to remote party.

 

FS_ERROR_DISPOSED

The object has been disposed.

 

FS_ERROR_ALREADY_EXISTS

The object already exists

 
farstream-0.2.7/docs/libs/html/ch01.html0000664000076400007640000000526612462323000014706 00000000000000 Farstream Reference Manual: Farstream Core Library

Farstream Core Library

FsConference — Interface for farstream conference elements
FsParticipant — A participant in a conference
FsSession — A session in a conference
FsStream — A stream in a session in a conference
FsCandidate — Structure describing a transport candidate.
FsCodec — Structure representing a media codec
farstream-0.2.7/docs/libs/html/ch04.html0000664000076400007640000000416312462323000014704 00000000000000 Farstream Reference Manual: Farstream Transmitter Classes

Farstream Transmitter Classes

FsTransmitter — A transmitter object linked to a session
FsStreamTransmitter — A stream transmitter object used to convey per-stream information to a transmitter.
farstream-0.2.7/docs/libs/html/up.png0000644000076400007640000000040412462323000014402 00000000000000PNG  IHDRabKGD pHYs B(xtIME IDAT81 @D{xa;$]r =JR1, Sd-}0̟oL:m-QO[ k TzMޠL,:ךu!tK; Pp Ot@l/̵*l}IENDB`farstream-0.2.7/docs/libs/html/FsStream.html0000664000076400007640000017330612462323000015700 00000000000000 Farstream Reference Manual: FsStream

FsStream

FsStream — A stream in a session in a conference

Properties

FsCodecGList * current-recv-codecs Read
GstStructure * decryption-parameters Read
FsStreamDirection direction Read / Write / Construct
FsCodecGList * negotiated-codecs Read
FsParticipant * participant Read / Write / Construct Only
FsCodecGList * remote-codecs Read
FsSession * session Read / Write / Construct Only

Signals

void error Run Last
void src-pad-added Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── FsStream

Includes

#include <farstream/fs-conference.h>

Description

This object is the base implementation of a Farstream Stream. It needs to be derived and implemented by a Farstream conference GStreamer element. A Farstream Stream is a media stream originating from a FsParticipant inside a FsSession. In fact, a FsStream instance is obtained by adding a participant into a session using fs_session_new_stream().

This will communicate asynchronous events to the user through GstMessage of type GST_MESSAGE_ELEMENT sent over the GstBus.

The "farstream-new-local-candidate" message

1
2
"stream"           #FsStream          The stream that emits the message
"candidate"        #FsCandidate       The new candidate

This message is emitted when a new local candidate is discovered.


The "farstream-local-candidates-prepared" message

1
"stream"           #FsStream          The stream that emits the message

This signal is emitted when all local candidates have been prepared, an ICE implementation would send its SDP offer or answer.


The "farstream-new-active-candidate-pair" message

1
2
3
"stream"           #FsStream          The stream that emits the message
"local-candidate"  #FsCandidate       Local candidate being used
"remote-candidate" #FsCandidate       Remote candidate being used

This message is emitted when there is a new active candidate pair that has been established. This is specially useful for ICE where the active candidate pair can change automatically due to network conditions. The user must not modify the candidates and must copy them if he wants to use them outside the callback scope. This message is emitted once per component.


The "farstream-recv-codecs-changed" message

1
2
"stream"           #FsStream          The stream that emits the message
"codecs"           #FsCodecGList      A #GList of #FsCodec

This message is emitted when the content of the “current-recv-codecs” property changes. It is normally emitted right after the “src-pad-added” signal only if that codec was not previously received in this stream, but it can also be emitted if the pad already exists, but the source material that will come to it is different. The list of new recv-codecs is included in the message


The "farstream-component-state-changed" message

1
2
3
"stream"           #FsStream          The stream that emits the message
"component"        #guint             The component whose state changed
"state"            #FsStreamState     The new state of the component

This message is emitted the state of a component of a stream changes.

Functions

fs_stream_set_transmitter ()

gboolean
fs_stream_set_transmitter (FsStream *stream,
                           const gchar *transmitter,
                           GParameter *stream_transmitter_parameters,
                           guint stream_transmitter_n_parameters,
                           GError **error);

Set the transmitter to use for this stream. This function will only succeed once.

The parameters correspond to the varios GObject properties of the selected stream transmitter.

Parameters

stream

a FsStream

 

transmitter

Name of the type of transmitter to use for this stream

 

stream_transmitter_n_parameters

Number of parametrs passed to the stream transmitter

 

stream_transmitter_parameters

an array of n_parameters GParameter struct that will be passed to the newly-create FsStreamTransmitter.

[array length=stream_transmitter_n_parameters][allow-none]

error

location of a GError, or NULL if no error occured

 

Returns

TRUE if the transmitter could be set, FALSE otherwise


fs_stream_set_transmitter_ht ()

gboolean
fs_stream_set_transmitter_ht (FsStream *stream,
                              const gchar *transmitter,
                              GHashTable *stream_transmitter_parameters,
                              GError **error);

Set the transmitter to use for this stream. This function will only succeed once.

The parameters correspond to the varios GObject properties of the selected stream transmitter.

This is the same as fs_stream_set_transmitter() except that the parameters are passed in a GHashTable to make it more friendly to GObject introspection

Parameters

stream

a FsStream

 

transmitter

Name of the type of transmitter to use for this stream

 

stream_transmitter_parameters

A GHashTable of string->GValue containing the parameters.

[element-type utf8 GValue][allow-none]

error

location of a GError, or NULL if no error occured

 

Returns

TRUE if the transmitter could be set, FALSE otherwise


fs_stream_add_remote_candidates ()

gboolean
fs_stream_add_remote_candidates (FsStream *stream,
                                 GList *candidates,
                                 GError **error);

This function adds remote candidates. Any new candidates are added to the list. The candidates will be used to establish a connection with the peer. A copy will be made so the user must free the passed candidate using fs_candidate_destroy() when done.

Parameters

stream

an FsStream

 

candidates

an GList of FsCandidate representing the remote candidates.

[element-type FsCandidate]

error

location of a GError, or NULL if no error occured

 

Returns

TRUE if the candidate was valid, FALSE otherwise


fs_stream_set_remote_codecs ()

gboolean
fs_stream_set_remote_codecs (FsStream *stream,
                             GList *remote_codecs,
                             GError **error);

This function will set the list of remote codecs for this stream. If the given remote codecs couldn't be negotiated with the list of local codecs or already negotiated codecs for the corresponding FsSession, error will be set and FALSE will be returned. The remote_codecs list will be copied so it must be free'd using fs_codec_list_destroy() when done.

Parameters

stream

a FsStream

 

remote_codecs

a GList of FsCodec representing the remote codecs.

[element-type FsCodec]

error

location of a GError, or NULL if no error occured

 

Returns

FALSE if the remote codecs couldn't be set.


fs_stream_force_remote_candidates ()

gboolean
fs_stream_force_remote_candidates (FsStream *stream,
                                   GList *remote_candidates,
                                   GError **error);

This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component.

Parameters

stream

a FsStream

 

remote_candidates

a GList of FsCandidate to force.

[element-type FsCandidate]

error

location of a GError, or NULL if no error occured

 

Returns

TRUE if the candidates could be forced, FALSE otherwise


fs_stream_set_decryption_parameters ()

gboolean
fs_stream_set_decryption_parameters (FsStream *stream,
                                     GstStructure *parameters,
                                     GError **error);

Sets decryption parameters. The exact parameters depend on the type of plugin being used.

Parameters

stream

a FsStream

 

parameters

a GstStructure containing the decryption parameters.

[transfer none]

error

the location where to store a GError or NULL

 

Returns

TRUE if the decryption parameters could be set, FALSE otherwise

Since UNRELEASED


fs_stream_destroy ()

void
fs_stream_destroy (FsStream *stream);

This will cause the stream to remove all links to other objects and to remove itself from the FsSession. Once a FsStream has been destroyed, it can not be used anymore.

It is strongly recommended to call this function from the main thread because releasing the application's reference to a stream.

Parameters

stream

a FsStream

 

fs_stream_iterate_src_pads ()

GstIterator *
fs_stream_iterate_src_pads (FsStream *stream);

Creates a GstIterator that can be used to iterate the src pads of this stream. These are the pads that were announced by “src-pad-added” and are still valid.

Parameters

stream

a FsStream

 

Returns

The GstIterator.

[transfer full]


fs_stream_add_id ()

void
fs_stream_add_id (FsStream *stream,
                  guint id);

This function is used to add data identifiers that allow the plugin to recognize packets that are meant for id. For example, in RTP, one would set the SSRCs that are expected.

Depending on the protocol, one may be able to add more than one ID to a stream (in RTP you can have multiple SSRCs in a stream). If a protocol supports only one id, adding a new one will overwrite it. If an ID was already set on a stream, adding it to another stream will override the previdous decision.

For most protocols, calling this function is optional as the incoming data can be matched with a stream by its source IP address. This is mostly useful if one is using multicast or is behind a muxer server.

Parameters

stream

a FsStream

 

id

The id to add to the stream

 

fs_stream_emit_error ()

void
fs_stream_emit_error (FsStream *stream,
                      gint error_no,
                      const gchar *error_msg);

This function emits the “error”" signal, it should only be called by subclasses.

Parameters

stream

FsStream on which to emit the error signal

 

error_no

The number of the error

 

error_msg

Error message to be displayed to user

 

fs_stream_emit_src_pad_added ()

void
fs_stream_emit_src_pad_added (FsStream *stream,
                              GstPad *pad,
                              FsCodec *codec);

Emits the “src-pad-added”" signal, it should only be called by subclasses.

Parameters

stream

FsStream on which to emit the src-pad-added signal

 

pad

the GstPad that this FsStream has created

 

codec

The FsCodec for this pad

 

Types and Values

struct FsStream

struct FsStream;

All members are private, access them using methods and properties


struct FsStreamClass

struct FsStreamClass {
  GObjectClass parent_class;

  /*virtual functions */
  gboolean (*add_remote_candidates) (FsStream *stream,
                                     GList *candidates,
                                     GError **error);

  gboolean (*force_remote_candidates) (FsStream *stream,
      GList *remote_candidates,
      GError **error);

  gboolean (*set_remote_codecs) (FsStream *stream,
                                 GList *remote_codecs, GError **error);

  void (*add_id) (FsStream *stream,
                  guint id);

  gboolean (*set_transmitter) (FsStream *stream,
      const gchar *transmitter,
      GParameter *stream_transmitter_parameters,
      guint stream_transmitter_n_parameters,
      GError **error);

  gboolean (* set_decryption_parameters) (FsStream *stream,
      GstStructure *parameters, GError **error);
};

You must override add_remote_candidate in a subclass. If you have to negotiate codecs, then you must override set_remote_codecs too

Members

GObjectClass parent_class;

Our parent

 

add_remote_candidates ()

Set sthe remote candidates

 

force_remote_candidates ()

Forces certain remote candidates

 

set_remote_codecs ()

Sets the list of remote codecs

 

add_id ()

Add a known id to be associated with this stream

 

set_transmitter ()

Set the transmitter to use for this stream

 

set_decryption_parameters ()

Set decryption parameters

 

enum FsStreamDirection

An enum for specifying the direction of a stream

Members

FS_DIRECTION_NONE

No direction specified

 

FS_DIRECTION_SEND

Send only

 

FS_DIRECTION_RECV

Receive only

 

FS_DIRECTION_BOTH

Send and receive

 

enum FsStreamState

These are the possible states of a stream, a simple multicast stream could only be in "disconnected" or "ready" state. An stream using an ICE transmitter would use all of these.

Members

FS_STREAM_STATE_FAILED

connectivity checks have been completed, but connectivity was not established

 

FS_STREAM_STATE_DISCONNECTED

no activity scheduled

 

FS_STREAM_STATE_GATHERING

gathering local candidates

 

FS_STREAM_STATE_CONNECTING

establishing connectivity

 

FS_STREAM_STATE_CONNECTED

at least one working candidate pair

 

FS_STREAM_STATE_READY

ICE concluded, candidate pair selection is now final

 

Property Details

The “current-recv-codecs” property

  “current-recv-codecs”      FsCodecGList *

A GList of FsCodec representing the codecs that have been received.

Flags: Read


The “decryption-parameters” property

  “decryption-parameters”    GstStructure *

Retrieves previously set decryption parameters

Flags: Read


The “direction” property

  “direction”                FsStreamDirection

The direction of the stream. This property is set initially as a parameter to the fs_session_new_stream() function. It can be changed later if required by setting this property.

Flags: Read / Write / Construct


The “negotiated-codecs” property

  “negotiated-codecs”        FsCodecGList *

A GList of FsCodecs of the negotiated codecs for this stream.

Flags: Read


The “participant” property

  “participant”              FsParticipant *

The FsParticipant for this stream. This property is a construct param and is read-only construction.

Flags: Read / Write / Construct Only


The “remote-codecs” property

  “remote-codecs”            FsCodecGList *

A GList of FsCodecs of the remote codecs.

Flags: Read


The “session” property

  “session”                  FsSession *

The FsSession for this stream. This property is a construct param and is read-only construction.

Flags: Read / Write / Construct Only

Signal Details

The “error” signal

void
user_function (FsStream *self,
               FsError   errorno,
               gchar    *error_msg,
               gpointer  user_data)

This signal is emitted in any error condition

Parameters

self

FsStream that emitted the signal

 

errorno

The number of the error

 

error_msg

Error message to be displayed to user

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “src-pad-added” signal

void
user_function (FsStream *self,
               GstPad   *pad,
               FsCodec  *codec,
               gpointer  user_data)

This signal is emitted when a new gst source pad has been created for a specific codec being received. There will be a different source pad for each codec that is received. The user must ref the GstPad if he wants to keep it. The user should not modify the FsCodec and must copy it if he wants to use it outside the callback scope.

This signal is not emitted on the main thread, but on GStreamer's streaming thread!

Parameters

self

FsStream that emitted the signal

 

pad

GstPad of the new source pad

 

codec

FsCodec of the codec being received on the new source pad

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

farstream-0.2.7/docs/libs/html/farstream-libs-Utility-functions.html0000664000076400007640000003165212462323000022533 00000000000000 Farstream Reference Manual: Utility functions

Utility functions

Utility functions — Miscellaneous useful functions

Includes

#include <farstream/fs-utils.h>

Description

Functions

fs_utils_set_bitrate ()

void
fs_utils_set_bitrate (GstElement *element,
                      glong bitrate);

This allows setting the bitrate on all elements that have a "bitrate" property without having to know the type or of the unit used by that element.

This will be obsolete in 0.11 (when all elements use bit/sec for the "bitrate" property.

Parameters

element

The GstElement

 

bitrate

The bitrate in bits/sec

 

fs_utils_get_default_codec_preferences ()

GList *
fs_utils_get_default_codec_preferences
                               (GstElement *element);

These default codec preferences should work with the elements that are available in the main GStreamer element repositories. They should be suitable for standards based protocols like SIP or XMPP.

Parameters

element

Element for which to fetch default codec preferences

 

Returns

The default codec preferences for this plugin. This GList should be freed with fs_codec_list_destroy().

[element-type FsCodec][transfer full]


fs_utils_get_default_element_properties ()

GKeyFile *
fs_utils_get_default_element_properties
                               (GstElement *element);

This function produces a GKeyFile that can be fed to fs_element_added_notifier_set_properties_from_keyfile(). If no default properties have been found, it will return NULL.

Parameters

element

Element for which to fetch default element properties

 

Returns

a GKeyFile containing the default element properties for this element or NULL if no properties were found. Caller must free the GKeyFile when he is done.


fs_utils_get_default_rtp_header_extension_preferences ()

GList *
fs_utils_get_default_rtp_header_extension_preferences
                               (GstElement *element,
                                FsMediaType media_type);

These default rtp header extension preferences should work with the elements that are available in the main GStreamer element repositories. They should be suitable for standards based protocols like SIP or XMPP.

Parameters

element

Element for which to fetch default RTP Header Extension preferences

 

media_type

The FsMediaType for which to get default RTP Header Extension preferences

 

Returns

The default rtp header extension preferences for this plugin, this GList should be freed with fs_codec_list_destroy().

[element-type FsCodec][transfer full]

Types and Values

farstream-0.2.7/docs/libs/html/left.png0000644000076400007640000000040612462323000014712 00000000000000PNG  IHDRabKGD pHYs B(xtIME,`m;IDAT8үa?DAPY\$[p+IIMlf('}Mpy{_ޥ}^q xZ <=Yj) <04\~+Pl#",Qϑp Iǐlsw>[/]_i03IENDB`farstream-0.2.7/docs/libs/farstream-libs-docs.sgml0000664000076400007640000000376612401500475017057 00000000000000 %version-entities; ]> Farstream Reference Manual for version &FS_VERSION;. The latest version of this documentation can be found on-line at http://www.freedesktop.org/software/farstream/apidoc/farstream/. The bases classes are implemented by multiple plugins described in the Farstream Plugins Manual. User-oriented classes, interfaces and functions Farstream Core Library Protocol Specific types Farstream Utility Functions and Objects Classes used to implement Farstream plugins Farstream Transmitter Classes Farstream Plugins Infrastructure farstream-0.2.7/docs/multi-party-negotiation.txt0000664000076400007640000000302411710041460016726 00000000000000Codec negotiation for multi-party conferencing ---------------------------------------------- RTP multi-party conferencing requires that all parties use the same list of codecs. There are three ways to ensure that. - Have a static pre-determined list of codecs and use it on all clients - Negotiate a common list in a centralised manner - Negotiated the common list in a decentralized manner Farstream supports the first two techniques, but not the third (which is a lot more complicated and error-prone). To use technique one, one just needs to call fs_stream_set_remote_codecs() with the same list of codecs on all streams (actually, on at least one stream per session). To use the second technique, one must designate a Focus, which will generate the list that every one node will use. The non-focus nodes will send their list of codecs to the Focus and accept whatever the focus sends them as a reply (and use that). The focus node will first receive a list of codecs from a node, and it will perform the normal negotiation (prefering the remote payload type), but when a second FsStream is added to the FsSession, the behavior of the codec negotiation changes and the only effect of setting remote codecs from other nodes will be to reduce the possible codecs to the common set (ie the intersection). If there is no intersection between the current pool of codecs (from the negotiation with the previous nodes) and the codecs added by a new participant in the session, this participant will be rejected and _set_remote_codecs() will fail. farstream-0.2.7/docs/Makefile.in0000664000076400007640000005377712462321046013457 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = docs DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/version.entities.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = version.entities CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = libs plugins EXTRA_DIST = \ codingstyle.txt \ multi-party-negotiation.txt \ nego-use-cases.txt all: all-recursive .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 docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/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): version.entities: $(top_builddir)/config.status $(srcdir)/version.entities.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ 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 installdirs: installdirs-recursive installdirs-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-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 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-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: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am 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-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-am uninstall uninstall-am # 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: farstream-0.2.7/docs/Makefile.am0000664000076400007640000000015611710041460013417 00000000000000 SUBDIRS = libs plugins EXTRA_DIST = \ codingstyle.txt \ multi-party-negotiation.txt \ nego-use-cases.txt farstream-0.2.7/docs/nego-use-cases.txt0000664000076400007640000001256411710041460014750 00000000000000Various use cases for codec negotiation ======================================= One-to-one ---------- Starting with an offer - Create session - Possibly set the codec-preferences - While codecs-ready property is false - wait until the codecs-changed message is emitted - Get list of codecs - Get codecs from FsSession and send them - Wait for reply - Set remote codecs on FsStream Replying to an offer - Create session - Possibly set codec-preferences - Set remote codecs - While codecs-ready property is false - wait until the codecs-changed message is emitted - Get list of codecs - Send reply Creating a new offer - Possibly set codec-preferences - While codecs-ready property is false - wait until the codecs-changed message is emitted - Get codecs from FsSession and send them - Wait for reply - Set remote codecs on FsStream Replying to a re-offer - Set remote codecs - While codecs-ready property is false - wait until the codecs-changed message is emitted - Get list of codecs from FsSession - Send reply Multi-party ----------- First, it starts with a single party call The conference master invites someone in a call - Possibly set codec-preferences - While codecs-ready property is false - wait until the codecs-changed message is emitted - Get codecs from FsSession and send them - Wait for reply - Set remote codecs on FsStream Someone asks the master to join a call - Set remote codecs - While codecs-ready property is false - wait until the codecs-changed message is emitted - Get list of codecs from FsSession - Get list of codecs from every other stream - Send reply with master codecs and codecs from every other stream - .. Or just get list of codecs from everyone (if using a presence based system) Goals ===== - Negotiated codecs should never change ids (or become incompatible) - In one-to-one, we should always prefer the remote codec id & params - In one-to-many, we should prefer our codec id and param - We have to keep a copy of the local and remote config-data - We have to produce list of codecs with the local and remote config-data - We must be able to extract config-data-less codecs for multicast/sip, but we must also be able to produce them with the config data for cooler ones How negotiation works now ========================= (I'M NOT CERTAIN THIS IS ACCURATE...) validate shall remove all config-data from preferred codecs the whole thing is ran whenever one of the parameters change (remote codecs, local codecs, local codecs config) out: codecs_with_config, codecs_without_config, new codecs in streams in: codec_preferences, blueprints, remote_streams with each its codecs, codecs_with_config FsCodec gets a list of config_data that is filled from optional_params by the codec specific negotiation function from the optional params of the local codec or the remote codec. CodecAssociation gets a two new markers.. one is "need-config" and the other is "recv-only".. Need-config means that we have to try to fetch config-data, "recv-only" means it should only be used by the list in the stream, not in the public list. There should also be a marker for "empty" associations create empty list of codec assocs foreach codec_preference: if its a disable-codec entry: ignore it else if its a "reserve-pt": add a "reserve-pt" marker to the the list else if there is a matching codec in the old codecs (is a sdp negotiable codec) with the same id: add it to the list with the id from the old codecs else if there is a matching blueprint: add the codec to the list with new id (not in already in existing list or preferred list or new list) foreach codec: if there is no pt number: attribute an allocated pt number to it foreach codec blueprint: if there is no matching codec already in the list if its not marked as disabled add a codec to the list with id from already existing codecs or find new id (not in already existing list or new list) Now we have a list of "local codecs" foreach stream that has remote codecs: create empty new_list foreach remote_codec: check if there is an existing assoc (in the list of "local codecs") in the list with the same id that matches or if there is a codec in the list that matches: add this code_assoc to the new_list with remote id if there is only one stream with codecs, otherwise take the local id else add id to list of known ids and process next codec replace list with new_list if the new list is empty: return failure Now we have the general codec intersection # for Tandberg and such that don't do SDP Offer-Answer properly foreach codec in the incoming list: if there is no codec with the same id in the new list: add the codec from the original list to the new list with a marker (and without config data) foreach id in the list of known ids: if there is nothing in the codec list: add a marker to the codec list # Distribute the codecs to each stream foreach stream that has remote codecs: create an empty list foreach negotiated codec (includes the one with a marker): check if there is a codec with the same id in the remote codecs if none found: check if there is a remote codec that matches add the codec with the remote codec config data to the list (possibly copying the marker) replace the list of remote codecs in the stream with the newly created list farstream-0.2.7/docs/codingstyle.txt0000664000076400007640000000556012401500475014460 00000000000000This page describes the Farstream coding style. Respect it or die. It is a copy of http://www.freedesktop.org/wiki/Software/Farstream/CodingStyle They should both be in sync Loosely based on GNU style C. Max line width 80. All long lines wrapped with 4 space indentation. Spaces after all procedural calls (includes macros). Function names and variables names use underscore word separators. All GObject methods are prefixed with the appropriate prefix for the object. Typenames are in camelcase. NO TABS! Base indent unit is 2 spaces. ==== Function prototypes ==== The first parameter is on the same line as the function only if the function is a method. static void farstream_rtp_stream_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); ==== Function declarations ==== The first parameter is on the same line as the function only if the function is a method. static void farstream_rtp_stream_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { } ==== If/else/while/for/do/struct/switch/etc ==== if (condition) { die (); } else { die (); } For blocks that only contain one statement, the opening/closing brackets can be omitted. But this can only be done if all the blocks in a statement contain only one statement. This is an ILLEGAL example : if (condition) die (); else { die (); die_again (); } ==== Breaks and boolean operators ==== if (self->priv->main_pipeline && src_in_pipeline || !self->priv->your_mama) { } ==== Pointer declarations ==== Type *var; ==== Switch ==== switch (var) { case 4: die (); break; case 5: die (); } ==== Casting ==== FarstreamRTPStream *self = (FarstreamRTPStream *) stream; ==== #includes ==== If you're going to #include "config.h", do that first, in case it defines things like "inline". Next, #include the header in which this .c file's API is declared. This guarantees that all public headers are self-contained. Next, #define any libc feature-test macros you need (_GNU_SOURCE etc.) and #include any C/POSIX standard library headers you need, in alphabetical order. Next, #include any headers you need from non-standard libraries (GLib, Gtk, GStreamer, ...) in alphabetical order. Finally, #include any private (non-installed) headers from the library or program you're writing. ==== Emacs mode ==== (defun farstream-c-mode () "C mode with farstream style" (interactive) (c-mode) (c-set-style "GNU") (setq tab-width 8) (setq indent-tabs-mode nil) (setq c-basic-offset 2) (setq c-tab-always-indent nil) (setq show-trailing-whitespace 't) (c-set-offset 'case-label 2) (c-set-offset 'arglist-intro 4) (c-set-offset 'statement-cont 4) (c-set-offset 'substatement-open 0) (c-set-offset 'arglist-cont-nonempty 4) (setq c-cleanup-list (quote (brace-else-brace brace-elseif-brace space-before-funcall))) ) farstream-0.2.7/docs/plugins/0000775000076400007640000000000012462323000013120 500000000000000farstream-0.2.7/docs/plugins/gtkdoc-scangobj-transmitters0000775000076400007640000012546512032661146020610 00000000000000#!/usr/bin/perl -w # -*- cperl -*- # # gtk-doc - GTK DocBook documentation generator. # Copyright (C) 1998 Damon Chaplin # # 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. # # # This gets information about object heirarchies and signals # by compiling a small C program. CFLAGS and LDFLAGS must be # set appropriately before running this script. # # NOTE: the lookup_signal_arg_names() function contains the argument names of # standard GTK signal handlers. This may need to be updated for new # GTK signals or Gnome widget signals. use Getopt::Long; unshift @INC, '/usr/share/gtk-doc/data'; require "gtkdoc-common.pl"; # Options # name of documentation module my $MODULE; my $OUTPUT_DIR; my $PRINT_VERSION; my $PRINT_HELP; my $TYPE_INIT_FUNC="g_type_init(); g_type_class_ref(G_TYPE_OBJECT)"; my $QUERY_CHILD_PROPERTIES; # --nogtkinit is deprecated, as it is the default now anyway. %optctl = (module => \$MODULE, types => \$TYPES_FILE, nogtkinit => \$NO_GTK_INIT, 'type-init-func' => \$TYPE_INIT_FUNC, 'query-child-properties' => \$QUERY_CHILD_PROPERTIES, 'output-dir' => \$OUTPUT_DIR, 'version' => \$PRINT_VERSION, 'help' => \$PRINT_HELP); GetOptions(\%optctl, "module=s", "types:s", "output-dir:s", "nogtkinit", "type-init-func:s", "query-child-properties:s", "version", "help"); if ($NO_GTK_INIT) { # Do nothing. This just avoids a warning. } if ($PRINT_VERSION) { print "1.10\n"; exit 0; } if (!$MODULE) { $PRINT_HELP = 1; } if ($PRINT_HELP) { print "gtkdoc-scangobj version 1.10\n"; print "\n--module=MODULE_NAME Name of the doc module being parsed"; print "\n--types=FILE The name of the file to store the types in"; print "\n--type-init-func=FUNC The init function to call instead of g_type_init ()"; print "\n--query-child-properties=FUNC A function that returns a list of child"; print "\n properties for a class"; print "\n--output-dir=DIRNAME The directory where the results are stored"; print "\n--version Print the version of this program"; print "\n--help Print this help\n"; exit 0; } $OUTPUT_DIR = $OUTPUT_DIR ? $OUTPUT_DIR : "."; $TYPES_FILE = $TYPES_FILE ? $TYPES_FILE : "$OUTPUT_DIR/$MODULE.types"; open (TYPES, $TYPES_FILE) || die "Cannot open $TYPES_FILE: $!\n"; open (OUTPUT, ">$MODULE-scan.c") || die "Cannot open $MODULE-scan.c: $!\n"; my $old_signals_filename = "$OUTPUT_DIR/$MODULE.signals"; my $new_signals_filename = "$OUTPUT_DIR/$MODULE.signals.new"; my $old_hierarchy_filename = "$OUTPUT_DIR/$MODULE.hierarchy"; my $new_hierarchy_filename = "$OUTPUT_DIR/$MODULE.hierarchy.new"; my $old_interfaces_filename = "$OUTPUT_DIR/$MODULE.interfaces"; my $new_interfaces_filename = "$OUTPUT_DIR/$MODULE.interfaces.new"; my $old_prerequisites_filename = "$OUTPUT_DIR/$MODULE.prerequisites"; my $new_prerequisites_filename = "$OUTPUT_DIR/$MODULE.prerequisites.new"; my $old_args_filename = "$OUTPUT_DIR/$MODULE.args"; my $new_args_filename = "$OUTPUT_DIR/$MODULE.args.new"; # write a C program to scan the types $includes = ""; @types = (); for () { if (/^#include/) { $includes .= $_; } elsif (/^gnome_keyring_item_info_get_type$/) { # HACK: This isn't really a GObject type so skip it. next; } elsif (/^%/) { next; } elsif (/^\s*$/) { next; } else { chomp; push @types, $_; } } $ntypes = @types + 1; print OUTPUT < #include #include #include #include EOT if ($includes) { print OUTPUT $includes; } else { for (@types) { print OUTPUT "extern GType $_ (void);\n"; } } if ($QUERY_CHILD_PROPERTIES) { print OUTPUT < #endif GType object_types[$ntypes]; static GType * get_object_types (void) { gint i = 0; FsTransmitter *trans; EOT for (@types) { print OUTPUT " trans = fs_transmitter_new(\"$_\",1, NULL);"; print OUTPUT <\\n%s::%s\\n%s\\n%s\\n%s\\n\\n", object_name, query_info.signal_name, ret_type_buffer, flags, buffer); } /* Returns the type name to use for a signal argument or return value, given the GtkType from the signal info. It also sets is_pointer to TRUE if the argument needs a '*' since it is a pointer. */ static const gchar * get_type_name (GType type, gboolean * is_pointer) { const gchar *type_name; *is_pointer = FALSE; type_name = g_type_name (type); switch (type) { case G_TYPE_NONE: case G_TYPE_CHAR: case G_TYPE_UCHAR: case G_TYPE_BOOLEAN: case G_TYPE_INT: case G_TYPE_UINT: case G_TYPE_LONG: case G_TYPE_ULONG: case G_TYPE_FLOAT: case G_TYPE_DOUBLE: case G_TYPE_POINTER: /* These all have normal C type names so they are OK. */ return type_name; case G_TYPE_STRING: /* A GtkString is really a gchar*. */ *is_pointer = TRUE; return "gchar"; case G_TYPE_ENUM: case G_TYPE_FLAGS: /* We use a gint for both of these. Hopefully a subtype with a decent name will be registered and used instead, as GTK+ does itself. */ return "gint"; case G_TYPE_BOXED: /* The boxed type shouldn't be used itself, only subtypes. Though we return 'gpointer' just in case. */ return "gpointer"; case G_TYPE_PARAM: /* A GParam is really a GParamSpec*. */ *is_pointer = TRUE; return "GParamSpec"; default: break; } /* For all GObject subclasses we can use the class name with a "*", e.g. 'GtkWidget *'. */ if (g_type_is_a (type, G_TYPE_OBJECT)) *is_pointer = TRUE; /* Also catch non GObject root types */ if (G_TYPE_IS_CLASSED (type)) *is_pointer = TRUE; /* All boxed subtypes will be pointers as well. */ if (g_type_is_a (type, G_TYPE_BOXED)) *is_pointer = TRUE; /* All pointer subtypes will be pointers as well. */ if (g_type_is_a (type, G_TYPE_POINTER)) *is_pointer = TRUE; /* But enums are not */ if (g_type_is_a (type, G_TYPE_ENUM) || g_type_is_a (type, G_TYPE_FLAGS)) *is_pointer = FALSE; return type_name; } static const gchar * get_gdk_event (const gchar * signal_name) { static const gchar *GbGDKEvents[] = { "button_press_event", "GdkEventButton", "button_release_event", "GdkEventButton", "motion_notify_event", "GdkEventMotion", "delete_event", "GdkEvent", "destroy_event", "GdkEvent", "expose_event", "GdkEventExpose", "key_press_event", "GdkEventKey", "key_release_event", "GdkEventKey", "enter_notify_event", "GdkEventCrossing", "leave_notify_event", "GdkEventCrossing", "configure_event", "GdkEventConfigure", "focus_in_event", "GdkEventFocus", "focus_out_event", "GdkEventFocus", "map_event", "GdkEvent", "unmap_event", "GdkEvent", "property_notify_event", "GdkEventProperty", "selection_clear_event", "GdkEventSelection", "selection_request_event", "GdkEventSelection", "selection_notify_event", "GdkEventSelection", "proximity_in_event", "GdkEventProximity", "proximity_out_event", "GdkEventProximity", "drag_begin_event", "GdkEventDragBegin", "drag_request_event", "GdkEventDragRequest", "drag_end_event", "GdkEventDragRequest", "drop_enter_event", "GdkEventDropEnter", "drop_leave_event", "GdkEventDropLeave", "drop_data_available_event", "GdkEventDropDataAvailable", "other_event", "GdkEventOther", "client_event", "GdkEventClient", "no_expose_event", "GdkEventNoExpose", "visibility_notify_event", "GdkEventVisibility", "window_state_event", "GdkEventWindowState", "scroll_event", "GdkEventScroll", NULL }; gint i; for (i = 0; GbGDKEvents[i]; i += 2) { if (!strcmp (signal_name, GbGDKEvents[i])) return GbGDKEvents[i + 1]; } return "GdkEvent"; } /* This returns argument names to use for some known GTK signals. It is passed a widget name, e.g. 'GtkCList' and a signal name, e.g. 'select_row' and it returns a pointer to an array of argument types and names. */ static const gchar ** lookup_signal_arg_names (const gchar * type, const gchar * signal_name) { /* Each arg array starts with the object type name and the signal name, and then signal arguments follow. */ static const gchar *GbArgTable[][16] = { {"GtkCList", "select_row", "gint row", "gint column", "GdkEventButton *event"}, {"GtkCList", "unselect_row", "gint row", "gint column", "GdkEventButton *event"}, {"GtkCList", "click_column", "gint column"}, {"GtkCList", "resize_column", "gint column", "gint width"}, {"GtkCList", "extend_selection", "GtkScrollType scroll_type", "gfloat position", "gboolean auto_start_selection"}, {"GtkCList", "scroll_vertical", "GtkScrollType scroll_type", "gfloat position"}, {"GtkCList", "scroll_horizontal", "GtkScrollType scroll_type", "gfloat position"}, {"GtkCTree", "tree_select_row", "GtkCTreeNode *node", "gint column"}, {"GtkCTree", "tree_unselect_row", "GtkCTreeNode *node", "gint column"}, {"GtkCTree", "tree_expand", "GtkCTreeNode *node"}, {"GtkCTree", "tree_collapse", "GtkCTreeNode *node"}, {"GtkCTree", "tree_move", "GtkCTreeNode *node", "GtkCTreeNode *new_parent", "GtkCTreeNode *new_sibling"}, {"GtkCTree", "change_focus_row_expansion", "GtkCTreeExpansionType expansion"}, {"GtkEditable", "insert_text", "gchar *new_text", "gint new_text_length", "gint *position"}, {"GtkEditable", "delete_text", "gint start_pos", "gint end_pos"}, {"GtkEditable", "set_editable", "gboolean is_editable"}, {"GtkEditable", "move_cursor", "gint x", "gint y"}, {"GtkEditable", "move_word", "gint num_words"}, {"GtkEditable", "move_page", "gint x", "gint y"}, {"GtkEditable", "move_to_row", "gint row"}, {"GtkEditable", "move_to_column", "gint column"}, {"GtkEditable", "kill_char", "gint direction"}, {"GtkEditable", "kill_word", "gint direction"}, {"GtkEditable", "kill_line", "gint direction"}, {"GtkInputDialog", "enable_device", "GdkDevice *deviceid"}, {"GtkInputDialog", "disable_device", "GdkDevice *deviceid"}, {"GtkListItem", "extend_selection", "GtkScrollType scroll_type", "gfloat position", "gboolean auto_start_selection"}, {"GtkListItem", "scroll_vertical", "GtkScrollType scroll_type", "gfloat position"}, {"GtkListItem", "scroll_horizontal", "GtkScrollType scroll_type", "gfloat position"}, {"GtkMenuShell", "move_current", "GtkMenuDirectionType direction"}, {"GtkMenuShell", "activate_current", "gboolean force_hide"}, {"GtkNotebook", "switch_page", "GtkNotebookPage *page", "guint page_num"}, {"GtkStatusbar", "text_pushed", "guint context_id", "gchar *text"}, {"GtkStatusbar", "text_popped", "guint context_id", "gchar *text"}, {"GtkTipsQuery", "widget_entered", "GtkWidget *widget", "gchar *tip_text", "gchar *tip_private"}, {"GtkTipsQuery", "widget_selected", "GtkWidget *widget", "gchar *tip_text", "gchar *tip_private", "GdkEventButton *event"}, {"GtkToolbar", "orientation_changed", "GtkOrientation orientation"}, {"GtkToolbar", "style_changed", "GtkToolbarStyle style"}, {"GtkWidget", "draw", "GdkRectangle *area"}, {"GtkWidget", "size_request", "GtkRequisition *requisition"}, {"GtkWidget", "size_allocate", "GtkAllocation *allocation"}, {"GtkWidget", "state_changed", "GtkStateType state"}, {"GtkWidget", "style_set", "GtkStyle *previous_style"}, {"GtkWidget", "install_accelerator", "gchar *signal_name", "gchar key", "gint modifiers"}, {"GtkWidget", "add_accelerator", "guint accel_signal_id", "GtkAccelGroup *accel_group", "guint accel_key", "GdkModifierType accel_mods", "GtkAccelFlags accel_flags"}, {"GtkWidget", "parent_set", "GtkObject *old_parent"}, {"GtkWidget", "remove_accelerator", "GtkAccelGroup *accel_group", "guint accel_key", "GdkModifierType accel_mods"}, {"GtkWidget", "debug_msg", "gchar *message"}, {"GtkWindow", "move_resize", "gint *x", "gint *y", "gint width", "gint height"}, {"GtkWindow", "set_focus", "GtkWidget *widget"}, {"GtkWidget", "selection_get", "GtkSelectionData *data", "guint info", "guint time"}, {"GtkWidget", "selection_received", "GtkSelectionData *data", "guint time"}, {"GtkWidget", "drag_begin", "GdkDragContext *drag_context"}, {"GtkWidget", "drag_end", "GdkDragContext *drag_context"}, {"GtkWidget", "drag_data_delete", "GdkDragContext *drag_context"}, {"GtkWidget", "drag_leave", "GdkDragContext *drag_context", "guint time"}, {"GtkWidget", "drag_motion", "GdkDragContext *drag_context", "gint x", "gint y", "guint time"}, {"GtkWidget", "drag_drop", "GdkDragContext *drag_context", "gint x", "gint y", "guint time"}, {"GtkWidget", "drag_data_get", "GdkDragContext *drag_context", "GtkSelectionData *data", "guint info", "guint time"}, {"GtkWidget", "drag_data_received", "GdkDragContext *drag_context", "gint x", "gint y", "GtkSelectionData *data", "guint info", "guint time"}, {NULL} }; gint i; for (i = 0; GbArgTable[i][0]; i++) { #if 1 if (!strcmp (type, GbArgTable[i][0]) && !strcmp (signal_name, GbArgTable[i][1])) return &GbArgTable[i][2]; #endif } return NULL; } /* This outputs the hierarchy of all objects which have been initialized, i.e. by calling their XXX_get_type() initialization function. */ static void output_object_hierarchy (void) { FILE *fp; gint i; fp = fopen (hierarchy_filename, "w"); if (fp == NULL) { g_warning ("Couldn't open output file: %s : %s", hierarchy_filename, strerror(errno)); return; } output_hierarchy (fp, G_TYPE_OBJECT, 0); output_hierarchy (fp, G_TYPE_INTERFACE, 0); for (i=0; object_types[i]; i++) { if (!g_type_parent (object_types[i]) && (object_types[i] != G_TYPE_OBJECT) && (object_types[i] != G_TYPE_INTERFACE) ) { output_hierarchy (fp, object_types[i], 0); } } fclose (fp); } static int compare_types (const void *a, const void *b) { const char *na = g_type_name (*((GType *)a)); const char *nb = g_type_name (*((GType *)b)); return g_strcmp0 (na, nb); } /* This is called recursively to output the hierarchy of a widget. */ static void output_hierarchy (FILE *fp, GType type, guint level) { guint i; GType *children; guint n_children; if (!type) return; for (i = 0; i < level; i++) fprintf (fp, " "); fprintf (fp, g_type_name (type)); fprintf (fp, "\\n"); children = g_type_children (type, &n_children); qsort (children, n_children, sizeof (GType), compare_types); for (i=0; i < n_children; i++) output_hierarchy (fp, children[i], level + 1); g_free (children); } static void output_object_interfaces (void) { guint i; FILE *fp; fp = fopen (interfaces_filename, "w"); if (fp == NULL) { g_warning ("Couldn't open output file: %s : %s", interfaces_filename, strerror(errno)); return; } output_interfaces (fp, G_TYPE_OBJECT); for (i = 0; object_types[i]; i++) { if (!g_type_parent (object_types[i]) && (object_types[i] != G_TYPE_OBJECT) && G_TYPE_IS_INSTANTIATABLE (object_types[i])) { output_interfaces (fp, object_types[i]); } } fclose (fp); } static void output_interfaces (FILE *fp, GType type) { guint i; GType *children, *interfaces; guint n_children, n_interfaces; if (!type) return; interfaces = g_type_interfaces (type, &n_interfaces); if (n_interfaces > 0) { fprintf (fp, g_type_name (type)); for (i=0; i < n_interfaces; i++) fprintf (fp, " %s", g_type_name (interfaces[i])); fprintf (fp, "\\n"); } g_free (interfaces); children = g_type_children (type, &n_children); for (i=0; i < n_children; i++) output_interfaces (fp, children[i]); g_free (children); } static void output_interface_prerequisites (void) { FILE *fp; fp = fopen (prerequisites_filename, "w"); if (fp == NULL) { g_warning ("Couldn't open output file: %s : %s", prerequisites_filename, strerror(errno)); return; } output_prerequisites (fp, G_TYPE_INTERFACE); fclose (fp); } static void output_prerequisites (FILE *fp, GType type) { #if GLIB_CHECK_VERSION(2,1,0) guint i; GType *children, *prerequisites; guint n_children, n_prerequisites; if (!type) return; prerequisites = g_type_interface_prerequisites (type, &n_prerequisites); if (n_prerequisites > 0) { fprintf (fp, g_type_name (type)); for (i=0; i < n_prerequisites; i++) fprintf (fp, " %s", g_type_name (prerequisites[i])); fprintf (fp, "\\n"); } g_free (prerequisites); children = g_type_children (type, &n_children); for (i=0; i < n_children; i++) output_prerequisites (fp, children[i]); g_free (children); #endif } static void output_args (void) { FILE *fp; gint i; fp = fopen (args_filename, "w"); if (fp == NULL) { g_warning ("Couldn't open output file: %s : %s", args_filename, strerror(errno)); return; } for (i = 0; object_types[i]; i++) { output_object_args (fp, object_types[i]); } fclose (fp); } static gint compare_param_specs (const void *a, const void *b) { GParamSpec *spec_a = *(GParamSpec **)a; GParamSpec *spec_b = *(GParamSpec **)b; return strcmp (g_param_spec_get_name (spec_a), g_param_spec_get_name (spec_b)); } /* Its common to have unsigned properties restricted * to the signed range. Therefore we make this look * a bit nicer by spelling out the max constants. */ /* Don't use "==" with floats, it might trigger a gcc warning. */ #define GTKDOC_COMPARE_FLOAT(x, y) (x <= y && x >= y) static gchar* describe_double_constant (gdouble value) { gchar *desc; if (GTKDOC_COMPARE_FLOAT (value, G_MAXDOUBLE)) desc = g_strdup ("G_MAXDOUBLE"); else if (GTKDOC_COMPARE_FLOAT (value, G_MINDOUBLE)) desc = g_strdup ("G_MINDOUBLE"); else if (GTKDOC_COMPARE_FLOAT (value, -G_MAXDOUBLE)) desc = g_strdup ("-G_MAXDOUBLE"); else if (GTKDOC_COMPARE_FLOAT (value, G_MAXFLOAT)) desc = g_strdup ("G_MAXFLOAT"); else if (GTKDOC_COMPARE_FLOAT (value, G_MINFLOAT)) desc = g_strdup ("G_MINFLOAT"); else if (GTKDOC_COMPARE_FLOAT (value, -G_MAXFLOAT)) desc = g_strdup ("-G_MAXFLOAT"); else desc = g_strdup_printf ("%lg", value); return desc; } static gchar* describe_signed_constant (gint64 value) { gchar *desc; if (value == G_MAXINT) desc = g_strdup ("G_MAXINT"); else if (value == G_MININT) desc = g_strdup ("G_MININT"); else if (value == G_MAXUINT) desc = g_strdup ("G_MAXUINT"); else if (value == G_MAXLONG) desc = g_strdup ("G_MAXLONG"); else if (value == G_MINLONG) desc = g_strdup ("G_MINLONG"); else if (value == G_MAXULONG) desc = g_strdup ("G_MAXULONG"); else if (value == G_MAXINT64) desc = g_strdup ("G_MAXINT64"); else if (value == G_MININT64) desc = g_strdup ("G_MININT64"); else desc = g_strdup_printf ("%" G_GINT64_FORMAT, value); return desc; } static gchar* describe_unsigned_constant (guint64 value) { gchar *desc; if (value == G_MAXINT) desc = g_strdup ("G_MAXINT"); else if (value == G_MAXUINT) desc = g_strdup ("G_MAXUINT"); else if (value == G_MAXLONG) desc = g_strdup ("G_MAXLONG"); else if (value == G_MAXULONG) desc = g_strdup ("G_MAXULONG"); else if (value == G_MAXINT64) desc = g_strdup ("G_MAXINT64"); else if (value == G_MAXUINT64) desc = g_strdup ("G_MAXUINT64"); else desc = g_strdup_printf ("%" G_GUINT64_FORMAT, value); return desc; } static gchar* describe_type (GParamSpec *spec) { gchar *desc; gchar *lower; gchar *upper; if (G_IS_PARAM_SPEC_CHAR (spec)) { GParamSpecChar *pspec = G_PARAM_SPEC_CHAR (spec); lower = describe_signed_constant (pspec->minimum); upper = describe_signed_constant (pspec->maximum); if (pspec->minimum == G_MININT8 && pspec->maximum == G_MAXINT8) desc = g_strdup (""); else if (pspec->minimum == G_MININT8) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXINT8) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_UCHAR (spec)) { GParamSpecUChar *pspec = G_PARAM_SPEC_UCHAR (spec); lower = describe_unsigned_constant (pspec->minimum); upper = describe_unsigned_constant (pspec->maximum); if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT8) desc = g_strdup (""); else if (pspec->minimum == 0) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXUINT8) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_INT (spec)) { GParamSpecInt *pspec = G_PARAM_SPEC_INT (spec); lower = describe_signed_constant (pspec->minimum); upper = describe_signed_constant (pspec->maximum); if (pspec->minimum == G_MININT && pspec->maximum == G_MAXINT) desc = g_strdup (""); else if (pspec->minimum == G_MININT) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXINT) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_UINT (spec)) { GParamSpecUInt *pspec = G_PARAM_SPEC_UINT (spec); lower = describe_unsigned_constant (pspec->minimum); upper = describe_unsigned_constant (pspec->maximum); if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT) desc = g_strdup (""); else if (pspec->minimum == 0) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXUINT) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_LONG (spec)) { GParamSpecLong *pspec = G_PARAM_SPEC_LONG (spec); lower = describe_signed_constant (pspec->minimum); upper = describe_signed_constant (pspec->maximum); if (pspec->minimum == G_MINLONG && pspec->maximum == G_MAXLONG) desc = g_strdup (""); else if (pspec->minimum == G_MINLONG) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXLONG) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_ULONG (spec)) { GParamSpecULong *pspec = G_PARAM_SPEC_ULONG (spec); lower = describe_unsigned_constant (pspec->minimum); upper = describe_unsigned_constant (pspec->maximum); if (pspec->minimum == 0 && pspec->maximum == G_MAXULONG) desc = g_strdup (""); else if (pspec->minimum == 0) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXULONG) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_INT64 (spec)) { GParamSpecInt64 *pspec = G_PARAM_SPEC_INT64 (spec); lower = describe_signed_constant (pspec->minimum); upper = describe_signed_constant (pspec->maximum); if (pspec->minimum == G_MININT64 && pspec->maximum == G_MAXINT64) desc = g_strdup (""); else if (pspec->minimum == G_MININT64) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXINT64) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_UINT64 (spec)) { GParamSpecUInt64 *pspec = G_PARAM_SPEC_UINT64 (spec); lower = describe_unsigned_constant (pspec->minimum); upper = describe_unsigned_constant (pspec->maximum); if (pspec->minimum == 0 && pspec->maximum == G_MAXUINT64) desc = g_strdup (""); else if (pspec->minimum == 0) desc = g_strdup_printf ("<= %s", upper); else if (pspec->maximum == G_MAXUINT64) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_FLOAT (spec)) { GParamSpecFloat *pspec = G_PARAM_SPEC_FLOAT (spec); lower = describe_double_constant (pspec->minimum); upper = describe_double_constant (pspec->maximum); if (GTKDOC_COMPARE_FLOAT (pspec->minimum, -G_MAXFLOAT)) { if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXFLOAT)) desc = g_strdup (""); else desc = g_strdup_printf ("<= %s", upper); } else if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXFLOAT)) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else if (G_IS_PARAM_SPEC_DOUBLE (spec)) { GParamSpecDouble *pspec = G_PARAM_SPEC_DOUBLE (spec); lower = describe_double_constant (pspec->minimum); upper = describe_double_constant (pspec->maximum); if (GTKDOC_COMPARE_FLOAT (pspec->minimum, -G_MAXDOUBLE)) { if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXDOUBLE)) desc = g_strdup (""); else desc = g_strdup_printf ("<= %s", upper); } else if (GTKDOC_COMPARE_FLOAT (pspec->maximum, G_MAXDOUBLE)) desc = g_strdup_printf (">= %s", lower); else desc = g_strdup_printf ("[%s,%s]", lower, upper); g_free (lower); g_free (upper); } else { desc = g_strdup (""); } return desc; } static gchar* describe_default (GParamSpec *spec) { gchar *desc; if (G_IS_PARAM_SPEC_CHAR (spec)) { GParamSpecChar *pspec = G_PARAM_SPEC_CHAR (spec); desc = g_strdup_printf ("%d", pspec->default_value); } else if (G_IS_PARAM_SPEC_UCHAR (spec)) { GParamSpecUChar *pspec = G_PARAM_SPEC_UCHAR (spec); desc = g_strdup_printf ("%u", pspec->default_value); } else if (G_IS_PARAM_SPEC_BOOLEAN (spec)) { GParamSpecBoolean *pspec = G_PARAM_SPEC_BOOLEAN (spec); desc = g_strdup_printf ("%s", pspec->default_value ? "TRUE" : "FALSE"); } else if (G_IS_PARAM_SPEC_INT (spec)) { GParamSpecInt *pspec = G_PARAM_SPEC_INT (spec); desc = g_strdup_printf ("%d", pspec->default_value); } else if (G_IS_PARAM_SPEC_UINT (spec)) { GParamSpecUInt *pspec = G_PARAM_SPEC_UINT (spec); desc = g_strdup_printf ("%u", pspec->default_value); } else if (G_IS_PARAM_SPEC_LONG (spec)) { GParamSpecLong *pspec = G_PARAM_SPEC_LONG (spec); desc = g_strdup_printf ("%ld", pspec->default_value); } else if (G_IS_PARAM_SPEC_LONG (spec)) { GParamSpecULong *pspec = G_PARAM_SPEC_ULONG (spec); desc = g_strdup_printf ("%lu", pspec->default_value); } else if (G_IS_PARAM_SPEC_INT64 (spec)) { GParamSpecInt64 *pspec = G_PARAM_SPEC_INT64 (spec); desc = g_strdup_printf ("%" G_GINT64_FORMAT, pspec->default_value); } else if (G_IS_PARAM_SPEC_UINT64 (spec)) { GParamSpecUInt64 *pspec = G_PARAM_SPEC_UINT64 (spec); desc = g_strdup_printf ("%" G_GUINT64_FORMAT, pspec->default_value); } else if (G_IS_PARAM_SPEC_UNICHAR (spec)) { GParamSpecUnichar *pspec = G_PARAM_SPEC_UNICHAR (spec); if (g_unichar_isprint (pspec->default_value)) desc = g_strdup_printf ("'%c'", pspec->default_value); else desc = g_strdup_printf ("%u", pspec->default_value); } else if (G_IS_PARAM_SPEC_ENUM (spec)) { GParamSpecEnum *pspec = G_PARAM_SPEC_ENUM (spec); GEnumValue *value = g_enum_get_value (pspec->enum_class, pspec->default_value); if (value) desc = g_strdup_printf ("%s", value->value_name); else desc = g_strdup_printf ("%d", pspec->default_value); } else if (G_IS_PARAM_SPEC_FLAGS (spec)) { GParamSpecFlags *pspec = G_PARAM_SPEC_FLAGS (spec); guint default_value; GString *acc; default_value = pspec->default_value; acc = g_string_new (""); while (default_value) { GFlagsValue *value = g_flags_get_first_value (pspec->flags_class, default_value); if (!value) break; if (acc->len > 0) g_string_append (acc, "|"); g_string_append (acc, value->value_name); default_value &= ~value->value; } if (default_value == 0) desc = g_string_free (acc, FALSE); else { desc = g_strdup_printf ("%d", pspec->default_value); g_string_free (acc, TRUE); } } else if (G_IS_PARAM_SPEC_FLOAT (spec)) { GParamSpecFloat *pspec = G_PARAM_SPEC_FLOAT (spec); desc = g_strdup_printf ("%g", pspec->default_value); } else if (G_IS_PARAM_SPEC_DOUBLE (spec)) { GParamSpecDouble *pspec = G_PARAM_SPEC_DOUBLE (spec); desc = g_strdup_printf ("%lg", pspec->default_value); } else if (G_IS_PARAM_SPEC_STRING (spec)) { GParamSpecString *pspec = G_PARAM_SPEC_STRING (spec); if (pspec->default_value) { gchar *esc = g_strescape (pspec->default_value, NULL); desc = g_strdup_printf ("\\"%s\\"", esc); g_free (esc); } else desc = g_strdup_printf ("NULL"); } else { desc = g_strdup (""); } return desc; } static void output_object_args (FILE *fp, GType object_type) { gpointer class; const gchar *object_class_name; guint arg; gchar flags[16], *pos; GParamSpec **properties; guint n_properties; gboolean child_prop; gboolean style_prop; gboolean is_pointer; const gchar *type_name; gchar *type_desc; gchar *default_value; if (G_TYPE_IS_OBJECT (object_type)) { class = g_type_class_peek (object_type); if (!class) return; properties = g_object_class_list_properties (class, &n_properties); } #if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 3) else if (G_TYPE_IS_INTERFACE (object_type)) { class = g_type_default_interface_ref (object_type); if (!class) return; properties = g_object_interface_list_properties (class, &n_properties); } #endif else return; object_class_name = g_type_name (object_type); child_prop = FALSE; style_prop = FALSE; while (TRUE) { qsort (properties, n_properties, sizeof (GParamSpec *), compare_param_specs); for (arg = 0; arg < n_properties; arg++) { GParamSpec *spec = properties[arg]; const gchar *nick, *blurb, *dot; if (spec->owner_type != object_type) continue; pos = flags; /* We use one-character flags for simplicity. */ if (child_prop && !style_prop) *pos++ = 'c'; if (style_prop) *pos++ = 's'; if (spec->flags & G_PARAM_READABLE) *pos++ = 'r'; if (spec->flags & G_PARAM_WRITABLE) *pos++ = 'w'; if (spec->flags & G_PARAM_CONSTRUCT) *pos++ = 'x'; if (spec->flags & G_PARAM_CONSTRUCT_ONLY) *pos++ = 'X'; *pos = 0; nick = g_param_spec_get_nick (spec); blurb = g_param_spec_get_blurb (spec); dot = ""; if (blurb) { int str_len = strlen (blurb); if (str_len > 0 && blurb[str_len - 1] != '.') dot = "."; } type_desc = describe_type (spec); default_value = describe_default (spec); type_name = get_type_name (spec->value_type, &is_pointer); fprintf (fp, "\\n%s::%s\\n%s%s\\n%s\\n%s\\n%s\\n%s%s\\n%s\\n\\n\\n", object_class_name, g_param_spec_get_name (spec), type_name, is_pointer ? "*" : "", type_desc, flags, nick ? nick : "(null)", blurb ? blurb : "(null)", dot, default_value); g_free (type_desc); g_free (default_value); } g_free (properties); #ifdef GTK_IS_CONTAINER_CLASS if (!child_prop && GTK_IS_CONTAINER_CLASS (class)) { properties = gtk_container_class_list_child_properties (class, &n_properties); child_prop = TRUE; continue; } #endif #ifdef GTK_IS_WIDGET_CLASS #if GTK_CHECK_VERSION(2,1,0) if (!style_prop && GTK_IS_WIDGET_CLASS (class)) { properties = gtk_widget_class_list_style_properties (GTK_WIDGET_CLASS (class), &n_properties); style_prop = TRUE; continue; } #endif #endif EOT if ($QUERY_CHILD_PROPERTIES) { print OUTPUT < element-fsvideoanyrate FsVideoanyrate FsVideoanyrate FsVideoanyratePrivate FS_VIDEOANYRATE FS_IS_VIDEOANYRATE FS_TYPE_VIDEOANYRATE fs_videoanyrate_get_type FS_VIDEOANYRATE_CLASS FsVideoanyrateClass FS_IS_VIDEOANYRATE_CLASS
element-fsrtpxdatapay FsRTPXdataPay FsRTPXdataPay FS_IS_RTP_XDATA_PAY FS_IS_RTP_XDATA_PAY_CLASS FS_RTP_XDATA_PAY FS_RTP_XDATA_PAY_CLASS FS_TYPE_RTP_XDATA_PAY FsRTPXdataPayClass fs_rtp_xdata_pay_get_type fs_rtp_xdata_pay_plugin_init
element-fsrtpxdatadepay FsRTPXdataDepay FsRTPXdataDepay FS_IS_RTP_XDATA_DEPAY FS_IS_RTP_XDATA_DEPAY_CLASS FS_RTP_XDATA_DEPAY FS_RTP_XDATA_DEPAY_CLASS FS_TYPE_RTP_XDATA_DEPAY FsRTPXdataDepayClass fs_rtp_xdata_depay_get_type fs_rtp_xdata_depay_plugin_init
element-fsrtpconference FsRtpConference FsRtpConference FS_RTP_CONFERENCE_CAST FsRtpConferencePrivate FsRtpConferenceClass FS_RTP_CONFERENCE FS_IS_RTP_CONFERENCE FS_TYPE_RTP_CONFERENCE fs_rtp_conference_get_type FS_RTP_CONFERENCE_CLASS FS_IS_RTP_CONFERENCE_CLASS FS_RTP_CONFERENCE_GET_CLASS fs_codec_to_gst_caps fs_rtp_conference_is_internal_thread fs_codec_to_gst_caps_with_ptime fs_rtp_session_get_conference fs_rtp_session_get_rtpbin_internal_session fs_rtp_session_get_rtpbin_recv_rtcp_sink fs_rtp_session_get_rtpbin_recv_rtp_sink fs_rtp_session_get_rtpmuxer stream_get_new_stream_transmitter_cb
fs-rawudp-transmitter FsRawUdpTransmitter FsRawUdpTransmitter FsRawUdpTransmitterPrivate FsRawUdpTransmitterClass UdpPort FsRawUdpAddressUniqueCallbackFunc fs_rawudp_transmitter_get_udpport fs_rawudp_transmitter_put_udpport fs_rawudp_transmitter_udpport_add_dest fs_rawudp_transmitter_udpport_remove_dest fs_rawudp_transmitter_udpport_sendto fs_rawudp_transmitter_udpport_connect_recv fs_rawudp_transmitter_udpport_disconnect_recv fs_rawudp_transmitter_udpport_is_pad fs_rawudp_transmitter_udpport_get_port fs_rawudp_transmitter_udpport_add_known_address fs_rawudp_transmitter_udpport_remove_known_address FS_RAWUDP_TRANSMITTER_CAST FS_RAWUDP_TRANSMITTER FS_IS_RAWUDP_TRANSMITTER FS_TYPE_RAWUDP_TRANSMITTER fs_rawudp_transmitter_get_type FS_RAWUDP_TRANSMITTER_CLASS FS_IS_RAWUDP_TRANSMITTER_CLASS FS_RAWUDP_TRANSMITTER_GET_CLASS
fs-rawudp-stream-transmitter FsRawUdpStreamTransmitter FsRawUdpStreamTransmitter FsRawUdpStreamTransmitterPrivate fs_rawudp_stream_transmitter_register_type fs_rawudp_stream_transmitter_newv stream_known_source_packet_receive_cb stream_new_remote_codecs_cb FS_RAWUDP_STREAM_TRANSMITTER_CAST FsRawUdpStreamTransmitterClass FS_RAWUDP_STREAM_TRANSMITTER FS_IS_RAWUDP_STREAM_TRANSMITTER FS_TYPE_RAWUDP_STREAM_TRANSMITTER fs_rawudp_stream_transmitter_get_type FS_RAWUDP_STREAM_TRANSMITTER_CLASS FS_IS_RAWUDP_STREAM_TRANSMITTER_CLASS FS_RAWUDP_STREAM_TRANSMITTER_GET_CLASS
fs-multicast-transmitter FsMulticastTransmitter FsMulticastTransmitter FsMulticastTransmitterClass FS_MULTICAST_TRANSMITTER_CAST FS_MULTICAST_TRANSMITTER FS_IS_MULTICAST_TRANSMITTER FS_TYPE_MULTICAST_TRANSMITTER fs_multicast_transmitter_get_type FS_MULTICAST_TRANSMITTER_CLASS FS_IS_MULTICAST_TRANSMITTER_CLASS FS_MULTICAST_TRANSMITTER_GET_CLASS FsMulticastTransmitterPrivate UdpSock fs_multicast_transmitter_get_udpsock fs_multicast_transmitter_put_udpsock fs_multicast_transmitter_udpsock_inc_sending fs_multicast_transmitter_udpsock_dec_sending fs_multicast_transmitter_udpsock_ref
fs-multicast-stream-transmitter FsMulticastStreamTransmitter FsMulticastStreamTransmitter FS_MULTICAST_STREAM_TRANSMITTER_CAST FsMulticastStreamTransmitterPrivate fs_multicast_stream_transmitter_register_type fs_multicast_stream_transmitter_newv FsMulticastStreamTransmitterClass FS_MULTICAST_STREAM_TRANSMITTER FS_IS_MULTICAST_STREAM_TRANSMITTER FS_TYPE_MULTICAST_STREAM_TRANSMITTER fs_multicast_stream_transmitter_get_type FS_MULTICAST_STREAM_TRANSMITTER_CLASS FS_IS_MULTICAST_STREAM_TRANSMITTER_CLASS FS_MULTICAST_STREAM_TRANSMITTER_GET_CLASS
fs-rtp-session FsRtpSession FsRtpSession FsRtpSessionClass FS_IS_RTP_SESSION FS_IS_RTP_SESSION_CLASS FS_RTP_SESSION FS_RTP_SESSION_CAST FS_RTP_SESSION_CLASS FS_RTP_SESSION_GET_CLASS FS_RTP_SESSION_GET_LOCK FS_RTP_SESSION_LOCK FS_RTP_SESSION_UNLOCK FS_TYPE_RTP_SESSION fs_rtp_session_get_type FsRtpSessionPrivate fs_rtp_session_associate_ssrc_cname fs_rtp_session_bye_ssrc fs_rtp_session_new fs_rtp_session_new_recv_pad fs_rtp_session_request_pt_map fs_rtp_session_ssrc_validated fs_rtp_session_has_disposed_enter fs_rtp_session_has_disposed_exit
fs-rtp-stream FsRtpStream FsRtpStream FsRtpStreamClass fs_rtp_stream_get_type FS_IS_RTP_STREAM FS_IS_RTP_STREAM_CLASS FS_RTP_STREAM FS_RTP_STREAM_CAST FS_RTP_STREAM_CLASS FS_RTP_STREAM_GET_CLASS FS_TYPE_RTP_STREAM FsRtpStreamPrivate fs_rtp_stream_new fs_rtp_stream_add_substream_unlock fs_rtp_stream_set_negotiated_codecs_unlock stream_sending_changed_locked_cb stream_ssrc_added_cb
fs-rtp-participant FsRtpParticipant FsRtpParticipant FsRtpParticipantClass fs_rtp_participant_get_type FS_IS_RTP_PARTICIPANT FS_IS_RTP_PARTICIPANT_CLASS FS_RTP_PARTICIPANT FS_RTP_PARTICIPANT_CAST FS_RTP_PARTICIPANT_CLASS FS_RTP_PARTICIPANT_GET_CLASS FS_TYPE_RTP_PARTICIPANT FsRtpParticipantPrivate fs_rtp_participant_new
fs-nice-transmitter FsNiceTransmitter FsNiceTransmitter FsNiceTransmitterClass FS_NICE_TRANSMITTER_CAST FS_NICE_TRANSMITTER FS_IS_NICE_TRANSMITTER FS_TYPE_NICE_TRANSMITTER fs_nice_transmitter_get_type FS_NICE_TRANSMITTER_CLASS FS_IS_NICE_TRANSMITTER_CLASS FS_NICE_TRANSMITTER_GET_CLASS FsNiceTransmitterPrivate NiceGstStream fs_nice_transmitter_add_gst_stream fs_nice_transmitter_free_gst_stream fs_nice_transmitter_set_sending fs_nice_transmitter_request_keyunit
fs-nice-stream-transmitter FsNiceStreamTransmitter FsNiceStreamTransmitter FS_NICE_STREAM_TRANSMITTER_CAST FsNiceStreamTransmitterPrivate fs_nice_stream_transmitter_register_type fs_nice_stream_transmitter_newv FsNiceStreamTransmitterClass FS_NICE_STREAM_TRANSMITTER FS_IS_NICE_STREAM_TRANSMITTER FS_TYPE_NICE_STREAM_TRANSMITTER fs_nice_stream_transmitter_get_type FS_NICE_STREAM_TRANSMITTER_CLASS FS_IS_NICE_STREAM_TRANSMITTER_CLASS FS_NICE_STREAM_TRANSMITTER_GET_CLASS
fs-shm-transmitter FsShmTransmitter FsShmTransmitter FsShmTransmitterClass FS_SHM_TRANSMITTER_CAST FS_SHM_TRANSMITTER FS_IS_SHM_TRANSMITTER FS_TYPE_SHM_TRANSMITTER fs_shm_transmitter_get_type FS_SHM_TRANSMITTER_CLASS FS_IS_SHM_TRANSMITTER_CLASS FS_SHM_TRANSMITTER_GET_CLASS FsShmTransmitterPrivate ShmSink ShmSrc fs_shm_transmitter_check_shm_sink fs_shm_transmitter_check_shm_src fs_shm_transmitter_get_shm_sink fs_shm_transmitter_get_shm_src fs_shm_transmitter_sink_set_sending got_buffer ready
fs-shm-stream-transmitter FsShmStreamTransmitter FsShmStreamTransmitter FS_SHM_STREAM_TRANSMITTER_CAST FsShmStreamTransmitterPrivate fs_shm_stream_transmitter_register_type fs_shm_stream_transmitter_newv FsShmStreamTransmitterClass FS_SHM_STREAM_TRANSMITTER FS_IS_SHM_STREAM_TRANSMITTER FS_TYPE_SHM_STREAM_TRANSMITTER fs_shm_stream_transmitter_get_type FS_SHM_STREAM_TRANSMITTER_CLASS FS_IS_SHM_STREAM_TRANSMITTER_CLASS FS_SHM_STREAM_TRANSMITTER_GET_CLASS
fs-msn-conference FsMsnConference FsMsnConference FS_MSN_CONFERENCE_CAST FsMsnConferencePrivate FsMsnConferenceClass FS_MSN_CONFERENCE FS_IS_MSN_CONFERENCE FS_TYPE_MSN_CONFERENCE fs_msn_conference_get_type FS_MSN_CONFERENCE_CLASS FS_IS_MSN_CONFERENCE_CLASS FS_MSN_CONFERENCE_GET_CLASS
fs-msn-session FsMsnSession FsMsnSession FS_IS_MSN_SESSION FS_IS_MSN_SESSION_CLASS FS_MSN_SESSION FS_MSN_SESSION_CAST FS_MSN_SESSION_CLASS FS_MSN_SESSION_GET_CLASS FS_TYPE_MSN_SESSION FsMsnSessionClass FsMsnSessionPrivate fs_msn_session_get_type fs_msn_session_new fs_msn_session_new_recv_pad connection
fs-msn-stream FsMsnStream FsMsnStream FS_IS_MSN_STREAM FS_IS_MSN_STREAM_CLASS FS_MSN_STREAM FS_MSN_STREAM_CAST FS_MSN_STREAM_CLASS FS_MSN_STREAM_GET_CLASS FS_TYPE_MSN_STREAM FsMsnStreamClass FsMsnStreamPrivate fs_msn_stream_get_type fs_msn_stream_new fs_msn_stream_set_tos_locked
fs-msn-participant FsMsnParticipant FsMsnParticipant FS_IS_MSN_PARTICIPANT FS_IS_MSN_PARTICIPANT_CLASS FS_MSN_PARTICIPANT FS_MSN_PARTICIPANT_CAST FS_MSN_PARTICIPANT_CLASS FS_MSN_PARTICIPANT_GET_CLASS FS_TYPE_MSN_PARTICIPANT FsMsnParticipantClass FsMsnParticipantPrivate fs_msn_participant_get_type fs_msn_participant_new
element-fsmsncamrecvconference FsMsnCamCamRecvConference FsMsnCamRecvConference FS_IS_MSN_CAM_RECV_CONFERENCE FS_IS_MSN_CAM_RECV_CONFERENCE_CLASS FS_MSN_CAM_RECV_CONFERENCE FS_MSN_CAM_RECV_CONFERENCE_CAST FS_MSN_CAM_RECV_CONFERENCE_CLASS FS_MSN_CAM_RECV_CONFERENCE_GET_CLASS FS_TYPE_MSN_CAM_RECV_CONFERENCE FsMsnCamRecvConferenceClass FsMsnCamRecvConferencePrivate fs_msn_cam_recv_conference_get_type
element-fsmsncamsendconference FsMsnCamSendConference FsMsnCamSendConference FS_IS_MSN_CAM_SEND_CONFERENCE FS_IS_MSN_CAM_SEND_CONFERENCE_CLASS FS_MSN_CAM_SEND_CONFERENCE FS_MSN_CAM_SEND_CONFERENCE_CAST FS_MSN_CAM_SEND_CONFERENCE_CLASS FS_MSN_CAM_SEND_CONFERENCE_GET_CLASS FS_TYPE_MSN_CAM_SEND_CONFERENCE FsMsnCamSendConferenceClass FsMsnCamSendConferencePrivate fs_msn_cam_send_conference_get_type
element-fsrawconference FsRawConference FsRawConference FS_IS_RAW_CONFERENCE FS_IS_RAW_CONFERENCE_CLASS FS_RAW_CONFERENCE FS_RAW_CONFERENCE_CAST FS_RAW_CONFERENCE_CLASS FS_RAW_CONFERENCE_GET_CLASS FS_TYPE_RAW_CONFERENCE FsRawConferenceClass FsRawConferencePrivate fs_raw_conference_get_type fs_raw_conference_is_internal_thread fs_raw_codec_to_gst_caps fs_raw_session_remove_stream fs_raw_session_update_direction
fs-raw-session FsRawSession FsRawSession FS_IS_RAW_SESSION FS_IS_RAW_SESSION_CLASS FS_RAW_SESSION FS_RAW_SESSION_CAST FS_RAW_SESSION_CLASS FS_RAW_SESSION_GET_CLASS FS_TYPE_RAW_SESSION FsRawSessionClass FsRawSessionPrivate fs_raw_session_get_type fs_raw_session_new
fs-raw-stream FsRawStream FsRawStream FS_IS_RAW_STREAM FS_IS_RAW_STREAM_CLASS FS_RAW_STREAM FS_RAW_STREAM_CAST FS_RAW_STREAM_CLASS FS_RAW_STREAM_GET_CLASS FS_TYPE_RAW_STREAM FsRawStreamClass FsRawStreamPrivate fs_raw_stream_get_type fs_raw_stream_new
fs-raw-participant FsRawParticipant FsRawParticipant FS_IS_RAW_PARTICIPANT FS_IS_RAW_PARTICIPANT_CLASS FS_RAW_PARTICIPANT FS_RAW_PARTICIPANT_CAST FS_RAW_PARTICIPANT_CLASS FS_RAW_PARTICIPANT_GET_CLASS FS_TYPE_RAW_PARTICIPANT FsRawParticipantClass FsRawParticipantPrivate fs_raw_participant_get_type fs_raw_participant_new
farstream-0.2.7/docs/plugins/farstream-plugins.types0000664000076400007640000000022712462323000017572 00000000000000#include fs_rtp_participant_get_type fs_rtp_session_get_type fs_rtp_stream_get_type fs_msn_conference_get_type fs_msn_participant_get_type farstream-0.2.7/docs/plugins/Makefile.in0000664000076400007640000011307712462321046015126 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ # This is an include file specifically tuned for building documentation # for GStreamer plug-ins # It has been further specialized to farstream plugins stuff VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/common-modified/gtk-doc-plugins.mak \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am subdir = docs/plugins ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = $(top_builddir)/transmitters/rawudp/.libs:$(top_builddir)/transmitters/multicast/.libs:$(top_builddir)/transmitters/nice/.libs:$(top_builddir)/transmitters/shm/.libs FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ GST_DOC_SCANOBJ = $(top_srcdir)/common/gstdoc-scangobj # The name of the module, e.g. 'glib'. #DOC_MODULE=gst-plugins-libs-@GST_API_VERSION@ MODULE = farstream DOC_MODULE = $(MODULE)-plugins # generated basefiles #basefiles = \ # $(DOC_MODULE)-sections.txt \ # $(DOC_MODULE)-docs.sgml # ugly hack to make -unused.sgml work #unused-build.stamp: # BUILDDIR=`pwd` && \ # cd $(srcdir)/tmpl && \ # ln -sf gstreamer-libs-unused.sgml \ # $$BUILDDIR/tmpl/gstreamer-libs-@GST_API_VERSION@-unused.sgml # touch unused-build.stamp # these rules are added to create parallel docs using GST_API_VERSION #$(basefiles): gstreamer-libs-@GST_API_VERSION@%: gstreamer-libs% # cp $< $@ #CLEANFILES = $(basefiles) # The top-level SGML file. Change it if you want. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(top_srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting functions and macros. DOC_SOURCE_DIR = $(top_srcdir) # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS = # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS = --sgml-mode # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS = --extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html \ --extra-dir=$(GST_PREFIX)/share/gtk-doc/html \ --extra-dir=$(datadir)/gtk-doc/html # Used for dependencies. HFILE_GLOB = $(DOC_SOURCE_DIR)/gst/*/*.h $(DOC_SOURCE_DIR)/transmitters/*/*.h CFILE_GLOB = $(DOC_SOURCE_DIR)/gst/*/*.c $(DOC_SOURCE_DIR)/transmitters/*/*.c # this is a wingo addition # thomasvs: another nice wingo addition would be an explanation on why # this is useful ;) SCANOBJ_DEPS = \ $(top_builddir)/transmitters/multicast/libmulticast-transmitter.la \ $(top_builddir)/transmitters/rawudp/librawudp-transmitter.la \ $(top_builddir)/transmitters/nice/libnice-transmitter.la \ $(top_builddir)/transmitters/shm/libshm-transmitter.la \ $(top_builddir)/gst/fsrtpconference/libfsrtpconference_doc.la \ $(top_builddir)/gst/fsmsnconference/libfsmsnconference_doc.la \ $(top_builddir)/gst/fsrawconference/libfsrawconference_doc.la \ $(top_builddir)/gst/fsvideoanyrate/libfsvideoanyrate.la \ $(top_builddir)/gst/fsrtpxdata/libfsrtpxdata.la # Header files to ignore when scanning. IGNORE_HFILES = IGNORE_CFILES = # we add all .h files of elements that have signals/args we want # sadly this also pulls in the private methods - maybe we should # move those around in the source ? # also, we should add some stuff here conditionally based on whether # or not the plugin will actually build # but I'm not sure about that - it might be this Just Works given that # the registry won't have the element EXTRA_HFILES = \ $(top_srcdir)/gst/fsvideoanyrate/videoanyrate.h \ $(top_srcdir)/gst/fsrtpxdata/fsrtpxdatapay.h \ $(top_srcdir)/gst/fsrtpxdata/fsrtpxdatadepay.h \ $(top_srcdir)/gst/fsrtpconference/fs-rtp-conference.h \ $(top_srcdir)/gst/fsrtpconference/fs-rtp-session.h \ $(top_srcdir)/gst/fsrtpconference/fs-rtp-stream.h \ $(top_srcdir)/gst/fsrtpconference/fs-rtp-participant.h \ $(top_srcdir)/gst/fsrawconference/fs-raw-conference.h \ $(top_srcdir)/gst/fsrawconference/fs-raw-session.h \ $(top_srcdir)/gst/fsrawconference/fs-raw-stream.h \ $(top_srcdir)/gst/fsrawconference/fs-raw-participant.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-cam-recv-conference.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-cam-send-conference.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-conference.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-session.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-stream.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-participant.h \ $(top_srcdir)/transmitters/rawudp/fs-rawudp-transmitter.h \ $(top_srcdir)/transmitters/rawudp/fs-rawudp-stream-transmitter.h \ $(top_srcdir)/transmitters/multicast/fs-multicast-transmitter.h \ $(top_srcdir)/transmitters/multicast/fs-multicast-stream-transmitter.h \ $(top_srcdir)/transmitters/nice/fs-nice-transmitter.h \ $(top_srcdir)/transmitters/nice/fs-nice-stream-transmitter.h \ $(top_srcdir)/transmitters/shm/fs-shm-transmitter.h \ $(top_srcdir)/transmitters/shm/fs-shm-stream-transmitter.h # Images to copy into HTML directory. HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). content_files = # Other files to distribute. extra_files = \ farstream-transmitters.types.in \ gtkdoc-scangobj-transmitters CLEANFILES = farstream-transmitters.types $(SCANOBJ_FILES_O) \ $(REPORT_FILES) $(DOC_STAMPS) inspect-registry.xml # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = $(GST_BASE_CFLAGS) -I$(top_builddir) -I$(top_builddir)/gst-libs GTKDOC_LIBS = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(top_builddir)/gst/fsrtpconference/libfsrtpconference_doc.la \ $(top_builddir)/gst/fsrawconference/libfsrawconference_doc.la \ $(top_builddir)/gst/fsmsnconference/libfsmsnconference_doc.la \ $(GST_BASE_LIBS) GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) # If you need to override some of the declarations, place them in this file # and uncomment this line. #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt DOC_OVERRIDES = # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) # thomas: make docs parallel installable TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)-@FS_APIVERSION@ MAINTAINER_DOC_STAMPS = \ scanobj-build.stamp \ scanobj-trans-build.stamp EXTRA_DIST = \ $(MAINTAINER_DOC_STAMPS) \ $(srcdir)/inspect/*.xml \ $(SCANOBJ_FILES) \ $(content_files) \ $(extra_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_OVERRIDES) \ $(DOC_MODULE)-sections.txt # we don't add scanobj-build.stamp here since they are built manually by docs # maintainers and result is commited to git DOC_STAMPS = \ scan-build.stamp \ tmpl-build.stamp \ sgml-build.stamp \ html-build.stamp \ scan.stamp \ tmpl.stamp \ sgml.stamp \ html.stamp # files generated/updated by gtkdoc-scangobj SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals \ $(DOC_MODULE).types SCANOBJ_FILES_O = \ .libs/$(DOC_MODULE)-scan.o # files generated/updated by gtkdoc-scan SCAN_FILES = \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt \ $(DOC_MODULE)-decl.txt \ $(DOC_MODULE)-decl-list.txt REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt INSPECT_DIR = inspect ### inspect GStreamer plug-ins; done by documentation maintainer ### # only look at the plugins in this module when building inspect .xml stuff @ENABLE_GTK_DOC_TRUE@INSPECT_REGISTRY = $(top_builddir)/docs/plugins/inspect-registry.xml @ENABLE_GTK_DOC_TRUE@INSPECT_ENVIRONMENT = \ @ENABLE_GTK_DOC_TRUE@ LC_ALL=C \ @ENABLE_GTK_DOC_TRUE@ GST_PLUGIN_SYSTEM_PATH= \ @ENABLE_GTK_DOC_TRUE@ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/plugins:$(top_builddir)/src:$(top_builddir)/gnl \ @ENABLE_GTK_DOC_TRUE@ GST_REGISTRY=$(INSPECT_REGISTRY) \ @ENABLE_GTK_DOC_TRUE@ PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ @ENABLE_GTK_DOC_TRUE@ $(INSPECT_EXTRA_ENVIRONMENT) MAINTAINERCLEANFILES = $(MAINTAINER_DOC_STAMPS) # wildcard is apparently not portable to other makes, hence the use of find inspect_files = $(shell find $(srcdir)/$(INSPECT_DIR) -name '*.xml') all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common-modified/gtk-doc-plugins.mak $(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 docs/plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/plugins/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_srcdir)/common-modified/gtk-doc-plugins.mak: $(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 tags TAGS: ctags CTAGS: cscope cscopelist: 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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) 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 distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local 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-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local cscopelist-am ctags-am dist-hook \ distclean distclean-generic distclean-libtool distclean-local \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-data-local \ 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 tags-am uninstall uninstall-am uninstall-local farstream-transmitters.types: farstream-transmitters.types.in Makefile cat $< > $@ for i in "$(FS_TRANSMITTER_PLUGINS_SELECTED)"; do \ echo "${i}" >> $@ ;\ done update-all: scanobj-trans-build.stamp update help: @echo @echo "If you are a doc maintainer, run 'make update' to update" @echo "the documentation files maintained in git" @echo @echo Other useful make targets: @echo @echo check-inspected-versions: make sure the inspected plugin info @echo is up to date before a release @echo # update the stuff maintained by doc maintainers update: $(MAKE) scanobj-update $(MAKE) check-outdated-docs @ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp #### scan gobjects; done by documentation maintainer #### @ENABLE_GTK_DOC_TRUE@scanobj-update: @ENABLE_GTK_DOC_TRUE@ -rm scanobj-build.stamp @ENABLE_GTK_DOC_TRUE@ $(MAKE) scanobj-build.stamp # gstdoc-scanobj produces 5 output files (.new) # scangobj-merge.py merges them into the file which we commit later # TODO: also merge the hierarchy @ENABLE_GTK_DOC_TRUE@scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles) @ENABLE_GTK_DOC_TRUE@ @echo " DOC Introspecting gobjects" @ENABLE_GTK_DOC_TRUE@ @if test x"$(srcdir)" != x. ; then \ @ENABLE_GTK_DOC_TRUE@ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ @ENABLE_GTK_DOC_TRUE@ do \ @ENABLE_GTK_DOC_TRUE@ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ @ENABLE_GTK_DOC_TRUE@ done; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ mkdir -p $(INSPECT_DIR); \ @ENABLE_GTK_DOC_TRUE@ scanobj_options=""; \ @ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \ @ENABLE_GTK_DOC_TRUE@ scanobj_options="--verbose"; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ $(INSPECT_ENVIRONMENT) \ @ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ @ENABLE_GTK_DOC_TRUE@ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \ @ENABLE_GTK_DOC_TRUE@ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ @ENABLE_GTK_DOC_TRUE@ $(GST_DOC_SCANOBJ) $$scanobj_options --type-init-func="gst_init(NULL,NULL)" \ @ENABLE_GTK_DOC_TRUE@ --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir=$(INSPECT_DIR) && \ @ENABLE_GTK_DOC_TRUE@ echo " DOC Merging introspection data" && \ @ENABLE_GTK_DOC_TRUE@ $(PYTHON) \ @ENABLE_GTK_DOC_TRUE@ $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \ @ENABLE_GTK_DOC_TRUE@ if test x"$(srcdir)" != x. ; then \ @ENABLE_GTK_DOC_TRUE@ for f in $(SCANOBJ_FILES); \ @ENABLE_GTK_DOC_TRUE@ do \ @ENABLE_GTK_DOC_TRUE@ cmp -s ./$$f $(srcdir)/$$f || cp ./$$f $(srcdir)/ ; \ @ENABLE_GTK_DOC_TRUE@ done; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ touch scanobj-build.stamp @ENABLE_GTK_DOC_TRUE@$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(SCANOBJ_FILES_O): scan-build.stamp @ENABLE_GTK_DOC_TRUE@ @true ### scan headers; done on every build ### @ENABLE_GTK_DOC_TRUE@scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Scanning header files' @ENABLE_GTK_DOC_TRUE@ @if test x"$(srcdir)" != x. ; then \ @ENABLE_GTK_DOC_TRUE@ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ @ENABLE_GTK_DOC_TRUE@ do \ @ENABLE_GTK_DOC_TRUE@ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ @ENABLE_GTK_DOC_TRUE@ done; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ @_source_dir='' ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \ @ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @ENABLE_GTK_DOC_TRUE@ done ; \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-scan \ @ENABLE_GTK_DOC_TRUE@ $(SCAN_OPTIONS) $(EXTRA_HFILES) \ @ENABLE_GTK_DOC_TRUE@ --module=$(DOC_MODULE) \ @ENABLE_GTK_DOC_TRUE@ $${_source_dir} \ @ENABLE_GTK_DOC_TRUE@ --ignore-headers="$(IGNORE_HFILES)"; \ @ENABLE_GTK_DOC_TRUE@ touch scan-build.stamp #### update templates; done on every build #### ### FIXME: make this error out again when docs are fixed for 0.9 # in a non-srcdir build, we need to copy files from the previous step # and the files from previous runs of this step @ENABLE_GTK_DOC_TRUE@tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Rebuilding template files' @ENABLE_GTK_DOC_TRUE@ @if test x"$(srcdir)" != x. ; then \ @ENABLE_GTK_DOC_TRUE@ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ @ENABLE_GTK_DOC_TRUE@ do \ @ENABLE_GTK_DOC_TRUE@ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ @ENABLE_GTK_DOC_TRUE@ done; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ @gtkdoc-mktmpl --module=$(DOC_MODULE) @ENABLE_GTK_DOC_TRUE@ @$(PYTHON) \ @ENABLE_GTK_DOC_TRUE@ $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl @ENABLE_GTK_DOC_TRUE@ @touch tmpl-build.stamp @ENABLE_GTK_DOC_TRUE@tmpl.stamp: tmpl-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### xml #### ### FIXME: make this error out again when docs are fixed for 0.9 @ENABLE_GTK_DOC_TRUE@sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files) @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Building XML' @ENABLE_GTK_DOC_TRUE@ @-mkdir -p xml @ENABLE_GTK_DOC_TRUE@ @for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \ @ENABLE_GTK_DOC_TRUE@ xsltproc --stringparam module $(MODULE) \ @ENABLE_GTK_DOC_TRUE@ $(top_srcdir)/common/plugins.xsl $$a > xml/`basename $$a`; done @ENABLE_GTK_DOC_TRUE@ @for f in $(EXAMPLE_CFILES); do \ @ENABLE_GTK_DOC_TRUE@ $(PYTHON) $(top_srcdir)/common/c-to-xml.py $$f > xml/element-`basename $$f .c`.xml; done @ENABLE_GTK_DOC_TRUE@ @gtkdoc-mkdb \ @ENABLE_GTK_DOC_TRUE@ --module=$(DOC_MODULE) \ @ENABLE_GTK_DOC_TRUE@ --source-dir=$(DOC_SOURCE_DIR) \ @ENABLE_GTK_DOC_TRUE@ --expand-content-files="$(expand_content_files)" \ @ENABLE_GTK_DOC_TRUE@ --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) \ @ENABLE_GTK_DOC_TRUE@ --output-format=xml \ @ENABLE_GTK_DOC_TRUE@ --ignore-files="$(IGNORE_HFILES) $(IGNORE_CFILES)" \ @ENABLE_GTK_DOC_TRUE@ $(MKDB_OPTIONS) @ENABLE_GTK_DOC_TRUE@ @cp ../version.entities xml @ENABLE_GTK_DOC_TRUE@ @touch sgml-build.stamp @ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### html #### @ENABLE_GTK_DOC_TRUE@html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Building HTML' @ENABLE_GTK_DOC_TRUE@ @rm -rf html @ENABLE_GTK_DOC_TRUE@ @mkdir html @ENABLE_GTK_DOC_TRUE@ @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html @ENABLE_GTK_DOC_TRUE@ @for f in $(content_files); do cp $(srcdir)/$$f html; done @ENABLE_GTK_DOC_TRUE@ @cp -pr xml html @ENABLE_GTK_DOC_TRUE@ @cp ../version.entities html @ENABLE_GTK_DOC_TRUE@ @mkhtml_options=""; \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ @ENABLE_GTK_DOC_TRUE@ if test "$(?)" = "0"; then \ @ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \ @ENABLE_GTK_DOC_TRUE@ mkhtml_options="$$mkhtml_options --verbose"; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) @ENABLE_GTK_DOC_TRUE@ @mv html/index.sgml html/index.sgml.bak @ENABLE_GTK_DOC_TRUE@ @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_API_VERSION@\//g" html/index.sgml.bak >html/index.sgml @ENABLE_GTK_DOC_TRUE@ @rm -f html/index.sgml.bak @ENABLE_GTK_DOC_TRUE@ @rm -f html/$(DOC_MAIN_SGML_FILE) @ENABLE_GTK_DOC_TRUE@ @rm -rf html/xml @ENABLE_GTK_DOC_TRUE@ @rm -f html/version.entities @ENABLE_GTK_DOC_TRUE@ @test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \ @ENABLE_GTK_DOC_TRUE@ if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done @ENABLE_GTK_DOC_TRUE@ @echo ' DOC Fixing cross-references' @ENABLE_GTK_DOC_TRUE@ @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @ENABLE_GTK_DOC_TRUE@ @touch html-build.stamp @ENABLE_GTK_DOC_TRUE@clean-local-gtkdoc: @ENABLE_GTK_DOC_TRUE@ @rm -rf xml tmpl html # clean files copied for nonsrcdir templates build @ENABLE_GTK_DOC_TRUE@ @if test x"$(srcdir)" != x. ; then \ @ENABLE_GTK_DOC_TRUE@ rm -rf $(SCANOBJ_FILES) $(SCAN_FILES) $(REPORT_FILES) \ @ENABLE_GTK_DOC_TRUE@ $(MAINTAINER_DOC_STAMPS); \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_FALSE@all-local: @ENABLE_GTK_DOC_FALSE@clean-local-gtkdoc: clean-local: clean-local-gtkdoc rm -f *~ *.bak rm -rf .libs distclean-local: @rm -f $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @rm -rf tmpl/*.sgml.bak @rm -f $(DOC_MODULE).hierarchy @rm -f *.stamp || true @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(DOC_MODULE)-docs.sgml ; \ rm -f $(DOC_MODULE).types ; \ rm -f $(DOC_MODULE).interfaces ; \ rm -f $(DOC_MODULE)-overrides.txt ; \ rm -f $(DOC_MODULE).prerequisites ; \ rm -f $(DOC_MODULE)-sections.txt ; \ rm -rf tmpl/*.sgml ; \ rm -rf $(INSPECT_DIR); \ fi @rm -rf *.o # thomas: make docs parallel installable; devhelp requires majorminor too install-data-local: (installfiles=`echo $(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css`; \ if test "$$installfiles" = '$(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css'; \ then echo '-- Nothing to install' ; \ else \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ pngfiles=`echo ./html/*.png`; \ if test "$$pngfiles" != './html/*.png'; then \ for i in $$pngfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ fi; \ echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \ if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \ $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \ $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@FS_APIVERSION@.devhelp2; \ fi; \ (which gtkdoc-rebase >/dev/null && \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \ fi) uninstall-local: if test -d $(DESTDIR)$(TARGET_DIR); then \ rm -rf $(DESTDIR)$(TARGET_DIR)/*; \ rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \ else \ echo '-- Nothing to uninstall' ; \ fi; # # Checks # @ENABLE_GTK_DOC_TRUE@check-hierarchy: $(DOC_MODULE).hierarchy @ENABLE_GTK_DOC_TRUE@ @if grep ' ' $(DOC_MODULE).hierarchy; then \ @ENABLE_GTK_DOC_TRUE@ echo "$(DOC_MODULE).hierarchy contains tabs, please fix"; \ @ENABLE_GTK_DOC_TRUE@ /bin/false; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@check: check-hierarchy check-inspected-versions: @echo Checking plugin versions of inspected plugin data ...; \ fail=0 ; \ for each in $(inspect_files) ; do \ if (grep -H '' $$each | grep -v '$(VERSION)'); then \ echo $$each should be fixed to say version $(VERSION) or be removed ; \ echo "sed -i -e 's//$(VERSION)<\/version>/'" $$each; \ echo ; \ fail=1; \ fi ; \ done ; \ exit $$fail scanobj-trans-update: -rm scanobj-trans-build.stamp $(MAKE) scanobj-trans-build.stamp # We have a scanobj-build.stamp just to prevent both from running at the same # time as they use temp files with the same name scanobj-trans-build.stamp: $(SCANOBJ_DEPS) $(basefiles) scanobj-build.stamp farstream-transmitters.types @echo '*** Scanning Transmitters ***' if test x"$(srcdir)" = x. ; then \ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/ext \ GST_REGISTRY=$(INSPECT_REGISTRY) \ FS_PLUGIN_PATH="$(FS_PLUGIN_PATH)" \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ $(srcdir)/gtkdoc-scangobj-transmitters \ --type-init-func="gst_init(NULL,NULL)" \ --types=farstream-transmitters.types \ --module=$(DOC_MODULE) && \ $(PYTHON) \ $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \ fi touch scanobj-trans-build.stamp check-outdated-docs: $(AM_V_GEN)echo Checking for outdated plugin inspect data ...; \ fail=0 ; \ if [ -d $(top_srcdir)/.git/ ]; then \ files=`find $(srcdir)/inspect/ -name '*xml'`; \ for f in $$files; do \ ver=`grep '$(PACKAGE_VERSION)' $$f`; \ if test "x$$ver" = "x"; then \ plugin=`echo $$f | sed -e 's/^.*plugin-//' -e 's/.xml//'`; \ # echo "Checking $$plugin $$f"; \ pushd "$(top_srcdir)" >/dev/null; \ pinit=`git grep -A3 GST_PLUGIN_DEFINE -- ext/ gst/ sys/ | grep "\"$$plugin\""`; \ popd >/dev/null; \ # echo "[$$pinit]"; \ if test "x$$pinit" = "x"; then \ printf " **** outdated docs for plugin %-15s: %s\n" $$plugin $$f; \ fail=1; \ fi; \ fi; \ done; \ fi ; \ exit $$fail # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false # FIXME: decide whether we want to dist generated html or not # also this only works, if the project has been build before # we could dist html only if its there, but that might lead to missing html in # tarballs dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/html cp html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs check-outdated-docs inspect # avoid spurious build errors when distchecking with -jN .NOTPARALLEL: # 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: farstream-0.2.7/docs/plugins/Makefile.am0000664000076400007640000001316712461773672015133 00000000000000GST_DOC_SCANOBJ = $(top_srcdir)/common/gstdoc-scangobj ## Process this file with automake to produce Makefile.in # The name of the module, e.g. 'glib'. #DOC_MODULE=gst-plugins-libs-@GST_API_VERSION@ MODULE=farstream DOC_MODULE=$(MODULE)-plugins # generated basefiles #basefiles = \ ## $(DOC_MODULE).types \ # $(DOC_MODULE)-sections.txt \ # $(DOC_MODULE)-docs.sgml # ugly hack to make -unused.sgml work #unused-build.stamp: # BUILDDIR=`pwd` && \ # cd $(srcdir)/tmpl && \ # ln -sf gstreamer-libs-unused.sgml \ # $$BUILDDIR/tmpl/gstreamer-libs-@GST_API_VERSION@-unused.sgml # touch unused-build.stamp # these rules are added to create parallel docs using GST_API_VERSION #$(basefiles): gstreamer-libs-@GST_API_VERSION@%: gstreamer-libs% # cp $< $@ #CLEANFILES = $(basefiles) # The top-level SGML file. Change it if you want. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(top_srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting functions and macros. DOC_SOURCE_DIR = $(top_srcdir) # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--sgml-mode # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS=--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html \ --extra-dir=$(GST_PREFIX)/share/gtk-doc/html \ --extra-dir=$(datadir)/gtk-doc/html # Used for dependencies. HFILE_GLOB=$(DOC_SOURCE_DIR)/gst/*/*.h $(DOC_SOURCE_DIR)/transmitters/*/*.h CFILE_GLOB=$(DOC_SOURCE_DIR)/gst/*/*.c $(DOC_SOURCE_DIR)/transmitters/*/*.c # this is a wingo addition # thomasvs: another nice wingo addition would be an explanation on why # this is useful ;) SCANOBJ_DEPS = \ $(top_builddir)/transmitters/multicast/libmulticast-transmitter.la \ $(top_builddir)/transmitters/rawudp/librawudp-transmitter.la \ $(top_builddir)/transmitters/nice/libnice-transmitter.la \ $(top_builddir)/transmitters/shm/libshm-transmitter.la \ $(top_builddir)/gst/fsrtpconference/libfsrtpconference_doc.la \ $(top_builddir)/gst/fsmsnconference/libfsmsnconference_doc.la \ $(top_builddir)/gst/fsrawconference/libfsrawconference_doc.la \ $(top_builddir)/gst/fsvideoanyrate/libfsvideoanyrate.la \ $(top_builddir)/gst/fsrtpxdata/libfsrtpxdata.la # Header files to ignore when scanning. IGNORE_HFILES = IGNORE_CFILES = # we add all .h files of elements that have signals/args we want # sadly this also pulls in the private methods - maybe we should # move those around in the source ? # also, we should add some stuff here conditionally based on whether # or not the plugin will actually build # but I'm not sure about that - it might be this Just Works given that # the registry won't have the element EXTRA_HFILES = \ $(top_srcdir)/gst/fsvideoanyrate/videoanyrate.h \ $(top_srcdir)/gst/fsrtpxdata/fsrtpxdatapay.h \ $(top_srcdir)/gst/fsrtpxdata/fsrtpxdatadepay.h \ $(top_srcdir)/gst/fsrtpconference/fs-rtp-conference.h \ $(top_srcdir)/gst/fsrtpconference/fs-rtp-session.h \ $(top_srcdir)/gst/fsrtpconference/fs-rtp-stream.h \ $(top_srcdir)/gst/fsrtpconference/fs-rtp-participant.h \ $(top_srcdir)/gst/fsrawconference/fs-raw-conference.h \ $(top_srcdir)/gst/fsrawconference/fs-raw-session.h \ $(top_srcdir)/gst/fsrawconference/fs-raw-stream.h \ $(top_srcdir)/gst/fsrawconference/fs-raw-participant.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-cam-recv-conference.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-cam-send-conference.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-conference.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-session.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-stream.h \ $(top_srcdir)/gst/fsmsnconference/fs-msn-participant.h \ $(top_srcdir)/transmitters/rawudp/fs-rawudp-transmitter.h \ $(top_srcdir)/transmitters/rawudp/fs-rawudp-stream-transmitter.h \ $(top_srcdir)/transmitters/multicast/fs-multicast-transmitter.h \ $(top_srcdir)/transmitters/multicast/fs-multicast-stream-transmitter.h \ $(top_srcdir)/transmitters/nice/fs-nice-transmitter.h \ $(top_srcdir)/transmitters/nice/fs-nice-stream-transmitter.h \ $(top_srcdir)/transmitters/shm/fs-shm-transmitter.h \ $(top_srcdir)/transmitters/shm/fs-shm-stream-transmitter.h # Images to copy into HTML directory. HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). content_files = # Other files to distribute. extra_files = \ farstream-transmitters.types.in \ gtkdoc-scangobj-transmitters farstream-transmitters.types: farstream-transmitters.types.in Makefile cat $< > $@ for i in "$(FS_TRANSMITTER_PLUGINS_SELECTED)"; do \ echo "${i}" >> $@ ;\ done CLEANFILES = farstream-transmitters.types # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = $(GST_BASE_CFLAGS) -I$(top_builddir) -I$(top_builddir)/gst-libs GTKDOC_LIBS = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(top_builddir)/gst/fsrtpconference/libfsrtpconference_doc.la \ $(top_builddir)/gst/fsrawconference/libfsrawconference_doc.la \ $(top_builddir)/gst/fsmsnconference/libfsmsnconference_doc.la \ $(GST_BASE_LIBS) GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC) GTKDOC_LD=$(LIBTOOL) --tag=CC --mode=link $(CC) # If you need to override some of the declarations, place them in this file # and uncomment this line. #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt DOC_OVERRIDES = FS_PLUGIN_PATH=$(top_builddir)/transmitters/rawudp/.libs:$(top_builddir)/transmitters/multicast/.libs:$(top_builddir)/transmitters/nice/.libs:$(top_builddir)/transmitters/shm/.libs update-all: scanobj-trans-build.stamp update include $(top_srcdir)/common-modified/gtk-doc-plugins.mak farstream-0.2.7/docs/plugins/html/0000775000076400007640000000000012462323000014064 500000000000000farstream-0.2.7/docs/plugins/html/farstream-plugins-FsMsnSession.html0000664000076400007640000000745412462323000022737 00000000000000 Farstream Plugins Manual: FsMsnSession

FsMsnSession

FsMsnSession — A MSN session in a FsMsnConference

Types and Values

Description

There can be only one stream per session.

It can afterwards be modified to pause sending (or receiving) by modifying the “direction” property.

The transmitter parameters to the fs_session_new_stream() function are used to set the initial value of the construct properties of the stream object. This plugin does not use transmitter plugins, so the transmitter parameter itself is ignored.

The codecs preferences can not be modified and the codec is a fixed value. It is always "MIMIC".

Functions

Types and Values

FsMsnSession

typedef struct _FsMsnSession FsMsnSession;
farstream-0.2.7/docs/plugins/html/FsRtpConference.html0000664000076400007640000002000312462323000017713 00000000000000 Farstream Plugins Manual: FsRtpConference

FsRtpConference

FsRtpConference — Farstream RTP Conference Gstreamer Elements

Properties

GstStructure * sdes Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBin
                    ╰── FsConference
                        ╰── FsRtpConference

Implemented Interfaces

FsRtpConference implements GstChildProxy.

Description

This is the core gstreamer element for a RTP conference. It must be added to your pipeline before anything else is done. Then you create the session, participants and streams according to the FsConference interface.

The various sdes property allow you to set the content of the SDES packet in the sent RTCP reports.

Synopsis

Element Information

plugin

fsrtpconference

author

Olivier Crete <olivier.crete@collabora.co.uk>

class

Generic/Bin/RTP

Element Pads

name

sink_%u

direction

sink

presence

sometimes

details

ANY

name

src_%u_%u_%u

direction

source

presence

sometimes

details

ANY

Functions

Types and Values

struct FsRtpConference

struct FsRtpConference;

Property Details

The “sdes” property

  “sdes”                     GstStructure *

SDES items to use for sessions in this conference.

Flags: Read / Write

farstream-0.2.7/docs/plugins/html/farstream-plugins-FsRawParticipant.html0000664000076400007640000000652712462323000023566 00000000000000 Farstream Plugins Manual: FsRawParticipant

FsRawParticipant

FsRawParticipant — A Raw participant in a FsRawConference

Types and Values

Description

This object represents one participant or person in a raw conference

Functions

Types and Values

struct FsRawParticipant

struct FsRawParticipant {
  FsParticipant parent;
  FsRawParticipantPrivate *priv;
};
farstream-0.2.7/docs/plugins/html/FsRtpSession.html0000664000076400007640000003037112462323000017300 00000000000000 Farstream Plugins Manual: FsRtpSession

FsRtpSession

FsRtpSession — A RTP session in a FsRtpConference

Properties

gint no-rtcp-timeout Read / Write
FsRtpHeaderExtensionGList * rtp-header-extension-preferences Read / Write
FsRtpHeaderExtensionGList * rtp-header-extensions Read
guint send-bitrate Read / Write
guint ssrc Read / Write
GObject * internal-session Read

Types and Values

struct FsRtpSession

Object Hierarchy

    GObject
    ╰── FsSession
        ╰── FsRtpSession

Description

This object represents one session, it is created by called fs_conference_new_session() on a FsRtpConference. It can be either Audio or Video. It also represents data send with one and only one SSRC (although if there is a SSRC collision, that SSRC may change).

Codec profiles

It is possible to define "codec profiles", that is non-autodetected encoding and decoding pipelines for codecs. It is even possible to declare entirely new codecs using this method. To create a profile for a codec, add it to the codec-preferences with special optional parameters called "farstream-send-profile" and "farstream-recv-profile", these should contain gst-launch style descriptions of the encoding or decoding bin. As a special case, encoding profiles can have more than one unconnected source pad, all of these pads should produce application/x-rtp of some kind. The profile will be ignored if not ALL pads match currently negotiated codecs. Also, it is possible to declare profiles with only a decoding pipeline, you will only be able to receive from this codec, the encoding may be a secondary pad of some other codec.


SRTP signature and encryption

To tell FsRtpSession to authenticate encrypt the media it is sending using SRTP, one must set the parameters using a GstStructure named "FarstreamSRTP" and passing it to fs_session_set_encryption_parameters(). The cipher, auth, and key must be specified:

FarstreamSRTP

"rtp-cipher" and "rtcp-cipher" gchar *

Encryption algorithm

Possible values: "null", "aes-128-icm" or "aes-256-icm"

"cipher" gchar *

Default value for "rtp-cipher" and "rtcp-cipher"

Possible values: "null", "aes-128-icm" or "aes-256-icm"

"rtp-auth" and "rtcp-auth" gchar *

Authentication algorithm, can never be null

Possible values: "hmac-sha1-32" or "hmac-sha1-80"

"auth" gchar *

Default value for "rtp-auth" and "rtcp-auth"

Possible values: "hmac-sha1-32" or "hmac-sha1-80"

"key" GstBuffer Size must be 30 if cipher is "aes-128-icm" and 46 if cipher is "aes-256-icm"

Functions

Types and Values

struct FsRtpSession

struct FsRtpSession;

Property Details

The “no-rtcp-timeout” property

  “no-rtcp-timeout”          gint

This is the time (in ms) after which data received without RTCP is attached the FsStream, this only works if there is only one FsStream. -1 will wait forever. 0 will not wait for RTCP and attach it immediataly to the FsStream and prohibit the creation of a second FsStream.

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: 7000


The “rtp-header-extension-preferences” property

  “rtp-header-extension-preferences” FsRtpHeaderExtensionGList *

GList of RTP Header extensions that are locally supported and desired by the application.

Flags: Read / Write


The “rtp-header-extensions” property

  “rtp-header-extensions”    FsRtpHeaderExtensionGList *

GList of RTP Header extensions that have been negotiated and will be used when sending of receiving RTP packets.

Flags: Read


The “send-bitrate” property

  “send-bitrate”             guint

The bitrate that the session will try to send at in bits/sec.

Flags: Read / Write

Default value: 0


The “ssrc” property

  “ssrc”                     guint

This is the current SSRC used to send data (defaults to a random value).

Flags: Read / Write

Default value: 0


The “internal-session” property

  “internal-session”         GObject *

Internal RTPSession object from rtpbin.

Flags: Read

farstream-0.2.7/docs/plugins/html/FsRawConference.html0000664000076400007640000001463112462323000017711 00000000000000 Farstream Plugins Manual: FsRawConference

FsRawConference

FsRawConference — Farstream Raw Conference Gstreamer Elements Base class

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBin
                    ╰── FsConference
                        ╰── FsRawConference

Implemented Interfaces

FsRawConference implements GstChildProxy.

Description

This element implements a raw content stream over which any Gstreamer content may travel.

Synopsis

Element Information

plugin

fsrawconference

author

Erik Walthinsen <omega@cse.ogi.edu>,Wim Taymans <wim.taymans@gmail.com>

class

Generic/Bin

Element Pads

name

sink_%d

direction

sink

presence

sometimes

details

ANY

name

src_%d

direction

source

presence

sometimes

details

ANY

Functions

Types and Values

struct FsRawConference

struct FsRawConference;

farstream-0.2.7/docs/plugins/html/farstream-plugins-FsMsnStream.html0000664000076400007640000001065412462323000022543 00000000000000 Farstream Plugins Manual: FsMsnStream

FsMsnStream

FsMsnStream — A MSN stream in a FsMsnSession in a FsMsnConference

Types and Values

struct FsMsnStream

Description

The “direction” property can be used to pause the stream, but not to change the direction between sending and receiving since this protocol is unidirectional.

The "foundation" field of the local FsCandidate contains the "recipient-id" that must be transmitted to the peer.

The session id can either be retrieved as a property, but it is also put into every FsCandidate in the "username" field.

If the peer started the webcam session, it picks the session-id, it can then be set either in the transmitter parameters field of fs_session_new_stream() or by putting it in the "username" field of the remote FsCandidate.

Functions

Types and Values

struct FsMsnStream

struct FsMsnStream {
  FsStream parent;
};
farstream-0.2.7/docs/plugins/html/pt02.html0000664000076400007640000000514612462323000015465 00000000000000 Farstream Plugins Manual: Part II. Transmitters

Part II. Transmitters

Table of Contents

FsRawUdpStreamTransmitter — A stream transmitter object for UDP with STUN
FsMulticastStreamTransmitter — A stream transmitter object for Multicast UDP
FsNiceStreamTransmitter — A stream transmitter object for ICE using libnice
FsShmStreamTransmitter — A stream transmitter object for Shared Memory
farstream-0.2.7/docs/plugins/html/farstream-plugins-FsMulticastStreamTransmitter.html0000664000076400007640000001327612462323000026213 00000000000000 Farstream Plugins Manual: FsMulticastStreamTransmitter

FsMulticastStreamTransmitter

FsMulticastStreamTransmitter — A stream transmitter object for Multicast UDP

Types and Values

Description

The multicast transmitter allows data to be sent over and received from multicasted UDP on IPv4.

This stream transmitter never emits local candidates. It will listen to the port specified in the remote candidate. And will also send to that port. It accepts only a single remote candidate per component, if a new one is given, it will replace the previous one for that component.

The transmitter will only stop sending to a multicast group when all of its StreamTransmitters that have this multicast group as destination have their "sending" property set to false. Multiple stream transmitters can point to the same multicast groups from the same Transmitter (session), and only one copy of each packet will be received.

It will only listen to and send from the IP specified in the prefered-local-candidates. There can be only one preferred candidate per component. Only the component_id and the ip will be used from the preferred local candidates, everything else is ignored.

Packets sent will be looped back (so that other clients on the same session can be on the same machine.

The name of this transmitter is "multicast".

Functions

Types and Values

struct FsMulticastStreamTransmitter

struct FsMulticastStreamTransmitter {
  FsStreamTransmitter parent;
};

All members are private, access them using methods and properties

Members

FsStreamTransmitter parent;

Parent object

 
farstream-0.2.7/docs/plugins/html/farstream-plugins-FsShmStreamTransmitter.html0000664000076400007640000001575712462323000025003 00000000000000 Farstream Plugins Manual: FsShmStreamTransmitter

FsShmStreamTransmitter

FsShmStreamTransmitter — A stream transmitter object for Shared Memory

Types and Values

Description

The name of this transmitter is "shm".

This transmitter is meant to send and received the data from another process on the same system while minimizing the memory pressure associated with the use of sockets.

Two sockets are used to control the shared memory areas. One is used to send data and one to receive data. The receiver always connects to the sender. The sender socket must exist before the receiver connects to it.

Negotiating the paths of the sockets can happen in two ways. If the create-local-candidates is True then the transmitter will generate the path of the local candidate and us it as the ip filed in FsCandidate. The transmitter will expect the path of the applications sender socket to be in the "ip" field of the remote candidates FsCandidate as well.

Or alternatively, if create-local-candidates is false then the sender socket can be created by giving the transmitter a candidate with the path of the socket in the "ip" field of the FsCandidate. This FsCandidate can be given to the FsStreamTransmitter in two ways, either by setting the “preferred-local-candidates” property or by calling the fs_stream_transmitter_force_remote_candidates() function. There can be only one single send socket per stream. When the send socket is ready to be connected to, “new-local-candidate” signal will be emitted.

To connect the receive side to the other application, one must create a FsCandidate with the path of the sender's socket in the "username" field. If the receiver can not connect to the sender, the fs_stream_transmitter_force_remote_candidates() call will fail.

Functions

Types and Values

struct FsShmStreamTransmitter

struct FsShmStreamTransmitter {
  FsStreamTransmitter parent;
};

All members are private, access them using methods and properties

Members

FsStreamTransmitter parent;

Parent object

 
farstream-0.2.7/docs/plugins/html/FsMsnParticipant.html0000664000076400007640000000737012462323000020126 00000000000000 Farstream Plugins Manual: FsMsnParticipant

FsMsnParticipant

FsMsnParticipant — A MSN participant in a FsMsnConference

Types and Values

Object Hierarchy

    GObject
    ╰── FsParticipant
        ╰── FsMsnParticipant

Description

This object represents one participant or person in a conference

Functions

Types and Values

struct FsMsnParticipant

struct FsMsnParticipant;
farstream-0.2.7/docs/plugins/html/style.css0000644000076400007640000002077012462323000015662 00000000000000body { font-family: cantarell, sans-serif; } .synopsis, .classsynopsis { /* tango:aluminium 1/2 */ background: #eeeeec; background: rgba(238, 238, 236, 0.5); border: solid 1px rgb(238, 238, 236); padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ /* fallback for no rgba support */ background: #e6f3ff; border: solid 1px #729fcf; background: rgba(114, 159, 207, 0.1); border: solid 1px rgba(114, 159, 207, 0.2); padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a, a:visited { text-decoration: none; /* tango:sky blue 2 */ color: #3465a4; } a:hover { text-decoration: underline; /* tango:sky blue 1 */ color: #729fcf; } div.informaltable table { border-collapse: separate; border-spacing: 1em 0.5em; border: none; } div.informaltable table td, div.informaltable table th { vertical-align: top; } .function_type, .variable_type, .property_type, .signal_type, .parameter_name, .struct_member_name, .union_member_name, .define_keyword, .datatype_keyword, .typedef_keyword { text-align: right; } /* dim non-primary columns */ .c_punctuation, .function_type, .variable_type, .property_type, .signal_type, .define_keyword, .datatype_keyword, .typedef_keyword, .property_flags, .signal_flags, .parameter_annotations, .enum_member_annotations, .struct_member_annotations, .union_member_annotations { color: #888a85; } .function_type a, .function_type a:visited, .function_type a:hover, .property_type a, .property_type a:visited, .property_type a:hover, .signal_type a, .signal_type a:visited, .signal_type a:hover, .signal_flags a, .signal_flags a:visited, .signal_flags a:hover { color: #729fcf; } td p { margin: 0.25em; } div.table table { border-collapse: collapse; border-spacing: 0px; /* tango:aluminium 3 */ border: solid 1px #babdb6; } div.table table td, div.table table th { /* tango:aluminium 3 */ border: solid 1px #babdb6; padding: 3px; vertical-align: top; } div.table table th { /* tango:aluminium 2 */ background-color: #d3d7cf; } h4 { color: #555753; } hr { /* tango:aluminium 1 */ color: #d3d7cf; background: #d3d7cf; border: none 0px; height: 1px; clear: both; margin: 2.0em 0em 2.0em 0em; } dl.toc dt { padding-bottom: 0.25em; } dl.toc > dd > dl > dt { padding-top: 0.25em; padding-bottom: 0.25em; } dl.toc > dt { padding-top: 1em; padding-bottom: 0.5em; font-weight: bold; } .parameter { font-style: normal; } .footer { padding-top: 3.5em; /* tango:aluminium 3 */ color: #babdb6; text-align: center; font-size: 80%; } .informalfigure, .figure { margin: 1em; } .informalexample, .example { margin-top: 1em; margin-bottom: 1em; } .warning { /* tango:orange 0/1 */ background: #ffeed9; background: rgba(252, 175, 62, 0.1); border-color: #ffb04f; border-color: rgba(252, 175, 62, 0.2); } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; background: rgba(138, 226, 52, 0.1); border-color: #abf562; border-color: rgba(138, 226, 52, 0.2); } div.blockquote { border-color: #eeeeec; } .note, .warning, div.blockquote { padding: 0.5em; border-width: 1px; border-style: solid; margin: 2em; } .note p, .warning p { margin: 0; } div.warning h3.title, div.note h3.title { display: none; } p + div.section { margin-top: 1em; } div.refnamediv, div.refsynopsisdiv, div.refsect1, div.refsect2, div.toc, div.section { margin-bottom: 1em; } /* blob links */ h2 .extralinks, h3 .extralinks { float: right; /* tango:aluminium 3 */ color: #babdb6; font-size: 80%; font-weight: normal; } .lineart { color: #d3d7cf; font-weight: normal; } .annotation { /* tango:aluminium 5 */ color: #555753; font-weight: normal; } .structfield { font-style: normal; font-weight: normal; } acronym,abbr { border-bottom: 1px dotted gray; } /* code listings */ .listing_code .programlisting .normal, .listing_code .programlisting .normal a, .listing_code .programlisting .number, .listing_code .programlisting .cbracket, .listing_code .programlisting .symbol { color: #555753; } .listing_code .programlisting .comment, .listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ .listing_code .programlisting .function, .listing_code .programlisting .function a, .listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ .listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ .listing_code .programlisting .keyword, .listing_code .programlisting .usertype, .listing_code .programlisting .type, .listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; border: solid 1px rgba(114, 159, 207, 0.2); padding: 0px; } .listing_lines, .listing_code { margin-top: 0px; margin-bottom: 0px; padding: 0.5em; } .listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; background: rgba(114, 159, 207, 0.2); /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; background: rgba(114, 159, 207, 0.1); } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; background: none; } .listing_lines pre, .listing_code pre { margin: 0px; } @media screen { sup a.footnote { position: relative; top: 0em ! important; } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] { display: inline-block; position: relative; top:-5em; } /* this seems to be a bug in the xsl style sheets when generating indexes */ div.index div.index { top: 0em; } /* make space for the fixed navigation bar and add space at the bottom so that * link targets appear somewhat close to top */ body { padding-top: 2.5em; padding-bottom: 500px; max-width: 60em; } p { max-width: 60em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; background: #e2e2e2; border-bottom: solid 1px #babdb6; border-spacing: 5px; margin-top: 0; margin-bottom: 0; top: 0; left: 0; z-index: 10; } table.navigation#top td { padding-left: 6px; padding-right: 6px; } .navigation a, .navigation a:visited { /* tango:sky blue 3 */ color: #204a87; } .navigation a:hover { /* tango:sky blue 2 */ color: #3465a4; } td.shortcuts { /* tango:sky blue 2 */ color: #3465a4; font-size: 80%; white-space: nowrap; } td.shortcuts .dim { color: #babdb6; } .navigation .title { font-size: 80%; max-width: none; margin: 0px; font-weight: normal; } } @media screen and (min-width: 60em) { /* screen larger than 60em */ body { margin: auto; } } @media screen and (max-width: 60em) { /* screen less than 60em */ #nav_hierarchy { display: none; } #nav_interfaces { display: none; } #nav_prerequisites { display: none; } #nav_derived_interfaces { display: none; } #nav_implementations { display: none; } #nav_child_properties { display: none; } #nav_style_properties { display: none; } #nav_index { display: none; } #nav_glossary { display: none; } .gallery_image { display: none; } .property_flags { display: none; } .signal_flags { display: none; } .parameter_annotations { display: none; } .enum_member_annotations { display: none; } .struct_member_annotations { display: none; } .union_member_annotations { display: none; } /* now that a column is hidden, optimize space */ col.parameters_name { width: auto; } col.parameters_description { width: auto; } col.struct_members_name { width: auto; } col.struct_members_description { width: auto; } col.enum_members_name { width: auto; } col.enum_members_description { width: auto; } col.union_members_name { width: auto; } col.union_members_description { width: auto; } .listing_lines { display: none; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; background: #e2e2e2; border: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; } } farstream-0.2.7/docs/plugins/html/up-insensitive.png0000644000076400007640000000056612462323000017501 00000000000000PNG  IHDRabKGD pHYs B(xtIMEwIIDAT8?/Qϙ?[u$VHTDۈBM+! Farstream Plugins Manual: Part I. Plugins implementing FsConference

Part I. Plugins implementing FsConference

Table of Contents

RTP Plugin
FsRtpConference — Farstream RTP Conference Gstreamer Elements
FsRtpParticipantA RTP participant in a FsRtpConference
FsRtpSessionA RTP session in a FsRtpConference
FsRtpStreamA RTP stream in a FsRtpSession in a FsRtpConference
Raw Plugin
FsRawConference — Farstream Raw Conference Gstreamer Elements Base class
FsRawParticipantA Raw participant in a FsRawConference
FsRawSessionA Raw session in a FsRawConference
FsRawStreamA raw stream in a FsRawSession in a FsRawConference
MSN Webcam plugin
FsMsnCamSendConference — Farstream MSN send Conference Gstreamer Element
FsMsnCamCamRecvConference — Farstream MSN Receive Conference Gstreamer Element
FsMsnConference — Farstream MSN Conference Gstreamer Elements Base class
FsMsnParticipantA MSN participant in a FsMsnConference
FsMsnSessionA MSN session in a FsMsnConference
FsMsnStreamA MSN stream in a FsMsnSession in a FsMsnConference
farstream-0.2.7/docs/plugins/html/farstream-plugins-FsRawUdpStreamTransmitter.html0000664000076400007640000001460612462323000025446 00000000000000 Farstream Plugins Manual: FsRawUdpStreamTransmitter

FsRawUdpStreamTransmitter

FsRawUdpStreamTransmitter — A stream transmitter object for UDP with STUN

Types and Values

Description

This transmitter sends and receives unicast UDP packets.

It will detect its own address using a STUN request if the “stun-ip” and “stun-port” properties are set. If the STUN request does not get a reply or no STUN is requested. It will return the IP address of all the local network interfaces, listing link-local addresses after other addresses and the loopback interface last.

You can configure the address and port it will listen on by setting the "preferred-local-candidates" property. This property will contain a GList of FsCandidate. These FsCandidate must be for FS_NETWORK_PROTOCOL_UDP. These port and/or the ip can be set on these candidates to force them, and this is per-component. If not all components have a port set, the following components will be on the following ports. There is no guarantee that the requested port will be available so a different port may the native candidate. But it is guaranteed that components that do not have specified ports will be sequential.

Example: Candidate {proto=UDP, component_id=RTP, ip=NULL, port=9098} will produce native candidates ({component_id=RTP, ip=IP, port=9078},{component_id=RTCP, ip=IP, port=9079}) or if this one is not available ({component_id=RTP, ip=IP, port=9080},{component_id=RTCP, ip=IP, port=9081}). The default port starts at 7078 for the first component.

The name of this transmitter is "rawudp".

Functions

Types and Values

struct FsRawUdpStreamTransmitter

struct FsRawUdpStreamTransmitter {
  FsStreamTransmitter parent;
};

All members are private, access them using methods and properties

Members

FsStreamTransmitter parent;

Parent object

 
farstream-0.2.7/docs/plugins/html/left-insensitive.png0000644000076400007640000000061312462323000020000 00000000000000PNG  IHDRabKGD pHYs B(xtIMEƫqIDAT8͒NQ@pds`*4@W@ A!Ԇ@6^ 5hxIH R`sQp̙339B|sKEQTK@۝΁i^~Wʆ`0TJ6TcYn6A ƀ~߱>}ǭs; lYkwr 5U= /" "uU=ɲlArDzp5I4^E+P3Ɯq_p ̥iUYp=#IENDB`farstream-0.2.7/docs/plugins/html/FsMsnCamSendConference.html0000664000076400007640000001566112462323000021154 00000000000000 Farstream Plugins Manual: FsMsnCamSendConference

FsMsnCamSendConference

FsMsnCamSendConference — Farstream MSN send Conference Gstreamer Element

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBin
                    ╰── FsConference
                        ╰── FsMsnConference
                            ╰── FsMsnCamSendConference

Implemented Interfaces

FsMsnCamSendConference implements GstChildProxy.

Description

This element implements the unidirection webcam feature found in various version of MSN Messenger (tm) and Windows Live Messenger (tm). This is to send the local webcam's video to someone else.

Synopsis

Element Information

plugin

fsmsnconference

author

Richard Spiers <richard.spiers@gmail.com>, Youness Alaoui <youness.alaoui@collabora.co.uk>, Olivier Crete <olivier.crete@collabora.co.uk>

class

Generic/Bin/MSN

Element Pads

name

sink_%d

direction

sink

presence

sometimes

details

ANY

name

src_%d_%d_%d

direction

source

presence

sometimes

details

ANY

Functions

Types and Values

struct FsMsnCamSendConference

struct FsMsnCamSendConference;

farstream-0.2.7/docs/plugins/html/right.png0000644000076400007640000000040512462323000015624 00000000000000PNG  IHDRabKGD pHYs B(xtIME!GIDAT8үa?MIdEr,-hAIl ry}sX6 !9#D r$-Br$G"$;WZ&!cq \`軀O=QoufIENDB`farstream-0.2.7/docs/plugins/html/farstream-plugins-FsNiceStreamTransmitter.html0000664000076400007640000001073212462323000025116 00000000000000 Farstream Plugins Manual: FsNiceStreamTransmitter

FsNiceStreamTransmitter

FsNiceStreamTransmitter — A stream transmitter object for ICE using libnice

Types and Values

Description

Functions

Types and Values

struct FsNiceStreamTransmitter

struct FsNiceStreamTransmitter {
  FsStreamTransmitter parent;
};

All members are private, access them using methods and properties

Members

FsStreamTransmitter parent;

Parent object

 
farstream-0.2.7/docs/plugins/html/index.html0000664000076400007640000001450512462323000016006 00000000000000 Farstream Plugins Manual: Farstream Plugins Manual

for version 0.2.7. The latest version of this documentation can be found on-line at /http://farstream.freedesktop.org/apidoc/farstream-plugins/. These plugins are to be used with the base classes and other utility objects and functions described in the Farstream Reference Manual.


I. Plugins implementing FsConference
RTP Plugin
FsRtpConference — Farstream RTP Conference Gstreamer Elements
FsRtpParticipantA RTP participant in a FsRtpConference
FsRtpSessionA RTP session in a FsRtpConference
FsRtpStreamA RTP stream in a FsRtpSession in a FsRtpConference
Raw Plugin
FsRawConference — Farstream Raw Conference Gstreamer Elements Base class
FsRawParticipantA Raw participant in a FsRawConference
FsRawSessionA Raw session in a FsRawConference
FsRawStreamA raw stream in a FsRawSession in a FsRawConference
MSN Webcam plugin
FsMsnCamSendConference — Farstream MSN send Conference Gstreamer Element
FsMsnCamCamRecvConference — Farstream MSN Receive Conference Gstreamer Element
FsMsnConference — Farstream MSN Conference Gstreamer Elements Base class
FsMsnParticipantA MSN participant in a FsMsnConference
FsMsnSessionA MSN session in a FsMsnConference
FsMsnStreamA MSN stream in a FsMsnSession in a FsMsnConference
II. Transmitters
FsRawUdpStreamTransmitter — A stream transmitter object for UDP with STUN
FsMulticastStreamTransmitter — A stream transmitter object for Multicast UDP
FsNiceStreamTransmitter — A stream transmitter object for ICE using libnice
FsShmStreamTransmitter — A stream transmitter object for Shared Memory
III. Utility elements
FsVideoanyrate — Removes the framerate from video caps
FsRTPXdataPay — Packetize Microsoft Lync x-data streams into RTP packets
FsRTPXdataDepay — Extracts data from Microsoft Lync RTP x-data packets
farstream-0.2.7/docs/plugins/html/home.png0000644000076400007640000000040012462323000015432 00000000000000PNG  IHDRabKGD pHYs B(xtIME &IDAT8ҽ Aߞf`n v`6`/`Yܡ`f&k$,} 0b+ԸaQW~b O e{y N[L}.piBzmm o.I]7^[;%:VIENDB`farstream-0.2.7/docs/plugins/html/FsRTPXdataPay.html0000664000076400007640000001352512462323000017272 00000000000000 Farstream Plugins Manual: FsRTPXdataPay

FsRTPXdataPay

FsRTPXdataPay — Packetize Microsoft Lync x-data streams into RTP packets

Types and Values

struct FsRTPXdataPay

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstRTPBasePayload
                    ╰── FsRTPXdataPay

Description

Synopsis

Element Information

plugin

fsrtpxdata

author

Olivier Crete <olivier.crete@collabora.com>

class

Codec/Payloader/Network/RTP

Element Pads

name

sink

direction

sink

presence

always

details

ANY

name

src

direction

source

presence

always

details

application/x-rtp, media=(string)application, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)X-DATA

Functions

Types and Values

struct FsRTPXdataPay

struct FsRTPXdataPay;

farstream-0.2.7/docs/plugins/html/ch02.html0000664000076400007640000000474712462323000015442 00000000000000 Farstream Plugins Manual: Raw Plugin

Raw Plugin

FsRawConference — Farstream Raw Conference Gstreamer Elements Base class
FsRawParticipantA Raw participant in a FsRawConference
FsRawSessionA Raw session in a FsRawConference
FsRawStreamA raw stream in a FsRawSession in a FsRawConference
farstream-0.2.7/docs/plugins/html/FsRtpStream.html0000664000076400007640000001567212462323000017117 00000000000000 Farstream Plugins Manual: FsRtpStream

FsRtpStream

FsRtpStream — A RTP stream in a FsRtpSession in a FsRtpConference

Properties

FsRtpHeaderExtensionGList * rtp-header-extensions Read / Write
gboolean send-rtcp-mux Read / Write

Types and Values

struct FsRtpStream

Object Hierarchy

    GObject
    ╰── FsStream
        ╰── FsRtpStream

Description

This is the conjunction of a FsRtpParticipant and a FsRtpSession, it is created by calling fs_session_new_stream() on a FsRtpSession.

SRTP authentication & decryption

To tell FsRtpStream to authenticate and decrypt the media it is receiving using SRTP, one must set the parameters using a GstStructure named "FarstreamSRTP" and pass it to fs_stream_set_decryption_parameters(). The cipher, auth, and key must be specified, refer to the FsRtpSession documentation for details.

Functions

Types and Values

struct FsRtpStream

struct FsRtpStream;

Property Details

The “rtp-header-extensions” property

  “rtp-header-extensions”    FsRtpHeaderExtensionGList *

GList of RTP Header extensions that the participant for this stream would like to use.

Flags: Read / Write


The “send-rtcp-mux” property

  “send-rtcp-mux”            gboolean

Send RTCP muxed with on the same RTP connection.

Flags: Read / Write

Default value: FALSE

farstream-0.2.7/docs/plugins/html/index.sgml0000664000076400007640000005431512462323000016007 00000000000000 farstream-0.2.7/docs/plugins/html/ch03.html0000664000076400007640000000567512462323000015444 00000000000000 Farstream Plugins Manual: MSN Webcam plugin

MSN Webcam plugin

FsMsnCamSendConference — Farstream MSN send Conference Gstreamer Element
FsMsnCamCamRecvConference — Farstream MSN Receive Conference Gstreamer Element
FsMsnConference — Farstream MSN Conference Gstreamer Elements Base class
FsMsnParticipantA MSN participant in a FsMsnConference
FsMsnSessionA MSN session in a FsMsnConference
FsMsnStreamA MSN stream in a FsMsnSession in a FsMsnConference
farstream-0.2.7/docs/plugins/html/farstream-plugins.devhelp20000664000076400007640000001713712462323000021113 00000000000000 farstream-0.2.7/docs/plugins/html/FsVideoanyrate.html0000664000076400007640000001340412462323000017617 00000000000000 Farstream Plugins Manual: FsVideoanyrate

FsVideoanyrate

FsVideoanyrate — Removes the framerate from video caps

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBaseTransform
                    ╰── FsVideoanyrate

Description

This element will remove the framerate from video caps, it is a poor man's videorate for live pipelines.

Synopsis

Element Information

plugin

fsvideoanyrate

author

Olivier Crete <olivier.crete@collabora.com>

class

Filter

Element Pads

name

sink

direction

sink

presence

always

details

ANY

name

src

direction

source

presence

always

details

ANY

Functions

Types and Values

struct FsVideoanyrate

struct FsVideoanyrate;

farstream-0.2.7/docs/plugins/html/right-insensitive.png0000644000076400007640000000056512462323000020171 00000000000000PNG  IHDRabKGD pHYs B(xtIME ^IDAT8͒J` /S_$AqrW(>m"]\(49.Nd39{eM#MSIιEiHz|3{̲l3,KkV'@EEQlwyiq]Kh4:mĦ,;ts\aR5/7'Wps׭I,K1=0j0Wg> PU𻤝0 ]?qCҫιg~kA_IENDB`farstream-0.2.7/docs/plugins/html/farstream-plugins-FsRawSession.html0000664000076400007640000000713512462323000022727 00000000000000 Farstream Plugins Manual: FsRawSession

FsRawSession

FsRawSession — A Raw session in a FsRawConference

Types and Values

Description

The transmitter parameters to the fs_session_new_stream() function are used to set the initial value of the construct properties of the stream object.

The codecs preferences can not be modified. The codec should have the encoding_name property set to the value returned by gst_caps_to_string.

Functions

Types and Values

FsRawSession

typedef struct _FsRawSession FsRawSession;
farstream-0.2.7/docs/plugins/html/FsRtpParticipant.html0000664000076400007640000001203112462323000020124 00000000000000 Farstream Plugins Manual: FsRtpParticipant

FsRtpParticipant

FsRtpParticipant — A RTP participant in a FsRtpConference

Properties

gchar * cname Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── FsParticipant
        ╰── FsRtpParticipant

Description

This object represents one participant or person in a RTP conference

Functions

Types and Values

struct FsRtpParticipant

struct FsRtpParticipant;

Property Details

The “cname” property

  “cname”                    gchar *

A string of the cname of the participant.

Flags: Read / Write

Default value: NULL

farstream-0.2.7/docs/plugins/html/pt03.html0000664000076400007640000000440512462323000015463 00000000000000 Farstream Plugins Manual: Part III. Utility elements

Part III. Utility elements

Table of Contents

FsVideoanyrate — Removes the framerate from video caps
FsRTPXdataPay — Packetize Microsoft Lync x-data streams into RTP packets
FsRTPXdataDepay — Extracts data from Microsoft Lync RTP x-data packets
farstream-0.2.7/docs/plugins/html/farstream-plugins-FsMsnCamCamRecvConference.html0000664000076400007640000001626112462323000025241 00000000000000 Farstream Plugins Manual: FsMsnCamCamRecvConference

FsMsnCamCamRecvConference

FsMsnCamCamRecvConference — Farstream MSN Receive Conference Gstreamer Element

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBin
                    ╰── FsConference
                        ╰── FsMsnConference
                            ╰── FsMsnCamRecvConference

Implemented Interfaces

FsMsnCamRecvConference implements GstChildProxy.

Description

This element implements the unidirection webcam feature found in various version of MSN Messenger (tm) and Windows Live Messenger (tm). This is to receive someone else's webcam.

Synopsis

Element Information

plugin

fsmsnconference

author

Richard Spiers <richard.spiers@gmail.com>, Youness Alaoui <youness.alaoui@collabora.com>, Olivier Crete <olivier.crete@collabora.com>

class

Generic/Bin/MSN

Element Pads

name

sink_%d

direction

sink

presence

sometimes

details

ANY

name

src_%d_%d_%d

direction

source

presence

sometimes

details

ANY

Functions

Types and Values

struct FsMsnCamRecvConference

struct FsMsnCamRecvConference;

farstream-0.2.7/docs/plugins/html/FsRTPXdataDepay.html0000664000076400007640000001332712462323000017603 00000000000000 Farstream Plugins Manual: FsRTPXdataDepay

FsRTPXdataDepay

FsRTPXdataDepay — Extracts data from Microsoft Lync RTP x-data packets

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstRTPBaseDepayload
                    ╰── FsRTPXdataDepay

Description

Synopsis

Element Information

plugin

fsrtpxdata

author

Olivier Crete <olivier.crete@collabora.com>

class

Codec/Depayloader/Network/RTP

Element Pads

name

sink

direction

sink

presence

always

details

application/x-rtp, media=(string)application, encoding-name=(string)X-DATA

name

src

direction

source

presence

always

details

ANY

Functions

Types and Values

struct FsRTPXdataDepay

struct FsRTPXdataDepay;

farstream-0.2.7/docs/plugins/html/ch01.html0000664000076400007640000000467012462323000015434 00000000000000 Farstream Plugins Manual: RTP Plugin

RTP Plugin

FsRtpConference — Farstream RTP Conference Gstreamer Elements
FsRtpParticipantA RTP participant in a FsRtpConference
FsRtpSessionA RTP session in a FsRtpConference
FsRtpStreamA RTP stream in a FsRtpSession in a FsRtpConference
farstream-0.2.7/docs/plugins/html/FsMsnConference.html0000664000076400007640000001234512462323000017715 00000000000000 Farstream Plugins Manual: FsMsnConference

FsMsnConference

FsMsnConference — Farstream MSN Conference Gstreamer Elements Base class

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBin
                    ╰── FsConference
                        ╰── FsMsnConference
                            ├── FsMsnCamRecvConference
                            ╰── FsMsnCamSendConference

Implemented Interfaces

FsMsnConference implements GstChildProxy.

Description

This element implements the unidirection webcam feature found in various version of MSN Messenger (tm) and Windows Live Messenger (tm).

Functions

Types and Values

struct FsMsnConference

struct FsMsnConference;

farstream-0.2.7/docs/plugins/html/up.png0000644000076400007640000000040412462323000015132 00000000000000PNG  IHDRabKGD pHYs B(xtIME IDAT81 @D{xa;$]r =JR1, Sd-}0̟oL:m-QO[ k TzMޠL,:ךu!tK; Pp Ot@l/̵*l}IENDB`farstream-0.2.7/docs/plugins/html/farstream-plugins-FsRawStream.html0000664000076400007640000000774412462323000022545 00000000000000 Farstream Plugins Manual: FsRawStream

FsRawStream

FsRawStream — A raw stream in a FsRawSession in a FsRawConference

Types and Values

struct FsRawStream

Description

This list of remote codecs set on this stream should contain one or two codecs. The first codec in this list represents the codec the remote side will be sending. The second codec, if given, represents what should be sent to the remote side. If only one codec is passed, and the codec to send to the remote side hasn't yet been chosen, it will use the first and only codec in the list.

The codec content of the codec are ignored except for the "encoding_name" parameter which has to be a valid caps string that can be parsed with gst_caps_to_string() to produce fixed caps.

Functions

Types and Values

struct FsRawStream

struct FsRawStream {
  FsStream parent;
};
farstream-0.2.7/docs/plugins/html/left.png0000644000076400007640000000040612462323000015442 00000000000000PNG  IHDRabKGD pHYs B(xtIME,`m;IDAT8үa?DAPY\$[p+IIMlf('}Mpy{_ޥ}^q xZ <=Yj) <04\~+Pl#",Qϑp Iǐlsw>[/]_i03IENDB`farstream-0.2.7/docs/plugins/scanobj-trans-build.stamp0000664000076400007640000000000012462322403017743 00000000000000farstream-0.2.7/docs/plugins/farstream-plugins.signals0000664000076400007640000000160212032675407020102 00000000000000 FsDynamicBin::append void la FsDynamicBin *fsdynamicbin GstElement *arg1 gpointer arg2 gpointer arg3 FsDynamicBin::insert-after void la FsDynamicBin *fsdynamicbin GstElement *arg1 GstElement *arg2 gpointer arg3 gpointer arg4 FsDynamicBin::insert-before void la FsDynamicBin *fsdynamicbin GstElement *arg1 GstElement *arg2 gpointer arg3 gpointer arg4 FsDynamicBin::prepend void la FsDynamicBin *fsdynamicbin GstElement *arg1 gpointer arg2 gpointer arg3 FsDynamicBin::remove void la FsDynamicBin *fsdynamicbin GstElement *arg1 gpointer arg2 gpointer arg3 farstream-0.2.7/docs/plugins/scanobj-build.stamp0000664000076400007640000000000012462322270016620 00000000000000farstream-0.2.7/docs/plugins/farstream-plugins.hierarchy0000664000076400007640000000074312462322403020415 00000000000000GObject GInitiallyUnowned GstObject GstAllocator GstAllocatorSysmem GstBus GstClock GstControlBinding GstControlSource GstElement GstBin GstPipeline GstPad GstPadTemplate GstPlugin GstPluginFeature GstDeviceProviderFactory GstElementFactory GstTypeFindFactory GstRegistry GstTask GstTaskPool GInterface GTypePlugin GstChildProxy GstURIHandler farstream-0.2.7/docs/plugins/farstream-plugins.interfaces0000664000076400007640000000071012100104772020550 00000000000000FsConference GstChildProxy FsDynamicBin GstChildProxy FsIoAudioSink GstChildProxy FsIoAudioSource GstChildProxy FsIoSink GstChildProxy FsIoSource GstChildProxy FsIoVideoSink GstChildProxy FsIoVideoSource GstChildProxy FsMsnCamRecvConference GstChildProxy FsMsnCamSendConference GstChildProxy FsMsnConference GstChildProxy FsRawConference GstChildProxy FsRtpConference GstChildProxy GstBin GstChildProxy GstInsertBin GstChildProxy GstPipeline GstChildProxy farstream-0.2.7/docs/plugins/farstream-plugins-docs.sgml0000664000076400007640000000464712461773672020357 00000000000000 %version-entities; ]> Farstream Plugins Manual for version &FS_VERSION;. The latest version of this documentation can be found on-line at /http://farstream.freedesktop.org/apidoc/farstream-plugins/. These plugins are to be used with the base classes and other utility objects and functions described in the Farstream Reference Manual. Plugins implementing FsConference RTP Plugin Raw Plugin MSN Webcam plugin Transmitters Utility elements farstream-0.2.7/docs/plugins/farstream-transmitters.types.in0000664000076400007640000000004611710041460021256 00000000000000#include farstream-0.2.7/docs/plugins/farstream-plugins.prerequisites0000664000076400007640000000005612024506434021342 00000000000000GstChildProxy GObject GstChildProxy GstObject farstream-0.2.7/docs/plugins/inspect/0000775000076400007640000000000012462323000014565 500000000000000farstream-0.2.7/docs/plugins/inspect/plugin-fsrtpxdata.xml0000664000076400007640000000376612332250474020731 00000000000000 fsrtpxdata Farstream Microsoft Lync x-data RTP plugin ../../gst/fsrtpxdata/.libs/libfsrtpxdata.so libfsrtpxdata.so 0.2.4.1 LGPL farstream Farstream http://www.freedesktop.org/wiki/Software/Farstream fsrtpxdatadepay RTP Depayloader for Microsoft Lync x-data Codec/Depayloader/Network/RTP Extracts data from Microsoft Lync RTP x-data packets Olivier Crete <olivier.crete@collabora.com> sink sink always
application/x-rtp, media=(string)application, encoding-name=(string)X-DATA
src source always
ANY
fsrtpxdatapay RTP Payloader for Microsoft Lync x-data Codec/Payloader/Network/RTP Packetize Microsoft Lync x-data streams into RTP packets Olivier Crete <olivier.crete@collabora.com> sink sink always
ANY
src source always
application/x-rtp, media=(string)application, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)X-DATA
farstream-0.2.7/docs/plugins/inspect/plugin-fsmsnconference.xml0000664000076400007640000000376612332250474021727 00000000000000 fsmsnconference Farstream MSN Conference plugin ../../gst/fsmsnconference/.libs/libfsmsnconference.so libfsmsnconference.so 0.2.4.1 LGPL farstream Farstream http://www.freedesktop.org/wiki/Software/Farstream fsmsncamrecvconference Farstream MSN Reception Conference Generic/Bin/MSN A Farstream MSN Reception Conference Richard Spiers <richard.spiers@gmail.com>, Youness Alaoui <youness.alaoui@collabora.com>, Olivier Crete <olivier.crete@collabora.com> sink_%d sink sometimes
ANY
src_%d_%d_%d source sometimes
ANY
fsmsncamsendconference Farstream MSN Sending Conference Generic/Bin/MSN A Farstream MSN Sending Conference Richard Spiers <richard.spiers@gmail.com>, Youness Alaoui <youness.alaoui@collabora.co.uk>, Olivier Crete <olivier.crete@collabora.co.uk> sink_%d sink sometimes
ANY
src_%d_%d_%d source sometimes
ANY
farstream-0.2.7/docs/plugins/inspect/plugin-fsrtpconference.xml0000664000076400007640000000213212332250474021721 00000000000000 fsrtpconference Farstream RTP Conference plugin ../../gst/fsrtpconference/.libs/libfsrtpconference.so libfsrtpconference.so 0.2.4.1 LGPL farstream Farstream http://www.freedesktop.org/wiki/Software/Farstream fsrtpconference Farstream RTP Conference Generic/Bin/RTP A Farstream RTP Conference Olivier Crete <olivier.crete@collabora.co.uk> sink_%u sink sometimes
ANY
src_%u_%u_%u source sometimes
ANY
farstream-0.2.7/docs/plugins/inspect/plugin-fsvideoanyrate.xml0000664000076400007640000000206312332250474021561 00000000000000 fsvideoanyrate Videoanyrate ../../gst/fsvideoanyrate/.libs/libfsvideoanyrate.so libfsvideoanyrate.so 0.2.4.1 LGPL farstream Farstream http://www.freedesktop.org/wiki/Software/Farstream fsvideoanyrate Videoanyrate element Filter This element removes the framerate from caps Olivier Crete <olivier.crete@collabora.com> sink sink always
ANY
src source always
ANY
farstream-0.2.7/docs/plugins/inspect/plugin-fsrawconference.xml0000664000076400007640000000214012332250474021704 00000000000000 fsrawconference Farstream Raw Conference plugin ../../gst/fsrawconference/.libs/libfsrawconference.so libfsrawconference.so 0.2.4.1 LGPL farstream Farstream http://www.freedesktop.org/wiki/Software/Farstream fsrawconference Generic bin Generic/Bin Simple container object Erik Walthinsen <omega@cse.ogi.edu>,Wim Taymans <wim.taymans@gmail.com> sink_%d sink sometimes
ANY
src_%d source sometimes
ANY
farstream-0.2.7/docs/plugins/farstream-plugins.args0000664000076400007640000000651712374451042017404 00000000000000 FsRtpConference::sdes GstStructure* rw SDES Items for this conference SDES items to use for sessions in this conference. FsRtcpFilter::sending gboolean rw Sending RTP? If set to FALSE, it assumes that all RTP has been dropped. FALSE FsRtpParticipant::cname gchar* rw The cname of the participant A string of the cname of the participant. NULL FsRtpSession::no-rtcp-timeout gint >= G_MAXULONG rw The timeout (in ms) before no RTCP is assumed This is the time (in ms) after which data received without RTCP is attached the FsStream, this only works if there is only one FsStream. -1 will wait forever. 0 will not wait for RTCP and attach it immediataly to the FsStream and prohibit the creation of a second FsStream. 7000 FsRtpSession::rtp-header-extension-preferences FsRtpHeaderExtensionGList* rw Desired RTP header extensions GList of RTP Header extensions that are locally supported and desired by the application. FsRtpSession::rtp-header-extensions FsRtpHeaderExtensionGList* r Currently negotiated RTP header extensions GList of RTP Header extensions that have been negotiated and will be used when sending of receiving RTP packets. FsRtpSession::send-bitrate guint rw The bitrate at which data will be sent The bitrate that the session will try to send at in bits/sec. 0 FsRtpSession::ssrc guint rw The SSRC of the sent data This is the current SSRC used to send data (defaults to a random value). 0 FsRtpSession::internal-session GObject* r Internal RTP Session Internal RTPSession object from rtpbin. FsRtpStream::rtp-header-extensions FsRtpHeaderExtensionGList* rw RTP Header extension desired by participant in this stream GList of RTP Header extensions that the participant for this stream would like to use. FsRtpStream::send-rtcp-mux gboolean rw Send RTCP muxed with on the same RTP connection Send RTCP muxed with on the same RTP connection. FALSE FsIoVideoSink::window-handle guint rw Sink window handle The window_handle of the window in which to embed the video sink. 0 farstream-0.2.7/docs/version.entities.in0000664000076400007640000000011712401500475015224 00000000000000 farstream-0.2.7/NEWS0000664000076400007640000001074012462320210011130 00000000000000farstream 0.2.7 (January 29, 2015) ================================== - Add "send-rtcp-mux" parameters to fsrtpsession - Add MTU and buffer splitting to rtpxdatapay - Fix crash if srtpenc/dec is missing - Bug fixes farstream 0.2.6 (October 9, 2014) ================================ - Add ICE-TCP support - Now require libnice 0.1.8 farstream 0.2.5 (October 9, 2014) ================================ - Add SRTP support - Add API to set allowed input/output caps - Make it possible to have input that is not a raw format - Support formats with no encoders/decoders - Add payloader for the Microsoft Lync x-data format - Ignore ICE-TCP in new libnice - Fix misc bugs - Now require GStreamer 1.4 farstream 0.2.4 (May 5, 2014) ============================= - Install gtk-doc correctly - Adapt SSRC handling to GStreamer 1.2 and newer - Fix BSD build - Assorted bug fixes farstream 0.2.3 (April 15, 2013) ================================ - Use generic marshallers - Fix building by gold linker (Emanuele Aina) - Fix leaks, found by Havard Graff and others - Fix building with automake 1.13 (Nuno Araujo) - Lower PulseAudio latencies (Arun Raghavan) - Fix codec intersection - Add API to make the API be introspection accessible, fixing the Python example - Use GSocket and other win32 portability improvements farstream 0.2.2 (November 13, 2012) ================================= - Update and fix the default properties for vp8enc farstream 0.2.1 (October 4, 2012) ================================= - Fix bug where nothing would be sent - Fix various bugs in ElementAddedNotifier - Fix the GPL headers - Misc bug fixes farstream 0.2.0 (September 25, 2012) ==================================== - Official GStreamer 1.0 release - Ported python example to GStreamer 1.0 and GTK+ 3 - Use GLib 2.32 APIs - Made API more introspection friendly - Ignore Error messages from the decoders - Prefer Opus and VP8 - Various bug fixes farstream 0.1.91 (September 13, 2012) ===================================== - Port to GStreamer 1.0 API farstream 0.1.2 (March 23, 2012) ================================ - Ignore config while comparing send codecs, fixes H.264 and Theora negotation - Require GLib 2.30, do not allow APIs added after and ignore later deprecations - Add default element properties for rawconference - Set better latency/buffer time for pulse src/sink - Remove the buffer-time property on the shm transmitter, because the gst-plugins-bad plugin has a bug, we will restore it once a new gst-plugins-bad version has been released farstream 0.1.1 (February 20, 2012) =================================== - Initial release of Farstream - Not parallel installable with Farsight2 - Added GObject Introspection annotations - Added parser functions for the GstMessages - shm transmiiter:Add a property to control the maximum bufferring time - API changes from Farsight2: * Remove the "error" signal from the participants (they have no methods, no behavior, and emit no errors) * Remove the "cname" parameter from the participant constructor and make the "cname" property specific to RTP and remove it from fs_conference_new_participant() * Remove the debug msg in the error messages * Remove the special hack for ptime in FsCodec and make it a regular parameter * Pass sdes struct as-is to fsrtpconference * Replace FS_DTMF_METHOD_IN_BAND with FS_DTMF_METHOD_SOUND * Return NULL in "codecs" unless they are ready (and "codecs-ready" is not needed anymore) * Replace set_candidates by add_candidates and use force_candidates for rawudp * Set transmitter after creating stream * Fixes possible race: One has a session with one stream, the user creates a new stream, then packets in the new stream come in (with the new stream's cname/ssrc) before the "src-pad-added" signal is connected... ie doesn't link... failure ensues.... solution? Giving the user a chance to link src-pad-added before setting the transmitter ? * Remove fs-interfaces (moved to libnice) * Renamed fs-enum-types.h to fs-enumtypes.h for consistency * Renamed fs-conference-iface.h to fs-conference.h * Rename fs_stream_get_src_pads_iterator() to fs_stream_iterate_src_pads() for consistency * Remove the FS_ERROR_UNKNOWN_CNAME error entirely * Add a _destroy method to session/stream and have the parent keep a ref.. so the session/stream need to be destroyed/closed and we can simplify the teardown code quite a bit * Moved the header files from - Now requires gst-plugins-bad 0.10.23 farstream-0.2.7/AUTHORS0000664000076400007640000000021711710041457011507 00000000000000Olivier Crête Philippe Kalaf Youness Alaoui farstream-0.2.7/README0000664000076400007640000000153512461776647011347 00000000000000Farstream ========== http://www.freedesktop.org/wiki/Software/Farstream Farstream is a collection of GStreamer modules and libraries for videoconferencing. The API is described in the documentation in the docs/ directory. It is distributed under the terms of the GNU Lesser General Public License version 2.1 or later (see the COPYING file for details). Requirements ============ Build time: - gstreamer 1.4.0 - gst-plugins-base 1.4.0 - glib 2.32 - libnice 0.1.8 - gobject-introspection 0.10.1 For UPnP support: - GUPnP-IGD Run time for the RTP plugin: All of the build time requirements (except gtk-doc) plus - gst-plugins-good 1.4.0 - gst-plugins-bad 1.4.0 Run time for the MSN plugin: - gst-plugins-bad 1.4.0 For the GUI example: - Gtk 3.0 The tests require gst-check and GStreamer 1.0.1 Building the documentation requires gtk-doc 1.8 farstream-0.2.7/farstream-uninstalled.pc.in0000664000076400007640000000071312401500475015673 00000000000000prefix= exec_prefix= abs_top_srcdir=@abs_top_srcdir@ abs_top_builddir=@abs_top_builddir@ includedir=@includedir@/farstream-@FS_APIVERSION@ pluginsdir=@libdir@/farstream-@FS_APIVERSION@ Name: Farstream Description: Farstream base classes and utilities Requires: gstreamer-@GST_MAJORMINOR@ gstreamer-base-@GST_MAJORMINOR@ Version: @VERSION@ Libs: ${abs_top_builddir}/farstream/libfarstream-@FS_APIVERSION@.la Cflags: -I${abs_top_srcdir} -I${abs_top_builddir} farstream-0.2.7/configure.ac0000664000076400007640000002676212462321037012742 00000000000000AC_PREREQ(2.60) dnl please read gstreamer/docs/random/autotools before changing this file dnl initialize autoconf dnl releases only do -Wall, cvs and prerelease does -Werror too dnl use a three digit version number for releases, and four for cvs/prerelease AC_INIT(Farstream, 0.2.7, https://bugs.freedesktop.org/enter_bug.cgi?product=Farstream, farstream) AG_GST_INIT dnl initialize automake AM_INIT_AUTOMAKE([-Wno-portability subdir-objects]) dnl define PACKAGE_VERSION_* variables AS_VERSION dnl check if this is a release version AS_NANO(FS_GIT="no", FS_GIT="yes") dnl can autoconf find the source ? AC_CONFIG_SRCDIR([farstream/fs-conference.c]) dnl define the output header for config AC_CONFIG_HEADERS([config.h]) dnl sets host_* variables AC_CANONICAL_HOST dnl use pretty build output with automake >= 1.11 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], [AM_DEFAULT_VERBOSITY=1 AC_SUBST(AM_DEFAULT_VERBOSITY)]) dnl our libraries and install dirs use major.minor as a version FS_APIVERSION=0.2 FS_API_VERSION=0_2 AC_SUBST(FS_APIVERSION) AC_SUBST(FS_API_VERSION) AC_DEFINE_UNQUOTED(FS_APIVERSION, "$FS_APIVERSION", [Farstream x.y API version]) AC_DEFINE_UNQUOTED(FS_API_VERSION, "$FS_APIVERSION", [Farstream x_y API version]) GST_API_VERSION=1.0 AC_SUBST(GST_API_VERSION) AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION", [GStreamer major.minor version]) dnl CURRENT, REVISION, AGE dnl - library source changed -> increment REVISION dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0 dnl - interfaces added -> increment AGE dnl - interfaces removed -> AGE = 0 dnl sets FS_LT_LDFLAGS AS_LIBTOOL(FS, 5, 0, 0) dnl FIXME: this macro doesn't actually work; dnl the generated libtool script has no support for the listed tags. dnl So this needs to be fixed first if we want to use this dnl AS_LIBTOOL_TAGS AM_PROG_LIBTOOL dnl *** required versions of GStreamer stuff *** GST_REQ=1.4 GSTPB_REQ=1.4 dnl *** autotools stuff **** dnl allow for different autotools AS_AUTOTOOLS_ALTERNATE dnl Add parameters for aclocal AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4") dnl *** check for arguments to configure *** AG_GST_ARG_DEBUG AG_GST_ARG_PROFILING AG_GST_ARG_VALGRIND AG_GST_ARG_GCOV AG_GST_ARG_WITH_PKG_CONFIG_PATH AG_GST_ARG_WITH_PACKAGE_NAME AG_GST_ARG_WITH_PACKAGE_ORIGIN dnl let distro override plugin install helper path AC_ARG_WITH(install-plugins-helper, AC_HELP_STRING([--with-install-plugins-helper], [specify path of helper script to call to install plugins]), [ case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} for --with-install-plugins-helper) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-install-plugins-helper) ;; *) GST_INSTALL_PLUGINS_HELPER="${withval}" ;; esac ], [ dnl Default value AS_AC_EXPAND(GST_INSTALL_PLUGINS_HELPER,${libexecdir}/gst-install-plugins-helper) ] ) AC_MSG_NOTICE(Using $GST_INSTALL_PLUGINS_HELPER as plugin install helper) AC_DEFINE_UNQUOTED(GST_INSTALL_PLUGINS_HELPER, "$GST_INSTALL_PLUGINS_HELPER", [plugin install helper script]) AC_SUBST(GST_INSTALL_PLUGINS_HELPER) dnl these are all the gst plug-ins, compilable without additional libs FS_PLUGINS_ALL=" \ fsrawconference \ fsrtpconference \ fsmsnconference \ fsvideoanyrate \ fsrtpxdata \ " AC_SUBST(FS_PLUGINS_ALL) FS_PLUGINS_SELECTED="" AC_ARG_WITH(plugins, AC_HELP_STRING([--with-plugins], [comma-separated list of plug-ins to compile]), [for i in `echo $withval | tr , ' '`; do if echo $FS_PLUGINS_ALL | grep $i > /dev/null then FS_PLUGINS_SELECTED="$FS_PLUGINS_SELECTED $i" else echo "plug-in $i not recognized, ignoring..." fi done], [FS_PLUGINS_SELECTED=$FS_PLUGINS_ALL]) AC_SUBST(FS_PLUGINS_SELECTED) dnl *** path for our local plugins *** dnl these are all the transmitter plug-ins FS_TRANSMITTER_PLUGINS_ALL=" \ rawudp \ multicast \ nice \ shm " AC_SUBST(FS_TRANSMITTER_PLUGINS_ALL) FS_TRANSMITTER_PLUGINS_SELECTED="" TRANSMITTERS_DEFAULT=yes AC_ARG_WITH(transmitter-plugins, AC_HELP_STRING([--with-transmitter-plugins], [comma-separated list of plug-ins to compile]), [for i in `echo $withval | tr , ' '`; do if echo $FS_TRANSMITTER_PLUGINS_ALL | grep $i > /dev/null then FS_TRANSMITTER_PLUGINS_SELECTED="$FS_TRANSMITTER_PLUGINS_SELECTED $i" else echo "plug-in $i not recognized, ignoring..." fi done TRANSMITTERS_DEFAULT=no], [FS_TRANSMITTER_PLUGINS_SELECTED=$FS_TRANSMITTER_PLUGINS_ALL]) NICE_REQUIRED=0.1.8 PKG_CHECK_MODULES(NICE, \ nice >= $NICE_REQUIRED,, AC_MSG_ERROR([Need libnice >= $NICE_REQUIRED])) AC_SUBST(NICE_CFLAGS) AC_SUBST(NICE_LIBS) AC_SUBST(FS_TRANSMITTER_PLUGINS_SELECTED) dnl set the plugindir where plugins should be installed AS_AC_EXPAND(FS_PLUGIN_PATH, ${libdir}/farstream-$FS_APIVERSION) AC_SUBST(FS_PLUGIN_PATH) AC_DEFINE_UNQUOTED(FS_PLUGIN_PATH, "${FS_PLUGIN_PATH}", [The path were plugins are installed and search by default]) dnl *** checks for platform *** dnl * hardware/architecture * AG_GST_ARCH dnl *** checks for programs *** dnl find a compiler AC_PROG_CC AC_PATH_PROG(VALGRIND_PATH, valgrind, no) AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno") dnl check for gobject-introspection GOBJECT_INTROSPECTION_CHECK([0.10.1]) dnl check for documentation tools GTK_DOC_CHECK([1.18]) AS_PATH_PYTHON([2.1]) AG_GST_PLUGIN_DOCS([1.8],[2.1]) dnl Make automake happy with per-target flags AM_PROG_CC_C_O dnl *** checks for libraries *** dnl For interactive UNIX (a Sun thing) dnl FIXME: this adds -lcposix to LIBS, but I doubt we use LIBS AC_ISC_POSIX dnl *** checks for header files *** dnl check if we have ANSI C header files AC_HEADER_STDC dnl used in gst/ffmpegcolorspace/mem.c dnl FIXME: could be fixed by redefining av_malloc and av_free to GLib's AC_CHECK_HEADERS([malloc.h]) dnl *** checks for types/defines *** dnl *** checks for structures *** AC_CHECK_MEMBER([struct ip_mreqn.imr_ifindex], [AC_DEFINE([HAVE_IP_MREQN], [1], [Have the struct ip_mreqn])], [], [ #include #include ]) dnl *** checks for compiler characteristics *** dnl *** checks for library functions *** dnl *** checks for dependency libraries *** dnl GLib is required AG_GST_GLIB_CHECK([2.32]) AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_32, [Ignore post 2.32 deprecations]) AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_32, [Prevent post 2.32 APIs]) PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= 2.32, [HAVE_GIO_UNIX=true],[HAVE_GIO_UNIX=false]) AC_SUBST(GIO_UNIX_CFLAGS) AC_SUBST(GIO_UNIX_LIBS) AM_CONDITIONAL(HAVE_GIO_UNIX, test "x$HAVE_GIO_UNIX" = "xyes") dnl checks for gstreamer dnl uninstalled is selected preferentially -- see pkg-config(1) AG_GST_CHECK_GST($GST_API_VERSION, [$GST_REQ]) AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ]) AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no) AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ]) AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes") dnl Check for documentation xrefs GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`" FS_PREFIX="`$PKG_CONFIG --variable=prefix farstream-$FS_APIVERSION`" AC_SUBST(GLIB_PREFIX) AC_SUBST(FS_PREFIX) dnl *** set variables based on configure arguments *** dnl set license and copyright notice FS_LICENSE="LGPL" AC_DEFINE_UNQUOTED(FS_LICENSE, "$FS_LICENSE", [Farstream license]) AC_SUBST(FS_LICENSE) dnl set location of plugin directory AG_GST_SET_PLUGINDIR dnl define an ERROR_CFLAGS Makefile variable AG_GST_SET_ERROR_CFLAGS($FS_GIT) dnl define correct level for debugging messages AG_GST_SET_LEVEL_DEFAULT($FS_GIT) AC_CHECK_FUNCS(getifaddrs) dnl *** finalize CFLAGS, LDFLAGS, LIBS dnl Overview: dnl FS_OPTION_CFLAGS: common flags for profiling, debugging, errors, ... dnl GST_*: flags shared by built objects to link against GStreamer dnl FS_INTERNAL_CFLAGS: to link internally against the farstream libs dnl (compare to other modules) or for i18n dnl FS_ALL_LDFLAGS: linker flags shared by all dnl FS_LIB_LDFLAGS: additional linker flags for all libaries dnl FS_LT_LDFLAGS: library versioning of our libraries dnl FS_PLUGIN_LDFLAGS: flags to be used for all plugins dnl FS_OPTION_CFLAGS if test "x$USE_DEBUG" = xyes; then PROFILE_CFLAGS="-g" fi AC_SUBST(PROFILE_CFLAGS) dnl every flag in FS_OPTION_CFLAGS can be overridden at make time FS_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) -Wno-error=deprecated-declarations " AC_SUBST(FS_OPTION_CFLAGS) dnl our libraries need to be versioned correctly AC_SUBST(FS_LT_LDFLAGS) dnl FS_INTERNAL_CFLAGS dnl prefer internal headers to already installed ones dnl also add builddir include for enumtypes FS_INTERNAL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir)" AC_SUBST(FS_INTERNAL_CFLAGS) dnl FIXME: do we want to rename to GST_ALL_* ? dnl add FS_OPTION_CFLAGS, but overridable FS_CFLAGS="$GST_CFLAGS \$(FS_OPTION_CFLAGS)" AC_SUBST(FS_CFLAGS) dnl add GCOV libs because libtool strips -fprofile-arcs -ftest-coverage FS_LIBS="$GST_LIBS \$(GCOV_LIBS)" AC_SUBST(FS_LIBS) dnl LDFLAGS really should only contain flags, not libs - they get added before dnl whatevertarget_LIBS and -L flags here affect the rest of the linking FS_ALL_LDFLAGS="-no-undefined" AC_SUBST(FS_ALL_LDFLAGS) dnl FS_LIB_LDFLAGS dnl linker flags shared by all libraries dnl LDFLAGS modifier defining exported symbols from built libraries FS_LIB_LDFLAGS="-export-symbols-regex ^fs_.*" AC_SUBST(FS_LIB_LDFLAGS) dnl this really should only contain flags, not libs - they get added before dnl whatevertarget_LIBS and -L flags here affect the rest of the linking FS_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*fs_init_plugin\$\$' $FS_ALL_LDFLAGS" AC_SUBST(FS_PLUGIN_LDFLAGS) dnl this really should only contain flags, not libs - they get added before dnl whatevertarget_LIBS and -L flags here affect the rest of the linking GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $FS_ALL_LDFLAGS" AC_SUBST(GST_PLUGIN_LDFLAGS) AC_ARG_ENABLE([gupnp], AC_HELP_STRING([--disable-gupnp], [Disable GUPnP IGD support]), [case "${enableval}" in yes) WANT_GUPNP=yes ;; no) WANT_GUPNP=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-gupnp) ;; esac], WANT_GUPNP=test) HAVE_GUPNP=no if test "x$WANT_GUPNP" != "xno"; then PKG_CHECK_MODULES(GUPNP, [ gupnp-igd-1.0 >= 0.2 ], [ HAVE_GUPNP=yes ], [ HAVE_GUPNP=no ]) fi if test "x$WANT_GUPNP" = "xyes" && test "x$HAVE_GUPNP" = "xno"; then AC_ERROR([Requested GUPnP IGD, but it is not available]) fi if test "x$HAVE_GUPNP" = "xyes"; then AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP IGD library]) fi dnl *** output files *** AC_CONFIG_FILES( Makefile farstream.pc farstream-uninstalled.pc common/Makefile common/m4/Makefile common-modified/Makefile gst/Makefile gst/fsrawconference/Makefile gst/fsrtpconference/Makefile gst/fsmsnconference/Makefile gst/fsvideoanyrate/Makefile gst/fsrtpxdata/Makefile farstream/Makefile transmitters/Makefile transmitters/rawudp/Makefile transmitters/multicast/Makefile transmitters/nice/Makefile transmitters/shm/Makefile dnl pkgconfig/Makefile dnl pkgconfig/farstream.pc dnl pkgconfig/farstream-uninstalled.pc tests/Makefile tests/check/Makefile tests/rtp/Makefile examples/Makefile examples/gui/Makefile examples/commandline/Makefile docs/Makefile docs/libs/Makefile docs/plugins/Makefile docs/version.entities m4/Makefile dnl docs/plugins/Makefile ) AC_OUTPUT farstream-0.2.7/m4/0000775000076400007640000000000012462323001011030 500000000000000farstream-0.2.7/m4/ltversion.m40000644000076400007640000000126212212131157013240 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) farstream-0.2.7/m4/ltoptions.m40000644000076400007640000003007312212131156013247 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) farstream-0.2.7/m4/Makefile.in0000664000076400007640000003701612462321046013033 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = m4 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ as-check-python-headers.m4 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 m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/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 tags TAGS: ctags CTAGS: cscope cscopelist: 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 installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-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: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am 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-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 \ tags-am uninstall uninstall-am # 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: farstream-0.2.7/m4/Makefile.am0000664000076400007640000000005311710041462013005 00000000000000EXTRA_DIST = \ as-check-python-headers.m4 farstream-0.2.7/m4/lt~obsolete.m40000644000076400007640000001375612212131157013600 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) farstream-0.2.7/m4/introspection.m40000664000076400007640000000661411710041462014124 00000000000000dnl -*- mode: autoconf -*- dnl Copyright 2009 Johan Dahlin dnl dnl This file is free software; the author(s) gives unlimited dnl permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl # serial 1 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([LT_INIT],[$0])dnl setup libtool first dnl enable/disable introspection m4_if([$2], [require], [dnl enable_introspection=yes ],[dnl AC_ARG_ENABLE(introspection, AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], [Enable introspection for this build]),, [enable_introspection=auto]) ])dnl AC_MSG_CHECKING([for gobject-introspection]) dnl presence/version checking AS_CASE([$enable_introspection], [no], [dnl found_introspection="no (disabled, use --enable-introspection to enable)" ],dnl [yes],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0],, AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) ],dnl [auto],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) ],dnl [dnl AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) ])dnl AC_MSG_RESULT([$found_introspection]) INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi AC_SUBST(INTROSPECTION_SCANNER) AC_SUBST(INTROSPECTION_COMPILER) AC_SUBST(INTROSPECTION_GENERATE) AC_SUBST(INTROSPECTION_GIRDIR) AC_SUBST(INTROSPECTION_TYPELIBDIR) AC_SUBST(INTROSPECTION_CFLAGS) AC_SUBST(INTROSPECTION_LIBS) AC_SUBST(INTROSPECTION_MAKEFILE) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") ]) dnl Usage: dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) ]) dnl Usage: dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) ]) farstream-0.2.7/m4/as-check-python-headers.m40000664000076400007640000000207211710041462015624 00000000000000dnl Copy pasted from gst-python's acinclude.m4 file dnl a macro to check for ability to create python extensions dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) dnl function also defines PYTHON_INCLUDES AC_DEFUN([AM_CHECK_PYTHON_HEADERS], [AC_REQUIRE([AM_PATH_PYTHON]) AC_MSG_CHECKING(for headers required to compile python extensions) dnl deduce PYTHON_INCLUDES py_prefix=`$PYTHON -c "import sys; print sys.prefix"` py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` if $PYTHON-config --help 2>/dev/null; then PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null` else 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 fi AC_SUBST(PYTHON_INCLUDES) dnl check if the headers exist: save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" AC_TRY_CPP([#include ],dnl [AC_MSG_RESULT(found) $1],dnl [AC_MSG_RESULT(not found) $2]) CPPFLAGS="$save_CPPFLAGS" ]) farstream-0.2.7/m4/libtool.m40000644000076400007640000105743212212131156012671 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# 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' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS 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 lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # 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 '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [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" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="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}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # 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*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ 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" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. 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|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 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 "$_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 $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" 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>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). 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. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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"`env 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` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* 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); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 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 "$_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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac 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 '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= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ 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 ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # 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]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; 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=`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 ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no 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}`~ 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~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in 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}' m4_if([$1], [],[ 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}' ;; 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 # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no 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 ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no 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 # correct to gnu/linux during the next big refactor 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 ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # 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]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' 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 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) 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 # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # 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;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no 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 dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no 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=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor 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 case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor 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 ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /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 # 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*) # 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' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) 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 ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 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])(-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_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) 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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [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 ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. 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'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" 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 rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. 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@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) 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 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; 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 # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; 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 # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # 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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=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}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= 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 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** 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 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 ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='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 | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${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* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; 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 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" 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 _LT_TAGVAR(export_symbols_cmds, $1)='$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 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${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. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$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' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # 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. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=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. _LT_TAGVAR(archive_cmds, $1)='$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. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # 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) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$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. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$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' _LT_TAGVAR(archive_expsym_cmds, $1)='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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $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"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$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 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${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. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$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' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # 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. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='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~ func_to_tool_file "$lt_outputfile"~ 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' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='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' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${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' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf 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). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" 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 AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 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=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # 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}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # 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 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [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 ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#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 ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS farstream-0.2.7/m4/ltsugar.m40000644000076400007640000001042412212131156012673 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) farstream-0.2.7/farstream/0000775000076400007640000000000012462323000012473 500000000000000farstream-0.2.7/farstream/fs-stream-transmitter.h0000664000076400007640000001016612401500475017051 00000000000000/* * Farstream - Farstream Stream Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-stream-transmitter.h - A Farstream Stream Transmitter (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_STREAM_TRANSMITTER_H__ #define __FS_STREAM_TRANSMITTER_H__ #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_STREAM_TRANSMITTER \ (fs_stream_transmitter_get_type ()) #define FS_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_STREAM_TRANSMITTER, \ FsStreamTransmitter)) #define FS_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_STREAM_TRANSMITTER, \ FsStreamTransmitterClass)) #define FS_IS_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_STREAM_TRANSMITTER)) #define FS_IS_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_STREAM_TRANSMITTER)) #define FS_STREAM_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_STREAM_TRANSMITTER, \ FsStreamTransmitterClass)) #define FS_STREAM_TRANSMITTER_CAST(obj) ((FsStreamTransmitter *) (obj)) typedef struct _FsStreamTransmitter FsStreamTransmitter; typedef struct _FsStreamTransmitterClass FsStreamTransmitterClass; typedef struct _FsStreamTransmitterPrivate FsStreamTransmitterPrivate; /** * FsStreamTransmitterClass: * @parent_class: Our parent * @add_remote_candidates: Sets the remote candidates * @force_remote_candidates: Forces certain remote candidates * @gather_local_candidates: Starts the gathering of local candidates * @stop: Stop the stream transmitter synchronously (does any Gst stopping * that needs to be done) * * You must override the add_remote_candidate in a subclass */ struct _FsStreamTransmitterClass { GObjectClass parent_class; /*virtual functions */ gboolean (*add_remote_candidates) (FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error); gboolean (*force_remote_candidates) (FsStreamTransmitter *streamtransmitter, GList *remote_candidates, GError **error); gboolean (*gather_local_candidates) (FsStreamTransmitter *streamtransmitter, GError **error); void (*stop) (FsStreamTransmitter *streamtransmitter); /*< private >*/ gpointer _padding[8]; }; /** * FsStreamTransmitter: * * All members are private, access them using methods and properties */ struct _FsStreamTransmitter { GObject parent; /*< private >*/ FsStreamTransmitterPrivate *priv; gpointer _padding[8]; }; GType fs_stream_transmitter_get_type (void); gboolean fs_stream_transmitter_add_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error); gboolean fs_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *remote_candidates, GError **error); gboolean fs_stream_transmitter_gather_local_candidates ( FsStreamTransmitter *streamtransmitter, GError **error); void fs_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter); void fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter, gint error_no, const gchar *error_msg); G_END_DECLS #endif /* __FS_STREAM_TRANSMITTER_H__ */ farstream-0.2.7/farstream/fs-participant.h0000664000076400007640000000612112401500475015516 00000000000000/* * Farstream - Farstream Participant * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-participant.h - A Farstream Participant gobject (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_PARTICIPANT_H__ #define __FS_PARTICIPANT_H__ #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_PARTICIPANT \ (fs_participant_get_type ()) #define FS_PARTICIPANT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_PARTICIPANT, FsParticipant)) #define FS_PARTICIPANT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_PARTICIPANT, FsParticipantClass)) #define FS_IS_PARTICIPANT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_PARTICIPANT)) #define FS_IS_PARTICIPANT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_PARTICIPANT)) #define FS_PARTICIPANT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_PARTICIPANT, FsParticipantClass)) #define FS_PARTICIPANT_CAST(obj) ((FsParticipant *) (obj)) typedef struct _FsParticipant FsParticipant; typedef struct _FsParticipantClass FsParticipantClass; typedef struct _FsParticipantPrivate FsParticipantPrivate; /** * FsParticipantClass: * @parent_class: Our parent * * The FsParticipant class has no virtual methods to implement, * but you may want to override the properties or attach more date to it */ struct _FsParticipantClass { GObjectClass parent_class; /* virtual functions */ /*< private >*/ FsParticipantPrivate *priv; gpointer _padding[8]; }; /** * FsParticipant: * * All members are private (access them using the properties) */ struct _FsParticipant { GObject parent; /*< private >*/ GMutex mutex; FsParticipantPrivate *priv; gpointer _padding[8]; }; /** * FS_PARTICIPANT_DATA_LOCK: * @participant: A #FsParticipant * * Locks the participant for data set with g_object_set_data() or * g_object_set_qdata(). */ #define FS_PARTICIPANT_DATA_LOCK(participant) \ g_mutex_lock (& FS_PARTICIPANT_CAST(participant)->mutex) /** * FS_PARTICIPANT_DATA_UNLOCK: * @participant: A #FsParticipant * * Unlocks the participant for data set with g_object_set_data() or * g_object_set_qdata(). */ #define FS_PARTICIPANT_DATA_UNLOCK(participant) \ g_mutex_unlock (& FS_PARTICIPANT_CAST(participant)->mutex) GType fs_participant_get_type (void); G_END_DECLS #endif /* __FS_PARTICIPANT_H__ */ farstream-0.2.7/farstream/Makefile.in0000664000076400007640000015121512462321046014475 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ # these are the variables your Makefile.am should set # the example is based on the colorbalance interface #glib_enum_headers=$(colorbalance_headers) #glib_enum_define=GST_COLOR_BALANCE #glib_gen_prefix=gst_color_balance #glib_gen_basename=colorbalance VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/common-modified/gst-glib-gen.mak \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(am__dist_gir_DATA_DIST) \ $(libfarstreaminclude_HEADERS) @HAVE_INTROSPECTION_TRUE@am__append_1 = $(dist_gir_DATA) $(typelib_DATA) subdir = farstream ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ "$(DESTDIR)$(typelibdir)" \ "$(DESTDIR)$(libfarstreamincludedir)" \ "$(DESTDIR)$(libfarstreamincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libfarstream_@FS_APIVERSION@_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libfarstream_@FS_APIVERSION@_la_OBJECTS = \ libfarstream_@FS_APIVERSION@_la-fs-candidate.lo \ libfarstream_@FS_APIVERSION@_la-fs-codec.lo \ libfarstream_@FS_APIVERSION@_la-fs-participant.lo \ libfarstream_@FS_APIVERSION@_la-fs-session.lo \ libfarstream_@FS_APIVERSION@_la-fs-stream.lo \ libfarstream_@FS_APIVERSION@_la-fs-conference.lo \ libfarstream_@FS_APIVERSION@_la-fs-transmitter.lo \ libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.lo \ libfarstream_@FS_APIVERSION@_la-fs-plugin.lo \ libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.lo \ libfarstream_@FS_APIVERSION@_la-fs-utils.lo \ libfarstream_@FS_APIVERSION@_la-fs-rtp.lo nodist_libfarstream_@FS_APIVERSION@_la_OBJECTS = \ libfarstream_@FS_APIVERSION@_la-fs-enumtypes.lo libfarstream_@FS_APIVERSION@_la_OBJECTS = \ $(am_libfarstream_@FS_APIVERSION@_la_OBJECTS) \ $(nodist_libfarstream_@FS_APIVERSION@_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libfarstream_@FS_APIVERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) \ $(libfarstream_@FS_APIVERSION@_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfarstream_@FS_APIVERSION@_la_SOURCES) \ $(nodist_libfarstream_@FS_APIVERSION@_la_SOURCES) DIST_SOURCES = $(libfarstream_@FS_APIVERSION@_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__dist_gir_DATA_DIST = Farstream-@FS_APIVERSION@.gir DATA = $(dist_gir_DATA) $(typelib_DATA) HEADERS = $(libfarstreaminclude_HEADERS) \ $(nodist_libfarstreaminclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ libfarstreamincludedir = $(includedir)/farstream-@FS_APIVERSION@/farstream libfarstreaminclude_HEADERS = \ fs-candidate.h \ fs-codec.h \ fs-participant.h \ fs-session.h \ fs-stream.h \ fs-conference.h \ fs-transmitter.h \ fs-stream-transmitter.h \ fs-plugin.h \ fs-element-added-notifier.h \ fs-utils.h \ fs-rtp.h nodist_libfarstreaminclude_HEADERS = \ fs-enumtypes.h lib_LTLIBRARIES = libfarstream-@FS_APIVERSION@.la BUILT_SOURCES = \ $(nodist_libfarstream_@FS_APIVERSION@_la_SOURCES) \ $(nodist_libfarstreaminclude_HEADERS) CLEANFILES = $(BUILT_SOURCES) $(am__append_1) libfarstream_@FS_APIVERSION@_la_SOURCES = \ fs-candidate.c \ fs-codec.c \ fs-participant.c \ fs-session.c \ fs-stream.c \ fs-conference.c \ fs-transmitter.c \ fs-stream-transmitter.c \ fs-plugin.c \ fs-element-added-notifier.c \ fs-utils.c \ fs-rtp.c \ fs-private.h nodist_libfarstream_@FS_APIVERSION@_la_SOURCES = \ fs-enumtypes.c libfarstream_@FS_APIVERSION@_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) $(FS_CFLAGS) \ $(GLIB_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) libfarstream_@FS_APIVERSION@_la_LIBADD = \ $(GLIB_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) libfarstream_@FS_APIVERSION@_la_LDFLAGS = \ $(FS_LIB_LDFLAGS) \ $(FS_ALL_LDFLAGS) \ $(FS_LT_LDFLAGS) public_headers = fs-candidate.h \ fs-codec.h \ fs-participant.h \ fs-session.h \ fs-stream.h \ fs-conference.h \ fs-utils.h glib_enum_headers = $(public_headers) glib_enum_define = FS glib_gen_prefix = _fs glib_gen_basename = fs enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") @HAVE_INTROSPECTION_TRUE@introspection_sources = \ @HAVE_INTROSPECTION_TRUE@ $(libfarstream_@FS_APIVERSION@_la_SOURCES) \ @HAVE_INTROSPECTION_TRUE@ $(nodist_libfarstreaminclude_HEADERS) \ @HAVE_INTROSPECTION_TRUE@ $(libfarstreaminclude_HEADERS) @HAVE_INTROSPECTION_TRUE@INTROSPECTION_GIRS = Farstream-@FS_APIVERSION@.gir @HAVE_INTROSPECTION_TRUE@Farstream_@FS_API_VERSION@_gir_NAMESPACE = Farstream @HAVE_INTROSPECTION_TRUE@Farstream_@FS_API_VERSION@_gir_VERSION = @FS_APIVERSION@ @HAVE_INTROSPECTION_TRUE@Farstream_@FS_API_VERSION@_gir_LIBS = libfarstream-@FS_APIVERSION@.la @HAVE_INTROSPECTION_TRUE@Farstream_@FS_API_VERSION@_gir_FILES = $(introspection_sources) @HAVE_INTROSPECTION_TRUE@Farstream_@FS_API_VERSION@_gir_INCLUDES = GObject-2.0 Gst-@GST_API_VERSION@ @HAVE_INTROSPECTION_TRUE@Farstream_@FS_API_VERSION@_gir_CFLAGS = $(FS_INTERNAL_CFLAGS) @HAVE_INTROSPECTION_TRUE@Farstream_@FS_API_VERSION@_gir_SCANNERFLAGS = --symbol-prefix=fs \ @HAVE_INTROSPECTION_TRUE@ --identifier-prefix=Fs --add-init-section="gst_init(NULL,NULL);" \ @HAVE_INTROSPECTION_TRUE@ --pkg-export=farstream-@FS_APIVERSION@ \ @HAVE_INTROSPECTION_TRUE@ $(foreach hdr,$(public_headers),--c-include=$(hdr)) @HAVE_INTROSPECTION_TRUE@Farstream_@FS_API_VERSION@_gir_LDFLAGS = $(GST_LIBS) @HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0 @HAVE_INTROSPECTION_TRUE@dist_gir_DATA = Farstream-@FS_APIVERSION@.gir @HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0 @HAVE_INTROSPECTION_TRUE@typelib_DATA = Farstream-@FS_APIVERSION@.typelib all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common-modified/gst-glib-gen.mak $(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 farstream/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu farstream/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_srcdir)/common-modified/gst-glib-gen.mak: $(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-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfarstream-@FS_APIVERSION@.la: $(libfarstream_@FS_APIVERSION@_la_OBJECTS) $(libfarstream_@FS_APIVERSION@_la_DEPENDENCIES) $(EXTRA_libfarstream_@FS_APIVERSION@_la_DEPENDENCIES) $(AM_V_CCLD)$(libfarstream_@FS_APIVERSION@_la_LINK) -rpath $(libdir) $(libfarstream_@FS_APIVERSION@_la_OBJECTS) $(libfarstream_@FS_APIVERSION@_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-candidate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-codec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-conference.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-enumtypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-participant.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-rtp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-session.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-transmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-utils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libfarstream_@FS_APIVERSION@_la-fs-candidate.lo: fs-candidate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-candidate.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-candidate.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-candidate.lo `test -f 'fs-candidate.c' || echo '$(srcdir)/'`fs-candidate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-candidate.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-candidate.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-candidate.c' object='libfarstream_@FS_APIVERSION@_la-fs-candidate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-candidate.lo `test -f 'fs-candidate.c' || echo '$(srcdir)/'`fs-candidate.c libfarstream_@FS_APIVERSION@_la-fs-codec.lo: fs-codec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-codec.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-codec.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-codec.lo `test -f 'fs-codec.c' || echo '$(srcdir)/'`fs-codec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-codec.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-codec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-codec.c' object='libfarstream_@FS_APIVERSION@_la-fs-codec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-codec.lo `test -f 'fs-codec.c' || echo '$(srcdir)/'`fs-codec.c libfarstream_@FS_APIVERSION@_la-fs-participant.lo: fs-participant.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-participant.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-participant.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-participant.lo `test -f 'fs-participant.c' || echo '$(srcdir)/'`fs-participant.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-participant.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-participant.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-participant.c' object='libfarstream_@FS_APIVERSION@_la-fs-participant.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-participant.lo `test -f 'fs-participant.c' || echo '$(srcdir)/'`fs-participant.c libfarstream_@FS_APIVERSION@_la-fs-session.lo: fs-session.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-session.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-session.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-session.lo `test -f 'fs-session.c' || echo '$(srcdir)/'`fs-session.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-session.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-session.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-session.c' object='libfarstream_@FS_APIVERSION@_la-fs-session.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-session.lo `test -f 'fs-session.c' || echo '$(srcdir)/'`fs-session.c libfarstream_@FS_APIVERSION@_la-fs-stream.lo: fs-stream.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-stream.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-stream.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-stream.lo `test -f 'fs-stream.c' || echo '$(srcdir)/'`fs-stream.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-stream.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-stream.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-stream.c' object='libfarstream_@FS_APIVERSION@_la-fs-stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-stream.lo `test -f 'fs-stream.c' || echo '$(srcdir)/'`fs-stream.c libfarstream_@FS_APIVERSION@_la-fs-conference.lo: fs-conference.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-conference.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-conference.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-conference.lo `test -f 'fs-conference.c' || echo '$(srcdir)/'`fs-conference.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-conference.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-conference.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-conference.c' object='libfarstream_@FS_APIVERSION@_la-fs-conference.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-conference.lo `test -f 'fs-conference.c' || echo '$(srcdir)/'`fs-conference.c libfarstream_@FS_APIVERSION@_la-fs-transmitter.lo: fs-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-transmitter.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-transmitter.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-transmitter.lo `test -f 'fs-transmitter.c' || echo '$(srcdir)/'`fs-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-transmitter.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-transmitter.c' object='libfarstream_@FS_APIVERSION@_la-fs-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-transmitter.lo `test -f 'fs-transmitter.c' || echo '$(srcdir)/'`fs-transmitter.c libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.lo: fs-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.lo `test -f 'fs-stream-transmitter.c' || echo '$(srcdir)/'`fs-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-stream-transmitter.c' object='libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-stream-transmitter.lo `test -f 'fs-stream-transmitter.c' || echo '$(srcdir)/'`fs-stream-transmitter.c libfarstream_@FS_APIVERSION@_la-fs-plugin.lo: fs-plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-plugin.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-plugin.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-plugin.lo `test -f 'fs-plugin.c' || echo '$(srcdir)/'`fs-plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-plugin.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-plugin.c' object='libfarstream_@FS_APIVERSION@_la-fs-plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-plugin.lo `test -f 'fs-plugin.c' || echo '$(srcdir)/'`fs-plugin.c libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.lo: fs-element-added-notifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.lo `test -f 'fs-element-added-notifier.c' || echo '$(srcdir)/'`fs-element-added-notifier.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-element-added-notifier.c' object='libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-element-added-notifier.lo `test -f 'fs-element-added-notifier.c' || echo '$(srcdir)/'`fs-element-added-notifier.c libfarstream_@FS_APIVERSION@_la-fs-utils.lo: fs-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-utils.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-utils.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-utils.lo `test -f 'fs-utils.c' || echo '$(srcdir)/'`fs-utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-utils.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-utils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-utils.c' object='libfarstream_@FS_APIVERSION@_la-fs-utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-utils.lo `test -f 'fs-utils.c' || echo '$(srcdir)/'`fs-utils.c libfarstream_@FS_APIVERSION@_la-fs-rtp.lo: fs-rtp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-rtp.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-rtp.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-rtp.lo `test -f 'fs-rtp.c' || echo '$(srcdir)/'`fs-rtp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-rtp.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-rtp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-rtp.c' object='libfarstream_@FS_APIVERSION@_la-fs-rtp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-rtp.lo `test -f 'fs-rtp.c' || echo '$(srcdir)/'`fs-rtp.c libfarstream_@FS_APIVERSION@_la-fs-enumtypes.lo: fs-enumtypes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -MT libfarstream_@FS_APIVERSION@_la-fs-enumtypes.lo -MD -MP -MF $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-enumtypes.Tpo -c -o libfarstream_@FS_APIVERSION@_la-fs-enumtypes.lo `test -f 'fs-enumtypes.c' || echo '$(srcdir)/'`fs-enumtypes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-enumtypes.Tpo $(DEPDIR)/libfarstream_@FS_APIVERSION@_la-fs-enumtypes.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-enumtypes.c' object='libfarstream_@FS_APIVERSION@_la-fs-enumtypes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfarstream_@FS_APIVERSION@_la_CFLAGS) $(CFLAGS) -c -o libfarstream_@FS_APIVERSION@_la-fs-enumtypes.lo `test -f 'fs-enumtypes.c' || echo '$(srcdir)/'`fs-enumtypes.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_girDATA: $(dist_gir_DATA) @$(NORMAL_INSTALL) @list='$(dist_gir_DATA)'; test -n "$(girdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(girdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(girdir)" || exit 1; \ fi; \ 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)$(girdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(girdir)" || exit $$?; \ done uninstall-dist_girDATA: @$(NORMAL_UNINSTALL) @list='$(dist_gir_DATA)'; test -n "$(girdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir) install-typelibDATA: $(typelib_DATA) @$(NORMAL_INSTALL) @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(typelibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(typelibdir)" || exit 1; \ fi; \ 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)$(typelibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(typelibdir)" || exit $$?; \ done uninstall-typelibDATA: @$(NORMAL_UNINSTALL) @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(typelibdir)'; $(am__uninstall_files_from_dir) install-libfarstreamincludeHEADERS: $(libfarstreaminclude_HEADERS) @$(NORMAL_INSTALL) @list='$(libfarstreaminclude_HEADERS)'; test -n "$(libfarstreamincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libfarstreamincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libfarstreamincludedir)" || exit 1; \ fi; \ 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_HEADER) $$files '$(DESTDIR)$(libfarstreamincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libfarstreamincludedir)" || exit $$?; \ done uninstall-libfarstreamincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(libfarstreaminclude_HEADERS)'; test -n "$(libfarstreamincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libfarstreamincludedir)'; $(am__uninstall_files_from_dir) install-nodist_libfarstreamincludeHEADERS: $(nodist_libfarstreaminclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_libfarstreaminclude_HEADERS)'; test -n "$(libfarstreamincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libfarstreamincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libfarstreamincludedir)" || exit 1; \ fi; \ 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_HEADER) $$files '$(DESTDIR)$(libfarstreamincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libfarstreamincludedir)" || exit $$?; \ done uninstall-nodist_libfarstreamincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_libfarstreaminclude_HEADERS)'; test -n "$(libfarstreamincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libfarstreamincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(libfarstreamincludedir)" "$(DESTDIR)$(libfarstreamincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ 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-dist_girDATA \ install-libfarstreamincludeHEADERS \ install-nodist_libfarstreamincludeHEADERS install-typelibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES 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-dist_girDATA uninstall-libLTLIBRARIES \ uninstall-libfarstreamincludeHEADERS \ uninstall-nodist_libfarstreamincludeHEADERS \ uninstall-typelibDATA .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am 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-dist_girDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-libfarstreamincludeHEADERS \ install-man install-nodist_libfarstreamincludeHEADERS \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-typelibDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-dist_girDATA uninstall-libLTLIBRARIES \ uninstall-libfarstreamincludeHEADERS \ uninstall-nodist_libfarstreamincludeHEADERS \ uninstall-typelibDATA # these are all the rules generating the relevant files $(glib_gen_basename)-enumtypes.h: $(glib_enum_headers) $(AM_V_GEN)glib-mkenums \ --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "\n/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define FS_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \ $^ > $@ $(glib_gen_basename)-enumtypes.c: $(glib_enum_headers) @if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi $(AM_V_GEN)glib-mkenums \ --fhead "#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n" \ $^ > $@ # a hack rule to make sure .Plo files exist because they get include'd # from Makefile's .deps/%-enumtypes.Plo: @touch $@ @HAVE_INTROSPECTION_TRUE@include $(INTROSPECTION_MAKEFILE) @HAVE_INTROSPECTION_TRUE@Farstream-@FS_APIVERSION@.gir: libfarstream-@FS_APIVERSION@.la # 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: farstream-0.2.7/farstream/Makefile.am0000664000076400007640000000537012461775764014507 00000000000000libfarstreamincludedir = $(includedir)/farstream-@FS_APIVERSION@/farstream libfarstreaminclude_HEADERS = \ fs-candidate.h \ fs-codec.h \ fs-participant.h \ fs-session.h \ fs-stream.h \ fs-conference.h \ fs-transmitter.h \ fs-stream-transmitter.h \ fs-plugin.h \ fs-element-added-notifier.h \ fs-utils.h \ fs-rtp.h nodist_libfarstreaminclude_HEADERS = \ fs-enumtypes.h lib_LTLIBRARIES = libfarstream-@FS_APIVERSION@.la BUILT_SOURCES = \ $(nodist_libfarstream_@FS_APIVERSION@_la_SOURCES) \ $(nodist_libfarstreaminclude_HEADERS) CLEANFILES = $(BUILT_SOURCES) libfarstream_@FS_APIVERSION@_la_SOURCES = \ fs-candidate.c \ fs-codec.c \ fs-participant.c \ fs-session.c \ fs-stream.c \ fs-conference.c \ fs-transmitter.c \ fs-stream-transmitter.c \ fs-plugin.c \ fs-element-added-notifier.c \ fs-utils.c \ fs-rtp.c \ fs-private.h nodist_libfarstream_@FS_APIVERSION@_la_SOURCES = \ fs-enumtypes.c libfarstream_@FS_APIVERSION@_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) $(FS_CFLAGS) \ $(GLIB_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) libfarstream_@FS_APIVERSION@_la_LIBADD = \ $(GLIB_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) libfarstream_@FS_APIVERSION@_la_LDFLAGS = \ $(FS_LIB_LDFLAGS) \ $(FS_ALL_LDFLAGS) \ $(FS_LT_LDFLAGS) public_headers = fs-candidate.h \ fs-codec.h \ fs-participant.h \ fs-session.h \ fs-stream.h \ fs-conference.h \ fs-utils.h glib_enum_headers=$(public_headers) glib_enum_define=FS glib_gen_prefix=_fs glib_gen_basename=fs include $(top_srcdir)/common-modified/gst-glib-gen.mak if HAVE_INTROSPECTION include $(INTROSPECTION_MAKEFILE) introspection_sources = \ $(libfarstream_@FS_APIVERSION@_la_SOURCES) \ $(nodist_libfarstreaminclude_HEADERS) \ $(libfarstreaminclude_HEADERS) INTROSPECTION_GIRS = Farstream-@FS_APIVERSION@.gir Farstream-@FS_APIVERSION@.gir: libfarstream-@FS_APIVERSION@.la Farstream_@FS_API_VERSION@_gir_NAMESPACE = Farstream Farstream_@FS_API_VERSION@_gir_VERSION = @FS_APIVERSION@ Farstream_@FS_API_VERSION@_gir_LIBS = libfarstream-@FS_APIVERSION@.la Farstream_@FS_API_VERSION@_gir_FILES = $(introspection_sources) Farstream_@FS_API_VERSION@_gir_INCLUDES = GObject-2.0 Gst-@GST_API_VERSION@ Farstream_@FS_API_VERSION@_gir_CFLAGS = $(FS_INTERNAL_CFLAGS) Farstream_@FS_API_VERSION@_gir_SCANNERFLAGS = --symbol-prefix=fs \ --identifier-prefix=Fs --add-init-section="gst_init(NULL,NULL);" \ --pkg-export=farstream-@FS_APIVERSION@ \ $(foreach hdr,$(public_headers),--c-include=$(hdr)) Farstream_@FS_API_VERSION@_gir_LDFLAGS = $(GST_LIBS) girdir = $(datadir)/gir-1.0 dist_gir_DATA = Farstream-@FS_APIVERSION@.gir typelibdir = $(libdir)/girepository-1.0 typelib_DATA = Farstream-@FS_APIVERSION@.typelib CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) endif farstream-0.2.7/farstream/fs-rtp.h0000664000076400007640000000646611710041460014015 00000000000000/* * Farstream - Farstream RTP specific types * * Copyright 2011 Collabora Ltd. * @author: Olivier Crete * Copyright 2011 Nokia Corp. * * fs-rtp.h - Farstream RTP specific types * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RTP_H__ #define __FS_RTP_H__ #include #include G_BEGIN_DECLS /** * FsRtpHeaderExtension: * @id: The identifier of the RTP header extension * @direction: the direction in which this extension can be used * @uri: The URI that defines this extension * * Defines a RTP header extension with its negotiated identifier, direction * and URI. They should only be created with fs_rtp_header_extension_new(). */ typedef struct _FsRtpHeaderExtension { guint id; FsStreamDirection direction; gchar *uri; } FsRtpHeaderExtension; /** * FS_TYPE_RTP_HEADER_EXTENSION: * * Boxed type for #FsRtpHeaderExtension */ /** * FS_TYPE_RTP_HEADER_EXTENSION_LIST: * * Boxed type for a #GList of #FsRtpHeaderExtension */ #define FS_TYPE_RTP_HEADER_EXTENSION \ fs_rtp_header_extension_get_type () #define FS_TYPE_RTP_HEADER_EXTENSION_LIST \ fs_rtp_header_extension_list_get_type () GType fs_rtp_header_extension_get_type (void); GType fs_rtp_header_extension_list_get_type (void); FsRtpHeaderExtension * fs_rtp_header_extension_new (guint id, FsStreamDirection direction, const gchar *uri); FsRtpHeaderExtension * fs_rtp_header_extension_copy (FsRtpHeaderExtension *extension); void fs_rtp_header_extension_destroy (FsRtpHeaderExtension *extension); gboolean fs_rtp_header_extension_are_equal (FsRtpHeaderExtension *extension1, FsRtpHeaderExtension *extension2); GList * fs_rtp_header_extension_list_copy (GList *extensions); void fs_rtp_header_extension_list_destroy (GList *extensions); GList * fs_rtp_header_extension_list_from_keyfile (const gchar *filename, FsMediaType media_type, GError **error); /** * FS_RTP_HEADER_EXTENSION_FORMAT: * * A format that can be used in printf like format strings to format a * FsRtpHeaderExtension */ /** * FS_RTP_HEADER_EXTENSION_ARGS: * @hdrext: a #FsRtpHeaderExtension * * Formats the codec in args for FS_RTP_HEADER_EXTENSION_ARGS */ #define FS_RTP_HEADER_EXTENSION_FORMAT "%d: (%s) %s" #define FS_RTP_HEADER_EXTENSION_ARGS(hdrext) \ (hdrext)->id, \ (hdrext)->direction == FS_DIRECTION_BOTH ? "both" : \ ((hdrext)->direction == FS_DIRECTION_RECV? "recv" : \ ((hdrext)->direction == FS_DIRECTION_SEND ? "send" : "none")), \ (hdrext)->uri G_END_DECLS #endif /* __FS_RTP_H__ */ farstream-0.2.7/farstream/fs-conference.h0000664000076400007640000001300112401500475015302 00000000000000/* * Farstream - FsConference Class * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-conference.h - Header file for farstream Conference base class * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_CONFERENCE_H__ #define __FS_CONFERENCE_H__ #include #include #include #include G_BEGIN_DECLS #define FS_TYPE_CONFERENCE \ (fs_conference_get_type ()) #define FS_CONFERENCE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj),FS_TYPE_CONFERENCE,FsConference)) #define FS_CONFERENCE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass),FS_TYPE_CONFERENCE,FsConferenceClass)) #define FS_CONFERENCE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj),FS_TYPE_CONFERENCE,FsConferenceClass)) #define FS_IS_CONFERENCE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj),FS_TYPE_CONFERENCE)) #define FS_IS_CONFERENCE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),FS_TYPE_CONFERENCE)) #define FS_CONFERENCE_CAST(obj) \ ((FsConference *)(obj)) typedef struct _FsConference FsConference; typedef struct _FsConferenceClass FsConferenceClass; /** * FsConference: * * The #FsConference structure, all the members are private */ struct _FsConference { GstBin parent; /*< private >*/ gpointer _padding[8]; }; /** * FsConferenceClass: * @parent: parent GstBin class * @new_session: virtual method to create a new conference session * @new_participant: virtual method to create a new participant * * #FsConferenceClass class structure. */ struct _FsConferenceClass { GstBinClass parent; /* virtual functions */ FsSession *(* new_session) (FsConference *conference, FsMediaType media_type, GError **error); FsParticipant *(* new_participant) (FsConference *conference, GError **error); /*< private > */ gpointer _gst_reserved[GST_PADDING]; }; GType fs_conference_get_type (void); /** * FsError: * @FS_ERROR_CONSTRUCTION: Error constructing some of the sub-elements, this * probably denotes an error in the installation of the gstreamer elements. * It is a fatal error. * @FS_ERROR_INVALID_ARGUMENTS: Invalid arguments to the function, this * is a programming error and should not be reported to the user * @FS_ERROR_INTERNAL: An internal error happened in Farstream, it may be in * an inconsistent state. The object from which this error comes should be * discarded. * @FS_ERROR_NETWORK: A network related error, this should probably be * reported to the user. * @FS_ERROR_NOT_IMPLEMENTED: The optional functionality is not implemented by * this plugin. * @FS_ERROR_NEGOTIATION_FAILED: The codec negotiation has failed, this means * that there are no common codecs between the local and remote codecs. * @FS_ERROR_UNKNOWN_CODEC: Data is received on an unknown codec, this most * likely denotes an error on the remote side, the buffers will be ignored. * It can safely be ignored in most cases (but may result in a call with no * media received). * @FS_ERROR_NO_CODECS: There are no codecs detected for that media type. * @FS_ERROR_NO_CODECS_LEFT: All of the codecs have been disabled by the * codec preferences, one should try less strict codec preferences. * @FS_ERROR_CONNECTION_FAILED: Could not connect to the to remote party. * @FS_ERROR_DISPOSED: The object has been disposed. * @FS_ERROR_ALREADY_EXISTS: The object already exists * * This is the enum of error numbers that will come either on the "error" * signal, from the Gst Bus or for error in the FS_ERROR domain in GErrors */ typedef enum { FS_ERROR_CONSTRUCTION = 1, FS_ERROR_INTERNAL, FS_ERROR_INVALID_ARGUMENTS = 100, FS_ERROR_NETWORK, FS_ERROR_NOT_IMPLEMENTED, FS_ERROR_NEGOTIATION_FAILED, FS_ERROR_UNKNOWN_CODEC, FS_ERROR_NO_CODECS, FS_ERROR_NO_CODECS_LEFT, FS_ERROR_CONNECTION_FAILED, FS_ERROR_DISPOSED, FS_ERROR_ALREADY_EXISTS } FsError; /** * FS_ERROR: * * This quark is used to denote errors coming from Farstream objects */ #define FS_ERROR (fs_error_quark ()) /** * FS_ERROR_IS_FATAL: * @error: a #FsError * * Tells the programmer if an error if fatal or not, if it returns %TRUE, * the error is fatal, and the object that created it should * be discarded. It returns %FALSE otherwise. */ #define FS_ERROR_IS_FATAL(error) \ (error < 100) GQuark fs_error_quark (void); /* virtual class function wrappers */ FsSession *fs_conference_new_session (FsConference *conference, FsMediaType media_type, GError **error); FsParticipant *fs_conference_new_participant (FsConference *conference, GError **error); gboolean fs_parse_error (GObject *object, GstMessage *message, FsError *error, const gchar **error_msg); G_END_DECLS #endif /* __FS_CONFERENCE_H__ */ farstream-0.2.7/farstream/fs-codec.c0000664000076400007640000005536412462321741014271 00000000000000/* * Farstream - Farstream Codec * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * Copyright 2005 Collabora Ltd. * @author: Rob Taylor * * fs-codec.c - A Farstream codec * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-codec.h" #include #include "fs-private.h" #define GST_CAT_DEFAULT _fs_conference_debug /** * SECTION:fs-codec * @short_description: Structure representing a media codec * * An #FsCodec is a way to exchange codec information between the client and * Farstream. The information specified in this structure is usually * representative of the codec information exchanged in the signaling. * */ GType fs_codec_get_type (void) { static GType codec_type = 0; if (codec_type == 0) { codec_type = g_boxed_type_register_static ( "FsCodec", (GBoxedCopyFunc)fs_codec_copy, (GBoxedFreeFunc)fs_codec_destroy); } return codec_type; } GType fs_codec_list_get_type (void) { static GType codec_list_type = 0; if (codec_list_type == 0) { codec_list_type = g_boxed_type_register_static ( "FsCodecGList", (GBoxedCopyFunc)fs_codec_list_copy, (GBoxedFreeFunc)fs_codec_list_destroy); } return codec_list_type; } G_DEFINE_BOXED_TYPE (FsCodecParameter, fs_codec_parameter, fs_codec_parameter_copy, fs_codec_parameter_free) G_DEFINE_BOXED_TYPE (FsFeedbackParameter, fs_feedback_parameter, fs_feedback_parameter_copy, fs_feedback_parameter_free) /** * fs_codec_new: * @id: codec identifier, if RTP this should be based on IETF RTP payload types * @encoding_name: Name of media type this encodes * @media_type: #FsMediaType for type of codec * @clock_rate: The clock rate this codec encodes at, if applicable * * Allocates and initializes a #FsCodec structure * * Returns: A newly allocated #FsCodec */ FsCodec * fs_codec_new (int id, const char *encoding_name, FsMediaType media_type, guint clock_rate) { FsCodec *codec = g_slice_new0 (FsCodec); codec->id = id; codec->encoding_name = g_strdup (encoding_name); codec->media_type = media_type; codec->clock_rate = clock_rate; codec->minimum_reporting_interval = G_MAXUINT; return codec; } /** * fs_codec_parameter_free: * @param: a #FsCodecParameter to free * * Frees a #FsCodecParameter * */ void fs_codec_parameter_free (FsCodecParameter *param) { g_free (param->name); g_free (param->value); g_slice_free (FsCodecParameter, param); } /** * fs_feedback_parameter_free: * @param: a #FsFeedbackParameter to free * * Frees a #FsFeedbackParameter * */ void fs_feedback_parameter_free (FsFeedbackParameter *param) { g_free (param->type); g_free (param->subtype); g_free (param->extra_params); g_slice_free (FsFeedbackParameter, param); } /** * fs_codec_destroy: (skip) * @codec: #FsCodec structure to free * * Deletes a #FsCodec structure and all its data. Is a no-op on %NULL codec */ void fs_codec_destroy (FsCodec * codec) { if (codec == NULL) return; g_free (codec->encoding_name); g_list_foreach (codec->optional_params, (GFunc) fs_codec_parameter_free, NULL); g_list_free (codec->optional_params); g_list_foreach (codec->feedback_params, (GFunc) fs_feedback_parameter_free, NULL); g_list_free (codec->feedback_params); g_slice_free (FsCodec, codec); } /** * fs_codec_copy: * @codec: codec to copy * * Copies a #FsCodec structure. * * Returns: a copy of the codec */ FsCodec * fs_codec_copy (const FsCodec * codec) { FsCodec *copy = NULL; GList *lp; GQueue list_copy = G_QUEUE_INIT; if (codec == NULL) return NULL; copy = fs_codec_new (codec->id, codec->encoding_name, codec->media_type, codec->clock_rate); copy->channels = codec->channels; copy->minimum_reporting_interval = codec->minimum_reporting_interval; for (lp = codec->optional_params; lp; lp = g_list_next (lp)) { FsCodecParameter *param_copy; FsCodecParameter *param = lp->data;; param_copy = g_slice_new (FsCodecParameter); param_copy->name = g_strdup (param->name); param_copy->value = g_strdup (param->value); g_queue_push_tail (&list_copy, param_copy); } copy->optional_params = list_copy.head; g_queue_init (&list_copy); for (lp = codec->feedback_params; lp; lp = g_list_next (lp)) { FsFeedbackParameter *param_copy; FsFeedbackParameter *param = lp->data;; param_copy = g_slice_new (FsFeedbackParameter); param_copy->type = g_strdup (param->type); param_copy->subtype = g_strdup (param->subtype); param_copy->extra_params = g_strdup (param->extra_params); g_queue_push_tail (&list_copy, param_copy); } copy->feedback_params = list_copy.head; return copy; } /** * fs_codec_list_destroy: (skip) * @codec_list: a GList of #FsCodec to delete * * Deletes a list of #FsCodec structures and the list itself. * Does nothing on %NULL lists. */ void fs_codec_list_destroy (GList *codec_list) { GList *lp; FsCodec *codec; for (lp = codec_list; lp; lp = g_list_next (lp)) { codec = (FsCodec *) lp->data; fs_codec_destroy (codec); lp->data = NULL; } g_list_free (codec_list); } /** * fs_codec_list_copy: * @codec_list: (transfer none) (element-type FsCodec): * a GList of #FsCodec to copy * * Copies a list of #FsCodec structures. * * Returns: (element-type FsCodec) (transfer full): The new list. */ GList * fs_codec_list_copy (const GList *codec_list) { GQueue copy = G_QUEUE_INIT; const GList *lp; for (lp = codec_list; lp; lp = g_list_next (lp)) { FsCodec *codec = (FsCodec *) lp->data; g_queue_push_tail (©, fs_codec_copy (codec)); } return copy.head; } /** * fs_codec_list_from_keyfile: * @filename: Name of the #GKeyFile to read the codecs parameters from * @error: location of a #GError, or NULL if no error occured * * Reads the content of a #GKeyFile of the following format into * a #GList of #FsCodec structures. * * * Example: * |[ * [audio/codec1] * clock-rate=8000 * * [audio/codec1:1] * clock-rate=16000 * * [audio/codec2] * one_param=QCIF * another_param=WOW * * [video/codec3] * wierd_param=42 * feedback:nack/pli=1 * feedback:tfrc= * ]| * * Return value: (element-type FsCodec) (transfer full): * The #GList of #FsCodec or %NULL if the keyfile was empty or an error occured. */ GList * fs_codec_list_from_keyfile (const gchar *filename, GError **error) { GKeyFile *keyfile = NULL; GList *codecs = NULL; GError *gerror = NULL; gchar **groups = NULL; gsize groups_count = 0; int i; g_return_val_if_fail (filename, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); keyfile = g_key_file_new (); if (!g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, error)) { goto out; } groups = g_key_file_get_groups (keyfile, &groups_count); if (!groups) goto out; for (i=0; i < groups_count && groups[i]; i++) { FsCodec *codec; gchar **keys = NULL; gsize keys_count; int j; gchar *encoding_name = NULL; gchar *next_tok = NULL; FsMediaType media_type; keys = g_key_file_get_keys (keyfile, groups[i], &keys_count, &gerror); if (!keys || gerror) { if (gerror) GST_WARNING ("Unable to read parameters for %s: %s\n", groups[i], gerror->message); else GST_WARNING ("Unknown errors while reading parameters for %s", groups[i]); g_clear_error (&gerror); goto next_codec; } next_tok = strchr (groups[i], '/'); if (!next_tok) { GST_WARNING ("Invalid codec name: %s", groups[i]); goto next_codec; } if ((next_tok - groups[i]) == 5 /* strlen ("audio") */ && !g_ascii_strncasecmp ("audio", groups[i], 5)) { media_type = FS_MEDIA_TYPE_AUDIO; } else if ((next_tok - groups[i]) == 5 /* strlen ("video") */ && !g_ascii_strncasecmp ("video", groups[i], 5)) { media_type = FS_MEDIA_TYPE_VIDEO; } else if ((next_tok - groups[i]) == 11 /* strlen ("application") */ && !g_ascii_strncasecmp ("application", groups[i], 11)) { media_type = FS_MEDIA_TYPE_APPLICATION; } else { GST_WARNING ("Invalid media type in codec name name %s", groups[i]); goto next_codec; } encoding_name = next_tok + 1; next_tok = strchr (encoding_name, ':'); if (encoding_name[0] == 0 || next_tok - encoding_name == 1) goto next_codec; if (next_tok) encoding_name = g_strndup (encoding_name, next_tok - encoding_name); else encoding_name = g_strdup (encoding_name); codec = fs_codec_new (FS_CODEC_ID_ANY, encoding_name, media_type, 0); g_free (encoding_name); for (j = 0; j < keys_count && keys[j]; j++) { if (!g_ascii_strcasecmp ("clock-rate", keys[j])) { codec->clock_rate = g_key_file_get_integer (keyfile, groups[i], keys[j], &gerror); if (gerror) { codec->clock_rate = 0; goto keyerror; } } else if (!g_ascii_strcasecmp ("id", keys[j])) { codec->id = g_key_file_get_integer (keyfile, groups[i], keys[j], &gerror); if (gerror) { codec->id = FS_CODEC_ID_ANY; goto keyerror; } if (codec->id < 0) codec->id = FS_CODEC_ID_DISABLE; } else if (!g_ascii_strcasecmp ("channels", keys[j])) { codec->channels = g_key_file_get_integer (keyfile, groups[i], keys[j], &gerror); if (gerror) { codec->channels = 0; goto keyerror; } } else if (!g_ascii_strcasecmp ("trr-int", keys[j])) { codec->minimum_reporting_interval = g_key_file_get_integer (keyfile, groups[i], keys[j], &gerror); if (gerror) { codec->minimum_reporting_interval = G_MAXUINT; goto keyerror; } } else if (g_str_has_prefix (keys[j], "feedback:")) { gchar *type = keys[j] + strlen ("feedback:"); gchar *subtype = strchr (type, '/'); gchar *extra_params; extra_params = g_key_file_get_string (keyfile, groups[i], keys[j], &gerror); if (gerror) goto keyerror; /* Replace / with \0 and point to name (the next char) */ if (subtype) { *subtype=0; subtype++; } else { subtype = ""; } fs_codec_add_feedback_parameter (codec, type, subtype, extra_params); g_free (extra_params); } else { FsCodecParameter *param = g_slice_new (FsCodecParameter); param->name = g_strdup (keys[j]); param->value = g_key_file_get_string (keyfile, groups[i], keys[j], &gerror); if (gerror) { fs_codec_parameter_free (param); goto keyerror; } if (!param->name || !param->value) fs_codec_parameter_free (param); else codec->optional_params = g_list_append (codec->optional_params, param); } continue; keyerror: GST_WARNING ("Error reading key %s codec %s: %s", keys[j], groups[i], gerror->message); g_clear_error (&gerror); } codecs = g_list_append (codecs, codec); next_codec: g_strfreev (keys); } out: g_strfreev (groups); g_key_file_free (keyfile); return codecs; } /** * fs_media_type_to_string: * @media_type: A media type * * Gives a user-printable string representing the media type * * Return value: a static string representing the media type */ const gchar * fs_media_type_to_string (FsMediaType media_type) { if (media_type == FS_MEDIA_TYPE_AUDIO) { return "audio"; } else if (media_type == FS_MEDIA_TYPE_VIDEO) { return "video"; } else if (media_type == FS_MEDIA_TYPE_APPLICATION) { return "application"; } else { return NULL; } } /** * fs_codec_to_string: * @codec: A farstream codec * * Returns a newly-allocated string representing the codec * * Return value: the newly-allocated string */ gchar * fs_codec_to_string (const FsCodec *codec) { GString *string = NULL; GList *item; gchar *charstring; if (codec == NULL) return g_strdup ("(NULL)"); string = g_string_new (""); g_string_printf (string, "%d: %s %s clock:%d channels:%d", codec->id, fs_media_type_to_string (codec->media_type), codec->encoding_name, codec->clock_rate, codec->channels); if (codec->minimum_reporting_interval != G_MAXUINT) g_string_append_printf (string, " trr-int=%u", codec->minimum_reporting_interval); for (item = codec->optional_params; item; item = g_list_next (item)) { FsCodecParameter *param = item->data; g_string_append_printf (string, " %s=%s", param->name, param->value); } for (item = codec->feedback_params; item; item = g_list_next (item)) { FsFeedbackParameter *param = item->data; g_string_append_printf (string, " %s/%s=%s", param->type, param->subtype, param->extra_params); } charstring = string->str; g_string_free (string, FALSE); return charstring; } static gboolean compare_optional_params (const gpointer p1, const gpointer p2) { const FsCodecParameter *param1 = p1; const FsCodecParameter *param2 = p2; if (!g_ascii_strcasecmp (param1->name, param2->name) && !strcmp (param1->value, param2->value)) return TRUE; else return FALSE; } static gboolean compare_feedback_params (const gpointer p1, const gpointer p2) { const FsFeedbackParameter *param1 = p1; const FsFeedbackParameter *param2 = p2; if (!g_ascii_strcasecmp (param1->subtype, param2->subtype) && !g_ascii_strcasecmp (param1->type, param2->type) && !g_strcmp0 (param1->extra_params, param2->extra_params)) return TRUE; else return FALSE; } /* * Check if all of the elements of list1 are in list2 * It compares GLists of X using the comparison function */ static gboolean compare_lists (GList *list1, GList *list2, gboolean (*compare_params) (const gpointer p1, const gpointer p2)) { GList *item1; for (item1 = g_list_first (list1); item1; item1 = g_list_next (item1)) { FsCodecParameter *param1 = item1->data; GList *item2 = NULL; for (item2 = g_list_first (list2); item2; item2 = g_list_next (item2)) { FsCodecParameter *param2 = item2->data; if (compare_params (param1, param2)) break; } if (!item2) return FALSE; } return TRUE; } /** * fs_codec_are_equal: * @codec1: First codec * @codec2: Second codec * * Compare two codecs, it will declare two codecs to be identical even * if their optional parameters are in a different order. %NULL encoding names * are ignored. * * Return value: %TRUE of the codecs are identical, %FALSE otherwise */ gboolean fs_codec_are_equal (const FsCodec *codec1, const FsCodec *codec2) { if (codec1 == codec2) return TRUE; if (!codec1 || !codec2) return FALSE; if (codec1->id != codec2->id || codec1->media_type != codec2->media_type || codec1->clock_rate != codec2->clock_rate || codec1->channels != codec2->channels || codec1->minimum_reporting_interval != codec2->minimum_reporting_interval || codec1->encoding_name == NULL || codec2->encoding_name == NULL || g_ascii_strcasecmp (codec1->encoding_name, codec2->encoding_name)) return FALSE; /* Is there a smarter way to compare to un-ordered linked lists * to make sure they contain exactly the same elements?? */ if (!compare_lists (codec1->optional_params, codec2->optional_params, compare_optional_params) || !compare_lists (codec2->optional_params, codec1->optional_params, compare_optional_params)) return FALSE; if (!compare_lists (codec1->feedback_params, codec2->feedback_params, compare_feedback_params) || !compare_lists (codec2->feedback_params, codec1->feedback_params, compare_feedback_params)) return FALSE; return TRUE; } /** * fs_codec_list_are_equal: * @list1: (element-type FsCodec) (allow-none): a #GList of #FsCodec * @list2: (element-type FsCodec) (allow-none): a #GList of #FsCodec * * Verifies if two glist of fscodecs are identical * * Returns: %TRUE if they are identical, %FALSE otherwise */ gboolean fs_codec_list_are_equal (GList *list1, GList *list2) { for (; list1 && list2; list1 = g_list_next (list1), list2 = g_list_next (list2)) { if (!fs_codec_are_equal (list1->data, list2->data)) return FALSE; } if (list1 == NULL && list2 == NULL) return TRUE; else return FALSE; } /** * fs_codec_add_optional_parameter: * @codec: The #FsCodec to add the parameter to * @name: The name of the optional parameter * @value: The extra_params of the optional parameter * * This function adds an new optional parameter to a #FsCodec */ void fs_codec_add_optional_parameter (FsCodec *codec, const gchar *name, const gchar *value) { FsCodecParameter *param; g_return_if_fail (name != NULL && value != NULL); param = g_slice_new (FsCodecParameter); param->name = g_strdup (name); param->value = g_strdup (value); codec->optional_params = g_list_append (codec->optional_params, param); } /** * fs_codec_remove_optional_parameter: * @codec: a #FsCodec * @param: a pointer to the #FsCodecParameter to remove * * Removes an optional parameter from a codec. * * NULL param will do nothing. */ void fs_codec_remove_optional_parameter (FsCodec *codec, FsCodecParameter *param) { g_return_if_fail (codec); if (!param) return; fs_codec_parameter_free (param); codec->optional_params = g_list_remove (codec->optional_params, param); } /** * fs_codec_get_optional_parameter: * @codec: a #FsCodec * @name: The name of the parameter to search for * @value: (allow-none): The value of the parameter to search for or %NULL for * any value * * Finds the #FsCodecParameter in the #FsCodec that has the requested name * and, if not %NULL, the requested value * * Returns: (transfer none): the #FsCodecParameter from the #FsCodec or %NULL */ FsCodecParameter * fs_codec_get_optional_parameter (FsCodec *codec, const gchar *name, const gchar *value) { GList *item = NULL; g_return_val_if_fail (codec != NULL, NULL); g_return_val_if_fail (name != NULL, NULL); for (item = g_list_first (codec->optional_params); item; item = g_list_next (item)) { FsCodecParameter *param = item->data; if (!g_ascii_strcasecmp (param->name, name) && (value == NULL || !g_ascii_strcasecmp (param->value, value))) return param; } return NULL; } /** * fs_codec_add_feedback_parameter: * @codec: The #FsCodec to add the parameter to * @type: The type of the feedback parameter * @subtype: The subtype of the feedback parameter * @extra_params: The extra_params of the feeback parameter * * This function adds an new feedback parameter to a #FsCodec */ void fs_codec_add_feedback_parameter (FsCodec *codec, const gchar *type, const gchar *subtype, const gchar *extra_params) { FsFeedbackParameter *param; g_return_if_fail (type != NULL); g_return_if_fail (subtype != NULL); g_return_if_fail (extra_params != NULL); param = g_slice_new (FsFeedbackParameter); param->type = g_strdup (type); param->subtype = g_strdup (subtype); param->extra_params = g_strdup (extra_params); codec->feedback_params = g_list_append (codec->feedback_params, param); } /** * fs_codec_get_feedback_parameter: * @codec: a #FsCodec * @type: (allow-none): The subtype of the parameter to search for or %NULL for * any type * @subtype: (allow-none): The subtype of the parameter to search for or %NULL * for any subtype * @extra_params: (allow-none): The extra_params of the parameter to search for * or %NULL for any extra_params * * Finds the #FsFeedbackParameter in the #FsCodec that has the requested * subtype, type and extra_params. One of which must be non-NULL; * * Returns: the #FsFeedbackParameter from the #FsCodec or %NULL */ FsFeedbackParameter * fs_codec_get_feedback_parameter (FsCodec *codec, const gchar *type, const gchar *subtype, const gchar *extra_params) { GList *item = NULL; g_return_val_if_fail (codec != NULL, NULL); g_return_val_if_fail (type != NULL || subtype != NULL, NULL); for (item = g_list_first (codec->feedback_params); item; item = g_list_next (item)) { FsFeedbackParameter *param = item->data; if (!g_ascii_strcasecmp (param->type, type) && (subtype == NULL || !g_ascii_strcasecmp (param->subtype, subtype)) && (extra_params == NULL || !g_ascii_strcasecmp (param->extra_params, extra_params))) return param; } return NULL; } /** * fs_codec_remove_feedback_parameter: * @codec: a #FsCodec * @item: (transfer none) (element-type FsFeedbackParameter): * a pointer to the #GList element to remove that contains a * #FsFeedbackParameter * * Removes an optional parameter from a codec. * * NULL param will do nothing. */ void fs_codec_remove_feedback_parameter (FsCodec *codec, GList *item) { g_return_if_fail (codec); if (!item) return; fs_feedback_parameter_free (item->data); codec->feedback_params = g_list_delete_link (codec->feedback_params, item); } /** * fs_codec_parameter_copy: * @param: a #FsCodecParameter * * Makes a copy of a #FsCodecParameter * * Returns: a newly allocated #FsCodecParameter */ FsCodecParameter * fs_codec_parameter_copy (const FsCodecParameter *param) { FsCodecParameter *outparam = g_slice_new (FsCodecParameter); outparam->name = g_strdup (param->name); outparam->value = g_strdup (param->value); return outparam; } /** * fs_feedback_parameter_copy: * @param: a #FsFeedbackParameter * * Makes a copy of a #FsFeedbackParameter * * Returns: a newly allocated #FsFeedbackParameter */ FsFeedbackParameter * fs_feedback_parameter_copy (const FsFeedbackParameter *param) { FsFeedbackParameter *outparam = g_slice_new (FsFeedbackParameter); outparam->type = g_strdup (param->type); outparam->subtype = g_strdup (param->subtype); outparam->extra_params = g_strdup (param->extra_params); return outparam; } farstream-0.2.7/farstream/fs-participant.c0000664000076400007640000000470412401500475015516 00000000000000/* * Farstream - Farstream Participant * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-participant.c - A Farstream Participant gobject (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-participant * @short_description: A participant in a conference * * This object is the base implementation of a Farstream Participant. It needs to be * derived and implemented by a farstream conference gstreamer element. A * participant represents any source of media in a conference. This could be a * human-participant or an automaton. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-participant.h" #include "fs-enumtypes.h" /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0 }; /* struct _FsParticipantPrivate { }; */ G_DEFINE_ABSTRACT_TYPE(FsParticipant, fs_participant, G_TYPE_OBJECT); #define FS_PARTICIPANT_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_PARTICIPANT, \ FsParticipantPrivate)) static void fs_participant_finalize (GObject *object); // static guint signals[LAST_SIGNAL] = { 0 }; static void fs_participant_class_init (FsParticipantClass *klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; gobject_class->finalize = fs_participant_finalize; // g_type_class_add_private (klass, sizeof (FsParticipantPrivate)); } static void fs_participant_init (FsParticipant *self) { //self->priv = FS_PARTICIPANT_GET_PRIVATE (self); g_mutex_init (&self->mutex); } static void fs_participant_finalize (GObject *object) { FsParticipant *self = FS_PARTICIPANT (object); g_mutex_clear (&self->mutex); G_OBJECT_CLASS (fs_participant_parent_class)->finalize (object); } farstream-0.2.7/farstream/fs-candidate.c0000664000076400007640000001646012401500475015116 00000000000000/* * Farstream - Farstream Candidate * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-candidate.c - A Farstream candidate * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-candidate.h" /** * SECTION:fs-candidate * @short_description: Structure describing a transport candidate. * * An FsCandidate is a way to exchange candidate information between the client * and Farstream. This description is compatible with ICE-13. It can also be a * multicast address. Candidates are linked to streams. The information * specified in this structure is usually representative of the codec * information exchanged in the signaling. */ GType fs_candidate_get_type (void) { static GType candidate_type = 0; if (candidate_type == 0) { candidate_type = g_boxed_type_register_static ( "FsCandidate", (GBoxedCopyFunc)fs_candidate_copy, (GBoxedFreeFunc)fs_candidate_destroy); } return candidate_type; } GType fs_candidate_list_get_type (void) { static GType candidate_list_type = 0; if (candidate_list_type == 0) { candidate_list_type = g_boxed_type_register_static ( "FsCandidateList", (GBoxedCopyFunc)fs_candidate_list_copy, (GBoxedFreeFunc)fs_candidate_list_destroy); } return candidate_list_type; } /** * fs_candidate_destroy: (skip) * @cand: a #FsCandidate to delete * * Frees a #FsCandidate and all its contents */ void fs_candidate_destroy (FsCandidate * cand) { if (cand == NULL) return; g_free ((gchar *) cand->foundation); g_free ((gchar *) cand->ip); g_free ((gchar *) cand->base_ip); g_free ((gchar *) cand->username); g_free ((gchar *) cand->password); g_slice_free (FsCandidate, cand); } /** * fs_candidate_copy: * @cand: a #FsCandidate to copy * * Copies a #FsCandidate and its contents. * * Returns: a new #FsCandidate */ FsCandidate * fs_candidate_copy (const FsCandidate * cand) { FsCandidate *copy = g_slice_new0 (FsCandidate); if (cand == NULL) return NULL; copy->component_id = cand->component_id; copy->port = cand->port; copy->base_port = cand->base_port; copy->proto = cand->proto; copy->priority = cand->priority; copy->type = cand->type; copy->ttl = cand->ttl; copy->foundation = g_strdup (cand->foundation); copy->ip = g_strdup (cand->ip); copy->base_ip = g_strdup (cand->base_ip); copy->username = g_strdup (cand->username); copy->password = g_strdup (cand->password); return copy; } /** * fs_candidate_list_destroy: (skip) * @candidate_list: A GList of #FsCandidate * * Deletes a GList of #FsCandidate and its contents */ void fs_candidate_list_destroy (GList *candidate_list) { GList *lp; FsCandidate *cand; for (lp = candidate_list; lp; lp = g_list_next (lp)) { cand = (FsCandidate *) lp->data; fs_candidate_destroy (cand); lp->data = NULL; } g_list_free (candidate_list); } /** * fs_candidate_list_copy: * @candidate_list: (element-type FsCodec): A GList of #FsCandidate * * Copies a GList of #FsCandidate and its contents * * Returns: (element-type FsCodec) (transfer full): a new GList of #FsCandidate */ GList * fs_candidate_list_copy (const GList *candidate_list) { GQueue copy = G_QUEUE_INIT; const GList *lp; for (lp = candidate_list; lp; lp = g_list_next (lp)) { FsCandidate *cand = lp->data; g_queue_push_tail (©, fs_candidate_copy (cand)); } return copy.head; } /** * fs_candidate_new: * @foundation: The foundation of the candidate * @component_id: The component this candidate is for * @type: The type of candidate * @proto: The protocol this component is for * @ip: (allow-none): The IP address of this component (can be NULL for local candidate to * mean any address) * @port: the UDP/TCP port * * Allocates a new #FsCandidate, the rest of the fields can be optionally * filled manually. See also fs_candidate_new_full() * * Returns: a newly-allocated #FsCandidate */ FsCandidate * fs_candidate_new ( const gchar *foundation, guint component_id, FsCandidateType type, FsNetworkProtocol proto, const gchar *ip, guint port) { FsCandidate *candidate = g_slice_new0 (FsCandidate); candidate->foundation = g_strdup (foundation); candidate->component_id = component_id; candidate->type = type; candidate->proto = proto; candidate->ip = g_strdup (ip); candidate->port = port; return candidate; } /** * fs_candidate_new_full: * @foundation: The foundation of the candidate * @component_id: The component this candidate is for * @ip: (allow-none): The IP address of this component (can be NULL for local candidate to * mean any address) * @port: the UDP/TCP port * @base_ip: (allow-none): IP of base in dotted format as defined in ICE-19. * @base_port: Port of base as defined in ICE-19. * @proto: The protocol this component is for * @priority: Value between 0 and (2^31 - 1) representing the priority * @type: The type of candidate * @username: (allow-none): Username to use to connect to client if necessary, * NULL otherwise * @password: (allow-none): Username to use to connect to client if necessary, * NULL otherwise * @ttl: The TTL used when sending Multicast packet (0 = auto) * * Allocates a new #FsCandidate, filling all the fields. See also * fs_candidate_new() * * Returns: a newly-allocated #FsCandidate */ FsCandidate * fs_candidate_new_full ( const gchar *foundation, guint component_id, const gchar *ip, guint16 port, const gchar *base_ip, guint16 base_port, FsNetworkProtocol proto, guint32 priority, FsCandidateType type, const gchar *username, const gchar *password, guint ttl) { FsCandidate *candidate = g_slice_new (FsCandidate); candidate->foundation = g_strdup (foundation); candidate->component_id = component_id; candidate->ip = g_strdup (ip); candidate->port = port; candidate->base_ip = g_strdup (base_ip); candidate->base_port = base_port; candidate->proto = proto; candidate->priority = priority; candidate->type = type; candidate->username = g_strdup (username); candidate->password = g_strdup (password); candidate->ttl = ttl; return candidate; } /** * fs_value_set_candidate_list: * @value: a #GValue of type #FS_TYPE_CANDIDATE_LIST * @candidates: (element-type FsCandidate) (allow-none): A #GList of #FsCandidate * * This is for the bindings benefit. Works around the limitations of GObject * introspection. * */ void fs_value_set_candidate_list (GValue *value, GList *candidates) { g_value_init (value, FS_TYPE_CANDIDATE_LIST); g_value_set_boxed (value, candidates); } farstream-0.2.7/farstream/fs-utils.c0000664000076400007640000001763012401500475014342 00000000000000/* * Farstream - Miscellaneous useful functions * * Copyright 2011 Collabora Ltd. * @author: Olivier Crete * Copyright 2011 Nokia Corp. * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include #endif #include "fs-utils.h" #include #include "fs-rtp.h" /** * SECTION:fs-utils * @short_description: Miscellaneous useful functions */ static GList * load_default_codec_preferences_from_path (const gchar *element_name, const gchar *path) { GList *codec_prefs = NULL; gchar *filename; filename = g_build_filename (path, PACKAGE, FS_APIVERSION, element_name, "default-codec-preferences", NULL); codec_prefs = fs_codec_list_from_keyfile (filename, NULL); g_free (filename); return codec_prefs; } static const gchar * factory_name_from_element (GstElement *element) { GstElementFactory *factory = gst_element_get_factory (element); if (factory) return gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)); else return NULL; } /** * fs_utils_get_default_codec_preferences: * @element: Element for which to fetch default codec preferences * * These default codec preferences should work with the elements that are * available in the main GStreamer element repositories. * They should be suitable for standards based protocols like SIP or XMPP. * * Returns: (element-type FsCodec) (transfer full): * The default codec preferences for this plugin. * This #GList should be freed with fs_codec_list_destroy() */ GList * fs_utils_get_default_codec_preferences (GstElement *element) { const gchar * const * system_data_dirs = g_get_system_data_dirs (); GList *codec_prefs = NULL; guint i; const gchar *factory_name = factory_name_from_element (element); if (!factory_name) return NULL; codec_prefs = load_default_codec_preferences_from_path (factory_name, g_get_user_data_dir ()); if (codec_prefs) return codec_prefs; for (i = 0; system_data_dirs[i]; i++) { codec_prefs = load_default_codec_preferences_from_path (factory_name, system_data_dirs[i]); if (codec_prefs) return codec_prefs; } return NULL; } /** * fs_utils_get_default_element_properties: (skip) * @element: Element for which to fetch default element properties * * This function produces a #GKeyFile that can be fed to * fs_element_added_notifier_set_properties_from_keyfile(). If no * default properties have been found, it will return %NULL. * * Returns: a #GKeyFile containing the default element * properties for this element or %NULL if no properties were found. * Caller must free the #GKeyFile when he is done. */ GKeyFile * fs_utils_get_default_element_properties (GstElement *element) { gboolean file_loaded; GKeyFile *keyfile = g_key_file_new (); gchar *filename; const gchar *factory_name = factory_name_from_element (element); if (factory_name == NULL) return NULL; filename = g_build_filename (PACKAGE, FS_APIVERSION, factory_name, "default-element-properties", NULL); file_loaded = g_key_file_load_from_data_dirs (keyfile, filename, NULL, G_KEY_FILE_NONE, NULL); g_free (filename); if (file_loaded) { return keyfile; } else { g_key_file_free (keyfile); return NULL; } } /** * fs_utils_set_bitrate: * @element: The #GstElement * @bitrate: The bitrate in bits/sec * * This allows setting the bitrate on all elements that have a "bitrate" * property without having to know the type or of the unit used by that element. * * This will be obsolete in 0.11 (when all elements use bit/sec for the * "bitrate" property. */ void fs_utils_set_bitrate (GstElement *element, glong bitrate) { GParamSpec *spec; const char *elements_in_kbps[] = { "lamemp3enc", "lame", "x264enc", "twolame", "mpeg2enc", NULL }; int i; GstElementFactory *factory; const gchar *factory_name = NULL; g_return_if_fail (GST_IS_ELEMENT (element)); spec = g_object_class_find_property (G_OBJECT_GET_CLASS (element), "bitrate"); g_return_if_fail (spec != NULL); factory = gst_element_get_factory (element); if (factory) factory_name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)); /* divide by 1000 for elements that are known to use kbs */ for (i = 0; elements_in_kbps[i]; i++) if (factory_name && !strcmp (factory_name, elements_in_kbps[i])) { bitrate /= 1000; break; } if (G_PARAM_SPEC_TYPE (spec) == G_TYPE_LONG) { g_object_set (element, "bitrate", (glong) CLAMP (bitrate, G_PARAM_SPEC_LONG (spec)->minimum, G_PARAM_SPEC_LONG (spec)->maximum), NULL); } else if (G_PARAM_SPEC_VALUE_TYPE (spec) == G_TYPE_ULONG) { g_object_set (element, "bitrate", (gulong) CLAMP (bitrate, G_PARAM_SPEC_ULONG (spec)->minimum, G_PARAM_SPEC_ULONG (spec)->maximum), NULL); } else if (G_PARAM_SPEC_VALUE_TYPE (spec) == G_TYPE_INT) { gint tmp = MIN (bitrate, G_MAXINT); g_object_set (element, "bitrate", (gint) CLAMP (tmp, G_PARAM_SPEC_INT (spec)->minimum, G_PARAM_SPEC_INT (spec)->maximum), NULL); } else if (G_PARAM_SPEC_VALUE_TYPE (spec) == G_TYPE_UINT) { guint tmp = MIN (bitrate, G_MAXUINT); g_object_set (element, "bitrate", (guint) CLAMP (tmp, G_PARAM_SPEC_UINT (spec)->minimum, G_PARAM_SPEC_UINT (spec)->maximum), NULL); } else { g_warning ("bitrate parameter of unknown type"); } } static GList * load_default_rtp_hdrext_preferences_from_path (const gchar *element_name, const gchar *path, FsMediaType media_type) { GList *rtp_hdrext_prefs = NULL; gchar *filename; filename = g_build_filename (path, PACKAGE, FS_APIVERSION, element_name, "default-codec-preferences", NULL); rtp_hdrext_prefs = fs_rtp_header_extension_list_from_keyfile (filename, media_type, NULL); g_free (filename); return rtp_hdrext_prefs; } /** * fs_utils_get_default_rtp_header_extension_preferences: * @element: Element for which to fetch default RTP Header Extension preferences * @media_type: The #FsMediaType for which to get default RTP Header Extension * preferences * * These default rtp header extension preferences should work with the elements * that are available in the main GStreamer element repositories. * They should be suitable for standards based protocols like SIP or XMPP. * * Returns: (element-type FsCodec) (transfer full): The default rtp * header extension preferences for this plugin, this #GList should be * freed with fs_codec_list_destroy() */ GList * fs_utils_get_default_rtp_header_extension_preferences (GstElement *element, FsMediaType media_type) { const gchar * const * system_data_dirs = g_get_system_data_dirs (); GList *rtp_hdrext_prefs = NULL; guint i; const gchar *factory_name = factory_name_from_element (element); if (!factory_name) return NULL; rtp_hdrext_prefs = load_default_rtp_hdrext_preferences_from_path ( factory_name, g_get_user_data_dir (), media_type); if (rtp_hdrext_prefs) return rtp_hdrext_prefs; for (i = 0; system_data_dirs[i]; i++) { rtp_hdrext_prefs = load_default_rtp_hdrext_preferences_from_path ( factory_name, system_data_dirs[i], media_type); if (rtp_hdrext_prefs) return rtp_hdrext_prefs; } return NULL; } farstream-0.2.7/farstream/fs-rtp.c0000664000076400007640000002110612461773672014021 00000000000000/* * Farstream - Farstream RTP specific types * * Copyright 2011 Collabora Ltd. * @author: Olivier Crete * Copyright 2011 Nokia Corp. * * fs-rtp.c - Farstream RTP specific types * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rtp.h" #include typedef GList FsRtpHeaderExtensionGList; G_DEFINE_BOXED_TYPE (FsRtpHeaderExtension, fs_rtp_header_extension, fs_rtp_header_extension_copy, fs_rtp_header_extension_destroy) G_DEFINE_BOXED_TYPE (FsRtpHeaderExtensionGList, fs_rtp_header_extension_list, fs_rtp_header_extension_list_copy, fs_rtp_header_extension_list_destroy) /** * fs_rtp_header_extension_new: * @id: The identifier of the RTP header extension * @direction: the direction in which this extension can be used * @uri: The URI that defines this extension * * Creates a new #FsRtpHeaderExtension * * Returns: a new #FsRtpHeaderExtension */ FsRtpHeaderExtension * fs_rtp_header_extension_new (guint id, FsStreamDirection direction, const gchar *uri) { FsRtpHeaderExtension *extension; extension = g_slice_new (FsRtpHeaderExtension); extension->id = id; extension->direction = direction; extension->uri = g_strdup (uri); return extension; } /** * fs_rtp_header_extension_copy: (skip) * @extension: The RTP header extension definition to copy * * Copies a #FsRtpHeaderExtension * * Returns: a new #FsRtpHeaderExtension */ FsRtpHeaderExtension * fs_rtp_header_extension_copy (FsRtpHeaderExtension *extension) { if (extension) return fs_rtp_header_extension_new (extension->id, extension->direction, extension->uri); else return NULL; } /** * fs_rtp_header_extension_are_equal: * @extension1: The first #FsRtpHeaderExtension * @extension2: The second #FsRtpHeaderExtension * * Compares two #FsRtpHeaderExtension structures * * Returns: %TRUE if they are identical, %FALSE otherwise */ gboolean fs_rtp_header_extension_are_equal (FsRtpHeaderExtension *extension1, FsRtpHeaderExtension *extension2) { if (extension1 == extension2) return TRUE; if (!extension1 || !extension2) return FALSE; if (extension1->id == extension2->id && extension1->direction == extension2->direction && (extension1->uri == extension2->uri || (extension1->uri && extension2->uri && !strcmp (extension1->uri, extension2->uri)))) return TRUE; else return FALSE; } /** * fs_rtp_header_extension_destroy: (skip) * @extension: A RTP header extension to free * * Frees the passed #FsRtpHeaderExtension */ void fs_rtp_header_extension_destroy (FsRtpHeaderExtension *extension) { if (extension) { g_free (extension->uri); g_slice_free (FsRtpHeaderExtension, extension); } } /** * fs_rtp_header_extension_list_copy: * @extensions: (element-type FsRtpHeaderExtension) (transfer none): * a #GList of #FsRtpHeaderExtension * * Does a deep copy of a #GList of #FsRtpHeaderExtension * * Returns: (element-type FsRtpHeaderExtension) (transfer full): a new * #GList of #FsRtpHeaderExtension */ GList * fs_rtp_header_extension_list_copy (GList *extensions) { GQueue copy = G_QUEUE_INIT; const GList *lp; for (lp = extensions; lp; lp = g_list_next (lp)) { FsRtpHeaderExtension *ext = lp->data; g_queue_push_tail (©, fs_rtp_header_extension_copy (ext)); } return copy.head; } /** * fs_rtp_header_extension_list_destroy: (skip) * @extensions: a #GList of #FsRtpHeaderExtension * * Frees the passed #GList of #FsRtpHeaderExtension */ void fs_rtp_header_extension_list_destroy (GList *extensions) { g_list_foreach (extensions, (GFunc) fs_rtp_header_extension_destroy, NULL); g_list_free (extensions); } #define RTP_HDREXT_PREFIX "rtp-hdrext:" #define RTP_HDREXT_AUDIO_PREFIX "audio:" #define RTP_HDREXT_VIDEO_PREFIX "video:" #define RTP_HDREXT_APPLICATION_PREFIX "application:" /** * fs_rtp_header_extension_list_from_keyfile: * @filename: Name of the #GKeyFile to read the RTP Header Extensions from * @media_type: The media type for which to get header extensions * @error: location of a #GError, or NULL if no error occured * * Reads the content of a #GKeyFile of the following format into a * #GList of #FsRtpHeaderExtension structures. * * The groups have a format "rtp-hdrext:audio:XXX" or * "rtp-hdrext:video:XXX" where XXX is a unique string (per media type). * * The valid keys are: * * id: a int between in the 1-255 and 4096-4351 ranges * uri: a URI describing the RTP Header Extension * direction (optional): To only send or receive a RTP Header * Extension, possible values are "send", "receive", "none" or "both". * Defaults to "both" * * * Example: * |[ * [rtp-hdrext:audio:a] * id=1 * uri=urn:ietf:params:rtp-hdrext:toffset * * [rtp-hdrext:audio:abc] * id=3 * uri=urn:ietf:params:rtp-hdrext:ntp-64 * direction=receive * ]| * * Returns: (element-type FsRtpHeaderExtension) (transfer full): a * #GList of #FsRtpHeaderExtension that must be freed with * fs_rtp_header_extension_list_destroy() */ GList * fs_rtp_header_extension_list_from_keyfile (const gchar *filename, FsMediaType media_type, GError **error) { GKeyFile *keyfile = NULL; GList *extensions = NULL; gchar **groups = NULL; gsize groups_count = 0; int i; g_return_val_if_fail (filename, NULL); g_return_val_if_fail (media_type <= FS_MEDIA_TYPE_LAST, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); keyfile = g_key_file_new (); if (!g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, error)) goto out; groups = g_key_file_get_groups (keyfile, &groups_count); if (!groups) goto out; for (i=0; i < groups_count && groups[i]; i++) { FsStreamDirection direction = FS_DIRECTION_BOTH; gint id; gchar *uri; GError *gerror = NULL; gchar *str; if (g_ascii_strncasecmp (RTP_HDREXT_PREFIX, groups[i], strlen (RTP_HDREXT_PREFIX))) continue; if (!g_ascii_strncasecmp (RTP_HDREXT_AUDIO_PREFIX, groups[i] + strlen (RTP_HDREXT_PREFIX), strlen (RTP_HDREXT_AUDIO_PREFIX))) { if (media_type != FS_MEDIA_TYPE_AUDIO) continue; } else if (!g_ascii_strncasecmp (RTP_HDREXT_VIDEO_PREFIX, groups[i] + strlen (RTP_HDREXT_PREFIX), strlen (RTP_HDREXT_VIDEO_PREFIX))) { if (media_type != FS_MEDIA_TYPE_VIDEO) continue; } else if (!g_ascii_strncasecmp (RTP_HDREXT_APPLICATION_PREFIX, groups[i] + strlen (RTP_HDREXT_PREFIX), strlen (RTP_HDREXT_APPLICATION_PREFIX))) { if (media_type != FS_MEDIA_TYPE_APPLICATION) continue; } else { continue; } id = g_key_file_get_integer (keyfile, groups[i], "id", &gerror); if (gerror) { g_clear_error (&gerror); continue; } str = g_key_file_get_string (keyfile, groups[i], "direction", &gerror); if (gerror) { GQuark domain = gerror->domain; gint code = gerror->code; g_clear_error (&gerror); if (domain != G_KEY_FILE_ERROR || code != G_KEY_FILE_ERROR_KEY_NOT_FOUND) continue; } else { if (!g_ascii_strcasecmp (str, "none")) direction = FS_DIRECTION_NONE; else if (!g_ascii_strcasecmp (str, "send")) direction = FS_DIRECTION_SEND; else if (!g_ascii_strcasecmp (str, "recv") || !g_ascii_strcasecmp (str, "receive")) direction = FS_DIRECTION_RECV; g_free (str); } uri = g_key_file_get_string (keyfile, groups[i], "uri", &gerror); if (gerror) { g_clear_error (&gerror); continue; } extensions = g_list_append (extensions, fs_rtp_header_extension_new (id, direction, uri)); g_free (uri); } out: g_strfreev (groups); g_key_file_free (keyfile); return extensions; } farstream-0.2.7/farstream/fs-element-added-notifier.h0000664000076400007640000000617112401500475017512 00000000000000/* * Farstream - Recursive element addition notifier * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_ELEMENT_ADDED_NOTIFIER_H__ #define __FS_ELEMENT_ADDED_NOTIFIER_H__ #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_ELEMENT_ADDED_NOTIFIER \ (fs_element_added_notifier_get_type ()) #define FS_ELEMENT_ADDED_NOTIFIER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_ELEMENT_ADDED_NOTIFIER, \ FsElementAddedNotifier)) #define FS_ELEMENT_ADDED_NOTIFIER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_ELEMENT_ADDED_NOTIFIER, \ FsElementAddedNotifierClass)) #define FS_IS_ELEMENT_ADDED_NOTIFIER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_ELEMENT_ADDED_NOTIFIER)) #define FS_IS_ELEMENT_ADDED_NOTIFIER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_ELEMENT_ADDED_NOTIFIER)) #define FS_ELEMENT_ADDED_NOTIFIER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_ELEMENT_ADDED_NOTIFIER, \ FsElementAddedNotifierClass)) typedef struct _FsElementAddedNotifier FsElementAddedNotifier; typedef struct _FsElementAddedNotifierClass FsElementAddedNotifierClass; typedef struct _FsElementAddedNotifierPrivate FsElementAddedNotifierPrivate; /** * FsElementAddedNotifier: * * All members are private */ struct _FsElementAddedNotifier { GObject parent; /*< private >*/ FsElementAddedNotifierPrivate *priv; }; /** * FsElementAddedNotifierClass: * @parent_class: the #GObjectClass parent * * All members are private */ struct _FsElementAddedNotifierClass { GObjectClass parent_class; }; GType fs_element_added_notifier_get_type (void); FsElementAddedNotifier *fs_element_added_notifier_new (void); void fs_element_added_notifier_add (FsElementAddedNotifier *notifier, GstBin *bin); gboolean fs_element_added_notifier_remove (FsElementAddedNotifier *notifier, GstBin *bin); gulong fs_element_added_notifier_set_properties_from_keyfile ( FsElementAddedNotifier *notifier, GKeyFile *keyfile); gboolean fs_element_added_notifier_set_properties_from_file ( FsElementAddedNotifier *notifier, const gchar *filename, GError **error); gulong fs_element_added_notifier_set_default_properties ( FsElementAddedNotifier *notifier, GstElement *element); G_END_DECLS #endif /* __FS_ELEMENT_ADDED_NOTIFIER_H__ */ farstream-0.2.7/farstream/fs-session.h0000664000076400007640000001577712461776647014732 00000000000000/* * Farstream - Farstream Session * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-session.h - A Farstream Session gobject (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_SESSION_H__ #define __FS_SESSION_H__ #include #include #include #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_SESSION \ (fs_session_get_type ()) #define FS_SESSION(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_SESSION, FsSession)) #define FS_SESSION_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_SESSION, FsSessionClass)) #define FS_IS_SESSION(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_SESSION)) #define FS_IS_SESSION_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_SESSION)) #define FS_SESSION_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_SESSION, FsSessionClass)) #define FS_SESSION_CAST(obj) ((FsSession *) (obj)) typedef struct _FsSession FsSession; typedef struct _FsSessionClass FsSessionClass; typedef struct _FsSessionPrivate FsSessionPrivate; /** * FsDTMFEvent: * * An enum that represents the different DTMF event that can be sent to a * #FsSession. The values corresponds those those defined in RFC 4733 * The rest of the possibles values are in the IANA registry at: * http://www.iana.org/assignments/audio-telephone-event-registry * */ typedef enum _FsDTMFEvent { /*< protected >*/ FS_DTMF_EVENT_0 = 0, FS_DTMF_EVENT_1 = 1, FS_DTMF_EVENT_2 = 2, FS_DTMF_EVENT_3 = 3, FS_DTMF_EVENT_4 = 4, FS_DTMF_EVENT_5 = 5, FS_DTMF_EVENT_6 = 6, FS_DTMF_EVENT_7 = 7, FS_DTMF_EVENT_8 = 8, FS_DTMF_EVENT_9 = 9, FS_DTMF_EVENT_STAR = 10, FS_DTMF_EVENT_POUND = 11, FS_DTMF_EVENT_A = 12, FS_DTMF_EVENT_B = 13, FS_DTMF_EVENT_C = 14, FS_DTMF_EVENT_D = 15 } FsDTMFEvent; /** * FsDTMFMethod: * @FS_DTMF_METHOD_RTP_RFC4733: Send as a special payload type defined by RFC 4733 * (which obsoletes RFC 2833) * @FS_DTMF_METHOD_SOUND: Send as tones as in-band audio sound * * An enum that represents the different ways a DTMF event can be sent * */ typedef enum _FsDTMFMethod { FS_DTMF_METHOD_RTP_RFC4733 = 1, FS_DTMF_METHOD_SOUND = 2 } FsDTMFMethod; /** * FsSessionClass: * @parent_class: Our parent * @new_stream: Create a new #FsStream * @start_telephony_event: Starts a telephony event * @stop_telephony_event: Stops a telephony event * @set_send_codec: Forces sending with a specific codec * @set_codec_preferences: Specifies the codec preferences * @list_transmitters: Returns a list of the available transmitters * @get_stream_transmitter_type: Returns the GType of the stream transmitter * @codecs_need_resend: Returns the list of codecs that need resending * @set_allowed_caps: Set the possible allowed src and sink caps * @set_encryption_parameters: Set encryption parameters * * You must override at least new_stream in a subclass. */ struct _FsSessionClass { GObjectClass parent_class; /*virtual functions */ FsStream *(* new_stream) (FsSession *session, FsParticipant *participant, FsStreamDirection direction, GError **error); gboolean (* start_telephony_event) (FsSession *session, guint8 event, guint8 volume); gboolean (* stop_telephony_event) (FsSession *session); gboolean (* set_send_codec) (FsSession *session, FsCodec *send_codec, GError **error); gboolean (* set_codec_preferences) (FsSession *session, GList *codec_preferences, GError **error); gchar** (* list_transmitters) (FsSession *session); GType (* get_stream_transmitter_type) (FsSession *session, const gchar *transmitter); GList* (* codecs_need_resend) (FsSession *session, GList *old_codecs, GList *new_codecs); gboolean (* set_allowed_caps) (FsSession *session, GstCaps *sink_caps, GstCaps *src_caps, GError **error); gboolean (* set_encryption_parameters) (FsSession *session, GstStructure *parameters, GError **error); /*< private >*/ gpointer _padding[6]; }; /** * FsSession: * * All members are private, access them using methods and properties */ struct _FsSession { GObject parent; /*< private >*/ FsSessionPrivate *priv; gpointer _padding[8]; }; GType fs_session_get_type (void); FsStream *fs_session_new_stream (FsSession *session, FsParticipant *participant, FsStreamDirection direction, GError **error); gboolean fs_session_start_telephony_event (FsSession *session, guint8 event, guint8 volume); gboolean fs_session_stop_telephony_event (FsSession *session); gboolean fs_session_set_send_codec (FsSession *session, FsCodec *send_codec, GError **error); gboolean fs_session_set_codec_preferences (FsSession *session, GList *codec_preferences, GError **error); gchar **fs_session_list_transmitters (FsSession *session); void fs_session_emit_error (FsSession *session, gint error_no, const gchar *error_msg); GType fs_session_get_stream_transmitter_type (FsSession *session, const gchar *transmitter); GList* fs_session_codecs_need_resend (FsSession *session, GList *old_codecs, GList *new_codecs); gboolean fs_session_set_allowed_caps (FsSession *session, GstCaps *sink_caps, GstCaps *src_caps, GError **error); gboolean fs_session_set_encryption_parameters (FsSession *session, GstStructure *parameters, GError **error); void fs_session_destroy (FsSession *session); gboolean fs_session_parse_send_codec_changed (FsSession *session, GstMessage *message, FsCodec **codec, GList **secondary_codecs); gboolean fs_session_parse_codecs_changed (FsSession *session, GstMessage *message); gboolean fs_session_parse_telephony_event_started (FsSession *session, GstMessage *message, FsDTMFMethod *method, FsDTMFEvent *event, guint8 *volume); gboolean fs_session_parse_telephony_event_stopped (FsSession *session, GstMessage *message, FsDTMFMethod *method); G_END_DECLS #endif /* __FS_SESSION_H__ */ farstream-0.2.7/farstream/fs-plugin.h0000664000076400007640000000651511710041460014501 00000000000000/* * fs-plugin.h - Header for farstream plugin infrastructure * * Farstream Voice+Video library * Copyright (c) 2005 INdT. * @author: Andre Moreira Magalhaes * Copyright (c) 2005-2007 Collabora Ltd. * Copyright (c) 2005-2007 Nokia Corp. * @author: Rob Taylor * @author: Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_PLUGIN_H__ #define __FS_PLUGIN_H__ #include #include #include #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_PLUGIN \ (fs_plugin_get_type ()) #define FS_PLUGIN(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_PLUGIN, FsPlugin)) #define FS_PLUGIN_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_PLUGIN, FsPluginClass)) #define FS_IS_PLUGIN(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_PLUGIN)) #define FS_IS_PLUGIN_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_PLUGIN)) #define FS_PLUGIN_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_PLUGIN, FsPluginClass)) /** * FsPlugin: * @parent: the parent object * * This structure represents a plugin, it is opaque. */ typedef struct _FsPlugin FsPlugin; typedef struct _FsPluginClass FsPluginClass; typedef struct _FsPluginPrivate FsPluginPrivate; struct _FsPlugin { GTypeModule parent; /*< private >*/ GType type; gchar *name; /* name of the plugin */ /*< private >*/ FsPluginPrivate *priv; gpointer unused[8]; }; struct _FsPluginClass { GTypeModuleClass parent_class; /*< private >*/ gpointer unused[8]; }; GType fs_plugin_get_type (void); GObject *fs_plugin_create_valist (const gchar *name, const gchar *type_suffix, GError **error, const gchar *first_property_name, va_list var_args); GObject *fs_plugin_create (const gchar *name, const gchar *type_suffix, GError **error, const gchar *first_property_name, ...); gchar **fs_plugin_list_available (const gchar *type_suffix); /** * FS_INIT_PLUGIN: * @type_register_func: A function that register a #GType and returns it * * This macro is used to declare Farstream plugins and must be used once * in any farstream plugin. */ #define FS_INIT_PLUGIN(type_register_func) \ G_MODULE_EXPORT void fs_init_plugin (FsPlugin *plugin) { \ plugin->type = (type_register_func (plugin)); \ } G_END_DECLS #endif farstream-0.2.7/farstream/fs-plugin.c0000664000076400007640000002315112401500475014473 00000000000000/* * fs-plugin.c - Source for farstream plugin infrastructure * * Farstream Voice+Video library * Copyright (c) 2005 INdT. * @author Andre Moreira Magalhaes * Copyright 2005-2007 Collabora Ltd. * Copyright 2005-2007 Nokia Corp. * @author Rob Taylor * @author: Olivier Crete * * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-plugin.h" #include #include "fs-conference.h" #include "fs-private.h" #define GST_CAT_DEFAULT _fs_conference_debug /** * SECTION:fs-plugin * @short_description: A class for defining Farstream plugins * * This class is a generic class to load GType plugins based on their name. * With this simple class, you can only have one type per plugin. */ #define FS_PLUGIN_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_PLUGIN, FsPluginPrivate)) static gboolean fs_plugin_load (GTypeModule *module); static GMutex mutex; static gchar **search_paths = NULL; static GList *plugins = NULL; struct _FsPluginPrivate { GModule *handle; }; G_DEFINE_TYPE(FsPlugin, fs_plugin, G_TYPE_TYPE_MODULE); static void fs_plugin_search_path_init (void) { const gchar *env; if (search_paths) return; env = g_getenv ("FS_PLUGIN_PATH"); if (env == NULL) { search_paths = g_new (gchar *, 2); search_paths[0] = g_strdup (FS_PLUGIN_PATH); search_paths[1] = NULL; return; } else { gchar *path; path = g_strjoin (":", env, FS_PLUGIN_PATH, NULL); search_paths = g_strsplit (path, ":", -1); g_free (path); } } static void fs_plugin_class_init (FsPluginClass * klass) { GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (klass); module_class->load = fs_plugin_load; g_type_class_add_private (klass, sizeof (FsPluginPrivate)); /* Calling from class initializer so it only gets init'ed once */ fs_plugin_search_path_init (); } static void fs_plugin_init (FsPlugin * plugin) { /* member init */ plugin->priv = FS_PLUGIN_GET_PRIVATE (plugin); plugin->priv->handle = NULL; } static gboolean fs_plugin_load (GTypeModule *module) { FsPlugin *plugin = FS_PLUGIN(module); gchar **search_path = NULL; gchar *path=NULL; gboolean (*fs_init_plugin) (FsPlugin *); g_return_val_if_fail (plugin != NULL, FALSE); g_return_val_if_fail (plugin->name != NULL && plugin->name[0] != '\0', FALSE); for (search_path = search_paths; *search_path; search_path++) { GST_DEBUG("looking for plugins in %s", *search_path); path = g_module_build_path (*search_path, plugin->name); plugin->priv->handle = g_module_open (path, G_MODULE_BIND_LOCAL); GST_INFO ("opening module %s: %s\n", path, (plugin->priv->handle != NULL) ? "succeeded" : g_module_error ()); g_free (path); if (!plugin->priv->handle) { continue; } else if (!g_module_symbol (plugin->priv->handle, "fs_init_plugin", (gpointer) & fs_init_plugin)) { g_module_close (plugin->priv->handle); plugin->priv->handle = NULL; GST_WARNING ("could not find init function in plugin\n"); continue; } else break; } if (!plugin->priv->handle) { return FALSE; } fs_init_plugin (plugin); if (!plugin->type) { /* TODO error handling (init error or no info defined) */ GST_WARNING ("init error or no info defined"); goto err_close_module; } return TRUE; err_close_module: g_module_close (plugin->priv->handle); return FALSE; } static FsPlugin * fs_plugin_get_by_name_locked (const gchar * name, const gchar * type_suffix) { gchar *fullname; FsPlugin *plugin = NULL; GList *plugin_item; g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (type_suffix != NULL, NULL); fullname = g_strdup_printf ("%s-%s",name,type_suffix); for (plugin_item = plugins; plugin_item; plugin_item = g_list_next (plugin_item)) { plugin = plugin_item->data; if (plugin->name == NULL || plugin->name[0] == 0) continue; if (!strcmp (plugin->name, fullname)) { break; } } g_free (fullname); if (plugin_item) return plugin; return NULL; } /** * fs_plugin_create_valist: * @name: The name of the plugin to load * @type_suffix: The type of plugin to load (normally "transmitter") * @error: location of a #GError, or NULL if no error occured * @first_property_name: The name of the first property to be set on the * object * @var_args: The rest of the arguments * * Loads the appropriate plugin if necessary and creates a GObject of * the requested type * * Returns: (transfer full): The object created (or NULL if there is an error) **/ GObject * fs_plugin_create_valist (const gchar *name, const gchar *type_suffix, GError **error, const gchar *first_property_name, va_list var_args) { GObject *object; FsPlugin *plugin; g_return_val_if_fail (name, NULL); g_return_val_if_fail (type_suffix, NULL); _fs_conference_init_debug (); g_mutex_lock (&mutex); plugin = fs_plugin_get_by_name_locked (name, type_suffix); if (!plugin) { plugin = g_object_new (FS_TYPE_PLUGIN, NULL); if (!plugin) { g_mutex_unlock (&mutex); g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create a fsplugin object"); return NULL; } plugin->name = g_strdup_printf ("%s-%s",name,type_suffix); g_type_module_set_name (G_TYPE_MODULE (plugin), plugin->name); plugins = g_list_append (plugins, plugin); /* We do the use once and then we keep it loaded forever because * the gstreamer libraries can't be unloaded */ if (!g_type_module_use (G_TYPE_MODULE (plugin))) { g_mutex_unlock (&mutex); g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not load the %s-%s transmitter plugin", name, type_suffix); return NULL; } } g_mutex_unlock (&mutex); object = g_object_new_valist (plugin->type, first_property_name, var_args); return object; } /** * fs_plugin_create: * @name: The name of the plugin to load * @type_suffix: The type of plugin to load (normally "transmitter") * @error: location of a #GError, or NULL if no error occured * @first_property_name: The name of the first property to be set on the * object * @...: The NULL-terminated list of properties to set on the transmitter * * Loads the appropriate plugin if necessary and creates a GObject of * the requested type * * Returns: (transfer full): The object created (or NULL if there is an error) **/ GObject * fs_plugin_create (const gchar *name, const gchar *type_suffix, GError **error, const gchar *first_property_name, ...) { va_list var_args; GObject *obj; va_start (var_args, first_property_name); obj = fs_plugin_create_valist (name, type_suffix, error, first_property_name, var_args); va_end (var_args); return obj; } /** * fs_plugin_list_available: * @type_suffix: Get list of plugins with this type suffix * * Gets the list of all available plugins of a certain type * * Returns: (transfer full): a newly allocated NULL terminated array of * strings or %NULL if no strings were found. * It should be freed with g_strfreev(). */ gchar ** fs_plugin_list_available (const gchar *type_suffix) { GPtrArray *list = g_ptr_array_new (); gchar **retval = NULL; gchar **search_path = NULL; GRegex *matcher; GError *error = NULL; gchar *tmp1, *tmp2, *tmp3; _fs_conference_init_debug (); g_mutex_lock (&mutex); fs_plugin_search_path_init (); tmp1 = g_strdup_printf ("(.+)-%s", type_suffix); tmp2 = g_module_build_path ("", tmp1); tmp3 = g_strconcat ("^", tmp2, NULL); matcher = g_regex_new (tmp3, 0, 0, NULL); g_free (tmp1); g_free (tmp2); g_free (tmp3); for (search_path = search_paths; *search_path; search_path++) { GDir *dir = NULL; const gchar *entry; dir = g_dir_open (*search_path, 0, &error); if (!dir) { GST_WARNING ("Could not open path %s to look for plugins: %s", *search_path, error ? error->message : "Unknown error"); g_clear_error (&error); continue; } while ((entry = g_dir_read_name (dir))) { gchar **matches = NULL; matches = g_regex_split (matcher, entry, 0); if (matches && g_strv_length (matches) == 3) { gint i; gboolean found = FALSE; for (i = 0; i < list->len; i++) { if (!strcmp (matches[1], g_ptr_array_index (list, i))) { found = TRUE; break; } } if (!found) g_ptr_array_add (list, g_strdup (matches[1])); } g_strfreev (matches); } g_dir_close (dir); } g_regex_unref (matcher); if (list->len) { g_ptr_array_add (list, NULL); retval = (gchar**) list->pdata; g_ptr_array_free (list, FALSE); } else { g_ptr_array_free (list, TRUE); } g_mutex_unlock (&mutex); return retval; } farstream-0.2.7/farstream/fs-element-added-notifier.c0000664000076400007640000003267212461773672017533 00000000000000/* * Farstream - Recursive element addition notifier * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-element-added-notifier * @short_description: Recursive element addition notifier * * This object can be attach to any #GstBin and will emit a the * #FsElementAddedNotifier::element-added signal for every element inside the * #GstBin or any sub-bin and any element added in the future to the bin or * its sub-bins. There is also a utility method to have it used to * set the properties of elements based on a GKeyfile. */ #ifdef HAVE_CONFIG_H # include #endif #include "fs-element-added-notifier.h" #include #include "fs-utils.h" /* Signals */ enum { ELEMENT_ADDED, LAST_SIGNAL }; #define FS_ELEMENT_ADDED_NOTIFIER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_ELEMENT_ADDED_NOTIFIER, \ FsElementAddedNotifierPrivate)) struct _FsElementAddedNotifierPrivate { GPtrArray *bins; }; static void _element_added_callback (GstBin *parent, GstElement *element, gpointer user_data); static void fs_element_added_notifier_finalize (GObject *object); G_DEFINE_TYPE(FsElementAddedNotifier, fs_element_added_notifier, G_TYPE_OBJECT); static guint signals[LAST_SIGNAL] = { 0 }; static void fs_element_added_notifier_class_init (FsElementAddedNotifierClass *klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; gobject_class->finalize = fs_element_added_notifier_finalize; /** * FsElementAddedNotifier::element-added: * @self: #FsElementAddedNotifier that emitted the signal * @bin: The #GstBin to which this object was added * @element: The #GstElement that was added * * This signal is emitted when an element is added to a #GstBin that was added * to this object or one of its sub-bins. * Be careful, there is no guarantee that this will be emitted on your * main thread, it will be emitted in the thread that added the element. * The bin may be %NULL if this is the top-level bin. */ signals[ELEMENT_ADDED] = g_signal_new ("element-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, GST_TYPE_BIN, GST_TYPE_ELEMENT); g_type_class_add_private (klass, sizeof (FsElementAddedNotifierPrivate)); } static void fs_element_added_notifier_init (FsElementAddedNotifier *notifier) { notifier->priv = FS_ELEMENT_ADDED_NOTIFIER_GET_PRIVATE(notifier); notifier->priv->bins = g_ptr_array_new_with_free_func (gst_object_unref); } static void fs_element_added_notifier_finalize (GObject *object) { FsElementAddedNotifier *self = FS_ELEMENT_ADDED_NOTIFIER (object); g_ptr_array_unref (self->priv->bins); G_OBJECT_CLASS (fs_element_added_notifier_parent_class)->finalize (object); } /** * fs_element_added_notifier_new: * * Creates a new #FsElementAddedNotifier object * * Returns: the newly-created #FsElementAddedNotifier */ FsElementAddedNotifier * fs_element_added_notifier_new (void) { return (FsElementAddedNotifier *) g_object_new (FS_TYPE_ELEMENT_ADDED_NOTIFIER, NULL); } /** * fs_element_added_notifier_add: * @notifier: a #FsElementAddedNotifier * @bin: A #GstBin to watch to added elements * * Add a #GstBin to on which the #FsElementAddedNotifier::element-added signal * will be called on every element and sub-element present and added in the * future. */ void fs_element_added_notifier_add (FsElementAddedNotifier *notifier, GstBin *bin) { g_return_if_fail (notifier && FS_IS_ELEMENT_ADDED_NOTIFIER (notifier)); g_return_if_fail (bin && GST_IS_BIN (bin)); _element_added_callback (NULL, GST_ELEMENT_CAST (bin), notifier); g_ptr_array_add (notifier->priv->bins, gst_object_ref (bin)); } static void _element_removed_callback (GstBin *bin, GstElement *element, FsElementAddedNotifier *notifier) { /* Return if there was no handler connected */ if (g_signal_handlers_disconnect_by_func (element, _element_added_callback, notifier) == 0 || g_signal_handlers_disconnect_by_func (element, _element_removed_callback, notifier) == 0) return; if (GST_IS_BIN (element)) { GstIterator *iter = NULL; gboolean done; iter = gst_bin_iterate_elements (GST_BIN (element)); done = FALSE; while (!done) { GValue item = {0,}; switch (gst_iterator_next (iter, &item)) { case GST_ITERATOR_OK: _element_removed_callback (GST_BIN (element), GST_ELEMENT (g_value_get_object (&item)), notifier); g_value_reset (&item); break; case GST_ITERATOR_RESYNC: // We don't rollback anything, we just ignore already processed ones gst_iterator_resync (iter); break; case GST_ITERATOR_ERROR: g_error ("Wrong parameters were given?"); done = TRUE; break; case GST_ITERATOR_DONE: done = TRUE; break; } } gst_iterator_free (iter); } } /** * fs_element_added_notifier_remove: * @notifier: a #FsElementAddedNotifier * @bin: A #GstBin to stop watching * * Stop watching the passed bin and its subbins. * * Returns: %TRUE if the #GstBin was being watched, %FALSE otherwise */ gboolean fs_element_added_notifier_remove (FsElementAddedNotifier *notifier, GstBin *bin) { g_return_val_if_fail (FS_IS_ELEMENT_ADDED_NOTIFIER (notifier), FALSE); g_return_val_if_fail (GST_IS_BIN (bin), FALSE); g_ptr_array_remove (notifier->priv->bins, bin); if (g_signal_handler_find (bin, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, /* id, detail, closure */ _element_added_callback, notifier) != 0) { _element_removed_callback (NULL, GST_ELEMENT (bin), notifier); return TRUE; } else { return FALSE; } } #if 1 # define DEBUG(...) do {} while (0) #else # define DEBUG g_debug #endif static void set_properties_from_keyfile (GKeyFile *keyfile, GstElement *element) { const gchar *name = NULL; gchar *free_name = NULL; gchar **keys; gint i; GstElementFactory *factory = gst_element_get_factory (element); if (factory) { name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)); if (name && !g_key_file_has_group (keyfile, name)) name = NULL; } if (!name) { GST_OBJECT_LOCK (element); if (GST_OBJECT_NAME (element) && g_key_file_has_group (keyfile, GST_OBJECT_NAME (element))) name = free_name = g_strdup (GST_OBJECT_NAME (element)); GST_OBJECT_UNLOCK (element); } if (!name) return; DEBUG ("Found config for %s", name); keys = g_key_file_get_keys (keyfile, name, NULL, NULL); for (i = 0; keys[i]; i++) { GParamSpec *param_spec; GValue prop_value = { 0 }; gchar *str_value; DEBUG ("getting %s", keys[i]); param_spec = g_object_class_find_property (G_OBJECT_GET_CLASS(element), keys[i]); if (!param_spec) { DEBUG ("Property %s does not exist in element %s, ignoring", keys[i], name); continue; } g_value_init (&prop_value, param_spec->value_type); str_value = g_key_file_get_value (keyfile, name, keys[i], NULL); if (str_value && gst_value_deserialize (&prop_value, str_value)) { DEBUG ("Setting %s to on %s", keys[i], name); g_object_set_property (G_OBJECT (element), keys[i], &prop_value); } else { DEBUG ("Could not read value for property %s", keys[i]); } g_free (str_value); g_value_unset (&prop_value); } g_strfreev (keys); g_free (free_name); } static void _bin_added_from_keyfile (FsElementAddedNotifier *notifier, GstBin *bin, GstElement *element, gpointer user_data) { GKeyFile *keyfile = user_data; set_properties_from_keyfile (keyfile, element); } static void _element_foreach_keyfile (const GValue * item, gpointer user_data) { GstElement *element = g_value_get_object (item); GKeyFile *keyfile = user_data; set_properties_from_keyfile (keyfile, element); } /** * fs_element_added_notifier_set_properties_from_keyfile: * @notifier: a #FsElementAddedNotifier * @keyfile: (transfer full): a #GKeyFile * * Using a #GKeyFile where the groups are the element's type or name * and the key=value are the property and its value, this function * will set the properties on the elements added to this object after * this function has been called. It will take ownership of the * GKeyFile structure. It will first try the group as the element type, if that * does not match, it will check its name. * * Returns: The id of the signal connection, this can be used to disconnect * this property setter using g_signal_handler_disconnect(). */ gulong fs_element_added_notifier_set_properties_from_keyfile ( FsElementAddedNotifier *notifier, GKeyFile *keyfile) { guint i; g_return_val_if_fail (FS_IS_ELEMENT_ADDED_NOTIFIER (notifier), 0); g_return_val_if_fail (keyfile, 0); for (i = 0; i < notifier->priv->bins->len; i++) { GstIterator *iter; iter = gst_bin_iterate_recurse ( g_ptr_array_index (notifier->priv->bins, i)); while (gst_iterator_foreach (iter, _element_foreach_keyfile, keyfile) == GST_ITERATOR_RESYNC) gst_iterator_resync (iter); gst_iterator_free (iter); } return g_signal_connect_data (notifier, "element-added", G_CALLBACK (_bin_added_from_keyfile), keyfile, (GClosureNotify) g_key_file_free, 0); } /** * fs_element_added_notifier_set_properties_from_file: * @notifier: a #FsElementAddedNotifier * @filename: The name of the keyfile to use * @error: location of a #GError, or %NULL if no error occured * * Same as fs_element_added_notifier_set_properties_from_keyfile() but using * the name of the file to load instead of the #GKeyFile directly. * * Returns: %TRUE if the file was successfully loaded, %FALSE otherwise */ gboolean fs_element_added_notifier_set_properties_from_file ( FsElementAddedNotifier *notifier, const gchar *filename, GError **error) { GKeyFile *keyfile = g_key_file_new (); if (!g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, error)) { g_key_file_free (keyfile); return FALSE; } fs_element_added_notifier_set_properties_from_keyfile(notifier, keyfile); return TRUE; } static void _element_added_callback (GstBin *parent, GstElement *element, gpointer user_data) { FsElementAddedNotifier *notifier = FS_ELEMENT_ADDED_NOTIFIER (user_data); if (GST_IS_BIN (element)) { GstIterator *iter = NULL; gboolean done; g_signal_connect_object (element, "element-added", G_CALLBACK (_element_added_callback), notifier, 0); g_signal_connect_object (element, "element-removed", G_CALLBACK (_element_removed_callback), notifier, 0); iter = gst_bin_iterate_elements (GST_BIN (element)); done = FALSE; while (!done) { GValue item = {0,}; switch (gst_iterator_next (iter, &item)) { case GST_ITERATOR_OK: /* We make sure the callback has not already been added */ if (g_signal_handler_find (g_value_get_object (&item), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, /* id, detail, closure */ _element_added_callback, notifier) == 0) _element_added_callback (GST_BIN_CAST (element), g_value_get_object (&item), notifier); g_value_reset (&item); break; case GST_ITERATOR_RESYNC: // We don't rollback anything, we just ignore already processed ones gst_iterator_resync (iter); break; case GST_ITERATOR_ERROR: g_error ("Wrong parameters were given?"); done = TRUE; break; case GST_ITERATOR_DONE: done = TRUE; break; } } gst_iterator_free (iter); } if (parent) g_signal_emit (notifier, signals[ELEMENT_ADDED], 0, parent, element); } /** * fs_element_added_notifier_set_default_properties: * @notifier: a #FsElementAddedNotifier * @element: Element for which to set the default codec * preferences * * Same as first calling fs_utils_get_default_element_properties() and using * the result with * fs_element_added_notifier_set_properties_from_keyfile() . * * This is binding friendly (since GKeyFile doesn't have a boxed type). * * Returns: The id of the signal connection, this can be used to disconnect * this property setter using g_signal_handler_disconnect(). */ gulong fs_element_added_notifier_set_default_properties ( FsElementAddedNotifier *notifier, GstElement *element) { GKeyFile *keyfile = fs_utils_get_default_element_properties (element); if (!keyfile) return 0; return fs_element_added_notifier_set_properties_from_keyfile (notifier, keyfile); } farstream-0.2.7/farstream/fs-stream.c0000664000076400007640000007526212462321675014514 00000000000000/* * Farstream - Farstream Stream * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-stream.c - A Farstream Stream gobject (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-stream * @short_description: A stream in a session in a conference * * This object is the base implementation of a Farstream Stream. It * needs to be derived and implemented by a Farstream conference GStreamer * element. A Farstream Stream is a media stream originating from a * #FsParticipant inside a #FsSession. In fact, a #FsStream instance is * obtained by adding a participant into a session using * fs_session_new_stream(). * * * This will communicate asynchronous events to the user through #GstMessage * of type #GST_MESSAGE_ELEMENT sent over the #GstBus. * * The "<literal>farstream-new-local-candidate</literal>" message * |[ * "stream" #FsStream The stream that emits the message * "candidate" #FsCandidate The new candidate * ]| * * This message is emitted when a new local candidate is discovered. * * * The "<literal>farstream-local-candidates-prepared</literal>" message * |[ * "stream" #FsStream The stream that emits the message * ]| * * This signal is emitted when all local candidates have been * prepared, an ICE implementation would send its SDP offer or answer. * * * The "<literal>farstream-new-active-candidate-pair</literal>" message * |[ * "stream" #FsStream The stream that emits the message * "local-candidate" #FsCandidate Local candidate being used * "remote-candidate" #FsCandidate Remote candidate being used * ]| * * This message is emitted when there is a new active candidate pair that has * been established. This is specially useful for ICE where the active * candidate pair can change automatically due to network conditions. The user * must not modify the candidates and must copy them if he wants to use them * outside the callback scope. This message is emitted once per component. * * * The "<literal>farstream-recv-codecs-changed</literal>" message * |[ * "stream" #FsStream The stream that emits the message * "codecs" #FsCodecGList A #GList of #FsCodec * ]| * * This message is emitted when the content of the * #FsStream:current-recv-codecs property changes. It is normally emitted * right after the #FsStream::src-pad-added signal only if that codec was not * previously received in this stream, but it can also be emitted if the pad * already exists, but the source material that will come to it is different. * The list of new recv-codecs is included in the message * * * The "<literal>farstream-component-state-changed</literal>" message * |[ * "stream" #FsStream The stream that emits the message * "component" #guint The component whose state changed * "state" #FsStreamState The new state of the component * ]| * * This message is emitted the state of a component of a stream changes. * * * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-stream.h" #include #include "fs-session.h" #include "fs-codec.h" #include "fs-candidate.h" #include "fs-stream-transmitter.h" #include "fs-conference.h" #include "fs-enumtypes.h" #include "fs-private.h" /* Signals */ enum { ERROR_SIGNAL, SRC_PAD_ADDED, LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_REMOTE_CODECS, PROP_NEGOTIATED_CODECS, PROP_CURRENT_RECV_CODECS, PROP_DIRECTION, PROP_PARTICIPANT, PROP_SESSION, PROP_DECRYPTION_PARAMETERS }; struct _FsStreamPrivate { GMutex mutex; GList *src_pads; guint32 src_pads_cookie; }; #define FS_STREAM_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_STREAM, FsStreamPrivate)) G_DEFINE_ABSTRACT_TYPE(FsStream, fs_stream, G_TYPE_OBJECT) static void fs_stream_constructed (GObject *obj); static void fs_stream_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_stream_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void fs_stream_finalize (GObject *obj); static void fs_stream_pad_removed (FsStream *stream, GstPad *pad); static guint signals[LAST_SIGNAL] = { 0 }; #define FS_STREAM_LOCK(self) g_mutex_lock(&(self)->priv->mutex) #define FS_STREAM_UNLOCK(self) g_mutex_unlock(&(self)->priv->mutex) static void fs_stream_class_init (FsStreamClass *klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; gobject_class->set_property = fs_stream_set_property; gobject_class->get_property = fs_stream_get_property; gobject_class->finalize = fs_stream_finalize; gobject_class->constructed = fs_stream_constructed; /** * FsStream:remote-codecs: (type GLib.List(FsCodec)) (transfer full) * * This is the list of remote codecs for this stream. They must be set by the * user as soon as they are known using fs_stream_set_remote_codecs() * (generally through external signaling). It is a #GList of #FsCodec. */ g_object_class_install_property (gobject_class, PROP_REMOTE_CODECS, g_param_spec_boxed ("remote-codecs", "List of remote codecs", "A GList of FsCodecs of the remote codecs", FS_TYPE_CODEC_LIST, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsStream:negotiated-codecs: (type GLib.List(FsCodec)) (transfer full) * * This is the list of negotiatied codecs, it is the same list as the list * of #FsCodec from the parent #FsSession, except that the codec config data * has been replaced with the data from the remote codecs for this stream. * This is the list of #FsCodec used to receive data from this stream. * It is a #GList of #FsCodec. */ g_object_class_install_property (gobject_class, PROP_NEGOTIATED_CODECS, g_param_spec_boxed ("negotiated-codecs", "List of remote codecs", "A GList of FsCodecs of the negotiated codecs for this stream", FS_TYPE_CODEC_LIST, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsStream:current-recv-codecs: (type GLib.List(FsCodec)) (transfer full) * * This is the list of codecs that have been received by this stream. * The user must free the list if fs_codec_list_destroy(). * The "farstream-recv-codecs-changed" message is send on the #GstBus * when the value of this property changes. * It is normally emitted right after #FsStream::src-pad-added * only if that codec was not previously received in this stream, but it can * also be emitted if the pad already exists, but the source material that * will come to it is different. */ g_object_class_install_property (gobject_class, PROP_CURRENT_RECV_CODECS, g_param_spec_boxed ("current-recv-codecs", "The codecs currently being received", "A GList of FsCodec representing the codecs that have been received", FS_TYPE_CODEC_LIST, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsStream:direction: * * The direction of the stream. This property is set initially as a parameter * to the fs_session_new_stream() function. It can be changed later if * required by setting this property. * */ g_object_class_install_property (gobject_class, PROP_DIRECTION, g_param_spec_flags ("direction", "The direction of the stream", "An enum to set and get the direction of the stream", FS_TYPE_STREAM_DIRECTION, FS_DIRECTION_NONE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsStream:participant: * * The #FsParticipant for this stream. This property is a construct param and * is read-only construction. * */ g_object_class_install_property (gobject_class, PROP_PARTICIPANT, g_param_spec_object ("participant", "The participant of the stream", "An FsParticipant represented by the stream", FS_TYPE_PARTICIPANT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsStream:session: * * The #FsSession for this stream. This property is a construct param and * is read-only construction. * */ g_object_class_install_property (gobject_class, PROP_SESSION, g_param_spec_object ("session", "The session of the stream", "An FsSession represented by the stream", FS_TYPE_SESSION, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsStream:decryption-parameters: * * Retrieves previously set decryption parameters */ g_object_class_install_property (gobject_class, PROP_DECRYPTION_PARAMETERS, g_param_spec_boxed ("decryption-parameters", "Decryption parameters", "Parameters used to decrypt the stream", GST_TYPE_STRUCTURE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsStream::error: * @self: #FsStream that emitted the signal * @errorno: The number of the error * @error_msg: Error message to be displayed to user * * This signal is emitted in any error condition * */ signals[ERROR_SIGNAL] = g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, FS_TYPE_ERROR, G_TYPE_STRING); /** * FsStream::src-pad-added: * @self: #FsStream that emitted the signal * @pad: #GstPad of the new source pad * @codec: #FsCodec of the codec being received on the new source pad * * This signal is emitted when a new gst source pad has been created for a * specific codec being received. There will be a different source pad for * each codec that is received. The user must ref the #GstPad if he wants to * keep it. The user should not modify the #FsCodec and must copy it if he * wants to use it outside the callback scope. * * This signal is not emitted on the main thread, but on GStreamer's streaming * thread! * */ signals[SRC_PAD_ADDED] = g_signal_new ("src-pad-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, GST_TYPE_PAD, FS_TYPE_CODEC); g_type_class_add_private (klass, sizeof (FsStreamPrivate)); } static void fs_stream_init (FsStream *self) { /* member init */ self->priv = FS_STREAM_GET_PRIVATE (self); g_mutex_init (&self->priv->mutex); } static void fs_stream_constructed (GObject *obj) { FsStream *stream = FS_STREAM (obj); FsSession *session; FsConference *conference; g_object_get (stream, "session", &session, NULL); g_object_get (session, "conference", &conference, NULL); g_signal_connect_object (conference, "pad-removed", G_CALLBACK (fs_stream_pad_removed), obj, G_CONNECT_SWAPPED); g_object_unref (session); g_object_unref (conference); } static void fs_stream_finalize (GObject *obj) { FsStream *stream = FS_STREAM (obj); g_list_free_full (stream->priv->src_pads, gst_object_unref); g_mutex_clear (&stream->priv->mutex); G_OBJECT_CLASS (fs_stream_parent_class)->finalize (obj); } static void fs_stream_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { switch (prop_id) { case PROP_DECRYPTION_PARAMETERS: g_value_set_boxed (value, NULL); /* Not having parameters is valid, in this case set nothing */ break; default: GST_WARNING ("Subclass %s of FsStream does not override the %s property" " getter", G_OBJECT_TYPE_NAME(object), g_param_spec_get_name (pspec)); break; } } static void fs_stream_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GST_WARNING ("Subclass %s of FsStream does not override the %s property" " setter", G_OBJECT_TYPE_NAME(object), g_param_spec_get_name (pspec)); } /** * fs_stream_add_remote_candidates: * @stream: an #FsStream * @candidates: (element-type FsCandidate): an #GList of #FsCandidate * representing the remote candidates * @error: location of a #GError, or %NULL if no error occured * * This function adds remote candidates. Any new candidates are * added to the list. The candidates will be used to establish a connection * with the peer. A copy will be made so the user must free the * passed candidate using fs_candidate_destroy() when done. * * Return value: TRUE if the candidate was valid, FALSE otherwise */ gboolean fs_stream_add_remote_candidates (FsStream *stream, GList *candidates, GError **error) { FsStreamClass *klass; g_return_val_if_fail (stream, FALSE); g_return_val_if_fail (FS_IS_STREAM (stream), FALSE); klass = FS_STREAM_GET_CLASS (stream); if (klass->add_remote_candidates) { return klass->add_remote_candidates (stream, candidates, error); } else { g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "add_remote_candidate not defined in class"); } return FALSE; } /** * fs_stream_force_remote_candidates: * @stream: a #FsStream * @remote_candidates: (element-type FsCandidate): * a #GList of #FsCandidate to force * @error: location of a #GError, or %NULL if no error occured * * This function forces data to be sent immediately to the selected remote * candidate, by-passing any connectivity checks. There should be at most * one candidate per component. * * Returns: %TRUE if the candidates could be forced, %FALSE otherwise */ gboolean fs_stream_force_remote_candidates (FsStream *stream, GList *remote_candidates, GError **error) { FsStreamClass *klass; g_return_val_if_fail (stream, FALSE); g_return_val_if_fail (FS_IS_STREAM (stream), FALSE); klass = FS_STREAM_GET_CLASS (stream); if (klass->force_remote_candidates) { return klass->force_remote_candidates (stream, remote_candidates, error); } else { g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "force_remote_candidates not defined in class"); } return FALSE; } /** * fs_stream_set_remote_codecs: * @stream: a #FsStream * @remote_codecs: (element-type FsCodec): a #GList of #FsCodec representing * the remote codecs * @error: location of a #GError, or %NULL if no error occured * * This function will set the list of remote codecs for this stream. If * the given remote codecs couldn't be negotiated with the list of local * codecs or already negotiated codecs for the corresponding #FsSession, @error * will be set and %FALSE will be returned. The @remote_codecs list will be * copied so it must be free'd using fs_codec_list_destroy() when done. * * Returns: %FALSE if the remote codecs couldn't be set. */ gboolean fs_stream_set_remote_codecs (FsStream *stream, GList *remote_codecs, GError **error) { FsStreamClass *klass; g_return_val_if_fail (stream, FALSE); g_return_val_if_fail (FS_IS_STREAM (stream), FALSE); klass = FS_STREAM_GET_CLASS (stream); if (klass->set_remote_codecs) { return klass->set_remote_codecs (stream, remote_codecs, error); } else { g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "set_remote_codecs not defined in class"); } return FALSE; } /** * fs_stream_add_id: * @stream: a #FsStream * @id: The id to add to the stream * * This function is used to add data identifiers that allow the * plugin to recognize packets that are meant for id. For example, in RTP, * one would set the SSRCs that are expected. * * Depending on the protocol, one may be able to add more than one ID * to a stream (in RTP you can have multiple SSRCs in a stream). * If a protocol supports only one id, adding a new one will overwrite it. * If an ID was already set on a stream, adding it to another stream will * override the previdous decision. * * For most protocols, calling this function is optional as the incoming data * can be matched with a stream by its source IP address. This is mostly useful * if one is using multicast or is behind a muxer server. */ void fs_stream_add_id (FsStream *stream, guint id) { FsStreamClass *klass; g_return_if_fail (stream); g_return_if_fail (FS_IS_STREAM (stream)); klass = FS_STREAM_GET_CLASS (stream); if (klass->add_id) klass->add_id (stream, id); } /** * fs_stream_emit_error: * @stream: #FsStream on which to emit the error signal * @error_no: The number of the error * @error_msg: Error message to be displayed to user * * This function emits the #FsStream::error" signal, it should only be * called by subclasses. */ void fs_stream_emit_error (FsStream *stream, gint error_no, const gchar *error_msg) { g_signal_emit (stream, signals[ERROR_SIGNAL], 0, error_no, error_msg); } static void fs_stream_pad_removed (FsStream *stream, GstPad *pad) { GList *item; FS_STREAM_LOCK (stream); item = g_list_find (stream->priv->src_pads, pad); if (item) { stream->priv->src_pads = g_list_delete_link (stream->priv->src_pads, item); gst_object_unref (pad); stream->priv->src_pads_cookie++; } FS_STREAM_UNLOCK (stream); } /** * fs_stream_emit_src_pad_added: * @stream: #FsStream on which to emit the src-pad-added signal * @pad: the #GstPad that this #FsStream has created * @codec: The #FsCodec for this pad * * Emits the #FsStream::src-pad-added" signal, it should only be * called by subclasses. */ void fs_stream_emit_src_pad_added (FsStream *stream, GstPad *pad, FsCodec *codec) { FS_STREAM_LOCK (stream); g_assert (!g_list_find (stream->priv->src_pads, pad)); stream->priv->src_pads = g_list_prepend (stream->priv->src_pads, gst_object_ref (pad)); stream->priv->src_pads_cookie++; FS_STREAM_UNLOCK (stream); g_signal_emit (stream, signals[SRC_PAD_ADDED], 0, pad, codec); } /** * fs_stream_iterate_src_pads: * @stream: a #FsStream * * Creates a #GstIterator that can be used to iterate the src pads of this * stream. These are the pads that were announced by #FsStream:src-pad-added * and are still valid. * * Returns: (transfer full): The #GstIterator */ GstIterator * fs_stream_iterate_src_pads (FsStream *stream) { return gst_iterator_new_list (GST_TYPE_PAD, &stream->priv->mutex, &stream->priv->src_pads_cookie, &stream->priv->src_pads, G_OBJECT (stream), NULL); } /** * fs_stream_set_transmitter: * @stream: a #FsStream * @transmitter: Name of the type of transmitter to use for this stream * @stream_transmitter_n_parameters: Number of parametrs passed to the stream * transmitter * @stream_transmitter_parameters: (array length=stream_transmitter_n_parameters) (allow-none): * an array of n_parameters #GParameter struct that will be passed * to the newly-create #FsStreamTransmitter * @error: location of a #GError, or %NULL if no error occured * * Set the transmitter to use for this stream. This function will only succeed * once. * * The parameters correspond to the varios GObject properties of the * selected stream transmitter. * * Returns: %TRUE if the transmitter could be set, %FALSE otherwise */ gboolean fs_stream_set_transmitter (FsStream *stream, const gchar *transmitter, GParameter *stream_transmitter_parameters, guint stream_transmitter_n_parameters, GError **error) { FsStreamClass *klass; g_return_val_if_fail (stream, FALSE); g_return_val_if_fail (FS_IS_STREAM (stream), FALSE); klass = FS_STREAM_GET_CLASS (stream); if (klass->set_transmitter) return klass->set_transmitter (stream, transmitter, stream_transmitter_parameters, stream_transmitter_n_parameters, error); g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "set_transmitter not defined in class"); return FALSE; } /** * fs_stream_set_transmitter_ht: * @stream: a #FsStream * @transmitter: Name of the type of transmitter to use for this stream * @stream_transmitter_parameters: (element-type utf8 GValue) (allow-none): * A #GHashTable of string->GValue containing the parameters. * @error: location of a #GError, or %NULL if no error occured * * Set the transmitter to use for this stream. This function will only succeed * once. * * The parameters correspond to the varios GObject properties of the * selected stream transmitter. * * This is the same as fs_stream_set_transmitter() except that the parameters * are passed in a #GHashTable to make it more friendly to GObject introspection * * Returns: %TRUE if the transmitter could be set, %FALSE otherwise */ gboolean fs_stream_set_transmitter_ht (FsStream *stream, const gchar *transmitter, GHashTable *stream_transmitter_parameters, GError **error) { GParameter *params = NULL; gboolean ret = FALSE; guint n_params = 0; guint i = 0; if (stream_transmitter_parameters && g_hash_table_size (stream_transmitter_parameters) != 0) { FsSession *session = NULL; GType st_type; GObjectClass *st_class = NULL; GHashTableIter iter; gpointer key, value; n_params = g_hash_table_size (stream_transmitter_parameters); g_object_get (stream, "session", &session, NULL); if (!session) { g_set_error_literal (error, FS_ERROR, FS_ERROR_DISPOSED, "Stream has already been disposed"); return FALSE; } st_type = fs_session_get_stream_transmitter_type (session, transmitter); g_object_unref (session); if (st_type == 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Unknown transmitter: %s", transmitter); return FALSE; } params = g_new0 (GParameter, n_params); st_class = g_type_class_ref (st_type); g_hash_table_iter_init (&iter, stream_transmitter_parameters); while (g_hash_table_iter_next (&iter, &key, &value)) { GParamSpec *spec; gchar *name = key; const GValue *v = value; spec = g_object_class_find_property (st_class, name); if (!spec) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Unknown argument %s for transmitter %s", name, transmitter); goto end; } params[i].name = name; g_value_init (¶ms[i].value, G_PARAM_SPEC_VALUE_TYPE(spec)); if (!g_value_transform (v, ¶ms[i].value)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid type of argument %s for transmitter %s", name, transmitter); goto end; } i++; } } ret = fs_stream_set_transmitter (stream, transmitter, params, n_params, error); end: for (i = 0; i < n_params; i++) g_value_unset (¶ms[i].value); g_free (params); return ret; } /** * fs_stream_set_decryption_parameters: * @stream: a #FsStream * @parameters: (transfer none): a #GstStructure containing the decryption * parameters * @error: the location where to store a #GError or %NULL * * Sets decryption parameters. The exact parameters depend on the type of * plugin being used. * * Returns: %TRUE if the decryption parameters could be set, %FALSE otherwise * Since: UNRELEASED */ gboolean fs_stream_set_decryption_parameters (FsStream *stream, GstStructure *parameters, GError **error) { FsStreamClass *klass; g_return_val_if_fail (stream, FALSE); g_return_val_if_fail (FS_IS_STREAM (stream), FALSE); klass = FS_STREAM_GET_CLASS (stream); if (klass->set_decryption_parameters) return klass->set_decryption_parameters (stream, parameters, error); g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "Does not support decryption"); return FALSE; } /** * fs_stream_destroy: * @stream: a #FsStream * * This will cause the stream to remove all links to other objects and to * remove itself from the #FsSession. Once a #FsStream has been destroyed, it * can not be used anymore. * * It is strongly recommended to call this function from the main thread because * releasing the application's reference to a stream. */ void fs_stream_destroy (FsStream *stream) { g_return_if_fail (stream); g_return_if_fail (FS_IS_STREAM (stream)); g_object_run_dispose (G_OBJECT (stream)); } static gboolean check_message (GstMessage *message, FsStream *stream, const gchar *message_name) { const GstStructure *s; const GValue *value; FsStream *message_stream; if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT) return FALSE; s = gst_message_get_structure (message); if (!gst_structure_has_name (s, message_name)) return FALSE; value = gst_structure_get_value (s, "stream"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_STREAM)) return FALSE; message_stream = g_value_get_object (value); if (stream != message_stream) return FALSE; return TRUE; } /** * fs_stream_parse_new_local_candidate: * @stream: a #FsStream to match against the message * @message: a #GstMessage to parse * @candidate: (out) (transfer none): Returns the #FsCandidate in the message * if not %NULL. * * Parses a "farstream-new-local-candidate" message and checks if it matches * the @stream parameters. * * Returns: %TRUE if the message matches the stream and is valid. */ gboolean fs_stream_parse_new_local_candidate (FsStream *stream, GstMessage *message, FsCandidate **candidate) { const GstStructure *s; const GValue *value; g_return_val_if_fail (stream != NULL, FALSE); if (!check_message (message, stream, "farstream-new-local-candidate")) return FALSE; s = gst_message_get_structure (message); value = gst_structure_get_value (s, "candidate"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_CANDIDATE)) return FALSE; if (candidate) *candidate = g_value_get_boxed (value); return TRUE; } /** * fs_stream_parse_local_candidates_prepared: * @stream: a #FsStream to match against the message * @message: a #GstMessage to parse * * Parses a "farstream-local-candidates-prepared" message and checks if it matches * the @stream parameters. * * Returns: %TRUE if the message matches the stream and is valid. */ gboolean fs_stream_parse_local_candidates_prepared (FsStream *stream, GstMessage *message) { g_return_val_if_fail (stream != NULL, FALSE); return check_message (message, stream, "farstream-local-candidates-prepared"); } /** * fs_stream_parse_new_active_candidate_pair: * @stream: a #FsStream to match against the message * @message: a #GstMessage to parse * @local_candidate: (out) (transfer none): Returns the local #FsCandidate in * the message if not %NULL. * @remote_candidate: (out) (transfer none): Returns the remote #FsCandidate in * the message if not %NULL. * * Parses a "farstream-new-active-candidate-pair" message and checks * if it matches the @stream parameters. * * Returns: %TRUE if the message matches the stream and is valid. */ gboolean fs_stream_parse_new_active_candidate_pair (FsStream *stream, GstMessage *message, FsCandidate **local_candidate, FsCandidate **remote_candidate) { const GstStructure *s; const GValue *value; g_return_val_if_fail (stream != NULL, FALSE); if (!check_message (message, stream, "farstream-new-active-candidate-pair")) return FALSE; s = gst_message_get_structure (message); value = gst_structure_get_value (s, "local-candidate"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_CANDIDATE)) return FALSE; if (local_candidate) *local_candidate = g_value_get_boxed (value); value = gst_structure_get_value (s, "remote-candidate"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_CANDIDATE)) return FALSE; if (remote_candidate) *remote_candidate = g_value_get_boxed (value); return TRUE; } /** * fs_stream_parse_recv_codecs_changed: * @stream: a #FsStream to match against the message * @message: a #GstMessage to parse * @codecs: (out) (transfer none) (element-type FsCodec): * Returns a #GList of #FsCodec of the message if not %NULL * * Parses a "farstream-recv-codecs-changed" message and checks if it matches * the @stream parameters. * * Returns: %TRUE if the message matches the stream and is valid. */ gboolean fs_stream_parse_recv_codecs_changed (FsStream *stream, GstMessage *message, GList **codecs) { const GstStructure *s; const GValue *value; g_return_val_if_fail (stream != NULL, FALSE); if (!check_message (message, stream, "farstream-recv-codecs-changed")) return FALSE; s = gst_message_get_structure (message); value = gst_structure_get_value (s, "codecs"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_CODEC_LIST)) return FALSE; if (codecs) *codecs = g_value_get_boxed (value); return TRUE; } /** * fs_stream_parse_component_state_changed: * @stream: a #FsStream to match against the message * @message: a #GstMessage to parse * @component: (out): Returns the component from the #GstMessage if not %NULL * @state: (out): Returns the #FsStreamState from the #GstMessage if not %NULL * * Parses a "farstream-component-state-changed" message and checks if it matches * the @stream parameters. * * Returns: %TRUE if the message matches the stream and is valid. */ gboolean fs_stream_parse_component_state_changed (FsStream *stream, GstMessage *message, guint *component, FsStreamState *state) { const GstStructure *s; const GValue *value; g_return_val_if_fail (stream != NULL, FALSE); if (!check_message (message, stream, "farstream-component-state-changed")) return FALSE; s = gst_message_get_structure (message); value = gst_structure_get_value (s, "component"); if (!value || !G_VALUE_HOLDS (value, G_TYPE_UINT)) return FALSE; if (component) *component = g_value_get_uint (value); value = gst_structure_get_value (s, "state"); if (!value || !G_VALUE_HOLDS (value, G_TYPE_ENUM)) return FALSE; if (state) *state = g_value_get_enum (value); return TRUE; } farstream-0.2.7/farstream/fs-utils.h0000664000076400007640000000257312112757232014353 00000000000000/* * Farstream - Miscellaneous useful functions * * Copyright 2011 Collabora Ltd. * @author: Olivier Crete * Copyright 2011 Nokia Corp. * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_UTILS_H__ #define __FS_UTILS_H__ #include #include G_BEGIN_DECLS GList *fs_utils_get_default_codec_preferences (GstElement *element); GKeyFile *fs_utils_get_default_element_properties (GstElement *element); void fs_utils_set_bitrate (GstElement *element, glong bitrate); GList *fs_utils_get_default_rtp_header_extension_preferences ( GstElement *element, FsMediaType media_type); G_END_DECLS #endif /* __FS_UTILS_H__ */ farstream-0.2.7/farstream/fs-transmitter.c0000664000076400007640000002457612461773672015606 00000000000000/* * Farstream - Farstream Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-transmitter.c - A Farstream Transmitter gobject (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-transmitter * @short_description: A transmitter object linked to a session * * This object is the base implementation of a Farstream Transmitter. * It needs to be derived and implement by a Farstream transmitter. A * Farstream Transmitter provides a GStreamer network sink and source to be used * for the Farstream Session. It creates #FsStreamTransmitter objects which are * used to set the different per-stream properties * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-transmitter.h" #include #include "fs-plugin.h" #include "fs-conference.h" #include "fs-private.h" /* Signals */ enum { ERROR_SIGNAL, LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_GST_SINK, PROP_GST_SRC, PROP_COMPONENTS, PROP_TYPE_OF_SERVICE, PROP_DO_TIMESTAMP, }; /* struct _FsTransmitterPrivate { }; */ G_DEFINE_ABSTRACT_TYPE(FsTransmitter, fs_transmitter, G_TYPE_OBJECT); #define FS_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_TRANSMITTER, FsTransmitterPrivate)) static void fs_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static guint signals[LAST_SIGNAL] = { 0 }; static void fs_transmitter_class_init (FsTransmitterClass *klass) { GObjectClass *gobject_class; _fs_conference_init_debug (); gobject_class = (GObjectClass *) klass; gobject_class->set_property = fs_transmitter_set_property; gobject_class->get_property = fs_transmitter_get_property; /** * FsTransmitter:gst-src: * * A network source #GstElement to be used by the #FsSession * This element MUST provide a source pad named "src_%u" per component. * These pads number must start at 1 (the %u corresponds to the component * number). * These pads MUST be static pads. * */ g_object_class_install_property (gobject_class, PROP_GST_SRC, g_param_spec_object ("gst-src", "The network source", "A source GstElement to be used by a FsSession", GST_TYPE_ELEMENT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsTransmitter:gst-sink: * * A network source #GstElement to be used by the #FsSession * These element's sink must have async=FALSE * This element MUST provide a pad named "sink_\%u" per component. * These pads number must start at 1 (the \%u corresponds to the component * number). * These pads MUST be static pads. * */ g_object_class_install_property (gobject_class, PROP_GST_SINK, g_param_spec_object ("gst-sink", "The network source", "A source GstElement to be used by a FsSession", GST_TYPE_ELEMENT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsTransmitter:components: * * The number of components to create */ g_object_class_install_property (gobject_class, PROP_COMPONENTS, g_param_spec_uint ("components", "Number of componnets", "The number of components to create", 1, 255, 1, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsTransmitter:tos: * * Sets the IP ToS field (and if possible the IPv6 TCLASS field */ g_object_class_install_property (gobject_class, PROP_TYPE_OF_SERVICE, g_param_spec_uint ("tos", "IP Type of Service", "The IP Type of Service to set on sent packets", 0, 255, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsTransmitter:do-timestamp: * * Apply current stream time to buffers or provide buffers without * timestamps. Must be set before creating a stream transmitter. */ g_object_class_install_property (gobject_class, PROP_DO_TIMESTAMP, g_param_spec_boolean ("do-timestamp", "Do Timestamp", "Apply current stream time to buffers", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsTransmitter::error: * @self: #FsTransmitter that emitted the signal * @errorno: The number of the error * @error_msg: Error message to be displayed to user * * This signal is emitted in any error condition * */ signals[ERROR_SIGNAL] = g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, FS_TYPE_ERROR, G_TYPE_STRING); //g_type_class_add_private (klass, sizeof (FsTransmitterPrivate)); } static void fs_transmitter_init (FsTransmitter *self) { // self->priv = FS_TRANSMITTER_GET_PRIVATE (self); } static void fs_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GST_WARNING ("Subclass %s of FsTransmitter does not override the %s property" " getter", G_OBJECT_TYPE_NAME(object), g_param_spec_get_name (pspec)); } static void fs_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GST_WARNING ("Subclass %s of FsTransmitter does not override the %s property" " setter", G_OBJECT_TYPE_NAME(object), g_param_spec_get_name (pspec)); } /** * fs_transmitter_new_stream_transmitter: * @transmitter: a #FsTranmitter * @participant: the #FsParticipant for which the #FsStream using this * new #FsStreamTransmitter is created * @n_parameters: The number of parameters to pass to the newly created * #FsStreamTransmitter * @parameters: an array of #GParameter * @error: location of a #GError, or NULL if no error occured * * This function will create a new #FsStreamTransmitter element for a * specific participant for this #FsTransmitter * * Returns: (transfer full): a new #FsStreamTransmitter, or NULL if there is an * error */ FsStreamTransmitter * fs_transmitter_new_stream_transmitter (FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error) { FsTransmitterClass *klass; g_return_val_if_fail (transmitter, NULL); g_return_val_if_fail (FS_IS_TRANSMITTER (transmitter), NULL); klass = FS_TRANSMITTER_GET_CLASS (transmitter); g_return_val_if_fail (klass->new_stream_transmitter, NULL); return klass->new_stream_transmitter (transmitter, participant, n_parameters, parameters, error); return NULL; } /** * fs_transmitter_new: * @type: The type of transmitter to create * @components: The number of components to create * @tos: The Type of Service of the socket, max is 255 * @error: location of a #GError, or NULL if no error occured * * This function creates a new transmitter of the requested type. * It will load the appropriate plugin as required. * * Returns: a newly-created #FsTransmitter of the requested type * (or NULL if there is an error) */ FsTransmitter * fs_transmitter_new (const gchar *type, guint components, guint tos, GError **error) { FsTransmitter *self = NULL; g_return_val_if_fail (type != NULL, NULL); g_return_val_if_fail (tos <= 255, NULL); self = FS_TRANSMITTER (fs_plugin_create (type, "transmitter", error, "components", components, "tos", tos, NULL)); if (!self) return NULL; if (self->construction_error) { g_propagate_error(error, self->construction_error); g_object_unref (self); self = NULL; } return self; } /** * fs_transmitter_get_stream_transmitter_type: * @transmitter: A #FsTransmitter object * * This function returns the GObject type for the stream transmitter. * This is meant for bindings that need to introspect the type of arguments * that can be passed to the _new_stream_transmitter. * * Returns: the #GType */ GType fs_transmitter_get_stream_transmitter_type (FsTransmitter *transmitter) { FsTransmitterClass *klass; g_return_val_if_fail (transmitter, 0); g_return_val_if_fail (FS_IS_TRANSMITTER (transmitter), 0); klass = FS_TRANSMITTER_GET_CLASS (transmitter); g_return_val_if_fail (klass->get_stream_transmitter_type, 0); return klass->get_stream_transmitter_type (transmitter); } /** * fs_transmitter_emit_error: * @transmitter: #FsTransmitter on which to emit the error signal * @error_no: The number of the error * @error_msg: Error message to be displayed to user * * This function emit the "error" signal on a #FsTransmitter, it should * only be called by subclasses. */ void fs_transmitter_emit_error (FsTransmitter *transmitter, gint error_no, const gchar *error_msg) { g_signal_emit (transmitter, signals[ERROR_SIGNAL], 0, error_no, error_msg); } /** * fs_transmitter_list_available: * * Get the list of all available transmitters * * Returns: (transfer full): a newly allocated array of strings containing the * list of all available transmitters or %NULL if there are none. It should * be freed with g_strfreev(). */ char ** fs_transmitter_list_available (void) { return fs_plugin_list_available ("transmitter"); } farstream-0.2.7/farstream/Farstream-0.2.gir0000664000076400007640000066775312462322044015376 00000000000000 A format that can be used in printf like format strings to format a FsCodec If the id of a #FsCodec is #FS_CODEC_ID_ANY, then it will be replaced with a dynamic payload type at runtime If the id of a #FsCodec is #FS_CODEC_ID_DISABLE, then this codec will not be used Struct to hold information about ICE-19 compliant candidates a string representing the foundation of this candidate (maximum 32 chars) value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP, #FsComponentType can be used here) IP in dotted format Port to use IP of base in dotted format as defined in ICE-19. Port of base as defined in ICE-19. #FsNetworkProtocol for ip protocol to use as candidate Value between 0 and (2^31 - 1) representing the priority The #FsCandidateType of the candidate Username to use to connect to client if necessary, NULL otherwise Username to use to connect to client if necessary, NULL otherwise The TTL used when sending Multicast packet (0 = auto) Allocates a new #FsCandidate, the rest of the fields can be optionally filled manually. See also fs_candidate_new_full() a newly-allocated #FsCandidate The foundation of the candidate The component this candidate is for The type of candidate The protocol this component is for The IP address of this component (can be NULL for local candidate to mean any address) the UDP/TCP port Allocates a new #FsCandidate, filling all the fields. See also fs_candidate_new() a newly-allocated #FsCandidate The foundation of the candidate The component this candidate is for The IP address of this component (can be NULL for local candidate to mean any address) the UDP/TCP port IP of base in dotted format as defined in ICE-19. Port of base as defined in ICE-19. The protocol this component is for Value between 0 and (2^31 - 1) representing the priority The type of candidate Username to use to connect to client if necessary, NULL otherwise Username to use to connect to client if necessary, NULL otherwise The TTL used when sending Multicast packet (0 = auto) Copies a #FsCandidate and its contents. a new #FsCandidate a #FsCandidate to copy Frees a #FsCandidate and all its contents a #FsCandidate to delete Copies a GList of #FsCandidate and its contents a new GList of #FsCandidate A GList of #FsCandidate Deletes a GList of #FsCandidate and its contents A GList of #FsCandidate An enum for the type of candidate used/reported A host candidate (local) A server reflexive candidate. A peer reflexive candidate An relay candidate A multicast address This structure reprensents one codec that can be offered or received numeric identifier for encoding, eg. PT for SDP the name of the codec type of media this codec is for clock rate of this stream Number of channels codec should decode The minimum interval between two RTCP reports, If it is not specified (G_MAXUINT), it is up to the protocol to decide (it is 5 seconds for RTP). key pairs of param name to param data key triplets of feedbck param type, subtype and extra string that is supported for this codec Allocates and initializes a #FsCodec structure A newly allocated #FsCodec codec identifier, if RTP this should be based on IETF RTP payload types Name of media type this encodes #FsMediaType for type of codec The clock rate this codec encodes at, if applicable This function adds an new feedback parameter to a #FsCodec The #FsCodec to add the parameter to The type of the feedback parameter The subtype of the feedback parameter The extra_params of the feeback parameter This function adds an new optional parameter to a #FsCodec The #FsCodec to add the parameter to The name of the optional parameter The extra_params of the optional parameter Compare two codecs, it will declare two codecs to be identical even if their optional parameters are in a different order. %NULL encoding names are ignored. %TRUE of the codecs are identical, %FALSE otherwise First codec Second codec Copies a #FsCodec structure. a copy of the codec codec to copy Deletes a #FsCodec structure and all its data. Is a no-op on %NULL codec #FsCodec structure to free Finds the #FsFeedbackParameter in the #FsCodec that has the requested subtype, type and extra_params. One of which must be non-NULL; the #FsFeedbackParameter from the #FsCodec or %NULL a #FsCodec The subtype of the parameter to search for or %NULL for any type The subtype of the parameter to search for or %NULL for any subtype The extra_params of the parameter to search for or %NULL for any extra_params Finds the #FsCodecParameter in the #FsCodec that has the requested name and, if not %NULL, the requested value the #FsCodecParameter from the #FsCodec or %NULL a #FsCodec The name of the parameter to search for The value of the parameter to search for or %NULL for any value Removes an optional parameter from a codec. NULL param will do nothing. a #FsCodec a pointer to the #GList element to remove that contains a #FsFeedbackParameter Removes an optional parameter from a codec. NULL param will do nothing. a #FsCodec a pointer to the #FsCodecParameter to remove Returns a newly-allocated string representing the codec the newly-allocated string A farstream codec Verifies if two glist of fscodecs are identical %TRUE if they are identical, %FALSE otherwise a #GList of #FsCodec a #GList of #FsCodec Copies a list of #FsCodec structures. The new list. a GList of #FsCodec to copy Deletes a list of #FsCodec structures and the list itself. Does nothing on %NULL lists. a GList of #FsCodec to delete Reads the content of a #GKeyFile of the following format into a #GList of #FsCodec structures. Example: |[ [audio/codec1] clock-rate=8000 [audio/codec1:1] clock-rate=16000 [audio/codec2] one_param=QCIF another_param=WOW [video/codec3] wierd_param=42 feedback:nack/pli=1 feedback:tfrc= ]| The #GList of #FsCodec or %NULL if the keyfile was empty or an error occured. Name of the #GKeyFile to read the codecs parameters from Used to store arbitary parameters for a codec paramter name. parameter value. Makes a copy of a #FsCodecParameter a newly allocated #FsCodecParameter a #FsCodecParameter Frees a #FsCodecParameter a #FsCodecParameter to free This enum contains the component IDs defined in ICE-19 Use this when specifying a component is innapropriate This component is for RTP data This component is for RTCP control The #FsConference structure, all the members are private Create a new Farstream Participant for the type of the given conference. the new #FsParticipant that has been created. The #FsParticipant is owned by the user and he must unref it when he is done with it. #FsConference interface of a #GstElement Create a new Farstream session for the given conference. the new #FsSession that has been created. The #FsSession must be unref'd by the user when closing the session. #FsConference interface of a #GstElement #FsMediaType of the new session Create a new Farstream Participant for the type of the given conference. the new #FsParticipant that has been created. The #FsParticipant is owned by the user and he must unref it when he is done with it. #FsConference interface of a #GstElement Create a new Farstream session for the given conference. the new #FsSession that has been created. The #FsSession must be unref'd by the user when closing the session. #FsConference interface of a #GstElement #FsMediaType of the new session #FsConferenceClass class structure. parent GstBin class the new #FsSession that has been created. The #FsSession must be unref'd by the user when closing the session. #FsConference interface of a #GstElement #FsMediaType of the new session the new #FsParticipant that has been created. The #FsParticipant is owned by the user and he must unref it when he is done with it. #FsConference interface of a #GstElement An enum that represents the different DTMF event that can be sent to a #FsSession. The values corresponds those those defined in RFC 4733 The rest of the possibles values are in the IANA registry at: http://www.iana.org/assignments/audio-telephone-event-registry An enum that represents the different ways a DTMF event can be sent Send as a special payload type defined by RFC 4733 (which obsoletes RFC 2833) Send as tones as in-band audio sound All members are private Creates a new #FsElementAddedNotifier object the newly-created #FsElementAddedNotifier Add a #GstBin to on which the #FsElementAddedNotifier::element-added signal will be called on every element and sub-element present and added in the future. a #FsElementAddedNotifier A #GstBin to watch to added elements Stop watching the passed bin and its subbins. %TRUE if the #GstBin was being watched, %FALSE otherwise a #FsElementAddedNotifier A #GstBin to stop watching Same as first calling fs_utils_get_default_element_properties() and using the result with fs_element_added_notifier_set_properties_from_keyfile() . This is binding friendly (since GKeyFile doesn't have a boxed type). The id of the signal connection, this can be used to disconnect this property setter using g_signal_handler_disconnect(). a #FsElementAddedNotifier Element for which to set the default codec preferences Same as fs_element_added_notifier_set_properties_from_keyfile() but using the name of the file to load instead of the #GKeyFile directly. %TRUE if the file was successfully loaded, %FALSE otherwise a #FsElementAddedNotifier The name of the keyfile to use Using a #GKeyFile where the groups are the element's type or name and the key=value are the property and its value, this function will set the properties on the elements added to this object after this function has been called. It will take ownership of the GKeyFile structure. It will first try the group as the element type, if that does not match, it will check its name. The id of the signal connection, this can be used to disconnect this property setter using g_signal_handler_disconnect(). a #FsElementAddedNotifier a #GKeyFile This signal is emitted when an element is added to a #GstBin that was added to this object or one of its sub-bins. Be careful, there is no guarantee that this will be emitted on your main thread, it will be emitted in the thread that added the element. The bin may be %NULL if this is the top-level bin. The #GstBin to which this object was added The #GstElement that was added All members are private the #GObjectClass parent This is the enum of error numbers that will come either on the "error" signal, from the Gst Bus or for error in the FS_ERROR domain in GErrors Error constructing some of the sub-elements, this probably denotes an error in the installation of the gstreamer elements. It is a fatal error. An internal error happened in Farstream, it may be in an inconsistent state. The object from which this error comes should be discarded. Invalid arguments to the function, this is a programming error and should not be reported to the user A network related error, this should probably be reported to the user. The optional functionality is not implemented by this plugin. The codec negotiation has failed, this means that there are no common codecs between the local and remote codecs. Data is received on an unknown codec, this most likely denotes an error on the remote side, the buffers will be ignored. It can safely be ignored in most cases (but may result in a call with no media received). There are no codecs detected for that media type. All of the codecs have been disabled by the codec preferences, one should try less strict codec preferences. Could not connect to the to remote party. The object has been disposed. The object already exists Use to store feedback parameters the type of feedback, like "ack", "name", "ccm" the subtype of feedback (can be an empty string) a string containing extra parameters (can be empty) Makes a copy of a #FsFeedbackParameter a newly allocated #FsFeedbackParameter a #FsFeedbackParameter Frees a #FsFeedbackParameter a #FsFeedbackParameter to free Enum used to signify the media type of a codec or stream. A media type that encodes audio. A media type that encodes video. A media type for application data. Largest valid #FsMediaType Gives a user-printable string representing the media type a static string representing the media type A media type An enum for the base IP protocol A UDP based protocol A TCP based protocol, will listen for incoming connections A TCP based protocol, will listen for incoming connections A TCP based protocol, will attempt to open an outbound connection A TCP based protocol, will listen for incoming connections and attempt an outbound connection at the same time as the peer (Simultanuous-Open) All members are private (access them using the properties) The FsParticipant class has no virtual methods to implement, but you may want to override the properties or attach more date to it Our parent This structure represents a plugin, it is opaque. Loads the appropriate plugin if necessary and creates a GObject of the requested type The object created (or NULL if there is an error) The name of the plugin to load The type of plugin to load (normally "transmitter") location of a #GError, or NULL if no error occured The name of the first property to be set on the object The NULL-terminated list of properties to set on the transmitter Loads the appropriate plugin if necessary and creates a GObject of the requested type The object created (or NULL if there is an error) The name of the plugin to load The type of plugin to load (normally "transmitter") location of a #GError, or NULL if no error occured The name of the first property to be set on the object The rest of the arguments Gets the list of all available plugins of a certain type a newly allocated NULL terminated array of strings or %NULL if no strings were found. It should be freed with g_strfreev(). Get list of plugins with this type suffix the parent object A format that can be used in printf like format strings to format a FsRtpHeaderExtension Defines a RTP header extension with its negotiated identifier, direction and URI. They should only be created with fs_rtp_header_extension_new(). The identifier of the RTP header extension the direction in which this extension can be used The URI that defines this extension Creates a new #FsRtpHeaderExtension a new #FsRtpHeaderExtension The identifier of the RTP header extension the direction in which this extension can be used The URI that defines this extension Compares two #FsRtpHeaderExtension structures %TRUE if they are identical, %FALSE otherwise The first #FsRtpHeaderExtension The second #FsRtpHeaderExtension Copies a #FsRtpHeaderExtension a new #FsRtpHeaderExtension The RTP header extension definition to copy Frees the passed #FsRtpHeaderExtension A RTP header extension to free Does a deep copy of a #GList of #FsRtpHeaderExtension a new #GList of #FsRtpHeaderExtension a #GList of #FsRtpHeaderExtension Frees the passed #GList of #FsRtpHeaderExtension a #GList of #FsRtpHeaderExtension Reads the content of a #GKeyFile of the following format into a #GList of #FsRtpHeaderExtension structures. The groups have a format "rtp-hdrext:audio:XXX" or "rtp-hdrext:video:XXX" where XXX is a unique string (per media type). The valid keys are: <itemizedlist> <listitem>id: a int between in the 1-255 and 4096-4351 ranges</listitem> <listitem>uri: a URI describing the RTP Header Extension</listitem> <listitem>direction (optional): To only send or receive a RTP Header Extension, possible values are "send", "receive", "none" or "both". Defaults to "both"</listitem> </itemizedlist> Example: |[ [rtp-hdrext:audio:a] id=1 uri=urn:ietf:params:rtp-hdrext:toffset [rtp-hdrext:audio:abc] id=3 uri=urn:ietf:params:rtp-hdrext:ntp-64 direction=receive ]| a #GList of #FsRtpHeaderExtension that must be freed with fs_rtp_header_extension_list_destroy() Name of the #GKeyFile to read the RTP Header Extensions from The media type for which to get header extensions All members are private, access them using methods and properties Some codec updates need to be reliably transmitted to the other side because they contain important parameters required to decode the media. Other codec updates, caused by user action, don't. A new #GList of #FsCodec that need to be resent or %NULL if there are none. This list must be freed with fs_codec_list_destroy(). a #FsSession Codecs previously retrieved from the #FsSession:codecs property Codecs recently retrieved from the #FsSession:codecs property Returns the GType of the stream transmitter, bindings can use it to validate/convert the parameters passed to fs_session_new_stream(). The #GType of the stream transmitter A #FsSession The name of the transmitter Get the list of all available transmitters for this session. a newly-allocagted %NULL terminated array of named of transmitters or %NULL if no transmitter is needed for this type of session. It should be freed with g_strfreev(). A #FsSession This function creates a stream for the given participant into the active session. the new #FsStream that has been created. User must unref the #FsStream when the stream is ended. If an error occured, returns NULL. a #FsSession #FsParticipant of a participant for the new stream #FsStreamDirection describing the direction of the new stream that will be created for this participant Sets the allowed caps for the sink and source pads for this #FsSession. Only codecs that can take the input specified by the @sink_caps and can produce output as specified by the @src_caps will be produced in the #FsSession:codecs property and so only those will be negotiated. If %NULL is passed to either @src_caps or @sink_caps, it is not changed. The default is "video/x-raw" for a video stream, "audio/x-raw" for an audio stream and "ANY" for an application stream. The values can be retrived using the #FsSession:allowed-src-caps and #FsSession:allowed-sink-caps properties. UNRELEASED %TRUE if the new filter caps were acceptable. a #FsSession Caps for the sink pad or %NULL Caps for the src pad or %NULL Set the list of desired codec preferences. The user may change this value during an ongoing session. Note that doing this can cause the codecs to change. Therefore this requires the user to fetch the new codecs and renegotiate them with the peers. It is a #GList of #FsCodec. The changes are immediately effective. The function does not take ownership of the list. The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the payload type of the codec will be "reserved" and not be used by any dynamically assigned payload type. If the list of specifications would invalidate all codecs, an error will be returned. %TRUE on success, %FALSE on error. a #FsSession a #GList of #FsCodec with the desired configuration Sets encryption parameters. The exact parameters depend on the type of plugin being used. UNRELEASED %TRUE if the encryption parameters could be set, %FALSE otherwise a #FsSession a #GstStructure containing the encryption parameters or %NULL to disable encryption This function will set the currently being sent codec for all streams in this session. The given #FsCodec must be taken directly from the #codecs property of the session. If the given codec is not in the codecs list, @error will be set and %FALSE will be returned. The @send_codec will be copied so it must be free'd using fs_codec_destroy() when done. %FALSE if the send codec couldn't be set. a #FsSession a #FsCodec representing the codec to send This function will start sending a telephony event (such as a DTMF tone) on the #FsSession. You have to call the function fs_session_stop_telephony_event() to stop it. If this function returns %TRUE, a "farstream-telephony-event-started" will always be emitted when the event is actually played out. %TRUE if sucessful, it can return %FALSE if the #FsStream does not support this telephony event. a #FsSession A #FsStreamDTMFEvent or another number defined at http://www.iana.org/assignments/audio-telephone-event-registry The volume in dBm0 without the negative sign. Should be between 0 and 36. Higher values mean lower volume This function will stop sending a telephony event started by fs_session_start_telephony_event(). If the event was being sent for less than 50ms, it will be sent for 50ms minimum. If the duration was a positive and the event is not over, it will cut it short. If this function returns %TRUE, a "farstream-telephony-event-stopped" will always be emitted when the event is actually stopped. %TRUE if sucessful, it can return %FALSE if the #FsSession does not support telephony events or if no telephony event is being sent an #FsSession Some codec updates need to be reliably transmitted to the other side because they contain important parameters required to decode the media. Other codec updates, caused by user action, don't. A new #GList of #FsCodec that need to be resent or %NULL if there are none. This list must be freed with fs_codec_list_destroy(). a #FsSession Codecs previously retrieved from the #FsSession:codecs property Codecs recently retrieved from the #FsSession:codecs property This will cause the session to remove all links to other objects and to remove itself from the #FsConference, it will also destroy all #FsStream inside this #FsSession Once a #FsSession has been destroyed, it can not be used anymore. It is strongly recommended to call this function from the main thread because releasing the application's reference to a session. a #FsSession This function emit the "error" signal on a #FsSession, it should only be called by subclasses. #FsSession on which to emit the error signal The number of the error of type #FsError Error message Returns the GType of the stream transmitter, bindings can use it to validate/convert the parameters passed to fs_session_new_stream(). The #GType of the stream transmitter A #FsSession The name of the transmitter Get the list of all available transmitters for this session. a newly-allocagted %NULL terminated array of named of transmitters or %NULL if no transmitter is needed for this type of session. It should be freed with g_strfreev(). A #FsSession This function creates a stream for the given participant into the active session. the new #FsStream that has been created. User must unref the #FsStream when the stream is ended. If an error occured, returns NULL. a #FsSession #FsParticipant of a participant for the new stream #FsStreamDirection describing the direction of the new stream that will be created for this participant Parses a "farstream-codecs-changed" message and checks if it matches the @session parameters. %TRUE if the message matches the session and is valid. a #FsSession to match against the message a #GstMessage to parse Parses a "farstream-send-codec-changed" message and checks if it matches the @session parameters. %TRUE if the message matches the session and is valid. a #FsSession to match against the message a #GstMessage to parse Returns the #FsCodec in the message if not %NULL. Returns a #GList of #FsCodec of the message if not %NULL Parses a "farstream-telephony-event-started" message and checks if it matches the @session parameters. %TRUE if the message matches the session and is valid. a #FsSession to match against the message a #GstMessage to parse Returns the #FsDTMFMethod in the message if not %NULL. Returns the #FsDTMFEvent in the message if not %NULL. Returns the volume in the message if not %NULL. Parses a "farstream-telephony-event-stopped" message and checks if it matches the @session parameters. %TRUE if the message matches the session and is valid. a #FsSession to match against the message a #GstMessage to parse Returns the #FsDTMFMethod in the message if not %NULL. Sets the allowed caps for the sink and source pads for this #FsSession. Only codecs that can take the input specified by the @sink_caps and can produce output as specified by the @src_caps will be produced in the #FsSession:codecs property and so only those will be negotiated. If %NULL is passed to either @src_caps or @sink_caps, it is not changed. The default is "video/x-raw" for a video stream, "audio/x-raw" for an audio stream and "ANY" for an application stream. The values can be retrived using the #FsSession:allowed-src-caps and #FsSession:allowed-sink-caps properties. UNRELEASED %TRUE if the new filter caps were acceptable. a #FsSession Caps for the sink pad or %NULL Caps for the src pad or %NULL Set the list of desired codec preferences. The user may change this value during an ongoing session. Note that doing this can cause the codecs to change. Therefore this requires the user to fetch the new codecs and renegotiate them with the peers. It is a #GList of #FsCodec. The changes are immediately effective. The function does not take ownership of the list. The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the payload type of the codec will be "reserved" and not be used by any dynamically assigned payload type. If the list of specifications would invalidate all codecs, an error will be returned. %TRUE on success, %FALSE on error. a #FsSession a #GList of #FsCodec with the desired configuration Sets encryption parameters. The exact parameters depend on the type of plugin being used. UNRELEASED %TRUE if the encryption parameters could be set, %FALSE otherwise a #FsSession a #GstStructure containing the encryption parameters or %NULL to disable encryption This function will set the currently being sent codec for all streams in this session. The given #FsCodec must be taken directly from the #codecs property of the session. If the given codec is not in the codecs list, @error will be set and %FALSE will be returned. The @send_codec will be copied so it must be free'd using fs_codec_destroy() when done. %FALSE if the send codec couldn't be set. a #FsSession a #FsCodec representing the codec to send This function will start sending a telephony event (such as a DTMF tone) on the #FsSession. You have to call the function fs_session_stop_telephony_event() to stop it. If this function returns %TRUE, a "farstream-telephony-event-started" will always be emitted when the event is actually played out. %TRUE if sucessful, it can return %FALSE if the #FsStream does not support this telephony event. a #FsSession A #FsStreamDTMFEvent or another number defined at http://www.iana.org/assignments/audio-telephone-event-registry The volume in dBm0 without the negative sign. Should be between 0 and 36. Higher values mean lower volume This function will stop sending a telephony event started by fs_session_start_telephony_event(). If the event was being sent for less than 50ms, it will be sent for 50ms minimum. If the duration was a positive and the event is not over, it will cut it short. If this function returns %TRUE, a "farstream-telephony-event-stopped" will always be emitted when the event is actually stopped. %TRUE if sucessful, it can return %FALSE if the #FsSession does not support telephony events or if no telephony event is being sent an #FsSession These are the #GstCaps that can be fed into the session, they are used to filter the codecs to only those that can accepted those caps as input. These are the #GstCaps that the session can produce, they are used to filter the codecs to only those that can accepted those caps as output. This is the current preferences list for the local codecs. It is set by the user to specify the codec options and priorities. The user may change its value with fs_session_set_codec_preferences() at any time during a session. It is a #GList of #FsCodec. The user must free this codec list using fs_codec_list_destroy() when done. The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the payload type of the codec will be "reserved" and not be used by any dynamically assigned payload type. This is the list of codecs used for this session. It will include the codecs and payload type used to receive media on this session. It will also include any configuration parameter that must be transmitted reliably for the other end to decode the content. It may change when the codec preferences are set, when codecs are set on a #FsStream in this session, when a #FsStream is destroyed or asynchronously when new config data is discovered. If any configuration parameter needs to be discovered, this property will be %NULL until they have been discovered. One can always get the codecs from #FsSession:codecs-without-config. The "farstream-codecs-changed" message will be emitted whenever the value of this property changes. It is a #GList of #FsCodec. User must free this codec list using fs_codec_list_destroy() when done. This is the same list of codecs as #FsSession:codecs without the configuration information that describes the data sent. It is suitable for configurations where a list of codecs is shared by many senders. If one is using codecs such as Theora, Vorbis or H.264 that require such information to be transmitted, the configuration data should be included in the stream and retransmitted regularly. It may change when the codec preferences are set, when codecs are set on a #FsStream in this session, when a #FsStream is destroyed or asynchronously when new config data is discovered. The "farstream-codecs-changed" message will be emitted whenever the value of this property changes. It is a #GList of #FsCodec. User must free this codec list using fs_codec_list_destroy() when done. The #FsConference parent of this session. This property is a construct param and is read-only. Indicates the currently active send codec. A user can change the active send codec by calling fs_session_set_send_codec(). The send codec could also be automatically changed by Farstream. This property is an #FsCodec. User must free the codec using fs_codec_destroy() when done. The "farstream-send-codec-changed" message is emitted on the bus when the value of this property changes. Retrieves previously set encryption parameters The ID of the session, the first number of the pads linked to this session will be this id The media-type of the session. This is either Audio, Video or both. This is a constructor parameter that cannot be changed. The Gstreamer sink pad that must be used to send media data on this session. User must unref this GstPad when done with it. Sets the IP ToS field (and if possible the IPv6 TCLASS field This signal is emitted in any error condition, it can be emitted on any thread. Applications should listen to the GstBus for errors. The #Gobject that emitted the signal The number of the error Error message You must override at least new_stream in a subclass. Our parent the new #FsStream that has been created. User must unref the #FsStream when the stream is ended. If an error occured, returns NULL. a #FsSession #FsParticipant of a participant for the new stream #FsStreamDirection describing the direction of the new stream that will be created for this participant %TRUE if sucessful, it can return %FALSE if the #FsStream does not support this telephony event. a #FsSession A #FsStreamDTMFEvent or another number defined at http://www.iana.org/assignments/audio-telephone-event-registry The volume in dBm0 without the negative sign. Should be between 0 and 36. Higher values mean lower volume %TRUE if sucessful, it can return %FALSE if the #FsSession does not support telephony events or if no telephony event is being sent an #FsSession %FALSE if the send codec couldn't be set. a #FsSession a #FsCodec representing the codec to send %TRUE on success, %FALSE on error. a #FsSession a #GList of #FsCodec with the desired configuration a newly-allocagted %NULL terminated array of named of transmitters or %NULL if no transmitter is needed for this type of session. It should be freed with g_strfreev(). A #FsSession The #GType of the stream transmitter A #FsSession The name of the transmitter A new #GList of #FsCodec that need to be resent or %NULL if there are none. This list must be freed with fs_codec_list_destroy(). a #FsSession Codecs previously retrieved from the #FsSession:codecs property Codecs recently retrieved from the #FsSession:codecs property %TRUE if the new filter caps were acceptable. a #FsSession Caps for the sink pad or %NULL Caps for the src pad or %NULL %TRUE if the encryption parameters could be set, %FALSE otherwise a #FsSession a #GstStructure containing the encryption parameters or %NULL to disable encryption All members are private, access them using methods and properties This function is used to add data identifiers that allow the plugin to recognize packets that are meant for id. For example, in RTP, one would set the SSRCs that are expected. Depending on the protocol, one may be able to add more than one ID to a stream (in RTP you can have multiple SSRCs in a stream). If a protocol supports only one id, adding a new one will overwrite it. If an ID was already set on a stream, adding it to another stream will override the previdous decision. For most protocols, calling this function is optional as the incoming data can be matched with a stream by its source IP address. This is mostly useful if one is using multicast or is behind a muxer server. a #FsStream The id to add to the stream This function adds remote candidates. Any new candidates are added to the list. The candidates will be used to establish a connection with the peer. A copy will be made so the user must free the passed candidate using fs_candidate_destroy() when done. TRUE if the candidate was valid, FALSE otherwise an #FsStream an #GList of #FsCandidate representing the remote candidates This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component. %TRUE if the candidates could be forced, %FALSE otherwise a #FsStream a #GList of #FsCandidate to force Sets decryption parameters. The exact parameters depend on the type of plugin being used. UNRELEASED %TRUE if the decryption parameters could be set, %FALSE otherwise a #FsStream a #GstStructure containing the decryption parameters This function will set the list of remote codecs for this stream. If the given remote codecs couldn't be negotiated with the list of local codecs or already negotiated codecs for the corresponding #FsSession, @error will be set and %FALSE will be returned. The @remote_codecs list will be copied so it must be free'd using fs_codec_list_destroy() when done. %FALSE if the remote codecs couldn't be set. a #FsStream a #GList of #FsCodec representing the remote codecs Set the transmitter to use for this stream. This function will only succeed once. The parameters correspond to the varios GObject properties of the selected stream transmitter. %TRUE if the transmitter could be set, %FALSE otherwise a #FsStream Name of the type of transmitter to use for this stream an array of n_parameters #GParameter struct that will be passed to the newly-create #FsStreamTransmitter Number of parametrs passed to the stream transmitter This function is used to add data identifiers that allow the plugin to recognize packets that are meant for id. For example, in RTP, one would set the SSRCs that are expected. Depending on the protocol, one may be able to add more than one ID to a stream (in RTP you can have multiple SSRCs in a stream). If a protocol supports only one id, adding a new one will overwrite it. If an ID was already set on a stream, adding it to another stream will override the previdous decision. For most protocols, calling this function is optional as the incoming data can be matched with a stream by its source IP address. This is mostly useful if one is using multicast or is behind a muxer server. a #FsStream The id to add to the stream This function adds remote candidates. Any new candidates are added to the list. The candidates will be used to establish a connection with the peer. A copy will be made so the user must free the passed candidate using fs_candidate_destroy() when done. TRUE if the candidate was valid, FALSE otherwise an #FsStream an #GList of #FsCandidate representing the remote candidates This will cause the stream to remove all links to other objects and to remove itself from the #FsSession. Once a #FsStream has been destroyed, it can not be used anymore. It is strongly recommended to call this function from the main thread because releasing the application's reference to a stream. a #FsStream This function emits the #FsStream::error" signal, it should only be called by subclasses. #FsStream on which to emit the error signal The number of the error Error message to be displayed to user Emits the #FsStream::src-pad-added" signal, it should only be called by subclasses. #FsStream on which to emit the src-pad-added signal the #GstPad that this #FsStream has created The #FsCodec for this pad This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component. %TRUE if the candidates could be forced, %FALSE otherwise a #FsStream a #GList of #FsCandidate to force Creates a #GstIterator that can be used to iterate the src pads of this stream. These are the pads that were announced by #FsStream:src-pad-added and are still valid. The #GstIterator a #FsStream Parses a "farstream-component-state-changed" message and checks if it matches the @stream parameters. %TRUE if the message matches the stream and is valid. a #FsStream to match against the message a #GstMessage to parse Returns the component from the #GstMessage if not %NULL Returns the #FsStreamState from the #GstMessage if not %NULL Parses a "farstream-local-candidates-prepared" message and checks if it matches the @stream parameters. %TRUE if the message matches the stream and is valid. a #FsStream to match against the message a #GstMessage to parse Parses a "farstream-new-active-candidate-pair" message and checks if it matches the @stream parameters. %TRUE if the message matches the stream and is valid. a #FsStream to match against the message a #GstMessage to parse Returns the local #FsCandidate in the message if not %NULL. Returns the remote #FsCandidate in the message if not %NULL. Parses a "farstream-new-local-candidate" message and checks if it matches the @stream parameters. %TRUE if the message matches the stream and is valid. a #FsStream to match against the message a #GstMessage to parse Returns the #FsCandidate in the message if not %NULL. Parses a "farstream-recv-codecs-changed" message and checks if it matches the @stream parameters. %TRUE if the message matches the stream and is valid. a #FsStream to match against the message a #GstMessage to parse Returns a #GList of #FsCodec of the message if not %NULL Sets decryption parameters. The exact parameters depend on the type of plugin being used. UNRELEASED %TRUE if the decryption parameters could be set, %FALSE otherwise a #FsStream a #GstStructure containing the decryption parameters This function will set the list of remote codecs for this stream. If the given remote codecs couldn't be negotiated with the list of local codecs or already negotiated codecs for the corresponding #FsSession, @error will be set and %FALSE will be returned. The @remote_codecs list will be copied so it must be free'd using fs_codec_list_destroy() when done. %FALSE if the remote codecs couldn't be set. a #FsStream a #GList of #FsCodec representing the remote codecs Set the transmitter to use for this stream. This function will only succeed once. The parameters correspond to the varios GObject properties of the selected stream transmitter. %TRUE if the transmitter could be set, %FALSE otherwise a #FsStream Name of the type of transmitter to use for this stream an array of n_parameters #GParameter struct that will be passed to the newly-create #FsStreamTransmitter Number of parametrs passed to the stream transmitter Set the transmitter to use for this stream. This function will only succeed once. The parameters correspond to the varios GObject properties of the selected stream transmitter. This is the same as fs_stream_set_transmitter() except that the parameters are passed in a #GHashTable to make it more friendly to GObject introspection %TRUE if the transmitter could be set, %FALSE otherwise a #FsStream Name of the type of transmitter to use for this stream A #GHashTable of string->GValue containing the parameters. This is the list of codecs that have been received by this stream. The user must free the list if fs_codec_list_destroy(). The "farstream-recv-codecs-changed" message is send on the #GstBus when the value of this property changes. It is normally emitted right after #FsStream::src-pad-added only if that codec was not previously received in this stream, but it can also be emitted if the pad already exists, but the source material that will come to it is different. Retrieves previously set decryption parameters The direction of the stream. This property is set initially as a parameter to the fs_session_new_stream() function. It can be changed later if required by setting this property. This is the list of negotiatied codecs, it is the same list as the list of #FsCodec from the parent #FsSession, except that the codec config data has been replaced with the data from the remote codecs for this stream. This is the list of #FsCodec used to receive data from this stream. It is a #GList of #FsCodec. The #FsParticipant for this stream. This property is a construct param and is read-only construction. This is the list of remote codecs for this stream. They must be set by the user as soon as they are known using fs_stream_set_remote_codecs() (generally through external signaling). It is a #GList of #FsCodec. The #FsSession for this stream. This property is a construct param and is read-only construction. This signal is emitted in any error condition The number of the error Error message to be displayed to user This signal is emitted when a new gst source pad has been created for a specific codec being received. There will be a different source pad for each codec that is received. The user must ref the #GstPad if he wants to keep it. The user should not modify the #FsCodec and must copy it if he wants to use it outside the callback scope. This signal is not emitted on the main thread, but on GStreamer's streaming thread! #GstPad of the new source pad #FsCodec of the codec being received on the new source pad You must override add_remote_candidate in a subclass. If you have to negotiate codecs, then you must override set_remote_codecs too Our parent TRUE if the candidate was valid, FALSE otherwise an #FsStream an #GList of #FsCandidate representing the remote candidates %TRUE if the candidates could be forced, %FALSE otherwise a #FsStream a #GList of #FsCandidate to force %FALSE if the remote codecs couldn't be set. a #FsStream a #GList of #FsCodec representing the remote codecs a #FsStream The id to add to the stream %TRUE if the transmitter could be set, %FALSE otherwise a #FsStream Name of the type of transmitter to use for this stream an array of n_parameters #GParameter struct that will be passed to the newly-create #FsStreamTransmitter Number of parametrs passed to the stream transmitter %TRUE if the decryption parameters could be set, %FALSE otherwise a #FsStream a #GstStructure containing the decryption parameters An enum for specifying the direction of a stream No direction specified Send only Receive only Send and receive These are the possible states of a stream, a simple multicast stream could only be in "disconnected" or "ready" state. An stream using an ICE transmitter would use all of these. connectivity checks have been completed, but connectivity was not established no activity scheduled gathering local candidates establishing connectivity at least one working candidate pair ICE concluded, candidate pair selection is now final All members are private, access them using methods and properties This function is used to add remote candidates to the transmitter TRUE of the candidate could be added, FALSE if it couldnt (and the #GError will be set) a #FsStreamTranmitter a #GList of the remote candidates This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component. %TRUE if the candidates could be forced, %FALSE otherwise a #FsStreamTransmitter a #GList of #FsCandidate to force This function tells the transmitter to start gathering local candidates, signals for new candidates and newly active candidates can be emitted during the call to this function. %TRUE if it succeeds (or is not implemented), %FALSE otherwise a #FsStreamTransmitter This functions stops the #FsStreamTransmitter, it must be called before the last reference is dropped. a #FsStreamTransmitter This function is used to add remote candidates to the transmitter TRUE of the candidate could be added, FALSE if it couldnt (and the #GError will be set) a #FsStreamTranmitter a #GList of the remote candidates This function emit the "error" signal on a #FsStreamTransmitter, it should only be called by subclasses. #FsStreamTransmitter on which to emit the error signal The number of the error Error message (for the programmer) This function forces data to be sent immediately to the selected remote candidate, by-passing any connectivity checks. There should be at most one candidate per component. %TRUE if the candidates could be forced, %FALSE otherwise a #FsStreamTransmitter a #GList of #FsCandidate to force This function tells the transmitter to start gathering local candidates, signals for new candidates and newly active candidates can be emitted during the call to this function. %TRUE if it succeeds (or is not implemented), %FALSE otherwise a #FsStreamTransmitter This functions stops the #FsStreamTransmitter, it must be called before the last reference is dropped. a #FsStreamTransmitter This tells the stream transmitter to associate incoming data with this based on the source without looking at the content if possible. A network source #GstElement to be used by the #FsSession This signal is emitted in any error condition The number of the error Error message (for the programmer) This signal is emitted when a buffer coming from a confirmed known source is received. The Component on which this buffer was received the #GstBuffer coming from the known source This signal is emitted when all local candidates have been prepared, an ICE implementation would send its SDP offer or answer. This signal is emitted when there is a new active chandidate pair that has been established. This is specially useful for ICE where the active candidate pair can change automatically due to network conditions. The user must not modify the candidates and must copy them if he wants to use them outside the callback scope. #FsCandidate of the local candidate being used #FsCandidate of the remote candidate being used This signal is emitted when a new local candidate is discovered. #FsCandidate of the local candidate This signal is emitted when the ICE state (or equivalent) of the component changes the id of the component which state has changed the new state of the component You must override the add_remote_candidate in a subclass Our parent TRUE of the candidate could be added, FALSE if it couldnt (and the #GError will be set) a #FsStreamTranmitter a #GList of the remote candidates %TRUE if the candidates could be forced, %FALSE otherwise a #FsStreamTransmitter a #GList of #FsCandidate to force %TRUE if it succeeds (or is not implemented), %FALSE otherwise a #FsStreamTransmitter a #FsStreamTransmitter All members are private, access them using methods and properties This function creates a new transmitter of the requested type. It will load the appropriate plugin as required. a newly-created #FsTransmitter of the requested type (or NULL if there is an error) The type of transmitter to create The number of components to create The Type of Service of the socket, max is 255 Get the list of all available transmitters a newly allocated array of strings containing the list of all available transmitters or %NULL if there are none. It should be freed with g_strfreev(). This function returns the GObject type for the stream transmitter. This is meant for bindings that need to introspect the type of arguments that can be passed to the _new_stream_transmitter. the #GType A #FsTransmitter object This function will create a new #FsStreamTransmitter element for a specific participant for this #FsTransmitter a new #FsStreamTransmitter, or NULL if there is an error a #FsTranmitter the #FsParticipant for which the #FsStream using this new #FsStreamTransmitter is created The number of parameters to pass to the newly created #FsStreamTransmitter an array of #GParameter This function emit the "error" signal on a #FsTransmitter, it should only be called by subclasses. #FsTransmitter on which to emit the error signal The number of the error Error message to be displayed to user This function returns the GObject type for the stream transmitter. This is meant for bindings that need to introspect the type of arguments that can be passed to the _new_stream_transmitter. the #GType A #FsTransmitter object This function will create a new #FsStreamTransmitter element for a specific participant for this #FsTransmitter a new #FsStreamTransmitter, or NULL if there is an error a #FsTranmitter the #FsParticipant for which the #FsStream using this new #FsStreamTransmitter is created The number of parameters to pass to the newly created #FsStreamTransmitter an array of #GParameter The number of components to create Apply current stream time to buffers or provide buffers without timestamps. Must be set before creating a stream transmitter. A network source #GstElement to be used by the #FsSession These element's sink must have async=FALSE This element MUST provide a pad named "sink_\%u" per component. These pads number must start at 1 (the \%u corresponds to the component number). These pads MUST be static pads. A network source #GstElement to be used by the #FsSession This element MUST provide a source pad named "src_%u" per component. These pads number must start at 1 (the %u corresponds to the component number). These pads MUST be static pads. Sets the IP ToS field (and if possible the IPv6 TCLASS field This signal is emitted in any error condition The number of the error Error message to be displayed to user You must override both methods in a subclass. Our parent a new #FsStreamTransmitter, or NULL if there is an error a #FsTranmitter the #FsParticipant for which the #FsStream using this new #FsStreamTransmitter is created The number of parameters to pass to the newly created #FsStreamTransmitter an array of #GParameter the #GType A #FsTransmitter object Copies a GList of #FsCandidate and its contents a new GList of #FsCandidate A GList of #FsCandidate Deletes a GList of #FsCandidate and its contents A GList of #FsCandidate Verifies if two glist of fscodecs are identical %TRUE if they are identical, %FALSE otherwise a #GList of #FsCodec a #GList of #FsCodec Copies a list of #FsCodec structures. The new list. a GList of #FsCodec to copy Deletes a list of #FsCodec structures and the list itself. Does nothing on %NULL lists. a GList of #FsCodec to delete Reads the content of a #GKeyFile of the following format into a #GList of #FsCodec structures. Example: |[ [audio/codec1] clock-rate=8000 [audio/codec1:1] clock-rate=16000 [audio/codec2] one_param=QCIF another_param=WOW [video/codec3] wierd_param=42 feedback:nack/pli=1 feedback:tfrc= ]| The #GList of #FsCodec or %NULL if the keyfile was empty or an error occured. Name of the #GKeyFile to read the codecs parameters from Gives a user-printable string representing the media type a static string representing the media type A media type Parses a "farstream-farstream" message and checks if it matches the @object parameters. %TRUE if the message matches the object and is valid. a #GObject to match against the message a #GstMessage to parse Returns the #FsError error number in the message if not %NULL. Returns the error message if not %NULL Does a deep copy of a #GList of #FsRtpHeaderExtension a new #GList of #FsRtpHeaderExtension a #GList of #FsRtpHeaderExtension Frees the passed #GList of #FsRtpHeaderExtension a #GList of #FsRtpHeaderExtension Reads the content of a #GKeyFile of the following format into a #GList of #FsRtpHeaderExtension structures. The groups have a format "rtp-hdrext:audio:XXX" or "rtp-hdrext:video:XXX" where XXX is a unique string (per media type). The valid keys are: <itemizedlist> <listitem>id: a int between in the 1-255 and 4096-4351 ranges</listitem> <listitem>uri: a URI describing the RTP Header Extension</listitem> <listitem>direction (optional): To only send or receive a RTP Header Extension, possible values are "send", "receive", "none" or "both". Defaults to "both"</listitem> </itemizedlist> Example: |[ [rtp-hdrext:audio:a] id=1 uri=urn:ietf:params:rtp-hdrext:toffset [rtp-hdrext:audio:abc] id=3 uri=urn:ietf:params:rtp-hdrext:ntp-64 direction=receive ]| a #GList of #FsRtpHeaderExtension that must be freed with fs_rtp_header_extension_list_destroy() Name of the #GKeyFile to read the RTP Header Extensions from The media type for which to get header extensions These default codec preferences should work with the elements that are available in the main GStreamer element repositories. They should be suitable for standards based protocols like SIP or XMPP. The default codec preferences for this plugin. This #GList should be freed with fs_codec_list_destroy() Element for which to fetch default codec preferences This function produces a #GKeyFile that can be fed to fs_element_added_notifier_set_properties_from_keyfile(). If no default properties have been found, it will return %NULL. a #GKeyFile containing the default element properties for this element or %NULL if no properties were found. Caller must free the #GKeyFile when he is done. Element for which to fetch default element properties These default rtp header extension preferences should work with the elements that are available in the main GStreamer element repositories. They should be suitable for standards based protocols like SIP or XMPP. The default rtp header extension preferences for this plugin, this #GList should be freed with fs_codec_list_destroy() Element for which to fetch default RTP Header Extension preferences The #FsMediaType for which to get default RTP Header Extension preferences This allows setting the bitrate on all elements that have a "bitrate" property without having to know the type or of the unit used by that element. This will be obsolete in 0.11 (when all elements use bit/sec for the "bitrate" property. The #GstElement The bitrate in bits/sec This is for the bindings benefit. Works around the limitations of GObject introspection. a #GValue of type #FS_TYPE_CANDIDATE_LIST A #GList of #FsCandidate farstream-0.2.7/farstream/fs-transmitter.h0000664000076400007640000000742612461773672015606 00000000000000/* * Farstream - Farstream Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-transmitter.h - A Farstream Transmitter (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_TRANSMITTER_H__ #define __FS_TRANSMITTER_H__ #include #include #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_TRANSMITTER \ (fs_transmitter_get_type ()) #define FS_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_TRANSMITTER, FsTransmitter)) #define FS_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_TRANSMITTER, FsTransmitterClass)) #define FS_IS_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_TRANSMITTER)) #define FS_IS_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_TRANSMITTER)) #define FS_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_TRANSMITTER, FsTransmitterClass)) #define FS_TRANSMITTER_CAST(obj) ((FsTransmitter *) (obj)) typedef struct _FsTransmitter FsTransmitter; typedef struct _FsTransmitterClass FsTransmitterClass; typedef struct _FsTransmitterPrivate FsTransmitterPrivate; /** * FsTransmitterClass: * @parent_class: Our parent * @new_stream_transmitter: Creates a new #FsStreamTransmitter * @get_stream_transmitter_type: Returns the #GType of the stream transmitter * created by this class (useful for bindings) * * You must override both methods in a subclass. */ struct _FsTransmitterClass { GObjectClass parent_class; /*virtual functions */ FsStreamTransmitter *(*new_stream_transmitter) (FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error); GType (*get_stream_transmitter_type) (FsTransmitter *transmitter); /*< private >*/ gpointer _padding[8]; }; /** * FsTransmitter: * * All members are private, access them using methods and properties */ struct _FsTransmitter { GObject parent; /*< private >*/ FsTransmitterPrivate *priv; /* This parameter should only be set by the construction methods * of the subclasses */ GError *construction_error; gpointer _padding[8]; }; GType fs_transmitter_get_type (void); FsStreamTransmitter *fs_transmitter_new_stream_transmitter ( FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error); FsTransmitter *fs_transmitter_new (const gchar *type, guint components, guint tos, GError **error); GType fs_transmitter_get_stream_transmitter_type (FsTransmitter *transmitter); void fs_transmitter_emit_error (FsTransmitter *transmitter, gint error_no, const gchar *error_msg); char **fs_transmitter_list_available (void); G_END_DECLS #endif /* __FS_TRANSMITTER_H__ */ farstream-0.2.7/farstream/fs-conference.c0000664000076400007640000001476712401500475015321 00000000000000/* * Farstream - GStreamer interfaces * * Copyright 2007-2011 Collabora Ltd. * @author: Philippe Kalaf * @author: Olivier Crete * Copyright 2007-2011 Nokia Corp. * * fs-conference.c - GStreamer interface to be implemented by farstream * conference elements * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-conference.h" #include "fs-session.h" #include "fs-private.h" /** * SECTION:fs-conference * @short_description: Interface for farstream conference elements * * A Farstream conference is a conversation space that takes place between 2 or * more participants. Each conference must have one or more Farstream sessions * that are associated to the conference participants. * * * This will communicate asynchronous events to the user through #GstMessage * of type #GST_MESSAGE_ELEMENT sent over the #GstBus. * * The "<literal>farstream-error</literal>" message * |[ * "src-object" #GObject The object (#FsConference, #FsSession or #FsStream) that emitted the error * "error-no" #FsError The Error number * "error-msg" #gchar* The error message * ]| * * The message is sent on asynchronous errors. * * * */ GST_DEBUG_CATEGORY (_fs_conference_debug); #define GST_CAT_DEFAULT _fs_conference_debug G_DEFINE_ABSTRACT_TYPE (FsConference, fs_conference, GST_TYPE_BIN) GQuark fs_error_quark (void) { return g_quark_from_static_string ("fs-error"); } void _fs_conference_init_debug (void) { GST_DEBUG_CATEGORY_INIT (_fs_conference_debug, "fsconference", 0, "farstream base conference library"); } static void fs_conference_class_init (FsConferenceClass * klass) { _fs_conference_init_debug (); } static void fs_conference_init (FsConference *conf) { GST_DEBUG_OBJECT (conf, "fs_conference_init"); } static void fs_conference_error (GObject *signal_src, GObject *error_src, FsError error_no, gchar *error_msg, FsConference *conf) { GstMessage *gst_msg = NULL; GstStructure *error_struct = NULL; error_struct = gst_structure_new ("farstream-error", "src-object", G_TYPE_OBJECT, error_src, "error-no", FS_TYPE_ERROR, error_no, "error-msg", G_TYPE_STRING, error_msg, NULL); gst_msg = gst_message_new_element (GST_OBJECT (conf), error_struct); if (!gst_element_post_message (GST_ELEMENT (conf), gst_msg)) GST_WARNING_OBJECT (conf, "Could not post error on bus"); } /** * fs_conference_new_session: * @conference: #FsConference interface of a #GstElement * @media_type: #FsMediaType of the new session * @error: location of a #GError, or %NULL if no error occured * * Create a new Farstream session for the given conference. * * Returns: (transfer full): the new #FsSession that has been created. * The #FsSession must be unref'd by the user when closing the session. */ FsSession * fs_conference_new_session (FsConference *conf, FsMediaType media_type, GError **error) { FsConferenceClass *klass; FsSession *new_session = NULL; g_return_val_if_fail (conf, NULL); g_return_val_if_fail (FS_IS_CONFERENCE (conf), NULL); klass = FS_CONFERENCE_GET_CLASS (conf); g_return_val_if_fail (klass->new_session, NULL); new_session = klass->new_session (conf, media_type, error); if (!new_session) return NULL; /* Let's catch all session errors and send them over the GstBus */ g_signal_connect_object (new_session, "error", G_CALLBACK (fs_conference_error), conf, 0); return new_session; } /** * fs_conference_new_participant: * @conference: #FsConference interface of a #GstElement * @error: location of a #GError, or %NULL if no error occured * * Create a new Farstream Participant for the type of the given conference. * * Returns: (transfer full): the new #FsParticipant that has been created. * The #FsParticipant is owned by the user and he must unref it when he is * done with it. */ FsParticipant * fs_conference_new_participant (FsConference *conf, GError **error) { FsConferenceClass *klass; g_return_val_if_fail (conf, NULL); g_return_val_if_fail (FS_IS_CONFERENCE (conf), NULL); klass = FS_CONFERENCE_GET_CLASS (conf); g_return_val_if_fail (klass->new_participant, NULL); return klass->new_participant (conf, error); } /** * fs_parse_error: * @object: a #GObject to match against the message * @message: a #GstMessage to parse * @error: (out): Returns the #FsError error number in * the message if not %NULL. * @error_msg: (out) (transfer none):Returns the error message if not %NULL * * Parses a "farstream-farstream" message and checks if it matches * the @object parameters. * * Returns: %TRUE if the message matches the object and is valid. */ gboolean fs_parse_error (GObject *object, GstMessage *message, FsError *error, const gchar **error_msg) { const GstStructure *s; const GValue *value; GObject *message_object; g_return_val_if_fail (object != NULL, FALSE); if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT) return FALSE; s = gst_message_get_structure (message); if (!gst_structure_has_name (s, "farstream-error")) return FALSE; value = gst_structure_get_value (s, "src-object"); if (!value || !G_VALUE_HOLDS (value, G_TYPE_OBJECT)) return FALSE; message_object = g_value_get_object (value); if (object != message_object) return FALSE; value = gst_structure_get_value (s, "error-no"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_ERROR)) return FALSE; if (error) *error = g_value_get_enum (value); value = gst_structure_get_value (s, "error-msg"); if (!value || !G_VALUE_HOLDS (value, G_TYPE_STRING)) return FALSE; if (error_msg) *error_msg = g_value_get_string (value); return TRUE; } farstream-0.2.7/farstream/fs-stream.h0000664000076400007640000001515212461773672014520 00000000000000/* * Farstream - Farstream Stream * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-stream.h - A Farstream Stream (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_STREAM_H__ #define __FS_STREAM_H__ #include #include #include #include G_BEGIN_DECLS /** * FsStreamDirection: * @FS_DIRECTION_NONE: No direction specified * @FS_DIRECTION_SEND: Send only * @FS_DIRECTION_RECV: Receive only * @FS_DIRECTION_BOTH: Send and receive * * An enum for specifying the direction of a stream * */ typedef enum { FS_DIRECTION_NONE = 0, FS_DIRECTION_SEND = 1<<0, FS_DIRECTION_RECV = 1<<1, FS_DIRECTION_BOTH = FS_DIRECTION_SEND | FS_DIRECTION_RECV } FsStreamDirection; /** * FsStreamState: * @FS_STREAM_STATE_FAILED: connectivity checks have been completed, * but connectivity was not established * @FS_STREAM_STATE_DISCONNECTED: no activity scheduled * @FS_STREAM_STATE_GATHERING: gathering local candidates * @FS_STREAM_STATE_CONNECTING: establishing connectivity * @FS_STREAM_STATE_CONNECTED: at least one working candidate pair * @FS_STREAM_STATE_READY: ICE concluded, candidate pair selection is now final * * These are the possible states of a stream, a simple multicast stream * could only be in "disconnected" or "ready" state. * An stream using an ICE transmitter would use all of these. */ typedef enum { FS_STREAM_STATE_FAILED, FS_STREAM_STATE_DISCONNECTED, FS_STREAM_STATE_GATHERING, FS_STREAM_STATE_CONNECTING, FS_STREAM_STATE_CONNECTED, FS_STREAM_STATE_READY } FsStreamState; /* TYPE MACROS */ #define FS_TYPE_STREAM \ (fs_stream_get_type ()) #define FS_STREAM(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_STREAM, FsStream)) #define FS_STREAM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_STREAM, FsStreamClass)) #define FS_IS_STREAM(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_STREAM)) #define FS_IS_STREAM_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_STREAM)) #define FS_STREAM_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_STREAM, FsStreamClass)) #define FS_STREAM_CAST(obj) ((FsStream *) (obj)) typedef struct _FsStream FsStream; typedef struct _FsStreamClass FsStreamClass; typedef struct _FsStreamPrivate FsStreamPrivate; /** * FsStreamClass: * @parent_class: Our parent * @add_remote_candidates: Set sthe remote candidates * @force_remote_candidates: Forces certain remote candidates * @set_remote_codecs: Sets the list of remote codecs * @add_id: Add a known id to be associated with this stream * @set_transmitter: Set the transmitter to use for this stream * @set_decryption_parameters: Set decryption parameters * * You must override add_remote_candidate in a subclass. * If you have to negotiate codecs, then you must override set_remote_codecs too */ struct _FsStreamClass { GObjectClass parent_class; /*virtual functions */ gboolean (*add_remote_candidates) (FsStream *stream, GList *candidates, GError **error); gboolean (*force_remote_candidates) (FsStream *stream, GList *remote_candidates, GError **error); gboolean (*set_remote_codecs) (FsStream *stream, GList *remote_codecs, GError **error); void (*add_id) (FsStream *stream, guint id); gboolean (*set_transmitter) (FsStream *stream, const gchar *transmitter, GParameter *stream_transmitter_parameters, guint stream_transmitter_n_parameters, GError **error); gboolean (* set_decryption_parameters) (FsStream *stream, GstStructure *parameters, GError **error); /*< private >*/ gpointer _padding[7]; }; /** * FsStream: * * All members are private, access them using methods and properties */ struct _FsStream { GObject parent; /*< private >*/ FsStreamPrivate *priv; gpointer _padding[8]; }; GType fs_stream_get_type (void); gboolean fs_stream_add_remote_candidates (FsStream *stream, GList *candidates, GError **error); gboolean fs_stream_force_remote_candidates (FsStream *stream, GList *remote_candidates, GError **error); gboolean fs_stream_set_remote_codecs (FsStream *stream, GList *remote_codecs, GError **error); void fs_stream_add_id (FsStream *stream, guint id); void fs_stream_emit_error (FsStream *stream, gint error_no, const gchar *error_msg); void fs_stream_emit_src_pad_added (FsStream *stream, GstPad *pad, FsCodec *codec); GstIterator *fs_stream_iterate_src_pads (FsStream *stream); gboolean fs_stream_set_transmitter (FsStream *stream, const gchar *transmitter, GParameter *stream_transmitter_parameters, guint stream_transmitter_n_parameters, GError **error); gboolean fs_stream_set_transmitter_ht (FsStream *stream, const gchar *transmitter, GHashTable *stream_transmitter_parameters, GError **error); gboolean fs_stream_set_decryption_parameters (FsStream *stream, GstStructure *parameters, GError **error); void fs_stream_destroy (FsStream *stream); gboolean fs_stream_parse_new_local_candidate (FsStream *stream, GstMessage *message, FsCandidate **candidate); gboolean fs_stream_parse_local_candidates_prepared (FsStream *stream, GstMessage *message); gboolean fs_stream_parse_new_active_candidate_pair (FsStream *stream, GstMessage *message, FsCandidate **local_candidate, FsCandidate **remote_candidate); gboolean fs_stream_parse_recv_codecs_changed (FsStream *stream, GstMessage *message, GList **codecs); gboolean fs_stream_parse_component_state_changed (FsStream *stream, GstMessage *message, guint *component, FsStreamState *state); G_END_DECLS #endif /* __FS_STREAM_H__ */ farstream-0.2.7/farstream/fs-private.h0000664000076400007640000000237112401500475014655 00000000000000/* * Farstream - Private declarations * * Copyright 2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2008 Nokia Corp. * * fs-conference.h - Header file for gstreamer interface to be * implemented by farstream conference elements * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_PRIVATE_H__ #define __FS_PRIVATE_H__ #include G_BEGIN_DECLS void _fs_conference_init_debug (void); GST_DEBUG_CATEGORY_EXTERN (_fs_conference_debug); G_END_DECLS #endif /* __FS_PRIVATE_H__ */ farstream-0.2.7/farstream/fs-session.c0000664000076400007640000010116212462321615014663 00000000000000/* * Farstream - Farstream Session * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-session.c - A Farstream Session gobject (base implementation) * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-session * @short_description: A session in a conference * * This object is the base implementation of a Farstream Session. It needs to be * derived and implemented by a farstream conference gstreamer element. A * Farstream session is defined in the same way as an RTP session. It can contain * one or more participants but represents only one media stream (i.e. One * session for video and one session for audio in an AV conference). Sessions * contained in the same conference will be synchronised together during * playback. * * * This will communicate asynchronous events to the user through #GstMessage * of type #GST_MESSAGE_ELEMENT sent over the #GstBus. * * The "<literal>farstream-send-codec-changed</literal>" * message * * * * * * * * * * * * * * * * *
"session"#FsSessionThe session that emits the message
"codec"#FsCodecThe new send codec
"secondary-codecs"#GListA #GList of #FsCodec (to be freed with fs_codec_list_destroy()) *
* * This message is sent on the bus when the value of the * #FsSession:current-send-codec property changes. * *
* The "<literal>farstream-codecs-changed</literal>" * message * * * * * * *
"session"#FsSessionThe session that emits the message
* * This message is sent on the bus when the value of the * #FsSession:codecs or #FsSession:codecs-without-config properties change. * If one is using codecs that have configuration data that needs to be * transmitted reliably, one should fetch #FsSession:codecs, otherwise, * #FsSession:codecs-without-config should be enough. * *
* The "<literal>farstream-telephony-event-started</literal>" * message * * * * * * * * * * * * * * * * * * * * * *
"session"#FsSessionThe session that emits the message
"method"#FsDTMFMethodThe method used to send the DTMF
"event"#FSDTMFEventThe event number
"volume"gucharThe volume of the event
* * This message is emitted after a succesful call to * fs_session_start_telephony_event() to inform the application that the * telephony event has started. * *
* The "<literal>farstream-telephony-event-stopped</literal>" * message * * * * * * * * * * * *
"session"#FsSessionThe session that emits the message
"method"#FsDTMFMethodThe method used to send the DTMF
* * This message is emitted after a succesful call to * fs_session_stop_telephony_event() to inform the application that the * telephony event has stopped. * *
* */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-session.h" #include #include "fs-conference.h" #include "fs-codec.h" #include "fs-enumtypes.h" #include "fs-private.h" #define GST_CAT_DEFAULT _fs_conference_debug /* Signals */ enum { ERROR_SIGNAL, LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_CONFERENCE, PROP_MEDIA_TYPE, PROP_ID, PROP_SINK_PAD, PROP_CODEC_PREFERENCES, PROP_CODECS, PROP_CODECS_WITHOUT_CONFIG, PROP_CURRENT_SEND_CODEC, PROP_TYPE_OF_SERVICE, PROP_ALLOWED_SRC_CAPS, PROP_ALLOWED_SINK_CAPS, PROP_ENCRYPTION_PARAMETERS }; /* struct _FsSessionPrivate { }; #define FS_SESSION_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_SESSION, FsSessionPrivate)) */ G_DEFINE_ABSTRACT_TYPE(FsSession, fs_session, G_TYPE_OBJECT) static void fs_session_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_session_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static guint signals[LAST_SIGNAL] = { 0 }; static void fs_session_class_init (FsSessionClass *klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; gobject_class->set_property = fs_session_set_property; gobject_class->get_property = fs_session_get_property; /** * FsSession:conference: * * The #FsConference parent of this session. This property is a * construct param and is read-only. * */ g_object_class_install_property (gobject_class, PROP_CONFERENCE, g_param_spec_object ("conference", "The FsConference", "The Conference this stream refers to", FS_TYPE_CONFERENCE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsSession:media-type: * * The media-type of the session. This is either Audio, Video or both. * This is a constructor parameter that cannot be changed. * */ g_object_class_install_property (gobject_class, PROP_MEDIA_TYPE, g_param_spec_enum ("media-type", "The media type of the session", "An enum that specifies the media type of the session", FS_TYPE_MEDIA_TYPE, FS_MEDIA_TYPE_AUDIO, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsSession:id: * * The ID of the session, the first number of the pads linked to this session * will be this id * */ g_object_class_install_property (gobject_class, PROP_ID, g_param_spec_uint ("id", "The ID of the session", "This ID is used on pad related to this session", 0, G_MAXUINT, 0, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsSession:sink-pad: * * The Gstreamer sink pad that must be used to send media data on this * session. User must unref this GstPad when done with it. * */ g_object_class_install_property (gobject_class, PROP_SINK_PAD, g_param_spec_object ("sink-pad", "A gstreamer sink pad for this session", "A pad used for sending data on this session", GST_TYPE_PAD, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsSession:codec-preferences: (type GLib.List(FsCodec)) (transfer full) * * This is the current preferences list for the local codecs. It is * set by the user to specify the codec options and priorities. The user may * change its value with fs_session_set_codec_preferences() at any time * during a session. It is a #GList of #FsCodec. * The user must free this codec list using fs_codec_list_destroy() when done. * * The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE * or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the * payload type of the codec will be "reserved" and not be used by any * dynamically assigned payload type. */ g_object_class_install_property (gobject_class, PROP_CODEC_PREFERENCES, g_param_spec_boxed ("codec-preferences", "List of user preferences for the codecs", "A GList of FsCodecs that allows user to set his codec options and" " priorities", FS_TYPE_CODEC_LIST, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsSession:codecs: (type GLib.List(FsCodec)) (transfer full) * * This is the list of codecs used for this session. It will include the * codecs and payload type used to receive media on this session. It will * also include any configuration parameter that must be transmitted reliably * for the other end to decode the content. * * It may change when the codec preferences are set, when codecs are set * on a #FsStream in this session, when a #FsStream is destroyed or * asynchronously when new config data is discovered. * * If any configuration parameter needs to be discovered, this property * will be %NULL until they have been discovered. One can always get * the codecs from #FsSession:codecs-without-config. * The "farstream-codecs-changed" message will be emitted whenever the value * of this property changes. * * It is a #GList of #FsCodec. User must free this codec list using * fs_codec_list_destroy() when done. */ g_object_class_install_property (gobject_class, PROP_CODECS, g_param_spec_boxed ("codecs", "List of codecs", "A GList of FsCodecs indicating the codecs for this session", FS_TYPE_CODEC_LIST, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsSession:codecs-without-config: (type GLib.List(FsCodec)) (transfer full) * * This is the same list of codecs as #FsSession:codecs without * the configuration information that describes the data sent. It is suitable * for configurations where a list of codecs is shared by many senders. * If one is using codecs such as Theora, Vorbis or H.264 that require * such information to be transmitted, the configuration data should be * included in the stream and retransmitted regularly. * * It may change when the codec preferences are set, when codecs are set * on a #FsStream in this session, when a #FsStream is destroyed or * asynchronously when new config data is discovered. * * The "farstream-codecs-changed" message will be emitted whenever the value * of this property changes. * * It is a #GList of #FsCodec. User must free this codec list using * fs_codec_list_destroy() when done. */ g_object_class_install_property (gobject_class, PROP_CODECS_WITHOUT_CONFIG, g_param_spec_boxed ("codecs-without-config", "List of codecs without the configuration data", "A GList of FsCodecs indicating the codecs for this session without " "any configuration data", FS_TYPE_CODEC_LIST, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsSession:current-send-codec: * * Indicates the currently active send codec. A user can change the active * send codec by calling fs_session_set_send_codec(). The send codec could * also be automatically changed by Farstream. This property is an * #FsCodec. User must free the codec using fs_codec_destroy() when done. * The "farstream-send-codec-changed" message is emitted on the bus when * the value of this property changes. */ g_object_class_install_property (gobject_class, PROP_CURRENT_SEND_CODEC, g_param_spec_boxed ("current-send-codec", "Current active send codec", "An FsCodec indicating the currently active send codec", FS_TYPE_CODEC, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsSession:tos: * * Sets the IP ToS field (and if possible the IPv6 TCLASS field */ g_object_class_install_property (gobject_class, PROP_TYPE_OF_SERVICE, g_param_spec_uint ("tos", "IP Type of Service", "The IP Type of Service to set on sent packets", 0, 255, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsSession:allowed-sink-caps: * * These are the #GstCaps that can be fed into the session, * they are used to filter the codecs to only those that can * accepted those caps as input. */ g_object_class_install_property (gobject_class, PROP_ALLOWED_SINK_CAPS, g_param_spec_boxed ("allowed-sink-caps", "Allowed sink caps", "GstCaps that can be fed into the session", GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsSession:allowed-src-caps: * * These are the #GstCaps that the session can produce, * they are used to filter the codecs to only those that can * accepted those caps as output. */ g_object_class_install_property (gobject_class, PROP_ALLOWED_SRC_CAPS, g_param_spec_boxed ("allowed-src-caps", "Allowed source caps", "GstCaps that the session can produce", GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsSession:encryption-parameters: * * Retrieves previously set encryption parameters */ g_object_class_install_property (gobject_class, PROP_ENCRYPTION_PARAMETERS, g_param_spec_boxed ("encryption-parameters", "Encryption parameters", "Parameters used to encrypt the stream", GST_TYPE_STRUCTURE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * FsSession::error: * @self: #FsSession that emitted the signal * @object: The #Gobject that emitted the signal * @error_no: The number of the error * @error_msg: Error message * * This signal is emitted in any error condition, it can be emitted on any * thread. Applications should listen to the GstBus for errors. * */ signals[ERROR_SIGNAL] = g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 3, G_TYPE_OBJECT, FS_TYPE_ERROR, G_TYPE_STRING); } static void fs_session_init (FsSession *self) { /* member init */ // self->priv = FS_SESSION_GET_PRIVATE (self); } static void fs_session_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { switch (prop_id) { case PROP_ENCRYPTION_PARAMETERS: g_value_set_boxed (value, NULL); /* Not having parameters is valid, in this case set nothing */ break; default: GST_WARNING ("Subclass %s of FsSession does not override the %s property" " getter", G_OBJECT_TYPE_NAME(object), g_param_spec_get_name (pspec)); break; } } static void fs_session_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { GST_WARNING ("Subclass %s of FsSession does not override the %s property" " setter", G_OBJECT_TYPE_NAME(object), g_param_spec_get_name (pspec)); } static void fs_session_error_forward (GObject *signal_src, FsError error_no, gchar *error_msg, FsSession *session) { /* We just need to forward the error signal including a ref to the stream * object (signal_src) */ g_signal_emit (session, signals[ERROR_SIGNAL], 0, signal_src, error_no, error_msg); } /** * fs_session_new_stream: * @session: a #FsSession * @participant: #FsParticipant of a participant for the new stream * @direction: #FsStreamDirection describing the direction of the new stream that will * be created for this participant * @error: location of a #GError, or %NULL if no error occured * * This function creates a stream for the given participant into the active session. * * Returns: (transfer full): the new #FsStream that has been created. * User must unref the #FsStream when the stream is ended. If an error occured, * returns NULL. */ FsStream * fs_session_new_stream (FsSession *session, FsParticipant *participant, FsStreamDirection direction, GError **error) { FsSessionClass *klass; FsStream *new_stream = NULL; g_return_val_if_fail (session, NULL); g_return_val_if_fail (FS_IS_SESSION (session), NULL); klass = FS_SESSION_GET_CLASS (session); g_return_val_if_fail (klass->new_stream, NULL); new_stream = klass->new_stream (session, participant, direction, error); if (!new_stream) return NULL; /* Let's catch all stream errors and forward them */ g_signal_connect_object (new_stream, "error", G_CALLBACK (fs_session_error_forward), session, 0); return new_stream; } /** * fs_session_start_telephony_event: * @session: a #FsSession * @event: A #FsStreamDTMFEvent or another number defined at * http://www.iana.org/assignments/audio-telephone-event-registry * @volume: The volume in dBm0 without the negative sign. Should be between * 0 and 36. Higher values mean lower volume * * This function will start sending a telephony event (such as a DTMF * tone) on the #FsSession. You have to call the function * fs_session_stop_telephony_event() to stop it. * * If this function returns %TRUE, a "farstream-telephony-event-started" will * always be emitted when the event is actually played out. * * Returns: %TRUE if sucessful, it can return %FALSE if the #FsStream * does not support this telephony event. */ gboolean fs_session_start_telephony_event (FsSession *session, guint8 event, guint8 volume) { FsSessionClass *klass; g_return_val_if_fail (session, FALSE); g_return_val_if_fail (FS_IS_SESSION (session), FALSE); klass = FS_SESSION_GET_CLASS (session); if (klass->start_telephony_event) { return klass->start_telephony_event (session, event, volume); } else { GST_WARNING ("start_telephony_event not defined in class"); } return FALSE; } /** * fs_session_stop_telephony_event: * @session: an #FsSession * * This function will stop sending a telephony event started by * fs_session_start_telephony_event(). If the event was being sent * for less than 50ms, it will be sent for 50ms minimum. If the * duration was a positive and the event is not over, it will cut it * short. * * If this function returns %TRUE, a "farstream-telephony-event-stopped" will * always be emitted when the event is actually stopped. * Returns: %TRUE if sucessful, it can return %FALSE if the #FsSession * does not support telephony events or if no telephony event is being sent */ gboolean fs_session_stop_telephony_event (FsSession *session) { FsSessionClass *klass; g_return_val_if_fail (session, FALSE); g_return_val_if_fail (FS_IS_SESSION (session), FALSE); klass = FS_SESSION_GET_CLASS (session); if (klass->stop_telephony_event) { return klass->stop_telephony_event (session); } else { GST_WARNING ("stop_telephony_event not defined in class"); } return FALSE; } /** * fs_session_set_send_codec: * @session: a #FsSession * @send_codec: a #FsCodec representing the codec to send * @error: location of a #GError, or %NULL if no error occured * * This function will set the currently being sent codec for all streams in this * session. The given #FsCodec must be taken directly from the #codecs * property of the session. If the given codec is not in the codecs * list, @error will be set and %FALSE will be returned. The @send_codec will be * copied so it must be free'd using fs_codec_destroy() when done. * * Returns: %FALSE if the send codec couldn't be set. */ gboolean fs_session_set_send_codec (FsSession *session, FsCodec *send_codec, GError **error) { FsSessionClass *klass; g_return_val_if_fail (session, FALSE); g_return_val_if_fail (FS_IS_SESSION (session), FALSE); klass = FS_SESSION_GET_CLASS (session); if (klass->set_send_codec) { return klass->set_send_codec (session, send_codec, error); } else { GST_WARNING ("set_send_codec not defined in class"); g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "set_send_codec not defined in class"); } return FALSE; } /** * fs_session_set_codec_preferences: * @session: a #FsSession * @codec_preferences: (element-type FsCodec) (allow-none): a #GList of #FsCodec with the * desired configuration * @error: location of a #GError, or %NULL if no error occured * * Set the list of desired codec preferences. The user may * change this value during an ongoing session. Note that doing this can cause * the codecs to change. Therefore this requires the user to fetch * the new codecs and renegotiate them with the peers. It is a #GList * of #FsCodec. The changes are immediately effective. * The function does not take ownership of the list. * * The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE * or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the * payload type of the codec will be "reserved" and not be used by any * dynamically assigned payload type. * * If the list of specifications would invalidate all codecs, an error will * be returned. * * Returns: %TRUE on success, %FALSE on error. */ gboolean fs_session_set_codec_preferences (FsSession *session, GList *codec_preferences, GError **error) { FsSessionClass *klass; g_return_val_if_fail (session, FALSE); g_return_val_if_fail (FS_IS_SESSION (session), FALSE); klass = FS_SESSION_GET_CLASS (session); if (klass->set_codec_preferences) { return klass->set_codec_preferences (session, codec_preferences, error); } else { GST_WARNING ("set_send_preferences not defined in class"); g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "set_codec_preferences not defined in class"); } return FALSE; } /** * fs_session_emit_error: * @session: #FsSession on which to emit the error signal * @error_no: The number of the error of type #FsError * @error_msg: Error message * * This function emit the "error" signal on a #FsSession, it should only be * called by subclasses. */ void fs_session_emit_error (FsSession *session, gint error_no, const gchar *error_msg) { g_signal_emit (session, signals[ERROR_SIGNAL], 0, session, error_no, error_msg); } /** * fs_session_list_transmitters: * @session: A #FsSession * * Get the list of all available transmitters for this session. * * Returns: (transfer full): a newly-allocagted %NULL terminated array of * named of transmitters or %NULL if no transmitter is needed for this type of * session. It should be freed with g_strfreev(). */ gchar ** fs_session_list_transmitters (FsSession *session) { FsSessionClass *klass; g_return_val_if_fail (session, NULL); g_return_val_if_fail (FS_IS_SESSION (session), NULL); klass = FS_SESSION_GET_CLASS (session); if (klass->list_transmitters) { return klass->list_transmitters (session); } else { return NULL; } } /** * fs_session_get_stream_transmitter_type: * @session: A #FsSession * @transmitter: The name of the transmitter * * Returns the GType of the stream transmitter, bindings can use it * to validate/convert the parameters passed to fs_session_new_stream(). * * Returns: The #GType of the stream transmitter */ GType fs_session_get_stream_transmitter_type (FsSession *session, const gchar *transmitter) { FsSessionClass *klass; g_return_val_if_fail (session, 0); g_return_val_if_fail (FS_IS_SESSION (session), 0); klass = FS_SESSION_GET_CLASS (session); if (klass->get_stream_transmitter_type) return klass->get_stream_transmitter_type (session, transmitter); return 0; } /** * fs_session_codecs_need_resend: * @session: a #FsSession * @old_codecs: (element-type FsCodec) (transfer none) (allow-none): * Codecs previously retrieved from the #FsSession:codecs property * @new_codecs: (element-type FsCodec) (transfer none) (allow-none): * Codecs recently retrieved from the #FsSession:codecs property * * Some codec updates need to be reliably transmitted to the other side * because they contain important parameters required to decode the media. * Other codec updates, caused by user action, don't. * * Returns: (element-type FsCodec) (transfer full): A new #GList of * #FsCodec that need to be resent or %NULL if there are none. This * list must be freed with fs_codec_list_destroy(). */ GList * fs_session_codecs_need_resend (FsSession *session, GList *old_codecs, GList *new_codecs) { FsSessionClass *klass; g_return_val_if_fail (session, 0); g_return_val_if_fail (FS_IS_SESSION (session), 0); klass = FS_SESSION_GET_CLASS (session); if (klass->codecs_need_resend) return klass->codecs_need_resend (session, old_codecs, new_codecs); return NULL; } /** * fs_session_set_encryption_parameters: * @session: a #FsSession * @parameters: (transfer none) (allow-none): a #GstStructure containing the * encryption parameters or %NULL to disable encryption * @error: the location where to store a #GError or %NULL * * Sets encryption parameters. The exact parameters depend on the type of * plugin being used. * * Returns: %TRUE if the encryption parameters could be set, %FALSE otherwise * Since: UNRELEASED */ gboolean fs_session_set_encryption_parameters (FsSession *session, GstStructure *parameters, GError **error) { FsSessionClass *klass; g_return_val_if_fail (session, FALSE); g_return_val_if_fail (FS_IS_SESSION (session), FALSE); klass = FS_SESSION_GET_CLASS (session); if (klass->set_encryption_parameters) return klass->set_encryption_parameters (session, parameters, error); g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "Does not support encryption"); return FALSE; } /** * fs_session_destroy: * @session: a #FsSession * * This will cause the session to remove all links to other objects and to * remove itself from the #FsConference, it will also destroy all #FsStream * inside this #FsSession Once a #FsSession has been destroyed, it * can not be used anymore. * * It is strongly recommended to call this function from the main thread because * releasing the application's reference to a session. */ void fs_session_destroy (FsSession *session) { g_return_if_fail (session); g_return_if_fail (FS_IS_SESSION (session)); g_object_run_dispose (G_OBJECT (session)); } static gboolean check_message (GstMessage *message, FsSession *session, const gchar *message_name) { const GstStructure *s; const GValue *value; FsSession *message_session; if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT) return FALSE; s = gst_message_get_structure (message); if (!gst_structure_has_name (s, message_name)) return FALSE; value = gst_structure_get_value (s, "session"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_SESSION)) return FALSE; message_session = g_value_get_object (value); if (session != message_session) return FALSE; return TRUE; } /** * fs_session_parse_send_codec_changed: * @session: a #FsSession to match against the message * @message: a #GstMessage to parse * @codec: (out) (transfer none): Returns the #FsCodec in the message if not * %NULL. * @secondary_codecs: (out) (transfer none) (element-type FsCodec): * Returns a #GList of #FsCodec of the message if not %NULL * * Parses a "farstream-send-codec-changed" message and checks if it matches * the @session parameters. * * Returns: %TRUE if the message matches the session and is valid. */ gboolean fs_session_parse_send_codec_changed ( FsSession *session, GstMessage *message, FsCodec **codec, GList **secondary_codecs) { const GstStructure *s; const GValue *value; g_return_val_if_fail (session != NULL, FALSE); if (!check_message (message, session, "farstream-send-codec-changed")) return FALSE; s = gst_message_get_structure (message); value = gst_structure_get_value (s, "codec"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_CODEC)) return FALSE; if (codec) *codec = g_value_get_boxed (value); value = gst_structure_get_value (s, "secondary-codecs"); if (!value || !G_VALUE_HOLDS (value, FS_TYPE_CODEC_LIST)) return FALSE; if (secondary_codecs) *secondary_codecs = g_value_get_boxed (value); return TRUE; } /** * fs_session_parse_codecs_changed: * @session: a #FsSession to match against the message * @message: a #GstMessage to parse * * Parses a "farstream-codecs-changed" message and checks if it matches * the @session parameters. * * Returns: %TRUE if the message matches the session and is valid. */ gboolean fs_session_parse_codecs_changed (FsSession *session, GstMessage *message) { g_return_val_if_fail (session != NULL, FALSE); return check_message (message, session, "farstream-codecs-changed"); } /** * fs_session_parse_telephony_event_started: * @session: a #FsSession to match against the message * @message: a #GstMessage to parse * @method: (out): Returns the #FsDTMFMethod in the message if not %NULL. * @event: (out): Returns the #FsDTMFEvent in the message if not %NULL. * @volume: (out): Returns the volume in the message if not %NULL. * * Parses a "farstream-telephony-event-started" message and checks if it matches * the @session parameters. * * Returns: %TRUE if the message matches the session and is valid. */ gboolean fs_session_parse_telephony_event_started (FsSession *session, GstMessage *message, FsDTMFMethod *method, FsDTMFEvent *event, guint8 *volume) { const GstStructure *s; const GValue *value; g_return_val_if_fail (session != NULL, FALSE); if (!check_message (message, session, "farstream-telephony-event-started")) return FALSE; s = gst_message_get_structure (message); if (!gst_structure_has_field_typed (s, "method", FS_TYPE_DTMF_METHOD)) return FALSE; if (method) gst_structure_get_enum (s, "method", FS_TYPE_DTMF_METHOD, (gint*) method); if (!gst_structure_has_field_typed (s, "event", FS_TYPE_DTMF_EVENT)) return FALSE; if (event) gst_structure_get_enum (s, "event", FS_TYPE_DTMF_EVENT, (gint*) event); value = gst_structure_get_value (s, "volume"); if (!value || !G_VALUE_HOLDS (value, G_TYPE_UCHAR)) return FALSE; if (volume) *volume = g_value_get_uchar (value); return TRUE; } /** * fs_session_parse_telephony_event_stopped: * @session: a #FsSession to match against the message * @message: a #GstMessage to parse * @method: (out): Returns the #FsDTMFMethod in the message if not %NULL. * * Parses a "farstream-telephony-event-stopped" message and checks if it matches * the @session parameters. * * Returns: %TRUE if the message matches the session and is valid. */ gboolean fs_session_parse_telephony_event_stopped (FsSession *session, GstMessage *message, FsDTMFMethod *method) { const GstStructure *s; g_return_val_if_fail (session != NULL, FALSE); if (!check_message (message, session, "farstream-telephony-event-stopped")) return FALSE; s = gst_message_get_structure (message); if (!gst_structure_has_field_typed (s, "method", FS_TYPE_DTMF_METHOD)) return FALSE; if (method) gst_structure_get_enum (s, "method", FS_TYPE_DTMF_METHOD, (gint*) method); return TRUE; } /** * fs_session_set_allowed_caps: * @session: a #FsSession * @sink_caps: (allow-none): Caps for the sink pad or %NULL * @src_caps: (allow-none): Caps for the src pad or %NULL * @error: the location where a #GError can be stored or %NULL * * Sets the allowed caps for the sink and source pads for this #FsSession. * Only codecs that can take the input specified by the @sink_caps and * can produce output as specified by the @src_caps will be produced * in the #FsSession:codecs property and so only those will be negotiated. * * If %NULL is passed to either @src_caps or @sink_caps, it is not changed. * * The default is "video/x-raw" for a video stream, "audio/x-raw" for an audio * stream and "ANY" for an application stream. * * The values can be retrived using the #FsSession:allowed-src-caps and * #FsSession:allowed-sink-caps properties. * * Returns: %TRUE if the new filter caps were acceptable. * * Since: UNRELEASED */ gboolean fs_session_set_allowed_caps (FsSession *session, GstCaps *sink_caps, GstCaps *src_caps, GError **error) { FsSessionClass *klass; g_return_val_if_fail (FS_IS_SESSION (session), FALSE); if (sink_caps == NULL && src_caps == NULL) return TRUE; klass = FS_SESSION_GET_CLASS (session); if (klass->set_allowed_caps) return klass->set_allowed_caps (session, sink_caps, src_caps, error); g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "set_allowed_caps is not implemented"); return FALSE; } farstream-0.2.7/farstream/fs-codec.h0000664000076400007640000001422212461773672014277 00000000000000/* * Farstream - Farstream Codec * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * Copyright 2005 Collabora Ltd. * @author: Rob Taylor * * fs-codec.h - A Farstream codec * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_CODEC_H__ #define __FS_CODEC_H__ #include G_BEGIN_DECLS typedef struct _FsCodec FsCodec; typedef struct _FsCodecParameter FsCodecParameter; typedef struct _FsFeedbackParameter FsFeedbackParameter; #define FS_TYPE_CODEC \ (fs_codec_get_type ()) #define FS_TYPE_CODEC_LIST \ (fs_codec_list_get_type ()) /** * FsMediaType: * @FS_MEDIA_TYPE_AUDIO: A media type that encodes audio. * @FS_MEDIA_TYPE_VIDEO: A media type that encodes video. * @FS_MEDIA_TYPE_APPLICATION: A media type for application data. * @FS_MEDIA_TYPE_LAST: Largest valid #FsMediaType * * Enum used to signify the media type of a codec or stream. */ typedef enum { FS_MEDIA_TYPE_AUDIO, FS_MEDIA_TYPE_VIDEO, FS_MEDIA_TYPE_APPLICATION, FS_MEDIA_TYPE_LAST = FS_MEDIA_TYPE_APPLICATION } FsMediaType; /** * FS_CODEC_ID_ANY: * * If the id of a #FsCodec is #FS_CODEC_ID_ANY, then it will be replaced * with a dynamic payload type at runtime */ /** * FS_CODEC_ID_DISABLE: * * If the id of a #FsCodec is #FS_CODEC_ID_DISABLE, then this codec will * not be used */ #define FS_CODEC_ID_ANY (-1) #define FS_CODEC_ID_DISABLE (-2) /** * FsCodec: * @id: numeric identifier for encoding, eg. PT for SDP * @encoding_name: the name of the codec * @media_type: type of media this codec is for * @clock_rate: clock rate of this stream * @channels: Number of channels codec should decode * @optional_params: (element-type FsCodecParameter): key pairs of param name to param data * @minimum_reporting_interval: The minimum interval between two RTCP reports, * If it is not specified (G_MAXUINT), it is up to the protocol to decide * (it is 5 seconds for RTP). * @feedback_params: (element-type FsFeedbackParameter): key triplets of * feedbck param type, subtype and extra string that is supported for this codec * * This structure reprensents one codec that can be offered or received */ struct _FsCodec { gint id; char *encoding_name; FsMediaType media_type; guint clock_rate; guint channels; guint minimum_reporting_interval; GList *optional_params; GList *feedback_params; }; /** * FsCodecParameter: * @name: paramter name. * @value: parameter value. * * Used to store arbitary parameters for a codec */ struct _FsCodecParameter { gchar *name; gchar *value; }; /** * FsFeedbackParameter: * @type: the type of feedback, like "ack", "name", "ccm" * @subtype: the subtype of feedback (can be an empty string) * @extra_params: a string containing extra parameters (can be empty) * * Use to store feedback parameters */ struct _FsFeedbackParameter { gchar *type; gchar *subtype; gchar *extra_params; }; /** * FS_CODEC_FORMAT: * * A format that can be used in printf like format strings to format a FsCodec */ /** * FS_CODEC_ARGS: * @codec: a #FsCodec * * Formats the codec in args for FS_CODEC_FORMAT */ #define FS_CODEC_FORMAT "%d: %s %s clock:%d channels:%d params:%p" #define FS_CODEC_ARGS(codec) \ (codec)->id, \ fs_media_type_to_string ((codec)->media_type), \ (codec)->encoding_name, \ (codec)->clock_rate, \ (codec)->channels, \ (codec)->optional_params GType fs_codec_get_type (void); GType fs_codec_list_get_type (void); FsCodec *fs_codec_new (int id, const char *encoding_name, FsMediaType media_type, guint clock_rate); void fs_codec_destroy (FsCodec * codec); FsCodec *fs_codec_copy (const FsCodec * codec); void fs_codec_list_destroy (GList *codec_list); GList *fs_codec_list_copy (const GList *codec_list); GList *fs_codec_list_from_keyfile (const gchar *filename, GError **error); gchar *fs_codec_to_string (const FsCodec *codec); const gchar *fs_media_type_to_string (FsMediaType media_type); gboolean fs_codec_are_equal (const FsCodec *codec1, const FsCodec *codec2); gboolean fs_codec_list_are_equal (GList *list1, GList *list2); void fs_codec_add_optional_parameter (FsCodec *codec, const gchar *name, const gchar *value); void fs_codec_remove_optional_parameter (FsCodec *codec, FsCodecParameter *param); FsCodecParameter *fs_codec_get_optional_parameter (FsCodec *codec, const gchar *name, const gchar *value); #define FS_TYPE_CODEC_PARAMETER (fs_codec_parameter_get_type ()) GType fs_codec_parameter_get_type (void); FsCodecParameter *fs_codec_parameter_copy (const FsCodecParameter *param); void fs_codec_parameter_free (FsCodecParameter *param); void fs_codec_add_feedback_parameter (FsCodec *codec, const gchar *type, const gchar *subtype, const gchar *extra_params); FsFeedbackParameter *fs_codec_get_feedback_parameter (FsCodec *codec, const gchar *type, const gchar *subtype, const gchar *extra_params); void fs_codec_remove_feedback_parameter (FsCodec *codec, GList *item); #define FS_TYPE_FEEDBACK_PARAMETER (fs_feedback_parameter_get_type ()) GType fs_feedback_parameter_get_type (void); FsFeedbackParameter *fs_feedback_parameter_copy ( const FsFeedbackParameter *param); void fs_feedback_parameter_free (FsFeedbackParameter *param); G_END_DECLS #endif /* __FS_CODEC_H__ */ farstream-0.2.7/farstream/fs-candidate.h0000664000076400007640000001173712461776030015135 00000000000000/* * Farstream - Farstream Candidate * * Copyright 2007 Collabora Ltd. * @author: Philippe Kalaf * Copyright 2007 Nokia Corp. * * fs-candidate.h - A Farstream candidate * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_CANDIDATE_H__ #define __FS_CANDIDATE_H__ #include #include G_BEGIN_DECLS #define FS_TYPE_CANDIDATE \ (fs_candidate_get_type ()) #define FS_TYPE_CANDIDATE_LIST \ (fs_candidate_list_get_type ()) /** * FsCandidateType: * @FS_CANDIDATE_TYPE_HOST: A host candidate (local) * @FS_CANDIDATE_TYPE_SRFLX: A server reflexive candidate. * @FS_CANDIDATE_TYPE_PRFLX: A peer reflexive candidate * @FS_CANDIDATE_TYPE_RELAY: An relay candidate * @FS_CANDIDATE_TYPE_MULTICAST: A multicast address * * An enum for the type of candidate used/reported */ typedef enum { FS_CANDIDATE_TYPE_HOST, FS_CANDIDATE_TYPE_SRFLX, FS_CANDIDATE_TYPE_PRFLX, FS_CANDIDATE_TYPE_RELAY, /* An external stream relay */ FS_CANDIDATE_TYPE_MULTICAST } FsCandidateType; /** * FsNetworkProtocol: * @FS_NETWORK_PROTOCOL_UDP: A UDP based protocol * @FS_NETWORK_PROTOCOL_TCP: A TCP based protocol, will listen for * incoming connections * @FS_NETWORK_PROTOCOL_TCP_PASSIVE: A TCP based protocol, will listen for * incoming connections * @FS_NETWORK_PROTOCOL_TCP_ACTIVE: A TCP based protocol, will attempt to * open an outbound connection * @FS_NETWORK_PROTOCOL_TCP_SO: A TCP based protocol, will listen for * incoming connections and attempt an outbound connection at the same time * as the peer (Simultanuous-Open) * * An enum for the base IP protocol */ typedef enum { FS_NETWORK_PROTOCOL_UDP, FS_NETWORK_PROTOCOL_TCP, FS_NETWORK_PROTOCOL_TCP_PASSIVE = FS_NETWORK_PROTOCOL_TCP, FS_NETWORK_PROTOCOL_TCP_ACTIVE, FS_NETWORK_PROTOCOL_TCP_SO, } FsNetworkProtocol; /** * FsComponentType: * @FS_COMPONENT_NONE: Use this when specifying a component is innapropriate * @FS_COMPONENT_RTP: This component is for RTP data * @FS_COMPONENT_RTCP: This component is for RTCP control * * This enum contains the component IDs defined in ICE-19 */ typedef enum { FS_COMPONENT_NONE = 0, FS_COMPONENT_RTP = 1, FS_COMPONENT_RTCP = 2 } FsComponentType; typedef struct _FsCandidate FsCandidate; /** * FsCandidate: * @foundation: a string representing the foundation of this candidate (maximum 32 chars) * @component_id: value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP, #FsComponentType can be used here) * @ip: IP in dotted format * @port: Port to use * @base_ip: IP of base in dotted format as defined in ICE-19. * @base_port: Port of base as defined in ICE-19. * @proto: #FsNetworkProtocol for ip protocol to use as candidate * @priority: Value between 0 and (2^31 - 1) representing the priority * @type: The #FsCandidateType of the candidate * @username: Username to use to connect to client if necessary, * NULL otherwise * @password: Username to use to connect to client if necessary, * NULL otherwise * @ttl: The TTL used when sending Multicast packet (0 = auto) * * Struct to hold information about ICE-19 compliant candidates */ struct _FsCandidate { gchar *foundation; guint component_id; gchar *ip; guint16 port; gchar *base_ip; guint16 base_port; FsNetworkProtocol proto; guint32 priority; FsCandidateType type; gchar *username; gchar *password; guint ttl; }; GType fs_candidate_get_type (void); GType fs_candidate_list_get_type (void); void fs_candidate_destroy (FsCandidate *cand); FsCandidate *fs_candidate_copy (const FsCandidate *cand); void fs_candidate_list_destroy (GList *candidate_list); GList *fs_candidate_list_copy (const GList *candidate_list); FsCandidate *fs_candidate_new ( const gchar *foundation, guint component_id, FsCandidateType type, FsNetworkProtocol proto, const gchar *ip, guint port); FsCandidate *fs_candidate_new_full ( const gchar *foundation, guint component_id, const gchar *ip, guint16 port, const gchar *base_ip, guint16 base_port, FsNetworkProtocol proto, guint32 priority, FsCandidateType type, const gchar *username, const gchar *password, guint ttl); void fs_value_set_candidate_list (GValue *value, GList *candidates); G_END_DECLS #endif /* __FS_CANDIDATE_H__ */ farstream-0.2.7/farstream/fs-stream-transmitter.c0000664000076400007640000003240012401500475017037 00000000000000/* * Farstream - Farstream Stream Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-stream-transmitter.c - A Farstream Stream Transmitter gobject * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-stream-transmitter * @short_description: A stream transmitter object used to convey per-stream * information to a transmitter. * * This object is the base implementation of a Farstream Stream Transmitter. * It needs to be derived and implement by a Farstream transmitter. * A Farstream Stream transmitter is used to convery per-stream information * to a transmitter, this is mostly local and remote candidates * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-stream-transmitter.h" #include #include "fs-conference.h" #include "fs-private.h" #define GST_CAT_DEFAULT _fs_conference_debug /* Signals */ enum { ERROR_SIGNAL, NEW_LOCAL_CANDIDATE, NEW_ACTIVE_CANDIDATE_PAIR, LOCAL_CANDIDATES_PREPARED, KNOWN_SOURCE_PACKET_RECEIVED, STATE_CHANGED, LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_SENDING, PROP_PREFERRED_LOCAL_CANDIDATES, PROP_ASSOCIATE_ON_SOURCE }; struct _FsStreamTransmitterPrivate { gboolean disposed; }; G_DEFINE_ABSTRACT_TYPE(FsStreamTransmitter, fs_stream_transmitter, G_TYPE_OBJECT); #define FS_STREAM_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_STREAM_TRANSMITTER, \ FsStreamTransmitterPrivate)) static void fs_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static guint signals[LAST_SIGNAL] = { 0 }; static void fs_stream_transmitter_class_init (FsStreamTransmitterClass *klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; gobject_class->set_property = fs_stream_transmitter_set_property; gobject_class->get_property = fs_stream_transmitter_get_property; /** * FsStreamTransmitter:sending: * * A network source #GstElement to be used by the #FsSession * */ g_object_class_install_property (gobject_class, PROP_SENDING, g_param_spec_boolean ("sending", "Whether to send from this transmitter", "If set to FALSE, the transmitter will stop sending to this person", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsStreamTransmitter:preferred-local-candidate: * * The list of preferred local candidates for this stream * It is a #GList of #FsCandidates * */ g_object_class_install_property (gobject_class, PROP_PREFERRED_LOCAL_CANDIDATES, g_param_spec_boxed ("preferred-local-candidates", "The preferred candidates", "A GList of FsCandidates", FS_TYPE_CANDIDATE_LIST, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsStreamTransmitter:associate-on-source: * * This tells the stream transmitter to associate incoming data with this * based on the source without looking at the content if possible. * */ g_object_class_install_property (gobject_class, PROP_ASSOCIATE_ON_SOURCE, g_param_spec_boolean ("associate-on-source", "Associate incoming data based on the source address", "Whether to associate incoming data stream based on the source address", TRUE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * FsStreamTransmitter::error: * @self: #FsStreamTransmitter that emitted the signal * @errorno: The number of the error * @error_msg: Error message (for the programmer) * * This signal is emitted in any error condition * */ signals[ERROR_SIGNAL] = g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, FS_TYPE_ERROR, G_TYPE_STRING); /** * FsStreamTransmitter::new-active-candidate-pair: * @self: #FsStreamTransmitter that emitted the signal * @local_candidate: #FsCandidate of the local candidate being used * @remote_candidate: #FsCandidate of the remote candidate being used * * This signal is emitted when there is a new active chandidate pair that has * been established. This is specially useful for ICE where the active * candidate pair can change automatically due to network conditions. The user * must not modify the candidates and must copy them if he wants to use them * outside the callback scope. * */ signals[NEW_ACTIVE_CANDIDATE_PAIR] = g_signal_new ("new-active-candidate-pair", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, FS_TYPE_CANDIDATE, FS_TYPE_CANDIDATE); /** * FsStreamTransmitter::new-local-candidate: * @self: #FsStream that emitted the signal * @local_candidate: #FsCandidate of the local candidate * * This signal is emitted when a new local candidate is discovered. * */ signals[NEW_LOCAL_CANDIDATE] = g_signal_new ("new-local-candidate", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, FS_TYPE_CANDIDATE); /** * FsStreamTransmitter::local-candidates-prepared: * @self: #FsStreamTransmitter that emitted the signal * * This signal is emitted when all local candidates have been * prepared, an ICE implementation would send its SDP offer or answer. * */ signals[LOCAL_CANDIDATES_PREPARED] = g_signal_new ("local-candidates-prepared", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * FsStreamTransmitter::known-source-packet-received: * @self: #FsStreamTransmitter that emitted the signal * @component: The Component on which this buffer was received * @buffer: the #GstBuffer coming from the known source * * This signal is emitted when a buffer coming from a confirmed known source * is received. */ signals[KNOWN_SOURCE_PACKET_RECEIVED] = g_signal_new ("known-source-packet-received", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER); /** * FsStreamTransmitter::state-changed: * @self: #FsStreamTransmitter that emitted the signal * @component: the id of the component which state has changed * @state: the new state of the component * * This signal is emitted when the ICE state (or equivalent) of the component * changes */ signals[STATE_CHANGED] = g_signal_new ("state-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, FS_TYPE_STREAM_STATE); g_type_class_add_private (klass, sizeof (FsStreamTransmitterPrivate)); } static void fs_stream_transmitter_init (FsStreamTransmitter *self) { /* member init */ self->priv = FS_STREAM_TRANSMITTER_GET_PRIVATE (self); self->priv->disposed = FALSE; } static void fs_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { GST_WARNING ("Subclass %s of FsStreamTransmitter does not override the %s" " property getter", G_OBJECT_TYPE_NAME(object), g_param_spec_get_name (pspec)); } static void fs_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { switch (prop_id) { /* These properties, we can safely not override */ case PROP_ASSOCIATE_ON_SOURCE: break; default: GST_WARNING ("Subclass %s of FsStreamTransmitter does not override the %s" " property setter", G_OBJECT_TYPE_NAME(object), g_param_spec_get_name (pspec)); break; } } /** * fs_stream_transmitter_add_remote_candidates: * @streamtransmitter: a #FsStreamTranmitter * @candidates: (element-type FsCandidate): a #GList of the remote candidates * @error: location of a #GError, or NULL if no error occured * * This function is used to add remote candidates to the transmitter * * Returns: TRUE of the candidate could be added, FALSE if it couldnt * (and the #GError will be set) */ gboolean fs_stream_transmitter_add_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error) { FsStreamTransmitterClass *klass; g_return_val_if_fail (streamtransmitter, FALSE); g_return_val_if_fail (FS_IS_STREAM_TRANSMITTER (streamtransmitter), FALSE); klass = FS_STREAM_TRANSMITTER_GET_CLASS (streamtransmitter); if (klass->add_remote_candidates) { return klass->add_remote_candidates (streamtransmitter, candidates, error); } else { g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "add_remote_candidate not defined in stream transmitter class"); } return FALSE; } /** * fs_stream_transmitter_force_remote_candidates: * @streamtransmitter: a #FsStreamTransmitter * @remote_candidates: (element-type FsCandidate): a #GList of #FsCandidate to * force * @error: location of a #GError, or NULL if no error occured * * This function forces data to be sent immediately to the selected remote * candidate, by-passing any connectivity checks. There should be at most * one candidate per component. * * Returns: %TRUE if the candidates could be forced, %FALSE otherwise */ gboolean fs_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *remote_candidates, GError **error) { FsStreamTransmitterClass *klass; g_return_val_if_fail (streamtransmitter, FALSE); g_return_val_if_fail (FS_IS_STREAM_TRANSMITTER (streamtransmitter), FALSE); klass = FS_STREAM_TRANSMITTER_GET_CLASS (streamtransmitter); if (klass->force_remote_candidates) { return klass->force_remote_candidates (streamtransmitter, remote_candidates, error); } else { g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "force_remote_candidates not defined in stream transmitter class"); } return FALSE; } /** * fs_stream_transmitter_gather_local_candidates: * @streamtransmitter: a #FsStreamTransmitter * @error: location of a #GErrorh, or NULL if no error occured * * This function tells the transmitter to start gathering local candidates, * signals for new candidates and newly active candidates can be emitted * during the call to this function. * * Returns: %TRUE if it succeeds (or is not implemented), %FALSE otherwise */ gboolean fs_stream_transmitter_gather_local_candidates ( FsStreamTransmitter *streamtransmitter, GError **error) { FsStreamTransmitterClass *klass; g_return_val_if_fail (streamtransmitter, FALSE); g_return_val_if_fail (FS_IS_STREAM_TRANSMITTER (streamtransmitter), FALSE); klass = FS_STREAM_TRANSMITTER_GET_CLASS (streamtransmitter); if (klass->gather_local_candidates) return klass->gather_local_candidates (streamtransmitter, error); else return TRUE; } /** * fs_stream_transmitter_stop: * @streamtransmitter: a #FsStreamTransmitter * * This functions stops the #FsStreamTransmitter, it must be called before * the last reference is dropped. */ void fs_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter) { FsStreamTransmitterClass *klass; g_return_if_fail (streamtransmitter); g_return_if_fail (FS_IS_STREAM_TRANSMITTER (streamtransmitter)); klass = FS_STREAM_TRANSMITTER_GET_CLASS (streamtransmitter); if (klass->stop) klass->stop (streamtransmitter); } /** * fs_stream_transmitter_emit_error: * @streamtransmitter: #FsStreamTransmitter on which to emit the error signal * @error_no: The number of the error * @error_msg: Error message (for the programmer) * * This function emit the "error" signal on a #FsStreamTransmitter, it should * only be called by subclasses. */ void fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter, gint error_no, const gchar *error_msg) { g_signal_emit (streamtransmitter, signals[ERROR_SIGNAL], 0, error_no, error_msg); } farstream-0.2.7/COPYING0000664000076400007640000006350411710041457011502 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! farstream-0.2.7/test-driver0000755000076400007640000000761112160164560012641 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2012-06-27.10; # UTC # Copyright (C) 2011-2013 Free Software Foundation, Inc. # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then estatus=1 fi case $estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: farstream-0.2.7/common-modified/0000775000076400007640000000000012462323001013556 500000000000000farstream-0.2.7/common-modified/gtk-doc-plugins.mak0000664000076400007640000003250712401500475017213 00000000000000# This is an include file specifically tuned for building documentation # for GStreamer plug-ins # It has been further specialized to farstream plugins stuff help: @echo @echo "If you are a doc maintainer, run 'make update' to update" @echo "the documentation files maintained in git" @echo @echo Other useful make targets: @echo @echo check-inspected-versions: make sure the inspected plugin info @echo is up to date before a release @echo # update the stuff maintained by doc maintainers update: $(MAKE) scanobj-update $(MAKE) check-outdated-docs # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) # thomas: make docs parallel installable TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@FS_APIVERSION@ MAINTAINER_DOC_STAMPS = \ scanobj-build.stamp \ scanobj-trans-build.stamp EXTRA_DIST = \ $(MAINTAINER_DOC_STAMPS) \ $(srcdir)/inspect/*.xml \ $(SCANOBJ_FILES) \ $(content_files) \ $(extra_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_OVERRIDES) \ $(DOC_MODULE)-sections.txt # we don't add scanobj-build.stamp here since they are built manually by docs # maintainers and result is commited to git DOC_STAMPS = \ scan-build.stamp \ tmpl-build.stamp \ sgml-build.stamp \ html-build.stamp \ scan.stamp \ tmpl.stamp \ sgml.stamp \ html.stamp # files generated/updated by gtkdoc-scangobj SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals \ $(DOC_MODULE).types SCANOBJ_FILES_O = \ .libs/$(DOC_MODULE)-scan.o # files generated/updated by gtkdoc-scan SCAN_FILES = \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt \ $(DOC_MODULE)-decl.txt \ $(DOC_MODULE)-decl-list.txt REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES += \ $(SCANOBJ_FILES_O) \ $(REPORT_FILES) \ $(DOC_STAMPS) \ inspect-registry.xml INSPECT_DIR = inspect if ENABLE_GTK_DOC all-local: html-build.stamp ### inspect GStreamer plug-ins; done by documentation maintainer ### # only look at the plugins in this module when building inspect .xml stuff INSPECT_REGISTRY=$(top_builddir)/docs/plugins/inspect-registry.xml INSPECT_ENVIRONMENT=\ LC_ALL=C \ GST_PLUGIN_SYSTEM_PATH= \ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/plugins:$(top_builddir)/src:$(top_builddir)/gnl \ GST_REGISTRY=$(INSPECT_REGISTRY) \ PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" \ $(INSPECT_EXTRA_ENVIRONMENT) #### scan gobjects; done by documentation maintainer #### scanobj-update: -rm scanobj-build.stamp $(MAKE) scanobj-build.stamp # gstdoc-scanobj produces 5 output files (.new) # scangobj-merge.py merges them into the file which we commit later # TODO: also merge the hierarchy scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles) @echo " DOC Introspecting gobjects" @if test x"$(srcdir)" != x. ; then \ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ do \ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ done; \ fi; \ mkdir -p $(INSPECT_DIR); \ scanobj_options=""; \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ $(INSPECT_ENVIRONMENT) \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ $(GST_DOC_SCANOBJ) $$scanobj_options --type-init-func="gst_init(NULL,NULL)" \ --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir=$(INSPECT_DIR) && \ echo " DOC Merging introspection data" && \ $(PYTHON) \ $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \ if test x"$(srcdir)" != x. ; then \ for f in $(SCANOBJ_FILES); \ do \ cmp -s ./$$f $(srcdir)/$$f || cp ./$$f $(srcdir)/ ; \ done; \ fi; \ touch scanobj-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(SCANOBJ_FILES_O): scan-build.stamp @true ### scan headers; done on every build ### scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp @echo ' DOC Scanning header files' @if test x"$(srcdir)" != x. ; then \ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ do \ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ done; \ fi @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan \ $(SCAN_OPTIONS) $(EXTRA_HFILES) \ --module=$(DOC_MODULE) \ $${_source_dir} \ --ignore-headers="$(IGNORE_HFILES)"; \ touch scan-build.stamp #### update templates; done on every build #### ### FIXME: make this error out again when docs are fixed for 0.9 # in a non-srcdir build, we need to copy files from the previous step # and the files from previous runs of this step tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) @echo ' DOC Rebuilding template files' @if test x"$(srcdir)" != x. ; then \ for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ do \ if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \ done; \ fi @gtkdoc-mktmpl --module=$(DOC_MODULE) @$(PYTHON) \ $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true #### xml #### ### FIXME: make this error out again when docs are fixed for 0.9 sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files) @echo ' DOC Building XML' @-mkdir -p xml @for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \ xsltproc --stringparam module $(MODULE) \ $(top_srcdir)/common/plugins.xsl $$a > xml/`basename $$a`; done @for f in $(EXAMPLE_CFILES); do \ $(PYTHON) $(top_srcdir)/common/c-to-xml.py $$f > xml/element-`basename $$f .c`.xml; done @gtkdoc-mkdb \ --module=$(DOC_MODULE) \ --source-dir=$(DOC_SOURCE_DIR) \ --expand-content-files="$(expand_content_files)" \ --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) \ --output-format=xml \ --ignore-files="$(IGNORE_HFILES) $(IGNORE_CFILES)" \ $(MKDB_OPTIONS) @cp ../version.entities xml @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building HTML' @rm -rf html @mkdir html @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html @for f in $(content_files); do cp $(srcdir)/$$f html; done @cp -pr xml html @cp ../version.entities html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) @mv html/index.sgml html/index.sgml.bak @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_API_VERSION@\//g" html/index.sgml.bak >html/index.sgml @rm -f html/index.sgml.bak @rm -f html/$(DOC_MAIN_SGML_FILE) @rm -rf html/xml @rm -f html/version.entities @test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \ if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done @echo ' DOC Fixing cross-references' @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp clean-local-gtkdoc: @rm -rf xml tmpl html # clean files copied for nonsrcdir templates build @if test x"$(srcdir)" != x. ; then \ rm -rf $(SCANOBJ_FILES) $(SCAN_FILES) $(REPORT_FILES) \ $(MAINTAINER_DOC_STAMPS); \ fi else all-local: clean-local-gtkdoc: endif clean-local: clean-local-gtkdoc rm -f *~ *.bak rm -rf .libs distclean-local: @rm -f $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @rm -rf tmpl/*.sgml.bak @rm -f $(DOC_MODULE).hierarchy @rm -f *.stamp || true @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(DOC_MODULE)-docs.sgml ; \ rm -f $(DOC_MODULE).types ; \ rm -f $(DOC_MODULE).interfaces ; \ rm -f $(DOC_MODULE)-overrides.txt ; \ rm -f $(DOC_MODULE).prerequisites ; \ rm -f $(DOC_MODULE)-sections.txt ; \ rm -rf tmpl/*.sgml ; \ rm -rf $(INSPECT_DIR); \ fi @rm -rf *.o MAINTAINERCLEANFILES = $(MAINTAINER_DOC_STAMPS) # thomas: make docs parallel installable; devhelp requires majorminor too install-data-local: (installfiles=`echo $(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css`; \ if test "$$installfiles" = '$(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css'; \ then echo '-- Nothing to install' ; \ else \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ pngfiles=`echo ./html/*.png`; \ if test "$$pngfiles" != './html/*.png'; then \ for i in $$pngfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ fi; \ echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \ if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \ $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \ $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@FS_APIVERSION@.devhelp2; \ fi; \ (which gtkdoc-rebase >/dev/null && \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \ fi) uninstall-local: if test -d $(DESTDIR)$(TARGET_DIR); then \ rm -rf $(DESTDIR)$(TARGET_DIR)/*; \ rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \ else \ echo '-- Nothing to uninstall' ; \ fi; # # Checks # if ENABLE_GTK_DOC check-hierarchy: $(DOC_MODULE).hierarchy @if grep ' ' $(DOC_MODULE).hierarchy; then \ echo "$(DOC_MODULE).hierarchy contains tabs, please fix"; \ /bin/false; \ fi check: check-hierarchy endif # wildcard is apparently not portable to other makes, hence the use of find inspect_files = $(shell find $(srcdir)/$(INSPECT_DIR) -name '*.xml') check-inspected-versions: @echo Checking plugin versions of inspected plugin data ...; \ fail=0 ; \ for each in $(inspect_files) ; do \ if (grep -H '' $$each | grep -v '$(VERSION)'); then \ echo $$each should be fixed to say version $(VERSION) or be removed ; \ echo "sed -i -e 's//$(VERSION)<\/version>/'" $$each; \ echo ; \ fail=1; \ fi ; \ done ; \ exit $$fail scanobj-trans-update: -rm scanobj-trans-build.stamp $(MAKE) scanobj-trans-build.stamp # We have a scanobj-build.stamp just to prevent both from running at the same # time as they use temp files with the same name scanobj-trans-build.stamp: $(SCANOBJ_DEPS) $(basefiles) scanobj-build.stamp farstream-transmitters.types @echo '*** Scanning Transmitters ***' if test x"$(srcdir)" = x. ; then \ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/ext \ GST_REGISTRY=$(INSPECT_REGISTRY) \ FS_PLUGIN_PATH="$(FS_PLUGIN_PATH)" \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ $(srcdir)/gtkdoc-scangobj-transmitters \ --type-init-func="gst_init(NULL,NULL)" \ --types=farstream-transmitters.types \ --module=$(DOC_MODULE) && \ $(PYTHON) \ $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \ fi touch scanobj-trans-build.stamp check-outdated-docs: $(AM_V_GEN)echo Checking for outdated plugin inspect data ...; \ fail=0 ; \ if [ -d $(top_srcdir)/.git/ ]; then \ files=`find $(srcdir)/inspect/ -name '*xml'`; \ for f in $$files; do \ ver=`grep '$(PACKAGE_VERSION)' $$f`; \ if test "x$$ver" = "x"; then \ plugin=`echo $$f | sed -e 's/^.*plugin-//' -e 's/.xml//'`; \ # echo "Checking $$plugin $$f"; \ pushd "$(top_srcdir)" >/dev/null; \ pinit=`git grep -A3 GST_PLUGIN_DEFINE -- ext/ gst/ sys/ | grep "\"$$plugin\""`; \ popd >/dev/null; \ # echo "[$$pinit]"; \ if test "x$$pinit" = "x"; then \ printf " **** outdated docs for plugin %-15s: %s\n" $$plugin $$f; \ fail=1; \ fi; \ fi; \ done; \ fi ; \ exit $$fail # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif # FIXME: decide whether we want to dist generated html or not # also this only works, if the project has been build before # we could dist html only if its there, but that might lead to missing html in # tarballs dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/html cp html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs check-outdated-docs inspect # avoid spurious build errors when distchecking with -jN .NOTPARALLEL: farstream-0.2.7/common-modified/gtk-doc.mak0000664000076400007640000001657112401500475015537 00000000000000########################################################################### # Everything below here is generic and you shouldn't need to change it. ########################################################################### # thomas: except of course that we did # thomas: copied from glib-2 # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) # thomas: make docs parallel installable TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@FS_APIVERSION@ EXTRA_DIST = \ $(content_files) \ $(extra_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE).types \ $(DOC_OVERRIDES) \ $(DOC_MODULE)-sections.txt DOC_STAMPS = \ setup-build.stamp \ scan-build.stamp \ sgml-build.stamp \ html-build.stamp \ sgml.stamp \ html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals \ .libs/$(DOC_MODULE)-scan.o REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) doc-registry.xml if ENABLE_GTK_DOC all-local: html-build.stamp #### setup #### setup-build.stamp: $(content_files) -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ echo ' DOC Preparing build'; \ files=`echo $(DOC_MAIN_SGML_FILE) $(DOC_OVERRIDES) $(DOC_MODULE)-sections.txt $(DOC_MODULE).types $(content_files)`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ test -f $(abs_srcdir)/$$file && \ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ done; \ fi; \ fi @touch setup-build.stamp #### scan #### # in the case of non-srcdir builds, the built gst directory gets added # to gtk-doc scanning; but only then, to avoid duplicates scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo ' DOC Scanning header files' @_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan \ $(SCAN_OPTIONS) $(EXTRA_HFILES) \ --module=$(DOC_MODULE) \ $${_source_dir} \ --ignore-headers="$(IGNORE_HFILES)" @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; then \ echo " DOC Introspecting gobjects"; \ GST_PLUGIN_SYSTEM_PATH=`cd $(top_builddir) && pwd` \ GST_PLUGIN_PATH= \ GST_REGISTRY=doc-registry.xml \ $(GTKDOC_EXTRA_ENVIRONMENT) \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \ CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj --type-init-func="gst_init(NULL,NULL)" \ --module=$(DOC_MODULE) ; \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### xml #### sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files) @echo ' DOC Building XML' @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) @cp ../version.entities xml @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo ' DOC Building HTML' @rm -rf html @mkdir html @cp -pr xml html @cp ../version.entities ./ @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ @gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options=--path="$(abs_srcdir)"; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @mv html/index.sgml html/index.sgml.bak @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_API_VERSION@\//g" html/index.sgml.bak >html/index.sgml @rm -f html/index.sgml.bak @rm -rf html/xml @rm -f version.entities @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html ) @echo ' DOC Fixing cross-references' @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp clean-local-gtkdoc: @rm -rf xml tmpl html # clean files copied for nonsrcdir templates build @if test x"$(srcdir)" != x. ; then \ rm -rf $(DOC_MODULE).types; \ fi else all-local: clean-local-gtkdoc: endif clean-local: clean-local-gtkdoc @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -f $(REPORT_FILES) \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @rm -rf tmpl/*.sgml.bak @rm -f $(DOC_MODULE).hierarchy @rm -f *.stamp || true @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(DOC_MAIN_SGML_FILE) ; \ rm -f $(DOC_OVERRIDES) ; \ rm -f $(DOC_MODULE).types ; \ rm -f $(DOC_MODULE).interfaces ; \ rm -f $(DOC_MODULE).prerequisites ; \ rm -f $(DOC_MODULE)-sections.txt ; \ rm -f $(content_files) ; \ rm -rf tmpl/*.sgml ; \ fi @rm -rf *.o maintainer-clean-local: clean @cd $(srcdir) && rm -rf html \ xml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt # thomas: make docs parallel installable; devhelp requires majorminor too install-data-local: (installfiles=`echo $(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css`; \ if test "$$installfiles" = '$(builddir)/html/*.sgml $(builddir)/html/*.html $(builddir)/html/*.png $(builddir)/html/*.css'; \ then echo '-- Nothing to install' ; \ else \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \ if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \ $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \ $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@FS_APIVERSION@.devhelp2; \ fi; \ (which gtkdoc-rebase >/dev/null && \ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \ fi) uninstall-local: if test -d $(DESTDIR)$(TARGET_DIR); then \ rm -rf $(DESTDIR)$(TARGET_DIR)/*; \ rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \ else \ echo '-- Nothing to uninstall' ; \ fi; # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/html cp html/* $(distdir)/html -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ cd $(distdir) && rm -f $(DISTCLEANFILES) -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs # avoid spurious build errors when distchecking with -jN .NOTPARALLEL: farstream-0.2.7/common-modified/Makefile.in0000664000076400007640000003710212462321045015554 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = common-modified DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ gtk-doc-plugins.mak \ gst-glib-gen.mak 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 common-modified/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common-modified/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 tags TAGS: ctags CTAGS: cscope cscopelist: 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 installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-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: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am 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-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 \ tags-am uninstall uninstall-am # 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: farstream-0.2.7/common-modified/Makefile.am0000664000076400007640000000007011710041457015536 00000000000000EXTRA_DIST = \ gtk-doc-plugins.mak \ gst-glib-gen.mak farstream-0.2.7/common-modified/gst-glib-gen.mak0000664000076400007640000000350012401500475016452 00000000000000# these are the variables your Makefile.am should set # the example is based on the colorbalance interface #glib_enum_headers=$(colorbalance_headers) #glib_enum_define=GST_COLOR_BALANCE #glib_gen_prefix=gst_color_balance #glib_gen_basename=colorbalance enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") # these are all the rules generating the relevant files $(glib_gen_basename)-enumtypes.h: $(glib_enum_headers) $(AM_V_GEN)glib-mkenums \ --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "\n/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define FS_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \ $^ > $@ $(glib_gen_basename)-enumtypes.c: $(glib_enum_headers) @if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi $(AM_V_GEN)glib-mkenums \ --fhead "#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n" \ $^ > $@ # a hack rule to make sure .Plo files exist because they get include'd # from Makefile's .deps/%-enumtypes.Plo: @touch $@ farstream-0.2.7/transmitters/0000775000076400007640000000000012462323000013246 500000000000000farstream-0.2.7/transmitters/Makefile.in0000664000076400007640000005345512462321046015257 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = transmitters DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = $(FS_TRANSMITTER_PLUGINS_SELECTED) DIST_SUBDIRS = $(FS_TRANSMITTER_PLUGINS_ALL) all: all-recursive .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 transmitters/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu transmitters/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 # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ 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 installdirs: installdirs-recursive installdirs-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-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 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-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: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am 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-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-am uninstall uninstall-am # 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: farstream-0.2.7/transmitters/Makefile.am0000664000076400007640000000013311710041463015224 00000000000000 SUBDIRS = $(FS_TRANSMITTER_PLUGINS_SELECTED) DIST_SUBDIRS = $(FS_TRANSMITTER_PLUGINS_ALL) farstream-0.2.7/transmitters/shm/0000775000076400007640000000000012462323000014035 500000000000000farstream-0.2.7/transmitters/shm/fs-shm-transmitter.h0000664000076400007640000000714212032661146017712 00000000000000/* * Farstream - Farstream Shared Memory Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-shm-transmitter.h - A Farstream Shared Memory transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_SHM_TRANSMITTER_H__ #define __FS_SHM_TRANSMITTER_H__ #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_SHM_TRANSMITTER \ (fs_shm_transmitter_get_type ()) #define FS_SHM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_SHM_TRANSMITTER, \ FsShmTransmitter)) #define FS_SHM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_SHM_TRANSMITTER, \ FsShmTransmitterClass)) #define FS_IS_SHM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_SHM_TRANSMITTER)) #define FS_IS_SHM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_SHM_TRANSMITTER)) #define FS_SHM_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_SHM_TRANSMITTER, \ FsShmTransmitterClass)) #define FS_SHM_TRANSMITTER_CAST(obj) ((FsShmTransmitter *) (obj)) typedef struct _FsShmTransmitter FsShmTransmitter; typedef struct _FsShmTransmitterClass FsShmTransmitterClass; typedef struct _FsShmTransmitterPrivate FsShmTransmitterPrivate; /** * FsShmTransmitterClass: * @parent_class: Our parent * * The Shared Memory transmitter class */ struct _FsShmTransmitterClass { FsTransmitterClass parent_class; }; /** * FsShmTransmitter: * @parent: Parent object * * All members are private, access them using methods and properties */ struct _FsShmTransmitter { FsTransmitter parent; /* The number of components (READONLY) */ gint components; /*< private >*/ FsShmTransmitterPrivate *priv; }; GType fs_shm_transmitter_get_type (void); typedef struct _ShmSrc ShmSrc; typedef struct _ShmSink ShmSink; typedef void (*got_buffer) (GstBuffer *buffer, guint component, gpointer data); typedef void (*ready) (guint component, gchar *path, gpointer data); typedef void (*connection) (guint component, gint id, gpointer data); ShmSrc *fs_shm_transmitter_get_shm_src (FsShmTransmitter *self, guint component, const gchar *path, got_buffer got_buffer_func, connection disconnected_func, gpointer cb_data, GError **error); gboolean fs_shm_transmitter_check_shm_src (FsShmTransmitter *self, ShmSrc *shm, const gchar *path); ShmSink *fs_shm_transmitter_get_shm_sink (FsShmTransmitter *self, guint component, const gchar *path, ready ready_func, connection connected_fubnc, gpointer cb_data, GError **error); gboolean fs_shm_transmitter_check_shm_sink (FsShmTransmitter *self, ShmSink *shm, const gchar *path); void fs_shm_transmitter_sink_set_sending (FsShmTransmitter *self, ShmSink *shm, gboolean sending); G_END_DECLS #endif /* __FS_SHM_TRANSMITTER_H__ */ farstream-0.2.7/transmitters/shm/Makefile.in0000664000076400007640000006671612462321047016053 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = transmitters/shm DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libshm_transmitter_la_DEPENDENCIES = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libshm_transmitter_la_OBJECTS = \ libshm_transmitter_la-fs-shm-transmitter.lo \ libshm_transmitter_la-fs-shm-stream-transmitter.lo libshm_transmitter_la_OBJECTS = $(am_libshm_transmitter_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libshm_transmitter_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libshm_transmitter_la_CFLAGS) $(CFLAGS) \ $(libshm_transmitter_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libshm_transmitter_la_SOURCES) DIST_SOURCES = $(libshm_transmitter_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = $(FS_PLUGIN_PATH) prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = libshm-transmitter.la # sources used to compile this lib libshm_transmitter_la_SOURCES = \ fs-shm-transmitter.c \ fs-shm-stream-transmitter.c # flags used to compile this plugin libshm_transmitter_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) libshm_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS) libshm_transmitter_la_LIBADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(FS_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) noinst_HEADERS = \ fs-shm-transmitter.h \ fs-shm-stream-transmitter.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(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 transmitters/shm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu transmitters/shm/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-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ } uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libshm-transmitter.la: $(libshm_transmitter_la_OBJECTS) $(libshm_transmitter_la_DEPENDENCIES) $(EXTRA_libshm_transmitter_la_DEPENDENCIES) $(AM_V_CCLD)$(libshm_transmitter_la_LINK) -rpath $(plugindir) $(libshm_transmitter_la_OBJECTS) $(libshm_transmitter_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshm_transmitter_la-fs-shm-stream-transmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libshm_transmitter_la-fs-shm-transmitter.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libshm_transmitter_la-fs-shm-transmitter.lo: fs-shm-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshm_transmitter_la_CFLAGS) $(CFLAGS) -MT libshm_transmitter_la-fs-shm-transmitter.lo -MD -MP -MF $(DEPDIR)/libshm_transmitter_la-fs-shm-transmitter.Tpo -c -o libshm_transmitter_la-fs-shm-transmitter.lo `test -f 'fs-shm-transmitter.c' || echo '$(srcdir)/'`fs-shm-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshm_transmitter_la-fs-shm-transmitter.Tpo $(DEPDIR)/libshm_transmitter_la-fs-shm-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-shm-transmitter.c' object='libshm_transmitter_la-fs-shm-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshm_transmitter_la_CFLAGS) $(CFLAGS) -c -o libshm_transmitter_la-fs-shm-transmitter.lo `test -f 'fs-shm-transmitter.c' || echo '$(srcdir)/'`fs-shm-transmitter.c libshm_transmitter_la-fs-shm-stream-transmitter.lo: fs-shm-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshm_transmitter_la_CFLAGS) $(CFLAGS) -MT libshm_transmitter_la-fs-shm-stream-transmitter.lo -MD -MP -MF $(DEPDIR)/libshm_transmitter_la-fs-shm-stream-transmitter.Tpo -c -o libshm_transmitter_la-fs-shm-stream-transmitter.lo `test -f 'fs-shm-stream-transmitter.c' || echo '$(srcdir)/'`fs-shm-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libshm_transmitter_la-fs-shm-stream-transmitter.Tpo $(DEPDIR)/libshm_transmitter_la-fs-shm-stream-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-shm-stream-transmitter.c' object='libshm_transmitter_la-fs-shm-stream-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshm_transmitter_la_CFLAGS) $(CFLAGS) -c -o libshm_transmitter_la-fs-shm-stream-transmitter.lo `test -f 'fs-shm-stream-transmitter.c' || echo '$(srcdir)/'`fs-shm-stream-transmitter.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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)$(plugindir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-pluginLTLIBRARIES \ 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-pluginLTLIBRARIES 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-pluginLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pluginLTLIBRARIES 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 tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES # 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: farstream-0.2.7/transmitters/shm/Makefile.am0000664000076400007640000000115512401500475016021 00000000000000 plugindir = $(FS_PLUGIN_PATH) plugin_LTLIBRARIES = libshm-transmitter.la # sources used to compile this lib libshm_transmitter_la_SOURCES = \ fs-shm-transmitter.c \ fs-shm-stream-transmitter.c # flags used to compile this plugin libshm_transmitter_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) libshm_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS) libshm_transmitter_la_LIBADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(FS_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) noinst_HEADERS = \ fs-shm-transmitter.h \ fs-shm-stream-transmitter.h farstream-0.2.7/transmitters/shm/fs-shm-transmitter.c0000664000076400007640000005660612461773672017734 00000000000000/* * Farstream - Farstream Shm UDP Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-shm-transmitter.c - A Farstream shm UDP transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-shm-transmitter * @short_description: A transmitter for shm UDP * * This transmitter provides shm udp * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-shm-transmitter.h" #include "fs-shm-stream-transmitter.h" #include #include #include GST_DEBUG_CATEGORY (fs_shm_transmitter_debug); #define GST_CAT_DEFAULT fs_shm_transmitter_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_GST_SINK, PROP_GST_SRC, PROP_COMPONENTS, PROP_DO_TIMESTAMP, }; struct _FsShmTransmitterPrivate { /* We hold references to this element */ GstElement *gst_sink; GstElement *gst_src; /* We don't hold a reference to these elements, they are owned by the bins */ /* They are tables of pointers, one per component */ GstElement **funnels; GstElement **tees; gboolean do_timestamp; }; #define FS_SHM_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_SHM_TRANSMITTER, \ FsShmTransmitterPrivate)) static void fs_shm_transmitter_class_init ( FsShmTransmitterClass *klass); static void fs_shm_transmitter_init (FsShmTransmitter *self); static void fs_shm_transmitter_constructed (GObject *object); static void fs_shm_transmitter_dispose (GObject *object); static void fs_shm_transmitter_finalize (GObject *object); static void fs_shm_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_shm_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static FsStreamTransmitter *fs_shm_transmitter_new_stream_transmitter ( FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error); static GType fs_shm_transmitter_get_stream_transmitter_type ( FsTransmitter *transmitter); static GObjectClass *parent_class = NULL; //static guint signals[LAST_SIGNAL] = { 0 }; /* * Private bin subclass */ enum { BIN_SIGNAL_READY, BIN_SIGNAL_DISCONNECTED, BIN_LAST_SIGNAL }; static guint bin_signals[BIN_LAST_SIGNAL] = { 0 }; static GType shm_bin_type = 0; gpointer shm_bin_parent_class = NULL; typedef struct _FsShmBin { GstBin parent; } FsShmBin; typedef struct _FsShmBinClass { GstBinClass parent_class; } FsShmBinClass; static void fs_shm_bin_init (FsShmBin *self) { } static GstElement * fs_shm_bin_new (void) { return g_object_new (shm_bin_type, NULL); } static void fs_shm_bin_handle_message (GstBin *bin, GstMessage *message) { GstState old, new, pending; GError *gerror; gchar *msg; switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_STATE_CHANGED: gst_message_parse_state_changed (message, &old, &new, &pending); if (old == GST_STATE_PAUSED && new == GST_STATE_PLAYING) g_signal_emit (bin, bin_signals[BIN_SIGNAL_READY], 0, GST_MESSAGE_SRC (message)); break; case GST_MESSAGE_ERROR: gst_message_parse_error (message, &gerror, &msg); if (g_error_matches (gerror, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_READ)) { g_signal_emit (bin, bin_signals[BIN_SIGNAL_DISCONNECTED], 0, GST_MESSAGE_SRC (message)); gst_message_unref (message); return; } break; default: break; } GST_BIN_CLASS (shm_bin_parent_class)->handle_message (bin, message); } static void fs_shm_bin_class_init (FsShmBinClass *klass) { GstBinClass *bin_class = GST_BIN_CLASS (klass); shm_bin_parent_class = g_type_class_peek_parent (klass); bin_signals[BIN_SIGNAL_READY] = g_signal_new ("ready", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_ELEMENT); bin_signals[BIN_SIGNAL_DISCONNECTED] = g_signal_new ("disconnected", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_ELEMENT); bin_class->handle_message = GST_DEBUG_FUNCPTR (fs_shm_bin_handle_message); } /* * Lets register the plugin */ static GType type = 0; GType fs_shm_transmitter_get_type (void) { g_assert (type); return type; } static GType fs_shm_transmitter_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsShmTransmitterClass), NULL, NULL, (GClassInitFunc) fs_shm_transmitter_class_init, NULL, NULL, sizeof (FsShmTransmitter), 0, (GInstanceInitFunc) fs_shm_transmitter_init }; static const GTypeInfo bin_info = { sizeof (FsShmBinClass), NULL, NULL, (GClassInitFunc) fs_shm_bin_class_init, NULL, NULL, sizeof (FsShmBin), 0, (GInstanceInitFunc) fs_shm_bin_init }; GST_DEBUG_CATEGORY_INIT (fs_shm_transmitter_debug, "fsshmtransmitter", 0, "Farstream shm UDP transmitter"); fs_shm_stream_transmitter_register_type (module); type = g_type_module_register_type (G_TYPE_MODULE (module), FS_TYPE_TRANSMITTER, "FsShmTransmitter", &info, 0); shm_bin_type = g_type_module_register_type (G_TYPE_MODULE (module), GST_TYPE_BIN, "FsShmBin", &bin_info, 0); return type; } FS_INIT_PLUGIN (fs_shm_transmitter_register_type) static void fs_shm_transmitter_class_init (FsShmTransmitterClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; FsTransmitterClass *transmitter_class = FS_TRANSMITTER_CLASS (klass); parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_shm_transmitter_set_property; gobject_class->get_property = fs_shm_transmitter_get_property; gobject_class->constructed = fs_shm_transmitter_constructed; g_object_class_override_property (gobject_class, PROP_GST_SRC, "gst-src"); g_object_class_override_property (gobject_class, PROP_GST_SINK, "gst-sink"); g_object_class_override_property (gobject_class, PROP_COMPONENTS, "components"); g_object_class_override_property (gobject_class, PROP_DO_TIMESTAMP, "do-timestamp"); transmitter_class->new_stream_transmitter = fs_shm_transmitter_new_stream_transmitter; transmitter_class->get_stream_transmitter_type = fs_shm_transmitter_get_stream_transmitter_type; gobject_class->dispose = fs_shm_transmitter_dispose; gobject_class->finalize = fs_shm_transmitter_finalize; g_type_class_add_private (klass, sizeof (FsShmTransmitterPrivate)); } static void fs_shm_transmitter_init (FsShmTransmitter *self) { /* member init */ self->priv = FS_SHM_TRANSMITTER_GET_PRIVATE (self); self->components = 2; self->priv->do_timestamp = TRUE; } static void fs_shm_transmitter_constructed (GObject *object) { FsShmTransmitter *self = FS_SHM_TRANSMITTER_CAST (object); FsTransmitter *trans = FS_TRANSMITTER_CAST (self); GstPad *pad = NULL, *pad2 = NULL; GstPad *ghostpad = NULL; gchar *padname; GstPadLinkReturn ret; int c; /* component_id */ /* We waste one space in order to have the index be the component_id */ self->priv->funnels = g_new0 (GstElement *, self->components+1); self->priv->tees = g_new0 (GstElement *, self->components+1); /* First we need the src elemnet */ self->priv->gst_src = fs_shm_bin_new (); if (!self->priv->gst_src) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the transmitter src bin"); return; } gst_object_ref (self->priv->gst_src); /* Second, we do the sink element */ self->priv->gst_sink = fs_shm_bin_new (); if (!self->priv->gst_sink) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the transmitter sink bin"); return; } g_object_set (G_OBJECT (self->priv->gst_sink), "async-handling", TRUE, NULL); gst_object_ref (self->priv->gst_sink); for (c = 1; c <= self->components; c++) { GstElement *fakesink = NULL; /* Lets create the RTP source funnel */ self->priv->funnels[c] = gst_element_factory_make ("funnel", NULL); if (!self->priv->funnels[c]) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the funnel element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_src), self->priv->funnels[c])) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the funnel element to the transmitter src bin"); } pad = gst_element_get_static_pad (self->priv->funnels[c], "src"); padname = g_strdup_printf ("src_%u", c); ghostpad = gst_ghost_pad_new (padname, pad); g_free (padname); gst_object_unref (pad); gst_pad_set_active (ghostpad, TRUE); gst_element_add_pad (self->priv->gst_src, ghostpad); /* Lets create the RTP sink tee */ self->priv->tees[c] = gst_element_factory_make ("tee", NULL); if (!self->priv->tees[c]) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the tee element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_sink), self->priv->tees[c])) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the tee element to the transmitter sink bin"); } pad = gst_element_get_static_pad (self->priv->tees[c], "sink"); padname = g_strdup_printf ("sink_%u", c); ghostpad = gst_ghost_pad_new (padname, pad); g_free (padname); gst_object_unref (pad); gst_pad_set_active (ghostpad, TRUE); gst_element_add_pad (self->priv->gst_sink, ghostpad); fakesink = gst_element_factory_make ("fakesink", NULL); if (!fakesink) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the fakesink element"); return; } g_object_set (fakesink, "async", FALSE, "sync" , FALSE, NULL); if (!gst_bin_add (GST_BIN (self->priv->gst_sink), fakesink)) { gst_object_unref (fakesink); trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the fakesink element to the transmitter sink bin"); return; } pad = gst_element_get_request_pad (self->priv->tees[c], "src_%u"); pad2 = gst_element_get_static_pad (fakesink, "sink"); ret = gst_pad_link (pad, pad2); gst_object_unref (pad2); gst_object_unref (pad); if (GST_PAD_LINK_FAILED(ret)) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the tee to the fakesink"); return; } } GST_CALL_PARENT (G_OBJECT_CLASS, constructed, (object)); } static void fs_shm_transmitter_dispose (GObject *object) { FsShmTransmitter *self = FS_SHM_TRANSMITTER (object); if (self->priv->gst_src) { gst_object_unref (self->priv->gst_src); self->priv->gst_src = NULL; } if (self->priv->gst_sink) { gst_object_unref (self->priv->gst_sink); self->priv->gst_sink = NULL; } parent_class->dispose (object); } static void fs_shm_transmitter_finalize (GObject *object) { FsShmTransmitter *self = FS_SHM_TRANSMITTER (object); if (self->priv->funnels) { g_free (self->priv->funnels); self->priv->funnels = NULL; } if (self->priv->tees) { g_free (self->priv->tees); self->priv->tees = NULL; } parent_class->finalize (object); } static void fs_shm_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsShmTransmitter *self = FS_SHM_TRANSMITTER (object); switch (prop_id) { case PROP_GST_SINK: g_value_set_object (value, self->priv->gst_sink); break; case PROP_GST_SRC: g_value_set_object (value, self->priv->gst_src); break; case PROP_COMPONENTS: g_value_set_uint (value, self->components); break; case PROP_DO_TIMESTAMP: g_value_set_boolean (value, self->priv->do_timestamp); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_shm_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsShmTransmitter *self = FS_SHM_TRANSMITTER (object); switch (prop_id) { case PROP_COMPONENTS: self->components = g_value_get_uint (value); break; case PROP_DO_TIMESTAMP: self->priv->do_timestamp = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } /** * fs_shm_transmitter_new_stream_shm_transmitter: * @transmitter: a #FsTranmitter * @participant: the #FsParticipant for which the #FsStream using this * new #FsStreamTransmitter is created * * This function will create a new #FsStreamTransmitter element for a * specific participant for this #FsShmTransmitter * * Returns: a new #FsStreamTransmitter */ static FsStreamTransmitter * fs_shm_transmitter_new_stream_transmitter (FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error) { FsShmTransmitter *self = FS_SHM_TRANSMITTER (transmitter); return FS_STREAM_TRANSMITTER (fs_shm_stream_transmitter_newv ( self, n_parameters, parameters, error)); } static GType fs_shm_transmitter_get_stream_transmitter_type ( FsTransmitter *transmitter) { return FS_TYPE_SHM_STREAM_TRANSMITTER; } struct _ShmSrc { guint component; gchar *path; GstElement *src; GstPad *funnelpad; got_buffer got_buffer_func; connection disconnected_func; gpointer cb_data; gulong buffer_probe; }; static GstPadProbeReturn src_buffer_probe_cb (GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { ShmSrc *shm = user_data; GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info); shm->got_buffer_func (buffer, shm->component, shm->cb_data); return TRUE; } static void disconnected_cb (GstBin *bin, GstElement *elem, ShmSrc *shm) { if (elem != shm->src) return; shm->disconnected_func (shm->component, 0, shm->cb_data); } ShmSrc * fs_shm_transmitter_get_shm_src (FsShmTransmitter *self, guint component, const gchar *path, got_buffer got_buffer_func, connection disconnected_func, gpointer cb_data, GError **error) { ShmSrc *shm = g_slice_new0 (ShmSrc); GstElement *elem; GstPad *pad; shm->component = component; shm->got_buffer_func = got_buffer_func; shm->disconnected_func = disconnected_func; shm->cb_data = cb_data; shm->path = g_strdup (path); elem = gst_element_factory_make ("shmsrc", NULL); if (!elem) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make shmsrc"); goto error; } g_object_set (elem, "socket-path", path, "do-timestamp", self->priv->do_timestamp, "is-live", TRUE, NULL); if (shm->disconnected_func) g_signal_connect (self->priv->gst_src, "disconnected", G_CALLBACK (disconnected_cb), shm); if (!gst_bin_add (GST_BIN (self->priv->gst_src), elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add recvonly filter to bin"); gst_object_unref (elem); goto error; } shm->src = elem; shm->funnelpad = gst_element_get_request_pad (self->priv->funnels[component], "sink_%u"); if (!shm->funnelpad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get funnelpad"); goto error; } pad = gst_element_get_static_pad (shm->src, "src"); if (GST_PAD_LINK_FAILED (gst_pad_link (pad, shm->funnelpad))) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link tee" " and valve"); gst_object_unref (pad); goto error; } gst_object_unref (pad); if (got_buffer_func) shm->buffer_probe = gst_pad_add_probe (shm->funnelpad, GST_PAD_PROBE_TYPE_BUFFER, src_buffer_probe_cb, shm, NULL); if (!gst_element_sync_state_with_parent (shm->src)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the new shmsrc with its parent"); goto error; } return shm; error: fs_shm_transmitter_check_shm_src (self, shm, NULL); return NULL; } /* * Returns: %TRUE if the path is the same, other %FALSE and freeds the ShmSrc */ gboolean fs_shm_transmitter_check_shm_src (FsShmTransmitter *self, ShmSrc *shm, const gchar *path) { if (path && !strcmp (path, shm->path)) return TRUE; if (shm->buffer_probe) gst_pad_remove_probe (shm->funnelpad, shm->buffer_probe); shm->buffer_probe = 0; if (shm->funnelpad) { gst_element_release_request_pad (self->priv->funnels[shm->component], shm->funnelpad); gst_object_unref (shm->funnelpad); } shm->funnelpad = NULL; if (shm->src) { gst_element_set_locked_state (shm->src, TRUE); gst_element_set_state (shm->src, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->gst_src), shm->src); } shm->src = NULL; g_free (shm->path); g_slice_free (ShmSrc, shm); return FALSE; } struct _ShmSink { guint component; gchar *path; GstElement *sink; GstElement *recvonly_filter; GstPad *teepad; ready ready_func; connection connected_func; gpointer cb_data; }; static void ready_cb (GstBin *bin, GstElement *elem, ShmSink *shm) { gchar *path = NULL; if (elem != shm->sink) return; g_object_get (elem, "socket-path", &path, NULL); shm->ready_func (shm->component, path, shm->cb_data); g_free (path); } static void connected_cb (GstBin *bin, gint id, ShmSink *shm) { shm->connected_func (shm->component, id, shm->cb_data); } ShmSink * fs_shm_transmitter_get_shm_sink (FsShmTransmitter *self, guint component, const gchar *path, ready ready_func, connection connected_func, gpointer cb_data, GError **error) { ShmSink *shm = g_slice_new0 (ShmSink); GstElement *elem; GstPad *pad; GST_DEBUG ("Trying to add shm sink for c:%u path %s", component, path); shm->component = component; shm->path = g_strdup (path); shm->ready_func = ready_func; shm->connected_func = connected_func; shm->cb_data = cb_data; /* First add the sink */ elem = gst_element_factory_make ("shmsink", NULL); if (!elem) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make shmsink"); goto error; } g_object_set (elem, "socket-path", path, "wait-for-connection", FALSE, "async", FALSE, "sync" , FALSE, NULL); if (ready_func) g_signal_connect (self->priv->gst_sink, "ready", G_CALLBACK (ready_cb), shm); if (connected_func) g_signal_connect (elem, "client-connected", G_CALLBACK (connected_cb), shm); if (!gst_bin_add (GST_BIN (self->priv->gst_sink), elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add shmsink to bin"); gst_object_unref (elem); goto error; } shm->sink = elem; /* Second add the recvonly filter */ elem = gst_element_factory_make ("valve", NULL); if (!elem) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make valve"); goto error; } if (!gst_bin_add (GST_BIN (self->priv->gst_sink), elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add recvonly filter to bin"); gst_object_unref (elem); goto error; } shm->recvonly_filter = elem; /* Third connect these */ if (!gst_element_link (shm->recvonly_filter, shm->sink)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link recvonly filter and shmsink"); goto error; } if (!gst_element_sync_state_with_parent (shm->sink)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the new shmsink with its parent"); goto error; } if (!gst_element_sync_state_with_parent (shm->recvonly_filter)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the new recvonly filter with its parent"); goto error; } shm->teepad = gst_element_get_request_pad (self->priv->tees[component], "src_%u"); if (!shm->teepad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get teepad"); goto error; } pad = gst_element_get_static_pad (shm->recvonly_filter, "sink"); if (GST_PAD_LINK_FAILED (gst_pad_link (shm->teepad, pad))) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link tee" " and valve"); gst_object_unref (pad); goto error; } gst_object_unref (pad); return shm; error: fs_shm_transmitter_check_shm_sink (self, shm, NULL); return NULL; } gboolean fs_shm_transmitter_check_shm_sink (FsShmTransmitter *self, ShmSink *shm, const gchar *path) { if (path && !strcmp (path, shm->path)) return TRUE; if (path) GST_DEBUG ("Replacing shm socket %s with %s", shm->path, path); else GST_DEBUG ("Freeing shm socket %s", shm->path); if (shm->teepad) { gst_element_release_request_pad (self->priv->tees[shm->component], shm->teepad); gst_object_unref (shm->teepad); } shm->teepad = NULL; if (shm->sink) { gst_element_set_locked_state (shm->sink, TRUE); gst_element_set_state (shm->sink, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->gst_sink), shm->sink); } shm->sink = NULL; if (shm->recvonly_filter) { gst_element_set_locked_state (shm->recvonly_filter, TRUE); gst_element_set_state (shm->recvonly_filter, GST_STATE_NULL); gst_bin_remove (GST_BIN (self->priv->gst_sink), shm->recvonly_filter); } shm->recvonly_filter = NULL; g_free (shm->path); g_slice_free (ShmSink, shm); return FALSE; } void fs_shm_transmitter_sink_set_sending (FsShmTransmitter *self, ShmSink *shm, gboolean sending) { GObjectClass *klass = G_OBJECT_GET_CLASS (shm->recvonly_filter); if (g_object_class_find_property (klass, "drop")) g_object_set (shm->recvonly_filter, "drop", !sending, NULL); if (sending) gst_element_send_event (shm->sink, gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, gst_structure_new ("GstForceKeyUnit", "all-headers", G_TYPE_BOOLEAN, TRUE, NULL))); } farstream-0.2.7/transmitters/shm/fs-shm-stream-transmitter.h0000664000076400007640000000627611710041463021206 00000000000000/* * Farstream - Farstream Shared Memory Stream Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-shm-stream-transmitter.h - A Farstream Shared Memory stream transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_SHM_STREAM_TRANSMITTER_H__ #define __FS_SHM_STREAM_TRANSMITTER_H__ #include #include #include #include #include "fs-shm-transmitter.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_SHM_STREAM_TRANSMITTER \ (fs_shm_stream_transmitter_get_type ()) #define FS_SHM_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_SHM_STREAM_TRANSMITTER, \ FsShmStreamTransmitter)) #define FS_SHM_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_SHM_STREAM_TRANSMITTER, \ FsShmStreamTransmitterClass)) #define FS_IS_SHM_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_SHM_STREAM_TRANSMITTER)) #define FS_IS_SHM_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_SHM_STREAM_TRANSMITTER)) #define FS_SHM_STREAM_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_SHM_STREAM_TRANSMITTER, \ FsShmStreamTransmitterClass)) #define FS_SHM_STREAM_TRANSMITTER_CAST(obj) ((FsShmStreamTransmitter *) (obj)) typedef struct _FsShmStreamTransmitter FsShmStreamTransmitter; typedef struct _FsShmStreamTransmitterClass FsShmStreamTransmitterClass; typedef struct _FsShmStreamTransmitterPrivate FsShmStreamTransmitterPrivate; /** * FsShmStreamTransmitterClass: * @parent_class: Our parent * * The Shared Memory stream transmitter class */ struct _FsShmStreamTransmitterClass { FsStreamTransmitterClass parent_class; /*virtual functions */ /*< private >*/ }; /** * FsShmStreamTransmitter: * @parent: Parent object * * All members are private, access them using methods and properties */ struct _FsShmStreamTransmitter { FsStreamTransmitter parent; /*< private >*/ FsShmStreamTransmitterPrivate *priv; }; GType fs_shm_stream_transmitter_register_type (FsPlugin *module); GType fs_shm_stream_transmitter_get_type (void); FsShmStreamTransmitter * fs_shm_stream_transmitter_newv (FsShmTransmitter *transmitter, guint n_parameters, GParameter *parameters, GError **error); G_END_DECLS #endif /* __FS_SHM_STREAM_TRANSMITTER_H__ */ farstream-0.2.7/transmitters/shm/fs-shm-stream-transmitter.c0000664000076400007640000004310312461773672021211 00000000000000/* * Farstream - Farstream Shared Memory Stream Transmitter * * Copyright 2009 Collabora Ltd. * @author: Olivier Crete * Copyright 2009 Nokia Corp. * * fs-shm-stream-transmitter.c - A Farstream Shared memory stream transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-shm-stream-transmitter * @short_description: A stream transmitter object for Shared Memory * * The name of this transmitter is "shm". * * This transmitter is meant to send and received the data from another process * on the same system while minimizing the memory pressure associated with the * use of sockets. * * Two sockets are used to control the shared memory areas. One is used to * send data and one to receive data. The receiver always connects to the * sender. The sender socket must exist before the receiver connects to it. * * Negotiating the paths of the sockets can happen in two ways. If the * create-local-candidates is True then the transmitter will generate the * path of the local candidate and us it as the ip filed in #FsCandidate. The * transmitter will expect the path of the applications sender socket to be in * the "ip" field of the remote candidates #FsCandidate as well. * * Or alternatively, if create-local-candidates is false then * the sender socket can be created by giving the transmitter a candidate * with the path of the socket in the "ip" field of the #FsCandidate. This * #FsCandidate can be given to the #FsStreamTransmitter in two ways, either * by setting the #FsStreamTransmitter:preferred-local-candidates property * or by calling the fs_stream_transmitter_force_remote_candidates() function. * There can be only one single send socket per stream. When the send socket * is ready to be connected to, #FsStreamTransmitter::new-local-candidate signal * will be emitted. * * To connect the receive side to the other application, one must create a * #FsCandidate with the path of the sender's socket in the "username" field. * If the receiver can not connect to the sender, * the fs_stream_transmitter_force_remote_candidates() call will fail. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-shm-stream-transmitter.h" #include "fs-shm-transmitter.h" #include #include #include #include #include #include #ifdef HAVE_UNISTD_H # include #endif #include GST_DEBUG_CATEGORY_EXTERN (fs_shm_transmitter_debug); #define GST_CAT_DEFAULT fs_shm_transmitter_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_SENDING, PROP_PREFERRED_LOCAL_CANDIDATES, PROP_CREATE_LOCAL_CANDIDATES, }; struct _FsShmStreamTransmitterPrivate { /* We don't actually hold a ref to this, * But since our parent FsStream can not exist without its parent * FsSession, we should be safe */ FsShmTransmitter *transmitter; GList *preferred_local_candidates; GMutex mutex; /* Protected by the mutex */ gboolean sending; /* Protected by the mutex */ FsCandidate **candidates; /* Whether we create the local candidate ourselves or rely on the remote end * to pass them to us as part of the candidate */ gboolean create_local_candidates; /* temporary socket directy in case we made one */ gchar *socket_dir; ShmSrc **shm_src; ShmSink **shm_sink; }; #define FS_SHM_STREAM_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_SHM_STREAM_TRANSMITTER, \ FsShmStreamTransmitterPrivate)) #define FS_SHM_STREAM_TRANSMITTER_LOCK(s) \ g_mutex_lock (&(s)->priv->mutex) #define FS_SHM_STREAM_TRANSMITTER_UNLOCK(s) \ g_mutex_unlock (&(s)->priv->mutex) static void fs_shm_stream_transmitter_class_init (FsShmStreamTransmitterClass *klass); static void fs_shm_stream_transmitter_init (FsShmStreamTransmitter *self); static void fs_shm_stream_transmitter_dispose (GObject *object); static void fs_shm_stream_transmitter_finalize (GObject *object); static void fs_shm_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_shm_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static gboolean fs_shm_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error); static gboolean fs_shm_stream_transmitter_gather_local_candidates ( FsStreamTransmitter *streamtransmitter, GError **error); static gboolean fs_shm_stream_transmitter_add_sink (FsShmStreamTransmitter *self, FsCandidate *candidate, GError **error); static GObjectClass *parent_class = NULL; // static guint signals[LAST_SIGNAL] = { 0 }; static GType type = 0; GType fs_shm_stream_transmitter_get_type (void) { return type; } GType fs_shm_stream_transmitter_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsShmStreamTransmitterClass), NULL, NULL, (GClassInitFunc) fs_shm_stream_transmitter_class_init, NULL, NULL, sizeof (FsShmStreamTransmitter), 0, (GInstanceInitFunc) fs_shm_stream_transmitter_init }; type = g_type_module_register_type (G_TYPE_MODULE (module), FS_TYPE_STREAM_TRANSMITTER, "FsShmStreamTransmitter", &info, 0); return type; } static void fs_shm_stream_transmitter_class_init (FsShmStreamTransmitterClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; FsStreamTransmitterClass *streamtransmitterclass = FS_STREAM_TRANSMITTER_CLASS (klass); GParamSpec *pspec; parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_shm_stream_transmitter_set_property; gobject_class->get_property = fs_shm_stream_transmitter_get_property; streamtransmitterclass->force_remote_candidates = fs_shm_stream_transmitter_force_remote_candidates; streamtransmitterclass->gather_local_candidates = fs_shm_stream_transmitter_gather_local_candidates; g_object_class_override_property (gobject_class, PROP_SENDING, "sending"); g_object_class_override_property (gobject_class, PROP_PREFERRED_LOCAL_CANDIDATES, "preferred-local-candidates"); pspec = g_param_spec_boolean ("create-local-candidates", "CreateLocalCandidates", "Whether the transmitter should automatically create local candidates", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property (gobject_class, PROP_CREATE_LOCAL_CANDIDATES, pspec); gobject_class->dispose = fs_shm_stream_transmitter_dispose; gobject_class->finalize = fs_shm_stream_transmitter_finalize; g_type_class_add_private (klass, sizeof (FsShmStreamTransmitterPrivate)); } static void fs_shm_stream_transmitter_init (FsShmStreamTransmitter *self) { /* member init */ self->priv = FS_SHM_STREAM_TRANSMITTER_GET_PRIVATE (self); self->priv->sending = TRUE; g_mutex_init (&self->priv->mutex); } static void fs_shm_stream_transmitter_dispose (GObject *object) { FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER (object); gint c; /* component_id */ for (c = 1; c <= self->priv->transmitter->components; c++) { if (self->priv->shm_src[c]) { fs_shm_transmitter_check_shm_src (self->priv->transmitter, self->priv->shm_src[c], NULL); } self->priv->shm_src[c] = NULL; if (self->priv->shm_sink[c]) { fs_shm_transmitter_check_shm_sink (self->priv->transmitter, self->priv->shm_sink[c], NULL); } self->priv->shm_sink[c] = NULL; } if (self->priv->socket_dir != NULL) g_rmdir (self->priv->socket_dir); g_free (self->priv->socket_dir); self->priv->socket_dir = NULL; parent_class->dispose (object); } static void fs_shm_stream_transmitter_finalize (GObject *object) { FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER (object); fs_candidate_list_destroy (self->priv->preferred_local_candidates); g_free (self->priv->shm_src); g_free (self->priv->shm_sink); g_mutex_clear (&self->priv->mutex); parent_class->finalize (object); } static void fs_shm_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER (object); switch (prop_id) { case PROP_SENDING: FS_SHM_STREAM_TRANSMITTER_LOCK (self); g_value_set_boolean (value, self->priv->sending); FS_SHM_STREAM_TRANSMITTER_UNLOCK (self); break; case PROP_PREFERRED_LOCAL_CANDIDATES: g_value_set_boxed (value, self->priv->preferred_local_candidates); break; case PROP_CREATE_LOCAL_CANDIDATES: g_value_set_boolean (value, self->priv->create_local_candidates); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_shm_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER (object); switch (prop_id) { case PROP_SENDING: FS_SHM_STREAM_TRANSMITTER_LOCK (self); self->priv->sending = g_value_get_boolean (value); if (self->priv->shm_sink[1]) fs_shm_transmitter_sink_set_sending (self->priv->transmitter, self->priv->shm_sink[1], self->priv->sending); FS_SHM_STREAM_TRANSMITTER_UNLOCK (self); break; case PROP_PREFERRED_LOCAL_CANDIDATES: self->priv->preferred_local_candidates = g_value_dup_boxed (value); break; case PROP_CREATE_LOCAL_CANDIDATES: self->priv->create_local_candidates = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static gboolean fs_shm_stream_transmitter_build (FsShmStreamTransmitter *self, GError **error) { self->priv->shm_src = g_new0 (ShmSrc *, self->priv->transmitter->components + 1); self->priv->shm_sink = g_new0 (ShmSink *, self->priv->transmitter->components + 1); return TRUE; } static void got_buffer_func (GstBuffer *buffer, guint component, gpointer data) { FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER_CAST (data); g_signal_emit_by_name (self, "known-source-packet-received", component, buffer); } static void ready_cb (guint component, gchar *path, gpointer data) { FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER_CAST (data); FsCandidate *candidate = fs_candidate_new (NULL, component, FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, path, 0); GST_DEBUG ("Emitting new local candidate with path %s", path); g_signal_emit_by_name (self, "new-local-candidate", candidate); g_signal_emit_by_name (self, "local-candidates-prepared"); fs_candidate_destroy (candidate); } static void connected_cb (guint component, gint id, gpointer data) { FsShmStreamTransmitter *self = data; g_signal_emit_by_name (self, "state-changed", component, FS_STREAM_STATE_READY); } static gboolean fs_shm_stream_transmitter_add_sink (FsShmStreamTransmitter *self, FsCandidate *candidate, GError **error) { if (self->priv->create_local_candidates) return TRUE; if (!candidate->ip || !candidate->ip[0]) return TRUE; if (self->priv->shm_sink[candidate->component_id]) { if (fs_shm_transmitter_check_shm_sink (self->priv->transmitter, self->priv->shm_sink[candidate->component_id], candidate->ip)) return TRUE; self->priv->shm_sink[candidate->component_id] = NULL; } self->priv->shm_sink[candidate->component_id] = fs_shm_transmitter_get_shm_sink (self->priv->transmitter, candidate->component_id, candidate->ip, ready_cb, connected_cb, self, error); if (self->priv->shm_sink[candidate->component_id] == NULL) return FALSE; if (candidate->component_id == 1) fs_shm_transmitter_sink_set_sending (self->priv->transmitter, self->priv->shm_sink[candidate->component_id], self->priv->sending); return TRUE; } static void disconnected_cb (guint component, gint id, gpointer data) { FsShmStreamTransmitter *self = data; g_signal_emit_by_name (self, "state-changed", component, FS_STREAM_STATE_FAILED); } static gboolean fs_shm_stream_transmitter_force_remote_candidate ( FsShmStreamTransmitter *self, FsCandidate *candidate, GError **error) { const gchar *path; if (!fs_shm_stream_transmitter_add_sink (self, candidate, error)) return FALSE; if (self->priv->create_local_candidates) path = candidate->ip; else path = candidate->username; if (path && path[0]) { if (self->priv->shm_src[candidate->component_id]) { if (fs_shm_transmitter_check_shm_src (self->priv->transmitter, self->priv->shm_src[candidate->component_id], path)) return TRUE; self->priv->shm_src[candidate->component_id] = NULL; } self->priv->shm_src[candidate->component_id] = fs_shm_transmitter_get_shm_src (self->priv->transmitter, candidate->component_id, path, got_buffer_func, disconnected_cb, self, error); if (self->priv->shm_src[candidate->component_id] == NULL) return FALSE; } return TRUE; } /** * fs_shm_stream_transmitter_force_remote_candidates */ static gboolean fs_shm_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error) { GList *item = NULL; FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER (streamtransmitter); for (item = candidates; item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (candidate->component_id == 0 || candidate->component_id > self->priv->transmitter->components) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The candidate passed has an invalid component id %u (not in [1,%u])", candidate->component_id, self->priv->transmitter->components); return FALSE; } if ((!candidate->ip || !candidate->ip[0]) && (!candidate->username || !candidate->username[0])) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The candidate does not have a SINK shm segment in its ip" " or a SRC shm segment in its username"); return FALSE; } } for (item = candidates; item; item = g_list_next (item)) if (!fs_shm_stream_transmitter_force_remote_candidate (self, item->data, error)) return FALSE; return TRUE; } FsShmStreamTransmitter * fs_shm_stream_transmitter_newv (FsShmTransmitter *transmitter, guint n_parameters, GParameter *parameters, GError **error) { FsShmStreamTransmitter *streamtransmitter = NULL; streamtransmitter = g_object_newv (FS_TYPE_SHM_STREAM_TRANSMITTER, n_parameters, parameters); if (!streamtransmitter) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the stream transmitter"); return NULL; } streamtransmitter->priv->transmitter = transmitter; if (!fs_shm_stream_transmitter_build (streamtransmitter, error)) { g_object_unref (streamtransmitter); return NULL; } return streamtransmitter; } static gboolean fs_shm_stream_transmitter_gather_local_candidates ( FsStreamTransmitter *streamtransmitter, GError **error) { FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER (streamtransmitter); GList *item; if (self->priv->create_local_candidates) { guint c; gchar *socket_dir; socket_dir = g_build_filename (g_get_tmp_dir (), "farstream-shm-XXXXXX", NULL); if (g_mkdtemp (socket_dir) == NULL) return FALSE; self->priv->socket_dir = socket_dir; for (c = 1; c <= self->priv->transmitter->components; c++) { gchar *path = g_strdup_printf ("%s/shm-sink-socket-%d", socket_dir, c); self->priv->shm_sink[c] = fs_shm_transmitter_get_shm_sink (self->priv->transmitter, c, path, ready_cb, connected_cb, self, error); g_free (path); if (self->priv->shm_sink[c] == NULL) return FALSE; if (c == 1) fs_shm_transmitter_sink_set_sending (self->priv->transmitter, self->priv->shm_sink[c], self->priv->sending); } return TRUE; } for (item = self->priv->preferred_local_candidates; item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (candidate->ip && candidate->ip[0]) if (!fs_shm_stream_transmitter_add_sink (self, candidate, error)) return FALSE; } return TRUE; } farstream-0.2.7/transmitters/multicast/0000775000076400007640000000000012462323000015253 500000000000000farstream-0.2.7/transmitters/multicast/fs-multicast-transmitter.h0000664000076400007640000000666011710041463022346 00000000000000/* * Farstream - Farstream Multicast UDP Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-multicast-transmitter.h - A Farstream Multicast UDP transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_MULTICAST_TRANSMITTER_H__ #define __FS_MULTICAST_TRANSMITTER_H__ #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_MULTICAST_TRANSMITTER \ (fs_multicast_transmitter_get_type ()) #define FS_MULTICAST_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_MULTICAST_TRANSMITTER, \ FsMulticastTransmitter)) #define FS_MULTICAST_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_MULTICAST_TRANSMITTER, \ FsMulticastTransmitterClass)) #define FS_IS_MULTICAST_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_MULTICAST_TRANSMITTER)) #define FS_IS_MULTICAST_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_MULTICAST_TRANSMITTER)) #define FS_MULTICAST_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_MULTICAST_TRANSMITTER, \ FsMulticastTransmitterClass)) #define FS_MULTICAST_TRANSMITTER_CAST(obj) ((FsMulticastTransmitter *) (obj)) typedef struct _FsMulticastTransmitter FsMulticastTransmitter; typedef struct _FsMulticastTransmitterClass FsMulticastTransmitterClass; typedef struct _FsMulticastTransmitterPrivate FsMulticastTransmitterPrivate; /** * FsMulticastTransmitterClass: * @parent_class: Our parent * * The Multicast UDP transmitter class */ struct _FsMulticastTransmitterClass { FsTransmitterClass parent_class; }; /** * FsMulticastTransmitter: * @parent: Parent object * * All members are private, access them using methods and properties */ struct _FsMulticastTransmitter { FsTransmitter parent; /* The number of components (READONLY)*/ gint components; /*< private >*/ FsMulticastTransmitterPrivate *priv; }; /* Private declarations */ typedef struct _UdpSock UdpSock; GType fs_multicast_transmitter_get_type (void); UdpSock *fs_multicast_transmitter_get_udpsock (FsMulticastTransmitter *trans, guint component_id, const gchar *local_ip, const gchar *multicast_ip, guint16 port, guint8 ttl, gboolean sending, GError **error); void fs_multicast_transmitter_put_udpsock (FsMulticastTransmitter *trans, UdpSock *udpsock, guint8 ttl); void fs_multicast_transmitter_udpsock_inc_sending (UdpSock *udpsock); void fs_multicast_transmitter_udpsock_dec_sending (UdpSock *udpsock); void fs_multicast_transmitter_udpsock_ref (FsMulticastTransmitter *trans, UdpSock *udpsock, guint8 ttl); G_END_DECLS #endif /* __FS_MULTICAST_TRANSMITTER_H__ */ farstream-0.2.7/transmitters/multicast/fs-multicast-transmitter.c0000664000076400007640000007636712461773672022376 00000000000000/* * Farstream - Farstream Multicast UDP Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-multicast-transmitter.c - A Farstream multicast UDP transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-multicast-transmitter * @short_description: A transmitter for multicast UDP * * This transmitter provides multicast udp * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-multicast-transmitter.h" #include "fs-multicast-stream-transmitter.h" #include #include #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifdef G_OS_WIN32 # include # define close closesocket #else /*G_OS_WIN32*/ # include # include # include #endif /*G_OS_WIN32*/ GST_DEBUG_CATEGORY (fs_multicast_transmitter_debug); #define GST_CAT_DEFAULT fs_multicast_transmitter_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_GST_SINK, PROP_GST_SRC, PROP_COMPONENTS, PROP_TYPE_OF_SERVICE, PROP_DO_TIMESTAMP }; struct _FsMulticastTransmitterPrivate { /* We hold references to this element */ GstElement *gst_sink; GstElement *gst_src; /* We don't hold a reference to these elements, they are owned by the bins */ /* They are tables of pointers, one per component */ GstElement **udpsrc_funnels; GstElement **udpsink_tees; GMutex mutex; GList **udpsocks; gint type_of_service; gboolean do_timestamp; gboolean disposed; }; #define FS_MULTICAST_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_MULTICAST_TRANSMITTER, \ FsMulticastTransmitterPrivate)) #define FS_MULTICAST_TRANSMITTER_LOCK(self) \ g_mutex_lock (&(self)->priv->mutex); #define FS_MULTICAST_TRANSMITTER_UNLOCK(self) \ g_mutex_unlock (&(self)->priv->mutex); static void fs_multicast_transmitter_class_init ( FsMulticastTransmitterClass *klass); static void fs_multicast_transmitter_init (FsMulticastTransmitter *self); static void fs_multicast_transmitter_constructed (GObject *object); static void fs_multicast_transmitter_dispose (GObject *object); static void fs_multicast_transmitter_finalize (GObject *object); static void fs_multicast_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_multicast_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static FsStreamTransmitter *fs_multicast_transmitter_new_stream_transmitter ( FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error); static GType fs_multicast_transmitter_get_stream_transmitter_type ( FsTransmitter *transmitter); static void fs_multicast_transmitter_set_type_of_service ( FsMulticastTransmitter *self, gint tos); static GObjectClass *parent_class = NULL; //static guint signals[LAST_SIGNAL] = { 0 }; /* * Lets register the plugin */ static GType type = 0; GType fs_multicast_transmitter_get_type (void) { g_assert (type); return type; } static GType fs_multicast_transmitter_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsMulticastTransmitterClass), NULL, NULL, (GClassInitFunc) fs_multicast_transmitter_class_init, NULL, NULL, sizeof (FsMulticastTransmitter), 0, (GInstanceInitFunc) fs_multicast_transmitter_init }; GST_DEBUG_CATEGORY_INIT (fs_multicast_transmitter_debug, "fsmulticasttransmitter", 0, "Farstream multicast UDP transmitter"); fs_multicast_stream_transmitter_register_type (module); type = g_type_module_register_type (G_TYPE_MODULE (module), FS_TYPE_TRANSMITTER, "FsMulticastTransmitter", &info, 0); return type; } FS_INIT_PLUGIN (fs_multicast_transmitter_register_type) static void fs_multicast_transmitter_class_init (FsMulticastTransmitterClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; FsTransmitterClass *transmitter_class = FS_TRANSMITTER_CLASS (klass); parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_multicast_transmitter_set_property; gobject_class->get_property = fs_multicast_transmitter_get_property; gobject_class->constructed = fs_multicast_transmitter_constructed; g_object_class_override_property (gobject_class, PROP_GST_SRC, "gst-src"); g_object_class_override_property (gobject_class, PROP_GST_SINK, "gst-sink"); g_object_class_override_property (gobject_class, PROP_COMPONENTS, "components"); g_object_class_override_property (gobject_class, PROP_TYPE_OF_SERVICE, "tos"); g_object_class_override_property (gobject_class, PROP_DO_TIMESTAMP, "do-timestamp"); transmitter_class->new_stream_transmitter = fs_multicast_transmitter_new_stream_transmitter; transmitter_class->get_stream_transmitter_type = fs_multicast_transmitter_get_stream_transmitter_type; gobject_class->dispose = fs_multicast_transmitter_dispose; gobject_class->finalize = fs_multicast_transmitter_finalize; g_type_class_add_private (klass, sizeof (FsMulticastTransmitterPrivate)); } static void fs_multicast_transmitter_init (FsMulticastTransmitter *self) { /* member init */ self->priv = FS_MULTICAST_TRANSMITTER_GET_PRIVATE (self); self->priv->disposed = FALSE; self->components = 2; g_mutex_init (&self->priv->mutex); self->priv->do_timestamp = TRUE; } static void fs_multicast_transmitter_constructed (GObject *object) { FsMulticastTransmitter *self = FS_MULTICAST_TRANSMITTER_CAST (object); FsTransmitter *trans = FS_TRANSMITTER_CAST (self); GstPad *pad = NULL, *pad2 = NULL; GstPad *ghostpad = NULL; gchar *padname; GstPadLinkReturn ret; int c; /* component_id */ /* We waste one space in order to have the index be the component_id */ self->priv->udpsrc_funnels = g_new0 (GstElement *, self->components+1); self->priv->udpsink_tees = g_new0 (GstElement *, self->components+1); self->priv->udpsocks = g_new0 (GList *, self->components+1); /* First we need the src elemnet */ self->priv->gst_src = gst_bin_new (NULL); if (!self->priv->gst_src) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the transmitter src bin"); return; } gst_object_ref (self->priv->gst_src); /* Second, we do the sink element */ self->priv->gst_sink = gst_bin_new (NULL); if (!self->priv->gst_sink) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the transmitter sink bin"); return; } g_object_set (G_OBJECT (self->priv->gst_sink), "async-handling", TRUE, NULL); gst_object_ref (self->priv->gst_sink); for (c = 1; c <= self->components; c++) { GstElement *fakesink = NULL; /* Lets create the RTP source funnel */ self->priv->udpsrc_funnels[c] = gst_element_factory_make ("funnel", NULL); if (!self->priv->udpsrc_funnels[c]) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the funnel element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_src), self->priv->udpsrc_funnels[c])) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the funnel element to the transmitter src bin"); } pad = gst_element_get_static_pad (self->priv->udpsrc_funnels[c], "src"); padname = g_strdup_printf ("src_%u", c); ghostpad = gst_ghost_pad_new (padname, pad); g_free (padname); gst_object_unref (pad); gst_pad_set_active (ghostpad, TRUE); gst_element_add_pad (self->priv->gst_src, ghostpad); /* Lets create the RTP sink tee */ self->priv->udpsink_tees[c] = gst_element_factory_make ("tee", NULL); if (!self->priv->udpsink_tees[c]) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the tee element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_sink), self->priv->udpsink_tees[c])) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the tee element to the transmitter sink bin"); } pad = gst_element_get_static_pad (self->priv->udpsink_tees[c], "sink"); padname = g_strdup_printf ("sink_%u", c); ghostpad = gst_ghost_pad_new (padname, pad); g_free (padname); gst_object_unref (pad); gst_pad_set_active (ghostpad, TRUE); gst_element_add_pad (self->priv->gst_sink, ghostpad); fakesink = gst_element_factory_make ("fakesink", NULL); if (!fakesink) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the fakesink element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_sink), fakesink)) { gst_object_unref (fakesink); trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the fakesink element to the transmitter sink bin"); return; } g_object_set (fakesink, "async", FALSE, "sync" , FALSE, NULL); pad = gst_element_get_request_pad (self->priv->udpsink_tees[c], "src_%u"); pad2 = gst_element_get_static_pad (fakesink, "sink"); ret = gst_pad_link (pad, pad2); gst_object_unref (pad2); gst_object_unref (pad); if (GST_PAD_LINK_FAILED(ret)) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the tee to the fakesink"); return; } } GST_CALL_PARENT (G_OBJECT_CLASS, constructed, (object)); } static void fs_multicast_transmitter_dispose (GObject *object) { FsMulticastTransmitter *self = FS_MULTICAST_TRANSMITTER (object); if (self->priv->disposed) { /* If dispose did already run, return. */ return; } if (self->priv->gst_src) { gst_object_unref (self->priv->gst_src); self->priv->gst_src = NULL; } if (self->priv->gst_sink) { gst_object_unref (self->priv->gst_sink); self->priv->gst_sink = NULL; } /* Make sure dispose does not run twice. */ self->priv->disposed = TRUE; parent_class->dispose (object); } static void fs_multicast_transmitter_finalize (GObject *object) { FsMulticastTransmitter *self = FS_MULTICAST_TRANSMITTER (object); if (self->priv->udpsrc_funnels) { g_free (self->priv->udpsrc_funnels); self->priv->udpsrc_funnels = NULL; } if (self->priv->udpsink_tees) { g_free (self->priv->udpsink_tees); self->priv->udpsink_tees = NULL; } if (self->priv->udpsocks) { g_free (self->priv->udpsocks); self->priv->udpsocks = NULL; } g_mutex_clear (&self->priv->mutex); parent_class->finalize (object); } static void fs_multicast_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsMulticastTransmitter *self = FS_MULTICAST_TRANSMITTER (object); switch (prop_id) { case PROP_GST_SINK: g_value_set_object (value, self->priv->gst_sink); break; case PROP_GST_SRC: g_value_set_object (value, self->priv->gst_src); break; case PROP_COMPONENTS: g_value_set_uint (value, self->components); break; case PROP_TYPE_OF_SERVICE: FS_MULTICAST_TRANSMITTER_LOCK (self); g_value_set_uint (value, self->priv->type_of_service); FS_MULTICAST_TRANSMITTER_UNLOCK (self); break; case PROP_DO_TIMESTAMP: g_value_set_boolean (value, self->priv->do_timestamp); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_multicast_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsMulticastTransmitter *self = FS_MULTICAST_TRANSMITTER (object); switch (prop_id) { case PROP_COMPONENTS: self->components = g_value_get_uint (value); break; case PROP_TYPE_OF_SERVICE: fs_multicast_transmitter_set_type_of_service (self, g_value_get_uint (value)); break; case PROP_DO_TIMESTAMP: self->priv->do_timestamp = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } /** * fs_multicast_transmitter_new_stream_multicast_transmitter: * @transmitter: a #FsTranmitter * @participant: the #FsParticipant for which the #FsStream using this * new #FsStreamTransmitter is created * * This function will create a new #FsStreamTransmitter element for a * specific participant for this #FsMulticastTransmitter * * Returns: a new #FsStreamTransmitter */ static FsStreamTransmitter * fs_multicast_transmitter_new_stream_transmitter (FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error) { FsMulticastTransmitter *self = FS_MULTICAST_TRANSMITTER (transmitter); return FS_STREAM_TRANSMITTER (fs_multicast_stream_transmitter_newv ( self, n_parameters, parameters, error)); } /* * The UdpSock structure is a ref-counted pseudo-object use to represent * one local_ip:port:multicast_ip trio on which we listen and send, * so it includes a udpsrc and a multiudpsink. It represents one BSD socket. * The TTL used is the max TTL requested by any stream. */ struct _UdpSock { GstElement *udpsrc; GstPad *udpsrc_requested_pad; GstElement *udpsink; GstPad *udpsink_requested_pad; gchar *local_ip; gchar *multicast_ip; guint16 port; /* Protected by the transmitter mutex */ guint8 current_ttl; gint fd; GSocket *socket; /* Protected by the transmitter mutex */ GByteArray *ttls; /* These are just convenience pointers to our parent transmitter */ GstElement *funnel; GstElement *tee; guint component_id; volatile gint sendcount; }; static gboolean _ip_string_into_sockaddr_in (const gchar *ip_as_string, struct sockaddr_in *sockaddr_in, GError **error) { GInetAddress *inetaddr; GSocketAddress *socket_addr; gboolean ret; inetaddr = g_inet_address_new_from_string (ip_as_string); if (!inetaddr) { g_set_error (error, FS_ERROR, FS_ERROR_NETWORK, "Invalid IP address %s passed", ip_as_string); return FALSE; } if (g_inet_address_get_family (inetaddr) != G_SOCKET_FAMILY_IPV4) { g_set_error (error, FS_ERROR, FS_ERROR_NETWORK, "IP address %s passed is not IPv4", ip_as_string); g_object_unref (inetaddr); return 0; } socket_addr = g_inet_socket_address_new (inetaddr, 1); ret = g_socket_address_to_native (socket_addr, sockaddr_in, sizeof (struct sockaddr_in), error); g_object_unref (socket_addr); g_object_unref (inetaddr); return ret; } static gint _bind_port ( const gchar *local_ip, const gchar *multicast_ip, guint16 port, guchar ttl, int type_of_service, GError **error) { int sock = -1; struct sockaddr_in address; int retval; guchar loop = 1; int reuseaddr = 1; #ifdef HAVE_IP_MREQN struct ip_mreqn mreq; #else struct ip_mreq mreq; #endif address.sin_family = AF_INET; address.sin_addr.s_addr = INADDR_ANY; g_assert (multicast_ip); if (!_ip_string_into_sockaddr_in (multicast_ip, &address, error)) goto error; memcpy (&mreq.imr_multiaddr, &address.sin_addr, sizeof (mreq.imr_multiaddr)); if (local_ip) { struct sockaddr_in tmpaddr; if (!_ip_string_into_sockaddr_in (local_ip, &tmpaddr, error)) goto error; #ifdef HAVE_IP_MREQN memcpy (&mreq.imr_address, &tmpaddr.sin_addr, sizeof (mreq.imr_address)); #else memcpy (&mreq.imr_interface, &tmpaddr.sin_addr, sizeof (mreq.imr_interface)); #endif } else { #ifdef HAVE_IP_MREQN mreq.imr_address.s_addr = INADDR_ANY; #else mreq.imr_interface.s_addr = INADDR_ANY; #endif } #ifdef HAVE_IP_MREQN mreq.imr_ifindex = 0; #endif if ((sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) <= 0) { g_set_error (error, FS_ERROR, FS_ERROR_NETWORK, "Error creating socket: %s", g_strerror (errno)); goto error; } if (setsockopt (sock, IPPROTO_IP, IP_MULTICAST_TTL, (const void *)&ttl, sizeof (ttl)) < 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Error setting the multicast TTL: %s", g_strerror (errno)); goto error; } if (setsockopt (sock, IPPROTO_IP, IP_MULTICAST_LOOP, (const void *)&loop, sizeof (loop)) < 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Error setting the multicast loop to FALSE: %s", g_strerror (errno)); goto error; } if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, (const void *)&reuseaddr, sizeof (reuseaddr)) < 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Error setting reuseaddr to TRUE: %s", g_strerror (errno)); goto error; } #ifdef SO_REUSEPORT if (setsockopt (sock, SOL_SOCKET, SO_REUSEPORT, (const void *)&reuseaddr, sizeof (reuseaddr)) < 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Error setting reuseaddr to TRUE: %s", g_strerror (errno)); goto error; } #endif if (setsockopt (sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (const void *)&mreq, sizeof (mreq)) < 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Could not join the socket to the multicast group: %s", g_strerror (errno)); goto error; } if (setsockopt (sock, IPPROTO_IP, IP_TOS, &type_of_service, sizeof (type_of_service)) < 0) GST_WARNING ("could not set socket ToS: %s", g_strerror (errno)); #ifdef IPV6_TCLASS if (setsockopt (sock, IPPROTO_IPV6, IPV6_TCLASS, &type_of_service, sizeof (type_of_service)) < 0) GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); #endif address.sin_port = htons (port); retval = bind (sock, (struct sockaddr *) &address, sizeof (address)); if (retval != 0) { g_set_error (error, FS_ERROR, FS_ERROR_NETWORK, "Could not bind to port %d", port); goto error; } return sock; error: if (sock >= 0) close (sock); return -1; } static GstElement * _create_sinksource (gchar *elementname, GstBin *bin, GstElement *teefunnel, GSocket *socket, GstPadDirection direction, GstPad **requested_pad, GError **error) { GstElement *elem; GstPadLinkReturn ret = GST_PAD_LINK_OK; GstPad *elempad = NULL; GstStateChangeReturn state_ret; g_assert (direction == GST_PAD_SINK || direction == GST_PAD_SRC); elem = gst_element_factory_make (elementname, NULL); if (!elem) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the %s element", elementname); return NULL; } g_object_set (elem, "close-socket", FALSE, "socket", socket, "auto-multicast", FALSE, NULL); if (!gst_bin_add (bin, elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the %s element to the gst %s bin", elementname, (direction == GST_PAD_SINK) ? "sink" : "src"); gst_object_unref (elem); return NULL; } if (direction == GST_PAD_SINK) *requested_pad = gst_element_get_request_pad (teefunnel, "src_%u"); else *requested_pad = gst_element_get_request_pad (teefunnel, "sink_%u"); if (!*requested_pad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get the %s request pad from the %s", (direction == GST_PAD_SINK) ? "src" : "sink", (direction == GST_PAD_SINK) ? "tee" : "funnel"); goto error; } if (direction == GST_PAD_SINK) elempad = gst_element_get_static_pad (elem, "sink"); else elempad = gst_element_get_static_pad (elem, "src"); if (direction != GST_PAD_SINK) ret = gst_pad_link (elempad, *requested_pad); if (GST_PAD_LINK_FAILED(ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the new element %s (%d)", elementname, ret); goto error; } if (!gst_element_sync_state_with_parent (elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the new %s with its parent", elementname); goto error; } if (direction == GST_PAD_SINK) ret = gst_pad_link (*requested_pad, elempad); if (GST_PAD_LINK_FAILED(ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the new element %s (%d)", elementname, ret); goto error; } gst_object_unref (elempad); return elem; error: gst_element_set_locked_state (elem, TRUE); state_ret = gst_element_set_state (elem, GST_STATE_NULL); if (state_ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("On error, could not reset %s to state NULL (%s)", elementname, gst_element_state_change_return_get_name (state_ret)); if (!gst_bin_remove (bin, elem)) GST_ERROR ("Could not remove element %s from bin on error", elementname); if (elempad) gst_object_unref (elempad); return NULL; } static UdpSock * fs_multicast_transmitter_get_udpsock_locked (FsMulticastTransmitter *trans, guint component_id, const gchar *local_ip, const gchar *multicast_ip, guint16 port, guint8 ttl, gboolean sending, GError **error) { UdpSock *udpsock; GList *udpsock_e; for (udpsock_e = g_list_first (trans->priv->udpsocks[component_id]); udpsock_e; udpsock_e = g_list_next (udpsock_e)) { udpsock = udpsock_e->data; if (port == udpsock->port && !strcmp (multicast_ip, udpsock->multicast_ip) && ((local_ip == NULL && udpsock->local_ip == NULL) || (local_ip && udpsock->local_ip && !strcmp (local_ip, udpsock->local_ip)))) { if (ttl > udpsock->current_ttl) { if (setsockopt (udpsock->fd, IPPROTO_IP, IP_MULTICAST_TTL, (const void *)&ttl, sizeof (ttl)) < 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Error setting the multicast TTL: %s", g_strerror (errno)); return NULL; } udpsock->current_ttl = ttl; } g_byte_array_append (udpsock->ttls, &ttl, 1); return udpsock; } } return NULL; } UdpSock * fs_multicast_transmitter_get_udpsock (FsMulticastTransmitter *trans, guint component_id, const gchar *local_ip, const gchar *multicast_ip, guint16 port, guint8 ttl, gboolean sending, GError **error) { UdpSock *udpsock; UdpSock *tmpudpsock; GError *local_error = NULL; int tos; /* First lets check if we already have one */ if (component_id > trans->components) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid component %d > %d", component_id, trans->components); return NULL; } FS_MULTICAST_TRANSMITTER_LOCK (trans); udpsock = fs_multicast_transmitter_get_udpsock_locked (trans, component_id, local_ip, multicast_ip, port, ttl, sending, &local_error); tos = trans->priv->type_of_service; FS_MULTICAST_TRANSMITTER_UNLOCK (trans); if (local_error) { g_propagate_error (error, local_error); return NULL; } if (udpsock) { if (sending) fs_multicast_transmitter_udpsock_inc_sending (udpsock); return udpsock; } udpsock = g_slice_new0 (UdpSock); udpsock->local_ip = g_strdup (local_ip); udpsock->multicast_ip = g_strdup (multicast_ip); udpsock->fd = -1; udpsock->component_id = component_id; udpsock->port = port; udpsock->current_ttl = ttl; udpsock->ttls = g_byte_array_new (); g_byte_array_append (udpsock->ttls, &ttl, 1); /* Now lets bind both ports */ udpsock->fd = _bind_port (local_ip, multicast_ip, port, ttl, tos, error); if (udpsock->fd < 0) goto error; udpsock->socket = g_socket_new_from_fd (udpsock->fd, error); if (!udpsock->socket) goto error; /* Now lets create the elements */ udpsock->tee = trans->priv->udpsink_tees[component_id]; udpsock->funnel = trans->priv->udpsrc_funnels[component_id]; udpsock->udpsrc = _create_sinksource ("udpsrc", GST_BIN (trans->priv->gst_src), udpsock->funnel, udpsock->socket, GST_PAD_SRC, &udpsock->udpsrc_requested_pad, error); if (!udpsock->udpsrc) goto error; udpsock->udpsink = _create_sinksource ("multiudpsink", GST_BIN (trans->priv->gst_sink), udpsock->tee, udpsock->socket, GST_PAD_SINK, &udpsock->udpsink_requested_pad, error); if (!udpsock->udpsink) goto error; g_object_set (udpsock->udpsink, "async", FALSE, "sync", FALSE, NULL); FS_MULTICAST_TRANSMITTER_LOCK (trans); /* Check if someone else has added the same thing at the same time */ tmpudpsock = fs_multicast_transmitter_get_udpsock_locked (trans, component_id, local_ip, multicast_ip, port, ttl, sending, &local_error); if (tmpudpsock || local_error) { FS_MULTICAST_TRANSMITTER_UNLOCK (trans); fs_multicast_transmitter_put_udpsock (trans, udpsock, ttl); if (local_error) { g_propagate_error (error, local_error); goto error; } if (sending) fs_multicast_transmitter_udpsock_inc_sending (udpsock); return tmpudpsock; } trans->priv->udpsocks[component_id] = g_list_prepend (trans->priv->udpsocks[component_id], udpsock); FS_MULTICAST_TRANSMITTER_UNLOCK (trans); if (sending) fs_multicast_transmitter_udpsock_inc_sending (udpsock); return udpsock; error: fs_multicast_transmitter_put_udpsock (trans, udpsock, ttl); return NULL; } void fs_multicast_transmitter_put_udpsock (FsMulticastTransmitter *trans, UdpSock *udpsock, guint8 ttl) { guint i; FS_MULTICAST_TRANSMITTER_LOCK (trans); for (i = udpsock->ttls->len - 1;; i--) { if (udpsock->ttls->data[i] == ttl) { g_byte_array_remove_index_fast (udpsock->ttls, i); break; } g_return_if_fail (i > 0); } if (udpsock->ttls->len > 0) { g_assert (udpsock->fd >= 0); /* If we were the max, check if there is a new max */ if (udpsock->current_ttl == ttl && ttl > 1) { guint8 max = 1; for (i = 0; i < udpsock->ttls->len; i++) { if (udpsock->ttls->data[i] > max) max = udpsock->ttls->data[i]; } if (max != udpsock->current_ttl) { if (setsockopt (udpsock->fd, IPPROTO_IP, IP_MULTICAST_TTL, (const void *)&max, sizeof (max)) < 0) { GST_WARNING ("Error setting the multicast TTL to %u: %s", max, g_strerror (errno)); FS_MULTICAST_TRANSMITTER_UNLOCK (trans); return; } udpsock->current_ttl = max; } } FS_MULTICAST_TRANSMITTER_UNLOCK (trans); return; } trans->priv->udpsocks[udpsock->component_id] = g_list_remove (trans->priv->udpsocks[udpsock->component_id], udpsock); FS_MULTICAST_TRANSMITTER_UNLOCK (trans); if (udpsock->udpsrc) { GstStateChangeReturn ret; gst_element_set_locked_state (udpsock->udpsrc, TRUE); ret = gst_element_set_state (udpsock->udpsrc, GST_STATE_NULL); if (ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("Error changing state of udpsrc: %s", gst_element_state_change_return_get_name (ret)); if (!gst_bin_remove (GST_BIN (trans->priv->gst_src), udpsock->udpsrc)) GST_ERROR ("Could not remove udpsrc element from transmitter source"); } if (udpsock->udpsrc_requested_pad) { gst_element_release_request_pad (udpsock->funnel, udpsock->udpsrc_requested_pad); gst_object_unref (udpsock->udpsrc_requested_pad); } if (udpsock->udpsink_requested_pad) { gst_element_release_request_pad (udpsock->tee, udpsock->udpsink_requested_pad); gst_object_unref (udpsock->udpsink_requested_pad); } if (udpsock->udpsink) { GstStateChangeReturn ret; gst_element_set_locked_state (udpsock->udpsink, TRUE); ret = gst_element_set_state (udpsock->udpsink, GST_STATE_NULL); if (ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("Error changing state of udpsink: %s", gst_element_state_change_return_get_name (ret)); if (!gst_bin_remove (GST_BIN (trans->priv->gst_sink), udpsock->udpsink)) GST_ERROR ("Could not remove udpsink element from transmitter source"); } if (udpsock->socket) g_object_unref (udpsock->socket); if (udpsock->fd >= 0) close (udpsock->fd); g_byte_array_free (udpsock->ttls, TRUE); g_free (udpsock->multicast_ip); g_free (udpsock->local_ip); g_slice_free (UdpSock, udpsock); } void fs_multicast_transmitter_udpsock_inc_sending (UdpSock *udpsock) { if (g_atomic_int_add (&udpsock->sendcount, 1) == 0) { g_signal_emit_by_name (udpsock->udpsink, "add", udpsock->multicast_ip, udpsock->port); gst_element_send_event (udpsock->udpsink, gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, gst_structure_new ("GstForceKeyUnit", "all-headers", G_TYPE_BOOLEAN, TRUE, NULL))); } } void fs_multicast_transmitter_udpsock_dec_sending (UdpSock *udpsock) { if (g_atomic_int_dec_and_test (&udpsock->sendcount)) { g_signal_emit_by_name (udpsock->udpsink, "remove", udpsock->multicast_ip, udpsock->port); } } static GType fs_multicast_transmitter_get_stream_transmitter_type ( FsTransmitter *transmitter) { return FS_TYPE_MULTICAST_STREAM_TRANSMITTER; } void fs_multicast_transmitter_udpsock_ref (FsMulticastTransmitter *trans, UdpSock *udpsock, guint8 ttl) { FS_MULTICAST_TRANSMITTER_LOCK (trans); g_byte_array_append (udpsock->ttls, &ttl, 1); FS_MULTICAST_TRANSMITTER_UNLOCK (trans); } static void fs_multicast_transmitter_set_type_of_service (FsMulticastTransmitter *self, gint tos) { gint i; FS_MULTICAST_TRANSMITTER_LOCK (self); if (self->priv->type_of_service == tos) goto out; self->priv->type_of_service = tos; for (i = 0; i < self->components; i++) { GList *item; for (item = self->priv->udpsocks[i]; item; item = item->next) { UdpSock *udpsock = item->data; if (setsockopt (udpsock->fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) GST_WARNING ( "could not set socket tos: %s", g_strerror (errno)); #ifdef IPV6_TCLASS if (setsockopt (udpsock->fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); #endif } } out: FS_MULTICAST_TRANSMITTER_UNLOCK (self); } farstream-0.2.7/transmitters/multicast/fs-multicast-stream-transmitter.h0000664000076400007640000000663411710041463023640 00000000000000/* * Farstream - Farstream Multicast UDP Stream Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-multicast stream-transmitter.h - A Farstream Multicast UDP stream transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_MULTICAST_STREAM_TRANSMITTER_H__ #define __FS_MULTICAST_STREAM_TRANSMITTER_H__ #include #include #include #include #include "fs-multicast-transmitter.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_MULTICAST_STREAM_TRANSMITTER \ (fs_multicast_stream_transmitter_get_type ()) #define FS_MULTICAST_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_MULTICAST_STREAM_TRANSMITTER, \ FsMulticastStreamTransmitter)) #define FS_MULTICAST_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_MULTICAST_STREAM_TRANSMITTER, \ FsMulticastStreamTransmitterClass)) #define FS_IS_MULTICAST_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_MULTICAST_STREAM_TRANSMITTER)) #define FS_IS_MULTICAST_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_MULTICAST_STREAM_TRANSMITTER)) #define FS_MULTICAST_STREAM_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_MULTICAST_STREAM_TRANSMITTER, \ FsMulticastStreamTransmitterClass)) #define FS_MULTICAST_STREAM_TRANSMITTER_CAST(obj) ((FsMulticastStreamTransmitter *) (obj)) typedef struct _FsMulticastStreamTransmitter FsMulticastStreamTransmitter; typedef struct _FsMulticastStreamTransmitterClass FsMulticastStreamTransmitterClass; typedef struct _FsMulticastStreamTransmitterPrivate FsMulticastStreamTransmitterPrivate; /** * FsMulticastStreamTransmitterClass: * @parent_class: Our parent * * The Raw UDP stream transmitter class */ struct _FsMulticastStreamTransmitterClass { FsStreamTransmitterClass parent_class; /*virtual functions */ /*< private >*/ }; /** * FsMulticastStreamTransmitter: * @parent: Parent object * * All members are private, access them using methods and properties */ struct _FsMulticastStreamTransmitter { FsStreamTransmitter parent; /*< private >*/ FsMulticastStreamTransmitterPrivate *priv; }; GType fs_multicast_stream_transmitter_register_type (FsPlugin *module); GType fs_multicast_stream_transmitter_get_type (void); FsMulticastStreamTransmitter * fs_multicast_stream_transmitter_newv (FsMulticastTransmitter *transmitter, guint n_parameters, GParameter *parameters, GError **error); G_END_DECLS #endif /* __FS_MULTICAST_STREAM_TRANSMITTER_H__ */ farstream-0.2.7/transmitters/multicast/Makefile.in0000664000076400007640000007000012462321046017245 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = transmitters/multicast DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libmulticast_transmitter_la_DEPENDENCIES = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libmulticast_transmitter_la_OBJECTS = \ libmulticast_transmitter_la-fs-multicast-transmitter.lo \ libmulticast_transmitter_la-fs-multicast-stream-transmitter.lo libmulticast_transmitter_la_OBJECTS = \ $(am_libmulticast_transmitter_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libmulticast_transmitter_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libmulticast_transmitter_la_CFLAGS) $(CFLAGS) \ $(libmulticast_transmitter_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmulticast_transmitter_la_SOURCES) DIST_SOURCES = $(libmulticast_transmitter_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = $(FS_PLUGIN_PATH) prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = libmulticast-transmitter.la # sources used to compile this lib libmulticast_transmitter_la_SOURCES = \ fs-multicast-transmitter.c \ fs-multicast-stream-transmitter.c # flags used to compile this plugin libmulticast_transmitter_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) \ $(GIO_CFLAGS) libmulticast_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS) libmulticast_transmitter_la_LIBADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(FS_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) \ $(GIO_LIBS) noinst_HEADERS = \ fs-multicast-transmitter.h \ fs-multicast-stream-transmitter.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(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 transmitters/multicast/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu transmitters/multicast/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-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ } uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmulticast-transmitter.la: $(libmulticast_transmitter_la_OBJECTS) $(libmulticast_transmitter_la_DEPENDENCIES) $(EXTRA_libmulticast_transmitter_la_DEPENDENCIES) $(AM_V_CCLD)$(libmulticast_transmitter_la_LINK) -rpath $(plugindir) $(libmulticast_transmitter_la_OBJECTS) $(libmulticast_transmitter_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmulticast_transmitter_la-fs-multicast-stream-transmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmulticast_transmitter_la-fs-multicast-transmitter.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libmulticast_transmitter_la-fs-multicast-transmitter.lo: fs-multicast-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmulticast_transmitter_la_CFLAGS) $(CFLAGS) -MT libmulticast_transmitter_la-fs-multicast-transmitter.lo -MD -MP -MF $(DEPDIR)/libmulticast_transmitter_la-fs-multicast-transmitter.Tpo -c -o libmulticast_transmitter_la-fs-multicast-transmitter.lo `test -f 'fs-multicast-transmitter.c' || echo '$(srcdir)/'`fs-multicast-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmulticast_transmitter_la-fs-multicast-transmitter.Tpo $(DEPDIR)/libmulticast_transmitter_la-fs-multicast-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-multicast-transmitter.c' object='libmulticast_transmitter_la-fs-multicast-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmulticast_transmitter_la_CFLAGS) $(CFLAGS) -c -o libmulticast_transmitter_la-fs-multicast-transmitter.lo `test -f 'fs-multicast-transmitter.c' || echo '$(srcdir)/'`fs-multicast-transmitter.c libmulticast_transmitter_la-fs-multicast-stream-transmitter.lo: fs-multicast-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmulticast_transmitter_la_CFLAGS) $(CFLAGS) -MT libmulticast_transmitter_la-fs-multicast-stream-transmitter.lo -MD -MP -MF $(DEPDIR)/libmulticast_transmitter_la-fs-multicast-stream-transmitter.Tpo -c -o libmulticast_transmitter_la-fs-multicast-stream-transmitter.lo `test -f 'fs-multicast-stream-transmitter.c' || echo '$(srcdir)/'`fs-multicast-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmulticast_transmitter_la-fs-multicast-stream-transmitter.Tpo $(DEPDIR)/libmulticast_transmitter_la-fs-multicast-stream-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-multicast-stream-transmitter.c' object='libmulticast_transmitter_la-fs-multicast-stream-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmulticast_transmitter_la_CFLAGS) $(CFLAGS) -c -o libmulticast_transmitter_la-fs-multicast-stream-transmitter.lo `test -f 'fs-multicast-stream-transmitter.c' || echo '$(srcdir)/'`fs-multicast-stream-transmitter.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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)$(plugindir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-pluginLTLIBRARIES \ 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-pluginLTLIBRARIES 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-pluginLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pluginLTLIBRARIES 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 tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES # 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: farstream-0.2.7/transmitters/multicast/Makefile.am0000664000076400007640000000130312401500475017232 00000000000000 plugindir = $(FS_PLUGIN_PATH) plugin_LTLIBRARIES = libmulticast-transmitter.la # sources used to compile this lib libmulticast_transmitter_la_SOURCES = \ fs-multicast-transmitter.c \ fs-multicast-stream-transmitter.c # flags used to compile this plugin libmulticast_transmitter_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) \ $(GIO_CFLAGS) libmulticast_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS) libmulticast_transmitter_la_LIBADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(FS_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) \ $(GIO_LIBS) noinst_HEADERS = \ fs-multicast-transmitter.h \ fs-multicast-stream-transmitter.h farstream-0.2.7/transmitters/multicast/fs-multicast-stream-transmitter.c0000664000076400007640000004453212461773672023654 00000000000000/* * Farstream - Farstream Multicast UDP Stream Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-multicast-stream-transmitter.c - A Farstream Multiast UDP stream transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-multicast-stream-transmitter * @short_description: A stream transmitter object for Multicast UDP * @see_also: #FsRawUdpStreamTransmitter * * The multicast transmitter allows data to be sent over and received from * multicasted UDP on IPv4. * * This stream transmitter never emits local candidates. It will listen * to the port specified in the remote candidate. And will also send to that * port. It accepts only a single remote candidate per component, if a new one * is given, it will replace the previous one for that component. * * The transmitter will only stop sending to a multicast group when all of its * StreamTransmitters that have this multicast group as destination have their * "sending" property set to false. Multiple stream transmitters can point to * the same multicast groups from the same Transmitter (session), and only one * copy of each packet will be received. * * It will only listen to and send from the IP specified in the * prefered-local-candidates. There can be only one preferred candidate per * component. Only the component_id and the ip will be used from the preferred * local candidates, everything else is ignored. * * Packets sent will be looped back (so that other clients on the same session * can be on the same machine. * * The name of this transmitter is "multicast". */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-multicast-stream-transmitter.h" #include "fs-multicast-transmitter.h" #include #include #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifdef G_OS_WIN32 # include #else /*G_OS_WIN32*/ # include # include # include # include #endif /*G_OS_WIN32*/ GST_DEBUG_CATEGORY_EXTERN (fs_multicast_transmitter_debug); #define GST_CAT_DEFAULT fs_multicast_transmitter_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_SENDING, PROP_PREFERRED_LOCAL_CANDIDATES }; struct _FsMulticastStreamTransmitterPrivate { gboolean disposed; /* We don't actually hold a ref to this, * But since our parent FsStream can not exist without its parent * FsSession, we should be safe */ FsMulticastTransmitter *transmitter; GMutex mutex; /* Protected by the mutex */ gboolean sending; /* * We have at most of those per component (index 0 is unused) */ FsCandidate **local_candidate; /* Protected by the mutex */ FsCandidate **remote_candidate; /* Protected by the mutex */ UdpSock **udpsocks; GList *preferred_local_candidates; }; #define FS_MULTICAST_STREAM_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_MULTICAST_STREAM_TRANSMITTER, \ FsMulticastStreamTransmitterPrivate)) #define FS_MULTICAST_STREAM_TRANSMITTER_LOCK(s) \ g_mutex_lock (&(s)->priv->mutex) #define FS_MULTICAST_STREAM_TRANSMITTER_UNLOCK(s) \ g_mutex_unlock (&(s)->priv->mutex) static void fs_multicast_stream_transmitter_class_init (FsMulticastStreamTransmitterClass *klass); static void fs_multicast_stream_transmitter_init (FsMulticastStreamTransmitter *self); static void fs_multicast_stream_transmitter_dispose (GObject *object); static void fs_multicast_stream_transmitter_finalize (GObject *object); static void fs_multicast_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_multicast_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static gboolean fs_multicast_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error); static GObjectClass *parent_class = NULL; // static guint signals[LAST_SIGNAL] = { 0 }; static GType type = 0; GType fs_multicast_stream_transmitter_get_type (void) { return type; } GType fs_multicast_stream_transmitter_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsMulticastStreamTransmitterClass), NULL, NULL, (GClassInitFunc) fs_multicast_stream_transmitter_class_init, NULL, NULL, sizeof (FsMulticastStreamTransmitter), 0, (GInstanceInitFunc) fs_multicast_stream_transmitter_init }; type = g_type_module_register_type (G_TYPE_MODULE (module), FS_TYPE_STREAM_TRANSMITTER, "FsMulticastStreamTransmitter", &info, 0); return type; } static void fs_multicast_stream_transmitter_class_init (FsMulticastStreamTransmitterClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; FsStreamTransmitterClass *streamtransmitterclass = FS_STREAM_TRANSMITTER_CLASS (klass); parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_multicast_stream_transmitter_set_property; gobject_class->get_property = fs_multicast_stream_transmitter_get_property; streamtransmitterclass->force_remote_candidates = fs_multicast_stream_transmitter_force_remote_candidates; g_object_class_override_property (gobject_class, PROP_SENDING, "sending"); g_object_class_override_property (gobject_class, PROP_PREFERRED_LOCAL_CANDIDATES, "preferred-local-candidates"); gobject_class->dispose = fs_multicast_stream_transmitter_dispose; gobject_class->finalize = fs_multicast_stream_transmitter_finalize; g_type_class_add_private (klass, sizeof (FsMulticastStreamTransmitterPrivate)); } static void fs_multicast_stream_transmitter_init (FsMulticastStreamTransmitter *self) { /* member init */ self->priv = FS_MULTICAST_STREAM_TRANSMITTER_GET_PRIVATE (self); self->priv->disposed = FALSE; self->priv->sending = TRUE; g_mutex_init (&self->priv->mutex); } static void fs_multicast_stream_transmitter_dispose (GObject *object) { FsMulticastStreamTransmitter *self = FS_MULTICAST_STREAM_TRANSMITTER (object); if (self->priv->disposed) /* If dispose did already run, return. */ return; if (self->priv->udpsocks) { if (self->priv->udpsocks[1]) { if (self->priv->sending) fs_multicast_transmitter_udpsock_dec_sending ( self->priv->udpsocks[1]); fs_multicast_transmitter_put_udpsock (self->priv->transmitter, self->priv->udpsocks[1], self->priv->remote_candidate[1]->ttl); self->priv->udpsocks[1] = NULL; } } /* Make sure dispose does not run twice. */ self->priv->disposed = TRUE; parent_class->dispose (object); } static void fs_multicast_stream_transmitter_finalize (GObject *object) { FsMulticastStreamTransmitter *self = FS_MULTICAST_STREAM_TRANSMITTER (object); gint c; /* component_id */ if (self->priv->preferred_local_candidates) { fs_candidate_list_destroy (self->priv->preferred_local_candidates); self->priv->preferred_local_candidates = NULL; } if (self->priv->remote_candidate) { for (c = 1; c <= self->priv->transmitter->components; c++) { if (self->priv->remote_candidate[c]) fs_candidate_destroy (self->priv->remote_candidate[c]); self->priv->remote_candidate[c] = NULL; } g_free (self->priv->remote_candidate); self->priv->remote_candidate = NULL; } if (self->priv->local_candidate) { for (c = 1; c <= self->priv->transmitter->components; c++) { if (self->priv->local_candidate[c]) fs_candidate_destroy (self->priv->local_candidate[c]); self->priv->local_candidate[c] = NULL; } g_free (self->priv->local_candidate); self->priv->local_candidate = NULL; } g_free (self->priv->udpsocks); self->priv->udpsocks = NULL; g_mutex_clear (&self->priv->mutex); parent_class->finalize (object); } static void fs_multicast_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsMulticastStreamTransmitter *self = FS_MULTICAST_STREAM_TRANSMITTER (object); switch (prop_id) { case PROP_SENDING: FS_MULTICAST_STREAM_TRANSMITTER_LOCK (self); g_value_set_boolean (value, self->priv->sending); FS_MULTICAST_STREAM_TRANSMITTER_UNLOCK (self); break; case PROP_PREFERRED_LOCAL_CANDIDATES: g_value_set_boxed (value, self->priv->preferred_local_candidates); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_multicast_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsMulticastStreamTransmitter *self = FS_MULTICAST_STREAM_TRANSMITTER (object); switch (prop_id) { case PROP_SENDING: { gboolean old_sending = self->priv->sending; gboolean sending = g_value_get_boolean (value); FS_MULTICAST_STREAM_TRANSMITTER_LOCK (self); self->priv->sending = sending; if (sending != old_sending) if (self->priv->udpsocks[1]) { guint8 ttl = self->priv->remote_candidate[1]->ttl; fs_multicast_transmitter_udpsock_ref (self->priv->transmitter, self->priv->udpsocks[1], ttl); FS_MULTICAST_STREAM_TRANSMITTER_UNLOCK (self); if (sending) fs_multicast_transmitter_udpsock_inc_sending ( self->priv->udpsocks[1]); else fs_multicast_transmitter_udpsock_dec_sending ( self->priv->udpsocks[1]); fs_multicast_transmitter_put_udpsock (self->priv->transmitter, self->priv->udpsocks[1], ttl); FS_MULTICAST_STREAM_TRANSMITTER_LOCK (self); } FS_MULTICAST_STREAM_TRANSMITTER_UNLOCK (self); } break; case PROP_PREFERRED_LOCAL_CANDIDATES: self->priv->preferred_local_candidates = g_value_dup_boxed (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static gboolean fs_multicast_stream_transmitter_build (FsMulticastStreamTransmitter *self, GError **error) { GList *item; gint c; self->priv->udpsocks = g_new0 (UdpSock *, self->priv->transmitter->components + 1); self->priv->local_candidate = g_new0 (FsCandidate *, self->priv->transmitter->components + 1); self->priv->remote_candidate = g_new0 (FsCandidate *, self->priv->transmitter->components + 1); for (item = g_list_first (self->priv->preferred_local_candidates); item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (candidate->proto != FS_NETWORK_PROTOCOL_UDP) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You set preferred candidate of a type %d that is not" " FS_NETWORK_PROTOCOL_UDP", candidate->proto); return FALSE; } if (candidate->component_id == 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Component id 0 is invalid"); return FALSE; } if (candidate->component_id > self->priv->transmitter->components) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You specified an invalid component id %d with is higher" " than the maximum %d", candidate->component_id, self->priv->transmitter->components); return FALSE; } if (self->priv->local_candidate[candidate->component_id]) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You set more than one preferred local candidate for component %u", candidate->component_id); return FALSE; } if (candidate->ip == NULL) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You have not set the local ip address for the preferred candidate" " for this component"); return FALSE; } self->priv->local_candidate[candidate->component_id] = fs_candidate_copy (candidate); } for (c = 1; c <= self->priv->transmitter->components; c++) { if (!self->priv->local_candidate[c]) { self->priv->local_candidate[c] = fs_candidate_new (NULL, c, FS_CANDIDATE_TYPE_MULTICAST, FS_NETWORK_PROTOCOL_UDP, NULL, 0); } } return TRUE; } static gboolean fs_multicast_stream_transmitter_add_remote_candidate ( FsMulticastStreamTransmitter *self, FsCandidate *candidate, GError **error) { UdpSock *newudpsock = NULL; FS_MULTICAST_STREAM_TRANSMITTER_LOCK (self); if (self->priv->remote_candidate[candidate->component_id]) { FsCandidate *old_candidate = self->priv->remote_candidate[candidate->component_id]; if (old_candidate->port == candidate->port && old_candidate->ttl == candidate->ttl && !strcmp (old_candidate->ip, candidate->ip)) { GST_DEBUG ("Re-set the same candidate, ignoring"); FS_MULTICAST_STREAM_TRANSMITTER_UNLOCK (self); return TRUE; } } FS_MULTICAST_STREAM_TRANSMITTER_UNLOCK (self); /* * IMPROVE ME: We should probably check that the candidate's IP * has the format x.x.x.x where x is [0,255] using GRegex, etc * We should also check if the address is in the multicast range */ newudpsock = fs_multicast_transmitter_get_udpsock ( self->priv->transmitter, candidate->component_id, self->priv->local_candidate[candidate->component_id]->ip, candidate->ip, candidate->port, candidate->ttl, candidate->component_id == 1 ? self->priv->sending : TRUE, error); if (!newudpsock) return FALSE; FS_MULTICAST_STREAM_TRANSMITTER_LOCK (self); if (self->priv->udpsocks[candidate->component_id] && candidate->component_id == 1) { if (self->priv->sending) fs_multicast_transmitter_udpsock_dec_sending ( self->priv->udpsocks[candidate->component_id]); fs_multicast_transmitter_put_udpsock (self->priv->transmitter, self->priv->udpsocks[candidate->component_id], self->priv->remote_candidate[candidate->component_id]->ttl); } self->priv->udpsocks[candidate->component_id] = newudpsock; fs_candidate_destroy (self->priv->remote_candidate[candidate->component_id]); self->priv->remote_candidate[candidate->component_id] = fs_candidate_copy (candidate); FS_MULTICAST_STREAM_TRANSMITTER_UNLOCK (self); g_signal_emit_by_name (self, "new-active-candidate-pair", self->priv->local_candidate[candidate->component_id], self->priv->remote_candidate[candidate->component_id]); return TRUE; } static gboolean fs_multicast_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error) { GList *item = NULL; FsMulticastStreamTransmitter *self = FS_MULTICAST_STREAM_TRANSMITTER (streamtransmitter); for (item = candidates; item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (candidate->proto != FS_NETWORK_PROTOCOL_UDP) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You set a candidate of a type %d that is not" " FS_NETWORK_PROTOCOL_UDP", candidate->proto); return FALSE; } if (candidate->type != FS_CANDIDATE_TYPE_MULTICAST) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The remote candidate is not of the right type, it should be" " FS_CANDIDATE_TYPE_MULTICAST (%d), but it is %d", FS_CANDIDATE_TYPE_MULTICAST, candidate->type); return FALSE; } if (!candidate->ip) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The candidate passed does not contain a valid ip"); return FALSE; } if (candidate->component_id == 0 || candidate->component_id > self->priv->transmitter->components) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The candidate passed has an invalid component id %u (not in [1,%u])", candidate->component_id, self->priv->transmitter->components); return FALSE; } if (candidate->ttl == 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The TTL for IPv4 multicast candidates must not be 0"); return FALSE; } } for (item = candidates; item; item = g_list_next (item)) if (!fs_multicast_stream_transmitter_add_remote_candidate (self, item->data, error)) return FALSE; return TRUE; } FsMulticastStreamTransmitter * fs_multicast_stream_transmitter_newv (FsMulticastTransmitter *transmitter, guint n_parameters, GParameter *parameters, GError **error) { FsMulticastStreamTransmitter *streamtransmitter = NULL; streamtransmitter = g_object_newv (FS_TYPE_MULTICAST_STREAM_TRANSMITTER, n_parameters, parameters); if (!streamtransmitter) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the stream transmitter"); return NULL; } streamtransmitter->priv->transmitter = transmitter; if (!fs_multicast_stream_transmitter_build (streamtransmitter, error)) { g_object_unref (streamtransmitter); return NULL; } return streamtransmitter; } farstream-0.2.7/transmitters/nice/0000775000076400007640000000000012462323000014164 500000000000000farstream-0.2.7/transmitters/nice/fs-nice-stream-transmitter.h0000664000076400007640000000640311710041463021454 00000000000000/* * Farstream - Farstream libnice Stream Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-nice-stream-transmitter.h - A Farstream libnice based stream transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_NICE_STREAM_TRANSMITTER_H__ #define __FS_NICE_STREAM_TRANSMITTER_H__ #include #include #include #include #include "fs-nice-transmitter.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_NICE_STREAM_TRANSMITTER \ (fs_nice_stream_transmitter_get_type ()) #define FS_NICE_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_NICE_STREAM_TRANSMITTER, \ FsNiceStreamTransmitter)) #define FS_NICE_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_NICE_STREAM_TRANSMITTER, \ FsNiceStreamTransmitterClass)) #define FS_IS_NICE_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_NICE_STREAM_TRANSMITTER)) #define FS_IS_NICE_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_NICE_STREAM_TRANSMITTER)) #define FS_NICE_STREAM_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_NICE_STREAM_TRANSMITTER, \ FsNiceStreamTransmitterClass)) #define FS_NICE_STREAM_TRANSMITTER_CAST(obj) ((FsNiceStreamTransmitter *) (obj)) typedef struct _FsNiceStreamTransmitter FsNiceStreamTransmitter; typedef struct _FsNiceStreamTransmitterClass FsNiceStreamTransmitterClass; typedef struct _FsNiceStreamTransmitterPrivate FsNiceStreamTransmitterPrivate; /** * FsNiceStreamTransmitterClass: * @parent_class: Our parent * * The Raw UDP stream transmitter class */ struct _FsNiceStreamTransmitterClass { FsStreamTransmitterClass parent_class; /*virtual functions */ /*< private >*/ }; /** * FsNiceStreamTransmitter: * @parent: Parent object * * All members are private, access them using methods and properties */ struct _FsNiceStreamTransmitter { FsStreamTransmitter parent; /*< private >*/ FsNiceStreamTransmitterPrivate *priv; }; GType fs_nice_stream_transmitter_register_type (FsPlugin *module); GType fs_nice_stream_transmitter_get_type (void); FsNiceStreamTransmitter * fs_nice_stream_transmitter_newv (FsNiceTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error); G_END_DECLS #endif /* __FS_NICE_STREAM_TRANSMITTER_H__ */ farstream-0.2.7/transmitters/nice/Makefile.in0000664000076400007640000007174312462321046016175 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = transmitters/nice DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libnice_transmitter_la_DEPENDENCIES = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libnice_transmitter_la_OBJECTS = \ libnice_transmitter_la-fs-nice-transmitter.lo \ libnice_transmitter_la-fs-nice-stream-transmitter.lo \ libnice_transmitter_la-fs-nice-agent.lo libnice_transmitter_la_OBJECTS = $(am_libnice_transmitter_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libnice_transmitter_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libnice_transmitter_la_CFLAGS) $(CFLAGS) \ $(libnice_transmitter_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libnice_transmitter_la_SOURCES) DIST_SOURCES = $(libnice_transmitter_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = $(FS_PLUGIN_PATH) prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = libnice-transmitter.la # sources used to compile this lib libnice_transmitter_la_SOURCES = \ fs-nice-transmitter.c \ fs-nice-stream-transmitter.c \ fs-nice-agent.c # flags used to compile this plugin libnice_transmitter_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) \ $(NICE_CFLAGS) libnice_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS) libnice_transmitter_la_LIBADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(FS_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) \ $(NICE_LIBS) noinst_HEADERS = \ fs-nice-transmitter.h \ fs-nice-stream-transmitter.h \ fs-nice-agent.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(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 transmitters/nice/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu transmitters/nice/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-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ } uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libnice-transmitter.la: $(libnice_transmitter_la_OBJECTS) $(libnice_transmitter_la_DEPENDENCIES) $(EXTRA_libnice_transmitter_la_DEPENDENCIES) $(AM_V_CCLD)$(libnice_transmitter_la_LINK) -rpath $(plugindir) $(libnice_transmitter_la_OBJECTS) $(libnice_transmitter_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnice_transmitter_la-fs-nice-agent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnice_transmitter_la-fs-nice-stream-transmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnice_transmitter_la-fs-nice-transmitter.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libnice_transmitter_la-fs-nice-transmitter.lo: fs-nice-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnice_transmitter_la_CFLAGS) $(CFLAGS) -MT libnice_transmitter_la-fs-nice-transmitter.lo -MD -MP -MF $(DEPDIR)/libnice_transmitter_la-fs-nice-transmitter.Tpo -c -o libnice_transmitter_la-fs-nice-transmitter.lo `test -f 'fs-nice-transmitter.c' || echo '$(srcdir)/'`fs-nice-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnice_transmitter_la-fs-nice-transmitter.Tpo $(DEPDIR)/libnice_transmitter_la-fs-nice-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-nice-transmitter.c' object='libnice_transmitter_la-fs-nice-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnice_transmitter_la_CFLAGS) $(CFLAGS) -c -o libnice_transmitter_la-fs-nice-transmitter.lo `test -f 'fs-nice-transmitter.c' || echo '$(srcdir)/'`fs-nice-transmitter.c libnice_transmitter_la-fs-nice-stream-transmitter.lo: fs-nice-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnice_transmitter_la_CFLAGS) $(CFLAGS) -MT libnice_transmitter_la-fs-nice-stream-transmitter.lo -MD -MP -MF $(DEPDIR)/libnice_transmitter_la-fs-nice-stream-transmitter.Tpo -c -o libnice_transmitter_la-fs-nice-stream-transmitter.lo `test -f 'fs-nice-stream-transmitter.c' || echo '$(srcdir)/'`fs-nice-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnice_transmitter_la-fs-nice-stream-transmitter.Tpo $(DEPDIR)/libnice_transmitter_la-fs-nice-stream-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-nice-stream-transmitter.c' object='libnice_transmitter_la-fs-nice-stream-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnice_transmitter_la_CFLAGS) $(CFLAGS) -c -o libnice_transmitter_la-fs-nice-stream-transmitter.lo `test -f 'fs-nice-stream-transmitter.c' || echo '$(srcdir)/'`fs-nice-stream-transmitter.c libnice_transmitter_la-fs-nice-agent.lo: fs-nice-agent.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnice_transmitter_la_CFLAGS) $(CFLAGS) -MT libnice_transmitter_la-fs-nice-agent.lo -MD -MP -MF $(DEPDIR)/libnice_transmitter_la-fs-nice-agent.Tpo -c -o libnice_transmitter_la-fs-nice-agent.lo `test -f 'fs-nice-agent.c' || echo '$(srcdir)/'`fs-nice-agent.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnice_transmitter_la-fs-nice-agent.Tpo $(DEPDIR)/libnice_transmitter_la-fs-nice-agent.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-nice-agent.c' object='libnice_transmitter_la-fs-nice-agent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnice_transmitter_la_CFLAGS) $(CFLAGS) -c -o libnice_transmitter_la-fs-nice-agent.lo `test -f 'fs-nice-agent.c' || echo '$(srcdir)/'`fs-nice-agent.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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)$(plugindir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-pluginLTLIBRARIES \ 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-pluginLTLIBRARIES 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-pluginLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pluginLTLIBRARIES 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 tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES # 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: farstream-0.2.7/transmitters/nice/Makefile.am0000664000076400007640000000127612401500475016154 00000000000000 plugindir = $(FS_PLUGIN_PATH) plugin_LTLIBRARIES = libnice-transmitter.la # sources used to compile this lib libnice_transmitter_la_SOURCES = \ fs-nice-transmitter.c \ fs-nice-stream-transmitter.c \ fs-nice-agent.c # flags used to compile this plugin libnice_transmitter_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) \ $(NICE_CFLAGS) libnice_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS) libnice_transmitter_la_LIBADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(FS_LIBS) \ $(GST_BASE_LIBS) \ $(GST_LIBS) \ $(NICE_LIBS) noinst_HEADERS = \ fs-nice-transmitter.h \ fs-nice-stream-transmitter.h \ fs-nice-agent.h farstream-0.2.7/transmitters/nice/fs-nice-stream-transmitter.c0000664000076400007640000016512512462316243021464 00000000000000/* * Farstream - Farstream libnice Stream Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-nice-stream-transmitter.c - A Farstream libnice stream transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-nice-stream-transmitter * @short_description: A stream transmitter object for ICE using libnice * @see_also: #FsRawUdpStreamTransmitter * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-nice-stream-transmitter.h" #include "fs-nice-transmitter.h" #include "fs-nice-agent.h" #include #include #include #include #define GST_CAT_DEFAULT fs_nice_transmitter_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_SENDING, PROP_PREFERRED_LOCAL_CANDIDATES, PROP_STUN_IP, PROP_STUN_PORT, PROP_CONTROLLING_MODE, PROP_STREAM_ID, PROP_COMPATIBILITY_MODE, PROP_ASSOCIATE_ON_SOURCE, PROP_RELAY_INFO, PROP_MIN_PORT, PROP_MAX_PORT, PROP_ICE_TCP, PROP_ICE_UDP, PROP_RELIABLE, PROP_DEBUG, PROP_SEND_COMPONENT_MUX }; struct _FsNiceStreamTransmitterPrivate { FsNiceTransmitter *transmitter; FsNiceAgent *agent; guint stream_id; guint min_port; guint max_port; gchar *stun_ip; guint stun_port; gboolean controlling_mode; gboolean ice_udp; gboolean ice_tcp; gboolean reliable; gboolean send_component_mux; guint compatibility_mode; GMutex mutex; GList *preferred_local_candidates; gulong state_changed_handler_id; gulong gathering_done_handler_id; gulong new_selected_pair_handler_id; gulong new_candidate_handler_id; gulong tos_changed_handler_id; GPtrArray *relay_info; volatile gint associate_on_source; gboolean *component_has_been_ready; /* only from NiceAgent main thread */ /* Everything below is protected by the mutex */ gboolean sending; gboolean forced_candidates; GList *remote_candidates; GList *local_candidates; /* These are fixed and must be identical in the latest draft */ gchar *username; gchar *password; gboolean gathered; NiceGstStream *gststream; }; #define FS_NICE_STREAM_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_NICE_STREAM_TRANSMITTER, \ FsNiceStreamTransmitterPrivate)) #define FS_NICE_STREAM_TRANSMITTER_LOCK(o) g_mutex_lock (&(o)->priv->mutex) #define FS_NICE_STREAM_TRANSMITTER_UNLOCK(o) g_mutex_unlock (&(o)->priv->mutex) static void fs_nice_stream_transmitter_class_init (FsNiceStreamTransmitterClass *klass); static void fs_nice_stream_transmitter_init (FsNiceStreamTransmitter *self); static void fs_nice_stream_transmitter_dispose (GObject *object); static void fs_nice_stream_transmitter_finalize (GObject *object); static void fs_nice_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_nice_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static gboolean fs_nice_stream_transmitter_add_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error); static gboolean fs_nice_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *remote_candidates, GError **error); static gboolean fs_nice_stream_transmitter_gather_local_candidates ( FsStreamTransmitter *streamtransmitter, GError **error); static void fs_nice_stream_transmitter_stop ( FsStreamTransmitter *streamtransmitter); static void agent_state_changed (NiceAgent *agent, guint stream_id, guint component_id, guint state, gpointer user_data); static void agent_gathering_done (NiceAgent *agent, guint stream_id, gpointer user_data); static void agent_new_selected_pair (NiceAgent *agent, guint stream_id, guint component_id, const gchar *lfoundation, const gchar *rfoundation, gpointer user_data); static void agent_new_candidate (NiceAgent *agent, guint stream_id, guint component_id, const gchar *foundation, gpointer user_data); static GstPadProbeReturn known_buffer_have_buffer_handler (GstPad *pad, GstPadProbeInfo *info, gpointer user_data); static GObjectClass *parent_class = NULL; // static guint signals[LAST_SIGNAL] = { 0 }; static GType type = 0; GType fs_nice_stream_transmitter_get_type (void) { return type; } GType fs_nice_stream_transmitter_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsNiceStreamTransmitterClass), NULL, NULL, (GClassInitFunc) fs_nice_stream_transmitter_class_init, NULL, NULL, sizeof (FsNiceStreamTransmitter), 0, (GInstanceInitFunc) fs_nice_stream_transmitter_init }; type = g_type_module_register_type (G_TYPE_MODULE (module), FS_TYPE_STREAM_TRANSMITTER, "FsNiceStreamTransmitter", &info, 0); return type; } static void fs_nice_stream_transmitter_class_init (FsNiceStreamTransmitterClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; FsStreamTransmitterClass *streamtransmitterclass = FS_STREAM_TRANSMITTER_CLASS (klass); parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_nice_stream_transmitter_set_property; gobject_class->get_property = fs_nice_stream_transmitter_get_property; gobject_class->dispose = fs_nice_stream_transmitter_dispose; gobject_class->finalize = fs_nice_stream_transmitter_finalize; streamtransmitterclass->add_remote_candidates = fs_nice_stream_transmitter_add_remote_candidates; streamtransmitterclass->force_remote_candidates = fs_nice_stream_transmitter_force_remote_candidates; streamtransmitterclass->gather_local_candidates = fs_nice_stream_transmitter_gather_local_candidates; streamtransmitterclass->stop = fs_nice_stream_transmitter_stop; g_type_class_add_private (klass, sizeof (FsNiceStreamTransmitterPrivate)); g_object_class_override_property (gobject_class, PROP_SENDING, "sending"); g_object_class_override_property (gobject_class, PROP_PREFERRED_LOCAL_CANDIDATES, "preferred-local-candidates"); g_object_class_override_property (gobject_class, PROP_ASSOCIATE_ON_SOURCE, "associate-on-source"); g_object_class_install_property (gobject_class, PROP_STUN_IP, g_param_spec_string ( "stun-ip", "STUN server", "The STUN server used to obtain server-reflexive candidates", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STUN_PORT, g_param_spec_uint ( "stun-port", "STUN server port", "The STUN server used to obtain server-reflexive candidates", 0, 65536, 3478, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CONTROLLING_MODE, g_param_spec_boolean ( "controlling-mode", "ICE controlling mode", "Whether the agent is in controlling mode", TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ICE_UDP, g_param_spec_boolean ( "ice-udp", "ICE UDP", "Whether the agent gathers UDP candidates", TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ICE_TCP, g_param_spec_boolean ( "ice-tcp", "ICE TCP", "Whether the agent gathers TCP candidates", TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_RELIABLE, g_param_spec_boolean ( "reliable", "reliable mode", "Whether the agent is reliable", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STREAM_ID, g_param_spec_uint ( "stream-id", "The id of the stream", "The id of the stream according to libnice", 0, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_COMPATIBILITY_MODE, g_param_spec_uint ( "compatibility-mode", "The compability-mode", "The id of the stream according to libnice", NICE_COMPATIBILITY_DRAFT19, NICE_COMPATIBILITY_LAST, NICE_COMPATIBILITY_DRAFT19, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * FsNiceStreamTransmitter:relay-info: * * This is a #GPtrArray containing one or more #GstStructure. * * The fields in the structure are: * * Required * * (gchar*) * ip * The IP address of the TURN server * * * (guint) * port * The port of the TURN server * * * (gchar*) * username * * * (gchar*) * password * * Optional * * (gchar *) * relay-type * The type of TURN server, can use "udp", "tcp" or "tls". * Defaults to "udp" if not specified. * * * (guint) * component * The component this TURN server and creditials will be used for. * If no component is specified, it will be used for all components where * no per-component details were specified. * This is useful if you want to specify different short term creditial * username/password combinations for Google and MSN compatibility modes. * * * * * Example: * |[ GPtrArray *relay_info = g_ptr_array_new_full (1, (GDestroyNotify) gst_structure_free); g_ptr_array_add (relay_info, gst_structure_new ("aa", "ip", G_TYPE_STRING, "127.0.0.1", "port", G_TYPE_UINT, 7654, "username", G_TYPE_STRING, "blah", "password", G_TYPE_STRING, "blah2", "relay-type", G_TYPE_STRING, "udp", NULL)); |] * */ g_object_class_install_property (gobject_class, PROP_RELAY_INFO, g_param_spec_boxed ( "relay-info", "Information for the TURN server", "ip/port/username/password/relay-type/component of the TURN servers" " in a GPtrArray of GstStructures", G_TYPE_PTR_ARRAY, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DEBUG, g_param_spec_boolean ( "debug", "Enable debug messages", "Whether the agent should enable libnice and stun debug messages", FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_MIN_PORT, g_param_spec_uint ( "min-port", "Minimal listen port", "Minimal port number for allocating host candidates." " 0 means use any port", 0, 65535, 0, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_MAX_PORT, g_param_spec_uint ( "max-port", "Maximal listen port", "Maximal port number for allocating host candidates." " It should apply that min-port < max-port; otherwise, any port is" " used, just as when the value is 0", 0, 65535, 0, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SEND_COMPONENT_MUX, g_param_spec_boolean ( "send-component-mux", "Send component mux", "Whether to mux all components on the same component as component 1", FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); } static void fs_nice_stream_transmitter_init (FsNiceStreamTransmitter *self) { /* member init */ self->priv = FS_NICE_STREAM_TRANSMITTER_GET_PRIVATE (self); self->priv->sending = TRUE; g_mutex_init (&self->priv->mutex); self->priv->controlling_mode = TRUE; self->priv->ice_udp = TRUE; self->priv->ice_tcp = TRUE; self->priv->reliable = TRUE; } static void fs_nice_stream_transmitter_dispose (GObject *object) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (object); fs_nice_stream_transmitter_stop (FS_STREAM_TRANSMITTER_CAST (object)); FS_NICE_STREAM_TRANSMITTER_LOCK (self); if (self->priv->state_changed_handler_id) g_signal_handler_disconnect (self->priv->agent->agent, self->priv->state_changed_handler_id); self->priv->state_changed_handler_id = 0; if (self->priv->gathering_done_handler_id) g_signal_handler_disconnect (self->priv->agent->agent, self->priv->gathering_done_handler_id); self->priv->gathering_done_handler_id = 0; if (self->priv->new_selected_pair_handler_id) g_signal_handler_disconnect (self->priv->agent->agent, self->priv->new_selected_pair_handler_id); self->priv->new_selected_pair_handler_id = 0; if (self->priv->new_candidate_handler_id) g_signal_handler_disconnect (self->priv->agent->agent, self->priv->new_candidate_handler_id); self->priv->new_candidate_handler_id = 0; if (self->priv->tos_changed_handler_id) g_signal_handler_disconnect (self->priv->transmitter, self->priv->tos_changed_handler_id); self->priv->tos_changed_handler_id = 0; if (self->priv->agent) { g_object_unref (self->priv->agent); self->priv->agent = NULL; } FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); if (self->priv->transmitter) { g_object_unref (self->priv->transmitter); self->priv->transmitter = NULL; } parent_class->dispose (object); } static void fs_nice_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (streamtransmitter); NiceGstStream *gststream; guint stream_id; FS_NICE_STREAM_TRANSMITTER_LOCK (self); gststream = self->priv->gststream; self->priv->gststream = NULL; stream_id = self->priv->stream_id; /* We can't unset the stream id because it gets messy fast, just leave it as * is, all calls should fail anyway */ FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); if (gststream) fs_nice_transmitter_free_gst_stream (self->priv->transmitter, gststream); if (stream_id) nice_agent_remove_stream (self->priv->agent->agent, stream_id); } static void fs_nice_stream_transmitter_finalize (GObject *object) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (object); fs_candidate_list_destroy (self->priv->preferred_local_candidates); fs_candidate_list_destroy (self->priv->remote_candidates); fs_candidate_list_destroy (self->priv->local_candidates); if (self->priv->relay_info) g_ptr_array_unref (self->priv->relay_info); g_free (self->priv->stun_ip); g_mutex_clear (&self->priv->mutex); g_free (self->priv->username); g_free (self->priv->password); g_free (self->priv->component_has_been_ready); parent_class->finalize (object); } static void fs_nice_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (object); switch (prop_id) { case PROP_SENDING: FS_NICE_STREAM_TRANSMITTER_LOCK (self); g_value_set_boolean (value, self->priv->sending); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); break; case PROP_PREFERRED_LOCAL_CANDIDATES: g_value_set_boxed (value, self->priv->preferred_local_candidates); break; case PROP_STUN_IP: if (self->priv->agent) g_object_get_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); else g_value_set_string (value, self->priv->stun_ip); break; case PROP_STUN_PORT: if (self->priv->agent) g_object_get_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); else g_value_set_uint (value, self->priv->stun_port); break; case PROP_CONTROLLING_MODE: if (self->priv->agent) g_object_get_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); else g_value_set_boolean (value, self->priv->controlling_mode); break; case PROP_ICE_UDP: if (self->priv->agent) g_object_get_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); else g_value_set_boolean (value, self->priv->ice_udp); break; case PROP_ICE_TCP: if (self->priv->agent) g_object_get_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); else g_value_set_boolean (value, self->priv->ice_tcp); break; case PROP_RELIABLE: if (self->priv->agent) g_object_get_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); else g_value_set_boolean (value, self->priv->reliable); break; case PROP_STREAM_ID: FS_NICE_STREAM_TRANSMITTER_LOCK (self); g_value_set_uint (value, self->priv->stream_id); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); break; case PROP_COMPATIBILITY_MODE: g_value_set_uint (value, self->priv->compatibility_mode); break; case PROP_ASSOCIATE_ON_SOURCE: g_value_set_boolean (value, g_atomic_int_get (&self->priv->associate_on_source)); break; case PROP_SEND_COMPONENT_MUX: g_value_set_boolean (value, self->priv->send_component_mux); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_nice_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (object); switch (prop_id) { case PROP_SENDING: FS_NICE_STREAM_TRANSMITTER_LOCK (self); self->priv->sending = g_value_get_boolean (value); if (self->priv->gststream) fs_nice_transmitter_set_sending (self->priv->transmitter, self->priv->gststream, g_value_get_boolean (value)); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); break; case PROP_PREFERRED_LOCAL_CANDIDATES: self->priv->preferred_local_candidates = g_value_dup_boxed (value); break; case PROP_STUN_IP: self->priv->stun_ip = g_value_dup_string (value); break; case PROP_STUN_PORT: self->priv->stun_port = g_value_get_uint (value); break; case PROP_CONTROLLING_MODE: self->priv->controlling_mode = g_value_get_boolean (value); if (self->priv->transmitter && self->priv->agent) g_object_set_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); break; case PROP_ICE_UDP: self->priv->ice_udp = g_value_get_boolean (value); if (self->priv->transmitter && self->priv->agent) g_object_set_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); break; case PROP_ICE_TCP: self->priv->ice_tcp = g_value_get_boolean (value); if (self->priv->transmitter && self->priv->agent) g_object_set_property (G_OBJECT (self->priv->agent->agent), g_param_spec_get_name (pspec), value); break; case PROP_RELIABLE: self->priv->reliable = g_value_get_boolean (value); break; case PROP_COMPATIBILITY_MODE: self->priv->compatibility_mode = g_value_get_uint (value); break; case PROP_ASSOCIATE_ON_SOURCE: g_atomic_int_set (&self->priv->associate_on_source, g_value_get_boolean (value)); break; case PROP_RELAY_INFO: self->priv->relay_info = g_value_dup_boxed (value); break; case PROP_MIN_PORT: self->priv->min_port = g_value_get_uint (value); break; case PROP_MAX_PORT: self->priv->max_port = g_value_get_uint (value); break; case PROP_DEBUG: if (g_value_get_boolean (value)) { nice_debug_enable (TRUE); } else { nice_debug_disable (TRUE); } break; case PROP_SEND_COMPONENT_MUX: self->priv->send_component_mux = g_value_get_boolean (value); if (self->priv->gststream != NULL) fs_nice_transmitter_set_send_component_mux (self->priv->transmitter, self->priv->gststream, self->priv->send_component_mux); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static NiceCandidateType fs_candidate_type_to_nice_candidate_type (FsCandidateType type) { switch (type) { case FS_CANDIDATE_TYPE_HOST: return NICE_CANDIDATE_TYPE_HOST; case FS_CANDIDATE_TYPE_SRFLX: return NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE; case FS_CANDIDATE_TYPE_PRFLX: return NICE_CANDIDATE_TYPE_PEER_REFLEXIVE; case FS_CANDIDATE_TYPE_RELAY: return NICE_CANDIDATE_TYPE_RELAYED; default: GST_WARNING ("Invalid candidate type %d, defaulting to type host", type); return NICE_CANDIDATE_TYPE_HOST; } } static NiceCandidateTransport fs_network_protocol_to_nice_candidate_protocol (FsNetworkProtocol proto) { switch (proto) { case FS_NETWORK_PROTOCOL_UDP: return NICE_CANDIDATE_TRANSPORT_UDP; case FS_NETWORK_PROTOCOL_TCP_ACTIVE: return NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE; case FS_NETWORK_PROTOCOL_TCP_PASSIVE: return NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE; case FS_NETWORK_PROTOCOL_TCP_SO: return NICE_CANDIDATE_TRANSPORT_TCP_SO; default: GST_WARNING ("Invalid Fs network protocol type %u", proto); return NICE_CANDIDATE_TRANSPORT_UDP; } } static NiceCandidate * fs_candidate_to_nice_candidate (FsNiceStreamTransmitter *self, FsCandidate *candidate) { NiceCandidate *nc = nice_candidate_new ( fs_candidate_type_to_nice_candidate_type (candidate->type)); nc->transport = fs_network_protocol_to_nice_candidate_protocol (candidate->proto); nc->priority = candidate->priority; nc->stream_id = self->priv->stream_id; nc->component_id = candidate->component_id; if (candidate->foundation != NULL) strncpy (nc->foundation, candidate->foundation, NICE_CANDIDATE_MAX_FOUNDATION - 1); nc->username = g_strdup(candidate->username); nc->password = g_strdup(candidate->password); if (candidate->ip == NULL) goto error; if (!nice_address_set_from_string (&nc->addr, candidate->ip)) goto error; nice_address_set_port (&nc->addr, candidate->port); if (candidate->base_ip && candidate->base_port) { if (!nice_address_set_from_string (&nc->base_addr, candidate->base_ip)) goto error; nice_address_set_port (&nc->base_addr, candidate->base_port); } return nc; error: nice_candidate_free (nc); return NULL; } static gboolean fs_nice_stream_transmitter_add_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (streamtransmitter); GList *item; GSList *nice_candidates = NULL; gint c; const gchar *username; const gchar *password; if (!candidates) { GST_DEBUG ("NULL candidates passed, lets do an ICE restart"); FS_NICE_STREAM_TRANSMITTER_LOCK (self); if (self->priv->remote_candidates) fs_candidate_list_destroy (self->priv->remote_candidates); self->priv->remote_candidates = NULL; self->priv->forced_candidates = FALSE; g_free (self->priv->username); g_free (self->priv->password); self->priv->username = NULL; self->priv->password = NULL; FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); nice_agent_restart (self->priv->agent->agent); return TRUE; } FS_NICE_STREAM_TRANSMITTER_LOCK (self); username = self->priv->username; password = self->priv->password; /* Validate candidates */ for (item = candidates; item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (!candidate->ip) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Candidate MUST have an IP address"); return FALSE; } if (candidate->component_id == 0 || candidate->component_id > self->priv->transmitter->components) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Candidate MUST have a component id between 1 and %d, %d is invalid", self->priv->transmitter->components, candidate->component_id); return FALSE; } if (candidate->type == FS_CANDIDATE_TYPE_MULTICAST) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "libnice transmitter does not accept multicast candidates"); return FALSE; } if (!candidate->username) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid remote candidates passed, does not have a username"); return FALSE; } if (self->priv->compatibility_mode != NICE_COMPATIBILITY_GOOGLE && !candidate->password) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid remote candidates passed, does not have a password"); return FALSE; } if (self->priv->compatibility_mode != NICE_COMPATIBILITY_GOOGLE && self->priv->compatibility_mode != NICE_COMPATIBILITY_MSN && self->priv->compatibility_mode != NICE_COMPATIBILITY_OC2007) { if (!username) { username = candidate->username; } else if (strcmp (username, candidate->username)) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid remote candidates passed, does not have the right" " username"); return FALSE; } if (!password) { password = candidate->password; } else if (strcmp (password, candidate->password)) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid remote candidates passed, does not have the right" " password"); return FALSE; } } } if (!self->priv->username) self->priv->username = g_strdup (username); if (!self->priv->password) self->priv->password = g_strdup (password); if (self->priv->forced_candidates) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Candidates have been forced, can't set remote candidates"); return FALSE; } if (!self->priv->gathered) { self->priv->remote_candidates = g_list_concat ( self->priv->remote_candidates, fs_candidate_list_copy (candidates)); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); return TRUE; } if (self->priv->compatibility_mode != NICE_COMPATIBILITY_GOOGLE && self->priv->compatibility_mode != NICE_COMPATIBILITY_MSN && self->priv->compatibility_mode != NICE_COMPATIBILITY_OC2007) { username = g_strdup (username); password = g_strdup (password); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); if (!nice_agent_set_remote_credentials (self->priv->agent->agent, self->priv->stream_id, username, password)) { g_free ((gchar*) username); g_free ((gchar*) password); g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Could not set the security credentials"); return FALSE; } g_free ((gchar*) username); g_free ((gchar*) password); } else { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); } for (c = 1; c <= self->priv->transmitter->components; c++) { for (item = candidates; item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (candidate->component_id == c) { NiceCandidate *nc = fs_candidate_to_nice_candidate (self, candidate); if (!nc) goto error; nice_candidates = g_slist_append (nice_candidates, nc); } } nice_agent_set_remote_candidates (self->priv->agent->agent, self->priv->stream_id, c, nice_candidates); g_slist_foreach (nice_candidates, (GFunc)nice_candidate_free, NULL); g_slist_free (nice_candidates); nice_candidates = NULL; } return TRUE; error: g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid remote candidates passed"); g_slist_foreach (nice_candidates, (GFunc) nice_candidate_free, NULL); g_slist_free (nice_candidates); return FALSE; } static gboolean fs_nice_stream_transmitter_force_remote_candidates_act ( FsNiceStreamTransmitter *self, GList *remote_candidates) { gboolean res = TRUE; GList *item = NULL; for (item = remote_candidates; item && res; item = g_list_next (item)) { FsCandidate *candidate = item->data; NiceCandidate *nc = fs_candidate_to_nice_candidate (self, candidate); res &= nice_agent_set_selected_remote_candidate (self->priv->agent->agent, self->priv->stream_id, candidate->component_id, nc); nice_candidate_free (nc); } return res; } static gboolean fs_nice_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *remote_candidates, GError **error) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (streamtransmitter); GList *item = NULL; gboolean res = TRUE; gboolean *done; done = g_new0(gboolean, self->priv->transmitter->components); memset (done, 0, self->priv->transmitter->components * sizeof (gboolean)); if (self->priv->stream_id == 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Can not call this function before gathering local candidates"); res = FALSE; goto out; } /* First lets check that we have valid candidates */ for (item = remote_candidates; item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (candidate->component_id < 1 || candidate->component_id > self->priv->transmitter->components) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The component on this candidate is wrong"); res = FALSE; goto out; } if (done[candidate->component_id-1]) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You can set only one candidate per component"); res = FALSE; goto out; } done[candidate->component_id-1] = TRUE; } FS_NICE_STREAM_TRANSMITTER_LOCK (self); self->priv->forced_candidates = TRUE; if (self->priv->gathered) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); res = fs_nice_stream_transmitter_force_remote_candidates_act (self, remote_candidates); } else { if (self->priv->remote_candidates) fs_candidate_list_destroy (self->priv->remote_candidates); self->priv->remote_candidates = fs_candidate_list_copy (remote_candidates); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); } if (!res) g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Unknown error while selecting remote candidates"); out: g_free(done); return res; } static FsCandidateType nice_candidate_type_to_fs_candidate_type (NiceCandidateType type) { switch (type) { case NICE_CANDIDATE_TYPE_HOST: return FS_CANDIDATE_TYPE_HOST; case NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE: return FS_CANDIDATE_TYPE_SRFLX; case NICE_CANDIDATE_TYPE_PEER_REFLEXIVE: return FS_CANDIDATE_TYPE_PRFLX; case NICE_CANDIDATE_TYPE_RELAYED: return FS_CANDIDATE_TYPE_RELAY; default: GST_WARNING ("Invalid candidate type %d, defaulting to type host", type); return FS_CANDIDATE_TYPE_HOST; } } static FsNetworkProtocol nice_candidate_transport_to_fs_network_protocol (NiceCandidateTransport trans) { switch (trans) { case NICE_CANDIDATE_TRANSPORT_UDP: return FS_NETWORK_PROTOCOL_UDP; case NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE: return FS_NETWORK_PROTOCOL_TCP_PASSIVE; case NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE: return FS_NETWORK_PROTOCOL_TCP_ACTIVE; case NICE_CANDIDATE_TRANSPORT_TCP_SO: return FS_NETWORK_PROTOCOL_TCP_SO; default: GST_WARNING ("Invalid Nice network transport type %u", trans); return FS_NETWORK_PROTOCOL_UDP; } } static FsCandidate * nice_candidate_to_fs_candidate (NiceAgent *agent, NiceCandidate *nicecandidate, gboolean local) { FsCandidate *fscandidate; gchar *ipaddr = g_malloc (INET6_ADDRSTRLEN); nice_address_to_string (&nicecandidate->addr, ipaddr); fscandidate = fs_candidate_new ( nicecandidate->foundation, nicecandidate->component_id, nice_candidate_type_to_fs_candidate_type (nicecandidate->type), nice_candidate_transport_to_fs_network_protocol ( nicecandidate->transport), ipaddr, nice_address_get_port (&nicecandidate->addr)); if (nice_address_is_valid (&nicecandidate->base_addr) && nicecandidate->type != NICE_CANDIDATE_TYPE_HOST) { nice_address_to_string (&nicecandidate->base_addr, ipaddr); fscandidate->base_ip = ipaddr; fscandidate->base_port = nice_address_get_port (&nicecandidate->base_addr); } else { g_free (ipaddr); ipaddr = NULL; } fscandidate->username = g_strdup (nicecandidate->username); fscandidate->password = g_strdup (nicecandidate->password); fscandidate->priority = nicecandidate->priority; if (local && fscandidate->username == NULL && fscandidate->password == NULL) { gchar *username = NULL, *password = NULL; nice_agent_get_local_credentials (agent, nicecandidate->stream_id, &username, &password); fscandidate->username = username; fscandidate->password = password; if (username == NULL || password == NULL) { GST_WARNING ("The stream has no credentials??"); } } return fscandidate; } static gboolean candidate_list_are_equal (GList *list1, GList *list2) { for (; list1 && list2; list1 = list1->next, list2 = list2->next) { FsCandidate *cand1 = list1->data; FsCandidate *cand2 = list2->data; if (strcmp (cand1->ip, cand2->ip)) return FALSE; } return TRUE; } static void weak_agent_removed (gpointer user_data, GObject *where_the_object_was) { GList *agents = NULL; FsParticipant *participant = user_data; FS_PARTICIPANT_DATA_LOCK (participant); agents = g_object_get_data (G_OBJECT (participant), "nice-agents"); agents = g_list_remove (agents, where_the_object_was); g_object_set_data (G_OBJECT (participant), "nice-agents", agents); FS_PARTICIPANT_DATA_UNLOCK (participant); g_object_unref (participant); } static gboolean fs_nice_stream_transmitter_set_relay_info (FsNiceStreamTransmitter *self, const GstStructure *s, guint component_id, GError **error) { const gchar *username, *password, *ip; const gchar *relay_type_string; NiceRelayType relay_type = NICE_RELAY_TYPE_TURN_UDP; guint port; gboolean has_port; ip = gst_structure_get_string (s, "ip"); has_port = gst_structure_get_uint (s, "port", &port); username = gst_structure_get_string (s, "username"); password = gst_structure_get_string (s, "password"); relay_type_string = gst_structure_get_string (s, "relay-type"); if (!ip || !has_port || !username || !password || port > 65535) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Need to pass an ip, port, username and password for a relay"); return FALSE; } if (relay_type_string) { if (!g_ascii_strcasecmp(relay_type_string, "tcp")) relay_type = NICE_RELAY_TYPE_TURN_TCP; else if (!g_ascii_strcasecmp(relay_type_string, "tls")) relay_type = NICE_RELAY_TYPE_TURN_TLS; } nice_agent_set_relay_info(self->priv->agent->agent, self->priv->stream_id, component_id, ip, port, username, password, relay_type); return TRUE; } static void tos_changed (GObject *transmitter, GParamSpec *param, FsNiceStreamTransmitter *self) { guint tos; g_object_get (transmitter, "tos", &tos, NULL); nice_agent_set_stream_tos (self->priv->agent->agent, self->priv->stream_id, tos); } static gboolean fs_nice_stream_transmitter_build (FsNiceStreamTransmitter *self, FsParticipant *participant, GError **error) { GList *item; GList *agents = NULL; FsNiceAgent *agent = NULL; gint i; /* Before going any further, check that the list of candidates are ok */ for (item = g_list_first (self->priv->preferred_local_candidates); item; item = g_list_next (item)) { FsCandidate *cand = item->data; if (cand->ip == NULL) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You have to set an ip on your preferred candidate"); return FALSE; } if (cand->port || cand->component_id) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You can not set a port or component id" " for the preferred nice candidate"); return FALSE; } if (cand->type != FS_CANDIDATE_TYPE_HOST) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You can only set preferred candidates of type host"); return FALSE; } } /* Now if we have a relayinfo, lets verify that its ok */ if (self->priv->relay_info) { for (i = 0; i < self->priv->relay_info->len; i++) { const GstStructure *s = g_ptr_array_index (self->priv->relay_info, i); if (!s) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Element %d of the relay-info GPtrArray is NULL", i); return FALSE; } if (!gst_structure_has_field_typed (s, "ip", G_TYPE_STRING)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Element %d of the relay-info does not have an ip as a string", i); return FALSE; } if (!gst_structure_has_field_typed (s, "port", G_TYPE_UINT)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Element %d of the relay-info does not have a port as a guint", i); return FALSE; } if (gst_structure_has_field (s, "username") && !gst_structure_has_field_typed (s, "username", G_TYPE_STRING)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Element %d of the relay-info has a username that is not a string", i); return FALSE; } if (gst_structure_has_field (s, "password") && !gst_structure_has_field_typed (s, "password", G_TYPE_STRING)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Element %d of the relay-info has a password that is not a string", i); return FALSE; } if (gst_structure_has_field (s, "relay-type") && !gst_structure_has_field_typed (s, "relay-type", G_TYPE_STRING)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Element %d of the relay-info a relay-type" " that is not a string", i); return FALSE; } if (gst_structure_has_field (s, "component") && !gst_structure_has_field_typed (s, "component", G_TYPE_UINT)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Element %d of the relay-info has a component that is not a uint", i); return FALSE; } } } /* First find if there is already a matching agent */ FS_PARTICIPANT_DATA_LOCK (participant); agents = g_object_get_data (G_OBJECT (participant), "nice-agents"); for (item = g_list_first (agents); item; item = g_list_next (item)) { guint stun_port; gchar *stun_server; guint compatibility; agent = item->data; g_object_get (agent->agent, "stun-server", &stun_server, "stun-server-port", &stun_port, "compatibility", &compatibility, NULL); /* * Check if the agent matches our requested criteria */ if (compatibility == self->priv->compatibility_mode && stun_port == self->priv->stun_port && (stun_server == self->priv->stun_ip || (stun_server && self->priv->stun_ip && !strcmp (stun_server, self->priv->stun_ip)))) { GList *prefs = NULL; g_object_get (G_OBJECT (agent), "preferred-local-candidates", &prefs, NULL); if (candidate_list_are_equal (prefs, self->priv->preferred_local_candidates)) { fs_candidate_list_destroy (prefs); break; } fs_candidate_list_destroy (prefs); } } /* In this case we need to build a new agent */ if (item == NULL) { agent = fs_nice_agent_new (self->priv->compatibility_mode, self->priv->preferred_local_candidates, self->priv->reliable, error); if (!agent) return FALSE; if (self->priv->stun_ip && self->priv->stun_port) g_object_set (agent->agent, "stun-server", self->priv->stun_ip, "stun-server-port", self->priv->stun_port, NULL); g_object_set (agent->agent, "controlling-mode", self->priv->controlling_mode, "ice-udp", self->priv->ice_udp, "ice-tcp", self->priv->ice_tcp, NULL); agents = g_list_prepend (agents, agent); g_object_set_data (G_OBJECT (participant), "nice-agents", agents); g_object_weak_ref (G_OBJECT (agent), weak_agent_removed, participant); g_object_ref (participant); self->priv->agent = agent; } else { self->priv->agent = g_object_ref (agent); } FS_PARTICIPANT_DATA_UNLOCK (participant); self->priv->component_has_been_ready = g_new0 (gboolean, self->priv->transmitter->components); self->priv->stream_id = nice_agent_add_stream ( self->priv->agent->agent, self->priv->transmitter->components); if (self->priv->stream_id == 0) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create libnice stream"); return FALSE; } /* if we have a relay- info, lets set it */ if (self->priv->relay_info) { gint c; for (c = 1; c <= self->priv->transmitter->components; c++) { gboolean relay_info_set = FALSE; for (i = 0; i < self->priv->relay_info->len; i++) { const GstStructure *s = g_ptr_array_index (self->priv->relay_info, i); guint component_id; if (gst_structure_get_uint (s, "component", &component_id) && component_id == c) { if (!fs_nice_stream_transmitter_set_relay_info (self, s, c, error)) return FALSE; relay_info_set = TRUE; } } if (!relay_info_set) { for (i = 0; i < self->priv->relay_info->len; i++) { const GstStructure *s = g_ptr_array_index (self->priv->relay_info, i); if (!gst_structure_has_field (s, "component")) if (!fs_nice_stream_transmitter_set_relay_info (self, s, c, error)) return FALSE; } } } } /* Set a port range if it has been specified. */ if (self->priv->min_port && (self->priv->min_port < self->priv->max_port)) { gint c; for (c = 1; c <= self->priv->transmitter->components; c++) { nice_agent_set_port_range (self->priv->agent->agent, self->priv->stream_id, c, self->priv->min_port, self->priv->max_port); } } self->priv->state_changed_handler_id = g_signal_connect_object (agent->agent, "component-state-changed", G_CALLBACK (agent_state_changed), self, 0); self->priv->gathering_done_handler_id = g_signal_connect_object (agent->agent, "candidate-gathering-done", G_CALLBACK (agent_gathering_done), self, 0); self->priv->new_selected_pair_handler_id = g_signal_connect_object ( agent->agent, "new-selected-pair", G_CALLBACK (agent_new_selected_pair), self, 0); self->priv->new_candidate_handler_id = g_signal_connect_object (agent->agent, "new-candidate", G_CALLBACK (agent_new_candidate), self, 0); self->priv->tos_changed_handler_id = g_signal_connect_object ( self->priv->transmitter, "notify::tos", G_CALLBACK (tos_changed), self, 0); tos_changed (G_OBJECT (self->priv->transmitter), NULL, self); self->priv->gststream = fs_nice_transmitter_add_gst_stream ( self->priv->transmitter, self->priv->agent->agent, self->priv->stream_id, known_buffer_have_buffer_handler, self, error); if (self->priv->gststream == NULL) return FALSE; fs_nice_transmitter_set_send_component_mux (self->priv->transmitter, self->priv->gststream, self->priv->send_component_mux); GST_DEBUG ("Created a stream with %u components", self->priv->transmitter->components); return TRUE; } static gboolean fs_nice_stream_transmitter_gather_local_candidates ( FsStreamTransmitter *streamtransmitter, GError **error) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (streamtransmitter); GST_DEBUG ("Stream %u started", self->priv->stream_id); nice_agent_gather_candidates (self->priv->agent->agent, self->priv->stream_id); return TRUE; } static FsStreamState nice_component_state_to_fs_stream_state (NiceComponentState state) { switch (state) { case NICE_COMPONENT_STATE_DISCONNECTED: return FS_STREAM_STATE_DISCONNECTED; case NICE_COMPONENT_STATE_GATHERING: return FS_STREAM_STATE_GATHERING; case NICE_COMPONENT_STATE_CONNECTING: return FS_STREAM_STATE_CONNECTING; case NICE_COMPONENT_STATE_CONNECTED: return FS_STREAM_STATE_CONNECTED; case NICE_COMPONENT_STATE_READY: return FS_STREAM_STATE_READY; case NICE_COMPONENT_STATE_FAILED: return FS_STREAM_STATE_FAILED; default: GST_ERROR ("Invalid state %u", state); return FS_STREAM_STATE_FAILED; } } struct state_changed_signal_data { FsNiceStreamTransmitter *self; guint component_id; FsStreamState fs_state; }; static void free_state_changed_signal_data (gpointer user_data) { struct state_changed_signal_data *data = user_data; g_object_unref (data->self); g_slice_free (struct state_changed_signal_data, data); } static gboolean state_changed_signal_idle (gpointer userdata) { struct state_changed_signal_data *data = userdata; g_signal_emit_by_name (data->self, "state-changed", data->component_id, data->fs_state); return FALSE; } static void agent_state_changed (NiceAgent *agent, guint stream_id, guint component_id, guint state, gpointer user_data) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (user_data); FsStreamState fs_state; struct state_changed_signal_data *data; if (stream_id != self->priv->stream_id) return; g_return_if_fail (component_id > 0 && component_id <= self->priv->transmitter->components); /* Ignore failed until we've connected, never time out because * of the dribbling case, more candidates could come later */ if (state == NICE_COMPONENT_STATE_FAILED && !self->priv->component_has_been_ready[component_id - 1]) return; else if (state == NICE_COMPONENT_STATE_READY) self->priv->component_has_been_ready[component_id - 1] = TRUE; fs_state = nice_component_state_to_fs_stream_state (state); data = g_slice_new (struct state_changed_signal_data); GST_DEBUG ("Stream: %u Component %u has state %u", self->priv->stream_id, component_id, state); data->self = g_object_ref (self); data->component_id = component_id; data->fs_state = fs_state; fs_nice_agent_add_idle (self->priv->agent, state_changed_signal_idle, data, free_state_changed_signal_data); if (fs_state >= FS_STREAM_STATE_CONNECTED) { FS_NICE_STREAM_TRANSMITTER_LOCK (self); if (self->priv->gststream) fs_nice_transmitter_request_keyunit (self->priv->transmitter, self->priv->gststream, component_id); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); } } struct candidate_signal_data { FsNiceStreamTransmitter *self; const gchar *signal_name; FsCandidate *candidate1; FsCandidate *candidate2; }; static void free_candidate_signal_data (gpointer user_data) { struct candidate_signal_data *data = user_data; fs_candidate_destroy (data->candidate1); if (data->candidate2) fs_candidate_destroy (data->candidate2); g_object_unref (data->self); g_slice_free (struct candidate_signal_data, data); } static gboolean agent_candidate_signal_idle (gpointer userdata) { struct candidate_signal_data *data = userdata; g_signal_emit_by_name (data->self, data->signal_name, data->candidate1, data->candidate2); return FALSE; } static void agent_new_selected_pair (NiceAgent *agent, guint stream_id, guint component_id, const gchar *lfoundation, const gchar *rfoundation, gpointer user_data) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (user_data); GSList *candidates, *item; FsCandidate *local = NULL; FsCandidate *remote = NULL; if (stream_id != self->priv->stream_id) return; candidates = nice_agent_get_local_candidates (agent, self->priv->stream_id, component_id); for (item = candidates; item; item = g_slist_next (item)) { NiceCandidate *candidate = item->data; if (!strcmp (candidate->foundation, lfoundation)) { local = nice_candidate_to_fs_candidate (agent, candidate, TRUE); break; } } g_slist_foreach (candidates, (GFunc)nice_candidate_free, NULL); g_slist_free (candidates); candidates = nice_agent_get_remote_candidates (agent, self->priv->stream_id, component_id); for (item = candidates; item; item = g_slist_next (item)) { NiceCandidate *candidate = item->data; if (!strcmp (candidate->foundation, rfoundation)) { remote = nice_candidate_to_fs_candidate (agent, candidate, FALSE); break; } } g_slist_foreach (candidates, (GFunc)nice_candidate_free, NULL); g_slist_free (candidates); if (local && remote) { struct candidate_signal_data *data = g_slice_new (struct candidate_signal_data); data->self = g_object_ref (self); data->signal_name = "new-active-candidate-pair"; data->candidate1 = local; data->candidate2 = remote; fs_nice_agent_add_idle (self->priv->agent, agent_candidate_signal_idle, data, free_candidate_signal_data); } else { if (local) fs_candidate_destroy (local); if (remote) fs_candidate_destroy (remote); } } static void agent_new_candidate (NiceAgent *agent, guint stream_id, guint component_id, const gchar *foundation, gpointer user_data) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (user_data); FsCandidate *fscandidate = NULL; GSList *candidates, *item; if (stream_id != self->priv->stream_id) return; GST_DEBUG ("New candidate found for stream %u component %u", stream_id, component_id); candidates = nice_agent_get_local_candidates (agent, stream_id, component_id); for (item = candidates; item; item = g_slist_next (item)) { NiceCandidate *candidate = item->data; if (!strcmp (candidate->foundation, foundation)) { fscandidate = nice_candidate_to_fs_candidate (agent, candidate, TRUE); break; } } g_slist_foreach (candidates, (GFunc) nice_candidate_free, NULL); g_slist_free (candidates); if (fscandidate) { FS_NICE_STREAM_TRANSMITTER_LOCK (self); if (!self->priv->gathered) { /* Nice doesn't do connchecks while gathering, so don't tell the upper * layers about the candidates untill gathering is finished. * Also older versions of farstream would fail the connection right away * when the first candidate given failed immediately (e.g. ipv6 on a * non-ipv6 capable host, so we order ipv6 candidates after ipv4 ones */ if (strchr (fscandidate->ip, ':')) self->priv->local_candidates = g_list_append (self->priv->local_candidates, fscandidate); else self->priv->local_candidates = g_list_prepend (self->priv->local_candidates, fscandidate); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); } else { struct candidate_signal_data *data = g_slice_new (struct candidate_signal_data); FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); data->self = g_object_ref (self); data->signal_name = "new-local-candidate"; data->candidate1 = fscandidate; data->candidate2 = NULL; fs_nice_agent_add_idle (self->priv->agent, agent_candidate_signal_idle, data, free_candidate_signal_data); } } else { GST_WARNING ("Could not find local candidate with foundation %s" " for component %d in stream %d", foundation, component_id, stream_id); } } static gboolean agent_gathering_done_idle (gpointer data) { FsNiceStreamTransmitter *self = data; GList *remote_candidates = NULL; GList *local_candidates = NULL; gboolean forced_candidates; FS_NICE_STREAM_TRANSMITTER_LOCK (self); if (self->priv->gathered) { FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); return FALSE; } self->priv->gathered = TRUE; remote_candidates = self->priv->remote_candidates; self->priv->remote_candidates = NULL; local_candidates = self->priv->local_candidates; self->priv->local_candidates = NULL; forced_candidates = self->priv->forced_candidates; FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); GST_DEBUG ("Candidates gathered for stream %u", self->priv->stream_id); if (local_candidates) { GList *l; for (l = local_candidates ; l != NULL; l = g_list_next (l)) g_signal_emit_by_name (self, "new-local-candidate", l->data); fs_candidate_list_destroy (local_candidates); } g_signal_emit_by_name (self, "local-candidates-prepared"); if (remote_candidates) { if (forced_candidates) { if (!fs_nice_stream_transmitter_force_remote_candidates_act (self, remote_candidates)) { fs_stream_transmitter_emit_error (FS_STREAM_TRANSMITTER (self), FS_ERROR_INTERNAL, "Error setting delayed forced remote candidates"); } } else { GError *error = NULL; if (self->priv->compatibility_mode != NICE_COMPATIBILITY_GOOGLE && self->priv->compatibility_mode != NICE_COMPATIBILITY_MSN && self->priv->compatibility_mode != NICE_COMPATIBILITY_OC2007) { if (!nice_agent_set_remote_credentials (self->priv->agent->agent, self->priv->stream_id, self->priv->username, self->priv->password)) { fs_stream_transmitter_emit_error (FS_STREAM_TRANSMITTER (self), FS_ERROR_INTERNAL, "Could not set the security credentials"); fs_candidate_list_destroy (remote_candidates); return FALSE; } } if (!fs_nice_stream_transmitter_add_remote_candidates ( FS_STREAM_TRANSMITTER_CAST (self), remote_candidates, &error)) { fs_stream_transmitter_emit_error (FS_STREAM_TRANSMITTER (self), error->code, error->message); } g_clear_error (&error); } fs_candidate_list_destroy (remote_candidates); } return FALSE; } static void agent_gathering_done (NiceAgent *agent, guint stream_id, gpointer user_data) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (user_data); if (stream_id != self->priv->stream_id) return; fs_nice_agent_add_idle (self->priv->agent, agent_gathering_done_idle, g_object_ref (self), g_object_unref); } FsNiceStreamTransmitter * fs_nice_stream_transmitter_newv (FsNiceTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error) { FsNiceStreamTransmitter *streamtransmitter = NULL; if (!participant || !FS_IS_PARTICIPANT (participant)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You need a valid participant"); return NULL; } streamtransmitter = g_object_newv (FS_TYPE_NICE_STREAM_TRANSMITTER, n_parameters, parameters); if (!streamtransmitter) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the stream transmitter"); return NULL; } streamtransmitter->priv->transmitter = g_object_ref (transmitter); if (!fs_nice_stream_transmitter_build (streamtransmitter, participant, error)) { g_object_unref (streamtransmitter); return NULL; } return streamtransmitter; } static GstPadProbeReturn known_buffer_have_buffer_handler (GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (user_data); guint component_id; GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info); if (!g_atomic_int_get (&self->priv->associate_on_source)) return GST_PAD_PROBE_OK; component_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (pad), "component-id")); g_signal_emit_by_name (self, "known-source-packet-received", component_id, buffer); return GST_PAD_PROBE_OK; } farstream-0.2.7/transmitters/nice/fs-nice-agent.h0000664000076400007640000000517212462316243016715 00000000000000/* * Farstream - Farstream libnice Transmitter agent object * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-nice-agent.h - A Farstream libnice transmitter agent object * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_NICE_AGENT_H__ #define __FS_NICE_AGENT_H__ #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_NICE_AGENT \ (fs_nice_agent_get_type ()) #define FS_NICE_AGENT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_NICE_AGENT, \ FsNiceAgent)) #define FS_NICE_AGENT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_NICE_AGENT, \ FsNiceAgentClass)) #define FS_IS_NICE_AGENT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_NICE_AGENT)) #define FS_IS_NICE_AGENT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_NICE_AGENT)) #define FS_NICE_AGENT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_NICE_AGENT, \ FsNiceAgentClass)) #define FS_NICE_AGENT_CAST(obj) ((FsNiceAgent *) (obj)) typedef struct _FsNiceAgent FsNiceAgent; typedef struct _FsNiceAgentClass FsNiceAgentClass; typedef struct _FsNiceAgentPrivate FsNiceAgentPrivate; /** * FsNiceAgentClass: * @parent_class: Our parent * * The class structure */ struct _FsNiceAgentClass { GObjectClass parent_class; }; /** * FsNiceAgent: * @agent: The underlying nice agent * */ struct _FsNiceAgent { GObject parent; NiceAgent *agent; /*< private >*/ FsNiceAgentPrivate *priv; }; GType fs_nice_agent_get_type (void); FsNiceAgent *fs_nice_agent_new (guint compatibility_mode, GList *preferred_local_candidates, gboolean reliable, GError **error); void fs_nice_agent_add_idle (FsNiceAgent *agent, GSourceFunc func, gpointer data, GDestroyNotify destroy_notify); GType fs_nice_agent_register_type (FsPlugin *module); G_END_DECLS #endif /* __FS_NICE_AGENT_H__ */ farstream-0.2.7/transmitters/nice/fs-nice-agent.c0000664000076400007640000002524712462316243016715 00000000000000/* * Farstream - Farstream libnice Transmitter agent object * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-nice-agent.c - A Farstream libnice transmitter agent object * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-nice-agent * @short_description: A transmitter for agents for libnice * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "fs-nice-transmitter.h" #include "fs-nice-agent.h" #include #include #include #define GST_CAT_DEFAULT fs_nice_transmitter_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_COMPATIBILITY_MODE, PROP_PREFERRED_LOCAL_CANDIDATES, }; struct _FsNiceAgentPrivate { GMainContext *main_context; GMainLoop *main_loop; guint compatibility_mode; GList *preferred_local_candidates; GMutex mutex; /* Everything below is protected by the mutex */ GThread *thread; }; #define FS_NICE_AGENT_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_NICE_AGENT, \ FsNiceAgentPrivate)) #define FS_NICE_AGENT_LOCK(o) g_mutex_lock (&(o)->priv->mutex) #define FS_NICE_AGENT_UNLOCK(o) g_mutex_unlock (&(o)->priv->mutex) static void fs_nice_agent_class_init ( FsNiceAgentClass *klass); static void fs_nice_agent_init (FsNiceAgent *self); static void fs_nice_agent_dispose (GObject *object); static void fs_nice_agent_finalize (GObject *object); static void fs_nice_agent_stop_thread (FsNiceAgent *self); static void fs_nice_agent_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void fs_nice_agent_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static GObjectClass *parent_class = NULL; /* * Lets register the plugin */ static GType type = 0; GType fs_nice_agent_get_type (void) { g_assert (type); return type; } GType fs_nice_agent_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsNiceAgentClass), NULL, NULL, (GClassInitFunc) fs_nice_agent_class_init, NULL, NULL, sizeof (FsNiceAgent), 0, (GInstanceInitFunc) fs_nice_agent_init }; type = g_type_module_register_type (G_TYPE_MODULE (module), G_TYPE_OBJECT, "FsNiceAgent", &info, 0); return type; } static void fs_nice_agent_class_init (FsNiceAgentClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_nice_agent_set_property; gobject_class->get_property = fs_nice_agent_get_property; gobject_class->dispose = fs_nice_agent_dispose; gobject_class->finalize = fs_nice_agent_finalize; g_type_class_add_private (klass, sizeof (FsNiceAgentPrivate)); g_object_class_install_property (gobject_class, PROP_COMPATIBILITY_MODE, g_param_spec_uint ( "compatibility-mode", "The compability-mode", "The id of the stream according to libnice", NICE_COMPATIBILITY_DRAFT19, NICE_COMPATIBILITY_LAST, NICE_COMPATIBILITY_DRAFT19, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PREFERRED_LOCAL_CANDIDATES, g_param_spec_boxed ("preferred-local-candidates", "The preferred candidates", "A GList of FsCandidates", FS_TYPE_CANDIDATE_LIST, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void fs_nice_agent_init (FsNiceAgent *self) { /* member init */ self->priv = FS_NICE_AGENT_GET_PRIVATE (self); g_mutex_init (&self->priv->mutex); self->priv->main_context = g_main_context_new (); self->priv->main_loop = g_main_loop_new (self->priv->main_context, FALSE); self->priv->compatibility_mode = NICE_COMPATIBILITY_DRAFT19; } static void fs_nice_agent_dispose (GObject *object) { FsNiceAgent *self = FS_NICE_AGENT (object); fs_nice_agent_stop_thread (self); if (self->agent) g_object_unref (self->agent); self->agent = NULL; parent_class->dispose (object); } static void fs_nice_agent_finalize (GObject *object) { FsNiceAgent *self = FS_NICE_AGENT (object); if (self->priv->main_context) g_main_context_unref (self->priv->main_context); self->priv->main_context = NULL; if (self->priv->main_loop) g_main_loop_unref (self->priv->main_loop); self->priv->main_loop = NULL; fs_candidate_list_destroy (self->priv->preferred_local_candidates); self->priv->preferred_local_candidates = NULL; g_mutex_clear (&self->priv->mutex); parent_class->finalize (object); } static void fs_nice_agent_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsNiceAgent *self = FS_NICE_AGENT (object); switch (prop_id) { case PROP_COMPATIBILITY_MODE: self->priv->compatibility_mode = g_value_get_uint (value); break; case PROP_PREFERRED_LOCAL_CANDIDATES: self->priv->preferred_local_candidates = g_value_dup_boxed (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_nice_agent_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsNiceAgent *self = FS_NICE_AGENT (object); switch (prop_id) { case PROP_COMPATIBILITY_MODE: g_value_set_uint (value, self->priv->compatibility_mode); break; case PROP_PREFERRED_LOCAL_CANDIDATES: g_value_set_boxed (value, self->priv->preferred_local_candidates); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static gboolean thread_unlock_idler (gpointer data) { FsNiceAgent *self = FS_NICE_AGENT (data); g_main_loop_quit (self->priv->main_loop); return TRUE; } static void fs_nice_agent_stop_thread (FsNiceAgent *self) { GSource *idle_source; g_main_loop_quit (self->priv->main_loop); FS_NICE_AGENT_LOCK(self); if (self->priv->thread == NULL || self->priv->thread == g_thread_self ()) { FS_NICE_AGENT_UNLOCK (self); return; } FS_NICE_AGENT_UNLOCK (self); idle_source = g_idle_source_new (); g_source_set_priority (idle_source, G_PRIORITY_HIGH); g_source_set_callback (idle_source, thread_unlock_idler, self, NULL); g_source_attach (idle_source, self->priv->main_context); g_thread_join (self->priv->thread); g_source_destroy (idle_source); g_source_unref (idle_source); FS_NICE_AGENT_LOCK (self); self->priv->thread = NULL; FS_NICE_AGENT_UNLOCK (self); } static gpointer fs_nice_agent_main_thread (gpointer data) { FsNiceAgent *self = FS_NICE_AGENT (data); g_main_loop_run (self->priv->main_loop); return NULL; } static gboolean fs_nice_agent_init_agent (FsNiceAgent *self, GError **error) { GList *item; gboolean set = FALSE; for (item = self->priv->preferred_local_candidates; item; item = g_list_next (item)) { FsCandidate *cand = item->data; NiceAddress *addr = nice_address_new (); if (nice_address_set_from_string (addr, cand->ip)) { if (!nice_agent_add_local_address (self->agent, addr)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Unable to set preferred local candidate: %s", cand->ip); return FALSE; } set = TRUE; } else { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid local address passed: %s", cand->ip); nice_address_free (addr); return FALSE; } nice_address_free (addr); } if (!set) { GList *addresses = nice_interfaces_get_local_ips (FALSE); for (item = addresses; item; item = g_list_next (item)) { NiceAddress *addr = nice_address_new (); if (nice_address_set_from_string (addr, item->data)) { if (!nice_agent_add_local_address (self->agent, addr)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Unable to set preferred local candidate"); return FALSE; } } else { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid local address passed"); nice_address_free (addr); return FALSE; } nice_address_free (addr); } g_list_foreach (addresses, (GFunc) g_free, NULL); g_list_free (addresses); } return TRUE; } FsNiceAgent * fs_nice_agent_new (guint compatibility_mode, GList *preferred_local_candidates, gboolean reliable, GError **error) { FsNiceAgent *self = NULL; self = g_object_new (FS_TYPE_NICE_AGENT, "compatibility-mode", compatibility_mode, "preferred-local-candidates", preferred_local_candidates, NULL); if (reliable) self->agent = nice_agent_new_reliable (self->priv->main_context, self->priv->compatibility_mode); else self->agent = nice_agent_new (self->priv->main_context, self->priv->compatibility_mode); if (self->agent == NULL) { g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Could not make nice agent"); g_object_unref (self); return NULL; } if (!fs_nice_agent_init_agent (self, error)) { g_object_unref (self); return NULL; } FS_NICE_AGENT_LOCK (self); self->priv->thread = g_thread_try_new ("libnice agent thread", fs_nice_agent_main_thread, self, error); if (!self->priv->thread) { FS_NICE_AGENT_UNLOCK (self); g_object_unref (self); return NULL; } FS_NICE_AGENT_UNLOCK (self); return self; } void fs_nice_agent_add_idle (FsNiceAgent *agent, GSourceFunc func, gpointer data, GDestroyNotify destroy_notify) { GSource *source; g_return_if_fail (func != NULL); source = g_idle_source_new (); g_source_set_priority (source, G_PRIORITY_HIGH); g_source_set_callback (source, func, data, destroy_notify); g_source_attach (source, agent->priv->main_context); g_source_unref (source); } farstream-0.2.7/transmitters/nice/fs-nice-transmitter.h0000664000076400007640000000661412462316243020175 00000000000000/* * Farstream - Farstream libnice Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-nice-transmitter.h - A Farstream libnice transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_NICE_TRANSMITTER_H__ #define __FS_NICE_TRANSMITTER_H__ #include #include #include G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_NICE_TRANSMITTER \ (fs_nice_transmitter_get_type ()) #define FS_NICE_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_NICE_TRANSMITTER, \ FsNiceTransmitter)) #define FS_NICE_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_NICE_TRANSMITTER, \ FsNiceTransmitterClass)) #define FS_IS_NICE_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_NICE_TRANSMITTER)) #define FS_IS_NICE_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_NICE_TRANSMITTER)) #define FS_NICE_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_NICE_TRANSMITTER, \ FsNiceTransmitterClass)) #define FS_NICE_TRANSMITTER_CAST(obj) ((FsNiceTransmitter *) (obj)) typedef struct _FsNiceTransmitter FsNiceTransmitter; typedef struct _FsNiceTransmitterClass FsNiceTransmitterClass; typedef struct _FsNiceTransmitterPrivate FsNiceTransmitterPrivate; /** * FsNiceTransmitterClass: * @parent_class: Our parent * * The Nice UDP transmitter class */ struct _FsNiceTransmitterClass { FsTransmitterClass parent_class; }; /** * FsNiceTransmitter: * @parent: Parent object * * All members are private, access them using methods and properties */ struct _FsNiceTransmitter { FsTransmitter parent; /* The number of components (READONLY)*/ gint components; /*< private >*/ FsNiceTransmitterPrivate *priv; }; GST_DEBUG_CATEGORY_EXTERN (fs_nice_transmitter_debug); GType fs_nice_transmitter_get_type (void); struct _NiceGstStream; typedef struct _NiceGstStream NiceGstStream; NiceGstStream *fs_nice_transmitter_add_gst_stream (FsNiceTransmitter *self, NiceAgent *agent, guint stream_id, GstPadProbeCallback have_buffer_callback, gpointer have_buffer_user_data, GError **error); void fs_nice_transmitter_free_gst_stream (FsNiceTransmitter *self, NiceGstStream *ns); void fs_nice_transmitter_set_sending (FsNiceTransmitter *self, NiceGstStream *ns, gboolean sending); void fs_nice_transmitter_request_keyunit (FsNiceTransmitter *self, NiceGstStream *ns, guint component); void fs_nice_transmitter_set_send_component_mux (FsNiceTransmitter *self, NiceGstStream *ns, gboolean send_component_mux); G_END_DECLS #endif /* __FS_NICE_TRANSMITTER_H__ */ farstream-0.2.7/transmitters/nice/fs-nice-transmitter.c0000664000076400007640000005635612462316243020200 00000000000000/* * Farstream - Farstream libnice Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008 Nokia Corp. * * fs-nice-transmitter.c - A Farstream libnice transmitter * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-nice-transmitter * @short_description: A transmitter for ICE using libnice * * The transmitter provides ICE (Interactive Connection Establishment) using * libnice. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-nice-transmitter.h" #include "fs-nice-stream-transmitter.h" #include "fs-nice-agent.h" #include #include #include #include GST_DEBUG_CATEGORY (fs_nice_transmitter_debug); #define GST_CAT_DEFAULT fs_nice_transmitter_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_GST_SINK, PROP_GST_SRC, PROP_COMPONENTS, PROP_TOS, PROP_DO_TIMESTAMP }; struct _FsNiceTransmitterPrivate { /* We hold references to this element */ GstElement *gst_sink; GstElement *gst_src; /* We don't hold a reference to these elements, they are owned by the bins */ /* They are tables of pointers, one per component */ GstElement **src_funnels; GstElement **sink_tees; gint tos; gboolean do_timestamp; }; #define FS_NICE_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_NICE_TRANSMITTER, \ FsNiceTransmitterPrivate)) static void fs_nice_transmitter_class_init ( FsNiceTransmitterClass *klass); static void fs_nice_transmitter_init (FsNiceTransmitter *self); static void fs_nice_transmitter_constructed (GObject *object); static void fs_nice_transmitter_dispose (GObject *object); static void fs_nice_transmitter_finalize (GObject *object); static void fs_nice_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_nice_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static FsStreamTransmitter *fs_nice_transmitter_new_stream_transmitter ( FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error); static GType fs_nice_transmitter_get_stream_transmitter_type ( FsTransmitter *transmitter); static GObjectClass *parent_class = NULL; //static guint signals[LAST_SIGNAL] = { 0 }; /* * Lets register the plugin */ static GType type = 0; GType fs_nice_transmitter_get_type (void) { g_assert (type); return type; } static GType fs_nice_transmitter_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsNiceTransmitterClass), NULL, NULL, (GClassInitFunc) fs_nice_transmitter_class_init, NULL, NULL, sizeof (FsNiceTransmitter), 0, (GInstanceInitFunc) fs_nice_transmitter_init }; GST_DEBUG_CATEGORY_INIT (fs_nice_transmitter_debug, "fsnicetransmitter", 0, "Farstream libnice transmitter"); fs_nice_stream_transmitter_register_type (module); fs_nice_agent_register_type (module); type = g_type_module_register_type (G_TYPE_MODULE (module), FS_TYPE_TRANSMITTER, "FsNiceTransmitter", &info, 0); return type; } FS_INIT_PLUGIN (fs_nice_transmitter_register_type) static void fs_nice_transmitter_class_init (FsNiceTransmitterClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; FsTransmitterClass *transmitter_class = FS_TRANSMITTER_CLASS (klass); parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_nice_transmitter_set_property; gobject_class->get_property = fs_nice_transmitter_get_property; gobject_class->constructed = fs_nice_transmitter_constructed; g_object_class_override_property (gobject_class, PROP_GST_SRC, "gst-src"); g_object_class_override_property (gobject_class, PROP_GST_SINK, "gst-sink"); g_object_class_override_property (gobject_class, PROP_COMPONENTS, "components"); g_object_class_override_property (gobject_class, PROP_TOS, "tos"); g_object_class_override_property (gobject_class, PROP_DO_TIMESTAMP, "do-timestamp"); transmitter_class->new_stream_transmitter = fs_nice_transmitter_new_stream_transmitter; transmitter_class->get_stream_transmitter_type = fs_nice_transmitter_get_stream_transmitter_type; gobject_class->dispose = fs_nice_transmitter_dispose; gobject_class->finalize = fs_nice_transmitter_finalize; g_type_class_add_private (klass, sizeof (FsNiceTransmitterPrivate)); } static void fs_nice_transmitter_init (FsNiceTransmitter *self) { /* member init */ self->priv = FS_NICE_TRANSMITTER_GET_PRIVATE (self); self->components = 2; self->priv->do_timestamp = TRUE; } static void fs_nice_transmitter_constructed (GObject *object) { FsNiceTransmitter *self = FS_NICE_TRANSMITTER_CAST (object); FsTransmitter *trans = FS_TRANSMITTER_CAST (self); GstPad *pad = NULL, *pad2 = NULL; GstPad *ghostpad = NULL; gchar *padname; GstPadLinkReturn ret; int c; /* component_id */ /* We waste one space in order to have the index be the component_id */ self->priv->src_funnels = g_new0 (GstElement *, self->components+1); self->priv->sink_tees = g_new0 (GstElement *, self->components+1); /* First we need the src element */ self->priv->gst_src = gst_bin_new (NULL); if (!self->priv->gst_src) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the transmitter src bin"); return; } gst_object_ref (self->priv->gst_src); /* Second, we do the sink element */ self->priv->gst_sink = gst_bin_new (NULL); if (!self->priv->gst_sink) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the transmitter sink bin"); return; } g_object_set (G_OBJECT (self->priv->gst_sink), "async-handling", TRUE, NULL); gst_object_ref (self->priv->gst_sink); for (c = 1; c <= self->components; c++) { GstElement *fakesink = NULL; /* Lets create the RTP source funnel */ self->priv->src_funnels[c] = gst_element_factory_make ("funnel", NULL); if (!self->priv->src_funnels[c]) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the funnel element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_src), self->priv->src_funnels[c])) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the funnel element to the transmitter src bin"); } pad = gst_element_get_static_pad (self->priv->src_funnels[c], "src"); padname = g_strdup_printf ("src_%u", c); ghostpad = gst_ghost_pad_new (padname, pad); g_free (padname); gst_object_unref (pad); gst_pad_set_active (ghostpad, TRUE); gst_element_add_pad (self->priv->gst_src, ghostpad); /* Lets create the RTP sink tee */ self->priv->sink_tees[c] = gst_element_factory_make ("tee", NULL); if (!self->priv->sink_tees[c]) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the tee element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_sink), self->priv->sink_tees[c])) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the tee element to the transmitter sink bin"); } pad = gst_element_get_static_pad (self->priv->sink_tees[c], "sink"); padname = g_strdup_printf ("sink_%u", c); ghostpad = gst_ghost_pad_new (padname, pad); g_free (padname); gst_object_unref (pad); gst_pad_set_active (ghostpad, TRUE); gst_element_add_pad (self->priv->gst_sink, ghostpad); fakesink = gst_element_factory_make ("fakesink", NULL); if (!fakesink) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the fakesink element"); return; } g_object_set (fakesink, "async", FALSE, "sync" , FALSE, NULL); if (!gst_bin_add (GST_BIN (self->priv->gst_sink), fakesink)) { gst_object_unref (fakesink); trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the fakesink element to the transmitter sink bin"); return; } pad = gst_element_get_request_pad (self->priv->sink_tees[c], "src_%u"); pad2 = gst_element_get_static_pad (fakesink, "sink"); ret = gst_pad_link (pad, pad2); gst_object_unref (pad2); gst_object_unref (pad); if (GST_PAD_LINK_FAILED(ret)) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the tee to the fakesink"); return; } } GST_CALL_PARENT (G_OBJECT_CLASS, constructed, (object)); } static void fs_nice_transmitter_dispose (GObject *object) { FsNiceTransmitter *self = FS_NICE_TRANSMITTER (object); if (self->priv->gst_src) { gst_object_unref (self->priv->gst_src); self->priv->gst_src = NULL; } if (self->priv->gst_sink) { gst_object_unref (self->priv->gst_sink); self->priv->gst_sink = NULL; } parent_class->dispose (object); } static void fs_nice_transmitter_finalize (GObject *object) { FsNiceTransmitter *self = FS_NICE_TRANSMITTER (object); if (self->priv->src_funnels) { g_free (self->priv->src_funnels); self->priv->src_funnels = NULL; } if (self->priv->sink_tees) { g_free (self->priv->sink_tees); self->priv->sink_tees = NULL; } parent_class->finalize (object); } static void fs_nice_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsNiceTransmitter *self = FS_NICE_TRANSMITTER (object); switch (prop_id) { case PROP_GST_SINK: g_value_set_object (value, self->priv->gst_sink); break; case PROP_GST_SRC: g_value_set_object (value, self->priv->gst_src); break; case PROP_COMPONENTS: g_value_set_uint (value, self->components); break; case PROP_TOS: g_value_set_uint (value, self->priv->tos); break; case PROP_DO_TIMESTAMP: g_value_set_boolean (value, self->priv->do_timestamp); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_nice_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsNiceTransmitter *self = FS_NICE_TRANSMITTER (object); switch (prop_id) { case PROP_COMPONENTS: self->components = g_value_get_uint (value); break; case PROP_TOS: self->priv->tos = g_value_get_uint (value); break; case PROP_DO_TIMESTAMP: self->priv->do_timestamp = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } /** * fs_nice_transmitter_new_stream_nice_transmitter: * @transmitter: a #FsTranmitter * @participant: the #FsParticipant for which the #FsStream using this * new #FsStreamTransmitter is created * * This function will create a new #FsStreamTransmitter element for a * specific participant for this #FsNiceTransmitter * * Returns: a new #FsStreamTransmitter */ static FsStreamTransmitter * fs_nice_transmitter_new_stream_transmitter (FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error) { FsNiceTransmitter *self = FS_NICE_TRANSMITTER (transmitter); return FS_STREAM_TRANSMITTER (fs_nice_stream_transmitter_newv ( self, participant, n_parameters, parameters, error)); } static GType fs_nice_transmitter_get_stream_transmitter_type ( FsTransmitter *transmitter) { return FS_TYPE_NICE_STREAM_TRANSMITTER; } static GstElement * _create_sinksource ( gchar *elementname, GstBin *bin, GstElement *teefunnel, NiceAgent *agent, guint stream_id, guint component_id, GstPadDirection direction, gboolean do_timestamp, GstPadProbeCallback have_buffer_callback, gpointer have_buffer_user_data, gulong *buffer_probe_id, GstPad **requested_pad, GError **error) { GstElement *elem; GstPadLinkReturn ret = GST_PAD_LINK_OK; GstPad *elempad = NULL; GstStateChangeReturn state_ret; g_assert (direction == GST_PAD_SINK || direction == GST_PAD_SRC); elem = gst_element_factory_make (elementname, NULL); if (!elem) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the %s element", elementname); return NULL; } g_object_set (elem, "agent", agent, "stream", stream_id, "component", component_id, NULL); if (direction == GST_PAD_SINK) g_object_set (elem, "async", FALSE, "sync", FALSE, NULL); else g_object_set (elem, "do-timestamp", do_timestamp, NULL); if (!gst_bin_add (bin, elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the %s element to the gst %s bin", elementname, (direction == GST_PAD_SINK) ? "sink" : "src"); gst_object_unref (elem); return NULL; } gst_object_ref (elem); if (direction == GST_PAD_SINK) *requested_pad = gst_element_get_request_pad (teefunnel, "src_%u"); else *requested_pad = gst_element_get_request_pad (teefunnel, "sink_%u"); if (!*requested_pad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get the %s request pad from the %s", (direction == GST_PAD_SINK) ? "src" : "sink", (direction == GST_PAD_SINK) ? "tee" : "funnel"); goto error; } if (direction == GST_PAD_SINK) elempad = gst_element_get_static_pad (elem, "sink"); else elempad = gst_element_get_static_pad (elem, "src"); if (direction != GST_PAD_SINK) ret = gst_pad_link (elempad, *requested_pad); if (GST_PAD_LINK_FAILED(ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the new element %s (%d)", elementname, ret); goto error; } if (have_buffer_callback && buffer_probe_id) { if (direction == GST_PAD_SINK) { g_object_set_data (G_OBJECT (*requested_pad), "component-id", GUINT_TO_POINTER (component_id)); *buffer_probe_id = gst_pad_add_probe (*requested_pad, GST_PAD_PROBE_TYPE_BUFFER, have_buffer_callback, have_buffer_user_data, NULL); } else { g_object_set_data (G_OBJECT (elempad), "component-id", GUINT_TO_POINTER (component_id)); *buffer_probe_id = gst_pad_add_probe (elempad, GST_PAD_PROBE_TYPE_BUFFER, have_buffer_callback, have_buffer_user_data, NULL); } if (*buffer_probe_id == 0) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create buffer probe as requested"); } } if (!gst_element_sync_state_with_parent (elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the new %s with its parent", elementname); goto error; } if (direction == GST_PAD_SINK) ret = gst_pad_link (*requested_pad, elempad); if (GST_PAD_LINK_FAILED(ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the new element %s (%d)", elementname, ret); goto error; } gst_object_unref (elempad); return elem; error: gst_element_set_locked_state (elem, TRUE); state_ret = gst_element_set_state (elem, GST_STATE_NULL); if (state_ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("On error, could not reset %s to state NULL (%s)", elementname, gst_element_state_change_return_get_name (state_ret)); if (!gst_bin_remove (bin, elem)) GST_ERROR ("Could not remove element %s from bin on error", elementname); if (elempad) gst_object_unref (elempad); if (elem) gst_object_unref (elem); return NULL; } struct _NiceGstStream { GstElement **nicesrcs; GstElement **nicesinks; GstPad **requested_funnel_pads; GstPad **requested_tee_pads; gulong *probe_ids; /* Protects the sending field and the addition/state of the elements */ GMutex mutex; gboolean sending; gboolean desired_sending; gboolean modifying; }; NiceGstStream * fs_nice_transmitter_add_gst_stream (FsNiceTransmitter *self, NiceAgent *agent, guint stream_id, GstPadProbeCallback have_buffer_callback, gpointer have_buffer_user_data, GError **error) { guint c; NiceGstStream *ns = NULL; ns = g_slice_new0 (NiceGstStream); ns->sending = TRUE; ns->desired_sending = TRUE; g_mutex_init (&ns->mutex); ns->nicesrcs = g_new0 (GstElement *, self->components + 1); ns->nicesinks = g_new0 (GstElement *, self->components + 1); ns->requested_tee_pads = g_new0 (GstPad *, self->components + 1); ns->requested_funnel_pads = g_new0 (GstPad *, self->components + 1); ns->probe_ids = g_new0 (gulong, self->components + 1); for (c = 1; c <= self->components; c++) { ns->nicesrcs[c] = _create_sinksource ("nicesrc", GST_BIN (self->priv->gst_src), self->priv->src_funnels[c], agent, stream_id, c, GST_PAD_SRC, self->priv->do_timestamp, have_buffer_callback, have_buffer_user_data, &ns->probe_ids[c], &ns->requested_funnel_pads[c], error); if (ns->nicesrcs[c] == NULL) goto error; ns->nicesinks[c] = _create_sinksource ("nicesink", GST_BIN (self->priv->gst_sink), self->priv->sink_tees[c], agent, stream_id, c, GST_PAD_SINK, FALSE, NULL, NULL, NULL, &ns->requested_tee_pads[c], error); if (ns->nicesinks[c] == NULL) goto error; } return ns; error: fs_nice_transmitter_free_gst_stream (self, ns); return NULL; } static void remove_sink (FsNiceTransmitter *self, NiceGstStream *ns, guint component_id) { GstStateChangeReturn ret; if (ns->requested_tee_pads[component_id] == NULL) return; gst_element_release_request_pad (self->priv->sink_tees[component_id], ns->requested_tee_pads[component_id]); gst_object_unref (ns->requested_tee_pads[component_id]); ns->requested_tee_pads[component_id] = NULL; gst_element_set_locked_state (ns->nicesinks[component_id], TRUE); ret = gst_element_set_state (ns->nicesinks[component_id], GST_STATE_NULL); if (ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("Error changing state of nicesink: %s", gst_element_state_change_return_get_name (ret)); if (!gst_bin_remove (GST_BIN (self->priv->gst_sink), ns->nicesinks[component_id])) GST_ERROR ("Could not remove nicesink element from transmitter" " sink"); } void fs_nice_transmitter_free_gst_stream (FsNiceTransmitter *self, NiceGstStream *ns) { guint c; for (c = 1; c <= self->components; c++) { if (ns->nicesrcs[c]) { GstStateChangeReturn ret; if (!gst_bin_remove (GST_BIN (self->priv->gst_src), ns->nicesrcs[c])) GST_ERROR ("Could not remove nicesrc element from transmitter source"); ret = gst_element_set_state (ns->nicesrcs[c], GST_STATE_NULL); if (ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("Error changing state of nicesrc: %s", gst_element_state_change_return_get_name (ret)); gst_object_unref (ns->nicesrcs[c]); } if (ns->requested_funnel_pads[c]) { gst_element_release_request_pad (self->priv->src_funnels[c], ns->requested_funnel_pads[c]); gst_object_unref (ns->requested_funnel_pads[c]); } if (ns->nicesinks[c]) { remove_sink (self, ns, c); gst_object_unref (ns->nicesinks[c]); } } g_free (ns->nicesrcs); g_free (ns->nicesinks); g_free (ns->requested_tee_pads); g_free (ns->requested_funnel_pads); g_free (ns->probe_ids); g_mutex_clear (&ns->mutex); g_slice_free (NiceGstStream, ns); } void fs_nice_transmitter_set_sending (FsNiceTransmitter *self, NiceGstStream *ns, gboolean sending) { g_mutex_lock (&ns->mutex); ns->desired_sending = sending; GST_DEBUG ("Requesting gst stream sending status: %d", sending); if (ns->modifying) { g_mutex_unlock (&ns->mutex); return; } ns->modifying = TRUE; while (ns->sending != ns->desired_sending) { gboolean current_sending = ns->sending; g_mutex_unlock (&ns->mutex); GST_DEBUG ("Changing gst stream sending status to %d", !current_sending); if (current_sending) { remove_sink (self, ns, 1); } else { GstPadLinkReturn ret; GstPad *elempad; gst_element_set_locked_state (ns->nicesinks[1], FALSE); if (!gst_bin_add (GST_BIN (self->priv->gst_sink), ns->nicesinks[1])) GST_ERROR ("Could not add nicesink element to the transmitter" " sink"); if (!gst_element_sync_state_with_parent (ns->nicesinks[1])) GST_ERROR ("Could sync the state of the nicesink with its parent"); ns->requested_tee_pads[1] = gst_element_get_request_pad (self->priv->sink_tees[1], "src_%u"); g_assert (ns->requested_tee_pads[1]); elempad = gst_element_get_static_pad (ns->nicesinks[1], "sink"); ret = gst_pad_link (ns->requested_tee_pads[1], elempad); if (GST_PAD_LINK_FAILED(ret)) GST_ERROR ("Could not link nicesink to its tee pad"); gst_object_unref (elempad); fs_nice_transmitter_request_keyunit (self, ns, 1); } g_mutex_lock (&ns->mutex); ns->sending = sending; } ns->modifying = FALSE; g_mutex_unlock (&ns->mutex); } void fs_nice_transmitter_request_keyunit (FsNiceTransmitter *self, NiceGstStream *ns, guint component) { g_assert (component <= self->components); gst_element_send_event (ns->nicesinks[component], gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, gst_structure_new ("GstForceKeyUnit", "all-headers", G_TYPE_BOOLEAN, TRUE, NULL))); } void fs_nice_transmitter_set_send_component_mux (FsNiceTransmitter *self, NiceGstStream *ns, gboolean send_component_mux) { guint component; for (component = 2; component <= self->components; component++) { g_object_set (ns->nicesinks[component], "component", send_component_mux ? 1 : component, NULL); } } farstream-0.2.7/transmitters/rawudp/0000775000076400007640000000000012462323000014550 500000000000000farstream-0.2.7/transmitters/rawudp/Makefile.in0000664000076400007640000007776112462321046016567 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ # these are the variables your Makefile.am should set # the example is based on the colorbalance interface #glib_enum_headers=$(colorbalance_headers) #glib_enum_define=GST_COLOR_BALANCE #glib_gen_prefix=gst_color_balance #glib_gen_basename=colorbalance VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ DIST_COMMON = $(top_srcdir)/common/gst-glib-gen.mak \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(noinst_HEADERS) subdir = transmitters/rawudp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = librawudp_transmitter_la_DEPENDENCIES = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_librawudp_transmitter_la_OBJECTS = \ librawudp_transmitter_la-fs-rawudp-transmitter.lo \ librawudp_transmitter_la-fs-rawudp-stream-transmitter.lo \ librawudp_transmitter_la-fs-rawudp-component.lo librawudp_transmitter_la_OBJECTS = \ $(am_librawudp_transmitter_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = librawudp_transmitter_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(librawudp_transmitter_la_CFLAGS) $(CFLAGS) \ $(librawudp_transmitter_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(librawudp_transmitter_la_SOURCES) DIST_SOURCES = $(librawudp_transmitter_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = $(FS_PLUGIN_PATH) prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = librawudp-transmitter.la # sources used to compile this lib librawudp_transmitter_la_SOURCES = \ fs-rawudp-transmitter.c \ fs-rawudp-stream-transmitter.c \ fs-rawudp-component.c # flags used to compile this plugin librawudp_transmitter_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_CFLAGS) \ $(NICE_CFLAGS) \ $(GUPNP_CFLAGS) \ $(GIO_CFLAGS) librawudp_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS) librawudp_transmitter_la_LIBADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(FS_LIBS) \ $(GST_LIBS) \ $(NICE_LIBS) \ $(GUPNP_LIBS) \ $(GIO_LIBS) \ -lgstnet-@GST_API_VERSION@ noinst_HEADERS = \ fs-rawudp-transmitter.h \ fs-rawudp-stream-transmitter.h \ fs-rawudp-component.h glib_enum_define = FS_RAWUDP glib_gen_prefix = _fs_rawudp glib_gen_basename = fs-rawudp enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common/gst-glib-gen.mak $(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 transmitters/rawudp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu transmitters/rawudp/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_srcdir)/common/gst-glib-gen.mak: $(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-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ } uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } librawudp-transmitter.la: $(librawudp_transmitter_la_OBJECTS) $(librawudp_transmitter_la_DEPENDENCIES) $(EXTRA_librawudp_transmitter_la_DEPENDENCIES) $(AM_V_CCLD)$(librawudp_transmitter_la_LINK) -rpath $(plugindir) $(librawudp_transmitter_la_OBJECTS) $(librawudp_transmitter_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librawudp_transmitter_la-fs-rawudp-component.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librawudp_transmitter_la-fs-rawudp-stream-transmitter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librawudp_transmitter_la-fs-rawudp-transmitter.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< librawudp_transmitter_la-fs-rawudp-transmitter.lo: fs-rawudp-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librawudp_transmitter_la_CFLAGS) $(CFLAGS) -MT librawudp_transmitter_la-fs-rawudp-transmitter.lo -MD -MP -MF $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-transmitter.Tpo -c -o librawudp_transmitter_la-fs-rawudp-transmitter.lo `test -f 'fs-rawudp-transmitter.c' || echo '$(srcdir)/'`fs-rawudp-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-transmitter.Tpo $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-rawudp-transmitter.c' object='librawudp_transmitter_la-fs-rawudp-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librawudp_transmitter_la_CFLAGS) $(CFLAGS) -c -o librawudp_transmitter_la-fs-rawudp-transmitter.lo `test -f 'fs-rawudp-transmitter.c' || echo '$(srcdir)/'`fs-rawudp-transmitter.c librawudp_transmitter_la-fs-rawudp-stream-transmitter.lo: fs-rawudp-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librawudp_transmitter_la_CFLAGS) $(CFLAGS) -MT librawudp_transmitter_la-fs-rawudp-stream-transmitter.lo -MD -MP -MF $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-stream-transmitter.Tpo -c -o librawudp_transmitter_la-fs-rawudp-stream-transmitter.lo `test -f 'fs-rawudp-stream-transmitter.c' || echo '$(srcdir)/'`fs-rawudp-stream-transmitter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-stream-transmitter.Tpo $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-stream-transmitter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-rawudp-stream-transmitter.c' object='librawudp_transmitter_la-fs-rawudp-stream-transmitter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librawudp_transmitter_la_CFLAGS) $(CFLAGS) -c -o librawudp_transmitter_la-fs-rawudp-stream-transmitter.lo `test -f 'fs-rawudp-stream-transmitter.c' || echo '$(srcdir)/'`fs-rawudp-stream-transmitter.c librawudp_transmitter_la-fs-rawudp-component.lo: fs-rawudp-component.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librawudp_transmitter_la_CFLAGS) $(CFLAGS) -MT librawudp_transmitter_la-fs-rawudp-component.lo -MD -MP -MF $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-component.Tpo -c -o librawudp_transmitter_la-fs-rawudp-component.lo `test -f 'fs-rawudp-component.c' || echo '$(srcdir)/'`fs-rawudp-component.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-component.Tpo $(DEPDIR)/librawudp_transmitter_la-fs-rawudp-component.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs-rawudp-component.c' object='librawudp_transmitter_la-fs-rawudp-component.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librawudp_transmitter_la_CFLAGS) $(CFLAGS) -c -o librawudp_transmitter_la-fs-rawudp-component.lo `test -f 'fs-rawudp-component.c' || echo '$(srcdir)/'`fs-rawudp-component.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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)$(plugindir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-pluginLTLIBRARIES \ 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-pluginLTLIBRARIES 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-pluginLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pluginLTLIBRARIES 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 tags-am uninstall uninstall-am \ uninstall-pluginLTLIBRARIES # these are all the rules generating the relevant files $(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list $(AM_V_GEN)glib-genmarshal --header --prefix=$(glib_gen_prefix)_marshal $^ > $(glib_gen_basename)-marshal.h.tmp && \ mv $(glib_gen_basename)-marshal.h.tmp $(glib_gen_basename)-marshal.h $(glib_gen_basename)-marshal.c: $(glib_gen_basename)-marshal.list $(AM_V_GEN)echo "#include \"$(glib_gen_basename)-marshal.h\"" >> $(glib_gen_basename)-marshal.c.tmp && \ glib-genmarshal --body --prefix=$(glib_gen_prefix)_marshal $^ >> $(glib_gen_basename)-marshal.c.tmp && \ mv $(glib_gen_basename)-marshal.c.tmp $(glib_gen_basename)-marshal.c $(glib_gen_basename)-enumtypes.h: $(glib_enum_headers) $(AM_V_GEN)glib-mkenums \ --fhead "#ifndef __$(glib_enum_define)_ENUM_TYPES_H__\n#define __$(glib_enum_define)_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "\n/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define GST_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __$(glib_enum_define)_ENUM_TYPES_H__ */" \ $^ > $@ $(glib_gen_basename)-enumtypes.c: $(glib_enum_headers) @if test "x$(glib_enum_headers)" = "x"; then echo "ERROR: glib_enum_headers is empty, please fix Makefile"; exit 1; fi $(AM_V_GEN)glib-mkenums \ --fhead "#include \"$(glib_gen_basename)-enumtypes.h\"\n$(enum_headers)" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static volatile gsize g_define_type_id__volatile = 0;\n if (g_once_init_enter (&g_define_type_id__volatile)) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n GType g_define_type_id = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);\n }\n return g_define_type_id__volatile;\n}\n" \ $^ > $@ # a hack rule to make sure .Plo files exist because they get include'd # from Makefile's .deps/%-marshal.Plo: @touch $@ .deps/%-enumtypes.Plo: @touch $@ # 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: farstream-0.2.7/transmitters/rawudp/Makefile.am0000664000076400007640000000162112401500475016532 00000000000000 plugindir = $(FS_PLUGIN_PATH) plugin_LTLIBRARIES = librawudp-transmitter.la # sources used to compile this lib librawudp_transmitter_la_SOURCES = \ fs-rawudp-transmitter.c \ fs-rawudp-stream-transmitter.c \ fs-rawudp-component.c # flags used to compile this plugin librawudp_transmitter_la_CFLAGS = \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_CFLAGS) \ $(NICE_CFLAGS) \ $(GUPNP_CFLAGS) \ $(GIO_CFLAGS) librawudp_transmitter_la_LDFLAGS = $(FS_PLUGIN_LDFLAGS) librawudp_transmitter_la_LIBADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(FS_LIBS) \ $(GST_LIBS) \ $(NICE_LIBS) \ $(GUPNP_LIBS) \ $(GIO_LIBS) \ -lgstnet-@GST_API_VERSION@ noinst_HEADERS = \ fs-rawudp-transmitter.h \ fs-rawudp-stream-transmitter.h \ fs-rawudp-component.h glib_enum_define=FS_RAWUDP glib_gen_prefix=_fs_rawudp glib_gen_basename=fs-rawudp include $(top_srcdir)/common/gst-glib-gen.mak farstream-0.2.7/transmitters/rawudp/fs-rawudp-component.c0000664000076400007640000013363712461773672020610 00000000000000/* * Farstream - Farstream RAW UDP with STUN Component Transmitter * * Copyright 2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2008 Nokia Corp. * * fs-rawudp-transmitter.c - A Farstream UDP transmitter with STUN * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rawudp-component.h" #include #include #include #include #include #include #include #ifdef HAVE_GUPNP #include #endif #include #include #include #ifdef HAVE_UNISTD_H # include #endif #define GST_CAT_DEFAULT fs_rawudp_transmitter_debug #define DEFAULT_UPNP_MAPPING_TIMEOUT (600) #define DEFAULT_UPNP_DISCOVERY_TIMEOUT (2) /* Signals */ enum { NEW_LOCAL_CANDIDATE, LOCAL_CANDIDATES_PREPARED, NEW_ACTIVE_CANDIDATE_PAIR, KNOWN_SOURCE_PACKET_RECEIVED, ERROR_SIGNAL, LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_COMPONENT, PROP_IP, PROP_PORT, PROP_STUN_IP, PROP_STUN_PORT, PROP_STUN_TIMEOUT, PROP_SENDING, PROP_TRANSMITTER, PROP_FORCED_CANDIDATE, PROP_ASSOCIATE_ON_SOURCE, #ifdef HAVE_GUPNP PROP_UPNP_MAPPING, PROP_UPNP_DISCOVERY, PROP_UPNP_MAPPING_TIMEOUT, PROP_UPNP_DISCOVERY_TIMEOUT, PROP_UPNP_IGD #endif }; struct _FsRawUdpComponentPrivate { gboolean disposed; guint component; GError *construction_error; FsRawUdpTransmitter *transmitter; gchar *ip; guint port; gchar *stun_ip; guint stun_port; guint stun_timeout; GMutex mutex; StunAgent stun_agent; StunMessage stun_message; guchar stun_buffer[STUN_MAX_MESSAGE_SIZE_IPV6]; struct sockaddr_storage stun_sockaddr; gboolean stun_server_changed; gboolean associate_on_source; #ifdef HAVE_GUPNP gboolean upnp_discovery; gboolean upnp_mapping; guint upnp_mapping_timeout; guint upnp_discovery_timeout; GUPnPSimpleIgdThread *upnp_igd; #endif /* Above this line, its all set at construction time */ /* Below, they are protected by the mutex */ UdpPort *udpport; FsCandidate *remote_candidate; GSocketAddress *remote_address; FsCandidate *local_active_candidate; FsCandidate *local_forced_candidate; gboolean gathered; gulong stun_recv_id; gulong buffer_recv_id; GstClockID stun_timeout_id; GThread *stun_timeout_thread; gboolean stun_stop; gboolean sending; gboolean remote_is_unique; #ifdef HAVE_GUPNP GSource *upnp_discovery_timeout_src; FsCandidate *local_upnp_candidate; gulong upnp_signal_id; #endif }; static GObjectClass *parent_class = NULL; static guint signals[LAST_SIGNAL] = { 0 }; static GType type = 0; #define FS_RAWUDP_COMPONENT_LOCK(component) \ g_mutex_lock (&(component)->priv->mutex) #define FS_RAWUDP_COMPONENT_UNLOCK(component) \ g_mutex_unlock (&(component)->priv->mutex) static void fs_rawudp_component_class_init (FsRawUdpComponentClass *klass); static void fs_rawudp_component_init (FsRawUdpComponent *self); static void fs_rawudp_constructed (GObject *object); static void fs_rawudp_component_dispose (GObject *object); static void fs_rawudp_component_finalize (GObject *object); static void fs_rawudp_component_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_rawudp_component_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static gboolean fs_rawudp_component_emit_local_candidates (FsRawUdpComponent *self, GError **eror); static void fs_rawudp_component_emit_error (FsRawUdpComponent *self, gint error_no, gchar *error_msg); static void fs_rawudp_component_maybe_new_active_candidate_pair (FsRawUdpComponent *self); static void fs_rawudp_component_emit_candidate (FsRawUdpComponent *self, FsCandidate *candidate); static GstPadProbeReturn stun_recv_cb (GstPad *pad, GstPadProbeInfo *info, gpointer user_data); static gpointer stun_timeout_func (gpointer user_data); static GstPadProbeReturn buffer_recv_cb (GstPad *pad, GstPadProbeInfo *info, gpointer user_data); static void remote_is_unique_cb (gboolean unique, GSocketAddress *address, gpointer user_data); static gboolean fs_rawudp_component_start_stun (FsRawUdpComponent *self, GError **error); static void fs_rawudp_component_stop_stun_locked (FsRawUdpComponent *self); #ifdef HAVE_GUPNP static void fs_rawudp_component_stop_upnp_discovery_locked (FsRawUdpComponent *self); #endif GType fs_rawudp_component_get_type (void) { return type; } GType fs_rawudp_component_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsRawUdpComponentClass), NULL, NULL, (GClassInitFunc) fs_rawudp_component_class_init, NULL, NULL, sizeof (FsRawUdpComponent), 0, (GInstanceInitFunc) fs_rawudp_component_init }; /* Required because the GST type registration is not thread safe */ type = g_type_module_register_type (G_TYPE_MODULE (module), G_TYPE_OBJECT, "FsRawUdpComponent", &info, 0); return type; } static void fs_rawudp_component_class_init (FsRawUdpComponentClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_rawudp_component_set_property; gobject_class->get_property = fs_rawudp_component_get_property; gobject_class->constructed = fs_rawudp_constructed; gobject_class->dispose = fs_rawudp_component_dispose; gobject_class->finalize = fs_rawudp_component_finalize; g_object_class_install_property (gobject_class, PROP_COMPONENT, g_param_spec_uint ("component", "The component id", "The id of this component", 1, G_MAXUINT, 1, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SENDING, g_param_spec_boolean ("sending", "Whether to send from this transmitter", "If set to FALSE, the transmitter will stop sending to this person", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_IP, g_param_spec_string ("ip", "The local IP of this component", "The IPv4 address as a x.x.x.x string", NULL, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PORT, g_param_spec_uint ("port", "The local port requested for this component", "The IPv4 UDP port", 1, 65535, 7078, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STUN_IP, g_param_spec_string ("stun-ip", "The IP address of the STUN server", "The IPv4 address of the STUN server as a x.x.x.x string", NULL, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STUN_PORT, g_param_spec_uint ("stun-port", "The port of the STUN server", "The IPv4 UDP port of the STUN server as a ", 0, 65535, 3478, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STUN_TIMEOUT, g_param_spec_uint ("stun-timeout", "The timeout for the STUN reply", "How long to wait for for the STUN reply (in seconds) before giving up", 1, MAX_STUN_TIMEOUT, DEFAULT_STUN_TIMEOUT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TRANSMITTER, g_param_spec_object ("transmitter", "The transmitter object", "The rawudp transmitter object", FS_TYPE_RAWUDP_TRANSMITTER, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FORCED_CANDIDATE, g_param_spec_boxed ("forced-candidate", "A Forced candidate", "This candidate is built from a user preference", FS_TYPE_CANDIDATE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ASSOCIATE_ON_SOURCE, g_param_spec_boolean ("associate-on-source", "Associate incoming data based on the source address", "Whether to associate incoming data stream based on the" " source address", TRUE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); #ifdef HAVE_GUPNP g_object_class_install_property (gobject_class, PROP_UPNP_MAPPING, g_param_spec_boolean ("upnp-mapping", "Try to map ports using UPnP", "Tries to map ports using UPnP if enabled", TRUE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_UPNP_DISCOVERY, g_param_spec_boolean ("upnp-discovery", "Try to use UPnP to find the external IP address", "Tries to discovery the external IP with UPnP if stun fails", TRUE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_UPNP_MAPPING_TIMEOUT, g_param_spec_uint ("upnp-mapping-timeout", "Timeout after which UPnP mappings expire", "The UPnP port mappings expire after this period if the app has" " crashed (in seconds)", 0, G_MAXUINT32, DEFAULT_UPNP_MAPPING_TIMEOUT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_UPNP_DISCOVERY_TIMEOUT, g_param_spec_uint ("upnp-discovery-timeout", "Timeout after which UPnP discovery fails", "After this period, UPnP discovery is considered to have failed" " and the local IP is returned", 0, G_MAXUINT32, DEFAULT_UPNP_DISCOVERY_TIMEOUT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_UPNP_IGD, g_param_spec_object ("upnp-igd", "The GUPnPSimpleIgdThread object", "This is the GUPnP IGD abstraction object", GUPNP_TYPE_SIMPLE_IGD_THREAD, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); #endif /** * FsRawUdpComponent::new-local-candidate: * @self: #FsStream that emitted the signal * @local_candidate: #FsCandidate of the local candidate * * This signal is emitted when a new local candidate is discovered. */ signals[NEW_LOCAL_CANDIDATE] = g_signal_new ("new-local-candidate", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, FS_TYPE_CANDIDATE); /** * FsRawUdpComponent::local-candidates-prepared: * @self: #FsStream that emitted the signal * * This signal is emitted when all local candidates have been * prepared for this component. */ signals[LOCAL_CANDIDATES_PREPARED] = g_signal_new ("local-candidates-prepared", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * FsiRawUdpComponent::new-active-candidate-pair: * @self: #FsStream that emitted the signal * @local_candidate: #FsCandidate of the local candidate being used * @remote_candidate: #FsCandidate of the remote candidate being used * * This signal is emitted when there is a new active chandidate pair that has * been established. * */ signals[NEW_ACTIVE_CANDIDATE_PAIR] = g_signal_new ("new-active-candidate-pair", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, FS_TYPE_CANDIDATE, FS_TYPE_CANDIDATE); /** * FsRawUdpComponent::known-source-packet-received: * @self: #FsRawUdpComponent that emitted the signal * @component: The ID of this component * @buffer: the #GstBuffer coming from the known source * * This signal is emitted when a buffer coming from a confirmed known source * is received. * */ signals[KNOWN_SOURCE_PACKET_RECEIVED] = g_signal_new ("known-source-packet-received", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER); /** * FsRawUdpComponent::error: * @self: #FsStreamTransmitter that emitted the signal * @errorno: The number of the error * @error_msg: Error message * * This signal is emitted in any error condition * */ signals[ERROR_SIGNAL] = g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, FS_TYPE_ERROR, G_TYPE_STRING); g_type_class_add_private (klass, sizeof (FsRawUdpComponentPrivate)); if (gst_debug_category_get_threshold (GST_CAT_DEFAULT) >= GST_LEVEL_DEBUG) stun_debug_enable (); else stun_debug_disable (); } static void fs_rawudp_component_init (FsRawUdpComponent *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, FS_TYPE_RAWUDP_COMPONENT, FsRawUdpComponentPrivate); self->priv->disposed = FALSE; self->priv->sending = TRUE; self->priv->port = 7078; self->priv->associate_on_source = TRUE; stun_agent_init (&self->priv->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, STUN_COMPATIBILITY_RFC3489, 0); #ifdef HAVE_GUPNP self->priv->upnp_mapping = TRUE; self->priv->upnp_discovery = TRUE; self->priv->upnp_discovery_timeout = DEFAULT_UPNP_DISCOVERY_TIMEOUT; self->priv->upnp_mapping_timeout = DEFAULT_UPNP_MAPPING_TIMEOUT; #endif g_mutex_init (&self->priv->mutex); } static void fs_rawudp_constructed (GObject *object) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (object); if (!self->priv->transmitter) { self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You need a transmitter to build this object"); return; } self->priv->udpport = fs_rawudp_transmitter_get_udpport (self->priv->transmitter, self->priv->component, self->priv->ip, self->priv->port, &self->priv->construction_error); if (!self->priv->udpport) { if (!self->priv->construction_error) self->priv->construction_error = g_error_new (FS_ERROR, FS_ERROR_INTERNAL, "Unkown error when trying to open udp port"); return; } if (self->priv->associate_on_source) self->priv->buffer_recv_id = fs_rawudp_transmitter_udpport_connect_recv ( self->priv->udpport, buffer_recv_cb, self); GST_CALL_PARENT (G_OBJECT_CLASS, constructed, (object)); } static void fs_rawudp_component_dispose (GObject *object) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (object); FsRawUdpTransmitter *ts = NULL; if (self->priv->disposed) /* If dispose did already run, return. */ return; if (self->priv->udpport) { GST_ERROR ("You must call fs_stream_transmitter_stop() before dropping" " the last reference to a stream transmitter"); fs_rawudp_component_stop (self); } #ifdef HAVE_GUPNP if (self->priv->upnp_igd) { g_object_unref (self->priv->upnp_igd); self->priv->upnp_igd = NULL; } #endif /* Make sure dispose does not run twice. */ self->priv->disposed = TRUE; FS_RAWUDP_COMPONENT_LOCK (self); ts = self->priv->transmitter; self->priv->transmitter = NULL; FS_RAWUDP_COMPONENT_UNLOCK (self); g_clear_object (&self->priv->remote_address); g_object_unref (ts); parent_class->dispose (object); } void fs_rawudp_component_stop (FsRawUdpComponent *self) { UdpPort *udpport = NULL; FS_RAWUDP_COMPONENT_LOCK (self); if (self->priv->stun_timeout_thread != NULL) { fs_rawudp_component_stop_stun_locked (self); FS_RAWUDP_COMPONENT_UNLOCK (self); g_thread_join (self->priv->stun_timeout_thread); FS_RAWUDP_COMPONENT_LOCK (self); self->priv->stun_timeout_thread = NULL; } udpport = self->priv->udpport; self->priv->udpport = NULL; if (udpport) { #ifdef HAVE_GUPNP fs_rawudp_component_stop_upnp_discovery_locked (self); if (self->priv->upnp_igd && (self->priv->upnp_mapping || self->priv->upnp_discovery)) { gupnp_simple_igd_remove_port (GUPNP_SIMPLE_IGD (self->priv->upnp_igd), "UDP", fs_rawudp_transmitter_udpport_get_port (udpport)); } #endif if (self->priv->buffer_recv_id) { fs_rawudp_transmitter_udpport_disconnect_recv ( udpport, self->priv->buffer_recv_id); self->priv->buffer_recv_id = 0; } if (self->priv->remote_candidate) { if (self->priv->sending) fs_rawudp_transmitter_udpport_remove_dest (udpport, self->priv->remote_candidate->ip, self->priv->remote_candidate->port); fs_rawudp_transmitter_udpport_remove_known_address (udpport, self->priv->remote_address, remote_is_unique_cb, self); } FS_RAWUDP_COMPONENT_UNLOCK (self); fs_rawudp_transmitter_put_udpport (self->priv->transmitter, udpport); } else FS_RAWUDP_COMPONENT_UNLOCK (self); } static void fs_rawudp_component_finalize (GObject *object) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (object); if (self->priv->remote_candidate) fs_candidate_destroy (self->priv->remote_candidate); if (self->priv->local_active_candidate) fs_candidate_destroy (self->priv->local_active_candidate); if (self->priv->local_forced_candidate) fs_candidate_destroy (self->priv->local_forced_candidate); #ifdef HAVE_GUPNP if (self->priv->local_upnp_candidate) fs_candidate_destroy (self->priv->local_upnp_candidate); #endif g_free (self->priv->ip); g_free (self->priv->stun_ip); g_mutex_clear (&self->priv->mutex); parent_class->finalize (object); } static void fs_rawudp_component_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (object); switch (prop_id) { case PROP_SENDING: FS_RAWUDP_COMPONENT_LOCK (self); g_value_set_boolean (value, self->priv->sending); FS_RAWUDP_COMPONENT_UNLOCK (self); break; case PROP_FORCED_CANDIDATE: FS_RAWUDP_COMPONENT_LOCK (self); g_value_set_boxed (value, self->priv->local_forced_candidate); FS_RAWUDP_COMPONENT_UNLOCK (self); break; case PROP_COMPONENT: g_value_set_uint (value, self->priv->component); break; #ifdef HAVE_GUPNP case PROP_UPNP_MAPPING: g_value_set_boolean (value, self->priv->upnp_mapping); break; case PROP_UPNP_DISCOVERY: g_value_set_boolean (value, self->priv->upnp_discovery); break; case PROP_UPNP_MAPPING_TIMEOUT: g_value_set_uint (value, self->priv->upnp_mapping_timeout); break; case PROP_UPNP_DISCOVERY_TIMEOUT: g_value_set_uint (value, self->priv->upnp_discovery_timeout); break; #endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_rawudp_component_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (object); switch (prop_id) { case PROP_COMPONENT: self->priv->component = g_value_get_uint (value); break; case PROP_SENDING: { gboolean sending, old_sending; FsCandidate *candidate = NULL; g_return_if_fail (self->priv->udpport); FS_RAWUDP_COMPONENT_LOCK (self); old_sending = self->priv->sending; sending = self->priv->sending = g_value_get_boolean (value); if (self->priv->remote_candidate) candidate = fs_candidate_copy (self->priv->remote_candidate); FS_RAWUDP_COMPONENT_UNLOCK (self); if (sending != old_sending && candidate) { if (sending) { fs_rawudp_transmitter_udpport_add_dest (self->priv->udpport, candidate->ip, candidate->port); } else { fs_rawudp_transmitter_udpport_remove_dest (self->priv->udpport, candidate->ip, candidate->port); } } if (candidate) fs_candidate_destroy (candidate); } break; case PROP_IP: g_free (self->priv->ip); self->priv->ip = g_value_dup_string (value); break; case PROP_PORT: self->priv->port = g_value_get_uint (value); break; case PROP_STUN_IP: g_free (self->priv->stun_ip); self->priv->stun_ip = g_value_dup_string (value); break; case PROP_STUN_PORT: self->priv->stun_port = g_value_get_uint (value); break; case PROP_STUN_TIMEOUT: self->priv->stun_timeout = g_value_get_uint (value); break; case PROP_TRANSMITTER: self->priv->transmitter = g_value_dup_object (value); break; case PROP_FORCED_CANDIDATE: FS_RAWUDP_COMPONENT_LOCK (self); if (self->priv->local_forced_candidate) GST_WARNING ("Tried to reset a forced candidate"); else self->priv->local_forced_candidate = g_value_dup_boxed (value); FS_RAWUDP_COMPONENT_UNLOCK (self); break; case PROP_ASSOCIATE_ON_SOURCE: self->priv->associate_on_source = g_value_get_boolean (value); break; #ifdef HAVE_GUPNP case PROP_UPNP_MAPPING: self->priv->upnp_mapping = g_value_get_boolean (value); break; case PROP_UPNP_DISCOVERY: self->priv->upnp_discovery = g_value_get_boolean (value); break; case PROP_UPNP_MAPPING_TIMEOUT: self->priv->upnp_mapping_timeout = g_value_get_uint (value); break; case PROP_UPNP_DISCOVERY_TIMEOUT: self->priv->upnp_discovery_timeout = g_value_get_uint (value); break; case PROP_UPNP_IGD: self->priv->upnp_igd = g_value_dup_object (value); break; #endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } FsRawUdpComponent * fs_rawudp_component_new ( guint component, FsRawUdpTransmitter *trans, gboolean associate_on_source, const gchar *ip, guint port, const gchar *stun_ip, guint stun_port, guint stun_timeout, gboolean upnp_mapping, gboolean upnp_discovery, guint upnp_mapping_timeout, guint upnp_discovery_timeout, gpointer upnp_igd, guint *used_port, GError **error) { FsRawUdpComponent *self = NULL; self = g_object_new (FS_TYPE_RAWUDP_COMPONENT, "component", component, "transmitter", trans, "associate-on-source", associate_on_source, "ip", ip, "port", port, "stun-ip", stun_ip, "stun-port", stun_port, "stun-timeout", stun_timeout, #ifdef HAVE_GUPNP "upnp-mapping", upnp_mapping, "upnp-discovery", upnp_discovery, "upnp-mapping-timeout", upnp_mapping_timeout, "upnp-discovery-timeout", upnp_discovery_timeout, "upnp-igd", upnp_igd, #endif NULL); if (!self) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build RawUdp component %u", component); return NULL; } if (self->priv->construction_error) { g_propagate_error (error, self->priv->construction_error); g_object_unref (self); return NULL; } if (used_port) *used_port = fs_rawudp_transmitter_udpport_get_port (self->priv->udpport); return self; } static void remote_is_unique_cb (gboolean unique, GSocketAddress *address, gpointer user_data) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (user_data); FS_RAWUDP_COMPONENT_LOCK (self); if (!fs_g_inet_socket_address_equal (address, self->priv->remote_address)) { GST_ERROR ("Got callback for an address that is not ours"); goto out; } self->priv->remote_is_unique = unique; out: FS_RAWUDP_COMPONENT_UNLOCK (self); } gboolean fs_rawudp_component_set_remote_candidate (FsRawUdpComponent *self, FsCandidate *candidate, GError **error) { FsCandidate *old_candidate = NULL; gboolean sending; GInetAddress *addr; if (candidate->component_id != self->priv->component) { g_set_error (error, FS_ERROR, FS_ERROR_INTERNAL, "Remote candidate routed to wrong component (%d->%d)", candidate->component_id, self->priv->component); return FALSE; } addr = g_inet_address_new_from_string (candidate->ip); if (addr == NULL) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid address passed: %s", candidate->ip); return FALSE; } FS_RAWUDP_COMPONENT_LOCK (self); if (!self->priv->udpport) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Can't call set_remote_candidate after the thread has been stopped"); FS_RAWUDP_COMPONENT_UNLOCK (self); g_object_unref (addr); return FALSE; } if (self->priv->remote_candidate) fs_rawudp_transmitter_udpport_remove_known_address (self->priv->udpport, self->priv->remote_address, remote_is_unique_cb, self); old_candidate = self->priv->remote_candidate; self->priv->remote_candidate = fs_candidate_copy (candidate); sending = self->priv->sending; g_clear_object (&self->priv->remote_address); self->priv->remote_address = g_inet_socket_address_new (addr, candidate->port); g_object_unref (addr); self->priv->remote_is_unique = fs_rawudp_transmitter_udpport_add_known_address (self->priv->udpport, self->priv->remote_address, remote_is_unique_cb, self); FS_RAWUDP_COMPONENT_UNLOCK (self); if (sending) fs_rawudp_transmitter_udpport_add_dest (self->priv->udpport, candidate->ip, candidate->port); if (old_candidate) { if (sending) fs_rawudp_transmitter_udpport_remove_dest (self->priv->udpport, old_candidate->ip, old_candidate->port); fs_candidate_destroy (old_candidate); } fs_rawudp_component_maybe_new_active_candidate_pair (self); return TRUE; } static void fs_rawudp_component_maybe_emit_local_candidates (FsRawUdpComponent *self) { GError *error = NULL; FS_RAWUDP_COMPONENT_LOCK (self); if (self->priv->local_active_candidate) { FS_RAWUDP_COMPONENT_UNLOCK (self); return; } if (self->priv->stun_timeout_thread && self->priv->stun_timeout_thread != g_thread_self ()) { FS_RAWUDP_COMPONENT_UNLOCK (self); return; } #ifdef HAVE_GUPNP if (self->priv->local_upnp_candidate) { self->priv->local_active_candidate = self->priv->local_upnp_candidate; self->priv->local_upnp_candidate = NULL; GST_DEBUG ("C:%d Emitting UPnP discovered candidate: %s:%u", self->priv->component, self->priv->local_active_candidate->ip, self->priv->local_active_candidate->port); FS_RAWUDP_COMPONENT_UNLOCK (self); fs_rawudp_component_emit_candidate (self, self->priv->local_active_candidate); return; } #endif FS_RAWUDP_COMPONENT_UNLOCK (self); if (!fs_rawudp_component_emit_local_candidates (self, &error)) { if (error->domain == FS_ERROR) fs_rawudp_component_emit_error (self, error->code, error->message); else fs_rawudp_component_emit_error (self, FS_ERROR_INTERNAL, "Error emitting local candidates"); } g_clear_error (&error); } #ifdef HAVE_GUPNP static void _upnp_mapped_external_port (GUPnPSimpleIgdThread *igd, gchar *proto, gchar *external_ip, gchar *replaces_external_ip, guint external_port, gchar *local_ip, guint local_port, gchar *description, gpointer user_data) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (user_data); FS_RAWUDP_COMPONENT_LOCK (self); /* Skip it if its not our port */ if (fs_rawudp_transmitter_udpport_get_port (self->priv->udpport) != external_port) { FS_RAWUDP_COMPONENT_UNLOCK (self); return; } fs_rawudp_component_stop_upnp_discovery_locked (self); if (self->priv->local_upnp_candidate || self->priv->local_active_candidate) { FS_RAWUDP_COMPONENT_UNLOCK (self); return; } self->priv->local_upnp_candidate = fs_candidate_new ("L1", self->priv->component, FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, external_ip, external_port); GST_DEBUG ("Got UPnP Candidate c:%d ext-ip:%s ext-port:%u" " int-ip:%s int-port:%u", self->priv->component, external_ip, external_port, local_ip, local_port); FS_RAWUDP_COMPONENT_UNLOCK (self); fs_rawudp_component_maybe_emit_local_candidates (self); } static gboolean _upnp_discovery_timeout (gpointer user_data) { FsRawUdpComponent *self = user_data; GST_DEBUG ("UPnP timed out on component %d", self->priv->component); FS_RAWUDP_COMPONENT_LOCK (self); g_source_unref (self->priv->upnp_discovery_timeout_src); self->priv->upnp_discovery_timeout_src = NULL; FS_RAWUDP_COMPONENT_UNLOCK (self); fs_rawudp_component_maybe_emit_local_candidates (self); return FALSE; } static void fs_rawudp_component_stop_upnp_discovery_locked (FsRawUdpComponent *self) { if (self->priv->upnp_discovery_timeout_src) { g_source_destroy (self->priv->upnp_discovery_timeout_src); g_source_unref (self->priv->upnp_discovery_timeout_src); } self->priv->upnp_discovery_timeout_src = NULL; if (self->priv->upnp_signal_id) { g_signal_handler_disconnect (self->priv->upnp_igd, self->priv->upnp_signal_id); self->priv->upnp_signal_id = 0; } } #endif static GList * filter_ips (GList *ips, gboolean ipv4, gboolean ipv6) { GList *item; if (ipv4 && ipv6) return ips; for (item = ips; item;) { gchar *ip = item->data; GList *next = item->next; if ((ipv4 && !strchr (ip, '.')) || (ipv6 && !strchr (ip, ':'))) { g_free (ip); ips = g_list_delete_link (ips, item); } item = next; } return ips; } gboolean fs_rawudp_component_gather_local_candidates (FsRawUdpComponent *self, GError **error) { if (self->priv->gathered) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Call gather local candidates twice on the same component"); return FALSE; } if (!self->priv->udpport) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You can not call gather_local_candidate() after the stream has" " been stopped"); return FALSE; } #ifdef HAVE_GUPNP if (self->priv->upnp_igd && (self->priv->upnp_mapping || self->priv->upnp_discovery)) { guint port; GList *ips; port = fs_rawudp_transmitter_udpport_get_port (self->priv->udpport); ips = nice_interfaces_get_local_ips (FALSE); ips = filter_ips (ips, TRUE, FALSE); if (ips) { gchar *ip = g_list_first (ips)->data; GMainContext *ctx; if (self->priv->upnp_discovery) { FS_RAWUDP_COMPONENT_LOCK (self); self->priv->upnp_signal_id = g_signal_connect (self->priv->upnp_igd, "mapped-external-port", G_CALLBACK (_upnp_mapped_external_port), self); FS_RAWUDP_COMPONENT_UNLOCK (self); } GST_DEBUG ("Doing UPnP Discovery for local ip:%s port:%u", ip, port); gupnp_simple_igd_add_port (GUPNP_SIMPLE_IGD (self->priv->upnp_igd), "UDP", port, ip, port, self->priv->upnp_mapping_timeout, "Farstream Raw UDP transmitter " PACKAGE_VERSION); if (self->priv->upnp_discovery) { FS_RAWUDP_COMPONENT_LOCK (self); self->priv->upnp_discovery_timeout_src = g_timeout_source_new_seconds ( self->priv->upnp_discovery_timeout); g_source_set_callback (self->priv->upnp_discovery_timeout_src, _upnp_discovery_timeout, self, NULL); g_object_get (self->priv->upnp_igd, "main-context", &ctx, NULL); g_source_attach (self->priv->upnp_discovery_timeout_src, ctx); FS_RAWUDP_COMPONENT_UNLOCK (self); } } else { FS_RAWUDP_COMPONENT_LOCK (self); fs_rawudp_component_stop_upnp_discovery_locked (self); FS_RAWUDP_COMPONENT_UNLOCK (self); } /* free list of ips */ g_list_foreach (ips, (GFunc) g_free, NULL); g_list_free (ips); } #endif if (self->priv->stun_ip) return fs_rawudp_component_start_stun (self, error); #ifdef HAVE_GUPNP else if (!self->priv->upnp_signal_id) return fs_rawudp_component_emit_local_candidates (self, error); else return TRUE; #else else return fs_rawudp_component_emit_local_candidates (self, error); #endif } static gboolean fs_rawudp_component_send_stun_locked (FsRawUdpComponent *self, GError **error) { socklen_t socklen = 0; switch (self->priv->stun_sockaddr.ss_family) { case AF_INET: socklen = sizeof(struct sockaddr_in); break; case AF_INET6: socklen = sizeof(struct sockaddr_in6); break; default: g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Unknown address family for stun server"); return FALSE; } return fs_rawudp_transmitter_udpport_sendto (self->priv->udpport, (gchar*) self->priv->stun_buffer, stun_message_length (&self->priv->stun_message), (const struct sockaddr *)&self->priv->stun_sockaddr, socklen, error); } static gboolean fs_rawudp_component_start_stun (FsRawUdpComponent *self, GError **error) { NiceAddress niceaddr; gboolean res = TRUE; GST_DEBUG ("C:%d starting the STUN process with server %s:%u", self->priv->component, self->priv->stun_ip, self->priv->stun_port); FS_RAWUDP_COMPONENT_LOCK (self); self->priv->stun_recv_id = fs_rawudp_transmitter_udpport_connect_recv ( self->priv->udpport, stun_recv_cb, self); nice_address_init (&niceaddr); if (!nice_address_set_from_string (&niceaddr, self->priv->stun_ip)) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid IP address %s passed for STUN", self->priv->stun_ip); FS_RAWUDP_COMPONENT_UNLOCK (self); return FALSE; } nice_address_set_port (&niceaddr, self->priv->stun_port); nice_address_copy_to_sockaddr (&niceaddr, (struct sockaddr *) &self->priv->stun_sockaddr); stun_usage_bind_create ( &self->priv->stun_agent, &self->priv->stun_message, self->priv->stun_buffer, sizeof(self->priv->stun_buffer)); /* only create a new thread if the old one was stopped. Otherwise we can * just reuse the currently running one. */ if (self->priv->stun_timeout_thread == NULL) { if (!fs_rawudp_component_send_stun_locked (self, error)) { FS_RAWUDP_COMPONENT_UNLOCK (self); return FALSE; } self->priv->stun_timeout_thread = g_thread_try_new ("stun timeout thread", stun_timeout_func, self, error); } res = (self->priv->stun_timeout_thread != NULL); g_assert (error == NULL || res || *error); FS_RAWUDP_COMPONENT_UNLOCK (self); return res; } /* * This function MUST always be called wiuth the Component lock held */ static void fs_rawudp_component_stop_stun_locked (FsRawUdpComponent *self) { if (self->priv->stun_recv_id) { fs_rawudp_transmitter_udpport_disconnect_recv ( self->priv->udpport, self->priv->stun_recv_id); self->priv->stun_recv_id = 0; } self->priv->stun_stop = TRUE; if (self->priv->stun_timeout_id) gst_clock_id_unschedule (self->priv->stun_timeout_id); } static GstPadProbeReturn stun_recv_cb (GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (user_data); GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info); FsCandidate *candidate = NULL; StunMessage msg; StunValidationStatus stunv; StunUsageBindReturn stunr; struct sockaddr_storage addr; socklen_t addr_len = sizeof(addr); struct sockaddr_storage alt_addr; socklen_t alt_addr_len = sizeof(alt_addr); gchar addr_str[NICE_ADDRESS_STRING_LEN + 1]; NiceAddress niceaddr; GstMapInfo map; gst_buffer_map (buffer, &map, GST_MAP_READ); if (gst_buffer_get_size (buffer) < 4) /* Packet is too small to be STUN */ goto passthrough; if (map.data[0] >> 6) /* Non stun packet */ goto passthrough; g_assert (fs_rawudp_transmitter_udpport_is_pad (self->priv->udpport, pad)); FS_RAWUDP_COMPONENT_LOCK(self); stunv = stun_agent_validate (&self->priv->stun_agent, &msg, map.data, map.size, NULL, NULL); FS_RAWUDP_COMPONENT_UNLOCK(self); /* not a valid stun message */ if (stunv != STUN_VALIDATION_SUCCESS) goto passthrough; stunr = stun_usage_bind_process (&msg, (struct sockaddr *) &addr, &addr_len, (struct sockaddr *) &alt_addr, &alt_addr_len); switch (stunr) { case STUN_USAGE_BIND_RETURN_INVALID: /* Not a valid bind reponse */ return TRUE; case STUN_USAGE_BIND_RETURN_ERROR: /* Not a valid bind reponse */ return FALSE; case STUN_USAGE_BIND_RETURN_ALTERNATE_SERVER: /* Change servers and reset timeouts */ FS_RAWUDP_COMPONENT_LOCK(self); memcpy (&self->priv->stun_sockaddr, &alt_addr, MIN (sizeof(self->priv->stun_sockaddr), alt_addr_len)); self->priv->stun_server_changed = TRUE; stun_usage_bind_create ( &self->priv->stun_agent, &self->priv->stun_message, self->priv->stun_buffer, sizeof(self->priv->stun_buffer)); nice_address_init (&niceaddr); nice_address_set_from_sockaddr (&niceaddr, (const struct sockaddr *) &alt_addr); nice_address_to_string (&niceaddr, addr_str); GST_DEBUG ("Stun server redirected us to alternate server %s:%d", addr_str, nice_address_get_port (&niceaddr)); if (self->priv->stun_timeout_id) gst_clock_id_unschedule (self->priv->stun_timeout_id); FS_RAWUDP_COMPONENT_UNLOCK(self); return FALSE; default: /* For any other case, pass the packet through */ return TRUE; case STUN_USAGE_BIND_RETURN_SUCCESS: break; } nice_address_init (&niceaddr); nice_address_set_from_sockaddr (&niceaddr, (const struct sockaddr *) &addr); nice_address_to_string (&niceaddr, addr_str); candidate = fs_candidate_new ("L1", self->priv->component, FS_CANDIDATE_TYPE_SRFLX, FS_NETWORK_PROTOCOL_UDP, addr_str, nice_address_get_port (&niceaddr)); GST_DEBUG ("Stun server says we are %s:%u\n", addr_str, nice_address_get_port (&niceaddr)); FS_RAWUDP_COMPONENT_LOCK(self); fs_rawudp_component_stop_stun_locked (self); #ifdef HAVE_GUPNP fs_rawudp_component_stop_upnp_discovery_locked (self); #endif self->priv->local_active_candidate = fs_candidate_copy (candidate); FS_RAWUDP_COMPONENT_UNLOCK(self); GST_DEBUG ("C:%d Emitting STUN discovered candidate: %s:%u", self->priv->component, candidate->ip, candidate->port); fs_rawudp_component_emit_candidate (self, candidate); fs_candidate_destroy (candidate); gst_buffer_unmap (buffer, &map); return GST_PAD_PROBE_DROP; passthrough: gst_buffer_unmap (buffer, &map); return GST_PAD_PROBE_OK; } static gpointer stun_timeout_func (gpointer user_data) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (user_data); GstClock *sysclock = NULL; GstClockID id; gboolean emit = TRUE; GstClockTime next_stun_timeout; GError *error = NULL; guint timeout_accum_ms = 0; guint remainder; StunUsageTimerReturn timer_ret = STUN_USAGE_TIMER_RETURN_SUCCESS; StunTransactionId stunid; StunTimer stun_timer; sysclock = gst_system_clock_obtain (); if (sysclock == NULL) { fs_rawudp_component_emit_error (self, FS_ERROR_INTERNAL, "Could not obtain gst system clock"); FS_RAWUDP_COMPONENT_LOCK(self); goto interrupt; } FS_RAWUDP_COMPONENT_LOCK(self); stun_timer_start (&stun_timer, STUN_TIMER_DEFAULT_TIMEOUT, STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS); while (!self->priv->stun_stop && timeout_accum_ms < self->priv->stun_timeout * 1000) { if (self->priv->stun_server_changed) { stun_timer_start (&stun_timer, STUN_TIMER_DEFAULT_TIMEOUT, STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS); self->priv->stun_server_changed = FALSE; timer_ret = STUN_USAGE_TIMER_RETURN_RETRANSMIT; } if (timer_ret == STUN_USAGE_TIMER_RETURN_RETRANSMIT && !fs_rawudp_component_send_stun_locked (self, &error)) { FS_RAWUDP_COMPONENT_UNLOCK(self); fs_rawudp_component_emit_error (self, error->code, error->message); g_clear_error (&error); FS_RAWUDP_COMPONENT_LOCK (self); fs_rawudp_component_stop_stun_locked (self); goto interrupt; } if (self->priv->stun_stop) goto interrupt; remainder = stun_timer_remainder (&stun_timer); next_stun_timeout = gst_clock_get_time (sysclock) + remainder * GST_MSECOND; id = self->priv->stun_timeout_id = gst_clock_new_single_shot_id (sysclock, next_stun_timeout); GST_LOG ("C:%u Waiting for STUN reply for %u ms, next: %u ms", self->priv->component, remainder, timeout_accum_ms); FS_RAWUDP_COMPONENT_UNLOCK(self); gst_clock_id_wait (id, NULL); FS_RAWUDP_COMPONENT_LOCK(self); gst_clock_id_unref (id); self->priv->stun_timeout_id = NULL; timer_ret = stun_timer_refresh (&stun_timer); timeout_accum_ms += remainder; if (timer_ret == STUN_USAGE_TIMER_RETURN_TIMEOUT) break; } interrupt: if (self->priv->stun_stop) { GST_DEBUG ("C:%u STUN process interrupted", self->priv->component); emit = FALSE; } fs_rawudp_component_stop_stun_locked (self); stun_message_id (&self->priv->stun_message, stunid); stun_agent_forget_transaction (&self->priv->stun_agent, stunid); FS_RAWUDP_COMPONENT_UNLOCK(self); gst_object_unref (sysclock); if (emit) fs_rawudp_component_maybe_emit_local_candidates (self); return NULL; } static void fs_rawudp_component_emit_error (FsRawUdpComponent *self, gint error_no, gchar *error_msg) { g_signal_emit (self, signals[ERROR_SIGNAL], 0, error_no, error_msg); } static void fs_rawudp_component_maybe_new_active_candidate_pair (FsRawUdpComponent *self) { FS_RAWUDP_COMPONENT_LOCK (self); if (self->priv->local_active_candidate && self->priv->remote_candidate) { FsCandidate *remote = fs_candidate_copy (self->priv->remote_candidate); FS_RAWUDP_COMPONENT_UNLOCK (self); g_signal_emit (self, signals[NEW_ACTIVE_CANDIDATE_PAIR], 0, self->priv->local_active_candidate, remote); fs_candidate_destroy (remote); } else { FS_RAWUDP_COMPONENT_UNLOCK (self); } } static gboolean fs_rawudp_component_emit_local_candidates (FsRawUdpComponent *self, GError **error) { GList *ips = NULL; GList *current; guint port; FS_RAWUDP_COMPONENT_LOCK (self); if (self->priv->local_forced_candidate) { self->priv->local_active_candidate = fs_candidate_copy ( self->priv->local_forced_candidate); FS_RAWUDP_COMPONENT_UNLOCK (self); GST_DEBUG ("C:%d Emitting forced candidate: %s:%u", self->priv->component, self->priv->local_active_candidate->ip, self->priv->local_active_candidate->port); fs_rawudp_component_emit_candidate (self, self->priv->local_active_candidate); return TRUE; } port = fs_rawudp_transmitter_udpport_get_port (self->priv->udpport); ips = nice_interfaces_get_local_ips (TRUE); ips = filter_ips (ips, TRUE, FALSE); for (current = g_list_first (ips); current; current = g_list_next (current)) { self->priv->local_active_candidate = fs_candidate_new ("L1", self->priv->component, FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, current->data, port); /* FIXME: Emit only the first candidate ?? */ break; } /* free list of ips */ g_list_foreach (ips, (GFunc) g_free, NULL); g_list_free (ips); if (self->priv->local_active_candidate) { FS_RAWUDP_COMPONENT_UNLOCK (self); GST_DEBUG ("C:%d Emitting local interface candidate: %s:%u", self->priv->component, self->priv->local_active_candidate->ip, self->priv->local_active_candidate->port); fs_rawudp_component_emit_candidate (self, self->priv->local_active_candidate); } else { FS_RAWUDP_COMPONENT_UNLOCK (self); g_set_error (error, FS_ERROR, FS_ERROR_NETWORK, "We have no local candidate for component %d", self->priv->component); return FALSE; } return TRUE; } static void fs_rawudp_component_emit_candidate (FsRawUdpComponent *self, FsCandidate *candidate) { g_signal_emit (self, signals[NEW_LOCAL_CANDIDATE], 0, candidate); g_signal_emit (self, signals[LOCAL_CANDIDATES_PREPARED], 0); fs_rawudp_component_maybe_new_active_candidate_pair (self); } /* * This is a has "have-data" signal handler, so we return %TRUE to not * drop the buffer */ static GstPadProbeReturn buffer_recv_cb (GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { FsRawUdpComponent *self = FS_RAWUDP_COMPONENT (user_data); GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info); GstNetAddressMeta *netmeta = gst_buffer_get_net_address_meta (buffer); if (netmeta) { FS_RAWUDP_COMPONENT_LOCK (self); if (self->priv->remote_is_unique && fs_g_inet_socket_address_equal (self->priv->remote_address, netmeta->addr)) { FS_RAWUDP_COMPONENT_UNLOCK (self); g_signal_emit (self, signals[KNOWN_SOURCE_PACKET_RECEIVED], 0, self->priv->component, buffer); } else { FS_RAWUDP_COMPONENT_UNLOCK (self); } } else { GST_WARNING ("received buffer that does not contain a GstNetAddressMeta"); } return GST_PAD_PROBE_OK; } farstream-0.2.7/transmitters/rawudp/fs-rawudp-transmitter.h0000664000076400007640000001076512461773672021163 00000000000000/* * Farstream - Farstream RAW UDP with STUN Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rawudp-transmitter.h - A Farstream UDP transmitter with STUN * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RAWUDP_TRANSMITTER_H__ #define __FS_RAWUDP_TRANSMITTER_H__ #include #include #include #ifdef G_OS_WIN32 # include #else /*G_OS_WIN32*/ # include # include # include #endif /*G_OS_WIN32*/ G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RAWUDP_TRANSMITTER \ (fs_rawudp_transmitter_get_type ()) #define FS_RAWUDP_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RAWUDP_TRANSMITTER, \ FsRawUdpTransmitter)) #define FS_RAWUDP_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RAWUDP_TRANSMITTER, \ FsRawUdpTransmitterClass)) #define FS_IS_RAWUDP_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RAWUDP_TRANSMITTER)) #define FS_IS_RAWUDP_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RAWUDP_TRANSMITTER)) #define FS_RAWUDP_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RAWUDP_TRANSMITTER, \ FsRawUdpTransmitterClass)) #define FS_RAWUDP_TRANSMITTER_CAST(obj) ((FsRawUdpTransmitter *) (obj)) typedef struct _FsRawUdpTransmitter FsRawUdpTransmitter; typedef struct _FsRawUdpTransmitterClass FsRawUdpTransmitterClass; typedef struct _FsRawUdpTransmitterPrivate FsRawUdpTransmitterPrivate; /** * FsRawUdpTransmitterClass: * @parent_class: Our parent * * The Raw UDP transmitter class */ struct _FsRawUdpTransmitterClass { FsTransmitterClass parent_class; }; /** * FsRawUdpTransmitter: * * All members are private, access them using methods and properties */ struct _FsRawUdpTransmitter { FsTransmitter parent; /* The number of components (READONLY)*/ gint components; /*< private >*/ FsRawUdpTransmitterPrivate *priv; }; /* Private declaration */ typedef struct _UdpPort UdpPort; typedef void (*FsRawUdpAddressUniqueCallbackFunc) (gboolean unique, GSocketAddress *address, gpointer user_data); GType fs_rawudp_transmitter_get_type (void); GST_DEBUG_CATEGORY_EXTERN (fs_rawudp_transmitter_debug); UdpPort *fs_rawudp_transmitter_get_udpport (FsRawUdpTransmitter *trans, guint component_id, const gchar *requested_ip, guint requested_port, GError **error); void fs_rawudp_transmitter_put_udpport (FsRawUdpTransmitter *trans, UdpPort *udpport); void fs_rawudp_transmitter_udpport_add_dest (UdpPort *udpport, const gchar *ip, gint port); void fs_rawudp_transmitter_udpport_remove_dest (UdpPort *udpport, const gchar *ip, gint port); gboolean fs_rawudp_transmitter_udpport_sendto (UdpPort *udpport, gchar *msg, size_t len, const struct sockaddr *to, socklen_t tolen, GError **error); gulong fs_rawudp_transmitter_udpport_connect_recv (UdpPort *udpport, GstPadProbeCallback callback, gpointer user_data); void fs_rawudp_transmitter_udpport_disconnect_recv (UdpPort *udpport, gulong id); gboolean fs_rawudp_transmitter_udpport_is_pad (UdpPort *udpport, GstPad *pad); gint fs_rawudp_transmitter_udpport_get_port (UdpPort *udpport); gboolean fs_rawudp_transmitter_udpport_add_known_address (UdpPort *udpport, GSocketAddress *address, FsRawUdpAddressUniqueCallbackFunc callback, gpointer user_data); void fs_rawudp_transmitter_udpport_remove_known_address (UdpPort *udpport, GSocketAddress *address, FsRawUdpAddressUniqueCallbackFunc callback, gpointer user_data); gboolean fs_g_inet_socket_address_equal (GSocketAddress *addr1, GSocketAddress *addr2); G_END_DECLS #endif /* __FS_RAWUDP_TRANSMITTER_H__ */ farstream-0.2.7/transmitters/rawudp/fs-rawudp-stream-transmitter.h0000664000076400007640000000657411710041463022435 00000000000000/* * Farstream - Farstream RAW UDP with STUN Stream Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-stream-transmitter.h - A Farstream UDP stream transmitter with STUN * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RAWUDP_STREAM_TRANSMITTER_H__ #define __FS_RAWUDP_STREAM_TRANSMITTER_H__ #include #include #include #include #include "fs-rawudp-transmitter.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RAWUDP_STREAM_TRANSMITTER \ (fs_rawudp_stream_transmitter_get_type ()) #define FS_RAWUDP_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RAWUDP_STREAM_TRANSMITTER, \ FsRawUdpStreamTransmitter)) #define FS_RAWUDP_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RAWUDP_STREAM_TRANSMITTER, \ FsRawUdpStreamTransmitterClass)) #define FS_IS_RAWUDP_STREAM_TRANSMITTER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RAWUDP_STREAM_TRANSMITTER)) #define FS_IS_RAWUDP_STREAM_TRANSMITTER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RAWUDP_STREAM_TRANSMITTER)) #define FS_RAWUDP_STREAM_TRANSMITTER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RAWUDP_STREAM_TRANSMITTER, \ FsRawUdpStreamTransmitterClass)) #define FS_RAWUDP_STREAM_TRANSMITTER_CAST(obj) \ ((FsRawUdpStreamTransmitter *) (obj)) typedef struct _FsRawUdpStreamTransmitter FsRawUdpStreamTransmitter; typedef struct _FsRawUdpStreamTransmitterClass FsRawUdpStreamTransmitterClass; typedef struct _FsRawUdpStreamTransmitterPrivate FsRawUdpStreamTransmitterPrivate; /** * FsRawUdpStreamTransmitterClass: * @parent_class: Our parent * * The Raw UDP stream transmitter class */ struct _FsRawUdpStreamTransmitterClass { FsStreamTransmitterClass parent_class; /*virtual functions */ /*< private >*/ }; /** * FsRawUdpStreamTransmitter: * @parent: Parent object * * All members are private, access them using methods and properties */ struct _FsRawUdpStreamTransmitter { FsStreamTransmitter parent; /*< private >*/ FsRawUdpStreamTransmitterPrivate *priv; }; GType fs_rawudp_stream_transmitter_register_type (FsPlugin *module); GType fs_rawudp_stream_transmitter_get_type (void); FsRawUdpStreamTransmitter * fs_rawudp_stream_transmitter_newv (FsRawUdpTransmitter *transmitter, guint n_parameters, GParameter *parameters, GError **error); G_END_DECLS #endif /* __FS_RAWUDP_STREAM_TRANSMITTER_H__ */ farstream-0.2.7/transmitters/rawudp/fs-rawudp-stream-transmitter.c0000664000076400007640000006455112461773672022451 00000000000000/* * Farstream - Farstream RAW UDP with STUN Stream Transmitter * * Copyright 2007-2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2007-2008x Nokia Corp. * * fs-rawudp-transmitter.c - A Farstream UDPs stream transmitter with STUN * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-rawudp-stream-transmitter * @short_description: A stream transmitter object for UDP with STUN * @see_also: #FsMulticastStreamTransmitter * * This transmitter sends and receives unicast UDP packets. * * It will detect its own address using a STUN request if the * #FsRawUdpStreamTransmitter:stun-ip and #FsRawUdpStreamTransmitter:stun-port * properties are set. If the STUN request does not get a reply * or no STUN is requested. It will return the IP address of all the local * network interfaces, listing link-local addresses after other addresses * and the loopback interface last. * * You can configure the address and port it will listen on by setting the * "preferred-local-candidates" property. This property will contain a #GList * of #FsCandidate. These #FsCandidate must be for #FS_NETWORK_PROTOCOL_UDP. * These port and/or the ip can be set on these candidates to force them, * and this is per-component. If not all components have a port set, the * following components will be on the following ports. There is no guarantee * that the requested port will be available so a different port may the * native candidate. But it is guaranteed that components that do not have * specified ports will be sequential. * * Example: Candidate {proto=UDP, component_id=RTP, ip=NULL, port=9098} will * produce native candidates * ({component_id=RTP, ip=IP, port=9078},{component_id=RTCP, ip=IP, port=9079}) * or * if this one is not available * ({component_id=RTP, ip=IP, port=9080},{component_id=RTCP, ip=IP, port=9081}). * The default port starts at 7078 for the first component. * * The name of this transmitter is "rawudp". */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rawudp-stream-transmitter.h" #include "fs-rawudp-component.h" #include #include #ifdef HAVE_GUPNP #include #endif #include #include #define GST_CAT_DEFAULT fs_rawudp_transmitter_debug #define DEFAULT_UPNP_MAPPING_TIMEOUT (600) #define DEFAULT_UPNP_DISCOVERY_TIMEOUT (2) /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_SENDING, PROP_PREFERRED_LOCAL_CANDIDATES, PROP_ASSOCIATE_ON_SOURCE, PROP_STUN_IP, PROP_STUN_PORT, PROP_STUN_TIMEOUT, PROP_UPNP_MAPPING, PROP_UPNP_DISCOVERY, PROP_UPNP_MAPPING_TIMEOUT, PROP_UPNP_DISCOVERY_TIMEOUT }; struct _FsRawUdpStreamTransmitterPrivate { gboolean disposed; /* We don't actually hold a ref to this, * But since our parent FsStream can not exist without its parent * FsSession, we should be safe */ FsRawUdpTransmitter *transmitter; gboolean sending; /* This is an array of size n_components+1 */ FsRawUdpComponent **component; gchar *stun_ip; guint stun_port; guint stun_timeout; GList *preferred_local_candidates; guint next_candidate_id; gboolean associate_on_source; #ifdef HAVE_GUPNP gboolean upnp_discovery; gboolean upnp_mapping; guint upnp_mapping_timeout; guint upnp_discovery_timeout; GUPnPSimpleIgdThread *upnp_igd; #endif /* Everything below this line is protected by the mutex */ GMutex mutex; gboolean *candidates_prepared; }; #define FS_RAWUDP_STREAM_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RAWUDP_STREAM_TRANSMITTER, \ FsRawUdpStreamTransmitterPrivate)) #define FS_RAWUDP_STREAM_TRANSMITTER_LOCK(o) g_mutex_lock (&(o)->priv->mutex) #define FS_RAWUDP_STREAM_TRANSMITTER_UNLOCK(o) g_mutex_unlock (&(o)->priv->mutex) static void fs_rawudp_stream_transmitter_class_init ( FsRawUdpStreamTransmitterClass *klass); static void fs_rawudp_stream_transmitter_init (FsRawUdpStreamTransmitter *self); static void fs_rawudp_stream_transmitter_dispose (GObject *object); static void fs_rawudp_stream_transmitter_finalize (GObject *object); static void fs_rawudp_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_rawudp_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void fs_rawudp_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter); static gboolean fs_rawudp_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error); static gboolean fs_rawudp_stream_transmitter_gather_local_candidates ( FsStreamTransmitter *streamtransmitter, GError **error); static FsCandidate* fs_rawudp_stream_transmitter_build_forced_candidate ( FsRawUdpStreamTransmitter *self, const char *ip, gint port, guint component_id); static void _component_new_local_candidate (FsRawUdpComponent *component, FsCandidate *candidate, gpointer user_data); static void _component_local_candidates_prepared (FsRawUdpComponent *component, gpointer user_data); static void _component_new_active_candidate_pair (FsRawUdpComponent *component, FsCandidate *local, FsCandidate *remote, gpointer user_data); static void _component_error (FsRawUdpComponent *component, FsError error_no, gchar *error_msg, gpointer user_data); static void _component_known_source_packet_received (FsRawUdpComponent *component, guint component_id, GstBuffer *buffer, gpointer user_data); static GObjectClass *parent_class = NULL; // static guint signals[LAST_SIGNAL] = { 0 }; static GType type = 0; GType fs_rawudp_stream_transmitter_get_type (void) { return type; } GType fs_rawudp_stream_transmitter_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsRawUdpStreamTransmitterClass), NULL, NULL, (GClassInitFunc) fs_rawudp_stream_transmitter_class_init, NULL, NULL, sizeof (FsRawUdpStreamTransmitter), 0, (GInstanceInitFunc) fs_rawudp_stream_transmitter_init }; fs_rawudp_component_register_type (module); type = g_type_module_register_type (G_TYPE_MODULE (module), FS_TYPE_STREAM_TRANSMITTER, "FsRawUdpStreamTransmitter", &info, 0); return type; } static void fs_rawudp_stream_transmitter_class_init (FsRawUdpStreamTransmitterClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; FsStreamTransmitterClass *streamtransmitterclass = FS_STREAM_TRANSMITTER_CLASS (klass); parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_rawudp_stream_transmitter_set_property; gobject_class->get_property = fs_rawudp_stream_transmitter_get_property; streamtransmitterclass->force_remote_candidates = fs_rawudp_stream_transmitter_force_remote_candidates; streamtransmitterclass->gather_local_candidates = fs_rawudp_stream_transmitter_gather_local_candidates; streamtransmitterclass->stop = fs_rawudp_stream_transmitter_stop; g_object_class_override_property (gobject_class, PROP_SENDING, "sending"); g_object_class_override_property (gobject_class, PROP_PREFERRED_LOCAL_CANDIDATES, "preferred-local-candidates"); g_object_class_override_property (gobject_class, PROP_ASSOCIATE_ON_SOURCE, "associate-on-source"); g_object_class_install_property (gobject_class, PROP_STUN_IP, g_param_spec_string ("stun-ip", "The IP address of the STUN server", "The IPv4 address of the STUN server as a x.x.x.x string", NULL, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STUN_PORT, g_param_spec_uint ("stun-port", "The port of the STUN server", "The IPv4 UDP port of the STUN server as a ", 0, 65535, 3478, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STUN_TIMEOUT, g_param_spec_uint ("stun-timeout", "The timeout for the STUN reply", "How long to wait for for the STUN reply (in seconds) before giving up", 1, MAX_STUN_TIMEOUT, DEFAULT_STUN_TIMEOUT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_UPNP_MAPPING, g_param_spec_boolean ("upnp-mapping", #ifdef HAVE_GUPNP "Try to map ports using UPnP", "Tries to map ports using UPnP if enabled", TRUE, #else "Try to map ports using UPnP (NOT COMPILED IN)", "Tries to map ports using UPnP if enabled", FALSE, #endif G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_UPNP_DISCOVERY, g_param_spec_boolean ("upnp-discovery", #ifdef HAVE_GUPNP "Try to use UPnP to find the external IP address", "Tries to discovery the external IP with UPnP if stun fails", TRUE, #else "Try to use UPnP to find the external IP address (NOT COMPILED IN)", "Tries to discovery the external IP with UPnP if stun fails", FALSE, #endif G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_UPNP_MAPPING_TIMEOUT, g_param_spec_uint ("upnp-mapping-timeout", "Timeout after which UPnP mappings expire", "The UPnP port mappings expire after this period if the app has" " crashed (in seconds)", 0, G_MAXUINT32, DEFAULT_UPNP_MAPPING_TIMEOUT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_UPNP_DISCOVERY_TIMEOUT, g_param_spec_uint ("upnp-discovery-timeout", "Timeout after which UPnP discovery fails", "After this period, UPnP discovery is considered to have failed" " and the local IP is returned", 0, G_MAXUINT32, DEFAULT_UPNP_DISCOVERY_TIMEOUT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gobject_class->dispose = fs_rawudp_stream_transmitter_dispose; gobject_class->finalize = fs_rawudp_stream_transmitter_finalize; g_type_class_add_private (klass, sizeof (FsRawUdpStreamTransmitterPrivate)); } static void fs_rawudp_stream_transmitter_init (FsRawUdpStreamTransmitter *self) { /* member init */ self->priv = FS_RAWUDP_STREAM_TRANSMITTER_GET_PRIVATE (self); self->priv->disposed = FALSE; self->priv->sending = TRUE; self->priv->associate_on_source = TRUE; #ifdef HAVE_GUPNP self->priv->upnp_mapping = TRUE; self->priv->upnp_discovery_timeout = DEFAULT_UPNP_DISCOVERY_TIMEOUT; self->priv->upnp_mapping_timeout = DEFAULT_UPNP_MAPPING_TIMEOUT; self->priv->upnp_discovery = TRUE; #endif g_mutex_init (&self->priv->mutex); } static void fs_rawudp_stream_transmitter_dispose (GObject *object) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (object); gint c; if (self->priv->disposed) /* If dispose did already run, return. */ return; if (self->priv->component) { for (c = 1; c <= self->priv->transmitter->components; c++) { if (self->priv->component[c]) { g_object_unref (self->priv->component[c]); self->priv->component[c] = NULL; } } } #ifdef HAVE_GUPNP if (self->priv->upnp_igd) { g_object_unref (self->priv->upnp_igd); self->priv->upnp_igd = NULL; } #endif /* Make sure dispose does not run twice. */ self->priv->disposed = TRUE; parent_class->dispose (object); } static void fs_rawudp_stream_transmitter_finalize (GObject *object) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (object); g_free (self->priv->stun_ip); if (self->priv->preferred_local_candidates) fs_candidate_list_destroy (self->priv->preferred_local_candidates); if (self->priv->component) { g_free (self->priv->component); self->priv->component = NULL; } g_mutex_clear (&self->priv->mutex); g_free (self->priv->candidates_prepared); parent_class->finalize (object); } static void fs_rawudp_stream_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (object); switch (prop_id) { case PROP_SENDING: g_value_set_boolean (value, self->priv->sending); break; case PROP_PREFERRED_LOCAL_CANDIDATES: g_value_set_boxed (value, self->priv->preferred_local_candidates); break; case PROP_ASSOCIATE_ON_SOURCE: g_value_set_boolean (value, self->priv->associate_on_source); break; case PROP_STUN_IP: g_value_set_string (value, self->priv->stun_ip); break; case PROP_STUN_PORT: g_value_set_uint (value, self->priv->stun_port); break; case PROP_STUN_TIMEOUT: g_value_set_uint (value, self->priv->stun_timeout); break; #ifdef HAVE_GUPNP case PROP_UPNP_MAPPING: g_value_set_boolean (value, self->priv->upnp_mapping); break; case PROP_UPNP_DISCOVERY: g_value_set_boolean (value, self->priv->upnp_discovery); break; case PROP_UPNP_MAPPING_TIMEOUT: g_value_set_uint (value, self->priv->upnp_mapping_timeout); break; case PROP_UPNP_DISCOVERY_TIMEOUT: g_value_set_uint (value, self->priv->upnp_discovery_timeout); break; #else case PROP_UPNP_MAPPING: case PROP_UPNP_DISCOVERY: g_value_set_boolean (value, FALSE); break; case PROP_UPNP_MAPPING_TIMEOUT: case PROP_UPNP_DISCOVERY_TIMEOUT: break; #endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_rawudp_stream_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (object); switch (prop_id) { case PROP_SENDING: { self->priv->sending = g_value_get_boolean (value); if (self->priv->component[1]) g_object_set_property (G_OBJECT (self->priv->component[1]), "sending", value); } break; case PROP_PREFERRED_LOCAL_CANDIDATES: self->priv->preferred_local_candidates = g_value_dup_boxed (value); break; case PROP_ASSOCIATE_ON_SOURCE: self->priv->associate_on_source = g_value_get_boolean (value); break; case PROP_STUN_IP: g_free (self->priv->stun_ip); self->priv->stun_ip = g_value_dup_string (value); break; case PROP_STUN_PORT: self->priv->stun_port = g_value_get_uint (value); break; case PROP_STUN_TIMEOUT: self->priv->stun_timeout = g_value_get_uint (value); break; #ifdef HAVE_GUPNP case PROP_UPNP_MAPPING: self->priv->upnp_mapping = g_value_get_boolean (value); break; case PROP_UPNP_DISCOVERY: self->priv->upnp_discovery = g_value_get_boolean (value); break; case PROP_UPNP_MAPPING_TIMEOUT: self->priv->upnp_mapping_timeout = g_value_get_uint (value); break; case PROP_UPNP_DISCOVERY_TIMEOUT: self->priv->upnp_discovery_timeout = g_value_get_uint (value); break; #else case PROP_UPNP_MAPPING: case PROP_UPNP_DISCOVERY: case PROP_UPNP_MAPPING_TIMEOUT: case PROP_UPNP_DISCOVERY_TIMEOUT: break; #endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static gboolean fs_rawudp_stream_transmitter_build (FsRawUdpStreamTransmitter *self, GError **error) { const gchar **ips = g_new0 (const gchar *, self->priv->transmitter->components + 1); guint16 *ports = g_new0 (guint16, self->priv->transmitter->components + 1); GList *item; gint c; guint16 next_port; #ifdef HAVE_GUPNP if (self->priv->upnp_mapping || (self->priv->upnp_discovery && !self->priv->stun_ip)) self->priv->upnp_igd = gupnp_simple_igd_thread_new (); #endif self->priv->component = g_new0 (FsRawUdpComponent *, self->priv->transmitter->components + 1); self->priv->candidates_prepared = g_new0 (gboolean, self->priv->transmitter->components + 1); for (item = g_list_first (self->priv->preferred_local_candidates); item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (candidate->proto != FS_NETWORK_PROTOCOL_UDP) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You set preferred candidate of a type %d that is not" " FS_NETWORK_PROTOCOL_UDP", candidate->proto); goto error; } if (candidate->component_id == 0) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Component id 0 is invalid"); goto error; } if (candidate->component_id > self->priv->transmitter->components) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You specified an invalid component id %d with is higher" " than the maximum %d", candidate->component_id, self->priv->transmitter->components); goto error; } if (ips[candidate->component_id] || ports[candidate->component_id]) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You set more than one preferred local candidate for component %u", candidate->component_id); goto error; } /* * We should verify that the IP is valid now!! * */ ips[candidate->component_id] = candidate->ip; if (candidate->port) ports[candidate->component_id] = candidate->port; } /* Lets make sure we start from a reasonnable value */ if (ports[1] == 0) ports[1] = 7078; next_port = ports[1]; for (c = 1; c <= self->priv->transmitter->components; c++) { gint requested_port = ports[c]; guint used_port; if (!requested_port) requested_port = next_port; self->priv->component[c] = fs_rawudp_component_new (c, self->priv->transmitter, self->priv->associate_on_source, ips[c], requested_port, self->priv->stun_ip, self->priv->stun_port, self->priv->stun_timeout, #ifdef HAVE_GUPNP self->priv->upnp_mapping, self->priv->upnp_discovery, self->priv->upnp_mapping_timeout, self->priv->upnp_discovery_timeout, self->priv->upnp_igd, #else FALSE, FALSE, 0, 0, NULL, #endif &used_port, error); if (self->priv->component[c] == NULL) goto error; g_signal_connect (self->priv->component[c], "new-local-candidate", G_CALLBACK (_component_new_local_candidate), self); g_signal_connect (self->priv->component[c], "local-candidates-prepared", G_CALLBACK (_component_local_candidates_prepared), self); g_signal_connect (self->priv->component[c], "new-active-candidate-pair", G_CALLBACK (_component_new_active_candidate_pair), self); g_signal_connect (self->priv->component[c], "error", G_CALLBACK (_component_error), self); g_signal_connect (self->priv->component[c], "known-source-packet-received", G_CALLBACK (_component_known_source_packet_received), self); /* If we dont get the requested port and it wasnt a forced port, * then we rewind up to the last forced port and jump to the next * package of components, all non-forced ports must be consecutive! */ if (used_port != requested_port && !ports[c]) { do { g_object_unref (self->priv->component[c]); self->priv->component[c] = NULL; c--; } while (!ports[c]); /* Will always stop because ports[1] != 0 */ ports[c] += self->priv->transmitter->components; next_port = ports[c]; continue; } if (ips[c]) { FsCandidate *forced = fs_rawudp_stream_transmitter_build_forced_candidate (self, ips[c], used_port, c); g_object_set (self->priv->component[c], "forced-candidate", forced, NULL); fs_candidate_destroy (forced); } next_port = used_port+1; } g_free ((gpointer *)ips); g_free (ports); return TRUE; error: g_free ((gpointer *)ips); g_free (ports); return FALSE; } static void fs_rawudp_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (streamtransmitter); gint c; if (self->priv->component) { for (c = 1; c <= self->priv->transmitter->components; c++) { if (self->priv->component[c]) fs_rawudp_component_stop (self->priv->component[c]); } } } static gboolean fs_rawudp_stream_transmitter_force_remote_candidates ( FsStreamTransmitter *streamtransmitter, GList *candidates, GError **error) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (streamtransmitter); GList *item = NULL; for (item = candidates; item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (candidate->proto != FS_NETWORK_PROTOCOL_UDP) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "You set a candidate of a type %d that is not FS_NETWORK_PROTOCOL_UDP", candidate->proto); return FALSE; } if (!candidate->ip) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The candidate passed does not contain a valid ip"); return FALSE; } if (candidate->component_id == 0 || candidate->component_id > self->priv->transmitter->components) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "The candidate passed has an invalid component id %u (not in [1,%u])", candidate->component_id, self->priv->transmitter->components); return FALSE; } /* * IMPROVE ME: We should probably check that the candidate's IP * has the format x.x.x.x where x is [0,255] using GRegex, etc */ } for (item = candidates; item; item = g_list_next (item)) { FsCandidate *candidate = item->data; if (!fs_rawudp_component_set_remote_candidate ( self->priv->component[candidate->component_id], candidate, error)) return FALSE; } return TRUE; } FsRawUdpStreamTransmitter * fs_rawudp_stream_transmitter_newv (FsRawUdpTransmitter *transmitter, guint n_parameters, GParameter *parameters, GError **error) { FsRawUdpStreamTransmitter *streamtransmitter = NULL; streamtransmitter = g_object_newv (FS_TYPE_RAWUDP_STREAM_TRANSMITTER, n_parameters, parameters); if (!streamtransmitter) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the stream transmitter"); return NULL; } streamtransmitter->priv->transmitter = transmitter; if (!fs_rawudp_stream_transmitter_build (streamtransmitter, error)) { g_object_unref (streamtransmitter); return NULL; } return streamtransmitter; } struct CandidateTransit { FsRawUdpStreamTransmitter *self; FsCandidate *candidate; guint component_id; }; static FsCandidate * fs_rawudp_stream_transmitter_build_forced_candidate ( FsRawUdpStreamTransmitter *self, const char *ip, gint port, guint component_id) { FsCandidate *candidate; gchar *id; id = g_strdup_printf ("L%u", self->priv->next_candidate_id++); candidate = fs_candidate_new (id, component_id, FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, ip, port); g_free (id); return candidate; } static gboolean fs_rawudp_stream_transmitter_gather_local_candidates ( FsStreamTransmitter *streamtransmitter, GError **error) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (streamtransmitter); int c; for (c = 1; c <= self->priv->transmitter->components; c++) if (!fs_rawudp_component_gather_local_candidates (self->priv->component[c], error)) return FALSE; return TRUE; } static void _component_new_local_candidate (FsRawUdpComponent *component, FsCandidate *candidate, gpointer user_data) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (user_data); g_signal_emit_by_name (self, "new-local-candidate", candidate); } static void _component_local_candidates_prepared (FsRawUdpComponent *component, gpointer user_data) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (user_data); guint component_id; guint c; gboolean emit = TRUE; g_object_get (component, "component", &component_id, NULL); FS_RAWUDP_STREAM_TRANSMITTER_LOCK (self); self->priv->candidates_prepared[component_id] = TRUE; for (c = 1; c <= self->priv->transmitter->components; c++) { if (self->priv->candidates_prepared[c] == FALSE) { emit = FALSE; break; } } FS_RAWUDP_STREAM_TRANSMITTER_UNLOCK (self); if (emit) g_signal_emit_by_name (self, "local-candidates-prepared"); } static void _component_new_active_candidate_pair (FsRawUdpComponent *component, FsCandidate *local, FsCandidate *remote, gpointer user_data) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (user_data); g_signal_emit_by_name (self, "new-active-candidate-pair", local, remote); } static void _component_error (FsRawUdpComponent *component, FsError error_no, gchar *error_msg, gpointer user_data) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (user_data); fs_stream_transmitter_emit_error (FS_STREAM_TRANSMITTER (self), error_no, error_msg); } static void _component_known_source_packet_received (FsRawUdpComponent *component, guint component_id, GstBuffer *buffer, gpointer user_data) { FsRawUdpStreamTransmitter *self = FS_RAWUDP_STREAM_TRANSMITTER (user_data); g_signal_emit_by_name (self, "known-source-packet-received", component_id, buffer); } farstream-0.2.7/transmitters/rawudp/fs-rawudp-component.h0000664000076400007640000000723111710041463020561 00000000000000/* * Farstream - Farstream RAW UDP with STUN Component Transmitter * * Copyright 2008 Collabora Ltd. * @author: Olivier Crete * Copyright 2008 Nokia Corp. * * fs-rawudp-component.h - A Farstream UDP component transmitter with STUN * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FS_RAWUDP_COMPONENT_H__ #define __FS_RAWUDP_COMPONENT_H__ #include #include #include #include #include "fs-rawudp-transmitter.h" G_BEGIN_DECLS /* TYPE MACROS */ #define FS_TYPE_RAWUDP_COMPONENT \ (fs_rawudp_component_get_type ()) #define FS_RAWUDP_COMPONENT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), FS_TYPE_RAWUDP_COMPONENT, \ FsRawUdpComponent)) #define FS_RAWUDP_COMPONENT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), FS_TYPE_RAWUDP_COMPONENT, \ FsRawUdpComponentClass)) #define FS_IS_RAWUDP_COMPONENT(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), FS_TYPE_RAWUDP_COMPONENT)) #define FS_IS_RAWUDP_COMPONENT_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), FS_TYPE_RAWUDP_COMPONENT)) #define FS_RAWUDP_COMPONENT_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FS_TYPE_RAWUDP_COMPONENT, \ FsRawUdpComponentClass)) #define FS_RAWUDP_COMPONENT_CAST(obj) \ ((FsRawUdpComponent *) (obj)) typedef struct _FsRawUdpComponent FsRawUdpComponent; typedef struct _FsRawUdpComponentClass FsRawUdpComponentClass; typedef struct _FsRawUdpComponentPrivate FsRawUdpComponentPrivate; #define MAX_STUN_TIMEOUT (60) #define DEFAULT_STUN_TIMEOUT (30) /** * FsRawUdpComponentClass: * @parent_class: Our parent * * The Raw UDP component transmitter class */ struct _FsRawUdpComponentClass { GObjectClass parent_class; /*virtual functions */ /*< private >*/ }; /** * FsRawUdpComponent: * * All members are private, access them using methods and properties */ struct _FsRawUdpComponent { GObject parent; /*< private >*/ FsRawUdpComponentPrivate *priv; }; GType fs_rawudp_component_register_type (FsPlugin *module); GType fs_rawudp_component_get_type (void); FsRawUdpComponent * fs_rawudp_component_new ( guint component, FsRawUdpTransmitter *trans, gboolean associate_on_source, const gchar *ip, guint port, const gchar *stun_ip, guint stun_port, guint stun_timeout, gboolean upnp_mapping, gboolean upnp_discovery, guint upnp_mapping_timeout, guint upnp_discovery_timeout, gpointer upnp_igd, guint *used_port, GError **error); gboolean fs_rawudp_component_set_remote_candidate (FsRawUdpComponent *self, FsCandidate *candidate, GError **error); gboolean fs_rawudp_component_gather_local_candidates (FsRawUdpComponent *self, GError **error); void fs_rawudp_component_stop (FsRawUdpComponent *self); G_END_DECLS #endif /* __FS_RAWUDP_COMPONENT_H__ */ farstream-0.2.7/transmitters/rawudp/fs-rawudp-transmitter.c0000664000076400007640000010057712461773672021157 00000000000000/* * Farstream - Farstream RAW UDP with STUN Transmitter * * Copyright 2007 Collabora Ltd. * @author: Olivier Crete * Copyright 2007 Nokia Corp. * * fs-rawudp-transmitter.h - A Farstream UDP transmitter with STUN * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * SECTION:fs-rawudp-transmitter * @short_description: A transmitter for raw udp (with STUN) * * This transmitter provides RAW udp (with stun) * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "fs-rawudp-transmitter.h" #include "fs-rawudp-stream-transmitter.h" #include #include #include #include #include #ifdef HAVE_UNISTD_H # include #endif GST_DEBUG_CATEGORY (fs_rawudp_transmitter_debug); #define GST_CAT_DEFAULT fs_rawudp_transmitter_debug /* Signals */ enum { LAST_SIGNAL }; /* props */ enum { PROP_0, PROP_GST_SINK, PROP_GST_SRC, PROP_COMPONENTS, PROP_TYPE_OF_SERVICE, PROP_DO_TIMESTAMP }; struct _FsRawUdpTransmitterPrivate { /* We hold references to this element */ GstElement *gst_sink; GstElement *gst_src; /* We don't hold a reference to these elements, they are owned by the bins */ /* They are tables of pointers, one per component */ GstElement **udpsrc_funnels; GstElement **udpsink_tees; GMutex mutex; /* Protected by the mutex */ GList **udpports; gint type_of_service; gboolean do_timestamp; gboolean disposed; }; #define FS_RAWUDP_TRANSMITTER_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RAWUDP_TRANSMITTER, \ FsRawUdpTransmitterPrivate)) static void fs_rawudp_transmitter_class_init (FsRawUdpTransmitterClass *klass); static void fs_rawudp_transmitter_init (FsRawUdpTransmitter *self); static void fs_rawudp_transmitter_constructed (GObject *object); static void fs_rawudp_transmitter_dispose (GObject *object); static void fs_rawudp_transmitter_finalize (GObject *object); static void fs_rawudp_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void fs_rawudp_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static FsStreamTransmitter *fs_rawudp_transmitter_new_stream_transmitter ( FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error); static GType fs_rawudp_transmitter_get_stream_transmitter_type ( FsTransmitter *transmitter); static void fs_rawudp_transmitter_set_type_of_service ( FsRawUdpTransmitter *self, gint tos); static GObjectClass *parent_class = NULL; //static guint signals[LAST_SIGNAL] = { 0 }; /* * Lets register the plugin */ static GType type = 0; GType fs_rawudp_transmitter_get_type (void) { g_assert (type); return type; } static GType fs_rawudp_transmitter_register_type (FsPlugin *module) { static const GTypeInfo info = { sizeof (FsRawUdpTransmitterClass), NULL, NULL, (GClassInitFunc) fs_rawudp_transmitter_class_init, NULL, NULL, sizeof (FsRawUdpTransmitter), 0, (GInstanceInitFunc) fs_rawudp_transmitter_init }; GST_DEBUG_CATEGORY_INIT (fs_rawudp_transmitter_debug, "fsrawudptransmitter", 0, "Farstream raw UDP transmitter"); fs_rawudp_stream_transmitter_register_type (module); type = g_type_module_register_type (G_TYPE_MODULE (module), FS_TYPE_TRANSMITTER, "FsRawUdpTransmitter", &info, 0); return type; } FS_INIT_PLUGIN (fs_rawudp_transmitter_register_type) static void fs_rawudp_transmitter_class_init (FsRawUdpTransmitterClass *klass) { GObjectClass *gobject_class = (GObjectClass *) klass; FsTransmitterClass *transmitter_class = FS_TRANSMITTER_CLASS (klass); parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = fs_rawudp_transmitter_set_property; gobject_class->get_property = fs_rawudp_transmitter_get_property; gobject_class->constructed = fs_rawudp_transmitter_constructed; g_object_class_override_property (gobject_class, PROP_GST_SRC, "gst-src"); g_object_class_override_property (gobject_class, PROP_GST_SINK, "gst-sink"); g_object_class_override_property (gobject_class, PROP_COMPONENTS, "components"); g_object_class_override_property (gobject_class, PROP_TYPE_OF_SERVICE, "tos"); g_object_class_override_property (gobject_class, PROP_DO_TIMESTAMP, "do-timestamp"); transmitter_class->new_stream_transmitter = fs_rawudp_transmitter_new_stream_transmitter; transmitter_class->get_stream_transmitter_type = fs_rawudp_transmitter_get_stream_transmitter_type; gobject_class->dispose = fs_rawudp_transmitter_dispose; gobject_class->finalize = fs_rawudp_transmitter_finalize; g_type_class_add_private (klass, sizeof (FsRawUdpTransmitterPrivate)); } static void fs_rawudp_transmitter_init (FsRawUdpTransmitter *self) { /* member init */ self->priv = FS_RAWUDP_TRANSMITTER_GET_PRIVATE (self); self->priv->disposed = FALSE; self->components = 2; g_mutex_init (&self->priv->mutex); self->priv->do_timestamp = TRUE; } static void fs_rawudp_transmitter_constructed (GObject *object) { FsRawUdpTransmitter *self = FS_RAWUDP_TRANSMITTER_CAST (object); FsTransmitter *trans = FS_TRANSMITTER_CAST (self); GstPad *pad = NULL, *pad2 = NULL; GstPad *ghostpad = NULL; gchar *padname; GstPadLinkReturn ret; int c; /* component_id */ /* We waste one space in order to have the index be the component_id */ self->priv->udpsrc_funnels = g_new0 (GstElement *, self->components+1); self->priv->udpsink_tees = g_new0 (GstElement *, self->components+1); self->priv->udpports = g_new0 (GList *, self->components+1); /* First we need the src elemnet */ self->priv->gst_src = gst_bin_new (NULL); if (!self->priv->gst_src) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the transmitter src bin"); return; } gst_object_ref (self->priv->gst_src); /* Second, we do the sink element */ self->priv->gst_sink = gst_bin_new (NULL); if (!self->priv->gst_sink) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not build the transmitter sink bin"); return; } g_object_set (G_OBJECT (self->priv->gst_sink), "async-handling", TRUE, NULL); gst_object_ref (self->priv->gst_sink); for (c = 1; c <= self->components; c++) { GstElement *fakesink = NULL; /* Lets create the RTP source funnel */ self->priv->udpsrc_funnels[c] = gst_element_factory_make ("funnel", NULL); if (!self->priv->udpsrc_funnels[c]) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the funnel element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_src), self->priv->udpsrc_funnels[c])) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the funnel element to the transmitter src bin"); } pad = gst_element_get_static_pad (self->priv->udpsrc_funnels[c], "src"); padname = g_strdup_printf ("src_%u", c); ghostpad = gst_ghost_pad_new (padname, pad); g_free (padname); gst_object_unref (pad); gst_pad_set_active (ghostpad, TRUE); gst_element_add_pad (self->priv->gst_src, ghostpad); /* Lets create the RTP sink tee */ self->priv->udpsink_tees[c] = gst_element_factory_make ("tee", NULL); if (!self->priv->udpsink_tees[c]) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the tee element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_sink), self->priv->udpsink_tees[c])) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the tee element to the transmitter sink bin"); } pad = gst_element_get_static_pad (self->priv->udpsink_tees[c], "sink"); padname = g_strdup_printf ("sink_%u", c); ghostpad = gst_ghost_pad_new (padname, pad); g_free (padname); gst_object_unref (pad); gst_pad_set_active (ghostpad, TRUE); gst_element_add_pad (self->priv->gst_sink, ghostpad); fakesink = gst_element_factory_make ("fakesink", NULL); if (!fakesink) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not make the fakesink element"); return; } if (!gst_bin_add (GST_BIN (self->priv->gst_sink), fakesink)) { gst_object_unref (fakesink); trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the fakesink element to the transmitter sink bin"); return; } g_object_set (fakesink, "async", FALSE, "sync", FALSE, NULL); pad = gst_element_get_request_pad (self->priv->udpsink_tees[c], "src_%u"); pad2 = gst_element_get_static_pad (fakesink, "sink"); ret = gst_pad_link (pad, pad2); gst_object_unref (pad2); gst_object_unref (pad); if (GST_PAD_LINK_FAILED(ret)) { trans->construction_error = g_error_new (FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the tee to the fakesink"); return; } } GST_CALL_PARENT (G_OBJECT_CLASS, constructed, (object)); } static void fs_rawudp_transmitter_dispose (GObject *object) { FsRawUdpTransmitter *self = FS_RAWUDP_TRANSMITTER (object); if (self->priv->disposed) /* If dispose did already run, return. */ return; if (self->priv->gst_src) { gst_object_unref (self->priv->gst_src); self->priv->gst_src = NULL; } if (self->priv->gst_sink) { gst_object_unref (self->priv->gst_sink); self->priv->gst_sink = NULL; } /* Make sure dispose does not run twice. */ self->priv->disposed = TRUE; parent_class->dispose (object); } static void fs_rawudp_transmitter_finalize (GObject *object) { FsRawUdpTransmitter *self = FS_RAWUDP_TRANSMITTER (object); if (self->priv->udpsrc_funnels) { g_free (self->priv->udpsrc_funnels); self->priv->udpsrc_funnels = NULL; } if (self->priv->udpsink_tees) { g_free (self->priv->udpsink_tees); self->priv->udpsink_tees = NULL; } if (self->priv->udpports) { g_free (self->priv->udpports); self->priv->udpports = NULL; } g_mutex_clear (&self->priv->mutex); parent_class->finalize (object); } static void fs_rawudp_transmitter_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FsRawUdpTransmitter *self = FS_RAWUDP_TRANSMITTER (object); switch (prop_id) { case PROP_GST_SINK: g_value_set_object (value, self->priv->gst_sink); break; case PROP_GST_SRC: g_value_set_object (value, self->priv->gst_src); break; case PROP_COMPONENTS: g_value_set_uint (value, self->components); break; case PROP_TYPE_OF_SERVICE: g_mutex_lock (&self->priv->mutex); g_value_set_uint (value, self->priv->type_of_service); g_mutex_unlock (&self->priv->mutex); break; case PROP_DO_TIMESTAMP: g_value_set_boolean (value, self->priv->do_timestamp); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void fs_rawudp_transmitter_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { FsRawUdpTransmitter *self = FS_RAWUDP_TRANSMITTER (object); switch (prop_id) { case PROP_COMPONENTS: self->components = g_value_get_uint (value); break; case PROP_TYPE_OF_SERVICE: fs_rawudp_transmitter_set_type_of_service (self, g_value_get_uint (value)); break; case PROP_DO_TIMESTAMP: self->priv->do_timestamp = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } /** * fs_rawudp_transmitter_new_stream_rawudp_transmitter: * @transmitter: a #FsTranmitter * @participant: the #FsParticipant for which the #FsStream using this * new #FsStreamTransmitter is created * * This function will create a new #FsStreamTransmitter element for a * specific participant for this #FsRawUdpTransmitter * * Returns: a new #FsStreamTransmitter */ static FsStreamTransmitter * fs_rawudp_transmitter_new_stream_transmitter (FsTransmitter *transmitter, FsParticipant *participant, guint n_parameters, GParameter *parameters, GError **error) { FsRawUdpTransmitter *self = FS_RAWUDP_TRANSMITTER (transmitter); return FS_STREAM_TRANSMITTER (fs_rawudp_stream_transmitter_newv ( self, n_parameters, parameters, error)); } /* * The UdpPort structure is a ref-counted pseudo-object use to represent * one ip:port combo on which we listen and send, so it includes a udpsrc * and a multiudpsink */ struct _UdpPort { /* Protected by the transmitter mutex */ gint refcount; GstElement *udpsrc; GstPad *udpsrc_requested_pad; GstElement *udpsink; GstPad *udpsink_requested_pad; gchar *requested_ip; guint requested_port; guint port; GSocket *socket; /* These are just convenience pointers to our parent transmitter */ GstElement *funnel; GstElement *tee; guint component_id; /* Everything below is protected by the mutex */ GMutex mutex; GArray *known_addresses; }; struct KnownAddress { FsRawUdpAddressUniqueCallbackFunc callback; gpointer user_data; GSocketAddress *addr; }; static GSocket * _bind_port ( const gchar *ip, guint port, guint *used_port, int tos, GError **error) { GSocketAddress *socket_addr; GInetAddress *addr; GSocket *socket; int fd; if (ip) { addr = g_inet_address_new_from_string (ip); if (!addr) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid IP address %s passed", ip); return NULL; } } else { addr = g_inet_address_new_any (G_SOCKET_FAMILY_IPV4); } socket = g_socket_new (g_inet_address_get_family (addr), G_SOCKET_TYPE_DATAGRAM, G_SOCKET_PROTOCOL_UDP, error); if (!socket) return FALSE; for (;;) { socket_addr = g_inet_socket_address_new (addr, port); if (g_socket_bind (socket, socket_addr, FALSE, NULL)) break; g_object_unref (socket_addr); GST_INFO ("could not bind port %d", port); port += 2; if (port > 65535) { g_set_error (error, FS_ERROR, FS_ERROR_NETWORK, "Could not bind the socket to a port"); g_socket_close (socket, NULL); g_object_unref (socket); return NULL; } } g_object_unref (socket_addr); g_object_unref (addr); *used_port = port; fd = g_socket_get_fd (socket); if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) GST_WARNING ("could not set socket ToS: %s", g_strerror (errno)); #ifdef IPV6_TCLASS if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); #endif return socket; } static GstElement * _create_sinksource ( gchar *elementname, GstBin *bin, GstElement *teefunnel, GstElement *filter, GSocket *socket, GstPadDirection direction, gboolean do_timestamp, GstPad **requested_pad, GError **error) { GstElement *elem; GstPadLinkReturn ret = GST_PAD_LINK_OK; GstPad *elempad = NULL; GstStateChangeReturn state_ret; g_assert (direction == GST_PAD_SINK || direction == GST_PAD_SRC); elem = gst_element_factory_make (elementname, NULL); if (!elem) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not create the %s element", elementname); return NULL; } g_object_set (elem, "auto-multicast", FALSE, "close-socket", FALSE, "socket", socket, NULL); if (direction == GST_PAD_SINK) g_object_set (elem, "async", FALSE, "sync", FALSE, NULL); else g_object_set (elem, "do-timestamp", do_timestamp, NULL); if (!gst_bin_add (bin, elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the %s element to the gst %s bin", elementname, (direction == GST_PAD_SINK) ? "sink" : "src"); gst_object_unref (elem); return NULL; } if (direction == GST_PAD_SINK) *requested_pad = gst_element_get_request_pad (teefunnel, "src_%u"); else *requested_pad = gst_element_get_request_pad (teefunnel, "sink_%u"); if (!*requested_pad) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not get the %s request pad from the %s", (direction == GST_PAD_SINK) ? "src" : "sink", (direction == GST_PAD_SINK) ? "tee" : "funnel"); goto error; } if (direction == GST_PAD_SINK) elempad = gst_element_get_static_pad (elem, "sink"); else elempad = gst_element_get_static_pad (elem, "src"); if (filter) { GstPad *filterpad = NULL; if (!gst_bin_add (bin, filter)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not add the filter element to the gst %s bin", (direction == GST_PAD_SINK) ? "sink" : "src"); goto error; } if (direction == GST_PAD_SINK) filterpad = gst_element_get_static_pad (filter, "src"); else filterpad = gst_element_get_static_pad (filter, "sink"); if (direction == GST_PAD_SINK) ret = gst_pad_link (filterpad, elempad); else ret = gst_pad_link (elempad, filterpad); gst_object_unref (elempad); gst_object_unref (filterpad); elempad = NULL; if (GST_PAD_LINK_FAILED(ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the new element %s (%d)", elementname, ret); goto error; } if (direction == GST_PAD_SINK) elempad = gst_element_get_static_pad (filter, "sink"); else elempad = gst_element_get_static_pad (filter, "src"); if (!gst_element_sync_state_with_parent (filter)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the new filte rwith its parent"); goto error; } } if (direction != GST_PAD_SINK) ret = gst_pad_link (elempad, *requested_pad); if (GST_PAD_LINK_FAILED(ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the new element %s (%d)", elementname, ret); goto error; } if (!gst_element_sync_state_with_parent (elem)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not sync the state of the new %s with its parent", elementname); goto error; } if (direction == GST_PAD_SINK) ret = gst_pad_link (*requested_pad, elempad); if (GST_PAD_LINK_FAILED(ret)) { g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, "Could not link the new element %s (%d)", elementname, ret); goto error; } gst_object_unref (elempad); return elem; error: gst_element_set_locked_state (elem, TRUE); state_ret = gst_element_set_state (elem, GST_STATE_NULL); if (state_ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("On error, could not reset %s to state NULL (%s)", elementname, gst_element_state_change_return_get_name (state_ret)); if (!gst_bin_remove (bin, elem)) GST_ERROR ("Could not remove element %s from bin on error", elementname); if (elempad) gst_object_unref (elempad); return NULL; } static UdpPort * fs_rawudp_transmitter_get_udpport_locked (FsRawUdpTransmitter *trans, guint component_id, const gchar *requested_ip, guint requested_port) { UdpPort *udpport; GList *udpport_e; for (udpport_e = g_list_first (trans->priv->udpports[component_id]); udpport_e; udpport_e = g_list_next (udpport_e)) { udpport = udpport_e->data; if (requested_port == udpport->requested_port && ((requested_ip == NULL && udpport->requested_ip == NULL) || (requested_ip && udpport->requested_ip && !strcmp (requested_ip, udpport->requested_ip)))) { GST_LOG ("Got port refcount %d->%d", udpport->refcount, udpport->refcount+1); udpport->refcount++; return udpport; } } return NULL; } UdpPort * fs_rawudp_transmitter_get_udpport (FsRawUdpTransmitter *trans, guint component_id, const gchar *requested_ip, guint requested_port, GError **error) { UdpPort *udpport; UdpPort *tmpudpport; int tos; /* First lets check if we already have one */ if (component_id > trans->components) { g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, "Invalid component %d > %d", component_id, trans->components); return NULL; } g_mutex_lock (&trans->priv->mutex); udpport = fs_rawudp_transmitter_get_udpport_locked (trans, component_id, requested_ip, requested_port); tos = trans->priv->type_of_service; g_mutex_unlock (&trans->priv->mutex); if (udpport) return udpport; GST_DEBUG ("Make new UdpPort for component %u requesting %s:%u", component_id, requested_ip ? requested_ip : "ANY", requested_port); udpport = g_slice_new0 (UdpPort); udpport->refcount = 1; udpport->requested_ip = g_strdup (requested_ip); udpport->requested_port = requested_port; udpport->component_id = component_id; g_mutex_init (&udpport->mutex); udpport->known_addresses = g_array_new (TRUE, FALSE, sizeof (struct KnownAddress)); /* Now lets bind both ports */ udpport->socket = _bind_port (requested_ip, requested_port, &udpport->port, tos, error); if (!udpport->socket) goto error; /* Now lets create the elements */ udpport->tee = trans->priv->udpsink_tees[component_id]; udpport->funnel = trans->priv->udpsrc_funnels[component_id]; udpport->udpsrc = _create_sinksource ("udpsrc", GST_BIN (trans->priv->gst_src), udpport->funnel, NULL, udpport->socket, GST_PAD_SRC, trans->priv->do_timestamp, &udpport->udpsrc_requested_pad, error); if (!udpport->udpsrc) goto error; udpport->udpsink = _create_sinksource ("multiudpsink", GST_BIN (trans->priv->gst_sink), udpport->tee, NULL, udpport->socket, GST_PAD_SINK, FALSE, &udpport->udpsink_requested_pad, error); if (!udpport->udpsink) goto error; g_mutex_lock (&trans->priv->mutex); /* Check if someone else added the same port at the same time */ tmpudpport = fs_rawudp_transmitter_get_udpport_locked (trans, component_id, requested_ip, requested_port); if (tmpudpport) { g_mutex_unlock (&trans->priv->mutex); fs_rawudp_transmitter_put_udpport (trans, udpport); return tmpudpport; } trans->priv->udpports[component_id] = g_list_prepend (trans->priv->udpports[component_id], udpport); g_mutex_unlock (&trans->priv->mutex); return udpport; error: fs_rawudp_transmitter_put_udpport (trans, udpport); return NULL; } void fs_rawudp_transmitter_put_udpport (FsRawUdpTransmitter *trans, UdpPort *udpport) { GST_LOG ("Put port refcount %d->%d", udpport->refcount, udpport->refcount-1); g_mutex_lock (&trans->priv->mutex); if (udpport->refcount > 1) { udpport->refcount--; g_mutex_unlock (&trans->priv->mutex); return; } trans->priv->udpports[udpport->component_id] = g_list_remove (trans->priv->udpports[udpport->component_id], udpport); g_mutex_unlock (&trans->priv->mutex); if (udpport->udpsrc) { GstStateChangeReturn ret; gst_element_set_locked_state (udpport->udpsrc, TRUE); ret = gst_element_set_state (udpport->udpsrc, GST_STATE_NULL); if (ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("Error changing state of udpsrc: %s", gst_element_state_change_return_get_name (ret)); if (!gst_bin_remove (GST_BIN (trans->priv->gst_src), udpport->udpsrc)) GST_ERROR ("Could not remove udpsrc element from transmitter source"); } if (udpport->udpsrc_requested_pad) { gst_element_release_request_pad (udpport->funnel, udpport->udpsrc_requested_pad); gst_object_unref (udpport->udpsrc_requested_pad); } if (udpport->udpsink_requested_pad) { gst_element_release_request_pad (udpport->tee, udpport->udpsink_requested_pad); gst_object_unref (udpport->udpsink_requested_pad); } if (udpport->udpsink) { GstStateChangeReturn ret; gst_element_set_locked_state (udpport->udpsink, TRUE); ret = gst_element_set_state (udpport->udpsink, GST_STATE_NULL); if (ret != GST_STATE_CHANGE_SUCCESS) GST_ERROR ("Error changing state of udpsink: %s", gst_element_state_change_return_get_name (ret)); if (!gst_bin_remove (GST_BIN (trans->priv->gst_sink), udpport->udpsink)) GST_ERROR ("Could not remove udpsink element from transmitter source"); } if (udpport->socket) g_socket_close (udpport->socket, NULL); g_clear_object (&udpport->socket); if (udpport->known_addresses) { guint i; for (i = 0; i < udpport->known_addresses->len; i++) g_object_unref (g_array_index (udpport->known_addresses, struct KnownAddress, i).addr); g_array_free (udpport->known_addresses, TRUE); } g_free (udpport->requested_ip); g_mutex_clear (&udpport->mutex); g_slice_free (UdpPort, udpport); } void fs_rawudp_transmitter_udpport_add_dest (UdpPort *udpport, const gchar *ip, gint port) { GST_DEBUG ("Adding dest %s:%d", ip, port); g_signal_emit_by_name (udpport->udpsink, "add", ip, port); gst_element_send_event (udpport->udpsink, gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, gst_structure_new ("GstForceKeyUnit", "all-headers", G_TYPE_BOOLEAN, TRUE, NULL))); } void fs_rawudp_transmitter_udpport_remove_dest (UdpPort *udpport, const gchar *ip, gint port) { g_signal_emit_by_name (udpport->udpsink, "remove", ip, port); } gboolean fs_rawudp_transmitter_udpport_sendto (UdpPort *udpport, gchar *msg, size_t len, const struct sockaddr *to, socklen_t tolen, GError **error) { GSocketAddress *addr; gboolean ret; addr = g_socket_address_new_from_native ((gpointer) to, tolen); ret = g_socket_send_to (udpport->socket, addr, msg, len, NULL, error); g_object_unref (addr); return ret; } gulong fs_rawudp_transmitter_udpport_connect_recv (UdpPort *udpport, GstPadProbeCallback callback, gpointer user_data) { GstPad *pad; gulong id; pad = gst_element_get_static_pad (udpport->udpsrc, "src"); id = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, callback, user_data, NULL); gst_object_unref (pad); return id; } void fs_rawudp_transmitter_udpport_disconnect_recv (UdpPort *udpport, gulong id) { GstPad *pad = gst_element_get_static_pad (udpport->udpsrc, "src"); gst_pad_remove_probe (pad, id); gst_object_unref (pad); } gboolean fs_rawudp_transmitter_udpport_is_pad (UdpPort *udpport, GstPad *pad) { GstPad *mypad; gboolean res; mypad = gst_element_get_static_pad (udpport->udpsrc, "src"); res = (mypad == pad); gst_object_unref (mypad); return res; } gint fs_rawudp_transmitter_udpport_get_port (UdpPort *udpport) { return udpport->port; } static GType fs_rawudp_transmitter_get_stream_transmitter_type (FsTransmitter *transmitter) { return FS_TYPE_RAWUDP_STREAM_TRANSMITTER; } /** * fs_rawudp_transmitter_udpport_add_known_address: * @udpport: a #UdpPort * @address: the new #GSocketAddress that we know * @callback: a Callback that will be called if the uniqueness of an address * changes * @user_data: data passed back to the callback * * This function stores the passed address and tells the caller if it was * unique or not. The callback is called when the uniqueness changes. * * Returns: %TRUE if the new address is unique, %FALSE otherwise */ gboolean fs_rawudp_transmitter_udpport_add_known_address (UdpPort *udpport, GSocketAddress *address, FsRawUdpAddressUniqueCallbackFunc callback, gpointer user_data) { gint i; gboolean unique = FALSE; struct KnownAddress newka = {0}; guint counter = 0; struct KnownAddress *prev_ka = NULL; g_mutex_lock (&udpport->mutex); for (i = 0; g_array_index (udpport->known_addresses, struct KnownAddress, i).callback; i++) { struct KnownAddress *ka = &g_array_index (udpport->known_addresses, struct KnownAddress, i); if (fs_g_inet_socket_address_equal (address, ka->addr)) { g_assert (!(ka->callback == callback && ka->user_data == user_data)); prev_ka = ka; counter++; } } if (counter == 0) { unique = TRUE; } else if (counter == 1) { if (prev_ka->callback) prev_ka->callback (FALSE, prev_ka->addr, prev_ka->user_data); } newka.addr = g_object_ref (address); newka.callback = callback; newka.user_data = user_data; g_array_append_val (udpport->known_addresses, newka); g_mutex_unlock (&udpport->mutex); return unique; } /** * fs_rawudp_transmitter_udpport_remove_known_address: * @udpport: a #UdpPort * @address: the address to remove * @callback: the callback passed to the corresponding * fs_rawudp_transmitter_udpport_add_known_address() call * @user_data: the user_data passed to the corresponding * fs_rawudp_transmitter_udpport_add_known_address() call * * Removes a known address from the list and calls the notifiers if another * address becomes unique */ void fs_rawudp_transmitter_udpport_remove_known_address (UdpPort *udpport, GSocketAddress *address, FsRawUdpAddressUniqueCallbackFunc callback, gpointer user_data) { gint i; gint remove_i = -1; guint counter = 0; struct KnownAddress *prev_ka = NULL; g_mutex_lock (&udpport->mutex); for (i = 0; g_array_index (udpport->known_addresses, struct KnownAddress, i).callback; i++) { struct KnownAddress *ka = &g_array_index (udpport->known_addresses, struct KnownAddress, i); if (fs_g_inet_socket_address_equal (address, ka->addr)) { if (ka->callback == callback && ka->user_data == user_data) { remove_i = i; } else { counter++; prev_ka = ka; } } } if (remove_i == -1) { GST_ERROR ("Tried to remove unknown known address"); goto out; } if (counter == 1) prev_ka->callback (TRUE, prev_ka->addr, prev_ka->user_data); g_object_unref (g_array_index (udpport->known_addresses, struct KnownAddress, remove_i).addr); g_array_remove_index_fast (udpport->known_addresses, remove_i); out: g_mutex_unlock (&udpport->mutex); } static void fs_rawudp_transmitter_set_type_of_service (FsRawUdpTransmitter *self, gint tos) { gint i; g_mutex_lock (&self->priv->mutex); if (self->priv->type_of_service == tos) goto out; self->priv->type_of_service = tos; for (i = 0; i < self->components; i++) { GList *item; for (item = self->priv->udpports[i]; item; item = item->next) { UdpPort *udpport = item->data; int fd = g_socket_get_fd (udpport->socket); if (setsockopt (fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0) GST_WARNING ( "could not set socket ToS: %s", g_strerror (errno)); #ifdef IPV6_TCLASS if (setsockopt (fd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof (tos)) < 0) GST_WARNING ("could not set TCLASS: %s", g_strerror (errno)); #endif } } out: g_mutex_unlock (&self->priv->mutex); } /* TEMPORARY: should be in Glib */ gboolean fs_g_inet_socket_address_equal (GSocketAddress *addr1, GSocketAddress *addr2) { GInetSocketAddress *inet1; GInetSocketAddress *inet2; if (!G_IS_INET_SOCKET_ADDRESS (addr1) || !G_IS_INET_SOCKET_ADDRESS (addr2)) return FALSE; inet1 = G_INET_SOCKET_ADDRESS (addr1); inet2 = G_INET_SOCKET_ADDRESS (addr2); if (g_inet_socket_address_get_port (inet1) == g_inet_socket_address_get_port (inet2) && g_inet_address_equal (g_inet_socket_address_get_address (inet1), g_inet_socket_address_get_address (inet2))) return TRUE; else return FALSE; } farstream-0.2.7/examples/0000775000076400007640000000000012462323001012326 500000000000000farstream-0.2.7/examples/Makefile.in0000664000076400007640000005337312462321046014335 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = examples DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = gui commandline all: all-recursive .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 examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/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 # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ 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 installdirs: installdirs-recursive installdirs-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-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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 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-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: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am 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-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-am uninstall uninstall-am # 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: farstream-0.2.7/examples/Makefile.am0000664000076400007640000000003312112757232014307 00000000000000 SUBDIRS = gui commandline farstream-0.2.7/examples/gui/0000775000076400007640000000000012462323001013112 500000000000000farstream-0.2.7/examples/gui/Makefile.in0000664000076400007640000003720412462321046015114 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = examples/gui DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ fs_gui_net.py \ fs-gui.py \ fs-gui-dtmf.ui \ fs-gui-main-window.ui \ fs-gui-startup.ui \ fs-gui-user-frame.ui 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 examples/gui/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/gui/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 tags TAGS: ctags CTAGS: cscope cscopelist: 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 installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-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: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am 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-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 \ tags-am uninstall uninstall-am # 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: farstream-0.2.7/examples/gui/Makefile.am0000664000076400007640000000020311710041460015062 00000000000000EXTRA_DIST = \ fs_gui_net.py \ fs-gui.py \ fs-gui-dtmf.ui \ fs-gui-main-window.ui \ fs-gui-startup.ui \ fs-gui-user-frame.ui farstream-0.2.7/examples/gui/fs-gui.py0000775000076400007640000012502612415600754014622 00000000000000#!/usr/bin/python # Farstream demo GUI program # # Copyright (C) 2007 Collabora, Nokia # @author: Olivier Crete # # 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # import sys, os, pwd, os.path import socket import threading import weakref import gc import signal import gi gi.require_version('Farstream', '0.2') gi.require_version('Gst', '1.0') gi.require_version('GstVideo', '1.0') gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') from gi.repository import GLib, GObject, Gtk, Gdk, GdkX11 from gi.repository import Farstream, Gst, GstVideo from fs_gui_net import FsUIClient, FsUIListener, FsUIServer CAMERA=False AUDIO=True VIDEO=True CLIENT=1 SERVER=2 TRANSMITTER="nice" INITIAL_VOLUME=50.0 builderprefix = os.path.join(os.path.dirname(__file__),"fs-gui-") def make_video_sink(pipeline, xid, name, sync=True): "Make a bin with a video sink in it, that will be displayed on xid." bin = Gst.parse_bin_from_description("videoconvert ! videoscale ! videoconvert ! xvimagesink", True) sink = bin.get_by_interface(GstVideo.VideoOverlay) assert sink bin.set_name("videosink_%d" % xid) sink.set_window_handle(xid) sink.props.sync = sync return bin class FsUIPipeline (GObject.Object): "Object to wrap the GstPipeline" level = GObject.Property(type=float) def int_handler(self, sig, frame): try: Gst.DEBUG_BIN_TO_DOT_FILE(self.pipeline, 0, "pipelinedump") except: pass sys.exit(2) def g_int_handler(self): self.int_handler(None, None) def __init__(self, elementname="fsrtpconference"): GObject.GObject.__init__(self) self.pipeline = Gst.Pipeline() GLib.unix_signal_add_full(0, signal.SIGINT, self.g_int_handler, None,) signal.signal(signal.SIGINT, self.int_handler) #self.pipeline.get_bus().set_sync_handler(self.sync_handler, None) self.pipeline.get_bus().add_watch(0, self.async_handler, None) self.conf = Gst.ElementFactory.make(elementname, None) self.notifier = Farstream.ElementAddedNotifier() self.notifier.add(self.pipeline) self.notifier.set_default_properties(self.conf) self.pipeline.add(self.conf) if VIDEO: self.videosource = FsUIVideoSource(self.pipeline) self.videosession = FsUISession(self.conf, self.videosource) if AUDIO: self.audiosource = FsUIAudioSource(self.pipeline) self.audiosession = FsUISession(self.conf, self.audiosource) #self.adder = None self.pipeline.set_state(Gst.State.PLAYING) def __del__(self): self.pipeline.set_state(Gst.State.NULL) def set_mute(self, muted): if AUDIO: self.audiosource.volume.props.mute = muted def set_volume(self, volume): if AUDIO: self.audiosource.volume.props.volume = volume / 100 def sync_handler(self, bus, message, data): "Message handler to get the prepare-xwindow-id event" if message.type == Gst.MessageType.ELEMENT and \ message.get_structure().has_name("prepare-xwindow-id"): xid = None element = message.src # We stored the XID on the element or its parent on the expose event # Now lets look it up while not xid and element: xid = element.xid element = element.get_parent() if xid: message.src.set_window_handle(xid) return Gst.BusSyncReply.DROP return Gst.BusSyncReply.PASS def async_handler(self, bus, message, Data): "Async handler to print messages" if message.type == Gst.MessageType.ERROR: print "ERROR: ", message.src.get_name(), ": ", message.parse_error() sys.exit(1) elif message.type == Gst.MessageType.WARNING: print "WARNING: ", message.src.get_name(), ": ", message.parse_warning() elif message.type == Gst.MessageType.LATENCY: self.pipeline.recalculate_latency() elif message.type == Gst.MessageType.ELEMENT: if message.get_structure().has_name("dtmf-event"): print "dtmf-event: %d" % message.get_structure().get_int("number") elif message.get_structure().has_name("farstream-local-candidates-prepared"): message.get_structure().get_value("stream").uistream.local_candidates_prepared() elif message.get_structure().has_name("farstream-new-local-candidate"): message.get_structure().get_value("stream").uistream.new_local_candidate( message.get_structure().get_value("candidate")) elif message.get_structure().has_name("farstream-codecs-changed"): print message.src.get_name(), ": ", message.get_structure().get_name() message.get_structure().get_value("session").uisession.codecs_changed() if AUDIO and message.get_structure().get_value("session") == self.audiosession.fssession: self.codecs_changed_audio() if VIDEO and message.get_structure().get_value("session") == self.videosession.fssession: self.codecs_changed_video() elif message.get_structure().has_name("farstream-send-codec-changed"): print message.src.get_name(), ": ", message.get_structure().get_name() print "send codec changed: " + message.get_structure().get_value("codec").to_string() if AUDIO and message.get_structure().get_value("session") == self.audiosession.fssession: self.codecs_changed_audio() if VIDEO and message.get_structure().get_value("session") == self.videosession.fssession: self.codecs_changed_video() elif message.get_structure().has_name("farstream-recv-codecs-changed"): print message.src.get_name(), ": ", message.get_structure().get_name() message.get_structure().get_value("stream").uistream.recv_codecs_changed( \ message.get_structure().get_value("codecs")) elif message.get_structure().has_name("farstream-error"): print "Async error ("+ str(message.get_structure().get_int("error-no")) +"): " + message.get_structure().get_string("error-msg") elif message.get_structure().has_name("level"): decay = message.get_structure().get_value("decay") rms = message.get_structure().get_value("rms") avg_rms = float(sum(rms))/len(rms) if len(rms) > 0 else float('nan') avg_linear = pow (10, avg_rms / 20) * 100 if message.src == self.audiosource.level: self.props.level = avg_linear else: for stream in self.audiosession.streams: for sink in stream.sinks: level = sink.get_by_name("l") if level and level is message.src: stream.participant.props.level = avg_linear break else: print message.src.get_name(), ": ", message.get_structure().get_name() elif message.type != Gst.MessageType.STATE_CHANGED \ and message.type != Gst.MessageType.ASYNC_DONE \ and message.type != Gst.MessageType.QOS: print message.type return True def make_video_preview(self, xid, newsize_callback): "Creates the preview sink" self.previewsink = make_video_sink(self.pipeline, xid, "previewvideosink", False) self.pipeline.add(self.previewsink) #Add a probe to wait for the first buffer to find the image size self.havesize = self.previewsink.get_static_pad("sink").add_probe(Gst.PadProbeType.EVENT_DOWNSTREAM, self.have_size, newsize_callback) self.previewsink.set_state(Gst.State.PLAYING) self.videosource.tee.link(self.previewsink) return self.previewsink def have_size(self, pad, info, callback): "Callback on the first buffer to know the drawingarea size" if (info.get_event().type != Gst.EventType.CAPS): return Gst.PadProbeReturn.OK caps = info.get_event().parse_caps() x = caps.get_structure(0).get_int("width")[1] y = caps.get_structure(0).get_int("height")[1] callback(x,y) return Gst.PadProbeReturn.OK def link_audio_sink(self, pad, sinkcount): "Link the audio sink to the pad" # print >>sys.stderr, "LINKING AUDIO SINK" # if not self.adder: # audiosink = Gst.ElementFactory.make("alsasink", None) # audiosink.set_property("buffer-time", 50000) # self.pipeline.add(audiosink) # try: # self.adder = Gst.ElementFactory.make("liveadder", None) # except Gst.ElementNotFoundError: # audiosink.set_state(Gst.State.PLAYING) # pad.link(audiosink.get_static_pad("sink")) # return # self.pipeline.add(self.adder) # audiosink.set_state(Gst.State.PLAYING) # self.adder.link(audiosink) # self.adder.set_state(Gst.State.PLAYING) # convert1 = Gst.ElementFactory.make("audioconvert", None) # self.pipeline.add(convert1) # resample = Gst.ElementFactory.make("audioresample", None) # self.pipeline.add(resample) # convert2 = Gst.ElementFactory.make("audioconvert", None) # self.pipeline.add(convert2) # convert1.link(resample) # resample.link(convert2) # convert2.link(self.adder) # pad.link(convert1.get_static_pad("sink")) # convert2.set_state(Gst.State.PLAYING) # resample.set_state(Gst.State.PLAYING) # convert1.set_state(Gst.State.PLAYING) sink = Gst.parse_bin_from_description("level name=l ! pulsesink name=v", True) sink.set_name("audiosink_" + str(sinkcount)); print sink print sink.get_name() self.pipeline.add(sink) sink.set_state(Gst.State.PLAYING) if pad.link(sink.get_static_pad("sink")) != Gst.PadLinkReturn.OK: print("LINK FAILED") self.pipeline.post_message(Gst.Message.new_latency(sink)) return sink class FsUISource: "An abstract generic class for media sources" def __init__(self, pipeline): self.pipeline = pipeline self.tee = Gst.ElementFactory.make("tee", None) pipeline.add(self.tee) self.fakesink = Gst.ElementFactory.make("fakesink", None) self.fakesink.props.async = False self.fakesink.props.sync = False self.fakesink.set_state(Gst.State.PLAYING) self.tee.set_state(Gst.State.PLAYING) pipeline.add(self.fakesink) self.tee.link(self.fakesink) self.source = self.make_source() pipeline.add(self.source) self.source.link(self.tee) def __del__(self): self.source.set_state(Gst.State.NULL) self.tee.set_state(Gst.State.NULL) self.pipeline.remove(self.source) self.pipeline.remove(self.tee) def make_source(self): "Creates and returns the source GstElement" raise NotImplementedError() def get_type(self): "Returns the FsMediaType of the source." raise NotImplementedError() def get_src_pad(self, name="src_%u"): "Gets a source pad from the source" requestpad = self.tee.get_request_pad(name) assert requestpad return requestpad def put_src_pad(self, pad): "Puts the source pad from the source" self.tee.release_request_pad(pad) class FsUIVideoSource(FsUISource): "A Video source" def get_type(self): return Farstream.MediaType.VIDEO def make_source(self): bin = Gst.Bin() if CAMERA: source = Gst.ElementFactory.make("v4l2src", None) source.set_property("device", CAMERA) bin.add(source) else: source = Gst.ElementFactory.make("videotestsrc", None) source.set_property("is-live", 1) bin.add(source) overlay = Gst.ElementFactory.make("timeoverlay", None) overlay.set_property("font-desc", "Sans 32") bin.add(overlay) source.link(overlay) source=overlay filter = Gst.ElementFactory.make("capsfilter", None) filter.set_property("caps", Gst.Caps.from_string("video/x-raw , width=[300,500] , height=[200,500], framerate=[20/1,30/1]")) bin.add(filter) source.link(filter) videoscale = Gst.ElementFactory.make("videoscale", None) bin.add(videoscale) filter.link(videoscale) bin.add_pad(Gst.GhostPad.new("src", videoscale.get_static_pad("src"))) return bin class FsUIAudioSource(FsUISource): "An audio source" def get_type(self): return Farstream.MediaType.AUDIO def make_source(self): AUDIOSOURCE = "audiotestsrc is-live=1 wave=1 ! volume name=v" #AUDIOSOURCE = "pulsesrc name=v" source = Gst.parse_bin_from_description(AUDIOSOURCE + " volume=" + str(INITIAL_VOLUME/100) + " ! level message=1 name=l", True) self.volume = source.get_by_name("v") self.level = source.get_by_name("l") return source class FsUISession: "This is one session (audio or video depending on the source)" def __init__(self, conference, source): self.conference = conference self.source = source self.streams = weakref.WeakSet() self.fssession = conference.new_session(source.get_type()) self.fssession.uisession = self self.fssession.set_codec_preferences( Farstream.utils_get_default_codec_preferences(conference)) self.queue = Gst.ElementFactory.make("queue", None) self.source.pipeline.add(self.queue) self.sourcepad = self.source.get_src_pad() self.queue.get_static_pad("src").link(self.fssession.get_property("sink-pad")) self.queue.set_state(Gst.State.PLAYING) self.sourcepad.link(self.queue.get_static_pad("sink")) def __del__(self): self.sourcepad(unlink) self.source.put_src_pad(self.sourcepad) self.source.pipeline.remove(self.queue) self.queue.set_state(Gst.State.NULL) def new_stream(self, id, participant): "Creates a new stream for a specific participant" transmitter_params = {} # If its video, we start at port 9078, to make it more easy # to differentiate it in a tcpdump log if self.source.get_type() == Farstream.MediaType.VIDEO and \ TRANSMITTER == "rawudp": cand = Farstream.Candidate.new("",Farstream.ComponentType.RTP, Farstream.CandidateType.HOST, Farstream.NetworkProtocol.UDP, None, 9078) value = GObject.Value() Farstream.value_set_candidate_list(value, [cand]) transmitter_params["preferred-local-candidates"] = value realstream = self.fssession.new_stream(participant.fsparticipant, Farstream.StreamDirection.BOTH) print TRANSMITTER + ": " + str(transmitter_params) realstream.set_transmitter_ht(TRANSMITTER, transmitter_params) stream = FsUIStream(id, self, participant, realstream) self.streams.add(stream) return stream def dtmf_start(self, event): if (event == "*"): event = Farstream.DTMFEvent.STAR elif (event == "#"): event = Farstream.DTMFEvent.POUND else: event = int(event) self.fssession.start_telephony_event(event, 2) def dtmf_stop(self): self.fssession.stop_telephony_event() def codecs_changed(self): "Callback from FsSession" for s in self.streams: s.codecs_changed() def send_stream_codecs(self, codecs, sourcestream): for s in self.streams: if s is not sourcestream: s.connect.send_codecs(s.participant.id, sourcestream.id, codecs, sourcestream.participant.id) class FsUIStream: "One participant in one session" def __init__(self, id, session, participant, fsstream): self.id = id self.session = session self.participant = participant self.fsstream = fsstream self.connect = participant.connect self.fsstream.uistream = self self.fsstream.connect("src-pad-added", self.__src_pad_added) self.send_codecs = False self.last_codecs = None self.last_stream_codecs = None self.candidates = [] self.sinks = [] self.sinkcount = 0 def local_candidates_prepared(self): "Callback from FsStream" self.connect.send_candidates_done(self.participant.id, self.id) def new_local_candidate(self, candidate): "Callback from FsStream" if "." in candidate.ip: print "IPv4 Candidate: %s %s" % (candidate.ip, candidate.port) elif ":" in candidate.ip: print "IPv6 Candidate: %s %s" % (candidate.ip, candidate.port) else: print "STRANGE Candidate: " + candidate.ip self.connect.send_candidate(self.participant.id, self.id, candidate) def __src_pad_added(self, stream, pad, codec): "Callback from FsStream" if self.session.source.get_type() == Farstream.MediaType.VIDEO: self.participant.link_video_sink(pad) else: sink = self.participant.pipeline.link_audio_sink(pad, self.sinkcount) self.sinkcount += 1 v = sink.get_by_name("v") self.participant.volume_adjustment.connect("value-changed", lambda adj, nonevalue: v.set_property("volume",float(adj.props.value) / 100), None) self.participant.mute_button.bind_property("active", v, "mute", GObject.BindingFlags.SYNC_CREATE) self.sinks.append(sink) def candidate(self, candidate): "Callback for the network object." self.candidates.append(candidate) def candidates_done(self): "Callback for the network object." if TRANSMITTER == "rawudp": self.fsstream.force_remote_candidates(self.candidates) else: self.fsstream.add_remote_candidates(self.candidates) self.candidates = [] def codecs(self, codecs): "Callback for the network object. Set the codecs" print "Remote codecs" for c in codecs: print "Got remote codec from %s/%s %s" % \ (self.participant.id, self.id, c.to_string()) oldcodecs = self.fsstream.props.remote_codecs if Farstream.codec_list_are_equal(oldcodecs,codecs): return try: self.fsstream.set_remote_codecs(codecs) except AttributeError: print "Tried to set codecs with 0 codec" self.send_local_codecs() self.send_stream_codecs() def send_local_codecs(self): "Callback for the network object." print "send_local_codecs" self.send_codecs = True self.check_send_local_codecs() def codecs_changed(self): print "codecs changed" self.check_send_local_codecs() self.send_stream_codecs() def check_send_local_codecs(self): "Internal function to send our local codecs when they're ready" print "check_send_local_codecs" if not self.send_codecs: print "Not ready to send the codecs" return codecs = self.session.fssession.props.codecs if not codecs: print "Codecs are not ready" return if not self.send_codecs and \ not self.session.fssession.codecs_need_resend(self.last_codecs, codecs): print "Codecs have not changed" return self.last_codecs = codecs print "sending local codecs" for c in codecs: print "Sending local codec from %s %s" % \ (self.id, c.to_string()) self.connect.send_codecs(self.participant.id, self.id, codecs) def send_stream_codecs(self): if not self.connect.is_server: return if not self.session.fssession.props.codecs: return codecs = self.fsstream.props.negotiated_codecs if codecs: self.session.send_stream_codecs(codecs, self) def recv_codecs_changed(self, codecs): self.participant.recv_codecs_changed() def __remove_from_send_codecs_to(self, participant): self.send_codecs_to.remote(participant) def send_codecs_to(self, participant): codecs = self.fsstream.props.negotiated_codecs print "sending stream %s codecs from %s to %s" % \ (self.id, self.participant.id, participant.id) if codecs: participant.connect.send_codecs(participant.id, self.id, codecs, self.participant.id) class FsUIParticipant (GObject.Object): "Wraps one FsParticipant, is one user remote contact" level = GObject.Property(type=float) def __init__(self, connect, id, pipeline, mainui): GObject.Object.__init__(self) self.connect = connect self.id = id self.pipeline = pipeline self.mainui = mainui self.fsparticipant = pipeline.conf.new_participant() self.outcv = threading.Condition() self.funnel = None self.make_widget() self.streams = {} if VIDEO: self.streams[int(Farstream.MediaType.VIDEO)] = \ pipeline.videosession.new_stream( int(Farstream.MediaType.VIDEO), self) if AUDIO: self.streams[int(Farstream.MediaType.AUDIO)] = \ pipeline.audiosession.new_stream( int(Farstream.MediaType.AUDIO), self) def candidate(self, media, candidate): "Callback for the network object." self.streams[media].candidate(candidate) def candidates_done(self, media): "Callback for the network object." self.streams[media].candidates_done() def codecs(self, media, codecs): "Callback for the network object." self.streams[media].codecs(codecs) def send_local_codecs(self): "Callback for the network object." for id in self.streams: self.streams[id].send_local_codecs() def make_widget(self): "Make the widget of the participant's video stream." Gdk.threads_enter() self.builder = Gtk.Builder() self.builder.add_from_file(builderprefix + "user-frame.ui") self.userframe = self.builder.get_object("user_frame") #self.builder.get_object("frame_label").set_text(self.cname) self.builder.connect_signals(self) self.label = Gtk.Label() self.label.set_alignment(0,0) self.label.show() self.mainui.hbox_add(self.userframe, self.label) volume_scale = self.builder.get_object("volume_scale") self.volume_adjustment = self.builder.get_object("volume_adjustment") volume_scale.props.adjustment = self.volume_adjustment self.mute_button = self.builder.get_object("mute_button") self.mute_button.bind_property("active", volume_scale, "sensitive", GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.INVERT_BOOLEAN) def candidate(self, candidate): "Callback for the network object." self.candidates.append(candidate) def candidates_done(self): "Callback for the network object." if TRANSMITTER == "rawudp": self.fsstream.force_remote_candidates(self.candidates) else: self.fsstream.add_remote_candidates(self.candidates) self.candidates = [] def codecs(self, codecs): "Callback for the network object. Set the codecs" print "Remote codecs" for c in codecs: print "Got remote codec from %s/%s %s" % \ (self.participant.id, self.id, c.to_string()) oldcodecs = self.fsstream.props.remote_codecs if Farstream.codec_list_are_equal(oldcodecs,codecs): return try: self.fsstream.set_remote_codecs(codecs) except AttributeError: print "Tried to set codecs with 0 codec" self.send_local_codecs() self.send_stream_codecs() def send_local_codecs(self): "Callback for the network object." print "send_local_codecs" self.send_codecs = True self.check_send_local_codecs() def codecs_changed(self): print "codecs changed" self.check_send_local_codecs() self.send_stream_codecs() def check_send_local_codecs(self): "Internal function to send our local codecs when they're ready" print "check_send_local_codecs" if not self.send_codecs: print "Not ready to send the codecs" return codecs = self.session.fssession.props.codecs if not codecs: print "Codecs are not ready" return if not self.send_codecs and \ not self.session.fssession.codecs_need_resend(self.last_codecs, codecs): print "Codecs have not changed" return self.last_codecs = codecs print "sending local codecs" for c in codecs: print "Sending local codec from %s %s" % \ (self.id, c.to_string()) self.connect.send_codecs(self.participant.id, self.id, codecs) def send_stream_codecs(self): if not self.connect.is_server: return if not self.session.fssession.props.codecs: return codecs = self.fsstream.props.negotiated_codecs if codecs: self.session.send_stream_codecs(codecs, self) def recv_codecs_changed(self, codecs): self.participant.recv_codecs_changed() def __remove_from_send_codecs_to(self, participant): self.send_codecs_to.remote(participant) def send_codecs_to(self, participant): codecs = self.fsstream.props.negotiated_codecs print "sending stream %s codecs from %s to %s" % \ (self.id, self.participant.id, participant.id) if codecs: participant.connect.send_codecs(participant.id, self.id, codecs, self.participant.id) class FsUIParticipant (GObject.Object): "Wraps one FsParticipant, is one user remote contact" level = GObject.Property(type=float) def __init__(self, connect, id, pipeline, mainui): GObject.Object.__init__(self) self.connect = connect self.id = id self.pipeline = pipeline self.mainui = mainui self.fsparticipant = pipeline.conf.new_participant() self.outcv = threading.Condition() self.funnel = None self.make_widget() self.streams = {} print "NEW PARTICIPANT: ", self if VIDEO: self.streams[int(Farstream.MediaType.VIDEO)] = \ pipeline.videosession.new_stream( int(Farstream.MediaType.VIDEO), self) if AUDIO: self.streams[int(Farstream.MediaType.AUDIO)] = \ pipeline.audiosession.new_stream( int(Farstream.MediaType.AUDIO), self) def candidate(self, media, candidate): "Callback for the network object." self.streams[media].candidate(candidate) def candidates_done(self, media): "Callback for the network object." self.streams[media].candidates_done() def codecs(self, media, codecs): "Callback for the network object." self.streams[media].codecs(codecs) def send_local_codecs(self): "Callback for the network object." for id in self.streams: self.streams[id].send_local_codecs() def make_widget(self): "Make the widget of the participant's video stream." Gdk.threads_enter() self.builder = Gtk.Builder() self.builder.add_from_file(builderprefix + "user-frame.ui") self.userframe = self.builder.get_object("user_frame") #self.builder.get_object("frame_label").set_text(self.cname) self.builder.connect_signals(self) self.label = Gtk.Label() self.label.set_alignment(0,0) self.label.show() self.mainui.hbox_add(self.userframe, self.label) volume_scale = self.builder.get_object("volume_scale") self.volume_adjustment = self.builder.get_object("volume_adjustment") volume_scale.props.adjustment = self.volume_adjustment self.mute_button = self.builder.get_object("mute_button") self.mute_button.bind_property("active", volume_scale, "sensitive", GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.INVERT_BOOLEAN) self.bind_property("level", volume_scale, "fill-level", 0) Gdk.threads_leave() def realize(self, widget, *args): """From the realize signal, used to create the video sink The video sink will be created here, but will only be linked when the pad arrives and link_video_sink() is called. """ if not VIDEO: return try: self.videosink.get_by_interface(GstVideo.VideoOverlay).expose() except AttributeError: try: self.outcv.acquire() self.xid = widget.get_window().get_xid() self.outcv.notifyAll() finally: self.outcv.release() def have_size(self, pad, info, nonedata): "Callback on the first buffer to know the drawingarea size" if (info.get_event().type != Gst.EventType.CAPS): return Gst.PadProbeReturn.OK caps = info.get_event().parse_caps() x = caps.get_structure(0).get_int("width")[1] y = caps.get_structure(0).get_int("height")[1] Gdk.threads_enter() self.builder.get_object("user_drawingarea").set_size_request(x,y) Gdk.threads_leave() return Gst.PadProbeReturn.OK def link_video_sink(self, pad): """Link the video sink Wait for the xid to appear, when it is known, create the video sink """ print "LINK VIDEO SINK" try: self.outcv.acquire() while not hasattr(self, 'xid'): self.outcv.wait() finally: self.outcv.release() if self.xid is None: return if not hasattr(self, 'videosink'): self.videosink = make_video_sink(self.pipeline.pipeline, self.xid, "uservideosink") self.pipeline.pipeline.add(self.videosink) self.funnel = Gst.ElementFactory.make("funnel", None) self.pipeline.pipeline.add(self.funnel) self.funnel.link(self.videosink) self.havesize = self.videosink.get_static_pad("sink").add_probe(Gst.PadProbeType.EVENT_DOWNSTREAM, self.have_size, None) self.videosink.set_state(Gst.State.PLAYING) self.funnel.set_state(Gst.State.PLAYING) print >>sys.stderr, "LINKING VIDEO SINK" pad.link(self.funnel.get_request_pad("sink_%u")) def destroy(self): if VIDEO: try: self.videosink.get_static_pad("sink").disconnect_handler(self.havesize) pass except AttributeError: pass self.streams = {} self.builder.get_object("user_drawingarea").disconnect_by_func(self.realize) self.streams = {} self.outcv.acquire() del self.xid self.videosink.set_locked_state(True) self.funnel.set_locked_state(True) self.videosink.set_state(Gst.State.NULL) self.funnel.set_state(Gst.State.NULL) self.pipeline.pipeline.remove(self.videosink) self.pipeline.pipeline.remove(self.funnel) del self.videosink del self.funnel self.outcv.release() Gdk.threads_enter() self.userframe.destroy() self.label.destroy() Gdk.threads_leave() def error(self): "Callback for the network object." if self.id == 1: self.mainui.fatal_error("Disconnected from server") else: print "ERROR ON %d" % (self.id) def recv_codecs_changed(self): codecs = {} for s in self.streams: codec = self.streams[s].fsstream.props.current_recv_codecs mediatype = self.streams[s].session.fssession.get_property("media-type") if len(codec): if mediatype in codecs: codecs[mediatype] += codec else: codecs[mediatype] = codec str = "" for mt in codecs: str += "" +mt.value_nick.title() + ":\n" for c in codecs[mt]: str += " %s: %s %s\n" % (c.id, c.encoding_name, c.clock_rate) self.label.set_markup(str) def send_codecs_to(self, participant): for sid in self.streams: self.streams[sid].send_codecs_to(participant) class FsMainUI: "The main UI and its different callbacks" def __init__(self, mode, ip, port): self.mode = mode self.pipeline = FsUIPipeline() self.pipeline.codecs_changed_audio = self.reset_audio_codecs self.pipeline.codecs_changed_video = self.reset_video_codecs self.builder = Gtk.Builder() self.builder.add_from_file(builderprefix + "main-window.ui") self.builder.connect_signals(self) self.mainwindow = self.builder.get_object("main_window") self.audio_combobox = self.builder.get_object("audio_combobox") self.video_combobox = self.builder.get_object("video_combobox") volume_scale = self.builder.get_object("volume_scale") self.volume_adjustment = Gtk.Adjustment(lower=0, upper=100, value=100) volume_scale.props.adjustment = self.volume_adjustment mute_button = self.builder.get_object("mute_button") mute_button.bind_property("active", volume_scale, "sensitive", GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.INVERT_BOOLEAN) self.pipeline.bind_property("level", volume_scale, "fill-level", GObject.BindingFlags.SYNC_CREATE) self.volume_adjustment.connect("value-changed", lambda adj, nonevalue: self.pipeline.set_volume(adj.props.value), None) liststore = Gtk.ListStore(str, object) self.audio_combobox.set_model(liststore) cell = Gtk.CellRendererText() self.audio_combobox.pack_start(cell, True) self.audio_combobox.add_attribute(cell, 'text', 0) self.reset_audio_codecs() liststore = Gtk.ListStore(str, object) self.video_combobox.set_model(liststore) cell = Gtk.CellRendererText() self.video_combobox.pack_start(cell, True) self.video_combobox.add_attribute(cell, 'text', 0) self.reset_video_codecs() if mode == CLIENT: self.client = FsUIClient(ip, port, FsUIParticipant, self.pipeline, self) self.builder.get_object("info_label").set_markup( "Connected to %s:%s" % (ip, port)) elif mode == SERVER: self.server = FsUIListener(port, FsUIServer, FsUIParticipant, self.pipeline, self) self.builder.get_object("info_label").set_markup( "Expecting connections on port %s" % (self.server.port)) self.mainwindow.show() def reset_codecs(self, combobox, fssession): liststore = combobox.get_model() current = fssession.get_property("current-send-codec") if liststore: liststore.clear() for c in fssession.props.codecs_without_config: str = ("%s: %s/%s %s" % (c.id, c.media_type.value_nick, c.encoding_name, c.clock_rate)) iter = liststore.append([str, c]) if current and c and current.id == c.id: combobox.set_active_iter(iter) print "active: "+ c.to_string() def reset_audio_codecs(self): if AUDIO: self.reset_codecs(self.audio_combobox, self.pipeline.audiosession.fssession) def reset_video_codecs(self): if VIDEO: self.reset_codecs(self.video_combobox, self.pipeline.videosession.fssession) def combobox_changed_cb(self, combobox, fssession): liststore = combobox.get_model() iter = combobox.get_active_iter() if iter: codec = liststore.get_value(iter, 1) print codec.to_string() fssession.set_send_codec(codec) def audio_combobox_changed_cb(self, combobox): self.combobox_changed_cb(combobox, self.pipeline.audiosession.fssession) def video_combobox_changed_cb(self, combobox): self.combobox_changed_cb(combobox, self.pipeline.videosession.fssession) def toggled_mute(self, button): self.pipeline.set_mute(button.props.active) def realize(self, widget, *args): "Callback from the realize event of the widget to make the preview sink" if not VIDEO: return try: self.preview.get_by_interface(GstVideo.VideoOverlay).expose() except AttributeError: self.preview = self.pipeline.make_video_preview(widget.get_window().get_xid(), self.newsize) def newsize (self, x, y): self.builder.get_object("preview_drawingarea").set_size_request(x,y) def shutdown(self, widget=None): Gtk.main_quit() def hbox_add(self, widget, label): table = self.builder.get_object("users_table") x = table.get_properties("n-columns")[0] table.attach(widget, x, x+1, 0, 1) table.attach(label, x, x+1, 1, 3, xpadding=6) def __del__(self): self.mainwindow.destroy() def fatal_error(self, errormsg): Gdk.threads_enter() dialog = Gtk.MessageDialog(self.mainwindow, Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.OK) dialog.set_markup(errormsg); dialog.run() dialog.destroy() Gtk.main_quit() Gdk.threads_leave() def show_dtmf(self, button): try: self.dtmf_builder.present() except AttributeError: self.dtmf_builder = Gtk.Builder() self.dtmf_builder.add_from_file(builderprefix + "dtmf.ui") self.dtmf_builder.connect_signals(self) def dtmf_start(self, button): self.pipeline.audiosession.dtmf_start(button.get_label()) def dtmf_stop(self, button): try: self.pipeline.audiosession.dtmf_stop() except AttributeError: pass def dtmf_destroy(self, button): self.dtmf_builder.get_object("dtmf_window").destroy() del self.dtmf_builder class FsUIStartup: "Displays the startup window and then creates the FsMainUI" def __init__(self): self.builder = Gtk.Builder() self.builder.add_from_file(builderprefix + "startup.ui") self.dialog = self.builder.get_object("neworconnect_dialog") self.builder.get_object("spinbutton_adjustment").set_value(9893) self.builder.connect_signals(self) self.dialog.show() self.acted = False def action(self, mode): port = int(self.builder.get_object("spinbutton_adjustment").get_value()) ip = self.builder.get_object("newip_entry").get_text() try: self.ui = FsMainUI(mode, ip, port) self.acted = True self.dialog.destroy() del self.dialog del self.builder except socket.error, e: dialog = Gtk.MessageDialog(self.dialog, Gtk.DialogFlags.MODAL, Gtk.MessageType.ERROR, Gtk.ButtonsType.OK) dialog.set_markup("Could not connect to %s %d" % (ip,port)) dialog.format_secondary_markup(e[1]) dialog.run() dialog.destroy() def new_server(self, widget): self.action(SERVER) def connect(self, widget): self.action(CLIENT) def quit(self, widget): if not self.acted: Gtk.main_quit() if __name__ == "__main__": if len(sys.argv) >= 2: CAMERA = sys.argv[1] else: CAMERA = None GLib.threads_init() Gdk.threads_init() Gst.init(sys.argv) startup = FsUIStartup() Gtk.main() del startup gc.collect() farstream-0.2.7/examples/gui/fs-gui-startup.ui0000664000076400007640000003376612401500475016307 00000000000000 1 65535 9398 1 1 False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 False center-on-parent dialog True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK vertical 2 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK end gtk-close False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True False False 0 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-new False True 0 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _New server True True True 1 False False 1 gtk-connect False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True False False 2 False True end 0 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 3 3 12 12 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 3 2 3 True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 127.0.0.1 1 3 1 2 GTK_FILL True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 Port: 2 3 GTK_FILL GTK_FILL True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 IP address: 1 2 GTK_FILL GTK_FILL True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 5 spinbutton_adjustment 1 True True if-valid 1 2 2 3 GTK_SHRINK True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK start-here 6 GTK_FILL GTK_FILL True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 48 Enter the IP address and the port of the server to connect to, or only the port if you want to start a new server True 19 1 3 GTK_FILL GTK_EXPAND | GTK_SHRINK False True 1 button7 button6 button5 farstream-0.2.7/examples/gui/fs-gui-main-window.ui0000664000076400007640000003437112401500475017027 00000000000000 False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 False True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK You are now connected to True True center False False 0 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 3 2 6 6 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Video: 2 3 GTK_FILL 6 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 2 3 GTK_EXPAND True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 1 2 1 2 GTK_EXPAND True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Audio: 1 2 GTK_FILL 6 True False 0 True False True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 0 1.3300000429153442 160 120 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True 0 True False vertical 6 True True vertical True True False 0 False right True True 0 False True True True False True False audio-volume-muted False True 1 False False 6 1 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 <b>User</b> True 2 True True 1 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 DTMF False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False False False 0 gtk-quit False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True False False end 1 False False 2 farstream-0.2.7/examples/gui/fs_gui_net.py0000664000076400007640000004076612401500475015550 00000000000000#!/usr/bin/python # Farstream simple network signalling library for the demo GUI # # Copyright (C) 2007 Collabora, Nokia # @author: Olivier Crete # # 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # # This is the signalling code used by fs-gui.py # import sys, os, pwd, os.path import socket, struct import gc import gi gi.require_version('Farstream', '0.2') from gi.repository import Farstream, GLib class FsUIConnect: ERROR = 0 CODECS = 1 CANDIDATE = 2 CANDIDATES_DONE = 3 INTRO = 4 def __reset(self): self.type = None self.media = None self.size = struct.calcsize("!IIIIII") self.data = "" self.dest = -1 self.src = -1 def __init__(self, sock, callbacks, myid=0): self.sock = sock self.__reset() self.callbacks = callbacks self.myid = myid self.partid = 1 self.is_server = True sock.setblocking(0) GLib.io_add_watch(self.sock.fileno(), GLib.IO_IN, self.__data_in) GLib.io_add_watch(self.sock.fileno(), GLib.IO_ERR | GLib.IO_HUP, self.__error) def __error(self, source, condition): print "have error" if (self.src >= 0): self.callbacks[self.ERROR](self.src) else: self.callbacks[self.ERROR](self.partid) return False def __data_in(self, source, condition): data = self.sock.recv(self.size-len(self.data)) if len(data) == 0: print "received nothing" if (self.src >= 0): self.callbacks[self.ERROR](self.src) else: self.callbacks[self.ERROR](self.partid) return False self.data += data if len(self.data) == self.size: if self.type is not None: if self.type == self.CODECS: data = self.__codecs_from_string(data) elif self.type == self.CANDIDATE: data = self.__candidate_from_string(data) else: data = self.data self.callbacks[self.type](self.src, self.dest, self.media, data) self.__reset() else: (check, self.src, self.dest, self.type, self.media, self.size) = struct.unpack("!IIIIII", self.data) if check != 0xDEADBEEF: print "CORRUPTION" sys.exit(1) if self.myid > 1 and self.dest != self.myid: print "GOT MESSAGE FOR %d, but I am %d" % (self.dest, self.myid) sys.exit(1) self.data="" if self.size == 0: self.callbacks[self.type](self.src, self.dest, self.media, None) self.__reset() return True def __send_data(self, dest, type, media=0, data="", src=None): if src is None: src = self.myid if src == 0 and type != self.INTRO: raise Exception try: self.sock.sendall(struct.pack("!IIIIII", 0xDEADBEEF, int(src), int(dest), int(type), int(media), len(data))) self.sock.sendall(data) except socket.error: print "have error" self.callbacks[self.ERROR](self.partid) def send_error(self, dest, src): self.__send_data(dest, self.ERROR, src=src) def send_intro(self, dest, src=None): self.__send_data(dest, self.INTRO, src=src) def send_codecs(self, dest, media, codecs, src=None): self.__send_data(dest, self.CODECS, media=media, data=self.__codecs_to_string(codecs), src=src) def send_candidate(self, dest, media, candidate, src=None): self.__send_data(dest, self.CANDIDATE, media=media, data=self.__candidate_to_string(candidate), src=src) def send_candidates_done(self, dest, media, src=None): self.__send_data(dest, self.CANDIDATES_DONE, media=media, src=src) def __del__(self): try: self.sock.close() except AttributeError: pass def __candidate_to_string(self, candidate): print int(candidate.proto) return "|".join(( candidate.foundation or "", str(candidate.component_id), candidate.ip or "", str(candidate.port), candidate.base_ip or "", str(candidate.base_port), str(int(candidate.proto)), str(candidate.priority), str(int(candidate.type)), candidate.username or "", candidate.password or "")) def __candidate_from_string(self, string): (foundation, component_id, ip, port, base_ip, base_port, proto, priority, type , username, password) = string.split("|") return Farstream.Candidate.new_full( foundation, int(component_id), ip, int(port), base_ip, int(base_port), int(proto), int(priority), int(type), username, password, 0) # No multicast, ttl=0 def __codecs_to_string(self, codecs): codec_strings = [] for codec in codecs: start = " ".join((str(codec.id), codec.encoding_name, str(int(codec.media_type)), str(codec.clock_rate), str(codec.channels))) codec = "".join((start, "|", ";".join([i.name + "=" + i.value for i in codec.optional_params]))) codec_strings.append(codec) return "\n".join(codec_strings) def __codecs_from_string(self, string): codecs = [] for substring in string.split("\n"): (start,end) = substring.split("|") (id, encoding_name, media_type, clock_rate, channels) = start.split(" ") codec = Farstream.Codec.new(int(id), encoding_name, int(media_type), int(clock_rate)) codec.channels = int(channels) if len(end): for x in end.split(";"): if len(x) > 0: codec.add_optional_parameter(*x.split("=",1)) codecs.append(codec) return codecs class FsUIConnectClient (FsUIConnect): def __init__(self, ip, port, callbacks): sock = socket.socket() sock.connect((ip, port)) FsUIConnect.__init__(self, sock, callbacks) self.is_server = False class FsUIListener: def __init__(self, port, callback, *args): self.sock = socket.socket() self.callback = callback self.args = args bound = False while not bound: try: self.sock.bind(("", port)) bound = True except socket.error, e: port += 1 self.port = port print "Bound to port ", port self.sock.setblocking(0) GLib.io_add_watch(self.sock.fileno(), GLib.IO_IN, self.data_in) GLib.io_add_watch(self.sock.fileno(), GLib.IO_ERR | GLib.IO_HUP, self.error) self.sock.listen(3) def error(self, source, condition): print "Error on listen" sys.exit(1) return False def data_in(self, source, condition): (sock,addr) = self.sock.accept() self.callback(sock, *self.args) return True class FsUIClient: def __init__(self, ip, port, get_participant, *args): self.participants = {} self.get_participant = get_participant self.args = args self.connect = FsUIConnectClient(ip, port, (self.__error, self.__codecs, self.__candidate, self.__candidate_done, self.__intro)) self.connect.send_intro(1) def __codecs(self, src, dest, media, data): print "Got codec Src:%d dest:%d data:%s" % (src, dest, data) self.participants[src].codecs(media, data) def __candidate(self, src, dest, media, data): self.participants[src].candidate(media, data) def __candidate_done(self, src, dest, media, data): self.participants[src].candidates_done(media) def __intro(self, src, dest, media, data): print "Got Intro from %s, I am %d" % (src, dest) if src == 1: self.connect.myid = dest if not self.participants.has_key(src): if src != 1: self.connect.send_intro(src) self.participants[src] = self.get_participant(self.connect, src, *self.args) def __error(self, participantid, *arg): print "Client Error", participantid if participantid == 1: # Communication error with server, its over self.participants[participantid].error() else: self.participants[participantid].destroy() del self.participants[participantid] gc.collect() class FsUIServer: nextid = 2 participants = {} def __init__(self, sock, get_participant, *args): self.get_participant = get_participant self.args = args self.connect = FsUIConnect(sock, (self.__error, self.__codecs, self.__candidate, self.__candidate_done, self.__intro), 1) def __codecs(self, src, dest, media, data): FsUIServer.participants[src].codecs(media, data) def __candidate(self, src, dest, media, data): if dest == 1: FsUIServer.participants[src].candidate(media, data) else: print data FsUIServer.participants[dest].connect.send_candidate(dest, media, data, src) def __candidate_done(self, src, dest, media, data): if dest == 1: FsUIServer.participants[src].candidates_done(media) else: FsUIServer.participants[dest].connect.send_candidates_done(dest, media, src) def __intro(self, src, dest, media, data): print "Got Intro from %s to %s" % (src, dest) if src == 0 and dest == 1: newid = FsUIServer.nextid # Forward the introduction to all other participants for pid in FsUIServer.participants: print "Sending from %d to %d" % (newid, pid) FsUIServer.participants[pid].connect.send_intro(pid, newid) self.connect.send_intro(newid) self.connect.partid = newid FsUIServer.participants[newid] = self.get_participant(self.connect, newid, *self.args) FsUIServer.participants[newid].send_local_codecs() FsUIServer.nextid += 1 elif dest != 1: FsUIServer.participants[dest].connect.send_intro(dest, src) FsUIServer.participants[src].send_codecs_to( FsUIServer.participants[dest]) else: print "ERROR SRC != 0" def __error(self, participantid, *args): print "Server Error", participantid FsUIServer.participants[participantid].destroy() del FsUIServer.participants[participantid] gc.collect() for pid in FsUIServer.participants: FsUIServer.participants[pid].connect.send_error(pid, participantid) if __name__ == "__main__": class TestMedia: def __init__(self, pid, id, connect): self.pid = pid self.id = id self.connect = connect candidate = Farstream.Candidate() candidate.component_id = 1 connect.send_candidate(self.pid, self.id, candidate) connect.send_candidates_done(self.pid, self.id) def candidate(self, candidate): print "Got candidate", candidate def candidates_done(self): print "Got candidate done" def codecs(self, codecs): if self.connect.myid != 1: self.connect.send_codecs(1, self.id, [Farstream.Codec.new(self.connect.myid, "codec-name", Farstream.MediaType.AUDIO, self.id)]) def send_local_codecs(self): print "Send local codecs to %s for media %s" % (self.pid, self.id) self.connect.send_codecs(self.pid, self.id, [Farstream.Codec.new(self.connect.myid, "local_codec", Farstream.MediaType.AUDIO, self.id)]) def get_codecs(self): return [Farstream.Codec(self.connect.myid, "nego-codecs", self.pid, self.id)] class TestParticipant: def __init__(self, connect, id, *args): self.id = id self.streams = {1: TestMedia(id, 1, connect), 2: TestMedia(id, 2, connect)} self.connect = connect print "New Participant %s" % (id) def candidate(self, media, candidate): self.streams[media].candidate(candidate) def candidates_done(self, media): self.streams[media].candidates_done() def codecs(self, media, codecs): self.streams[media].codecs(codecs) def send_local_codecs(self): for id in self.streams: self.streams[id].send_local_codecs() def destroy(self): pass def send_codecs_to(self, participant): for sid in self.streams: print "to: %s from: %s" % (str(participant.id), (self.id)) participant.connect.send_codecs(participant.id, self.streams[sid].id, self.streams[sid].get_codecs(), self.id) def error(self): print "ERROR" sys.exit(1) def destroy(self): pass mainloop = GLib.MainLoop() if len(sys.argv) > 1: client = FsUIClient("127.0.0.1", int(sys.argv[1]), TestParticipant) else: listener = FsUIListener(9893, FsUIServer, TestParticipant) mainloop.run() farstream-0.2.7/examples/gui/fs-gui-user-frame.ui0000664000076400007640000001215612401500475016641 00000000000000 100 50 1 10 True False 0 True False True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 0 1.3300000429153442 160 120 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True True 0 True False vertical 6 True True vertical volume_adjustment True True False 0 False right True True 0 False True True True False True False audio-volume-muted False True 1 False False 6 1 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 <b>User</b> True farstream-0.2.7/examples/gui/fs-gui-dtmf.ui0000664000076400007640000003036612401500475015530 00000000000000 True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Send DTMF True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 4 3 6 6 # False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 2 3 3 4 0 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 1 2 3 4 * False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 3 4 9 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 2 3 2 3 8 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 1 2 2 3 7 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 2 3 6 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 2 3 1 2 5 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 1 2 1 2 4 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 1 2 3 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 2 3 2 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False 1 2 1 False True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False farstream-0.2.7/examples/commandline/0000775000076400007640000000000012462323001014614 500000000000000farstream-0.2.7/examples/commandline/Makefile.in0000664000076400007640000006115612462321046016621 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ noinst_PROGRAMS = simple-call$(EXEEXT) $(am__EXEEXT_1) subdir = examples/commandline DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ $(top_srcdir)/common/m4/as-auto-alt.m4 \ $(top_srcdir)/common/m4/as-compiler-flag.m4 \ $(top_srcdir)/common/m4/as-libtool.m4 \ $(top_srcdir)/common/m4/as-python.m4 \ $(top_srcdir)/common/m4/as-scrub-include.m4 \ $(top_srcdir)/common/m4/as-version.m4 \ $(top_srcdir)/common/m4/gst-arch.m4 \ $(top_srcdir)/common/m4/gst-args.m4 \ $(top_srcdir)/common/m4/gst-check.m4 \ $(top_srcdir)/common/m4/gst-error.m4 \ $(top_srcdir)/common/m4/gst-glib2.m4 \ $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ $(top_srcdir)/common/m4/gst-plugindir.m4 \ $(top_srcdir)/common/m4/gst.m4 \ $(top_srcdir)/common/m4/gtk-doc.m4 \ $(top_srcdir)/common/m4/pkg.m4 \ $(top_srcdir)/m4/introspection.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)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @HAVE_GIO_UNIX_TRUE@am__EXEEXT_1 = simple-call-shm$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) simple_call_SOURCES = simple-call.c simple_call_OBJECTS = simple-call.$(OBJEXT) simple_call_LDADD = $(LDADD) am__DEPENDENCIES_1 = simple_call_DEPENDENCIES = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = simple_call_shm_SOURCES = simple-call-shm.c simple_call_shm_OBJECTS = simple_call_shm-simple-call-shm.$(OBJEXT) am__DEPENDENCIES_2 = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(am__DEPENDENCIES_1) simple_call_shm_DEPENDENCIES = $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_1) simple_call_shm_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(simple_call_shm_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 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) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = simple-call.c simple-call-shm.c DIST_SOURCES = simple-call.c simple-call-shm.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXEEXT = @EXEEXT@ FFLAGS = @FFLAGS@ FGREP = @FGREP@ FS_AGE = @FS_AGE@ FS_ALL_LDFLAGS = @FS_ALL_LDFLAGS@ FS_APIVERSION = @FS_APIVERSION@ FS_API_VERSION = @FS_API_VERSION@ FS_CFLAGS = @FS_CFLAGS@ FS_CURRENT = @FS_CURRENT@ FS_INTERNAL_CFLAGS = @FS_INTERNAL_CFLAGS@ FS_LIBS = @FS_LIBS@ FS_LIBVERSION = @FS_LIBVERSION@ FS_LIB_LDFLAGS = @FS_LIB_LDFLAGS@ FS_LICENSE = @FS_LICENSE@ FS_LT_LDFLAGS = @FS_LT_LDFLAGS@ FS_OPTION_CFLAGS = @FS_OPTION_CFLAGS@ FS_PLUGINS_ALL = @FS_PLUGINS_ALL@ FS_PLUGINS_SELECTED = @FS_PLUGINS_SELECTED@ FS_PLUGIN_LDFLAGS = @FS_PLUGIN_LDFLAGS@ FS_PLUGIN_PATH = @FS_PLUGIN_PATH@ FS_PREFIX = @FS_PREFIX@ FS_REVISION = @FS_REVISION@ FS_TRANSMITTER_PLUGINS_ALL = @FS_TRANSMITTER_PLUGINS_ALL@ FS_TRANSMITTER_PLUGINS_SELECTED = @FS_TRANSMITTER_PLUGINS_SELECTED@ GCOV = @GCOV@ GCOV_CFLAGS = @GCOV_CFLAGS@ GCOV_LIBS = @GCOV_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GREP = @GREP@ GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ GST_API_VERSION = @GST_API_VERSION@ GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ GST_BASE_LIBS = @GST_BASE_LIBS@ GST_CFLAGS = @GST_CFLAGS@ GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ GST_CHECK_LIBS = @GST_CHECK_LIBS@ GST_INSTALL_PLUGINS_HELPER = @GST_INSTALL_PLUGINS_HELPER@ GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ GST_LIBS = @GST_LIBS@ GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ GST_TOOLS_DIR = @GST_TOOLS_DIR@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUPNP_CFLAGS = @GUPNP_CFLAGS@ GUPNP_LIBS = @GUPNP_LIBS@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NICE_CFLAGS = @NICE_CFLAGS@ NICE_LIBS = @NICE_LIBS@ 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@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGINDIR = @PLUGINDIR@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ 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@ plugindir = @plugindir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_GIO_UNIX_FALSE@SIMPLE_CALL_SHM = @HAVE_GIO_UNIX_TRUE@SIMPLE_CALL_SHM = simple-call-shm AM_CFLAGS = \ -I$(top_srcdir)/gst/fsrtpconference/ \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_CFLAGS) \ $(CFLAGS) LDADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(GST_LIBS) simple_call_shm_CFLAGS = \ $(AM_CFLAGS) \ $(GIO_UNIX_CFLAGS) simple_call_shm_LDADD = \ $(LDADD) \ $(GIO_UNIX_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(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 examples/commandline/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/commandline/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): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list simple-call$(EXEEXT): $(simple_call_OBJECTS) $(simple_call_DEPENDENCIES) $(EXTRA_simple_call_DEPENDENCIES) @rm -f simple-call$(EXEEXT) $(AM_V_CCLD)$(LINK) $(simple_call_OBJECTS) $(simple_call_LDADD) $(LIBS) simple-call-shm$(EXEEXT): $(simple_call_shm_OBJECTS) $(simple_call_shm_DEPENDENCIES) $(EXTRA_simple_call_shm_DEPENDENCIES) @rm -f simple-call-shm$(EXEEXT) $(AM_V_CCLD)$(simple_call_shm_LINK) $(simple_call_shm_OBJECTS) $(simple_call_shm_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple-call.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_call_shm-simple-call-shm.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< simple_call_shm-simple-call-shm.o: simple-call-shm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_call_shm_CFLAGS) $(CFLAGS) -MT simple_call_shm-simple-call-shm.o -MD -MP -MF $(DEPDIR)/simple_call_shm-simple-call-shm.Tpo -c -o simple_call_shm-simple-call-shm.o `test -f 'simple-call-shm.c' || echo '$(srcdir)/'`simple-call-shm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_call_shm-simple-call-shm.Tpo $(DEPDIR)/simple_call_shm-simple-call-shm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple-call-shm.c' object='simple_call_shm-simple-call-shm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_call_shm_CFLAGS) $(CFLAGS) -c -o simple_call_shm-simple-call-shm.o `test -f 'simple-call-shm.c' || echo '$(srcdir)/'`simple-call-shm.c simple_call_shm-simple-call-shm.obj: simple-call-shm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_call_shm_CFLAGS) $(CFLAGS) -MT simple_call_shm-simple-call-shm.obj -MD -MP -MF $(DEPDIR)/simple_call_shm-simple-call-shm.Tpo -c -o simple_call_shm-simple-call-shm.obj `if test -f 'simple-call-shm.c'; then $(CYGPATH_W) 'simple-call-shm.c'; else $(CYGPATH_W) '$(srcdir)/simple-call-shm.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_call_shm-simple-call-shm.Tpo $(DEPDIR)/simple_call_shm-simple-call-shm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple-call-shm.c' object='simple_call_shm-simple-call-shm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_call_shm_CFLAGS) $(CFLAGS) -c -o simple_call_shm-simple-call-shm.obj `if test -f 'simple-call-shm.c'; then $(CYGPATH_W) 'simple-call-shm.c'; else $(CYGPATH_W) '$(srcdir)/simple-call-shm.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 $(PROGRAMS) installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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-noinstPROGRAMS \ 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am 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-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 tags-am uninstall uninstall-am # 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: farstream-0.2.7/examples/commandline/Makefile.am0000664000076400007640000000072012401500475016574 00000000000000 if HAVE_GIO_UNIX SIMPLE_CALL_SHM = simple-call-shm else SIMPLE_CALL_SHM = endif noinst_PROGRAMS = simple-call $(SIMPLE_CALL_SHM) AM_CFLAGS = \ -I$(top_srcdir)/gst/fsrtpconference/ \ $(FS_INTERNAL_CFLAGS) \ $(FS_CFLAGS) \ $(GST_CFLAGS) \ $(CFLAGS) LDADD = \ $(top_builddir)/farstream/libfarstream-@FS_APIVERSION@.la \ $(GST_LIBS) simple_call_shm_CFLAGS = \ $(AM_CFLAGS) \ $(GIO_UNIX_CFLAGS) simple_call_shm_LDADD = \ $(LDADD) \ $(GIO_UNIX_LIBS) farstream-0.2.7/examples/commandline/simple-call.c0000664000076400007640000002226012461773672017132 00000000000000/* Farstream ad-hoc test for simple calls. * * Copyright (C) 2008 Collabora, Nokia * @author: Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * WARNING: * * Do not use this as an example of a proper use of farstream, it assumes that * both ends have the EXACT same list of codec installed in the EXACT same order */ #include #include #include #include #define DEFAULT_AUDIOSRC "audiotestsrc is-live=1" #define DEFAULT_AUDIOSINK "audioconvert ! audioresample ! audioconvert ! alsasink" typedef struct _TestSession { FsSession *session; FsStream *stream; } TestSession; static void print_error (GError *error) { if (error) { g_error ("Error: %s:%d : %s", g_quark_to_string (error->domain), error->code, error->message); } } static void src_pad_added_cb (FsStream *stream, GstPad *pad, FsCodec *codec, gpointer user_data) { GstElement *pipeline = GST_ELEMENT_CAST (user_data); GstElement *sink = NULL; GError *error = NULL; GstPad *pad2; g_print ("Adding receive pipeline\n"); if (g_getenv ("AUDIOSINK")) sink = gst_parse_bin_from_description (g_getenv ("AUDIOSINK"), TRUE, &error); else sink = gst_parse_bin_from_description (DEFAULT_AUDIOSINK, TRUE, &error); print_error (error); g_assert (sink); g_assert (gst_bin_add (GST_BIN (pipeline), sink)); pad2 = gst_element_get_static_pad (sink, "sink"); g_assert (pad2); g_assert (GST_PAD_LINK_SUCCESSFUL (gst_pad_link (pad, pad2))); g_assert (gst_element_set_state (sink, GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE); gst_object_unref (pad2); } static TestSession* add_audio_session (GstElement *pipeline, FsConference *conf, guint id, FsParticipant *part, guint localport, const gchar *remoteip, guint remoteport) { TestSession *ses = g_slice_new0 (TestSession); GError *error = NULL; GstPad *pad = NULL, *pad2 = NULL; GstElement *src = NULL; GList *cands = NULL; GList *codecs = NULL; GParameter param = {0}; gboolean res; ses->session = fs_conference_new_session (conf, FS_MEDIA_TYPE_AUDIO, &error); print_error (error); g_assert (ses->session); g_object_get (ses->session, "sink-pad", &pad, NULL); if (g_getenv ("AUDIOSRC")) src = gst_parse_bin_from_description (g_getenv ("AUDIOSRC"), TRUE, &error); else src = gst_parse_bin_from_description (DEFAULT_AUDIOSRC, TRUE, &error); print_error (error); g_assert (src); g_assert (gst_bin_add (GST_BIN (pipeline), src)); pad2 = gst_element_get_static_pad (src, "src"); g_assert (pad2); g_assert (GST_PAD_LINK_SUCCESSFUL (gst_pad_link (pad2, pad))); gst_object_unref (pad2); gst_object_unref (pad); ses->stream = fs_session_new_stream (ses->session, part, FS_DIRECTION_BOTH, &error); print_error (error); g_assert (ses->stream); cands = g_list_prepend (NULL, fs_candidate_new ("", FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, NULL, localport)); param.name = "preferred-local-candidates"; g_value_init (¶m.value, FS_TYPE_CANDIDATE_LIST); g_value_take_boxed (¶m.value, cands); fs_stream_set_transmitter (ses->stream, "rawudp", ¶m, 1, &error); print_error (error); g_assert (ses->stream); g_value_unset (¶m.value); g_signal_connect (ses->stream, "src-pad-added", G_CALLBACK (src_pad_added_cb), pipeline); cands = g_list_prepend (NULL, fs_candidate_new ("", FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, remoteip, remoteport)); res = fs_stream_force_remote_candidates (ses->stream, cands, &error); print_error (error); g_assert (res); fs_candidate_list_destroy (cands); codecs = g_list_prepend (NULL, fs_codec_new (FS_CODEC_ID_ANY, "PCMA", FS_MEDIA_TYPE_AUDIO, 0)); codecs = g_list_prepend (codecs, fs_codec_new (FS_CODEC_ID_ANY, "PCMU", FS_MEDIA_TYPE_AUDIO, 0)); fs_session_set_codec_preferences (ses->session, codecs, &error); print_error (error); fs_codec_list_destroy (codecs); g_object_get (ses->session, "codecs-without-config", &codecs, NULL); res = fs_stream_set_remote_codecs (ses->stream, codecs, &error); print_error (error); g_assert (res); return ses; } static gboolean async_bus_cb (GstBus *bus, GstMessage *message, gpointer user_data) { switch (GST_MESSAGE_TYPE(message)) { case GST_MESSAGE_ERROR: { GError *error = NULL; gchar *debug_str = NULL; gst_message_parse_error (message, &error, &debug_str); g_error ("Got gst message: %s %s", error->message, debug_str); } break; case GST_MESSAGE_WARNING: { GError *error = NULL; gchar *debug_str = NULL; gst_message_parse_warning (message, &error, &debug_str); g_warning ("Got gst message: %s %s", error->message, debug_str); } break; case GST_MESSAGE_ELEMENT: { const GstStructure *s = gst_message_get_structure (message); if (gst_structure_has_name (s, "farstream-error")) { gint error; const gchar *error_msg = gst_structure_get_string (s, "error-msg"); g_assert (gst_structure_get_enum (s, "error-no", FS_TYPE_ERROR, &error)); if (FS_ERROR_IS_FATAL (error)) g_error ("Farstream fatal error: %d %s", error, error_msg); else g_warning ("Farstream non-fatal error: %d %s", error, error_msg); } else if (gst_structure_has_name (s, "farstream-new-local-candidate")) { const GValue *val = gst_structure_get_value (s, "candidate"); FsCandidate *cand = NULL; g_assert (val); cand = g_value_get_boxed (val); g_print ("New candidate: %s %d\n", cand->ip, cand->port); } else if (gst_structure_has_name (s, "farstream-local-candidates-prepared")) { g_print ("Local candidates prepared\n"); } else if (gst_structure_has_name (s, "farstream-recv-codecs-changed")) { const GValue *val = gst_structure_get_value (s, "codecs"); GList *codecs = NULL; g_assert (val); codecs = g_value_get_boxed (val); g_print ("Recv codecs changed:\n"); for (; codecs; codecs = g_list_next (codecs)) { FsCodec *codec = codecs->data; gchar *tmp = fs_codec_to_string (codec); g_print ("%s\n", tmp); g_free (tmp); } } else if (gst_structure_has_name (s, "farstream-send-codec-changed")) { const GValue *val = gst_structure_get_value (s, "codec"); FsCodec *codec = NULL; gchar *tmp; g_assert (val); codec = g_value_get_boxed (val); tmp = fs_codec_to_string (codec); g_print ("Send codec changed: %s\n", tmp); g_free (tmp); } } break; default: break; } return TRUE; } int main (int argc, char **argv) { GMainLoop *loop = NULL; GstElement *pipeline = NULL; GstBus *bus = NULL; const gchar *remoteip; guint localport = 0; guint remoteport = 0; GstElement *conf = NULL; FsParticipant *part = NULL; GError *error = NULL; gst_init (&argc, &argv); if (argc != 4) { g_print ("Usage: %s \n", argv[0]); return 1; } localport = atoi (argv[1]); remoteip = argv[2]; remoteport = atoi (argv[3]); if (!localport || !remoteip || !remoteport) { g_print ("Usage: %s \n", argv[0]); return 2; } loop = g_main_loop_new (NULL, FALSE); pipeline = gst_pipeline_new (NULL); bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); gst_bus_add_watch (bus, async_bus_cb, pipeline); gst_object_unref (bus); conf = gst_element_factory_make ("fsrtpconference", NULL); g_assert (conf); part = fs_conference_new_participant (FS_CONFERENCE (conf), &error); print_error (error); g_assert (part); g_assert (gst_bin_add (GST_BIN (pipeline), conf)); add_audio_session (pipeline, FS_CONFERENCE (conf), 1, part, localport, remoteip, remoteport); g_assert (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE); g_main_loop_run (loop); g_assert (gst_element_set_state (pipeline, GST_STATE_NULL) != GST_STATE_CHANGE_FAILURE); g_object_unref (part); gst_object_unref (pipeline); g_main_loop_unref (loop); return 0; } farstream-0.2.7/examples/commandline/simple-call-shm.c0000664000076400007640000002377112401500475017706 00000000000000/* Farstream ad-hoc test for simple calls. * * Copyright (C) 2008 Collabora, Nokia * @author: Olivier Crete * * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * WARNING: * * Do not use this as an example of a proper use of farstream, it assumes that * both ends have the EXACT same list of codec installed in the EXACT same order */ #include #include #include #include #include #include #include #define DEFAULT_AUDIOSRC "audiotestsrc is-live=1 ! audio/x-raw, rate=8000 ! identity" #define DEFAULT_AUDIOSINK "alsasink sync=false async=false" typedef struct _TestSession { FsSession *session; FsStream *stream; gchar *send_socket; gchar *recv_socket; } TestSession; static void print_error (GError *error) { if (error) { g_error ("Error: %s:%d : %s", g_quark_to_string (error->domain), error->code, error->message); } } static void src_pad_added_cb (FsStream *stream, GstPad *pad, FsCodec *codec, gpointer user_data) { GstElement *pipeline = GST_ELEMENT_CAST (user_data); GstElement *sink = NULL; GError *error = NULL; GstPad *pad2; g_print ("Adding receive pipeline\n"); if (g_getenv ("AUDIOSINK")) sink = gst_parse_bin_from_description (g_getenv ("AUDIOSINK"), TRUE, &error); else sink = gst_parse_bin_from_description (DEFAULT_AUDIOSINK, TRUE, &error); print_error (error); g_assert (sink); g_assert (gst_bin_add (GST_BIN (pipeline), sink)); pad2 = gst_element_get_static_pad (sink, "sink"); g_assert (pad2); g_assert (GST_PAD_LINK_SUCCESSFUL (gst_pad_link (pad, pad2))); g_assert (gst_element_set_state (sink, GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE); gst_object_unref (pad2); } static TestSession* add_audio_session (GstElement *pipeline, FsConference *conf, guint id, FsParticipant *part, gchar *send_socket, gchar *recv_socket) { TestSession *ses = g_slice_new0 (TestSession); GError *error = NULL; GstPad *pad = NULL, *pad2 = NULL; GstElement *src = NULL; GList *cands = NULL; GParameter param = {0}; gboolean res; FsCandidate *cand; GList *codecs = NULL; ses->send_socket = send_socket; ses->recv_socket = recv_socket; ses->session = fs_conference_new_session (conf, FS_MEDIA_TYPE_AUDIO, &error); print_error (error); g_assert (ses->session); g_object_get (ses->session, "sink-pad", &pad, NULL); if (g_getenv ("AUDIOSRC")) src = gst_parse_bin_from_description (g_getenv ("AUDIOSRC"), TRUE, &error); else src = gst_parse_bin_from_description (DEFAULT_AUDIOSRC, TRUE, &error); print_error (error); g_assert (src); g_assert (gst_bin_add (GST_BIN (pipeline), src)); pad2 = gst_element_get_static_pad (src, "src"); g_assert (pad2); g_assert (GST_PAD_LINK_SUCCESSFUL (gst_pad_link (pad2, pad))); gst_object_unref (pad2); gst_object_unref (pad); ses->stream = fs_session_new_stream (ses->session, part, FS_DIRECTION_BOTH, &error); print_error (error); g_assert (ses->stream); cand = fs_candidate_new ("", FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, send_socket, 0); cands = g_list_prepend (NULL, cand); param.name = "preferred-local-candidates"; g_value_init (¶m.value, FS_TYPE_CANDIDATE_LIST); g_value_take_boxed (¶m.value, cands); res = fs_stream_set_transmitter (ses->stream, "shm", ¶m, 1, &error); print_error (error); g_value_unset (¶m.value); g_signal_connect (ses->stream, "src-pad-added", G_CALLBACK (src_pad_added_cb), pipeline); codecs = g_list_prepend (NULL, fs_codec_new (FS_CODEC_ID_ANY, "PCMA", FS_MEDIA_TYPE_AUDIO, 0)); codecs = g_list_prepend (codecs, fs_codec_new (FS_CODEC_ID_ANY, "PCMU", FS_MEDIA_TYPE_AUDIO, 0)); res = fs_session_set_codec_preferences (ses->session, codecs, &error); print_error (error); fs_codec_list_destroy (codecs); g_object_get (ses->session, "codecs-without-config", &codecs, NULL); res = fs_stream_set_remote_codecs (ses->stream, codecs, &error); print_error (error); g_assert (res); return ses; } static gboolean async_bus_cb (GstBus *bus, GstMessage *message, gpointer user_data) { switch (GST_MESSAGE_TYPE(message)) { case GST_MESSAGE_ERROR: { GError *error = NULL; gchar *debug_str = NULL; gst_message_parse_error (message, &error, &debug_str); g_print ("Got gst message: %s %s", error->message, debug_str); } break; case GST_MESSAGE_WARNING: { GError *error = NULL; gchar *debug_str = NULL; gst_message_parse_warning (message, &error, &debug_str); g_warning ("Got gst message: %s %s", error->message, debug_str); } break; case GST_MESSAGE_ELEMENT: { const GstStructure *s = gst_message_get_structure (message); if (gst_structure_has_name (s, "farstream-error")) { gint error; const gchar *error_msg = gst_structure_get_string (s, "error-msg"); g_assert (gst_structure_get_enum (s, "error-no", FS_TYPE_ERROR, &error)); if (FS_ERROR_IS_FATAL (error)) g_error ("Farstream fatal error: %d %s", error, error_msg); else g_warning ("Farstream non-fatal error: %d %s", error, error_msg); } else if (gst_structure_has_name (s, "farstream-new-local-candidate")) { const GValue *val = gst_structure_get_value (s, "candidate"); FsCandidate *cand = NULL; g_assert (val); cand = g_value_get_boxed (val); g_print ("New candidate: socket %s\n", cand->ip); g_print ("You can press ENTER on the other side\n"); } else if (gst_structure_has_name (s, "farstream-local-candidates-prepared")) { g_print ("Local candidates prepared\n"); } else if (gst_structure_has_name (s, "farstream-recv-codecs-changed")) { const GValue *val = gst_structure_get_value (s, "codecs"); GList *codecs = NULL; g_assert (val); codecs = g_value_get_boxed (val); g_print ("Recv codecs changed:\n"); for (; codecs; codecs = g_list_next (codecs)) { FsCodec *codec = codecs->data; gchar *tmp = fs_codec_to_string (codec); g_print ("%s\n", tmp); g_free (tmp); } } else if (gst_structure_has_name (s, "farstream-send-codec-changed")) { const GValue *val = gst_structure_get_value (s, "codec"); FsCodec *codec = NULL; gchar *tmp; g_assert (val); codec = g_value_get_boxed (val); tmp = fs_codec_to_string (codec); g_print ("Send codec changed: %s\n", tmp); g_free (tmp); } } break; default: break; } return TRUE; } static void free_session (TestSession *ses) { g_object_unref (ses->stream); g_object_unref (ses->session); g_slice_free (TestSession, ses); } static void skipped_cb (GObject *istream, GAsyncResult *result, gpointer user_data) { TestSession *ses = user_data; FsCandidate *cand; GList *cands = NULL; GError *error = NULL; gboolean res; cand = fs_candidate_new ("", FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST, FS_NETWORK_PROTOCOL_UDP, ses->send_socket, 0); cand->username = g_strdup (ses->recv_socket); cands = g_list_prepend (NULL, cand); res = fs_stream_force_remote_candidates (ses->stream, cands, &error); print_error (error); g_assert (res); fs_candidate_list_destroy (cands); } int main (int argc, char **argv) { GMainLoop *loop = NULL; GstElement *pipeline = NULL; GstBus *bus = NULL; GstElement *conf = NULL; FsParticipant *part = NULL; GError *error = NULL; GInputStream *istream = NULL; gchar *send_socket, *recv_socket; TestSession *ses; gst_init (&argc, &argv); if (argc != 3) { g_print ("Usage: %s \n", argv[0]); return 1; } send_socket = argv[1]; recv_socket = argv[2]; if (unlink (send_socket) < 0 && errno != ENOENT) { g_print ("Could not delete send or recv sockets"); return 2; } g_print ("Press ENTER when the other side is ready\n"); loop = g_main_loop_new (NULL, FALSE); pipeline = gst_pipeline_new (NULL); bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); gst_bus_add_watch (bus, async_bus_cb, pipeline); gst_object_unref (bus); conf = gst_element_factory_make ("fsrtpconference", NULL); g_assert (conf); part = fs_conference_new_participant (FS_CONFERENCE (conf), &error); print_error (error); g_assert (part); g_assert (gst_bin_add (GST_BIN (pipeline), conf)); istream = g_unix_input_stream_new (0, FALSE); ses = add_audio_session (pipeline, FS_CONFERENCE (conf), 1, part, send_socket, recv_socket); g_input_stream_skip_async (istream, 1, G_PRIORITY_DEFAULT, NULL, skipped_cb, ses); g_assert (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE); g_main_loop_run (loop); g_assert (gst_element_set_state (pipeline, GST_STATE_NULL) != GST_STATE_CHANGE_FAILURE); g_object_unref (part); g_object_unref (istream); free_session (ses); gst_object_unref (pipeline); g_main_loop_unref (loop); return 0; }