Index: /pjproject/trunk/Makefile
===================================================================
--- /pjproject/trunk/Makefile	(revision 2036)
+++ /pjproject/trunk/Makefile	(revision 2037)
@@ -8,5 +8,5 @@
 endif
 
-all clean dep depend distclean doc print realclean:
+all clean dep depend distclean print realclean:
 	for dir in $(DIRS); do \
 		if $(MAKE) $(MAKE_FLAGS) -C $$dir/build $@; then \
@@ -17,4 +17,17 @@
 	done
 
+doc:
+	@if test \( ! "$(WWWDIR)" == "" \) -a \( ! -d $(WWWDIR)/pjlib/docs/html \) ; then \
+		echo 'Directory "$(WWWDIR)" does not look like a valid pjsip web directory'; \
+		exit 1; \
+	fi
+	for dir in $(DIRS); do \
+		if $(MAKE) $(MAKE_FLAGS) -C $$dir/build $@; then \
+		    true; \
+		else \
+		    exit 1; \
+		fi; \
+	done
+	
 LIBS = 	pjlib/lib/libpj-$(TARGET_NAME).a \
 	pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \
Index: /pjproject/trunk/pjlib-util/build/Makefile
===================================================================
--- /pjproject/trunk/pjlib-util/build/Makefile	(revision 2036)
+++ /pjproject/trunk/pjlib-util/build/Makefile	(revision 2037)
@@ -55,5 +55,9 @@
 
 doc:
-	cd .. && doxygen docs/doxygen.cfg
+	cd .. && rm -rf docs/html docs/latex && doxygen docs/doxygen.cfg
+	@if test ! "$(WWWDIR)" == ""; then \
+		echo "Copying to $(WWWDIR)/pjlib-util/docs/html.." ; \
+		cp -a ../docs/html/* $(WWWDIR)/pjlib-util/docs/html/ ; \
+	fi
 
 dep: depend
Index: /pjproject/trunk/pjlib-util/docs/doxygen.cfg
===================================================================
--- /pjproject/trunk/pjlib-util/docs/doxygen.cfg	(revision 2036)
+++ /pjproject/trunk/pjlib-util/docs/doxygen.cfg	(revision 2037)
@@ -295,4 +295,5 @@
 
 SHOW_USED_FILES        = YES
+TYPEDEF_HIDES_STRUCT	= YES
 
 #---------------------------------------------------------------------------
@@ -875,10 +876,10 @@
 # The TAGFILES tag can be used to specify one or more tagfiles.
 
-TAGFILES               = 
+TAGFILES               = ../pjlib/docs/pjlib.tag=../../../pjlib/docs/html ../pjnath/docs/pjnath.tag=../../../pjnath/docs/html ../pjsip/docs/pjsip.tag=../../../pjsip/docs/html ../pjmedia/docs/pjmedia.tag=../../../pjmedia/docs/html
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create 
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       = docs/pjlib-util.tag
 
 # If the ALLEXTERNALS tag is set to YES all external classes will be listed 
@@ -892,10 +893,11 @@
 # be listed.
 
-EXTERNAL_GROUPS        = YES
+EXTERNAL_GROUPS        = NO
 
 # The PERL_PATH should be the absolute path and name of the perl script 
 # interpreter (i.e. the result of `which perl').
 
-PERL_PATH              = /usr/bin/perl
+#PERL_PATH              = /usr/bin/perl
+PERL_PATH              = /c/Perl/bin/perl
 
 #---------------------------------------------------------------------------
Index: /pjproject/trunk/pjlib-util/docs/footer.html
===================================================================
--- /pjproject/trunk/pjlib-util/docs/footer.html	(revision 2036)
+++ /pjproject/trunk/pjlib-util/docs/footer.html	(revision 2037)
@@ -2,5 +2,5 @@
 <hr><center>
 PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library<br>
-(C)2001-2007 Benny Prijono
+(C)2001-2008 Benny Prijono
 </center>
 
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/config.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/config.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/config.h	(revision 2037)
@@ -27,6 +27,6 @@
 
 /**
- * @defgroup PJLIB_UTIL_CONFIG PJLIB-UTIL Configuration
- * @ingroup PJLIB_UTIL
+ * @defgroup PJLIB_UTIL_CONFIG Configuration
+ * @ingroup PJLIB_UTIL_BASE
  * @{
  */
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/dns.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/dns.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/dns.h	(revision 2037)
@@ -32,5 +32,5 @@
 /**
  * @defgroup PJ_DNS DNS and Asynchronous DNS Resolver
- * @ingroup PJLIB_UTIL
+ * @ingroup PJ_PROTOCOLS
  */
 
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/dns_server.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/dns_server.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/dns_server.h	(revision 2037)
@@ -31,5 +31,5 @@
 /**
  * @defgroup PJ_DNS_SERVER Simple DNS Server
- * @ingroup PJLIB_UTIL
+ * @ingroup PJ_DNS
  * @{
  * This contains a simple but fully working DNS server implementation, 
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/errno.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/errno.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/errno.h	(revision 2037)
@@ -24,6 +24,6 @@
 
 /**
- * @defgroup PJLIB_UTIL_ERROR PJLIB-UTIL Error Codes
- * @ingroup PJLIB_UTIL
+ * @defgroup PJLIB_UTIL_ERROR Error Codes
+ * @ingroup PJLIB_UTIL_BASE
  * @{
  */
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/getopt.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/getopt.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/getopt.h	(revision 2037)
@@ -30,5 +30,5 @@
 /**
  * @defgroup PJLIB_UTIL_GETOPT Getopt
- * @ingroup PJLIB_UTIL
+ * @ingroup PJLIB_TEXT
  * @{
  */
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/pcap.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/pcap.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/pcap.h	(revision 2037)
@@ -31,5 +31,5 @@
 /**
  * @defgroup PJ_PCAP Simple PCAP file reader
- * @ingroup PJLIB_UTIL
+ * @ingroup PJ_FILE_FMT
  * @{
  * This module describes simple utility to read PCAP file. It is not intended
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/scanner.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/scanner.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/scanner.h	(revision 2037)
@@ -31,5 +31,5 @@
 /**
  * @defgroup PJ_SCAN Fast Text Scanning
- * @ingroup PJLIB_UTIL
+ * @ingroup PJLIB_TEXT
  * @brief Text scanning utility.
  *
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/string.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/string.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/string.h	(revision 2037)
@@ -30,5 +30,5 @@
 /**
  * @defgroup PJLIB_UTIL_STRING String Escaping Utilities
- * @ingroup PJLIB_UTIL
+ * @ingroup PJLIB_TEXT
  * @{
  */
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/stun_simple.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/stun_simple.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/stun_simple.h	(revision 2037)
@@ -145,5 +145,5 @@
 /**
  * @defgroup PJLIB_UTIL_STUN_CLIENT Simple STUN Helper
- * @ingroup PJLIB_UTIL_STUN
+ * @ingroup PJ_PROTOCOLS
  * @brief A simple and small footprint STUN resolution helper
  * @{
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/types.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/types.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/types.h	(revision 2037)
@@ -29,5 +29,5 @@
 
 /**
- * @defgroup PJLIB_UTIL PJLIB-UTIL Library
+ * @defgroup PJLIB_UTIL_BASE Base
  * @{
  */
@@ -51,4 +51,15 @@
  */
 
+/**
+ * @defgroup PJLIB_TEXT Text and String Manipulation
+ */
+
+/**
+ * @defgroup PJ_PROTOCOLS Protocols
+ */
+
+/**
+ * @defgroup PJ_FILE_FMT File Formats
+ */
 
 /**
@@ -61,6 +72,6 @@
  * adjunct functions to PJLIB.
  * 
- * Please go to the <A HREF="modules.htm"><B>Modules</B></A> page for list
- * of modules.
+ * Please go to the <A HREF="modules.htm"><B>Table of Contents</B></A> page
+ * for list of modules.
  *
  *
Index: /pjproject/trunk/pjlib-util/include/pjlib-util/xml.h
===================================================================
--- /pjproject/trunk/pjlib-util/include/pjlib-util/xml.h	(revision 2036)
+++ /pjproject/trunk/pjlib-util/include/pjlib-util/xml.h	(revision 2037)
@@ -32,5 +32,5 @@
 /**
  * @defgroup PJ_TINY_XML Mini/Tiny XML Parser/Helper
- * @ingroup PJLIB_UTIL
+ * @ingroup PJ_FILE_FMT
  * @{
  */
Index: /pjproject/trunk/pjlib/build/Makefile
===================================================================
--- /pjproject/trunk/pjlib/build/Makefile	(revision 2036)
+++ /pjproject/trunk/pjlib/build/Makefile	(revision 2037)
@@ -56,5 +56,9 @@
 
 doc:
-	cd .. && doxygen docs/doxygen.cfg
+	cd .. && rm -rf docs/html docs/latex && doxygen docs/doxygen.cfg
+	@if test ! "$(WWWDIR)" == ""; then \
+		echo "Copying to $(WWWDIR)/pjlib/docs/html.." ; \
+		cp -a ../docs/html/* $(WWWDIR)/pjlib/docs/html/ ; \
+	fi
 
 print:
Index: /pjproject/trunk/pjlib/docs/doxygen.cfg
===================================================================
--- /pjproject/trunk/pjlib/docs/doxygen.cfg	(revision 2036)
+++ /pjproject/trunk/pjlib/docs/doxygen.cfg	(revision 2037)
@@ -295,4 +295,5 @@
 
 SHOW_USED_FILES        = YES
+TYPEDEF_HIDES_STRUCT	= YES
 
 #---------------------------------------------------------------------------
@@ -879,5 +880,5 @@
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       = docs/pjlib.tag
 
 # If the ALLEXTERNALS tag is set to YES all external classes will be listed 
@@ -896,5 +897,6 @@
 # interpreter (i.e. the result of `which perl').
 
-PERL_PATH              = /usr/bin/perl
+#PERL_PATH              = /usr/bin/perl
+PERL_PATH              = /c/Perl/bin/perl
 
 #---------------------------------------------------------------------------
Index: /pjproject/trunk/pjlib/docs/footer.html
===================================================================
--- /pjproject/trunk/pjlib/docs/footer.html	(revision 2036)
+++ /pjproject/trunk/pjlib/docs/footer.html	(revision 2037)
@@ -2,5 +2,5 @@
 <hr><center>
 PJLIB Open Source, high performance, small footprint, and very very portable framework<br>
-(C)2001-2007 Benny Prijono
+(C)2001-2008 Benny Prijono
 </center>
 
Index: /pjproject/trunk/pjlib/include/pj/config.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/config.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/config.h	(revision 2037)
@@ -304,5 +304,4 @@
 /**
  * @defgroup pj_config Build Configuration
- * @ingroup PJ
  * @{
  *
@@ -805,5 +804,4 @@
 /**
  * @defgroup pj_config Build Configuration
- * @ingroup PJ
  * @{
  */
