mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
merge jrtplib jthread and jrtp4c into 1 library (thanks mikej)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@495 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
474
libs/jrtplib/examples/Makefile
Normal file
474
libs/jrtplib/examples/Makefile
Normal file
@@ -0,0 +1,474 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# examples/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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.
|
||||
|
||||
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ..
|
||||
|
||||
pkgdatadir = $(datadir)/jrtplib
|
||||
pkglibdir = $(libdir)/jrtplib
|
||||
pkgincludedir = $(includedir)/jrtplib
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = /usr/bin/install -c
|
||||
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 = i686-pc-linux-gnu
|
||||
host_triplet = i686-pc-linux-gnu
|
||||
noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \
|
||||
example3$(EXEEXT) example4$(EXEEXT)
|
||||
subdir = examples
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_example1_OBJECTS = example1.$(OBJEXT)
|
||||
example1_OBJECTS = $(am_example1_OBJECTS)
|
||||
example1_LDADD = $(LDADD)
|
||||
example1_DEPENDENCIES = ../src/.libs/libjrtp.a
|
||||
am_example2_OBJECTS = example2.$(OBJEXT)
|
||||
example2_OBJECTS = $(am_example2_OBJECTS)
|
||||
example2_LDADD = $(LDADD)
|
||||
example2_DEPENDENCIES = ../src/.libs/libjrtp.a
|
||||
am_example3_OBJECTS = example3.$(OBJEXT)
|
||||
example3_OBJECTS = $(am_example3_OBJECTS)
|
||||
example3_LDADD = $(LDADD)
|
||||
example3_DEPENDENCIES = ../src/.libs/libjrtp.a
|
||||
am_example4_OBJECTS = example4.$(OBJEXT)
|
||||
example4_OBJECTS = $(am_example4_OBJECTS)
|
||||
example4_LDADD = $(LDADD)
|
||||
example4_DEPENDENCIES = ../src/.libs/libjrtp.a
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) \
|
||||
$(example4_SOURCES)
|
||||
DIST_SOURCES = $(example1_SOURCES) $(example2_SOURCES) \
|
||||
$(example3_SOURCES) $(example4_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /nfs/temp/jrtplib/missing --run aclocal-1.9
|
||||
AMDEP_FALSE = #
|
||||
AMDEP_TRUE =
|
||||
AMTAR = ${SHELL} /nfs/temp/jrtplib/missing --run tar
|
||||
AR = ar
|
||||
AUTOCONF = ${SHELL} /nfs/temp/jrtplib/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /nfs/temp/jrtplib/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /nfs/temp/jrtplib/missing --run automake-1.9
|
||||
AWK = gawk
|
||||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXXCPP = g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"jrtplib\" -DVERSION=\"3.3.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
|
||||
DEPDIR = .deps
|
||||
ECHO = echo
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = grep -E
|
||||
EXEEXT =
|
||||
F77 =
|
||||
FFLAGS =
|
||||
GST_CFLAGS =
|
||||
GST_LIBS =
|
||||
GST_PLUGINS_BASE_CFLAGS =
|
||||
GST_PLUGINS_BASE_LIBS =
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
|
||||
LDFLAGS =
|
||||
LIBOBJS =
|
||||
LIBS =
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LN_S = ln -s
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} /nfs/temp/jrtplib/missing --run makeinfo
|
||||
OBJEXT = o
|
||||
PACKAGE = jrtplib
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME =
|
||||
PACKAGE_STRING =
|
||||
PACKAGE_TARNAME =
|
||||
PACKAGE_VERSION =
|
||||
PATH_SEPARATOR = :
|
||||
PKG_CONFIG = /usr/bin/pkg-config
|
||||
RANLIB = ranlib
|
||||
RTP_ENDIAN = // Little endian system
|
||||
RTP_FILIO = // Don't have <sys/filio.h>
|
||||
RTP_GSTINCLUDES =
|
||||
RTP_HAVE_SOCKADDR_LEN = // No sa_len member in struct sockaddr
|
||||
RTP_LINKLIBS = -lpthread
|
||||
RTP_SOCKIO = // Don't have <sys/sockio.h>
|
||||
RTP_SOCKLENTYPE_UINT = #define RTP_SOCKLENTYPE_UINT
|
||||
RTP_SUPPORT_GETLOGINR = #define RTP_SUPPORT_GETLOGINR
|
||||
RTP_SUPPORT_GNUDRAND = #define RTP_SUPPORT_GNUDRAND
|
||||
RTP_SUPPORT_GST = // No GStreamer support
|
||||
RTP_SUPPORT_IFADDRS = #define RTP_SUPPORT_IFADDRS
|
||||
RTP_SUPPORT_INLINETEMPLATEPARAM = #define RTP_SUPPORT_INLINETEMPLATEPARAM
|
||||
RTP_SUPPORT_IPV4MULTICAST = #define RTP_SUPPORT_IPV4MULTICAST
|
||||
RTP_SUPPORT_IPV6 = // No IPv6 support
|
||||
RTP_SUPPORT_IPV6MULTICAST = // No IPv6 multicasting support
|
||||
RTP_SUPPORT_PROBATION = #define RTP_SUPPORT_PROBATION
|
||||
RTP_SUPPORT_RANDR = // Not using rand_r
|
||||
RTP_SUPPORT_SDESPRIV = #define RTP_SUPPORT_SDESPRIV
|
||||
RTP_SUPPORT_THREAD = #define RTP_SUPPORT_THREAD
|
||||
SET_MAKE =
|
||||
SHELL = /bin/sh
|
||||
STRIP = strip
|
||||
VERSION = 3.3.0
|
||||
ac_ct_AR = ar
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
ac_ct_F77 =
|
||||
ac_ct_RANLIB = ranlib
|
||||
ac_ct_STRIP = strip
|
||||
ac_pt_PKG_CONFIG = /usr/bin/pkg-config
|
||||
am__fastdepCC_FALSE = #
|
||||
am__fastdepCC_TRUE =
|
||||
am__fastdepCXX_FALSE = #
|
||||
am__fastdepCXX_TRUE =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = ${AMTAR} chof - "$$tardir"
|
||||
am__untar = ${AMTAR} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = i686-pc-linux-gnu
|
||||
build_alias =
|
||||
build_cpu = i686
|
||||
build_os = linux-gnu
|
||||
build_vendor = pc
|
||||
datadir = ${prefix}/share
|
||||
exec_prefix = ${prefix}
|
||||
host = i686-pc-linux-gnu
|
||||
host_alias =
|
||||
host_cpu = i686
|
||||
host_os = linux-gnu
|
||||
host_vendor = pc
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${prefix}/info
|
||||
install_sh = /nfs/temp/jrtplib/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${prefix}/man
|
||||
mkdir_p = mkdir -p --
|
||||
oldincludedir = /usr/include
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
example1_SOURCES = example1.cpp
|
||||
example2_SOURCES = example2.cpp
|
||||
example3_SOURCES = example3.cpp
|
||||
example4_SOURCES = example4.cpp
|
||||
INCLUDES = @RTP_JTHREADINCLUDES@ -I ../src/
|
||||
LDADD = ../src/.libs/libjrtp.a -lpthread
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .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 \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
|
||||
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
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
example1$(EXEEXT): $(example1_OBJECTS) $(example1_DEPENDENCIES)
|
||||
@rm -f example1$(EXEEXT)
|
||||
$(CXXLINK) $(example1_LDFLAGS) $(example1_OBJECTS) $(example1_LDADD) $(LIBS)
|
||||
example2$(EXEEXT): $(example2_OBJECTS) $(example2_DEPENDENCIES)
|
||||
@rm -f example2$(EXEEXT)
|
||||
$(CXXLINK) $(example2_LDFLAGS) $(example2_OBJECTS) $(example2_LDADD) $(LIBS)
|
||||
example3$(EXEEXT): $(example3_OBJECTS) $(example3_DEPENDENCIES)
|
||||
@rm -f example3$(EXEEXT)
|
||||
$(CXXLINK) $(example3_LDFLAGS) $(example3_OBJECTS) $(example3_LDADD) $(LIBS)
|
||||
example4$(EXEEXT): $(example4_OBJECTS) $(example4_DEPENDENCIES)
|
||||
@rm -f example4$(EXEEXT)
|
||||
$(CXXLINK) $(example4_LDFLAGS) $(example4_OBJECTS) $(example4_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include ./$(DEPDIR)/example1.Po
|
||||
include ./$(DEPDIR)/example2.Po
|
||||
include ./$(DEPDIR)/example3.Po
|
||||
include ./$(DEPDIR)/example4.Po
|
||||
|
||||
.cpp.o:
|
||||
if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
|
||||
# $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
|
||||
# $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
|
||||
# $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$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:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
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-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
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-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstPROGRAMS ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-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:
|
10
libs/jrtplib/examples/Makefile.am
Normal file
10
libs/jrtplib/examples/Makefile.am
Normal file
@@ -0,0 +1,10 @@
|
||||
noinst_PROGRAMS = example1 example2 example3 example4
|
||||
|
||||
example1_SOURCES = example1.cpp
|
||||
example2_SOURCES = example2.cpp
|
||||
example3_SOURCES = example3.cpp
|
||||
example4_SOURCES = example4.cpp
|
||||
|
||||
INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ -I ../src/
|
||||
LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@
|
||||
|
474
libs/jrtplib/examples/Makefile.in
Normal file
474
libs/jrtplib/examples/Makefile.in
Normal file
@@ -0,0 +1,474 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
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@
|
||||
noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \
|
||||
example3$(EXEEXT) example4$(EXEEXT)
|
||||
subdir = examples
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_example1_OBJECTS = example1.$(OBJEXT)
|
||||
example1_OBJECTS = $(am_example1_OBJECTS)
|
||||
example1_LDADD = $(LDADD)
|
||||
example1_DEPENDENCIES = ../src/.libs/libjrtp.a
|
||||
am_example2_OBJECTS = example2.$(OBJEXT)
|
||||
example2_OBJECTS = $(am_example2_OBJECTS)
|
||||
example2_LDADD = $(LDADD)
|
||||
example2_DEPENDENCIES = ../src/.libs/libjrtp.a
|
||||
am_example3_OBJECTS = example3.$(OBJEXT)
|
||||
example3_OBJECTS = $(am_example3_OBJECTS)
|
||||
example3_LDADD = $(LDADD)
|
||||
example3_DEPENDENCIES = ../src/.libs/libjrtp.a
|
||||
am_example4_OBJECTS = example4.$(OBJEXT)
|
||||
example4_OBJECTS = $(am_example4_OBJECTS)
|
||||
example4_LDADD = $(LDADD)
|
||||
example4_DEPENDENCIES = ../src/.libs/libjrtp.a
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(example1_SOURCES) $(example2_SOURCES) $(example3_SOURCES) \
|
||||
$(example4_SOURCES)
|
||||
DIST_SOURCES = $(example1_SOURCES) $(example2_SOURCES) \
|
||||
$(example3_SOURCES) $(example4_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GST_CFLAGS = @GST_CFLAGS@
|
||||
GST_LIBS = @GST_LIBS@
|
||||
GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@
|
||||
GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
RANLIB = @RANLIB@
|
||||
RTP_ENDIAN = @RTP_ENDIAN@
|
||||
RTP_FILIO = @RTP_FILIO@
|
||||
RTP_GSTINCLUDES = @RTP_GSTINCLUDES@
|
||||
RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@
|
||||
RTP_LINKLIBS = @RTP_LINKLIBS@
|
||||
RTP_SOCKIO = @RTP_SOCKIO@
|
||||
RTP_SOCKLENTYPE_UINT = @RTP_SOCKLENTYPE_UINT@
|
||||
RTP_SUPPORT_GETLOGINR = @RTP_SUPPORT_GETLOGINR@
|
||||
RTP_SUPPORT_GNUDRAND = @RTP_SUPPORT_GNUDRAND@
|
||||
RTP_SUPPORT_GST = @RTP_SUPPORT_GST@
|
||||
RTP_SUPPORT_IFADDRS = @RTP_SUPPORT_IFADDRS@
|
||||
RTP_SUPPORT_INLINETEMPLATEPARAM = @RTP_SUPPORT_INLINETEMPLATEPARAM@
|
||||
RTP_SUPPORT_IPV4MULTICAST = @RTP_SUPPORT_IPV4MULTICAST@
|
||||
RTP_SUPPORT_IPV6 = @RTP_SUPPORT_IPV6@
|
||||
RTP_SUPPORT_IPV6MULTICAST = @RTP_SUPPORT_IPV6MULTICAST@
|
||||
RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@
|
||||
RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@
|
||||
RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@
|
||||
RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
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@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
example1_SOURCES = example1.cpp
|
||||
example2_SOURCES = example2.cpp
|
||||
example3_SOURCES = example3.cpp
|
||||
example4_SOURCES = example4.cpp
|
||||
INCLUDES = @RTP_JTHREADINCLUDES@ @RTP_GSTINCLUDES@ -I ../src/
|
||||
LDADD = ../src/.libs/libjrtp.a @RTP_LINKLIBS@
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .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 \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
|
||||
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
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
example1$(EXEEXT): $(example1_OBJECTS) $(example1_DEPENDENCIES)
|
||||
@rm -f example1$(EXEEXT)
|
||||
$(CXXLINK) $(example1_LDFLAGS) $(example1_OBJECTS) $(example1_LDADD) $(LIBS)
|
||||
example2$(EXEEXT): $(example2_OBJECTS) $(example2_DEPENDENCIES)
|
||||
@rm -f example2$(EXEEXT)
|
||||
$(CXXLINK) $(example2_LDFLAGS) $(example2_OBJECTS) $(example2_LDADD) $(LIBS)
|
||||
example3$(EXEEXT): $(example3_OBJECTS) $(example3_DEPENDENCIES)
|
||||
@rm -f example3$(EXEEXT)
|
||||
$(CXXLINK) $(example3_LDFLAGS) $(example3_OBJECTS) $(example3_LDADD) $(LIBS)
|
||||
example4$(EXEEXT): $(example4_OBJECTS) $(example4_DEPENDENCIES)
|
||||
@rm -f example4$(EXEEXT)
|
||||
$(CXXLINK) $(example4_LDFLAGS) $(example4_OBJECTS) $(example4_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example2.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example3.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example4.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$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:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
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-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
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-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstPROGRAMS ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-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:
|
149
libs/jrtplib/examples/example1.cpp
Normal file
149
libs/jrtplib/examples/example1.cpp
Normal file
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
Here's a small IPv4 example: it asks for a portbase and a destination and
|
||||
starts sending packets to that destination.
|
||||
*/
|
||||
|
||||
#include "rtpsession.h"
|
||||
#include "rtppacket.h"
|
||||
#include "rtpudpv4transmitter.h"
|
||||
#include "rtpipv4address.h"
|
||||
#include "rtpsessionparams.h"
|
||||
#include "rtperrors.h"
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#endif // WIN32
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
//
|
||||
// This function checks if there was a RTP error. If so, it displays an error
|
||||
// message and exists.
|
||||
//
|
||||
|
||||
void checkerror(int rtperr)
|
||||
{
|
||||
if (rtperr < 0)
|
||||
{
|
||||
std::cout << "ERROR: " << RTPGetErrorString(rtperr) << std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// The main routine
|
||||
//
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
WSADATA dat;
|
||||
WSAStartup(MAKEWORD(2,2),&dat);
|
||||
#endif // WIN32
|
||||
|
||||
RTPSession sess;
|
||||
u_int16_t portbase,destport;
|
||||
u_int32_t destip;
|
||||
std::string ipstr;
|
||||
int status,i,num;
|
||||
|
||||
// First, we'll ask for the necessary information
|
||||
|
||||
std::cout << "Enter local portbase:" << std::endl;
|
||||
std::cin >> portbase;
|
||||
std::cout << std::endl;
|
||||
|
||||
std::cout << "Enter the destination IP address" << std::endl;
|
||||
std::cin >> ipstr;
|
||||
destip = inet_addr(ipstr.c_str());
|
||||
if (destip == INADDR_NONE)
|
||||
{
|
||||
std::cerr << "Bad IP address specified" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// The inet_addr function returns a value in network byte order, but
|
||||
// we need the IP address in host byte order, so we use a call to
|
||||
// ntohl
|
||||
destip = ntohl(destip);
|
||||
|
||||
std::cout << "Enter the destination port" << std::endl;
|
||||
std::cin >> destport;
|
||||
|
||||
std::cout << std::endl;
|
||||
std::cout << "Number of packets you wish to be sent:" << std::endl;
|
||||
std::cin >> num;
|
||||
|
||||
// Now, we'll create a RTP session, set the destination, send some
|
||||
// packets and poll for incoming data.
|
||||
|
||||
RTPUDPv4TransmissionParams transparams;
|
||||
RTPSessionParams sessparams;
|
||||
|
||||
// IMPORTANT: The local timestamp unit MUST be set, otherwise
|
||||
// RTCP Sender Report info will be calculated wrong
|
||||
// In this case, we'll be sending 10 samples each second, so we'll
|
||||
// put the timestamp unit to (1.0/10.0)
|
||||
sessparams.SetOwnTimestampUnit(1.0/10.0);
|
||||
|
||||
sessparams.SetAcceptOwnPackets(true);
|
||||
transparams.SetPortbase(portbase);
|
||||
status = sess.Create(sessparams,&transparams);
|
||||
checkerror(status);
|
||||
|
||||
RTPIPv4Address addr(destip,destport);
|
||||
|
||||
status = sess.AddDestination(addr);
|
||||
checkerror(status);
|
||||
|
||||
for (i = 1 ; i <= num ; i++)
|
||||
{
|
||||
printf("\nSending packet %d/%d\n",i,num);
|
||||
|
||||
// send the packet
|
||||
status = sess.SendPacket((void *)"1234567890",10,0,false,10);
|
||||
checkerror(status);
|
||||
|
||||
sess.BeginDataAccess();
|
||||
|
||||
// check incoming packets
|
||||
if (sess.GotoFirstSourceWithData())
|
||||
{
|
||||
do
|
||||
{
|
||||
RTPPacket *pack;
|
||||
|
||||
while ((pack = sess.GetNextPacket()) != NULL)
|
||||
{
|
||||
// You can examine the data here
|
||||
printf("Got packet !\n");
|
||||
|
||||
// we don't longer need the packet, so
|
||||
// we'll delete it
|
||||
delete pack;
|
||||
}
|
||||
} while (sess.GotoNextSourceWithData());
|
||||
}
|
||||
|
||||
sess.EndDataAccess();
|
||||
|
||||
#ifndef RTP_SUPPORT_THREAD
|
||||
status = sess.Poll();
|
||||
checkerror(status);
|
||||
#endif // RTP_SUPPORT_THREAD
|
||||
|
||||
RTPTime::Wait(RTPTime(1,0));
|
||||
}
|
||||
|
||||
sess.BYEDestroy(RTPTime(10,0),0,0);
|
||||
|
||||
#ifdef WIN32
|
||||
WSACleanup();
|
||||
#endif // WIN32
|
||||
return 0;
|
||||
}
|
||||
|
98
libs/jrtplib/examples/example2.cpp
Normal file
98
libs/jrtplib/examples/example2.cpp
Normal file
@@ -0,0 +1,98 @@
|
||||
#include "rtpsession.h"
|
||||
#include "rtpsessionparams.h"
|
||||
#include "rtpudpv4transmitter.h"
|
||||
#include "rtpipv4address.h"
|
||||
#include "rtptimeutilities.h"
|
||||
#include "rtppacket.h"
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
WSADATA dat;
|
||||
WSAStartup(MAKEWORD(2,2),&dat);
|
||||
#endif // WIN32
|
||||
|
||||
RTPSession session;
|
||||
|
||||
RTPSessionParams sessionparams;
|
||||
sessionparams.SetOwnTimestampUnit(1.0/8000.0);
|
||||
|
||||
RTPUDPv4TransmissionParams transparams;
|
||||
transparams.SetPortbase(8000);
|
||||
|
||||
int status = session.Create(sessionparams,&transparams);
|
||||
if (status < 0)
|
||||
{
|
||||
std::cerr << RTPGetErrorString(status) << std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
u_int8_t localip[]={127,0,0,1};
|
||||
RTPIPv4Address addr(localip,9000);
|
||||
|
||||
status = session.AddDestination(addr);
|
||||
if (status < 0)
|
||||
{
|
||||
std::cerr << RTPGetErrorString(status) << std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
session.SetDefaultPayloadType(96);
|
||||
session.SetDefaultMark(false);
|
||||
session.SetDefaultTimestampIncrement(160);
|
||||
|
||||
u_int8_t silencebuffer[160];
|
||||
for (int i = 0 ; i < 160 ; i++)
|
||||
silencebuffer[i] = 128;
|
||||
|
||||
RTPTime delay(0.020);
|
||||
RTPTime starttime = RTPTime::CurrentTime();
|
||||
|
||||
bool done = false;
|
||||
while (!done)
|
||||
{
|
||||
status = session.SendPacket(silencebuffer,160);
|
||||
if (status < 0)
|
||||
{
|
||||
std::cerr << RTPGetErrorString(status) << std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
session.BeginDataAccess();
|
||||
if (session.GotoFirstSource())
|
||||
{
|
||||
do
|
||||
{
|
||||
RTPPacket *packet = session.GetNextPacket();
|
||||
if (packet)
|
||||
{
|
||||
std::cout << "Got packet with "
|
||||
<< "extended sequence number "
|
||||
<< packet->GetExtendedSequenceNumber()
|
||||
<< " from SSRC " << packet->GetSSRC()
|
||||
<< std::endl;
|
||||
delete packet;
|
||||
}
|
||||
} while (session.GotoNextSource());
|
||||
}
|
||||
session.EndDataAccess();
|
||||
|
||||
RTPTime::Wait(delay);
|
||||
|
||||
RTPTime t = RTPTime::CurrentTime();
|
||||
t -= starttime;
|
||||
if (t > RTPTime(60.0))
|
||||
done = true;
|
||||
}
|
||||
|
||||
delay = RTPTime(10.0);
|
||||
session.BYEDestroy(delay,"Time's up",9);
|
||||
|
||||
#ifdef WIN32
|
||||
WSACleanup();
|
||||
#endif // WIN32
|
||||
return 0;
|
||||
}
|
||||
|
224
libs/jrtplib/examples/example3.cpp
Normal file
224
libs/jrtplib/examples/example3.cpp
Normal file
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
This IPv4 example listens for incoming packets and automatically adds destinations
|
||||
for new sources.
|
||||
*/
|
||||
|
||||
#include "rtpsession.h"
|
||||
#include "rtppacket.h"
|
||||
#include "rtpudpv4transmitter.h"
|
||||
#include "rtpipv4address.h"
|
||||
#include "rtpsessionparams.h"
|
||||
#include "rtperrors.h"
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#endif // WIN32
|
||||
#include "rtpsourcedata.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
//
|
||||
// This function checks if there was a RTP error. If so, it displays an error
|
||||
// message and exists.
|
||||
//
|
||||
|
||||
void checkerror(int rtperr)
|
||||
{
|
||||
if (rtperr < 0)
|
||||
{
|
||||
std::cout << "ERROR: " << RTPGetErrorString(rtperr) << std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// The new class routine
|
||||
//
|
||||
|
||||
class MyRTPSession : public RTPSession
|
||||
{
|
||||
protected:
|
||||
void OnNewSource(RTPSourceData *dat)
|
||||
{
|
||||
if (dat->IsOwnSSRC())
|
||||
return;
|
||||
|
||||
u_int32_t ip;
|
||||
u_int16_t port;
|
||||
|
||||
if (dat->GetRTPDataAddress() != 0)
|
||||
{
|
||||
const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress());
|
||||
ip = addr->GetIP();
|
||||
port = addr->GetPort();
|
||||
}
|
||||
else if (dat->GetRTCPDataAddress() != 0)
|
||||
{
|
||||
const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress());
|
||||
ip = addr->GetIP();
|
||||
port = addr->GetPort()-1;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
RTPIPv4Address dest(ip,port);
|
||||
AddDestination(dest);
|
||||
|
||||
struct in_addr inaddr;
|
||||
inaddr.s_addr = htonl(ip);
|
||||
std::cout << "Adding destination " << std::string(inet_ntoa(inaddr)) << ":" << port << std::endl;
|
||||
}
|
||||
|
||||
void OnBYEPacket(RTPSourceData *dat)
|
||||
{
|
||||
if (dat->IsOwnSSRC())
|
||||
return;
|
||||
|
||||
u_int32_t ip;
|
||||
u_int16_t port;
|
||||
|
||||
if (dat->GetRTPDataAddress() != 0)
|
||||
{
|
||||
const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress());
|
||||
ip = addr->GetIP();
|
||||
port = addr->GetPort();
|
||||
}
|
||||
else if (dat->GetRTCPDataAddress() != 0)
|
||||
{
|
||||
const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress());
|
||||
ip = addr->GetIP();
|
||||
port = addr->GetPort()-1;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
RTPIPv4Address dest(ip,port);
|
||||
DeleteDestination(dest);
|
||||
|
||||
struct in_addr inaddr;
|
||||
inaddr.s_addr = htonl(ip);
|
||||
std::cout << "Deleting destination " << std::string(inet_ntoa(inaddr)) << ":" << port << std::endl;
|
||||
}
|
||||
|
||||
void OnRemoveSource(RTPSourceData *dat)
|
||||
{
|
||||
if (dat->IsOwnSSRC())
|
||||
return;
|
||||
if (dat->ReceivedBYE())
|
||||
return;
|
||||
|
||||
u_int32_t ip;
|
||||
u_int16_t port;
|
||||
|
||||
if (dat->GetRTPDataAddress() != 0)
|
||||
{
|
||||
const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress());
|
||||
ip = addr->GetIP();
|
||||
port = addr->GetPort();
|
||||
}
|
||||
else if (dat->GetRTCPDataAddress() != 0)
|
||||
{
|
||||
const RTPIPv4Address *addr = (const RTPIPv4Address *)(dat->GetRTPDataAddress());
|
||||
ip = addr->GetIP();
|
||||
port = addr->GetPort()-1;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
RTPIPv4Address dest(ip,port);
|
||||
DeleteDestination(dest);
|
||||
|
||||
struct in_addr inaddr;
|
||||
inaddr.s_addr = htonl(ip);
|
||||
std::cout << "Deleting destination " << std::string(inet_ntoa(inaddr)) << ":" << port << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// The main routine
|
||||
//
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
WSADATA dat;
|
||||
WSAStartup(MAKEWORD(2,2),&dat);
|
||||
#endif // WIN32
|
||||
|
||||
MyRTPSession sess;
|
||||
u_int16_t portbase,destport;
|
||||
u_int32_t destip;
|
||||
std::string ipstr;
|
||||
int status,i,num;
|
||||
|
||||
// First, we'll ask for the necessary information
|
||||
|
||||
std::cout << "Enter local portbase:" << std::endl;
|
||||
std::cin >> portbase;
|
||||
std::cout << std::endl;
|
||||
|
||||
std::cout << std::endl;
|
||||
std::cout << "Number of seconds you wish to wait:" << std::endl;
|
||||
std::cin >> num;
|
||||
|
||||
// Now, we'll create a RTP session, set the destination
|
||||
// and poll for incoming data.
|
||||
|
||||
RTPUDPv4TransmissionParams transparams;
|
||||
RTPSessionParams sessparams;
|
||||
|
||||
// IMPORTANT: The local timestamp unit MUST be set, otherwise
|
||||
// RTCP Sender Report info will be calculated wrong
|
||||
// In this case, we'll be just use 8000 samples per second.
|
||||
sessparams.SetOwnTimestampUnit(1.0/8000.0);
|
||||
|
||||
sessparams.SetAcceptOwnPackets(true);
|
||||
transparams.SetPortbase(portbase);
|
||||
status = sess.Create(sessparams,&transparams);
|
||||
checkerror(status);
|
||||
|
||||
for (i = 1 ; i <= num ; i++)
|
||||
{
|
||||
sess.BeginDataAccess();
|
||||
|
||||
// check incoming packets
|
||||
if (sess.GotoFirstSourceWithData())
|
||||
{
|
||||
do
|
||||
{
|
||||
RTPPacket *pack;
|
||||
|
||||
while ((pack = sess.GetNextPacket()) != NULL)
|
||||
{
|
||||
// You can examine the data here
|
||||
printf("Got packet !\n");
|
||||
|
||||
// we don't longer need the packet, so
|
||||
// we'll delete it
|
||||
delete pack;
|
||||
}
|
||||
} while (sess.GotoNextSourceWithData());
|
||||
}
|
||||
|
||||
sess.EndDataAccess();
|
||||
|
||||
#ifndef RTP_SUPPORT_THREAD
|
||||
status = sess.Poll();
|
||||
checkerror(status);
|
||||
#endif // RTP_SUPPORT_THREAD
|
||||
|
||||
RTPTime::Wait(RTPTime(1,0));
|
||||
}
|
||||
|
||||
sess.BYEDestroy(RTPTime(10,0),0,0);
|
||||
|
||||
#ifdef WIN32
|
||||
WSACleanup();
|
||||
#endif // WIN32
|
||||
return 0;
|
||||
}
|
||||
|
145
libs/jrtplib/examples/example4.cpp
Normal file
145
libs/jrtplib/examples/example4.cpp
Normal file
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
This IPv4 example uses the background thread itself to process all packets.
|
||||
You can use example one to send data to the session that's created in this
|
||||
example.
|
||||
*/
|
||||
|
||||
#include "rtpsession.h"
|
||||
#include "rtppacket.h"
|
||||
#include "rtpudpv4transmitter.h"
|
||||
#include "rtpipv4address.h"
|
||||
#include "rtpsessionparams.h"
|
||||
#include "rtperrors.h"
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#endif // WIN32
|
||||
#include "rtpsourcedata.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#ifdef RTP_SUPPORT_THREAD
|
||||
|
||||
//
|
||||
// This function checks if there was a RTP error. If so, it displays an error
|
||||
// message and exists.
|
||||
//
|
||||
|
||||
void checkerror(int rtperr)
|
||||
{
|
||||
if (rtperr < 0)
|
||||
{
|
||||
std::cout << "ERROR: " << RTPGetErrorString(rtperr) << std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// The new class routine
|
||||
//
|
||||
|
||||
class MyRTPSession : public RTPSession
|
||||
{
|
||||
protected:
|
||||
void OnPollThreadStep();
|
||||
void ProcessRTPPacket(const RTPSourceData &srcdat,const RTPPacket &rtppack);
|
||||
};
|
||||
|
||||
void MyRTPSession::OnPollThreadStep()
|
||||
{
|
||||
BeginDataAccess();
|
||||
|
||||
// check incoming packets
|
||||
if (GotoFirstSourceWithData())
|
||||
{
|
||||
do
|
||||
{
|
||||
RTPPacket *pack;
|
||||
RTPSourceData *srcdat;
|
||||
|
||||
srcdat = GetCurrentSourceInfo();
|
||||
|
||||
while ((pack = GetNextPacket()) != NULL)
|
||||
{
|
||||
ProcessRTPPacket(*srcdat,*pack);
|
||||
delete pack;
|
||||
}
|
||||
} while (GotoNextSourceWithData());
|
||||
}
|
||||
|
||||
EndDataAccess();
|
||||
}
|
||||
|
||||
void MyRTPSession::ProcessRTPPacket(const RTPSourceData &srcdat,const RTPPacket &rtppack)
|
||||
{
|
||||
// You can inspect the packet and the source's info here
|
||||
std::cout << "Got packet " << rtppack.GetExtendedSequenceNumber() << " from SSRC " << srcdat.GetSSRC() << std::endl;
|
||||
}
|
||||
|
||||
//
|
||||
// The main routine
|
||||
//
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
WSADATA dat;
|
||||
WSAStartup(MAKEWORD(2,2),&dat);
|
||||
#endif // WIN32
|
||||
|
||||
MyRTPSession sess;
|
||||
u_int16_t portbase,destport;
|
||||
u_int32_t destip;
|
||||
std::string ipstr;
|
||||
int status,i,num;
|
||||
|
||||
// First, we'll ask for the necessary information
|
||||
|
||||
std::cout << "Enter local portbase:" << std::endl;
|
||||
std::cin >> portbase;
|
||||
std::cout << std::endl;
|
||||
|
||||
std::cout << std::endl;
|
||||
std::cout << "Number of seconds you wish to wait:" << std::endl;
|
||||
std::cin >> num;
|
||||
|
||||
// Now, we'll create a RTP session, set the destination
|
||||
// and poll for incoming data.
|
||||
|
||||
RTPUDPv4TransmissionParams transparams;
|
||||
RTPSessionParams sessparams;
|
||||
|
||||
// IMPORTANT: The local timestamp unit MUST be set, otherwise
|
||||
// RTCP Sender Report info will be calculated wrong
|
||||
// In this case, we'll be just use 8000 samples per second.
|
||||
sessparams.SetOwnTimestampUnit(1.0/8000.0);
|
||||
|
||||
transparams.SetPortbase(portbase);
|
||||
status = sess.Create(sessparams,&transparams);
|
||||
checkerror(status);
|
||||
|
||||
// Wait a number of seconds
|
||||
RTPTime::Wait(RTPTime(num,0));
|
||||
|
||||
sess.BYEDestroy(RTPTime(10,0),0,0);
|
||||
|
||||
#ifdef WIN32
|
||||
WSACleanup();
|
||||
#endif // WIN32
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int main(void)
|
||||
{
|
||||
std::cerr << "Thread support is required for this example" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // RTP_SUPPORT_THREAD
|
||||
|
Reference in New Issue
Block a user