diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | doc/Makefile.in | 333 | ||||
-rw-r--r-- | doc/jrtplib.css | 315 | ||||
-rw-r--r-- | doc/jrtplib.h | 347 |
4 files changed, 997 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..d14421e --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,2 @@ +EXTRA_DIST = jrtplib.h jrtplib.css + diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..5dd87a7 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,333 @@ +# 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@ +subdir = doc +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 = +SOURCES = +DIST_SOURCES = +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@ +GREP = @GREP@ +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@ +RANLIB = @RANLIB@ +RTP_ENDIAN = @RTP_ENDIAN@ +RTP_FILIO = @RTP_FILIO@ +RTP_HAVE_SOCKADDR_LEN = @RTP_HAVE_SOCKADDR_LEN@ +RTP_JTHREADINCLUDES = @RTP_JTHREADINCLUDES@ +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_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_MEMORYMANAGEMENT = @RTP_SUPPORT_MEMORYMANAGEMENT@ +RTP_SUPPORT_PROBATION = @RTP_SUPPORT_PROBATION@ +RTP_SUPPORT_RANDR = @RTP_SUPPORT_RANDR@ +RTP_SUPPORT_SDESPRIV = @RTP_SUPPORT_SDESPRIV@ +RTP_SUPPORT_SENDAPP = @RTP_SUPPORT_SENDAPP@ +RTP_SUPPORT_THREAD = @RTP_SUPPORT_THREAD@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +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@ +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@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +EXTRA_DIST = jrtplib.h jrtplib.css +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/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 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +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 +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 mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +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 -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-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-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: diff --git a/doc/jrtplib.css b/doc/jrtplib.css new file mode 100644 index 0000000..87d29e7 --- /dev/null +++ b/doc/jrtplib.css @@ -0,0 +1,315 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; + text-align: justify; +} + +H1 { + text-align: center; + font-size: 240%; +} +H2 { + font-size: 180%; +} +H3 { + font-size: 120%; +} +H4 { + font-size: 100%; +} +CAPTION { font-weight: bold } +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.nav { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} +A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} +A.codeRef:link { font-weight: normal; color: #0000FF} +A.codeRef:visited { font-weight: normal; color: #0000FF} +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +.fragment { + font-family: Fixed, monospace; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } +TD.md { background-color: #F4F4FB; font-weight: bold; } +TD.mdPrefix { + background-color: #F4F4FB; + color: #606060; + font-size: 80%; +} +TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; } +TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; } +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdTable { + border: 1px solid #868686; + background-color: #F4F4FB; +} +.mdRow { + padding: 8px 10px; +} +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { background: #e8eef2; + font-weight: bold; +} +HR { height: 1px; + border: none; + border-top: 1px solid black; +} + diff --git a/doc/jrtplib.h b/doc/jrtplib.h new file mode 100644 index 0000000..ebce471 --- /dev/null +++ b/doc/jrtplib.h @@ -0,0 +1,347 @@ +/**\mainpage JRTPLIB + * + * \author Jori Liesenborgs + * \author Developed at the The Expertise Centre for Digital Media (EDM), a research + * institute of the Hasselt University + * + * \section ack Acknowledgment + * + * I would like thank the people at the Expertise Centre for Digital Media + * for giving me the opportunity to create this rewrite of the library. + * + * \section intro Introduction + * + * This document describes JRTPLIB, an object-oriented + * library written in C++ which aims to help developers in using the + * Real-time Transport Protocol (RTP) as described in RFC 3550. + * + * The library makes it possible for the user to send and receive data + * using RTP, without worrying about SSRC collisions, scheduling and + * transmitting RTCP data etc. The user only needs to provide the library + * with the payload data to be sent and the library gives the user access + * to incoming RTP and RTCP data. + * + * \subsection idea Design idea + * + * The library provides several classes which can be helpful in + * creating RTP applications. Most users will probably need just the + * RTPSession class for building an application. This class + * provides the necessary functions for sending RTP data and handles + * the RTCP part internally. + * + * \subsection changes Changes from version 2.x + * + * One of the most important changes is probably the fact that this + * version is based on RFC 3550 and the 2.x versions were based upon + * RFC 1889 which is now obsolete. + * + * Also, the 2.x series was created with the idea that the user would + * only need to use the RTPSession class which meant that the + * other classes were not very useful by themselves. This version on + * the other hand, aims to provide many useful components to aid the + * user in building RTP capable applications. + * + * In this version, the code which is specific for the underlying + * protocol by which RTP packets are transported, is bundled in + * a class which inherits its interface from a class called + * RTPTransmitter. This makes it easy for different underlying + * protocols to be supported. Currently there is support for UDP over + * IPv4 and UDP over IPv6. + * + * For applications such as a mixer or translator using the + * RTPSession class will not be a good solution. Other components can + * be used for this purpose: a transmission component, an SSRC table, + * an RTCP scheduler etc. Using these, it should be much easier to + * build all kinds of applications. + * \section copyright Copyright license + * + * The library code uses the following copyright license: + * + * \code + * 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 AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * \endcode + * + * There are two reasons for using this license. First, since this is the + * license of the 2.x series, it only seemed natural that this rewrite + * would contain the same license. Second, since the RTP protocol is + * deliberately incomplete RTP profiles can, for example, define additional + * header fields. The best way to deal with this is to adapt the library + * code itself and that's why I like to keep the license as free as + * possible. + * + * \section starting Getting started with the RTPSession class + * + * To use RTP, you'll have to create an RTPSession object. The constructor + * accepts one parameter, an instance of RTPMemoryManager. By default, no + * memory manager will be used. For now, we'll keep it simple, so this is + * our code so far: + * + * \code + * RTPSession session; + * \endcode + * + * To actually create the session, you'll have to call the Create member + * function which takes three arguments: the first one is of type RTPSessionParams + * and specifies the general options for the session. One parameter of this class + * must be set explicitly, otherwise the session will not be created successfully. + * This parameter is the timestamp unit of the data you intend to send and + * can be calculated by dividing a certain time interval (in seconds) by the + * number of samples in that interval. So, assuming that we'll send 8000 Hz + * voice data, we can use this code: + * + * \code + * RTPSessionParams sessionparams; + * + * sessionparams.SetOwnTimestampUnit(1.0/8000.0); + * \endcode + * + * The other session parameters will probably depend on the actual RTP profile + * you intend to work with. + * + * The second argument of the Create function is a pointer to an RTPTransmissionParams + * instance and describes the parameters for the transmission component. The third + * parameter selects the type of transmission component which will be used. By default, + * an UDP over IPv4 transmitter is used, and for this particular transmitter, the + * transmission parameters should be of type RTPUDPv4TransmissionParams. Assuming + * that we want our RTP portbase to be 8000, we can do the following: + * + * \code + * RTPUDPv4TransmissionParams transparams; + * + * transparams.SetPortbase(8000); + * \endcode + * + * Now, we're ready to call the Create member function of RTPSession. The return + * value is stored in the integer \c status so we can check if something went + * wrong. If this value is negative, it indicates that some error occurred. + * A description of what this error code means can be retrieved by calling + * RTPGetErrorString: + * + * \code + * int status = session.Create(sessionparams,&transparams); + * if (status < 0) + * { + * std::cerr << RTPGetErrorString(status) << std::endl; + * exit(-1); + * } + * \endcode + * + * If the session was created with success, this is probably a good point + * to specify to which destinations RTP and RTCP data should be sent. This is + * done by a call to the RTPSession member function AddDestination. This + * function takes an argument of type RTPAddress. This is an abstract + * class and for the UDP over IPv4 transmitter the actual class to be + * used is RTPIPv4Address. Suppose that we want to send our data to a + * process running on the same host at port 9000, we can do the following: + * + * \code + * uint8_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); + * } + * \endcode + * + * If the library was compiled with JThread support, incoming data is + * processed in the background. If JThread support was not enabled at + * compile time or if you specified in the session parameters that no + * poll thread should be used, you'll have to call the RTPSession + * member function Poll regularly to process incoming data and to send + * RTCP data when necessary. For now, let's assume that we're working + * with the poll thread enabled. + * + * Lets suppose that for a duration of one minute, we want to send + * packets containing 20 ms (or 160 samples) of silence and we want + * to indicate when a packet from someone else has been received. Also + * suppose we have L8 data as defined in RFC 3551 and want to use + * payload type 96. First, we'll set some default values: + * + * \code + * session.SetDefaultPayloadType(96); + * session.SetDefaultMark(false); + * session.SetDefaultTimestampIncrement(160); + * \endcode + * + * Next, we'll create the buffer which contains 160 silence samples + * and create an RTPTime instance which indicates 20 ms or 0.020 seconds. + * We'll also store the current time so we'll know when one minute has + * passed. + * + * \code + * uint8_t silencebuffer[160]; + * + * for (int i = 0 ; i < 160 ; i++) + * silencebuffer[i] = 128; + * + * RTPTime delay(0.020); + * RTPTime starttime = RTPTime::CurrentTime(); + * \endcode + * + * Next, the main loop will be shown. In this loop, a packet containing + * 160 bytes of payload data will be sent. Then, data handling can + * take place but this part is described later in the text. Finally, + * we'll wait 20 ms and check if sixty seconds have passed: + * + * \code + * bool done = false; + * while (!done) + * { + * status = session.SendPacket(silencebuffer,160); + * if (status < 0) + * { + * std::cerr << RTPGetErrorString(status) << std::endl; + * exit(-1); + * } + * + * // + * // Inspect incoming data here + * // + * + * RTPTime::Wait(delay); + * + * RTPTime t = RTPTime::CurrentTime(); + * t -= starttime; + * if (t > RTPTime(60.0)) + * done = true; + * } + * \endcode + * + * Information about participants in the session, packet retrieval + * etc, has to be done between calls to the RTPSession member + * functions BeginDataAccess and EndDataAccess. This ensures that the + * background thread doesn't try to change the same data you're trying + * to access. We'll iterate over the participants using the + * GotoFirstSource and GotoNextSource member functions. Packets from + * the currently selected participant can be retrieved using the + * GetNextPacket member function which returns a pointer to an + * instance of the RTPPacket class. When you don't need the packet + * anymore, it has to be deleted. The processing of incoming data will + * then be as follows: + * + * \code + * session.BeginDataAccess(); + * if (session.GotoFirstSource()) + * { + * do + * { + * RTPPacket *packet; + * while ((packet = session.GetNextPacket()) != 0) + * { + * std::cout << "Got packet with extended sequence number " + * << packet->GetExtendedSequenceNumber() + * << " from SSRC " << packet->GetSSRC() + * << std::endl; + * session.DeletePacket(packet); + * } + * } while (session.GotoNextSource()); + * } + * session.EndDataAccess(); + * \endcode + * + * Information about the currently selected source can be obtained + * by using the GetCurrentSourceInfo member function of the RTPSession class. + * This function returns a pointer to an instance of RTPSourceData which + * contains all information about that source: sender reports from that + * source, receiver reports, SDES info etc. + * + * When the main loop is finished, we'll send a BYE packet to inform other + * participants of our departure and clean up the RTPSession class. Also, + * we want to wait at most 10 seconds for the BYE packet to be sent, + * otherwise we'll just leave the session without sending a BYE packet. + * + * \code + * delay = RTPTime(10.0); + * session.BYEDestroy(delay,"Time's up",9); + * \endcode + * + * The complete code of the program is given in \c example2.cpp. + * + * \section errors Error codes + * + * Unless specified otherwise, functions with a return type \c int + * will return a negative value when an error occurred and zero or a + * positive value upon success. A description of the error code can + * be obtained by using the RTPGetErrorString function, declared + * in rtperrors.h + * + * \section memory Memory management + * + * You can write you own memory manager by deriving a class from RTPMemoryManager. + * The following example shows a very basic implementation. + * + * \code + * class MyMemoryManager : public RTPMemoryManager + * { + * public: + * MyMemoryManager() { } + * ~MyMemoryManager() { } + * + * void *AllocateBuffer(size_t numbytes, int memtype) + * { + * return malloc(numbytes); + * } + * + * void FreeBuffer(void *p) + * { + * free(p); + * } + * }; + * \endcode + * + * In the constructor of RTPSession, you can specify that you would like to use + * this memory manager: + * + * \code + * MyMemoryManager mgr; + * RTPSession session(&mgr); + * \endcode + * + * Now, all memory allocation and deallocation will be done using the AllocateBuffer + * and FreeBuffer implementations of \c mgr. + * + * The second parameter of the RTPMemoryManager::AllocateBuffer member function + * indicates what the purpose is of this memory block. This allows you to handle + * different kinds of data in different ways. + * + * With the introduction of the memory management system, the RTPSession class was + * extended with member function RTPSession::DeletePacket and RTPSession::DeleteTransmissionInfo. + * These functions should be used to deallocate RTPPacket instances and RTPTransmissionInfo + * instances respectively. + * + * \section contact Contact + * + * If you have any questions, remarks or requests about the library or + * if you think you've discovered a bug, you can contact me at + * \c jori(\c dot)\c liesenborgs(\c at)\c gmail(\c dot)\c com + * + * The home page of the library is + * http://research.edm.uhasselt.be/jori/jrtplib/jrtplib.html + * + * There is also a mailing list for the library. To subscribe to the list, + * send an e-mail with the text \c subscribe \c jrtplib as the message body + * (not the subject) to \c majordomo(\c at)\c edm(\c dot)\c uhasselt(\c dot)\c be + * and you'll receive further instructions. + */ + |