Index: /pjproject/trunk/pjlib/include/pj/doxygen.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/doxygen.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/doxygen.h	(revision 2037)
@@ -53,8 +53,4 @@
  * \a doxygen (http://www.doxygen.org). Doxygen is a great (and free!) 
  * tools for generating such documentation.
- *
- * @subsection doc_ver_subsec Version
- *
- * This document corresponds to PJLIB version 0.8.0.
  *
  *
Index: /pjproject/trunk/pjlib/include/pj/errno.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/errno.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/errno.h	(revision 2037)
@@ -31,5 +31,4 @@
 /**
  * @defgroup pj_errno Error Codes
- * @ingroup PJ
  * @{
  *
Index: /pjproject/trunk/pjlib/include/pj/guid.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/guid.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/guid.h	(revision 2037)
@@ -33,5 +33,4 @@
 /**
  * @defgroup PJ_DS Data Structure.
- * @ingroup PJ
  */
 /**
Index: /pjproject/trunk/pjlib/include/pj/list.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/list.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/list.h	(revision 2037)
@@ -31,5 +31,4 @@
 /*
  * @defgroup PJ_DS Data Structure.
- * @ingroup PJ
  */
 
Index: /pjproject/trunk/pjlib/include/pj/log.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/log.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/log.h	(revision 2037)
@@ -32,5 +32,4 @@
 /**
  * @defgroup PJ_MISC Miscelaneous
- * @ingroup PJ
  */
 
Index: /pjproject/trunk/pjlib/include/pj/os.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/os.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/os.h	(revision 2037)
@@ -30,5 +30,4 @@
 /**
  * @defgroup PJ_OS Operating System Dependent Functionality.
- * @ingroup PJ
  */
 
Index: /pjproject/trunk/pjlib/include/pj/pool.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/pool.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/pool.h	(revision 2037)
@@ -40,5 +40,4 @@
 /**
  * @defgroup PJ_POOL_GROUP Fast Memory Pool
- * @ingroup PJ
  * @brief
  * Memory pools allow dynamic memory allocation comparable to malloc or the 
Index: /pjproject/trunk/pjlib/include/pj/types.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/types.h	(revision 2036)
+++ /pjproject/trunk/pjlib/include/pj/types.h	(revision 2037)
@@ -21,7 +21,4 @@
 
 
-/**
- * @defgroup PJ PJ Library
- */
 /**
  * @file types.h
Index: /pjproject/trunk/pjmedia/build/Makefile
===================================================================
--- /pjproject/trunk/pjmedia/build/Makefile	(revision 2036)
+++ /pjproject/trunk/pjmedia/build/Makefile	(revision 2037)
@@ -108,5 +108,10 @@
 
 doc:
-	cd .. && doxygen docs/doxygen.cfg
+	cd .. && rm -rf docs/html docs/latex && doxygen docs/doxygen.cfg
+	@if test ! "$(WWWDIR)" == ""; then \
+		echo "Copying to $(WWWDIR)/pjmedia/docs/html.." ; \
+		rm -rf $(WWWDIR)/pjmedia/docs/html/* ; \
+		cp -a ../docs/html/* $(WWWDIR)/pjmedia/docs/html/ ; \
+	fi
 
 dep: depend
Index: /pjproject/trunk/pjmedia/docs/doxygen.cfg
===================================================================
--- /pjproject/trunk/pjmedia/docs/doxygen.cfg	(revision 2036)
+++ /pjproject/trunk/pjmedia/docs/doxygen.cfg	(revision 2037)
@@ -214,5 +214,5 @@
 # declaration order.
 
-SORT_MEMBER_DOCS       = YES
+SORT_MEMBER_DOCS       = NO
 
 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
@@ -296,4 +296,6 @@
 SHOW_USED_FILES        = YES
 
+TYPEDEF_HIDES_STRUCT	= YES
+
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
@@ -315,5 +317,5 @@
 # automatically be disabled.
 
-WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_UNDOCUMENTED   = NO
 
 # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
@@ -875,10 +877,10 @@
 # The TAGFILES tag can be used to specify one or more tagfiles.
 
-TAGFILES               = 
+TAGFILES               = ../pjlib/docs/pjlib.tag=../../../pjlib/docs/html ../pjlib-util/docs/pjlib-util.tag=../../../pjlib-util/docs/html ../pjnath/docs/pjnath.tag=../../../pjnath/docs/html ../pjsip/docs/pjmedia.tag=../../../pjmedia/docs/html
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create 
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       = docs/pjmedia.tag
 
 # If the ALLEXTERNALS tag is set to YES all external classes will be listed 
@@ -892,10 +894,11 @@
 # be listed.
 
-EXTERNAL_GROUPS        = YES
+EXTERNAL_GROUPS        = NO
 
 # The PERL_PATH should be the absolute path and name of the perl script 
 # interpreter (i.e. the result of `which perl').
 
-PERL_PATH              = /usr/bin/perl
+#PERL_PATH              = /usr/bin/perl
+PERL_PATH              = /c/Perl/bin/perl
 
 #---------------------------------------------------------------------------
@@ -979,20 +982,4 @@
 DOTFILE_DIRS           = 
 
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_WIDTH    = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT   = 1024
-
 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
 # generate a legend page explaining the meaning of the various boxes and 
Index: /pjproject/trunk/pjmedia/docs/footer.html
===================================================================
--- /pjproject/trunk/pjmedia/docs/footer.html	(revision 2036)
+++ /pjproject/trunk/pjmedia/docs/footer.html	(revision 2037)
@@ -2,5 +2,5 @@
 <hr><center>
 PJMEDIA small footprint Open Source media stack<br>
-(C)2003-2007 Benny Prijono
+(C)2003-2008 Benny Prijono
 </center>
 <!--#include virtual="/footer.html" -->
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/g722.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/g722.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/g722.h	(revision 2037)
@@ -32,4 +32,5 @@
  * @brief Implementation of G.722 Codec
  * @{
+ *
  * This section describes functions to register and register G.722 codec
  * factory to the codec manager. After the codec factory has been registered,
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/gsm.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/gsm.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/gsm.h	(revision 2037)
@@ -32,4 +32,5 @@
  * @brief Implementation of GSM FR based on GSM 06.10 library
  * @{
+ *
  * This section describes functions to register and register GSM codec
  * factory to the codec manager. After the codec factory has been registered,
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/ilbc.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/ilbc.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/ilbc.h	(revision 2037)
@@ -32,4 +32,5 @@
  * @brief Implementation of iLBC Codec
  * @{
+ *
  * This section describes functions to register and register iLBC codec
  * factory to the codec manager. After the codec factory has been registered,
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/l16.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/l16.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/l16.h	(revision 2037)
@@ -26,6 +26,7 @@
  * @defgroup PJMED_L16 L16 Codec Family
  * @ingroup PJMEDIA_CODEC
- * @brief 16bit linear codecs (useful for debugging)
+ * @brief PCM/16bit/linear codecs
  * @{
+ *
  * This section describes functions to register and register L16 codec
  * factory to the codec manager. After the codec factory has been registered,
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/speex.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/speex.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/speex.h	(revision 2037)
@@ -32,4 +32,5 @@
  * @brief Implementation of Speex codecs (narrow/wide/ultrawide-band).
  * @{
+ *
  * This section describes functions to register and register speex codec
  * factory to the codec manager. After the codec factory has been registered,
Index: /pjproject/trunk/pjmedia/include/pjmedia/bidirectional.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/bidirectional.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/bidirectional.h	(revision 2037)
@@ -22,5 +22,5 @@
 /**
  * @file bidirectional.h
- * @brief Create bidirectional port from two unidirectional ports.
+ * @brief Bidirectional media port.
  */
 #include <pjmedia/port.h>
@@ -30,5 +30,6 @@
  * @defgroup PJMEDIA_BIDIRECTIONAL_PORT Bidirectional Port
  * @ingroup PJMEDIA_PORT
- * @brief Create bidirectional port from two unidirectional ports.
+ * @brief A bidirectional port combines two unidirectional ports into one
+ * bidirectional port
  * @{
  */
Index: /pjproject/trunk/pjmedia/include/pjmedia/clock.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/clock.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/clock.h	(revision 2037)
@@ -25,4 +25,37 @@
  */
 #include <pjmedia/types.h>
+
+
+/**
+ * @defgroup PJMEDIA_PORT_CLOCK Clock/Timing
+ * @ingroup PJMEDIA_PORT
+ * @brief Various types of classes that provide timing.
+ * @{
+
+ The media clock/timing extends the media port concept that is explained 
+ in @ref PJMEDIA_PORT. When clock is present in the ports 
+ interconnection, media will flow automatically (and with correct timing too!)
+ from one media port to another.
+ 
+ There are few objects in PJMEDIA that are able to provide clock/timing
+ to media ports interconnection:
+
+ - @ref PJMED_SND_PORT\n
+   The sound device makes a good candidate as the clock source, and
+   PJMEDIA @ref PJMED_SND is designed so that it is able to invoke
+   operations according to timing driven by the sound hardware clock
+   (this may sound complicated, but actually it just means that
+   the sound device abstraction provides callbacks to be called when
+   it has/wants media frames).\n
+   See @ref PJMED_SND_PORT for more details.
+
+ - @ref PJMEDIA_MASTER_PORT\n
+   The master port uses @ref PJMEDIA_CLOCK as the clock source. By using
+   @ref PJMEDIA_MASTER_PORT, it is possible to interconnect passive
+   media ports and let the frames flow automatically in timely manner.\n
+   Please see @ref PJMEDIA_MASTER_PORT for more details.
+
+ @}
+ */
 
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/codec.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/codec.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/codec.h	(revision 2037)
@@ -34,5 +34,4 @@
 /**
  * @defgroup PJMEDIA_CODEC Codec Framework
- * @ingroup PJMEDIA
  * @brief Media codec framework and management
  * @{
Index: /pjproject/trunk/pjmedia/include/pjmedia/conference.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/conference.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/conference.h	(revision 2037)
@@ -30,5 +30,5 @@
  * @defgroup PJMEDIA_CONF Conference Bridge
  * @ingroup PJMEDIA_PORT
- * @brief The implementation of conference bridge
+ * @brief Audio conference bridge implementation
  * @{
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/config.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/config.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/config.h	(revision 2037)
@@ -28,5 +28,4 @@
 /**
  * @defgroup PJMEDIA_BASE Base Types and Configurations
- * @ingroup PJMEDIA
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/delaybuf.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/delaybuf.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/delaybuf.h	(revision 2037)
@@ -30,7 +30,10 @@
 
 /**
- * @defgroup PJMED_DELAYBUF Delay Buffer
+ * @defgroup PJMED_DELAYBUF Adaptive Delay Buffer
  * @ingroup PJMEDIA_FRAME_OP
+ * @brief Adaptive delay buffer with high-quality time-scale
+ * modification
  * @{
+ *
  * This section describes PJMEDIA's implementation of delay buffer.
  * Delay buffer works quite similarly like a fixed jitter buffer, that
@@ -44,11 +47,13 @@
  * get() and put() are matched).
  *
- * The delay buffer is mostly used by the sound port, to accommodate
- * for the burst frames returned by the sound device.
+ * The buffer is adaptive, that is it continuously learns the optimal delay
+ * to be applied to the audio flow at run-time. Once the optimal delay has 
+ * been learned, the delay buffer will apply this delay to the audio flow,
+ * expanding or shrinking the audio samples as necessary when the actual
+ * audio samples in the buffer are too low or too high. It does this without
+ * distorting the audio quality of the audio, by using \a PJMED_WSOLA.
  *
- * To determine the level of delay to be applied, the delay buffer
- * has a learning period on which it calculates the level of burst of
- * both the put() and get(), and use the maximum value of both as the
- * delay level.
+ * The delay buffer is used in \ref PJMED_SND_PORT, \ref PJMEDIA_SPLITCOMB,
+ * and \ref PJMEDIA_CONF.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/doxygen.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/doxygen.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/doxygen.h	(revision 2037)
@@ -25,7 +25,4 @@
  */
 
-/**
- * @defgroup PJMEDIA PJMEDIA Library
- */
 
 /*////////////////////////////////////////////////////////////////////////// */
@@ -43,8 +40,8 @@
  * terms, and featuring small footprint and good extensibility and portability.
  *
- * Please click the <A HREF="modules.htm"><b>Modules</b></A> link on top
+ * Please click the <A HREF="modules.htm"><b>Table of Contents</b></A> link on top
  * of this page to get the complete features currently present in PJMEDIA.
  *
- * Also please read the documentation about @ref PJMEDIA_PORT_CONCEPT,
+ * Also please read the documentation about @ref PJMEDIA_PORT
  * which is a major concept that is used for implementing many objects in 
  * the library.
@@ -80,356 +77,4 @@
  */
 
-/**
- * @page pjmed_keywords_page Features Index
- * @section pjmed_keywords Features Index
- *
- * <b>PJMEDIA features</b>, in no particular order (click to go to the relevant
- * documentation): 
- * @ref lic_stuffs "Open Source media stack", 
- * @ref PJMEDIA_CLOCK, 
- * @ref PJMEDIA_CODEC,
- * @ref enc_dec_codec,
- * @ref plc_codec, 
- * @ref PJMEDIA_CONF, 
- * @ref PJMED_G711 "G711/G.711 (PCMA/PCMU) codec",
- * @ref PJMED_GSM "GSM codec", 
- * @ref PJMED_L16 "linear codecs (multiple clockrate, stereo support, etc)",
- * @ref PJMED_SPEEX "Speex codec (narrowband, wideband, ultra-wideband)",
- * @ref PJMED_JBUF "portable, adaptive jitter buffer with PLC support",
- * @ref PJMEDIA_MASTER_PORT, 
- * @ref PJMEDIA_NULL_PORT,
- * @ref PJMED_PLC, 
- * @ref PJMEDIA_PORT_CONCEPT, 
- * @ref PJMEDIA_PORT_CLOCK,
- * @ref PJMEDIA_RESAMPLE "high quality resampling/sampling rate conversion",
- * @ref PJMEDIA_RESAMPLE_PORT, 
- * @ref PJMED_RTCP "small footprint, portable RTCP with media quality statistics",
- * @ref PJMED_RTP "very small footprint, modular, DSP ready RTP implementation", 
- * @ref PJMEDIA_SDP "modular, small footprint, open source SDP implementation", 
- * @ref PJMEDIA_SDP_NEG "modular SDP negotiation/negotiator abstraction",
- * @ref PJMED_SES "media session abstraction",
- * @ref PJMEDIA_SILENCEDET,
- * @ref PJMED_SND "portable audio/sound hardware/device abstraction for Linux, Unix, Windows, DirectSound, WinCE, Windows Mobile, MacOS X, etc.", 
- * @ref PJMED_SND_PORT,
- * @ref PJMEDIA_SPLITCOMB, 
- * @ref PJMED_STRM "remote stream", 
- * @ref PJMEDIA_TRANSPORT_H "custom media transport abstraction",
- * @ref PJMEDIA_TRANSPORT_UDP, 
- * @ref PJMEDIA_FILE_PLAY "WAV/WAVE file playback", 
- * @ref PJMEDIA_FILE_REC "WAV/WAVE file recording/capture",
- * @ref PJMEDIA_WAVE "portable WAV/WAVE header manipulation"
- */
-
-
-/**
- * @page pjmedia_codec_page Using PJMEDIA-CODEC
- *
- * Before application can use a codec, it needs to initialize and register
- * the codec to the codec manager. This is accomplished with using
- * constructs like the following:
- *
- \code
-    #include <pjmedia.h>
-    #include <pjmedia-codec.h>
-
-    init_codecs( pjmedia_endpt *med_ept )
-    {
-	// Register G.711 codecs
-	pjmedia_codec_g711_init(med_ept);
-
-	// Register GSM codec.
-	pjmedia_codec_gsm_init(med_ept);
-
-	// Register Speex codecs.
-	// With the default flag, this will register three codecs:
-	// speex/8000, speex/16000, and speex/32000
-	pjmedia_codec_speex_init(med_ept, 0, 0, 0);
-    }
- \endcode
- *
- * After the codec is registered, application may create the encoder/decoder
- * instance, by using the API as documented in @ref PJMEDIA_CODEC.
- */
-
-
-
-/**
- * @page lic_stuffs Copying and Acknowledgements
- * @section lic_stuff Copying and Acknowledgements
- * @subsection pjmedia_about_subsec About PJMEDIA
- *
- * PJMEDIA is distributed under GPL terms (other licensing schemes may be 
- * arranged):
- \verbatim
-    Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
-
-    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 
- \endverbatim
- *
- *
- * @section other_acks Acknowlegments
- * @subsection portaudio_subsec PortAudio
- *
- * PortAudio is supported as one of the sound device backend, and
- * is used by default on Linux/Unix and MacOS X target.
- * 
- * Please visit <A HREF="http://www.portaudio.com">http://www.portaudio.com</A>
- * for more info.
- *
- * PortAudio is distributed with the following condition.
- \verbatim
-    Based on the Open Source API proposed by Ross Bencina
-    Copyright (c) 1999-2000 Phil Burk
-
-    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.
- \endverbatim
- *
- *
- * @subsection resample_ack Resample
- *
- * PJMEDIA uses <tt>resample-1.8.tar.gz</tt> from 
- * <A HREF="http://www-ccrma.stanford.edu/~jos/resample/">
- * Digital Audio Resampling Home Page</A>. This library is distibuted
- * on LGPL terms.
- *
- * Some excerpts from the original source codes:
- \verbatim
-    HISTORY
-
-    The first version of this software was written by Julius O. Smith III
-    <jos@ccrma.stanford.edu> at CCRMA <http://www-ccrma.stanford.edu> in
-    1981.  It was called SRCONV and was written in SAIL for PDP-10
-    compatible machines.  The algorithm was first published in
-
-    Smith, Julius O. and Phil Gossett. ``A Flexible Sampling-Rate
-    Conversion Method,'' Proceedings (2): 19.4.1-19.4.4, IEEE Conference
-    on Acoustics, Speech, and Signal Processing, San Diego, March 1984.
-
-    An expanded tutorial based on this paper is available at the Digital
-    Audio Resampling Home Page given above.
-
-    Circa 1988, the SRCONV program was translated from SAIL to C by
-    Christopher Lee Fraley working with Roger Dannenberg at CMU.
-
-    Since then, the C version has been maintained by jos.
-
-    Sndlib support was added 6/99 by John Gibson <jgg9c@virginia.edu>.
-
-    The resample program is free software distributed in accordance
-    with the Lesser GNU Public License (LGPL).  There is NO warranty; not
-    even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- \endverbatim
- *
- * @subsection jb_ack Adaptive Jitter Buffer
- *
- * The PJMEDIA jitter buffer is based on implementation kindly donated
- * by <A HREF="http://www.switchlab.com">Switchlab, Ltd.</A>, and is
- * distributed under PJMEDIA licensing terms.
- *
- *
- * @subsection silence_det_ack Adaptive Silence Detector
- *
- * The adaptive silence detector was based on silence detector 
- * implementation in <A HREF="http://www.openh323.org">Open H323</A> 
- * project. I couldn't find the source code anymore, but generally
- * Open H323 files are distributed under MPL terms and has the
- * following excerpts:
- \verbatim
-    Open H323 Library
-
-    Copyright (c) 1998-2000 Equivalence Pty. Ltd.
-
-    The contents of this file are subject to the Mozilla Public License
-    Version 1.0 (the "License"); you may not use this file except in
-    compliance with the License. You may obtain a copy of the License at
-    http://www.mozilla.org/MPL/
-
-    Software distributed under the License is distributed on an "AS IS"
-    basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-    the License for the specific language governing rights and limitations
-    under the License.
-
-    The Original Code is Open H323 Library.
-
-    The Initial Developer of the Original Code is Equivalence Pty. Ltd.
-
-    Portions of this code were written with the assisance of funding from
-    Vovida Networks, Inc. http://www.vovida.com.
- \endverbatim
-
- * @subsection gsm_ack GSM Codec
- *
- * PJMEDIA uses GSM 
- * <A HREF="http://kbs.cs.tu-berlin.de/~jutta/toast.html">GSM 06.10</A>
- * version 1.0 at patchlevel 12. It has the following Copyright notice:
- *
- \verbatim
-    Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,
-    Technische Universitaet Berlin
-
-    Any use of this software is permitted provided that this notice is not
-    removed and that neither the authors nor the Technische Universitaet Berlin
-    are deemed to have made any representations as to the suitability of this
-    software for any purpose nor are held responsible for any defects of
-    this software.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
-
-    As a matter of courtesy, the authors request to be informed about uses
-    this software has found, about bugs in this software, and about any
-    improvements that may be of general interest.
-
-    Berlin, 28.11.1994
-    Jutta Degener
-    Carsten Bormann
- \endverbatim
- *
- *
- * @subsection speex_codec_ack Speex Codec
- *
- * PJMEDIA uses Speex codec uses version 1.1.12 from <A HREF="http://www.speex.org">
- * www.speex.org</A>. The Speex library comes with the following Copying
- * notice:
- \verbatim
-    Copyright 2002-2005 
-	    Xiph.org Foundation
-	    Jean-Marc Valin
-	    David Rowe
-	    EpicGames
-	    Analog Devices
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    - Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-    - Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-    - Neither the name of the Xiph.org Foundation nor the names of its
-    contributors may be used to endorse or promote products derived from
-    this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
-    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- \endverbatim
- *
- *
- * @subsection g711_codec_ack G.711 Codec
- *
- * The G.711 codec algorithm came from Sun Microsystems, Inc, and it's
- * got the following excerpts:
- *
- \verbatim
-    This source code is a product of Sun Microsystems, Inc. and is provided
-    for unrestricted use.  Users may copy or modify this source code without
-    charge.
-
-    SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
-    THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
-    PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
-
-    Sun source code is provided with no support and without any obligation on
-    the part of Sun Microsystems, Inc. to assist in its use, correction,
-    modification or enhancement.
-
-    SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
-    INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
-    OR ANY PART THEREOF.
-
-    In no event will Sun Microsystems, Inc. be liable for any lost revenue
-    or profits or other special, indirect and consequential damages, even if
-    Sun has been advised of the possibility of such damages.
-
-    Sun Microsystems, Inc.
-    2550 Garcia Avenue
-    Mountain View, California  94043
- \endverbatim
- *
- */
-
-
-/**
- @page getting_started_pjmedia Getting Started with PJMEDIA
- 
- @section getstart_init_setup_build Setting-up the Build System
-
- @subsection subsec_build_pjmedia Building PJMEDIA and PJMEDIA-CODEC
-
- The PJMEDIA and PJMEDIA-CODEC libraries are normally bundled in PJPROJECT
- source tarball, and they are located in <tt><b>pjmedia</b></tt> sub-directory
- tree.
-
- Please follow the instructions in <tt><b>INSTALL.txt</b></tt> in the root
- PJPROJECT directory to build all projects, including PJMEDIA and PJMEDIA-CODEC.
-
- @subsection subsec_config_build Setting Up the Build Environment
-
- In your project, you will need to configure the following.
- - Add <tt><b>$pjproject/pjmedia/include</b></tt> in the search path for
-   include files.
- - Add <tt><b>$pjproject/pjmedia/lib</b></tt> in the search path for
-   library files.
- - Add PJMEDIA and PJMEDIA static libraries in the link command.
-
- @subsection subsec_inc_pjmedia Include PJMEDIA and PJMEDIA-CODEC in Source Files
-
- To include all features from PJMEDIA and PJMEDIA-CODEC, use the following:
-
- \code
-   #include <pjlib.h>
-   #include <pjmedia.h>
-   #include <pjmedia-codec.h>
- \endcode
-
- Alternatively, you may include only specific parts of the library (for example
- to speed up compilation by just a fraction), for example:
-
- \code
-   #include <pjmedia/conference.h>
-   #include <pjmedia/jbuf.h>
-   #include <pjmedia-codec/speex.h>
- \endcode
-
-  Note that you need to give <b>"pjmedia/"</b> and <b>"pjmedia-codec/"</b> 
-  prefix to include specific files.
-
-
- @section getstart_using Using PJMEDIA
-
-  I wish I could explain more, but for now, please have a look at the 
-  @ref page_pjmedia_samples page on some examples.
- */
 
 /**
@@ -442,6 +87,6 @@
 
   - @ref page_pjmedia_samples_level_c\n
-    This is a good place to start learning about @ref PJMEDIA_PORT_CONCEPT,
-    as it shows that @ref PJMEDIA_PORT_CONCEPT are only "passive" objects
+    This is a good place to start learning about @ref PJMEDIA_PORT,
+    as it shows that @ref PJMEDIA_PORT are only "passive" objects
     with <tt>get_frame()</tt> and <tt>put_frame()</tt> interface, and
     someone has to call these to retrieve/store media frames.
@@ -456,5 +101,5 @@
 
   - @ref page_pjmedia_samples_playsine_c\n
-    Demonstrates how to create a custom @ref PJMEDIA_PORT_CONCEPT (in this
+    Demonstrates how to create a custom @ref PJMEDIA_PORT (in this
     case a sine wave generator) and integrate it to PJMEDIA.
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/echo_port.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/echo_port.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/echo_port.h	(revision 2037)
@@ -31,8 +31,8 @@
  * @defgroup PJMEDIA_ECHO_PORT Echo Cancellation Port
  * @ingroup PJMEDIA_PORT
- * @brief Echo Cancellation Port
+ * @brief Echo Cancellation
+ * @{
  *
- * Echo canceller media port, using @ref PJMEDIA_Echo_Cancel backend.
- * @{
+ * Wrapper to \ref PJMEDIA_Echo_Cancel into media port interface.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/endpoint.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/endpoint.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/endpoint.h	(revision 2037)
@@ -27,5 +27,4 @@
 /**
  * @defgroup PJMED_ENDPT The Endpoint
- * @ingroup PJMEDIA
  * @{
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/jbuf.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/jbuf.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/jbuf.h	(revision 2037)
@@ -33,12 +33,10 @@
  * @defgroup PJMED_JBUF Adaptive jitter buffer
  * @ingroup PJMEDIA_FRAME_OP
+ * @brief Adaptive de-jitter buffering implementation
  * @{
+ *
  * This section describes PJMEDIA's implementation of de-jitter buffer.
  * The de-jitter buffer may be set to operate in adaptive mode or fixed
  * delay mode.
- *
- * The jitter buffer is also able to report the status of the current
- * frame (#pjmedia_jb_frame_type). This status is used for examply by
- * @ref PJMED_STRM to invoke the codec's @ref PJMED_PLC algorithm.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/master_port.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/master_port.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/master_port.h	(revision 2037)
@@ -30,6 +30,7 @@
  * @defgroup PJMEDIA_MASTER_PORT Master Port
  * @ingroup PJMEDIA_PORT_CLOCK
- * @brief Provides media clock for media ports.
+ * @brief Thread based media clock provider
  * @{
+ *
  * A master port has two media ports connected to it, and by convention
  * thay are called downstream and upstream ports. The media stream flowing to
Index: /pjproject/trunk/pjmedia/include/pjmedia/mem_port.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/mem_port.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/mem_port.h	(revision 2037)
@@ -32,6 +32,7 @@
  * @defgroup PJMEDIA_MEM_PLAYER Memory/Buffer-based Playback Port
  * @ingroup PJMEDIA_PORT
- * @brief Media playback from a fixed buffer
+ * @brief Media playback from a fixed size memory buffer
  * @{
+ *
  * A memory/buffer based playback port is used to play media from a fixed
  * size buffer. This is useful over @ref PJMEDIA_FILE_PLAY for 
@@ -114,6 +115,7 @@
  * @defgroup PJMEDIA_MEM_CAPTURE Memory/Buffer-based Capture Port
  * @ingroup PJMEDIA_PORT
- * @brief Capture to fixed size buffer
+ * @brief Media capture to fixed size memory buffer
  * @{
+ *
  * A memory based capture is used to save media streams to a fixed size
  * buffer. This is useful over @ref PJMEDIA_FILE_REC for 
Index: /pjproject/trunk/pjmedia/include/pjmedia/null_port.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/null_port.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/null_port.h	(revision 2037)
@@ -31,5 +31,5 @@
  * @defgroup PJMEDIA_NULL_PORT Null Port
  * @ingroup PJMEDIA_PORT
- * @brief Null port is the simplest type of port.
+ * @brief The simplest type of media port which does nothing.
  * @{
  */
Index: /pjproject/trunk/pjmedia/include/pjmedia/plc.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/plc.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/plc.h	(revision 2037)
@@ -30,8 +30,11 @@
  * @defgroup PJMED_PLC Packet Lost Concealment (PLC)
  * @ingroup PJMEDIA_FRAME_OP
+ * @brief Packet lost compensation algorithm
  * @{
+ *
  * This section describes PJMEDIA's implementation of Packet Lost
  * Concealment algorithm. This algorithm is used to implement PLC for
- * codecs that do not have built-in support for one (e.g. G.711 or GSM codecs).
+ * codecs that do not have built-in support for one (e.g. G.711 or GSM 
+ * codecs).
  *
  * The PLC algorithm (either built-in or external) is embedded in
Index: /pjproject/trunk/pjmedia/include/pjmedia/port.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/port.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/port.h	(revision 2037)
@@ -29,8 +29,7 @@
 
 /**
-  @defgroup PJMEDIA_PORT_CONCEPT Media Ports Framework
-  @ingroup PJMEDIA
-  @brief Extensible framework for media terminations
-  
+  @addtogroup PJMEDIA_PORT Media Ports Framework
+  @{
+
   @section media_port_intro Media Port Concepts
   
@@ -166,62 +165,5 @@
   among media ports. This concept is described in @ref PJMEDIA_PORT_CLOCK 
   section.
-
- */
-
-
-/**
- * @defgroup PJMEDIA_PORT_INTERFACE Media Port Interface
- * @ingroup PJMEDIA_PORT_CONCEPT
- * @brief Declares the media port interface.
- */
-
-/**
- * @defgroup PJMEDIA_PORT Ports
- * @ingroup PJMEDIA_PORT_CONCEPT
- * @brief Contains various types of media ports/terminations.
- * @{
- * This page lists all types of media ports currently implemented
- * in PJMEDIA. The media port concept is explained in @ref PJMEDIA_PORT_CONCEPT.
- * @}
- */
-
-/**
- @defgroup PJMEDIA_PORT_CLOCK Clock/Timing
- @ingroup PJMEDIA_PORT_CONCEPT
- @brief Various types of classes that provide timing.
- @{
-
- The media clock/timing extends the media port concept that is explained 
- in @ref PJMEDIA_PORT_CONCEPT. When clock is present in the ports 
- interconnection, media will flow automatically (and with correct timing too!)
- from one media port to another.
- 
- There are few objects in PJMEDIA that are able to provide clock/timing
- to media ports interconnection:
-
- - @ref PJMED_SND_PORT\n
-   The sound device makes a good candidate as the clock source, and
-   PJMEDIA @ref PJMED_SND is designed so that it is able to invoke
-   operations according to timing driven by the sound hardware clock
-   (this may sound complicated, but actually it just means that
-   the sound device abstraction provides callbacks to be called when
-   it has/wants media frames).\n
-   See @ref PJMED_SND_PORT for more details.
-
- - @ref PJMEDIA_MASTER_PORT\n
-   The master port uses @ref PJMEDIA_CLOCK as the clock source. By using
-   @ref PJMEDIA_MASTER_PORT, it is possible to interconnect passive
-   media ports and let the frames flow automatically in timely manner.\n
-   Please see @ref PJMEDIA_MASTER_PORT for more details.
-
- @}
- */
-
-/**
- * @addtogroup PJMEDIA_PORT_INTERFACE
- * @{
- * This page contains the media port interface declarations. The media port
- * concept is explained in @ref PJMEDIA_PORT_CONCEPT.
- */
+*/
 
 PJ_BEGIN_DECL
@@ -231,5 +173,5 @@
  * Port operation setting.
  */
-enum pjmedia_port_op
+typedef enum pjmedia_port_op
 {
     /** 
@@ -254,11 +196,6 @@
      */
     PJMEDIA_PORT_ENABLE
-};
-
-
-/**
- * @see pjmedia_port_op
- */
-typedef enum pjmedia_port_op pjmedia_port_op;
+
+} pjmedia_port_op;
 
 
@@ -297,5 +234,5 @@
  * This structure describes a media frame. 
  */
-struct pjmedia_frame
+typedef struct pjmedia_frame
 {
     pjmedia_frame_type	 type;	    /**< Frame type.			    */
@@ -308,28 +245,11 @@
 					 may be used for specifying start & 
 					 end bit offset.		    */
-};
-
-
-/** 
- * @see pjmedia_frame
- */
-typedef struct pjmedia_frame pjmedia_frame;
-
-
-/**
- * For future graph.
- */
-typedef struct pjmedia_graph pjmedia_graph;
-
-
-/**
- * @see pjmedia_port
- */
-typedef struct pjmedia_port pjmedia_port;
+} pjmedia_frame;
+
 
 /**
  * Port interface.
  */
-struct pjmedia_port
+typedef struct pjmedia_port
 {
     pjmedia_port_info	 info;		    /**< Port information.  */
@@ -347,5 +267,5 @@
      * This should only be called by #pjmedia_port_put_frame().
      */
-    pj_status_t (*put_frame)(pjmedia_port *this_port, 
+    pj_status_t (*put_frame)(struct pjmedia_port *this_port, 
 			     const pjmedia_frame *frame);
 
@@ -354,5 +274,5 @@
      * This should only be called by #pjmedia_port_get_frame().
      */
-    pj_status_t (*get_frame)(pjmedia_port *this_port, 
+    pj_status_t (*get_frame)(struct pjmedia_port *this_port, 
 			     pjmedia_frame *frame);
 
@@ -360,6 +280,7 @@
      * Called to destroy this port.
      */
-    pj_status_t (*on_destroy)(pjmedia_port *this_port);
-};
+    pj_status_t (*on_destroy)(struct pjmedia_port *this_port);
+
+} pjmedia_port;
 
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/resample.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/resample.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/resample.h	(revision 2037)
@@ -32,6 +32,7 @@
  * @defgroup PJMEDIA_RESAMPLE Resampling Algorithm
  * @ingroup PJMEDIA_FRAME_OP
- * @brief Functions to alter frame's clock rate.
+ * @brief Sample rate conversion algorithm
  * @{
+ *
  * This section describes the base resampling functions. In addition to this,
  * application can use the @ref PJMEDIA_RESAMPLE_PORT which provides
@@ -123,7 +124,8 @@
  * @defgroup PJMEDIA_RESAMPLE_PORT Resample Port
  * @ingroup PJMEDIA_PORT
- * @brief Media port interface to change media stream's sampling rate.
+ * @brief Audio sample rate conversion
  * @{
- * This section describes media port abstractoin for @ref PJMEDIA_RESAMPLE.
+ *
+ * This section describes media port abstraction for @ref PJMEDIA_RESAMPLE.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/rtcp.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/rtcp.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/rtcp.h	(revision 2037)
@@ -34,6 +34,8 @@
 /**
  * @defgroup PJMED_RTCP RTCP Session and Encapsulation (RFC 3550)
- * @ingroup PJMEDIA_TRANSPORT
+ * @ingroup PJMEDIA_SESSION
+ * @brief RTCP format and session management
  * @{
+ *
  * PJMEDIA implements subsets of RTCP specification (RFC 3550) to monitor
  * the quality of the real-time media (audio/video) transmission. In
Index: /pjproject/trunk/pjmedia/include/pjmedia/rtcp_xr.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/rtcp_xr.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/rtcp_xr.h	(revision 2037)
@@ -34,6 +34,8 @@
 /**
  * @defgroup PJMED_RTCP_XR RTCP Extended Report (XR) - RFC 3611
- * @ingroup PJMEDIA_TRANSPORT
+ * @ingroup PJMEDIA_SESSION
+ * @brief RTCP XR extension to RTCP session
  * @{
+ *
  * PJMEDIA implements subsets of RTCP XR specification (RFC 3611) to monitor
  * the quality of the real-time media (audio/video) transmission.
Index: /pjproject/trunk/pjmedia/include/pjmedia/rtp.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/rtp.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/rtp.h	(revision 2037)
@@ -33,5 +33,6 @@
 /**
  * @defgroup PJMED_RTP RTP Session and Encapsulation (RFC 3550)
- * @ingroup PJMEDIA_TRANSPORT
+ * @ingroup PJMEDIA_SESSION
+ * @brief RTP format and session management
  * @{
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/sdp.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/sdp.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/sdp.h	(revision 2037)
@@ -30,4 +30,5 @@
  * @defgroup PJMEDIA_SDP SDP Parsing and Data Structure
  * @ingroup PJMEDIA_SESSION
+ * @brief SDP data structure representation and parsing
  * @{
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/session.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/session.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/session.h	(revision 2037)
@@ -33,11 +33,6 @@
 
 /**
- * @defgroup PJMEDIA_SESSION Sessions
- * @ingroup PJMEDIA
- */
-
-/**
- * @defgroup PJMED_SES Media session
- * @ingroup PJMEDIA_SESSION
+ * @defgroup PJMEDIA_SESSION Media Sessions
+ * @brief Management of media sessions
  * @{
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/sound.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/sound.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/sound.h	(revision 2037)
@@ -39,5 +39,5 @@
  * hardware. Application normally uses the higher layer @ref
  * PJMED_SND_PORT abstraction since it works seamlessly with 
- * @ref PJMEDIA_PORT_CONCEPT.
+ * @ref PJMEDIA_PORT.
  *
  * The sound hardware abstraction basically runs <b>asychronously</b>,
Index: /pjproject/trunk/pjmedia/include/pjmedia/splitcomb.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/splitcomb.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/splitcomb.h	(revision 2037)
@@ -31,6 +31,8 @@
  * @addtogroup PJMEDIA_SPLITCOMB Media channel splitter/combiner
  * @ingroup PJMEDIA_PORT
- * @brief Split and combine media channels in media streams
+ * @brief Split and combine multiple mono-channel media ports into
+ *  a single multiple-channels media port
  * @{
+ *
  * This section describes media port to split and combine media
  * channels in the stream.
Index: /pjproject/trunk/pjmedia/include/pjmedia/stereo.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/stereo.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/stereo.h	(revision 2037)
@@ -33,7 +33,6 @@
 /**
  * @defgroup PJMEDIA_STEREO Monochannel and multichannel audio frame converter
- * @ingroup PJMEDIA_MISC
- * @brief Interface for converting monochannel audio frame to multichannel
- * audio frame and vice versa.
+ * @ingroup PJMEDIA_FRAME_OP
+ * @brief Mono - multi-channels audio conversion
  * @{
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/stream.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/stream.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/stream.h	(revision 2037)
@@ -40,5 +40,5 @@
  * @defgroup PJMED_STRM Streams
  * @ingroup PJMEDIA_PORT
- * @brief Media port for communicating with remote peer via the network.
+ * @brief Communicating with remote peer via the network
  * @{
  *
@@ -51,5 +51,5 @@
  *  - decoding channel, which receives unidirectional media from remote.
  *
- * A media stream exports media port interface (see @ref PJMEDIA_PORT_CONCEPT)
+ * A media stream exports media port interface (see @ref PJMEDIA_PORT)
  * and application normally uses this interface to interconnect the stream
  * to other PJMEDIA components.
@@ -62,5 +62,5 @@
  *  - one instance of RTCP session (#pjmedia_rtcp_session),
  *  - and a reference to media transport to send and receive packets
- *    to/from the network (see @ref PJMEDIA_TRANSPORT_H).
+ *    to/from the network (see @ref PJMEDIA_TRANSPORT).
  *
  * Streams are created by calling #pjmedia_stream_create(), specifying
Index: /pjproject/trunk/pjmedia/include/pjmedia/tonegen.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/tonegen.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/tonegen.h	(revision 2037)
@@ -28,8 +28,9 @@
 
 /**
- * @defgroup PJMEDIA_MF_DTMF_TONE_GENERATOR Tone (sine, MF, DTMF) Generator
+ * @defgroup PJMEDIA_MF_DTMF_TONE_GENERATOR Multi-frequency tone generator
  * @ingroup PJMEDIA_PORT
- * @brief Tone (sine, MF, DTMF) Generator
+ * @brief Multi-frequency tone generator
  * @{
+ *
  * This page describes tone generator media port. A tone generator can be
  * used to generate a single frequency sine wave or dual frequency tones
Index: /pjproject/trunk/pjmedia/include/pjmedia/transport.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/transport.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/transport.h	(revision 2037)
@@ -30,22 +30,11 @@
 
 /**
- * @defgroup PJMEDIA_TRANSPORT Media Transports
- * @ingroup PJMEDIA
+ * @defgroup PJMEDIA_TRANSPORT Media Transport
  * @brief Transports.
- * Transport related components.
- */
-
-/**
- * @defgroup PJMEDIA_TRANSPORT_H Media Network Transport Interface
- * @ingroup PJMEDIA_TRANSPORT
- * @brief PJMEDIA object for sending/receiving media packets over the network
  * @{
  * The media transport (#pjmedia_transport) is the object to send and
  * receive media packets over the network. The media transport interface
  * allows the library to be extended to support different types of 
- * transports to send and receive packets. Currently only the standard
- * UDP transport implementation is provided (see \ref PJMEDIA_TRANSPORT_UDP),
- * but application designer may extend the library to support other types
- * of custom transports such as RTP/RTCP over TCP, RTP/RTCP over HTTP, etc.
+ * transports to send and receive packets.
  *
  * The media transport is declared as #pjmedia_transport "class", which
@@ -63,5 +52,5 @@
 
 
- * \section PJMEDIA_TRANSPORT_H_USING Using the Media Transport
+ * \section PJMEDIA_TRANSPORT_H_USING Basic Media Transport Usage
  *
  * The media transport's life-cycle normally follows the following stages.
@@ -142,36 +131,69 @@
  *
  *
- * \section PJMEDIA_TRANSPORT_H_EXT Media Transport Extended API
+ * \section offer_answer Interaction with SDP Offer/Answer
  
-   Apart from the basic interface above, the media transport provides some
-   more APIs:
-
-    - pjmedia_transport_media_create()
-   \n
-      This API is provided to allow the media transport to add more information
-      in the SDP offer, before the offer is sent to remote. Additionally, for 
-      answerer side, this callback allows the media transport to reject the 
-      offer before this offer is processed by the SDP negotiator. 
-
-    - pjmedia_transport_media_start()
-    \n
-      This API should be called after offer and answer are negotiated, and 
-      both SDPs are available, and before the media is started. For answerer
-      side, this callback will be called before the answer is sent to remote,
-      to allow media transport to put additional info in the SDP. For 
-      offerer side, this callback will be called after SDP answer is 
-      received. In this callback, the media transport has the final chance 
-      to negotiate/validate the offer and answer before media is really 
-      started (and answer is sent, for answerer side). 
-
-    - pjmedia_transport_media_stop()
-    \n
-      This API should be called when the media is stopped, to allow the media
-      transport to release its resources. 
-
-    - pjmedia_transport_simulate_lost()
-    \n
-      This API can be used to instruct media transport to simulate packet lost
-      on a particular direction.
+   For basic UDP transport, the \ref PJMEDIA_TRANSPORT_H_USING above is
+   sufficient to use the media transport. However, more complex media
+   transports such as \ref PJMEDIA_TRANSPORT_SRTP and \ref
+   PJMEDIA_TRANSPORT_ICE requires closer interactions with SDP offer and
+   answer negotiation.
+
+   The media transports can interact with the SDP offer/answer via
+   these APIs:
+     - #pjmedia_transport_media_create(), to initialize the media transport
+       for new media session,
+     - #pjmedia_transport_encode_sdp(), to encode SDP offer or answer,
+     - #pjmedia_transport_media_start(), to activate the settings that
+       have been negotiated by SDP offer answer, and
+     - #pjmedia_transport_media_stop(), to deinitialize the media transport
+       and reset the transport to its idle state.
+   
+   The usage of these API in the context of SDP offer answer will be 
+   described below.
+
+   \subsection media_create Initializing Transport for New Session
+
+   Application must call #pjmedia_transport_media_create() before using
+   the transport for a new session.
+
+   \subsection creat_oa Creating SDP Offer and Answer
+
+   The #pjmedia_transport_encode_sdp() is used to put additional information
+   from the transport to the local SDP, before the SDP is sent and negotiated
+   with remote SDP.
+
+   When creating an offer, call #pjmedia_transport_encode_sdp() with
+   local SDP (and NULL as \a rem_sdp). The media transport will add the
+   relevant attributes in the local SDP. Application then gives the local
+   SDP to the invite session to be sent to remote agent.
+
+   When creating an answer, also call #pjmedia_transport_encode_sdp(),
+   but this time specify both local and remote SDP to the function. The 
+   media transport will once again modify the local SDP and add relevant
+   attributes to the local SDP, if the appropriate attributes related to
+   the transport functionality are present in remote offer. The remote
+   SDP does not contain the relevant attributes, then the specific transport
+   functionality will not be activated for the session.
+
+   The #pjmedia_transport_encode_sdp() should also be called when application
+   sends subsequent SDP offer or answer. The media transport will encode
+   the appropriate attributes based on the state of the session.
+
+   \subsection media_start Offer/Answer Completion
+
+   Once both local and remote SDP have been negotiated by the 
+   \ref PJMEDIA_SDP_NEG (normally this is part of PJSIP invite session),
+   application should give both local and remote SDP to 
+   #pjmedia_transport_media_start() so that the settings are activated
+   for the session. This function should be called for both initial and
+   subsequent SDP negotiation.
+
+   \subsection media_stop Stopping Transport
+
+   Once session is stop application must call #pjmedia_transport_media_stop()
+   to deactivate the transport feature. Application may reuse the transport
+   for subsequent media session by repeating the #pjmedia_transport_media_create(),
+   #pjmedia_transport_encode_sdp(), #pjmedia_transport_media_start(), and
+   #pjmedia_transport_media_stop() above.
 
  * \section PJMEDIA_TRANSPORT_H_IMPL Implementing Media Transport
@@ -199,12 +221,10 @@
  * example, to send RTP/RTCP packets).
  *
- * For an example of media transport implementation, please refer to 
- * <tt>transport_udp.h</tt> and <tt>transport_udp.c</tt> in PJMEDIA source
- * distribution.
- */
+ */
+
+
+#include <pjmedia/sdp.h>
 
 PJ_BEGIN_DECL
-
-#include <pjmedia/sdp.h>
 
 
@@ -347,5 +367,5 @@
     /**
      * This function is called by application to start the transport
-     * based on SDP negotiation result.
+     * based on local and remote SDP.
      *
      * Application should call #pjmedia_transport_media_start() instead of 
@@ -414,5 +434,5 @@
 
 /**
- * This structure declares stream transport. A stream transport is called
+ * This structure declares media transport. A media transport is called
  * by the stream to transmit a packet, and will notify stream when
  * incoming packet is arrived.
@@ -638,6 +658,5 @@
 
 /**
- * Prepare the media transport for a new media session, and optionally
- * encode the relevant information in the \a sdp_local. Application must
+ * Prepare the media transport for a new media session, Application must
  * call this function before starting a new media session using this
  * transport.
@@ -649,6 +668,7 @@
  * @param sdp_pool	Pool object to allocate memory related to SDP
  *			messaging components.
- * @param option	Option flags, from #pjmedia_tranport_media_option
- * @param rem_sdp	Remote SDP if it's available.
+ * @param options	Option flags, from #pjmedia_tranport_media_option
+ * @param rem_sdp	Remote SDP if local SDP is an answer, otherwise
+ *			specify NULL if SDP is an offer.
  * @param media_index	Media index in SDP.
  *
@@ -668,6 +688,6 @@
 /**
  * Put transport specific information into the SDP. This function can be
- * called to create SDP offer or answer, depending whether \a rem_sdp
- * parameter is present.
+ * called to put transport specific information in the initial or
+ * subsequent SDP offer or answer.
  *
  * This is just a simple wrapper which calls <tt>encode_sdp()</tt> member 
@@ -679,5 +699,6 @@
  * @param sdp		The local SDP to be filled in information from the
  *			media transport.
- * @param rem_sdp	Remote SDP if it's available.
+ * @param rem_sdp	Remote SDP if local SDP is an answer, otherwise
+ *			specify NULL if SDP is an offer.
  * @param media_index	Media index in SDP.
  *
@@ -695,13 +716,9 @@
 
 /**
- * Start the transport with regards to SDP negotiation result. 
- * This API should be called after offer and answer are negotiated, and 
- * both SDPs are available, and before the media is started. For answerer
- * side, this callback will be called before the answer is sent to remote,
- * to allow media transport to put additional info in the SDP. For 
- * offerer side, this callback will be called after SDP answer is 
- * received. In this callback, the media transport has the final chance 
- * to negotiate/validate the offer and answer before media is really 
- * started (and answer is sent, for answerer side). 
+ * Start the transport session with the settings in both local and remote 
+ * SDP. The actual work that is done by this function depends on the 
+ * underlying transport type. For SRTP, this will activate the encryption
+ * and decryption based on the keys found the SDPs. For ICE, this will
+ * start ICE negotiation according to the information found in the SDPs.
  *
  * This is just a simple wrapper which calls <tt>media_start()</tt> member 
@@ -710,8 +727,7 @@
  * @param tp		The media transport.
  * @param tmp_pool	The memory pool for allocating temporary objects.
- * @param option	The media transport option.
  * @param sdp_local	Local SDP.
  * @param sdp_remote	Remote SDP.
- * @param media_index	Media index to start.
+ * @param media_index	Media index in the SDP.
  *
  * @return		PJ_SUCCESS on success, or the appropriate error code.
@@ -729,7 +745,6 @@
 
 /**
- * Stop the transport. 
- * This API should be called when the media is stopped, to allow the media
- * transport to release its resources. 
+ * This API should be called when the session is stopped, to allow the media
+ * transport to release its resources used for the session.
  *
  * This is just a simple wrapper which calls <tt>media_stop()</tt> member 
Index: /pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h	(revision 2037)
@@ -31,8 +31,11 @@
 
 /**
- * @defgroup PJMEDIA_TRANSPORT_ICE ICE Capable media transport 
+ * @defgroup PJMEDIA_TRANSPORT_ICE ICE Media Transport 
  * @ingroup PJMEDIA_TRANSPORT
- * @brief Implementation of media transport with ICE.
+ * @brief Interactive Connectivity Establishment (ICE) transport
  * @{
+ *
+ * This describes the implementation of media transport using
+ * Interactive Connectivity Establishment (ICE) protocol.
  */
 
@@ -58,6 +61,20 @@
 } pjmedia_ice_cb;
 
+
 /**
- * Create the media transport.
+ * Create the Interactive Connectivity Establishment (ICE) media transport
+ * using the specified configuration. When STUN or TURN (or both) is used,
+ * the creation operation will complete asynchronously, when STUN resolution
+ * and TURN allocation completes. When the initialization completes, the
+ * \a on_ice_complete() complete will be called with \a op parameter equal
+ * to PJ_ICE_STRANS_OP_INIT.
+ *
+ * In addition, this transport will also notify the application about the
+ * result of ICE negotiation, also in \a on_ice_complete() callback. In this
+ * case the callback will be called with \a op parameter equal to
+ * PJ_ICE_STRANS_OP_NEGOTIATION.
+ *
+ * Other than this, application should use the \ref PJMEDIA_TRANSPORT API
+ * to manipulate this media transport.
  *
  * @param endpt		The media endpoint.
@@ -66,5 +83,5 @@
  * @param comp_cnt	Number of components to be created.
  * @param cfg		Pointer to configuration settings.
- * @param cb		Optional callbacks.
+ * @param cb		Optional structure containing ICE specific callbacks.
  * @param p_tp		Pointer to receive the media transport instance.
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/transport_srtp.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/transport_srtp.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/transport_srtp.h	(revision 2037)
@@ -21,5 +21,5 @@
 
 /**
- * @file srtp.h
+ * @file transport_srtp.h
  * @brief Secure RTP (SRTP) transport.
  */
@@ -29,5 +29,5 @@
 
 /**
- * @defgroup PJMEDIA_TRANSPORT_SRTP Secure RTP (SRTP) Transport Adapter
+ * @defgroup PJMEDIA_TRANSPORT_SRTP Secure RTP (SRTP) Media Transport
  * @ingroup PJMEDIA_TRANSPORT
  * @brief Media transport adapter to add SRTP feature to existing transports
@@ -35,5 +35,5 @@
  *
  * This module implements SRTP as described by RFC 3711, using RFC 4568 as
- * key exchange method. It implements \ref PJMEDIA_TRANSPORT_H to integrate
+ * key exchange method. It implements \ref PJMEDIA_TRANSPORT to integrate
  * with the rest of PJMEDIA framework.
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/transport_udp.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/transport_udp.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/transport_udp.h	(revision 2037)
@@ -30,8 +30,12 @@
 
 /**
- * @defgroup PJMEDIA_TRANSPORT_UDP UDP Socket Transport
+ * @defgroup PJMEDIA_TRANSPORT_UDP UDP Media Transport
  * @ingroup PJMEDIA_TRANSPORT
  * @brief Implementation of media transport with UDP sockets.
  * @{
+ *
+ * The UDP media transport is the standard based media transport
+ * as described by RFC 3550/3551. It can be used to facilitate RTP/RTCP
+ * unicast or multicast communication.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/types.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/types.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/types.h	(revision 2037)
@@ -29,13 +29,13 @@
 #include <pj/string.h>	    /* pj_memcpy(), pj_memset() */
 
-
-/**
- * @defgroup PJMEDIA_FRAME_OP Frame Operations
- * @ingroup PJMEDIA
- */
-
-/**
- * @defgroup PJMEDIA_MISC Misc
- * @ingroup PJMEDIA
+/**
+ * @defgroup PJMEDIA_PORT Media Ports Framework
+ * @brief Extensible framework for media terminations
+ */
+
+
+/**
+ * @defgroup PJMEDIA_FRAME_OP Audio Manipulation Algorithms
+ * @brief Algorithms to manipulate audio frames
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/wav_playlist.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/wav_playlist.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/wav_playlist.h	(revision 2037)
@@ -34,6 +34,7 @@
  * @defgroup PJMEDIA_WAV_PLAYLIST WAV File Play List
  * @ingroup PJMEDIA_PORT
- * @brief WAV File Playlist
+ * @brief Audio playback of multiple WAV files
  * @{
+ *
  * The WAV play list port enables application to play back multiple
  * WAV files in a playlist.
Index: /pjproject/trunk/pjmedia/include/pjmedia/wav_port.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/wav_port.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/wav_port.h	(revision 2037)
@@ -34,5 +34,5 @@
  * @defgroup PJMEDIA_FILE_PLAY WAV File Player
  * @ingroup PJMEDIA_PORT
- * @brief WAV File Player
+ * @brief Audio playback from WAV file
  * @{
  */
@@ -138,5 +138,5 @@
  * @defgroup PJMEDIA_FILE_REC File Writer (Recorder)
  * @ingroup PJMEDIA_PORT
- * @brief WAV File Writer (Recorder)
+ * @brief Audio capture/recording to WAV file
  * @{
  */
Index: /pjproject/trunk/pjmedia/include/pjmedia/wave.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/wave.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/wave.h	(revision 2037)
@@ -27,11 +27,19 @@
 #include <pjmedia/types.h>
 
+/**
+ * @defgroup PJMEDIA_FILE_FORMAT File Formats
+ * @brief Supported file formats
+ */
+
 
 /**
  * @defgroup PJMEDIA_WAVE WAVE Header
- * @ingroup PJMEDIA_MISC
+ * @ingroup PJMEDIA_FILE_FORMAT
+ * @brief Representation of RIFF/WAVE file format
  * @{
  *
- * Supports for simple/canonical Microsoft RIFF WAVE format.
+ * This the the low level representation of RIFF/WAVE file format. For
+ * higher abstraction, please see \ref PJMEDIA_FILE_PLAY and 
+ * \ref PJMEDIA_FILE_REC.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/wsola.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/wsola.h	(revision 2036)
+++ /pjproject/trunk/pjmedia/include/pjmedia/wsola.h	(revision 2037)
@@ -29,5 +29,7 @@
  * @defgroup PJMED_WSOLA Waveform Similarity Based Overlap-Add (WSOLA)
  * @ingroup PJMEDIA_FRAME_OP
+ * @brief Time-scale modification to audio without affecting the pitch
  * @{
+ *
  * This section describes Waveform Similarity Based Overlap-Add (WSOLA)
  * implementation in PJMEDIA. The WSOLA API here can be used both to 
@@ -35,4 +37,6 @@
  * without altering the pitch, or as a mean for performing packet loss
  * concealment (WSOLA).
+ *
+ * The WSOLA implementation is used by \ref PJMED_DELAYBUF and \ref PJMED_PLC.
  */
 
Index: /pjproject/trunk/pjnath/build/Makefile
===================================================================
--- /pjproject/trunk/pjnath/build/Makefile	(revision 2036)
+++ /pjproject/trunk/pjnath/build/Makefile	(revision 2037)
@@ -79,5 +79,9 @@
 
 doc:
-	cd .. && doxygen docs/doxygen.cfg
+	cd .. && rm -rf docs/html docs/latex && doxygen docs/doxygen.cfg
+	@if test ! "$(WWWDIR)" == ""; then \
+		echo "Copying to $(WWWDIR)/pjnath/docs/html.." ; \
+		cp -a ../docs/html/* $(WWWDIR)/pjnath/docs/html/ ; \
+	fi
 
 dep: depend
Index: /pjproject/trunk/pjnath/docs/doxygen.cfg
===================================================================
--- /pjproject/trunk/pjnath/docs/doxygen.cfg	(revision 2036)
+++ /pjproject/trunk/pjnath/docs/doxygen.cfg	(revision 2037)
@@ -295,4 +295,5 @@
 
 SHOW_USED_FILES        = YES
+TYPEDEF_HIDES_STRUCT	= YES
 
 #---------------------------------------------------------------------------
@@ -871,10 +872,10 @@
 # The TAGFILES tag can be used to specify one or more tagfiles.
 
-TAGFILES               = 
+TAGFILES               = ../pjlib/docs/pjlib.tag=../../../pjlib/docs/html ../pjlib-util/docs/pjlib-util.tag=../../../pjlib-util/docs/html ../pjsip/docs/pjsip.tag=../../../pjsip/docs/html ../pjmedia/docs/pjmedia.tag=../../../pjmedia/docs/html
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create 
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       = ../pjnath/docs/pjnath.tag
 
 # If the ALLEXTERNALS tag is set to YES all external classes will be listed 
@@ -888,10 +889,11 @@
 # be listed.
 
-EXTERNAL_GROUPS        = YES
+EXTERNAL_GROUPS        = NO
 
 # The PERL_PATH should be the absolute path and name of the perl script 
 # interpreter (i.e. the result of `which perl').
 
-PERL_PATH              = /usr/bin/perl
+#PERL_PATH              = /usr/bin/perl
+PERL_PATH              = /c/Perl/bin/perl
 
 #---------------------------------------------------------------------------
Index: /pjproject/trunk/pjnath/docs/footer.html
===================================================================
--- /pjproject/trunk/pjnath/docs/footer.html	(revision 2036)
+++ /pjproject/trunk/pjnath/docs/footer.html	(revision 2037)
@@ -2,5 +2,5 @@
 <hr><center>
 PJNATH - Open Source NAT traversal helper library supporting STUN, TURN, and ICE<br>
-(C)2001-2007 Benny Prijono
+(C)2001-2008 Benny Prijono
 </center>
 
Index: /pjproject/trunk/pjnath/include/pjnath/stun_sock.h
===================================================================
--- /pjproject/trunk/pjnath/include/pjnath/stun_sock.h	(revision 2036)
+++ /pjproject/trunk/pjnath/include/pjnath/stun_sock.h	(revision 2037)
@@ -38,4 +38,5 @@
  * @ingroup PJNATH_STUN
  * @{
+ *
  * The STUN transport provides asynchronous UDP like socket transport
  * with the additional capability to query the publicly mapped transport
@@ -129,5 +130,5 @@
      *    set to PJ_STUN_SOCK_BINDING_OP \a status  argument set to 
      *    PJ_SUCCESS.
-     *  - anytime when the transport has detected that the publicly mapped
+     *	- anytime when the transport has detected that the publicly mapped
      *    address has changed, this callback will be called with \a op
      *    argument set to PJ_STUN_SOCK_KEEP_ALIVE_OP and \a status
@@ -135,5 +136,5 @@
      *    application will get the resolved public address in the
      *    #pj_stun_sock_info structure.
-     *  - for any terminal error (such as STUN time-out, DNS resolution
+     *	- for any terminal error (such as STUN time-out, DNS resolution
      *    failure, or keep-alive failure), this callback will be called 
      *	  with the \a status argument set to non-PJ_SUCCESS.
Index: /pjproject/trunk/pjsip-apps/build/Makefile
===================================================================
--- /pjproject/trunk/pjsip-apps/build/Makefile	(revision 2036)
+++ /pjproject/trunk/pjsip-apps/build/Makefile	(revision 2037)
@@ -51,5 +51,4 @@
 
 doc:
-	cd .. && doxygen docs/doxygen.cfg
 
 dep: depend
Index: /pjproject/trunk/pjsip/build/Makefile
===================================================================
--- /pjproject/trunk/pjsip/build/Makefile	(revision 2036)
+++ /pjproject/trunk/pjsip/build/Makefile	(revision 2037)
@@ -110,5 +110,9 @@
 
 doc:
-	cd .. && doxygen docs/doxygen.cfg
+	cd .. && rm -rf docs/html docs/latex && doxygen docs/doxygen.cfg
+	@if test ! "$(WWWDIR)" == ""; then \
+		echo "Copying to $(WWWDIR)/pjsip/docs/html.." ; \
+		cp -a ../docs/html/* $(WWWDIR)/pjsip/docs/html/ ; \
+	fi
 
 dep: depend
Index: /pjproject/trunk/pjsip/docs/doxygen.cfg
===================================================================
--- /pjproject/trunk/pjsip/docs/doxygen.cfg	(revision 2036)
+++ /pjproject/trunk/pjsip/docs/doxygen.cfg	(revision 2037)
@@ -296,4 +296,5 @@
 
 SHOW_USED_FILES        = YES
+TYPEDEF_HIDES_STRUCT	= YES
 
 #---------------------------------------------------------------------------
@@ -870,10 +871,10 @@
 # The TAGFILES tag can be used to specify one or more tagfiles.
 
-TAGFILES               = 
+TAGFILES               = ../pjlib/docs/pjlib.tag=../../../pjlib/docs/html ../pjlib-util/docs/pjlib-util.tag=../../../pjlib-util/docs/html ../pjnath/docs/pjnath.tag=../../../pjnath/docs/html ../pjmedia/docs/pjmedia.tag=../../../pjmedia/docs/html
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create 
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       = docs/pjsip.tag
 
 # If the ALLEXTERNALS tag is set to YES all external classes will be listed 
@@ -887,10 +888,11 @@
 # be listed.
 
-EXTERNAL_GROUPS        = YES
+EXTERNAL_GROUPS        = NO
 
 # The PERL_PATH should be the absolute path and name of the perl script 
 # interpreter (i.e. the result of `which perl').
 
-PERL_PATH              = /usr/bin/perl
+#PERL_PATH              = /usr/bin/perl
+PERL_PATH              = /c/Perl/bin/perl
 
 #---------------------------------------------------------------------------
Index: /pjproject/trunk/pjsip/docs/footer.html
===================================================================
--- /pjproject/trunk/pjsip/docs/footer.html	(revision 2036)
+++ /pjproject/trunk/pjsip/docs/footer.html	(revision 2037)
@@ -2,5 +2,5 @@
 <hr><center>
 PJSIP Open Source, high performance, small footprint, and very very portable SIP stack<br>
-(C)2003-2007 Benny Prijono
+(C)2003-2008 Benny Prijono
 </center>
 <!--#include virtual="/footer.html" -->
Index: /pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h	(revision 2036)
+++ /pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h	(revision 2037)
@@ -32,5 +32,4 @@
 /**
  * @defgroup PJSIP_HIGH_UA User Agent Library
- * @ingroup PJSIP
  * @brief Mid-level User Agent Library.
  *
Index: /pjproject/trunk/pjsip/include/pjsip/sip_config.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip/sip_config.h	(revision 2036)
+++ /pjproject/trunk/pjsip/include/pjsip/sip_config.h	(revision 2037)
@@ -27,10 +27,5 @@
 
 /**
- * @defgroup PJSIP PJSIP Library Collection
- */
-
-/**
  * @defgroup PJSIP_CORE Core SIP Library
- * @ingroup PJSIP
  * @brief The core framework from which all other SIP components depends on.
  * 
Index: /pjproject/trunk/pjsip/include/pjsip/sip_transaction.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip/sip_transaction.h	(revision 2036)
+++ /pjproject/trunk/pjsip/include/pjsip/sip_transaction.h	(revision 2037)
@@ -34,5 +34,4 @@
 /**
  * @defgroup PJSIP_TRANSACT Transaction Layer
- * @ingroup PJSIP
  * @brief Provides statefull message processing.
  *
Index: /pjproject/trunk/pjsip/include/pjsip/sip_ua_layer.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip/sip_ua_layer.h	(revision 2036)
+++ /pjproject/trunk/pjsip/include/pjsip/sip_ua_layer.h	(revision 2037)
@@ -31,5 +31,4 @@
 /**
  * @defgroup PJSIP_UA Base User Agent Layer/Common Dialog Layer
- * @ingroup PJSIP
  * @brief Dialog management.
  *
Index: /pjproject/trunk/pjsip/include/pjsip/sip_util.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip/sip_util.h	(revision 2036)
+++ /pjproject/trunk/pjsip/include/pjsip/sip_util.h	(revision 2037)
@@ -583,5 +583,4 @@
 /**
  * @defgroup PJSIP_PROXY_CORE Core Proxy Layer
- * @ingroup PJSIP
  * @brief Core proxy operations
  * @{
Index: /pjproject/trunk/pjsip/include/pjsip_simple.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip_simple.h	(revision 2036)
+++ /pjproject/trunk/pjsip/include/pjsip_simple.h	(revision 2037)
@@ -20,5 +20,4 @@
 /**
  * @defgroup PJSIP_SIMPLE Event and Presence Framework
- * @ingroup PJSIP
  */
 
Index: /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 2036)
+++ /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 2037)
@@ -56,5 +56,4 @@
 /**
  * @defgroup PJSUA_LIB PJSUA API - High Level Softphone API for C/C++ and Python
- * @ingroup PJSIP
  * @brief Very high level API for constructing SIP UA applications.
  * @{
Index: /pjproject/trunk/third_party/build/Makefile
===================================================================
--- /pjproject/trunk/third_party/build/Makefile	(revision 2036)
+++ /pjproject/trunk/third_party/build/Makefile	(revision 2037)
@@ -13,2 +13,4 @@
 	done
 
+doc:
+	
