[xiph-commits] r11117 - in trunk/ogg2: . debian doc doc/ogg2 include include/ogg src

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Apr 10 12:15:08 PDT 2006


Author: xiphmont
Date: 2006-04-10 12:14:33 -0700 (Mon, 10 Apr 2006)
New Revision: 11117

Added:
   trunk/ogg2/doc/ogg2/
   trunk/ogg2/doc/ogg2/.cvsignore
   trunk/ogg2/doc/ogg2/Makefile.am
   trunk/ogg2/doc/ogg2/bitpacking.html
   trunk/ogg2/doc/ogg2/datastructures.html
   trunk/ogg2/doc/ogg2/decoding.html
   trunk/ogg2/doc/ogg2/encoding.html
   trunk/ogg2/doc/ogg2/general.html
   trunk/ogg2/doc/ogg2/index.html
   trunk/ogg2/doc/ogg2/ogg_packet.html
   trunk/ogg2/doc/ogg2/ogg_packet_clear.html
   trunk/ogg2/doc/ogg2/ogg_page.html
   trunk/ogg2/doc/ogg2/ogg_page_bos.html
   trunk/ogg2/doc/ogg2/ogg_page_checksum_set.html
   trunk/ogg2/doc/ogg2/ogg_page_continued.html
   trunk/ogg2/doc/ogg2/ogg_page_eos.html
   trunk/ogg2/doc/ogg2/ogg_page_granulepos.html
   trunk/ogg2/doc/ogg2/ogg_page_packets.html
   trunk/ogg2/doc/ogg2/ogg_page_pageno.html
   trunk/ogg2/doc/ogg2/ogg_page_serialno.html
   trunk/ogg2/doc/ogg2/ogg_page_version.html
   trunk/ogg2/doc/ogg2/ogg_stream_clear.html
   trunk/ogg2/doc/ogg2/ogg_stream_destroy.html
   trunk/ogg2/doc/ogg2/ogg_stream_eos.html
   trunk/ogg2/doc/ogg2/ogg_stream_flush.html
   trunk/ogg2/doc/ogg2/ogg_stream_init.html
   trunk/ogg2/doc/ogg2/ogg_stream_packetin.html
   trunk/ogg2/doc/ogg2/ogg_stream_packetout.html
   trunk/ogg2/doc/ogg2/ogg_stream_packetpeek.html
   trunk/ogg2/doc/ogg2/ogg_stream_pagein.html
   trunk/ogg2/doc/ogg2/ogg_stream_pageout.html
   trunk/ogg2/doc/ogg2/ogg_stream_reset.html
   trunk/ogg2/doc/ogg2/ogg_stream_reset_serialno.html
   trunk/ogg2/doc/ogg2/ogg_stream_state.html
   trunk/ogg2/doc/ogg2/ogg_sync_buffer.html
   trunk/ogg2/doc/ogg2/ogg_sync_clear.html
   trunk/ogg2/doc/ogg2/ogg_sync_destroy.html
   trunk/ogg2/doc/ogg2/ogg_sync_init.html
   trunk/ogg2/doc/ogg2/ogg_sync_pageout.html
   trunk/ogg2/doc/ogg2/ogg_sync_pageseek.html
   trunk/ogg2/doc/ogg2/ogg_sync_reset.html
   trunk/ogg2/doc/ogg2/ogg_sync_state.html
   trunk/ogg2/doc/ogg2/ogg_sync_wrote.html
   trunk/ogg2/doc/ogg2/oggpack_adv.html
   trunk/ogg2/doc/ogg2/oggpack_adv1.html
   trunk/ogg2/doc/ogg2/oggpack_bits.html
   trunk/ogg2/doc/ogg2/oggpack_buffer.html
   trunk/ogg2/doc/ogg2/oggpack_bytes.html
   trunk/ogg2/doc/ogg2/oggpack_get_buffer.html
   trunk/ogg2/doc/ogg2/oggpack_look.html
   trunk/ogg2/doc/ogg2/oggpack_look1.html
   trunk/ogg2/doc/ogg2/oggpack_read.html
   trunk/ogg2/doc/ogg2/oggpack_read1.html
   trunk/ogg2/doc/ogg2/oggpack_readinit.html
   trunk/ogg2/doc/ogg2/oggpack_reset.html
   trunk/ogg2/doc/ogg2/oggpack_write.html
   trunk/ogg2/doc/ogg2/oggpack_writealign.html
   trunk/ogg2/doc/ogg2/oggpack_writeclear.html
   trunk/ogg2/doc/ogg2/oggpack_writecopy.html
   trunk/ogg2/doc/ogg2/oggpack_writeinit.html
   trunk/ogg2/doc/ogg2/oggpack_writetrunc.html
   trunk/ogg2/doc/ogg2/overview.html
   trunk/ogg2/doc/ogg2/reference.html
   trunk/ogg2/doc/ogg2/style.css
   trunk/ogg2/doc/ogg2/vorbis_comment.html
   trunk/ogg2/doc/ogg2/vorbis_info.html
   trunk/ogg2/include/ogg/Makefile.am
   trunk/ogg2/include/ogg/config_types.h.in
   trunk/ogg2/include/ogg/mutex.c
   trunk/ogg2/include/ogg/ogg.h
   trunk/ogg2/include/ogg/ogg2.h
   trunk/ogg2/include/ogg/os_types.h
   trunk/ogg2/libogg2.spec.in
   trunk/ogg2/ogg2-uninstalled.pc.in
   trunk/ogg2/ogg2.m4
   trunk/ogg2/ogg2.pc.in
Removed:
   trunk/ogg2/doc/ogg2/.cvsignore
   trunk/ogg2/doc/ogg2/Makefile.am
   trunk/ogg2/doc/ogg2/bitpacking.html
   trunk/ogg2/doc/ogg2/datastructures.html
   trunk/ogg2/doc/ogg2/decoding.html
   trunk/ogg2/doc/ogg2/encoding.html
   trunk/ogg2/doc/ogg2/general.html
   trunk/ogg2/doc/ogg2/index.html
   trunk/ogg2/doc/ogg2/ogg_packet.html
   trunk/ogg2/doc/ogg2/ogg_packet_clear.html
   trunk/ogg2/doc/ogg2/ogg_page.html
   trunk/ogg2/doc/ogg2/ogg_page_bos.html
   trunk/ogg2/doc/ogg2/ogg_page_checksum_set.html
   trunk/ogg2/doc/ogg2/ogg_page_continued.html
   trunk/ogg2/doc/ogg2/ogg_page_eos.html
   trunk/ogg2/doc/ogg2/ogg_page_granulepos.html
   trunk/ogg2/doc/ogg2/ogg_page_packets.html
   trunk/ogg2/doc/ogg2/ogg_page_pageno.html
   trunk/ogg2/doc/ogg2/ogg_page_serialno.html
   trunk/ogg2/doc/ogg2/ogg_page_version.html
   trunk/ogg2/doc/ogg2/ogg_stream_clear.html
   trunk/ogg2/doc/ogg2/ogg_stream_destroy.html
   trunk/ogg2/doc/ogg2/ogg_stream_eos.html
   trunk/ogg2/doc/ogg2/ogg_stream_flush.html
   trunk/ogg2/doc/ogg2/ogg_stream_init.html
   trunk/ogg2/doc/ogg2/ogg_stream_packetin.html
   trunk/ogg2/doc/ogg2/ogg_stream_packetout.html
   trunk/ogg2/doc/ogg2/ogg_stream_packetpeek.html
   trunk/ogg2/doc/ogg2/ogg_stream_pagein.html
   trunk/ogg2/doc/ogg2/ogg_stream_pageout.html
   trunk/ogg2/doc/ogg2/ogg_stream_reset.html
   trunk/ogg2/doc/ogg2/ogg_stream_reset_serialno.html
   trunk/ogg2/doc/ogg2/ogg_stream_state.html
   trunk/ogg2/doc/ogg2/ogg_sync_buffer.html
   trunk/ogg2/doc/ogg2/ogg_sync_clear.html
   trunk/ogg2/doc/ogg2/ogg_sync_destroy.html
   trunk/ogg2/doc/ogg2/ogg_sync_init.html
   trunk/ogg2/doc/ogg2/ogg_sync_pageout.html
   trunk/ogg2/doc/ogg2/ogg_sync_pageseek.html
   trunk/ogg2/doc/ogg2/ogg_sync_reset.html
   trunk/ogg2/doc/ogg2/ogg_sync_state.html
   trunk/ogg2/doc/ogg2/ogg_sync_wrote.html
   trunk/ogg2/doc/ogg2/oggpack_adv.html
   trunk/ogg2/doc/ogg2/oggpack_adv1.html
   trunk/ogg2/doc/ogg2/oggpack_bits.html
   trunk/ogg2/doc/ogg2/oggpack_buffer.html
   trunk/ogg2/doc/ogg2/oggpack_bytes.html
   trunk/ogg2/doc/ogg2/oggpack_get_buffer.html
   trunk/ogg2/doc/ogg2/oggpack_look.html
   trunk/ogg2/doc/ogg2/oggpack_look1.html
   trunk/ogg2/doc/ogg2/oggpack_read.html
   trunk/ogg2/doc/ogg2/oggpack_read1.html
   trunk/ogg2/doc/ogg2/oggpack_readinit.html
   trunk/ogg2/doc/ogg2/oggpack_reset.html
   trunk/ogg2/doc/ogg2/oggpack_write.html
   trunk/ogg2/doc/ogg2/oggpack_writealign.html
   trunk/ogg2/doc/ogg2/oggpack_writeclear.html
   trunk/ogg2/doc/ogg2/oggpack_writecopy.html
   trunk/ogg2/doc/ogg2/oggpack_writeinit.html
   trunk/ogg2/doc/ogg2/oggpack_writetrunc.html
   trunk/ogg2/doc/ogg2/overview.html
   trunk/ogg2/doc/ogg2/reference.html
   trunk/ogg2/doc/ogg2/style.css
   trunk/ogg2/doc/ogg2/vorbis_comment.html
   trunk/ogg2/doc/ogg2/vorbis_info.html
   trunk/ogg2/libogg.spec
   trunk/ogg2/ogg.m4
Modified:
   trunk/ogg2/HACKING
   trunk/ogg2/Makefile.am
   trunk/ogg2/README
   trunk/ogg2/autogen.sh
   trunk/ogg2/configure.in
   trunk/ogg2/debian/rules
   trunk/ogg2/doc/Makefile.am
   trunk/ogg2/include/Makefile.am
   trunk/ogg2/src/Makefile.am
   trunk/ogg2/src/bitwise.c
   trunk/ogg2/src/buffer.c
   trunk/ogg2/src/bytewise.c
   trunk/ogg2/src/mutex.h
   trunk/ogg2/src/ogginternal.h
   trunk/ogg2/src/stream.c
   trunk/ogg2/src/sync.c
Log:
Merge arc's libogg2 branch to mainstream.  This implements:
namespace change
discontinuous flag
packets flag
continued flag
(these are still being tested)

Does not yet implement:
libogg1 compat layer



Modified: trunk/ogg2/HACKING
===================================================================
--- trunk/ogg2/HACKING	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/HACKING	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,22 +1,22 @@
 Note that these instructions are *not* necessary for distribution
 tarballs; they have separate configure/build instructions.  
 
-Building this package from CVS is mainly intended for developers.
+Building this package from SVN is mainly intended for developers.
 General users should obtain official distribution packages; both
 source and binary distributions are available at
 http://www.vorbis.com/.
 
 -----
 
-These are *brief* instructions on how to build this package from CVS.
+These are *brief* instructions on how to build this package from SVN.
 Yes, there are details left out.
 
-There are generally four steps necessary when building from CVS (i.e.,
+There are generally four steps necessary when building from SVN (i.e.,
 a developer's copy):
 
-1. cvs checkout of the sources, or cvs update.  RTFM from your
-   favorite flavor of CVS documentation; information on the xiph.org
-   CVS repository can be found at http://www.xiph.org/cvs.html.
+1. SVN checkout of the sources, or SVN update.  RTFM from your
+   favorite flavor of SVN documentation; information on the xiph.org
+   SVN repository can be found at http://svn.xiph.org/
 
 2. [re-]generate files such as "configure" and "Makefile.in" with the
    GNU autoconf/automake tools.  Run the "autogen.sh" script to
@@ -37,7 +37,7 @@
 4. Run "make" to build the source.  
 
 In general, steps 2 and 3 need to be re-run every time any of the
-following files are modified (either manually or by a cvs update):
+following files are modified (either manually or by a SVN update):
 
 	  configure.in
 	  acinclude.m4

Modified: trunk/ogg2/Makefile.am
===================================================================
--- trunk/ogg2/Makefile.am	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/Makefile.am	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,15 +1,18 @@
 ## Process this file with automake to produce Makefile.in
 
-AUTOMAKE_OPTIONS = foreign dist-zip
+AUTOMAKE_OPTIONS = foreign 1.6 dist-zip
 
 SUBDIRS = src include doc win32 debian
 
 m4datadir = $(datadir)/aclocal
-m4data_DATA = ogg.m4
+m4data_DATA = ogg2.m4
 
-EXTRA_DIST = README AUTHORS CHANGES COPYING libogg.spec ogg.m4 \
+EXTRA_DIST = README AUTHORS CHANGES COPYING libogg2.spec ogg2.m4 \
 	macos macosx
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ogg2.pc
+
 dist-hook:
 	rm -rf `find $(distdir)/macos -name CVS`
 	rm -rf `find $(distdir)/macosx -name CVS`

Modified: trunk/ogg2/README
===================================================================
--- trunk/ogg2/README	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/README	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,15 +1,18 @@
-********************************************************************
-*                                                                  *
-* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
-* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
-* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
-* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
-*                                                                  *
-* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2003             *
-* by the Xiph.Org Foundation http://www.xiph.org/                  *
-*                                                                  *
-********************************************************************
+ ********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE Ogg Reference Library SOURCE CODE.      *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE Ogg Reference Library SOURCE CODE IS (C) COPYRIGHT 1994-2005 *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
 
+ last mod: $Id$
+
+
 WHAT'S HERE:
 
 This source distribution includes libogg and nothing else.  Other modules 
@@ -45,9 +48,9 @@
 Up to date technical documents, contact information, source code and
 pre-built utilities may be found there.
 
-BUILDING FROM CVS:
+BUILDING FROM SVN:
 
-A standard cvs build should consist of nothing more than:
+A standard svn build should consist of nothing more than:
 
 ./autogen.sh
 make 
@@ -100,4 +103,3 @@
 (Build instructions for Ogg codecs such as vorbis are similar and may
 be found in those source modules' README files)
 
-$Id$

Modified: trunk/ogg2/autogen.sh
===================================================================
--- trunk/ogg2/autogen.sh	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/autogen.sh	2006-04-10 19:14:33 UTC (rev 11117)
@@ -11,6 +11,7 @@
 cd "$srcdir"
 DIE=0
 
+echo "checking for autoconf... "
 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
         echo
         echo "You must have autoconf installed to compile $package."
@@ -19,19 +20,71 @@
         DIE=1
 }
 
-(automake --version) < /dev/null > /dev/null 2>&1 || {
+VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
+VERSIONMKINT="sed -e s/[^0-9]//"
+                                                                                
+# do we need automake?
+if test -r Makefile.am; then
+  AM_NEEDED=`fgrep AUTOMAKE_OPTIONS Makefile.am | $VERSIONGREP`
+  if test -z $AM_NEEDED; then
+    echo -n "checking for automake... "
+    AUTOMAKE=automake
+    ACLOCAL=aclocal
+    if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
+      echo "no"
+      AUTOMAKE=
+    else
+      echo "yes"
+    fi
+  else
+    echo -n "checking for automake $AM_NEEDED or later... "
+    for am in automake-$AM_NEEDED automake$AM_NEEDED automake; do
+      ($am --version < /dev/null > /dev/null 2>&1) || continue
+      ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT`
+      verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
+      if test $ver -ge $verneeded; then
+        AUTOMAKE=$am
+        echo $AUTOMAKE
+        break
+      fi
+    done
+    test -z $AUTOMAKE &&  echo "no"
+    echo -n "checking for aclocal $AM_NEEDED or later... "
+    for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED aclocal; do
+      ($ac --version < /dev/null > /dev/null 2>&1) || continue
+      ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT`
+      verneeded=`echo $AM_NEEDED | $VERSIONMKINT`
+      if test $ver -ge $verneeded; then
+        ACLOCAL=$ac
+        echo $ACLOCAL
+        break
+      fi
+    done
+    test -z $ACLOCAL && echo "no"
+  fi
+  test -z $AUTOMAKE || test -z $ACLOCAL && {
         echo
         echo "You must have automake installed to compile $package."
-	echo "Download the appropriate package for your system,
-	echo "or get the source from one of the GNU ftp sites"
-	echo "listed in http://www.gnu.org/order/ftp.html"
-        DIE=1
-}
+        echo "Download the appropriate package for your distribution,"
+        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+        exit 1
+  }
+fi
 
-(libtool --version) < /dev/null > /dev/null 2>&1 || {
+echo -n "checking for libtool... "
+for LIBTOOLIZE in libtoolize glibtoolize nope; do
+  ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
+done
+if test x$LIBTOOLIZE = xnope; then
+  echo "nope."
+  LIBTOOLIZE=libtoolize
+else
+  echo $LIBTOOLIZE
+fi
+($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
 	echo
 	echo "You must have libtool installed to compile $package."
-	echo "Download the appropriate package for your system,
+	echo "Download the appropriate package for your system,"
 	echo "or get the source from one of the GNU ftp sites"
 	echo "listed in http://www.gnu.org/order/ftp.html"
 	DIE=1
@@ -48,16 +101,22 @@
 
 echo "Generating configuration files for $package, please wait...."
 
-echo "  aclocal $ACLOCAL_FLAGS"
-aclocal $ACLOCAL_FLAGS
-#echo "  autoheader"
-#autoheader
-echo "  libtoolize --automake"
-libtoolize --automake
-echo "  automake --add-missing $AUTOMAKE_FLAGS"
-automake --add-missing $AUTOMAKE_FLAGS 
+echo "  $ACLOCAL $ACLOCAL_FLAGS"
+$ACLOCAL $ACLOCAL_FLAGS || exit 1
+echo "  autoheader"
+autoheader || exit 1
+echo "  $LIBTOOLIZE --automake"
+$LIBTOOLIZE --automake || exit 1
+echo "  $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
+$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
 echo "  autoconf"
-autoconf
+autoconf || exit 1
 
+# this search and replace hack is specifically for MacOSX where automake
+# picks up changelog in debian/ because of filesystem
+# case-not-quite-sensitivity breaking make distcheck
+perl -i -p -e 's/DIST_COMMON = ChangeLog/DIST_COMMON =/g' debian/Makefile.in
+
+cd 
 cd $olddir
-$srcdir/configure "$@" && echo
+$srcdir/configure --enable-maintainer-mode "$@" && echo

Modified: trunk/ogg2/configure.in
===================================================================
--- trunk/ogg2/configure.in	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/configure.in	2006-04-10 19:14:33 UTC (rev 11117)
@@ -2,7 +2,8 @@
 
 AC_INIT(src/sync.c)
 
-AM_INIT_AUTOMAKE(libogg,3.0)
+AM_INIT_AUTOMAKE(libogg,1.99-svn)
+AM_MAINTAINER_MODE
 
 dnl Library versioning
 
@@ -16,9 +17,12 @@
 AC_PROG_CC
 AM_PROG_LIBTOOL
 
+AM_CONFIG_HEADER([config.h])
+
 dnl Set some options based on environment
 
 cflags_save="$CFLAGS"
+ldflags_save="$LDFLAGS"
 if test -z "$GCC"; then
         case $host in 
         *-*-irix*)
@@ -64,6 +68,7 @@
 CFLAGS="$CFLAGS $cflags_save"
 DEBUG="$DEBUG $cflags_save"
 PROFILE="$PROFILE $cflags_save"
+LDFLAGS="$LDFLAGS $ldflags_save"
 
 dnl Checks for programs.
 
@@ -287,4 +292,17 @@
 AC_SUBST(CFLAGS)
 AC_SUBST(PROFILE)
 
-AC_OUTPUT(Makefile src/Makefile doc/Makefile doc/ogg/Makefile include/Makefile include/ogg2/Makefile include/ogg2/config_types.h win32/Makefile debian/Makefile)
+AC_OUTPUT([
+Makefile
+src/Makefile
+doc/Makefile
+doc/ogg2/Makefile
+include/Makefile
+include/ogg/Makefile
+include/ogg/config_types.h
+win32/Makefile
+debian/Makefile
+libogg2.spec
+ogg2.pc
+ogg2-uninstalled.pc
+])

Modified: trunk/ogg2/debian/rules
===================================================================
--- trunk/ogg2/debian/rules	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/debian/rules	2006-04-10 19:14:33 UTC (rev 11117)
@@ -33,7 +33,7 @@
 	mkdir $(objdir)
 
 	# run configure with build tree $(objdir)
-	# change ../configure to ../autogen.sh for CVS build
+	# change ../configure to ../autogen.sh for SVN build
 	cd $(objdir) && \
 	../configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
 	--prefix=/usr

Modified: trunk/ogg2/doc/Makefile.am
===================================================================
--- trunk/ogg2/doc/Makefile.am	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/Makefile.am	2006-04-10 19:14:33 UTC (rev 11117)
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = ogg
+SUBDIRS = ogg2
 
 docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
 

Copied: trunk/ogg2/doc/ogg2 (from rev 11116, branches/ogg2-arc/doc/ogg2)

Deleted: trunk/ogg2/doc/ogg2/.cvsignore
===================================================================
--- branches/ogg2-arc/doc/ogg2/.cvsignore	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/.cvsignore	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in

Copied: trunk/ogg2/doc/ogg2/.cvsignore (from rev 11116, branches/ogg2-arc/doc/ogg2/.cvsignore)

Deleted: trunk/ogg2/doc/ogg2/Makefile.am
===================================================================
--- branches/ogg2-arc/doc/ogg2/Makefile.am	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/Makefile.am	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,27 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-AUTOMAKE_OPTIONS = foreign
-
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/ogg
-
-doc_DATA = bitpacking.html datastructures.html decoding.html encoding.html\
-	general.html index.html ogg_packet.html ogg_page.html\
-	ogg_page_bos.html ogg_page_continued.html ogg_page_eos.html\
-	ogg_page_granulepos.html ogg_page_pageno.html ogg_page_serialno.html\
-	ogg_page_version.html ogg_stream_clear.html ogg_stream_destroy.html\
-	ogg_page_packets.html ogg_stream_eos.html ogg_stream_flush.html\
-	ogg_stream_init.html ogg_stream_packetin.html ogg_stream_packetout.html\
-	ogg_stream_pagein.html ogg_stream_pageout.html ogg_stream_reset.html\
-	ogg_stream_state.html ogg_sync_buffer.html ogg_sync_clear.html\
-	ogg_sync_destroy.html ogg_sync_init.html ogg_sync_pageout.html\
-	ogg_sync_pageseek.html ogg_sync_reset.html ogg_sync_state.html\
-	ogg_sync_wrote.html oggpack_adv.html oggpack_adv1.html\
-	oggpack_bits.html oggpack_buffer.html\
-	oggpack_bytes.html oggpack_get_buffer.html oggpack_look.html\
-	oggpack_look1.html oggpack_read.html\
-	oggpack_read1.html oggpack_readinit.html oggpack_reset.html\
-	oggpack_write.html oggpack_writeclear.html oggpack_writeinit.html\
-	overview.html reference.html style.css vorbis_comment.html\
-	vorbis_info.html ogg_packet_clear.html ogg_page_checksum_set.html
-
-EXTRA_DIST = $(doc_DATA)

Copied: trunk/ogg2/doc/ogg2/Makefile.am (from rev 11116, branches/ogg2-arc/doc/ogg2/Makefile.am)

Deleted: trunk/ogg2/doc/ogg2/bitpacking.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/bitpacking.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/bitpacking.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,99 +0,0 @@
-<html>
-
-<head>
-<title>libogg - Bitpacking Functions</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>Bitpacking Functions</h1>
-<p>Libogg contains a basic bitpacking library that is useful for manipulating data within a buffer.
-<p>
-All the <b>libogg</b> specific functions are declared in "ogg2/ogg.h".
-<p>
-
-<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td><b>function</b></td>
-	<td><b>purpose</b></td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_writeinit.html">oggpack_writeinit</a> and <a href="oggpackB_writeinit.html"></td>
-	<td>Initializes a buffer for writing using this bitpacking library.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_reset.html">oggpack_reset</a></td>
-	<td>Clears and resets the buffer to the initial position.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_writeclear.html">oggpack_writeclear</a></td>
-	<td>Frees the memory used by the buffer.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_readinit.html">oggpack_readinit</a></td>
-	<td>Initializes a buffer for reading using this bitpacking library.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_write.html">oggpack_write</a></td>
-	<td>Writes bytes to the specified location within the buffer.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_look.html">oggpack_look</a></td>
-	<td>Look at a specified number of bits, <=32, without advancing the location pointer.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_look1.html">oggpack_look1</a></td>
-	<td>Looks at one bit without advancing the location pointer.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_adv.html">oggpack_adv</a></td>
-	<td>Advances the location pointer by a specified number of bits.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_adv1.html">oggpack_adv1</a></td>
-	<td>Advances the location pointer by one bit.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_read.html">oggpack_read</a></td>
-	<td>Reads a specified number of bits from the buffer.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_read1.html">oggpack_read1</a></td>
-	<td>Reads one bit from the buffer.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_bytes.html">oggpack_bytes</a></td>
-	<td>Returns the total number of bytes contained within the buffer.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_bits.html">oggpack_bits</a></td>
-	<td>Returns the total number of bits contained within the buffer.</td>
-</tr>
-<tr valign=top>
-<td><a href="oggpack_get_buffer.html">oggpack_get_buffer</a></td>
-	<td>Returns a pointer to the buffer encapsulated within the <a href="oggpack_buffer.html">oggpack_buffer</a> struct.</td>
-</tr>
-</table>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/bitpacking.html (from rev 11116, branches/ogg2-arc/doc/ogg2/bitpacking.html)

Deleted: trunk/ogg2/doc/ogg2/datastructures.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/datastructures.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/datastructures.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,51 +0,0 @@
-<html>
-
-<head>
-<title>libogg - Base Data Structures</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>Base Data Structures</h1>
-<p>Libogg uses several data structures to hold data and state information.
-<p>
-All the <b>libogg</b> specific data structures are declared in "ogg2/ogg.h".
-<p>
-
-<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td><b>datatype</b></td>
-	<td><b>purpose</b></td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page.html">ogg_page</a></td>
-	<td>This structure references the data of an Ogg bitstream page.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_packet.html">ogg_packet</a></td>
-	<td>This structure references the data and metadata for an Ogg packet.</td>
-</tr>
-</table>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/datastructures.html (from rev 11116, branches/ogg2-arc/doc/ogg2/datastructures.html)

Deleted: trunk/ogg2/doc/ogg2/decoding.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/decoding.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/decoding.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,100 +0,0 @@
-<html>
-
-<head>
-<title>libogg - Decoding</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>Decoding</h1>
-<p>Libogg contains a set of functions used in the decoding process.
-<p>
-All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
-<p>
-<p>Decoding is based around the ogg synchronization layer.  The <a href="ogg_sync_state.html">ogg_sync_state</a> struct coordinates between incoming data and the decoder.  We read data into the synchronization layer, submit the data to the stream, and output raw packets to the decoder.
-<p>Decoding through the Ogg layer follows a specific logical sequence.  A read loop follows these logical steps:
-<ul>
-<li>Expose a buffer using <a href="ogg_sync_buffer.html">ogg_sync_buffer()</a>.
-<li>Read data into the buffer, using fread() or a similar function.
-<li>Call <a href="ogg_sync_wrote.html">ogg_sync_wrote()</a> to tell the synchronization layer how many bytes you wrote into the buffer.
-<li>Write out the data using <a href="ogg_sync_pageout.html">ogg_sync_pageout</a>.
-<li>Submit the completed page to the streaming layer with <a href="ogg_stream_pagein.html">ogg_stream_pagein</a>.
-<li>Output a packet of data to the codec-specific decoding layer using <a href="ogg_stream_packetout.html">ogg_stream_packetout</a>.
-</ul>
-<p>In practice, streams are more complex, and Ogg also must handle headers, incomplete or dropped pages, and other errors in input.
-<br><br>
-
-<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td><b>function</b></td>
-	<td><b>purpose</b></td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_sync_init.html">ogg_sync_init</a></td>
-	<td>Initializes an Ogg bitstream.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_sync_clear.html">ogg_sync_clear</a></td>
-	<td>Clears the status information from the synchronization struct.<td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_sync_reset.html">ogg_sync_reset</a></td>
-	<td>Resets the synchronization status to initial values.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_sync_destroy.html">ogg_sync_destroy</a></td>
-	<td>Frees the synchronization struct.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_sync_buffer.html">ogg_sync_buffer</a></td>
-	<td>Exposes a buffer from the synchronization layer in order to read data.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_sync_wrote.html">ogg_sync_wrote</a></td>
-	<td>Tells the synchronization layer how many bytes were written into the buffer.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_sync_pageseek.html">ogg_sync_pageseek</a></td>
-	<td>Finds the borders of pages and resynchronizes the stream.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_sync_pageout.html">ogg_sync_pageout</a></td>
-	<td>Outputs a page from the synchronization layer.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_pagein.html">ogg_stream_pagein</a></td>
-	<td>Submits a complete page to the stream layer.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_packetout.html">ogg_stream_packetout</a></td>
-	<td>Outputs a packet to the codec-specific decoding engine.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_packetpeek.html">ogg_stream_packetpeek</a></td>
-	<td>Provides access to the next packet in the bitstream without
-advancing decoding.</td>
-</tr>
-</table>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/decoding.html (from rev 11116, branches/ogg2-arc/doc/ogg2/decoding.html)

Deleted: trunk/ogg2/doc/ogg2/encoding.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/encoding.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/encoding.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,64 +0,0 @@
-<html>
-
-<head>
-<title>libogg - Encoding</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>Encoding</h1>
-<p>Libogg contains a set of functions used in the encoding process.
-<p>
-All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
-<p>
-<p>When encoding, the encoding engine will output raw packets which must be placed into an Ogg bitstream.
-<p>Raw packets are inserted into the stream, and an <a href="ogg_page.html">ogg_page</a> is output when enough packets have been written to create a full page.  The pages output are pointers to buffered packet segments, and can then be written out and saved as an ogg stream.
-<p>There are a couple of basic steps:
-<ul>
-<li>Use the encoding engine to produce a raw packet of data.
-<li>Call <a href="ogg_stream_packetin.html">ogg_stream_packetin</a> to submit a raw packet to the stream.
-<li>Use <a href="ogg_stream_pageout.html">ogg_stream_pageout</a> to output a page, if enough data has been submitted.  Otherwise, continue submitting data.
-</ul>
-<br><br>
-
-<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td><b>function</b></td>
-	<td><b>purpose</b></td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_packetin.html">ogg_stream_packetin</a></td>
-	<td>Submits a raw packet to the streaming layer, so that it can be formed into a page.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_pageout.html">ogg_stream_pageout</a></td>
-	<td>Outputs a completed page if the stream contains enough packets to form a full page.<td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_flush.html">ogg_stream_flush</a></td>
-	<td>Forces any remaining packets in the stream to be returned as a page of any size.<td>
-</tr>
-</table>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/encoding.html (from rev 11116, branches/ogg2-arc/doc/ogg2/encoding.html)

Deleted: trunk/ogg2/doc/ogg2/general.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/general.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/general.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,105 +0,0 @@
-<html>
-
-<head>
-<title>libogg - General Functions</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>General Functions</h1>
-<p>Libogg contains several functions which are generally useful when using Ogg streaming, whether encoding or decoding.
-<p>
-All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
-<p>
-<p>These functions can be used to manipulate some of the basic elements of Ogg - streams and pages.  Streams and pages are important during both the encode and decode process.
-<br>
-
-<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td><b>function</b></td>
-	<td><b>purpose</b></td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_init.html">ogg_stream_init</a></td>
-	<td>Initializes an Ogg bitstream.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_clear.html">ogg_stream_clear</a></td>
-	<td>Clears the storage within the Ogg stream, but does not free the stream itself.<td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_reset.html">ogg_stream_reset</a></td>
-	<td>Resets the stream status to its initial position.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_destroy.html">ogg_stream_destroy</a></td>
-	<td>Frees the entire Ogg stream.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_stream_eos.html">ogg_stream_eos</a></td>
-	<td>Indicates whether we are at the end of the stream.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_version.html">ogg_page_version</a></td>
-	<td>Returns the version of ogg_page that this stream/page uses</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_continued.html">ogg_page_continued</a></td>
-	<td>Indicates if the current page contains a continued packet from the last page.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_packets.html">ogg_page_packets</a></td>
-        <td>Indicates the number of packets contained in a page.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_bos.html">ogg_page_bos</a></td>
-	<td>Indicates if the current page is the beginning of the stream.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_eos.html">ogg_page_eos</a></td>
-	<td>Indicates if the current page is the end of the stream.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_granulepos.html">ogg_page_granulepos</a></td>
-	<td>Returns the precise playback location of this page.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_serialno.html">ogg_page_serialno</a></td>
-	<td>Returns the unique serial number of the logical bitstream associated with this page.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_pageno.html">ogg_page_pageno</a></td>
-	<td>Returns the sequential page number for this page.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_packet_clear.html">ogg_packet_clear</a><td>
-        <td>Clears the ogg_packet structure.</td>
-</tr>
-<tr valign=top>
-<td><a href="ogg_page_checksum_set.html">ogg_page_checksum_set</a></td>
-        <td>Checksums an ogg_page.</td>
-</tr>
-</table>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/general.html (from rev 11116, branches/ogg2-arc/doc/ogg2/general.html)

Deleted: trunk/ogg2/doc/ogg2/index.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/index.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/index.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,39 +0,0 @@
-<html>
-
-<head>
-<title>libogg - Documentation</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>Libogg Documentation</h1>
-
-<p>
-Libogg contains necessary functionality to create, decode, and work with Ogg bitstreams.
-<p>This document explains how to use the libogg API in detail.
-<p>
-<a href="overview.html">libogg api overview</a><br>
-<a href="reference.html">libogg api reference</a><br>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a><br><a href="mailto:team at vorbis.org">team at vorbis.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/index.html (from rev 11116, branches/ogg2-arc/doc/ogg2/index.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_packet.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_packet.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_packet.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,75 +0,0 @@
-<html>
-
-<head>
-<title>libogg - datatype - ogg_packet</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20011015</p></td>
-</tr>
-</table>
-
-<h1>ogg_packet</h1>
-
-<p><i>declared in "ogg/ogg.h"</i></p>
-
-<p>
-The ogg_packet struct encapsulates the data for a single raw packet of data
-and is used to transfer data between the ogg framing layer and the handling codec.
-<p>
-
-<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-typedef struct {
-  unsigned char *packet;
-  long  bytes;
-  long  b_o_s;
-  long  e_o_s;
-
-  ogg_int64_t  granulepos;
-  ogg_int64_t  packetno; 
-
-} ogg_packet;
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Relevant Struct Members</h3>
-<dl>
-<dt><i>packet</i></dt>
-<dd>Pointer to the packet's data. This is treated as an opaque type by the ogg layer.</dd>
-<dt><i>bytes</i></dt>
-<dd>Indicates the size of the packet data in bytes.  Packets can be of arbitrary size.</dd>
-<dt><i>b_o_s</i></dt>
-<dd>Flag indicating whether this packet begins a logical bitstream.  <tt>1</tt> indicates this is the first packet, <tt>0</tt> indicates any other position in the stream.</dd>
-<dt><i>e_o_s</i></dt>
-<dd>Flag indicating whether this packet ends a bitstream.  <tt>1</tt> indicates the last packet, <tt>0</tt> indicates any other position in the stream.</dd>
-<dt><i>granulepos</i></dt>
-<dd>A number indicating the position of this packet in the decoded data. This is the last sample, frame or other unit of information ('granule') that can be completely decoded from this packet.</dd>
-<dt><i>packetno</i></dt>
-<dd>Sequential number of this packet in the ogg bitstream.<dd>
-</dl>
-
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2001 xiph.org foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20011015</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_packet.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_packet.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_packet_clear.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_packet_clear.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_packet_clear.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_packet_clear</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20011218</p></td>
-</tr>
-</table>
-
-<h1>ogg_packet_clear</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function clears the memory used by the <a href="ogg_packet.html">ogg_packet</a> struct, and frees the internal allocated memory, but does not free
-the structure itself.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_packet_clear(ogg_packet *op);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to the ogg_packet struct to be cleared.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-None.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2001 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20011218</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_packet_clear.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_packet_clear.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,74 +0,0 @@
-<html>
-
-<head>
-<title>libogg - datatype - ogg_page</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 200011015</p></td>
-</tr>
-</table>
-
-<h1>ogg_page</h1>
-
-<p><i>declared in "ogg/ogg.h"</i></p>
-
-<p>
-The ogg_page struct encapsulates the data for an Ogg page.
-<p>
-Ogg pages are the fundamental unit of framing and interleave in an ogg bitstream.
-They are made up of packet segments of 255 bytes each. There can be as many as
-255 packet segments per page, for a maximum page size of a little under 64 kB.
-This is not a practical limitation as the segments can be joined across
-page boundaries allowing packets of arbitrary size. In practice pages are
-usually around 4 kB.
-<p>
-<p>For a complete description of ogg pages and headers, please refer to the <a href="../framing.html">framing document</a>.
-
-<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-typedef struct {
-  unsigned char *header;
-  long           header_len;
-  unsigned char *body;
-  long           body_len;
-} ogg_page;
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Relevant Struct Members</h3>
-<dl>
-<dt><i>header</i></dt>
-<dd>Pointer to the page header for this page.  The exact contents of this header are defined in the framing spec document.</dd>
-<dt><i>header_len</i></dt>
-<dd>Length of the page header in bytes.</a>
-<dt><i>body</i></dt>
-<dd>Pointer to the data for this page.</dd>
-<dt><i>body_len</i></dt>
-<dd>Length of the body data in bytes.</dd>
-</dl>
-
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2001 xiph.org foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg version - 20011015</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_bos.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_bos.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_bos.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,65 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_bos</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_bos</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>Indicates whether this page is at the beginning of the logical bitstream.
-<p>
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_bos(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to the current ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-greater than 0 if this page is the beginning of a bitstream.</li>
-<li>
-0 if this page is from any other location in the stream.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_bos.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_bos.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_checksum_set.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_checksum_set.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_checksum_set.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_checksum_set</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20011218</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_checksum_set</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>Checksums an ogg_page.
-<p>
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_checksum_set(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to an ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-None.
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2001 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20011218</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_checksum_set.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_checksum_set.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_continued.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_continued.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_continued.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,64 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_version</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_continued</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>Indicates whether this page contains packet data which has been continued from the previous page.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_continued(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to the current ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-1 if this page contains packet data continued from the last page.</li>
-<li>
-0 if this page does not contain continued data.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_continued.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_continued.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_eos.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_eos.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_eos.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,65 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_eos</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_eos</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>Indicates whether this page is at the end of the logical bitstream.
-<p>
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_eos(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to the current ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-greater than zero if this page contains the end of a bitstream.</li>
-<li>
-0 if this page is from any other location in the stream.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_eos.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_eos.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_granulepos.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_granulepos.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_granulepos.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,65 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_granulepos</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_granulepos</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>Returns the exact granular position of the packet data contained at the end of this page.
-<p>This is useful for tracking location when seeking or decoding.
-<p>For example, in audio codecs this position is the pcm sample number and in video this is the frame number.
-<p>
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_granulepos(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to the current ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> is the specific last granular position of the decoded data contained in the page.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_granulepos.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_granulepos.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_packets.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_packets.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_packets.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,75 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_packets</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20011218</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_packets</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>Returns the number of packets that are completed on this page.  If the
-leading packet is begun on a previous page, but ends on this page, it's 
-counted.
-<p>
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_packets(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to the current ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-If a page consists of a packet begun on a previous page, and a new packet
-begun (but not completed) on this page, the return will be:<br>
-<br>
-ogg_page_packets(page) will return 1,<br>
-ogg_page_continued(paged) will return non-zero.<br>
-<br><br>
-If a page happens to be a single packet that was begun on a previous page, and
-spans to the next page (in the case of a three or more page packet), the
-return will be:<br>
-<br>
-ogg_page_packets(page) will return 0,<br>
-ogg_page_continued(page) will return non-zero.<br>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2001 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20011218</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_packets.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_packets.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_pageno.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_pageno.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_pageno.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,63 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_pageno</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_pageno</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>Returns the sequential page number.
-<p>This is useful for ordering pages or determining when pages have been lost.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_pageno(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to the current ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> is the page number for this page.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_pageno.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_pageno.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_serialno.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_serialno.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_serialno.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,63 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_serialno</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_serialno</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>Returns the unique serial number for the logical bitstream of this page.  Each page contains the serial number for the logical bitstream that it belongs to.
-<p>
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_serialno(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to the current ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> is the serial number for this page.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_serialno.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_serialno.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_page_version.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_page_version.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_page_version.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,63 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_page_version</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_page_version</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function returns the version of ogg_page used in this page.
-<p>In current versions of libogg, all ogg_page structs have the same version, so 0 should always be returned.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_page_version(ogg_page *og);
-
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>og</i></dt>
-<dd>Pointer to the current ogg_page struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> is the version number.  In the current version of Ogg, the version number is always 0.  Nonzero return values indicate an error in page encoding.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_page_version.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_page_version.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_clear.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_clear.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_clear.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,61 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_clear</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_clear</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function clears the memory used by the <a href="ogg_sync_state.html">ogg_stream_state</a> struct, but does not free it.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_clear(ogg_stream_state *os);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to the ogg_stream_state struct to be cleared.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_clear.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_clear.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_destroy.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_destroy.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_destroy.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_destroy</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_destroy</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function frees the memory used by the <a href="ogg_stream_state.html">ogg_stream_state</a> struct.
-<p>This should be called when you are done working with an ogg stream.  It can also be called to make sure that the struct does not exist.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_destroy(ogg_stream_state *os);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to the ogg_stream_state struct to be destroyed.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_destroy.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_destroy.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_eos.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_eos.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_eos.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_eos</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_eos</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function indicates whether we have reached the end of the stream or not.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_eos(ogg_stream_state *os);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to the current ogg_stream_state struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>1 if we are at the end of the stream.</li>
-<li>
-0 if we have not yet reached the end of the stream.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_eos.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_eos.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_flush.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_flush.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_flush.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,67 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_flush</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_flush</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function checks for remaining packets inside the stream and forces remaining packets into a page, regardless of the size of the page.
-<p>This should only be used when you want to flush an undersized page from the middle of the stream.  Otherwise, <a href="ogg_stream_pageout.html">ogg_stream_pageout</a> should always be used.  
-<p>This function can be used to verify that all packets have been flushed.  If the return value is 0, all packets have been placed into a page.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_flush(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct, which represents the current logical bitstream.</dd>
-<dt><i>og</i></dt>
-<dd>Pointer to a page of data.  The remaining packets in the stream will be placed into this page, if any remain.
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>0 means that all packet data has already been flushed into pages, and there are no packets to put into the page.</li>
-<li>
-Nonzero means that remaining packets have successfully been flushed into the page.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_flush.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_flush.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_init.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_init.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_init.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,66 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_init</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_init</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function is used to initialize an <a href="ogg_sync_state.html">ogg_stream_state</a> struct and allocates appropriate memory in preparation for encoding or decoding.
-<p>It also assigns the stream a given serial number.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_init(<a href="ogg_stream_state.html">ogg_stream_state</a> *os,int serialno);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to the ogg_stream_state struct that we will be initializing.</dd>
-<dt><i>serialno</i></dt>
-<dd>Serial number that we will attach to this stream.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 if successful</li>
-<li>
--1 if unsuccessful.  If this fails, the ogg_stream_state was not properly declared before calling this function.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_init.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_init.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_packetin.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_packetin.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_packetin.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,65 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_packetin</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_packetin</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function takes a packet and submits it to the bitstream.  After this is called, we can continue submitting packets, or we can write out pages.
-<p>In a typical decoding situation, this should be used after filling a packet with data
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct.</dd>
-<dt><i>op</i></dt>
-<dd>Pointer to the packet we are putting into the bitstream.
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_packetin.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_packetin.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_packetout.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_packetout.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_packetout.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,68 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_packetout</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_packetout</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function assembles a raw data packet for output to the codec decoding engine. The data is already in the stream and broken into packet segments.</p>
-<p>In a typical decoding situation, this should be used after calling <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to submit a page of data to the bitstream.</p>
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to a previously declared <a
-href="ogg_stream_state.html">ogg_stream_state</a> struct.  Before this function is called, an <a href="ogg_page.html">ogg_page</a> should be submitted to the stream using <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a>.</dd>
-<dt><i>op</i></dt>
-<dd>Pointer to the packet that will be submitted to the decoding layer after this function is called.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<ul>
-<li>-1 if we are out of sync and there is a gap in the data. Usually this will not be a fatal error.</li>
-<li>1 in all other cases.</li>
-</ul>
-</blockquote>
-
-<br><br>
-
-<hr noshade>
-
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_packetout.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_packetout.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_packetpeek.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_packetpeek.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_packetpeek.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,85 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_packetpeek</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg version 1.26 - 20010527</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_packetout</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function attempts to assemble a raw data packet and returns
-it without advancing decoding.</p>
-
-<p>In a typical situation, this would be called
-speculatively after <a
-href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to check
-the packet contents before handing it off to a codec for 
-decompression. To advance page decoding and remove
-the packet from the sync structure, call 
-<a href="ogg_stream_packetout.html">ogg_stream_packetout()</a>.</p>
-
-<br><br>
-
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to a previously declared 
-<a href="ogg_stream_state.html">ogg_stream_state</a> struct.  Before this
-function is called, an <a href="ogg_page.html">ogg_page</a> should be
-submitted to the stream using 
-<a href="ogg_stream_pagein.html">ogg_stream_pagein()</a>.</dd>
-<dt><i>op</i></dt>
-<dd>Pointer to the next packet available in the bitstream, if
-any. A NULL value may be passed in the case of a simple "is there a 
-packet?" check.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<ul>
-<li>-1 if there's no packet available due to lost sync or a hole
-in the data.</li>
-<li>1 if a packet is available.</li>
-</ul>
-</blockquote>
-
-
-<br><br>
-
-<hr noshade>
-
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2001 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg version 1.26 - 20010527</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_packetpeek.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_packetpeek.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_pagein.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_pagein.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_pagein.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,67 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_pagein</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_pagein</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function adds a complete page to the bitstream.  
- <p>In a typical decoding situation, this function would be called after using <a href="ogg_sync_pageout.html">ogg_sync_pageout</a> to create a valid <a href="ogg_page.html">ogg_page</a> struct.
-<p>Internally, this function breaks the page into packet segments in preparation for outputting a valid packet to the codec decoding layer.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_pagein(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_stream.html">ogg_stream</a> struct, which represents the current logical bitstream.</dd>
-<dt><i>og</i></dt>
-<dd>Pointer to a page of data.  The data inside this page is being submitted to the streaming layer in order to be allocated into packets.
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>-1 indicates failure.  This means that the serial number of the page did not match the serial number of the bitstream, or that the page version was incorrect.</li>
-<li>
-0 means that the page was successfully submitted to the bitstream.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_pagein.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_pagein.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_pageout.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_pageout.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_pageout.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,66 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_pageout</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_pageout</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function forms packets into pages.  If  
- <p>In a typical encoding situation, this would be called after using <a href="ogg_stream_packetin.html">ogg_stream_packetin</a> to submit data packets to the bitstream.
-<p>Internally, this function breaks the page into packet segments in preparation for outputting a valid packet to the codec decoding layer.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_pageout(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_stream.html">ogg_stream</a> struct, which represents the current logical bitstream.</dd>
-<dt><i>og</i></dt>
-<dd>Pointer to a page of data.  The data inside this page is being submitted to the streaming layer in order to be allocated into packets.
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>Zero means that insufficient data has accumulated to fill a page.</li>
-<li>Non-zero means that a page has been completed and flushed.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_pageout.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_pageout.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_reset.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_reset.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_reset.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,61 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_reset</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_reset</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function sets values in the <a href="ogg_sync_state.html">ogg_stream_state</a> struct back to initial values.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_reset(ogg_stream_state *os);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to the ogg_stream_state struct to be cleared.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_reset.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_reset.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_reset_serialno.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_reset_serialno.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_reset_serialno.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,67 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_stream_reset</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_reset</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function reinitializes the values in the 
-<a href="ogg_stream_state.html">ogg_stream_state</a>,
-just like <a href="ogg_stream_reset.html">ogg_stream_reset()</a>.
-Additionally, it sets the stream serial number to the given value.</p>
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_stream_reset(ogg_stream_state *os, int serialno);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>os</i></dt>
-<dd>Pointer to the ogg_stream_state struct to be cleared.</dd>
-<dt><i>serialno</i></dt>
-<dd>New stream serial number to use</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2002 Xiph.org Foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_reset_serialno.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_reset_serialno.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_stream_state.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_stream_state.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_stream_state.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,121 +0,0 @@
-<html>
-
-<head>
-<title>libogg - datatype - ogg_stream_state</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_stream_state</h1>
-
-<p><i>declared in "ogg/ogg.h"</i></p>
-
-<p>
-The ogg_stream_state struct tracks the current encode/decode state of the current logical bitstream.
-<p>
-
-<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-typedef struct {
-  unsigned char   *body_data;    /* bytes from packet bodies */
-  long    body_storage;          /* storage elements allocated */
-  long    body_fill;             /* elements stored; fill mark */
-  long    body_returned;         /* elements of fill returned */
-
-
-  int     *lacing_vals;    /* The values that will go to the segment table */
-  ogg_int64_t *granule_vals;      /* granulepos values for headers. Not compact
-                             this way, but it is simple coupled to the
-                             lacing fifo */
-  long    lacing_storage;
-  long    lacing_fill;
-  long    lacing_packet;
-  long    lacing_returned;
-
-  unsigned char    header[282];      /* working space for header encode */
-  int              header_fill;
-
-  int     e_o_s;          /* set when we have buffered the last packet in the
-                             logical bitstream */
-  int     b_o_s;          /* set after we've written the initial page
-                             of a logical bitstream */
-  long     serialno;
-  int      pageno;
-  ogg_int64_t  packetno;      /* sequence number for decode; the framing
-                             knows where there's a hole in the data,
-                             but we need coupling so that the codec
-                             (which is in a seperate abstraction
-                             layer) also knows about the gap */
-  ogg_int64_t   granulepos;
-
-} ogg_stream_state;
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Relevant Struct Members</h3>
-<dl>
-<dt><i>body_data</i></dt>
-<dd>Pointer to data from packet bodies.</dd>
-<dt><i>body_storage</i></dt>
-<dd>Storage allocated for bodies in bytes (filled or unfilled).</dd>
-<dt><i>body_fill</i></dt>
-<dd>Amount of storage filled with stored packet bodies.</dd>
-<dt><i>body_returned</i></dt>
-<dd>Number of elements returned from storage.</dd>
-<dt><i>lacing_vals</i></dt>
-<dd>String of lacing values for the packet segments within the current page.  Each value is a byte, indicating packet segment length.</dd>
-<dt><i>granule_vals</i></dt>
-<dd>Pointer to the lacing values for the packet segments within the current page.</dd>
-<dt><i>lacing_storage</i></dt>
-<dd>Total amount of storage (in bytes) allocated for storing lacing values.</dd>
-<dt><i>lacing_fill</i></dt>
-<dd>Fill marker for the current vs. total allocated storage of lacing values for the page.</dd>
-<dt><i>lacing_packet</i></dt>
-<dd>Lacing value for current packet segment.</dd>
-<dt><i>lacing_returned</i></dt>
-<dd>Number of lacing values returned from lacing_storage.</dd>
-<dt><i>header</i></dt>
-<dd>Temporary storage for page header during encode process, while the header is being created.</dd>
-<dt><i>header_fill</i></dt>
-<dd>Fill marker for header storage allocation.  Used during the header creation process.</dd>
-<dt><i>e_o_s</i></dt>
-<dd>Marker set when the last packet of the logical bitstream has been buffered.</dd>
-<dt><i>b_o_s</i></dt>
-<dd>Marker set after we have written the first page in the logical bitstream.</dd>
-<dt><i>serialno</i></dt>
-<dd>Serial number of this logical bitstream.</dd>
-<dt><i>pageno</i></dt>
-<dd>Number of the current page within the stream.</dd>
-<dt><i>packetno</i></dt>
-<dd>Number of the current packet.</dd>
-<dt><i>granulepos</i></dt>
-<dd>Exact position of decoding/encoding process.</dd>
-</dl>
-
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_stream_state.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_stream_state.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_buffer.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_buffer.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_buffer.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,67 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_sync_buffer</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_buffer</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function is used to provide a properly-sized buffer for writing.
-<p>Buffer space which has already been returned is cleared, and the buffer is extended as necessary by the size plus some additional bytes.  Within the current implementation, an extra 4096 bytes are allocated, but applications should not rely on this additional buffer space.
-<p>The buffer exposed by this function is empty internal storage from the <a href="ogg_sync_state.html">ogg_sync_state</a> struct, beginning at the fill mark within the struct.
-<p>A pointer to this buffer is returned to be used by the calling application.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-char *ogg_sync_buffer(ogg_sync_state *oy, long size);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>oy</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
-<dt><i>size</i></dt>
-<dd>Size of the desired buffer.  The actual size of the buffer returned will be this size plus some extra bytes (currently 4096).
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-Returns a pointer to the newly allocated buffer.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_buffer.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_buffer.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_clear.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_clear.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_clear.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_sync_clear</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_clear</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function is used to free the internal storage of an <a href="ogg_sync_state.html">ogg_sync_state</a> struct and resets the struct to the initial state.  To free the entire struct, <a href="ogg_sync_destroy.html">ogg_sync_destroy</a> should be used instead.  In situations where the struct needs to be reset but the internal storage does not need to be freed, <a href="ogg_sync_reset.html">ogg_sync_reset</a> should be used.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_sync_clear(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>oy</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_clear.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_clear.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_destroy.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_destroy.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_destroy.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_sync_destroy</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_destroy</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function is used to destroy an <a href="ogg_sync_state.html">ogg_sync_state</a> struct and free all memory used.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_sync_destroy(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>oy</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_destroy.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_destroy.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_init.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_init.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_init.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,63 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_sync_init</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_init</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function is used to initialize an <a href="ogg_sync_state.html">ogg_sync_state</a> struct to a known initial value in preparation for manipulation of an Ogg bitstream.
-<p>The ogg_sync struct is important when decoding, as it synchronizes retrieval and return of data.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_sync_init(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>oy</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.  After this function call, this struct has been initialized.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_init.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_init.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_pageout.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_pageout.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_pageout.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,79 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_sync_pageout</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_pageout</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function takes the data stored in the buffer of the <a href="ogg_sync_state.html">ogg_sync_state</a> struct and inserts them into an <a href="ogg_page.html">ogg_page</a>.
-
-<p>In an actual decoding loop, this function should be called first to ensure that the buffer is cleared.  The example code below illustrates a clean reading loop which will fill and output pages.
-<p><b>Caution:</b>This function should be called before reading into the buffer to ensure that data does not remain in the ogg_sync_state struct.  Failing to do so may result in a memory leak.  See the example code below for details.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_sync_pageout(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy, <a href="ogg_page.html">ogg_page</a> *og);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>oy</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.  Normally, the internal storage of this struct should be filled with newly read data and verified using <a href="ogg_sync_wrote.html">ogg_sync_wrote</a>.</dd>
-<dt><i>og</i></dt>
-<dd>Pointer to page struct filled by this function.
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>-1 if we were not properly synced and had to skip some bytes.</li>
-<li>
-0 if we need more data to verify a page.</li>
-<li>
-1 if we have a page.</li>
-</blockquote>
-<p>
-
-<h3>Example Usage</h3>
-<pre>
-if (ogg_sync_pageout(&oy, &og) != 1) {
-	buffer = ogg_sync_buffer(&oy, 8192);
-	bytes = fread(buffer, 1, 8192, stdin);
-	ogg_sync_wrote(&oy, bytes);
-}
-</pre>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_pageout.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_pageout.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_pageseek.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_pageseek.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_pageseek.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,68 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_sync_pageseek</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_pageseek</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function synchronizes the ogg_sync_state struct to the next ogg_page.  
- <p>This is useful when seeking within a bitstream.  ogg_sync_pageseek will synchronize to the next page in the bitstream and return information about how many bytes we advanced or skipped in order to do so.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_sync_pageseek(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy, <a href="ogg_page.html">ogg_page</a> *og);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>oy</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
-<dt><i>og</i></dt>
-<dd>Pointer to a page (or an incomplete page) of data.  This is the page we are attempting to sync.
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>-n means that we skipped n bytes within the bitstream.</li>
-<li>
-0 means that the page isn't ready and we need more data.  No bytes have been skipped.</li>
-<li>
-n means that the page was synced at the current location, with a page length of n bytes.
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_pageseek.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_pageseek.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_reset.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_reset.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_reset.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,63 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_sync_reset</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_reset</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function is used to reset the internal counters of the <a href="ogg_sync_state.html">ogg_sync_state</a> struct to initial values.
-<p>It is a good idea to call this before seeking within a bitstream.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_sync_reset(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>oy</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-0 is always returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_reset.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_reset.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_state.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_state.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_state.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,67 +0,0 @@
-<html>
-
-<head>
-<title>libogg - datatype - ogg_sync_state</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_state</h1>
-
-<p><i>declared in "ogg/ogg.h"</i></p>
-
-<p>
-The ogg_sync_state struct tracks the synchronization of the current page.
-<p>It is used during decoding to track the status of data as it is read in and 
-<p>
-
-<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-typedef struct {
-  unsigned char *data;
-  int storage;
-  int fill;
-  int returned;
-
-  int unsynced;
-  int headerbytes;
-  int bodybytes;
-} ogg_sync_state;
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Relevant Struct Members</h3>
-<dl>
-<dt><i>data</i></dt>
-<dd>Pointer to data from packet bodies.</dd>
-<dt><i>storage</i></dt>
-<dd>Pointer to data from packet bodies.</dd>
-</dl>
-
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_state.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_state.html)

Deleted: trunk/ogg2/doc/ogg2/ogg_sync_wrote.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/ogg_sync_wrote.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/ogg_sync_wrote.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,63 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - ogg_sync_wrote</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>ogg_sync_wrote</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function is used to tell the <a href="ogg_sync_state.html">ogg_sync_state</a> struct how many bytes we wrote into the buffer. 
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-int ogg_sync_destroy(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>oy</i></dt>
-<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>-1 if the number of bytes written overflows the internal storage of the <a href="ogg_sync_state.html">ogg_sync_state</a> struct.
-<li>
-0 in all other cases.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/ogg_sync_wrote.html (from rev 11116, branches/ogg2-arc/doc/ogg2/ogg_sync_wrote.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_adv.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_adv.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_adv.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,64 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_adv</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_adv</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function advances the location pointer by the specified number of bits without reading any data.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void  oggpack_adv(oggpack_buffer *b,int bits);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Pointer to the current oggpack_buffer.</dd>
-<dt><i>bits</i></dt>
-<dd>Number of bits to advance.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2002 Xiph.org Foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_adv.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_adv.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_adv1.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_adv1.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_adv1.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_adv1</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_adv1</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function advances the location pointer by one bit without reading any data.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void  oggpack_adv1(oggpack_buffer *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Pointer to the current oggpack_buffer.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>No values are returned.
-</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_adv1.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_adv1.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_bits.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_bits.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_bits.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_bits</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_bits</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function returns the total number of bits currently in the <a href="oggpack_buffer.html">oggpack_buffer</a>'s internal buffer.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-long oggpack_bits(<a href="oggpack_buffer.html">oggpack_buffer</a> *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd><a href="oggpack_buffer.html">oggpack_buffer</a> struct to be .</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> is the total number of bits within the current buffer.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_bits.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_bits.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_buffer.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_buffer.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_buffer.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,66 +0,0 @@
-<html>
-
-<head>
-<title>libogg - datatype - oggpack_buffer</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_buffer</h1>
-
-<p><i>declared in "ogg/ogg.h"</i></p>
-
-<p>
-The oggpack_buffer struct is used with libogg's bitpacking functions.  You should never need to directly access anything in this structure.
-<p>
-
-<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-typedef struct {
-  long endbyte;
-  int  endbit;
-
-  unsigned char *buffer;
-  unsigned char *ptr;
-  long storage;
-} oggpack_buffer;
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Relevant Struct Members</h3>
-<dl>
-<dt><i>buffer</i></dt>
-<dd>Pointer to data being manipulated.</dd>
-<dt><i>ptr</i></dt>
-<dd>Location pointer to mark which data has been read.</dd>
-<dt><i>storage</i></dt>
-<dd>Size of buffer.</i></dt>
-</dl>
-
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_buffer.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_buffer.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_bytes.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_bytes.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_bytes.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_bytes</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-<h1>oggpack_bytes</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function returns the total number of bytes currently in the <a href="oggpack_buffer.html">oggpack_buffer</a>'s internal buffer.
-<p>The return value is the number of <b>complete</b> bytes in the buffer.  There may be extra (<8) bits.
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-long oggpack_bytes(<a href="oggpack_buffer.html">oggpack_buffer</a> *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd><a href="oggpack_buffer.html">oggpack_buffer</a> struct to be checked.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> is the total number of bytes within the current buffer.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_bytes.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_bytes.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_get_buffer.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_get_buffer.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_get_buffer.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_get_buffer</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_get_buffer</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function returns a pointer to the data buffer within the given <a href="oggpack_buffer.html">oggpack_buffer</a> struct.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-unsigned char *oggpack_get_buffer(<a href="oggpack_buffer.html">oggpack_buffer</a> *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Pointer to the current <a href="oggpack_buffer.html">oggpack_buffer</a>.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_get_buffer.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_get_buffer.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_look.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_look.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_look.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,66 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_look</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_look</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function looks at a specified number of bits inside the buffer without advancing the location pointer.
-<p>The specified number of bits are read, starting from the location pointer.
-<p>This function can be used to read 32 or fewer bits.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-long  oggpack_look(<a href="oggpack_buffer.html">oggpack_buffer</a> *b,int bits);
-</b></pre>
-</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Pointer to <a href="oggpack_buffer.html">oggpack_buffer</a> to be read.</dd>
-<dt><i>bits</i></dt>
-<dd>Number of bits to look at.  For this function, must be 32 or fewer.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> represents the requested bits.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_look.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_look.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_look1.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_look1.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_look1.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,63 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_look1</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_look1</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function looks at the next bit without advancing the location pointer.
-<p>The next bit is read starting from the location pointer.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-long  oggpack_look1(oggpack_buffer *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Pointer to an <a href="oggpack_buffer.html">oggpack_buffer</a> struct containing our buffer.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> represents the value of the next bit after the location pointer.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_look1.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_look1.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_read.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_read.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_read.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,65 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_read</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_read</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function reads the requested number of bits from the buffer and advances the location pointer.
-<p>Before reading, the buffer should be initialized using <a href="oggpack_readinit.html">oggpack_readinit</a>.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-long oggpack_read(oggpack_buffer *b,int bits);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Pointer to an <a href="oggpack_buffer.html">oggpack_buffer</a> struct containing buffered data to be read.</dd>
-<dt><i>bits</i></dt>
-<dd>Number of bits to read.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> represents the requested bits.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_read.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_read.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_read1.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_read1.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_read1.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,63 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_read1</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_read1</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function reads one bit from the <a href="oggpack_buffer.html">oggpack_buffer</a> data buffer and advances the location pointer.
-<p>Before reading, the buffer should be initialized using <a href="oggpack_readinit.html">oggpack_readinit</a>.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-long  oggpack_read1(oggpack_buffer *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Pointer to an <a href="oggpack_buffer.html">oggpack_buffer</a> struct containing buffered data to be read.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-<i>n</i> is the bit read by this function.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_read1.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_read1.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_readinit.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_readinit.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_readinit.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,64 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_readinit</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_readinit</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function takes an ordinary buffer and prepares an <a href="oggpack_buffer.html">oggpack_buffer</a> for reading using the Ogg <a href="bitpacking.html">bitpacking</a> functions.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Pointer to <a href=oggpack_buffer.html">oggpack_buffer</a> to be initialized with some extra markers to ease bit navigation and manipulation.</dd>
-<dt><i>buf</i></dt>
-<dd>Original data buffer, to be inserted into the <a href="oggpack_buffer.html">oggpack_buffer</a> so that it can be read using bitpacking functions.
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_readinit.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_readinit.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_reset.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_reset.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_reset.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_reset</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_reset</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function resets the contents of an <a href="oggpack_buffer">oggpack_buffer</a> to their original state but does not free the memory used.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void  oggpack_reset(oggpack_buffer *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd><a href="oggpack_buffer.html">oggpack_buffer</a> to be reset.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_reset.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_reset.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_write.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_write.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_write.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,68 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_write</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_write</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function writes bits into an <a href="oggpack_buffer.html">oggpack_buffer</a>.
-<p>The oggpack_buffer must already be initialized for writing using <a href="oggpack_writeinit.html">oggpack_writeinit</a>.
-<p>Only 32 bits can be written at a time.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void  oggpack_write(oggpack_buffer *b,unsigned long value,int bits);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Buffer to be used for writing.</dd>
-<dt><i>value</i></dt>
-<dd>The data to be written into the buffer.  This must be 32 bits or fewer.</dd>
-<dt><i>bits</i></dt>
-<dd>The number of bits being written into the buffer.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_write.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_write.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_writealign.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_writealign.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_writealign.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,65 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_writealign</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-<h1>oggpack_writealign</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function pads the <a href="oggpack_buffer.html">oggpack_buffer</a> with zeros out to the
-next byte boundary.</p>
-<p>The oggpack_buffer must already be initialized for writing using <a href="oggpack_writeinit.html">oggpack_writeinit</a>.
-<p>Only 32 bits can be written at a time.</p>
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void  oggpack_writetrunc(oggpack_buffer *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Buffer to be used for writing.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2002 Xiph.org Foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_writealign.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_writealign.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_writeclear.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_writeclear.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_writeclear.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_reset</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_writeclear</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function clears the buffer after writing and frees the memory used by the oggpack_buffer.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void oggpack_writeclear(oggpack_buffer *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Our oggpack_buffer.  This is an ordinary data buffer with some extra markers to ease bit navigation and manipulation.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_writeclear.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_writeclear.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_writecopy.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_writecopy.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_writecopy.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,69 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_writecopy</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-<h1>oggpack_writecopy</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function copies a sequence of bits from a source buffer into an
-<a href="oggpack_buffer.html">oggpack_buffer</a>.</p>
-<p>The oggpack_buffer must already be initialized for writing using <a href="oggpack_writeinit.html">oggpack_writeinit</a>.</p>
-<p>Only 32 bits can be written at a time.</p>
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void  oggpack_writecopy(oggpack_buffer *b, void *source, long bits);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Buffer to be used for writing.</dd>
-<dt><i>source</i></dt>
-<dd>A pointer to the data to be written into the buffer.</dd>
-<dt><i>bits</i></dt>
-<dd>The number of bits to be copied into the buffer.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2002 Xiph.org Foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_writecopy.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_writecopy.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_writeinit.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_writeinit.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_writeinit.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,62 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_writeinit</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>oggpack_writeinit</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function initializes an <a href="oggpack_buffer.html">oggpack_buffer</a> for writing using the Ogg <a href="bitpacking.html">bitpacking</a> functions.
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void  oggpack_writeinit(<a href="oggpack_buffer.html">oggpack_buffer</a> *b);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Buffer to be used for writing.  This is an ordinary data buffer with some extra markers to ease bit navigation and manipulation.</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_writeinit.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_writeinit.html)

Deleted: trunk/ogg2/doc/ogg2/oggpack_writetrunc.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/oggpack_writetrunc.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/oggpack_writetrunc.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,65 +0,0 @@
-<html>
-
-<head>
-<title>libogg - function - oggpack_writetrunc</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-<h1>oggpack_write</h1>
-
-<p><i>declared in "ogg/ogg.h";</i></p>
-
-<p>This function truncates an already written-to <a href="oggpack_buffer.html">oggpack_buffer</a>.</p>
-<p>The oggpack_buffer must already be initialized for writing using <a href="oggpack_writeinit.html">oggpack_writeinit</a>.</p>
-
-<br><br>
-<table border=0 color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>
-void  oggpack_writetrunc(oggpack_buffer *b, long bits);
-</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>b</i></dt>
-<dd>Buffer to be truncated.</dd>
-<dt><i>bits</i></dt>
-<dd>Number of bits to keep in the buffer (size after truncation)</dd>
-</dl>
-
-
-<h3>Return Values</h3>
-<blockquote>
-<li>
-No values are returned.</li>
-</blockquote>
-<p>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2002 Xiph.org Foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20020719</p></td>
-</tr>
-</table>
-
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/oggpack_writetrunc.html (from rev 11116, branches/ogg2-arc/doc/ogg2/oggpack_writetrunc.html)

Deleted: trunk/ogg2/doc/ogg2/overview.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/overview.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/overview.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,44 +0,0 @@
-<html>
-
-<head>
-<title>libogg - API Overview</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-<h1>Libogg API Overview</h1>
-
-<p>
-The libogg API consists of the following functional categories:
-<p>
-<ul>
-<li><p><a href="datastructures.html">Base data structures</a>
-<li><p><a href="bitpacking.html">Bitpacking</a>
-<li><p><a href="general.html">General</a>
-<li><p><a href="encoding.html">Encoding-Related</a>
-<li><p><a href="decoding.html">Decoding-Related</a>
-
-</ul>
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2000 xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at xiph.org">team at xiph.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg release 1.0 - 20000615</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/overview.html (from rev 11116, branches/ogg2-arc/doc/ogg2/overview.html)

Deleted: trunk/ogg2/doc/ogg2/reference.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/reference.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/reference.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,93 +0,0 @@
-<html>
-
-<head>
-<title>Libogg API Reference</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20020719</p></td>
-</tr>
-</table>
-
-<h1>Libogg API Reference</h1>
-
-<p>
-<b>Data Structures</b><br>
-<a href="oggpack_buffer.html">oggpack_buffer</a><br>
-<a href="ogg_page.html">ogg_page</a><br>
-<a href="ogg_stream_state.html">ogg_stream_state</a><br>
-<a href="ogg_packet.html">ogg_packet</a><br>
-<a href="ogg_sync_state.html">ogg_sync_state</a><br>
-<br>
-<b>Bitpacking</b><br>
-<a href="oggpack_writeinit.html">oggpack_writeinit()</a><br>
-<a href="oggpack_reset.html">oggpack_reset()</a><br>
-<a href="oggpack_writeclear.html">oggpack_writetrunc()</a><br>
-<a href="oggpack_writeclear.html">oggpack_writealign()</a><br>
-<a href="oggpack_writeclear.html">oggpack_writecopy()</a><br>
-<a href="oggpack_writeclear.html">oggpack_writeclear()</a><br>
-<a href="oggpack_readinit.html">oggpack_readinit()</a><br>
-<a href="oggpack_write.html">oggpack_write()</a><br>
-<a href="oggpack_look.html">oggpack_look()</a><br>
-<a href="oggpack_look1.html">oggpack_look1()</a><br>
-<a href="oggpack_adv.html">oggpack_adv()</a><br>
-<a href="oggpack_adv1.html">oggpack_adv1()</a><br>
-<a href="oggpack_read.html">oggpack_read()</a><br>
-<a href="oggpack_read1.html">oggpack_read1()</a><br>
-<a href="oggpack_bytes.html">oggpack_bytes()</a><br>
-<a href="oggpack_bits.html">oggpack_bits()</a><br>
-<a href="oggpack_get_buffer.html">oggpack_get_buffer()</a><br>
-<br>
-<b>Decoding-Related</b><br>
-<a href="ogg_sync_init.html">ogg_sync_init()</a><br>
-<a href="ogg_sync_clear.html">ogg_sync_clear()</a><br>
-<a href="ogg_sync_destroy.html">ogg_sync_destroy()</a><br>
-<a href="ogg_sync_reset.html">ogg_sync_reset()</a><br>
-<a href="ogg_sync_buffer.html">ogg_sync_buffer()</a><br>
-<a href="ogg_sync_wrote.html">ogg_sync_wrote()</a><br>
-<a href="ogg_sync_pageseek.html">ogg_sync_pageseek()</a><br>
-<a href="ogg_sync_pageout.html">ogg_sync_pageout()</a><br>
-<a href="ogg_stream_pagein.html">ogg_stream_pagein()</a><br>
-<a href="ogg_stream_packetout.html">ogg_stream_packetout()</a><br>
-<a href="ogg_stream_packetpeek.html">ogg_stream_packetpeek()</a><br>
-<br>
-<b>Encoding-Related</b><br>
-<a href="ogg_stream_packetin.html">ogg_stream_packetin()</a><br>
-<a href="ogg_stream_pageout.html">ogg_stream_pageout()</a><br>
-<a href="ogg_stream_flush.html">ogg_stream_flush()</a><br>
-<br>
-<b>General</b><br>
-<a href="ogg_stream_init.html">ogg_stream_init()</a><br>
-<a href="ogg_stream_clear.html">ogg_stream_clear()</a><br>
-<a href="ogg_stream_reset.html">ogg_stream_reset()</a><br>
-<a href="ogg_stream_reset_serialno.html">ogg_stream_reset_serialno()</a><br>
-<a href="ogg_stream_destroy.html">ogg_stream_destroy()</a><br>
-<a href="ogg_page_version.html">ogg_page_version()</a><br>
-<a href="ogg_page_continued.html">ogg_page_continued()</a><br>
-<a href="ogg_page_packets.html">ogg_page_packets()</a></br>
-<a href="ogg_page_bos.html">ogg_page_bos()</a><br>
-<a href="ogg_page_eos.html">ogg_page_eos()</a><br>
-<a href="ogg_page_granulepos.html">ogg_page_granulepos()</a><br>
-<a href="ogg_page_serialno.html">ogg_page_serialno()</a><br>
-<a href="ogg_page_pageno.html">ogg_page_pageno()</a><br>
-<a href="ogg_packet_clear.html">ogg_packet_clear()</a><br>
-<a href="ogg_page_checksum_set.html">ogg_page_checksum_set()</a><br>
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2002 Xiph.org Foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team at vorbis.org">team at vorbis.org</a></p></td>
-</tr><tr>
-<td><p class=tiny>libogg documentation</p></td>
-<td align=right><p class=tiny>libogg - 20020719</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/reference.html (from rev 11116, branches/ogg2-arc/doc/ogg2/reference.html)

Deleted: trunk/ogg2/doc/ogg2/style.css
===================================================================
--- branches/ogg2-arc/doc/ogg2/style.css	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/style.css	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,7 +0,0 @@
-BODY { font-family: Helvetica, sans-serif }
-TD { font-family: Helvetica, sans-serif }
-P { font-family: Helvetica, sans-serif }
-H1 { font-family: Helvetica, sans-serif }
-H2 { font-family: Helvetica, sans-serif }
-H4 { font-family: Helvetica, sans-serif }
-P.tiny { font-size: 8pt }

Copied: trunk/ogg2/doc/ogg2/style.css (from rev 11116, branches/ogg2-arc/doc/ogg2/style.css)

Deleted: trunk/ogg2/doc/ogg2/vorbis_comment.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/vorbis_comment.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/vorbis_comment.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,70 +0,0 @@
-<html>
-
-<head>
-<title>Vorbisfile - datatype - vorbis_comment</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>Vorbisfile documentation</p></td>
-<td align=right><p class=tiny>libVorbisfile version 1.65 - 20020702</p></td>
-</tr>
-</table>
-
-<h1>vorbis_comment</h1>
-
-<p><i>declared in "vorbis/codec.h"</i></p>
-
-<p>
-The vorbis_comment structure defines an Ogg Vorbis comment.
-<p>
-Only the fields the program needs must be defined.  If a field isn't
-defined by the application, it will either be blank (if it's a string value)
-or set to some reasonable default (usually 0).
-<p>
-
-<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>typedef struct vorbis_comment{
-  /* unlimited user comment fields. */
-  char **user_comments;
-  int  *comment_lengths;
-  int   comments;
-  char *vendor;
-
-} vorbis_comment;</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Parameters</h3>
-<dl>
-<dt><i>user_comments</i></dt>
-<dd>Unlimited user comment array. The individual strings in the array are 8 bit clean, by the Vorbis specification, and as such the <tt>comment_lengths</tt> array should be consulted to determine string length.  For convenience, each string is also NULL-terminated by the decode library (although Vorbis comments are not NULL terminated within the bitstream itself).</dd>
-<dt><i>comment_lengths</i></dt>
-<dd>An array that stores the length of each comment string</dd>
-<dt><i>comments</i></dt>
-<dd>number of user comments in user_comments field.</dd>
-<dt><i>vendor</i></dt>
-<dd>Information about the creator of the file.  Stored in a standard C 0-terminated string.</dd>
-</dl>
-
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2002 Xiph.org Foundation</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
-</tr><tr>
-<td><p class=tiny>Vorbisfile documentation</p></td>
-<td align=right><p class=tiny>libVorbisfile version 1.65 - 20020719</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/vorbis_comment.html (from rev 11116, branches/ogg2-arc/doc/ogg2/vorbis_comment.html)

Deleted: trunk/ogg2/doc/ogg2/vorbis_info.html
===================================================================
--- branches/ogg2-arc/doc/ogg2/vorbis_info.html	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/doc/ogg2/vorbis_info.html	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,80 +0,0 @@
-<html>
-
-<head>
-<title>Vorbisfile - datatype - vorbis_info</title>
-<link rel=stylesheet href="style.css" type="text/css">
-</head>
-
-<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
-<table border=0 width=100%>
-<tr>
-<td><p class=tiny>Vorbisfile documentation</p></td>
-<td align=right><p class=tiny>libVorbisfile version 1.65 - 20020702</p></td>
-</tr>
-</table>
-
-<h1>vorbis_info</h1>
-
-<p><i>declared in "vorbis/codec.h"</i></p>
-
-<p>
-The vorbis_info structure contains basic information about the audio in a vorbis bitstream.
-<p>
-
-<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
-<tr bgcolor=#cccccc>
-	<td>
-<pre><b>typedef struct vorbis_info{
-  int version;
-  int channels;
-  long rate;
-  
-  long bitrate_upper;
-  long bitrate_nominal;
-  long bitrate_lower;
-  long bitrate_window;
-
-  void *codec_setup;
-
-} vorbis_info;</b></pre>
-	</td>
-</tr>
-</table>
-
-<h3>Relevant Struct Members</h3>
-<dl>
-<dt><i>version</i></dt>
-<dd>Vorbis encoder version used to create this bitstream.</dd>
-<dt><i>channels</i></dt>
-<dd>Int signifying number of channels in bitstream.</dd>
-<dt><i>rate</i></dt>
-<dd>Sampling rate of the bitstream.</dd>
-<dt><i>bitrate_upper</i></dt>
-<dd>Specifies the upper limit in a VBR bitstream.  If the value matches the bitrate_nominal and bitrate_lower parameters, the stream is fixed bitrate.  May be unset if no limit exists.</dd>
-<dt><i>bitrate_nominal</i></dt>
-<dd>Specifies the average bitrate for a VBR bitstream.  May be unset.  If the bitrate_upper and bitrate_lower parameters match, the stream is fixed bitrate.</dd>
-<dt><i>bitrate_lower</i></dt>
-<dd>Specifies the lower limit in a VBR bitstream.  If the value matches the bitrate_nominal and bitrate_upper parameters, the stream is fixed bitrate.  May be unset if no limit exists.</dd>
-<dt><i>bitrate_window</i></dt>
-<dd>Currently unset.</dd>
-
-<dt><i>codec_setup</i></dt>
-<dd>Internal structure that contains the detailed/unpacked configuration for decoding the current Vorbis bitstream.</dd>
-</dl>
-
-
-<br><br>
-<hr noshade>
-<table border=0 width=100%>
-<tr valign=top>
-<td><p class=tiny>copyright &copy; 2002 Xiph.org</p></td>
-<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/">Ogg Vorbis</a></p></td>
-</tr><tr>
-<td><p class=tiny>Vorbisfile documentation</p></td>
-<td align=right><p class=tiny>libVorbisfile version 1.65 - 20020702</p></td>
-</tr>
-</table>
-
-</body>
-
-</html>

Copied: trunk/ogg2/doc/ogg2/vorbis_info.html (from rev 11116, branches/ogg2-arc/doc/ogg2/vorbis_info.html)

Modified: trunk/ogg2/include/Makefile.am
===================================================================
--- trunk/ogg2/include/Makefile.am	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/include/Makefile.am	2006-04-10 19:14:33 UTC (rev 11117)
@@ -2,4 +2,4 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = ogg2
+SUBDIRS = ogg

Copied: trunk/ogg2/include/ogg/Makefile.am (from rev 11116, branches/ogg2-arc/include/ogg/Makefile.am)

Copied: trunk/ogg2/include/ogg/config_types.h.in (from rev 11116, branches/ogg2-arc/include/ogg/config_types.h.in)

Copied: trunk/ogg2/include/ogg/mutex.c (from rev 11116, branches/ogg2-arc/include/ogg/mutex.c)

Copied: trunk/ogg2/include/ogg/ogg.h (from rev 11116, branches/ogg2-arc/include/ogg/ogg.h)

Copied: trunk/ogg2/include/ogg/ogg2.h (from rev 11116, branches/ogg2-arc/include/ogg/ogg2.h)

Copied: trunk/ogg2/include/ogg/os_types.h (from rev 11116, branches/ogg2-arc/include/ogg/os_types.h)

Deleted: trunk/ogg2/libogg.spec
===================================================================
--- trunk/ogg2/libogg.spec	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/libogg.spec	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,95 +0,0 @@
-Name:		libogg
-Version:	1.0
-Release:	1
-Summary:	Ogg Bitstream Library
-
-Group:		System Environment/Libraries
-License:	BSD
-URL:		http://www.xiph.org/
-Vendor:		Xiph.org Foundation <team at xiph.org>
-Source:		http://www.xiph.org/pub/ogg/vorbis/download/%{name}-%{version}.tar.gz
-Prefix:		%{_prefix}
-BuildRoot:	%{_tmppath}/%{name}-%{version}-root
-# We're forced to use an epoch since both Red Hat and Ximian use it in their
-# rc packages
-Epoch:		2
-# Dirty trick to tell rpm that this package actually provides what the
-# last rc and beta was offering
-Provides:	%{name} = %{epoch}:1.0rc3-%{release}
-Provides:	%{name} = %{epoch}:1.0beta4-%{release}
-
-%description
-Libogg is a library for manipulating ogg bitstreams.  It handles
-both making ogg bitstreams and getting packets from ogg bitstreams.
-
-%package devel
-Summary: 	Ogg Bitstream Library Development
-Group: 		Development/Libraries
-Requires: 	libogg = %{version}
-# Dirty trick to tell rpm that this package actually provides what the
-# last rc and beta was offering
-Provides:	%{name}-devel = %{epoch}:1.0rc3-%{release}
-Provides:	%{name}-devel = %{epoch}:1.0beta4-%{release}
-
-
-%description devel
-The libogg-devel package contains the header files, static libraries
-and documentation needed to develop applications with libogg.
-
-%prep
-%setup -q -n %{name}-%{version}
-
-%build
-CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --enable-static
-make
-
-%install
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
-
-make DESTDIR=$RPM_BUILD_ROOT install
-
-%clean
-[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
-
-%post
-/sbin/ldconfig
-
-%postun
-/sbin/ldconfig
-
-%files
-%defattr(-,root,root)
-%doc AUTHORS CHANGES COPYING README
-%{_libdir}/libogg.so.*
-
-%files devel
-%defattr(-,root,root)
-%doc doc/index.html
-%doc doc/framing.html
-%doc doc/oggstream.html
-%doc doc/white-ogg.png
-%doc doc/white-xifish.png
-%doc doc/stream.png
-%doc doc/ogg/*.html
-%doc doc/ogg/style.css
-%{_includedir}/ogg/ogg.h
-%{_includedir}/ogg/os_types.h
-%{_includedir}/ogg/config_types.h
-%{_libdir}/libogg.a
-%{_libdir}/libogg.so
-%{_datadir}/aclocal/ogg.m4
-
-%changelog
-* Sun Jul 14 2002 Thomas Vander Stichele <thomas at apestaart.org>
-- update for 1.0 release
-- conform Group to Red Hat's idea of it
-- take out case where configure doesn't exist; a tarball should have it
-
-* Tue Dec 18 2001 Jack Moffitt <jack at xiph.org>
-- Update for RC3 release
-
-* Sun Oct 07 2001 Jack Moffitt <jack at xiph.org>
-- add support for configurable prefixes
-
-* Sat Sep 02 2000 Jack Moffitt <jack at icecast.org>
-- initial spec file created

Copied: trunk/ogg2/libogg2.spec.in (from rev 11116, branches/ogg2-arc/libogg2.spec.in)

Deleted: trunk/ogg2/ogg.m4
===================================================================
--- trunk/ogg2/ogg.m4	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/ogg.m4	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,102 +0,0 @@
-# Configure paths for libogg
-# Jack Moffitt <jack at icecast.org> 10-21-2000
-# Shamelessly stolen from Owen Taylor and Manish Singh
-
-dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
-dnl
-AC_DEFUN(XIPH_PATH_OGG,
-[dnl 
-dnl Get the cflags and libraries
-dnl
-AC_ARG_WITH(ogg,[  --with-ogg=PFX   Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
-AC_ARG_WITH(ogg-libraries,[  --with-ogg-libraries=DIR   Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
-AC_ARG_WITH(ogg-includes,[  --with-ogg-includes=DIR   Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
-AC_ARG_ENABLE(oggtest, [  --disable-oggtest       Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
-
-  if test "x$ogg_libraries" != "x" ; then
-    OGG_LIBS="-L$ogg_libraries"
-  elif test "x$ogg_prefix" != "x" ; then
-    OGG_LIBS="-L$ogg_prefix/lib"
-  elif test "x$prefix" != "xNONE" ; then
-    OGG_LIBS="-L$prefix/lib"
-  fi
-
-  OGG_LIBS="$OGG_LIBS -logg"
-
-  if test "x$ogg_includes" != "x" ; then
-    OGG_CFLAGS="-I$ogg_includes"
-  elif test "x$ogg_prefix" != "x" ; then
-    OGG_CFLAGS="-I$ogg_prefix/include"
-  elif test "$prefix" != "xNONE"; then
-    OGG_CFLAGS="-I$prefix/include"
-  fi
-
-  AC_MSG_CHECKING(for Ogg)
-  no_ogg=""
-
-
-  if test "x$enable_oggtest" = "xyes" ; then
-    ac_save_CFLAGS="$CFLAGS"
-    ac_save_LIBS="$LIBS"
-    CFLAGS="$CFLAGS $OGG_CFLAGS"
-    LIBS="$LIBS $OGG_LIBS"
-dnl
-dnl Now check if the installed Ogg is sufficiently new.
-dnl
-      rm -f conf.oggtest
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ogg2/ogg.h>
-
-int main ()
-{
-  system("touch conf.oggtest");
-  return 0;
-}
-
-],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-  fi
-
-  if test "x$no_ogg" = "x" ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$1], , :, [$1])     
-  else
-     AC_MSG_RESULT(no)
-     if test -f conf.oggtest ; then
-       :
-     else
-       echo "*** Could not run Ogg test program, checking why..."
-       CFLAGS="$CFLAGS $OGG_CFLAGS"
-       LIBS="$LIBS $OGG_LIBS"
-       AC_TRY_LINK([
-#include <stdio.h>
-#include <ogg2/ogg.h>
-],     [ return 0; ],
-       [ echo "*** The test program compiled, but did not run. This usually means"
-       echo "*** that the run-time linker is not finding Ogg or finding the wrong"
-       echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
-       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-       echo "*** is required on your system"
-       echo "***"
-       echo "*** If you have an old version installed, it is best to remove it, although"
-       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-       [ echo "*** The test program failed to compile or link. See the file config.log for the"
-       echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
-       echo "*** or that you have moved Ogg since it was installed." ])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-     OGG_CFLAGS=""
-     OGG_LIBS=""
-     ifelse([$2], , :, [$2])
-  fi
-  AC_SUBST(OGG_CFLAGS)
-  AC_SUBST(OGG_LIBS)
-  rm -f conf.oggtest
-])

Copied: trunk/ogg2/ogg2-uninstalled.pc.in (from rev 11116, branches/ogg2-arc/ogg2-uninstalled.pc.in)

Copied: trunk/ogg2/ogg2.m4 (from rev 11116, branches/ogg2-arc/ogg2.m4)

Copied: trunk/ogg2/ogg2.pc.in (from rev 11116, branches/ogg2-arc/ogg2.pc.in)

Modified: trunk/ogg2/src/Makefile.am
===================================================================
--- trunk/ogg2/src/Makefile.am	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/src/Makefile.am	2006-04-10 19:14:33 UTC (rev 11117)
@@ -2,11 +2,13 @@
 
 AUTOMAKE_OPTIONS = foreign
 
+noinst_HEADERS = ogginternal.h mutex.h
+
 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
 
 lib_LTLIBRARIES = libogg2.la
 
-libogg2_la_SOURCES = sync.c stream.c bitwise.c bytewise.c buffer.c
+libogg2_la_SOURCES = sync.c stream.c bitwise.c bytewise.c buffer.c mutex.h  ogginternal.h
 libogg2_la_LDFLAGS = -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
 
 debug:
@@ -14,3 +16,4 @@
 
 profile:
 	$(MAKE) all CFLAGS="@PROFILE@"
+

Modified: trunk/ogg2/src/bitwise.c
===================================================================
--- trunk/ogg2/src/bitwise.c	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/src/bitwise.c	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,11 +1,11 @@
 /********************************************************************
  *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * THIS FILE IS PART OF THE Ogg Reference Library SOURCE CODE.      *
  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2003             *
+ * THE Ogg Reference Library SOURCE CODE IS (C) COPYRIGHT 1994-2004 *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -15,9 +15,9 @@
 
  ********************************************************************/
 
-/* the 'oggpack_xxx functions are 'LSb' endian; if we write a word but
+/* the 'ogg2pack_xxx functions are 'LSb' endian; if we write a word but
    read individual bits, then we'll read the lsb first */
-/* the 'oggpackB_xxx functions are 'MSb' endian; if we write a word but
+/* the 'ogg2packB_xxx functions are 'MSb' endian; if we write a word but
    read individual bits, then we'll read the msb first */
 
 #include <string.h>
@@ -33,28 +33,28 @@
  0x01ffffff,0x03ffffff,0x07ffffff,0x0fffffff,0x1fffffff,
  0x3fffffff,0x7fffffff,0xffffffff };
 
-int oggpack_buffersize(void){
-  return sizeof(oggpack_buffer);
+int ogg2pack_buffersize(void){
+  return sizeof(ogg2pack_buffer);
 }
 
-void oggpack_writeinit(oggpack_buffer *b,ogg_buffer_state *bs){
+void ogg2pack_writeinit(ogg2pack_buffer *b,ogg2_buffer_state *bs){
   memset(b,0,sizeof(*b));
   b->owner=bs;
 }
 
-void oggpackB_writeinit(oggpack_buffer *b,ogg_buffer_state *bs){
-  oggpack_writeinit(b,bs);
+void ogg2packB_writeinit(ogg2pack_buffer *b,ogg2_buffer_state *bs){
+  ogg2pack_writeinit(b,bs);
   b->owner=bs;
 }
 
-static void _oggpack_extend(oggpack_buffer *b){
+static void _ogg2pack_extend(ogg2pack_buffer *b){
   if(b->head){
     b->head->length=b->head->buffer->size; /* only because ->begin is always
 					      zero in a write buffer */
     b->count+=b->head->length;
-    b->head=ogg_buffer_extend(b->head,OGGPACK_CHUNKSIZE);
+    b->head=ogg2_buffer_extend(b->head,OGG2PACK_CHUNKSIZE);
   }else{
-    b->head=b->tail=ogg_buffer_alloc(b->owner,OGGPACK_CHUNKSIZE);
+    b->head=b->tail=ogg2_buffer_alloc(b->owner,OGG2PACK_CHUNKSIZE);
   }
 
   b->headptr=b->head->buffer->data;
@@ -62,35 +62,35 @@
 }
 
 /* Takes only up to 32 bits. */
-void oggpack_write(oggpack_buffer *b,unsigned long value,int bits){
+void ogg2pack_write(ogg2pack_buffer *b,unsigned long value,int bits){
 
   value&=mask[bits]; 
   bits+=b->headbit;
 
   if(!b->headend){
-    _oggpack_extend(b);
+    _ogg2pack_extend(b);
     *b->headptr=value;
   }else
     *b->headptr|=value<<b->headbit;  
 
   if(bits>=8){
     ++b->headptr;
-    if(!--b->headend)_oggpack_extend(b);
+    if(!--b->headend)_ogg2pack_extend(b);
     *b->headptr=value>>(8-b->headbit);  
     
     if(bits>=16){
       ++b->headptr;
-      if(!--b->headend)_oggpack_extend(b);
+      if(!--b->headend)_ogg2pack_extend(b);
       *b->headptr=value>>(16-b->headbit);  
       
       if(bits>=24){
 	++b->headptr;
-	if(!--b->headend)_oggpack_extend(b);
+	if(!--b->headend)_ogg2pack_extend(b);
 	*b->headptr=value>>(24-b->headbit);  
 	
 	if(bits>=32){
 	  ++b->headptr;
-	  if(!--b->headend)_oggpack_extend(b);
+	  if(!--b->headend)_ogg2pack_extend(b);
 	  if(b->headbit)
 	    *b->headptr=value>>(32-b->headbit);  
 	  else
@@ -105,35 +105,35 @@
 }
 
 /* Takes only up to 32 bits. */
-void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits){
+void ogg2packB_write(ogg2pack_buffer *b,unsigned long value,int bits){
 
   value=(value&mask[bits])<<(32-bits); 
   bits+=b->headbit;
 
   if(!b->headend){
-    _oggpack_extend(b);
+    _ogg2pack_extend(b);
     *b->headptr=value>>24;
   }else
     *b->headptr|=value>>(24+b->headbit);    
 
   if(bits>=8){
     ++b->headptr;
-    if(!--b->headend)_oggpack_extend(b);
+    if(!--b->headend)_ogg2pack_extend(b);
     *b->headptr=value>>(16+b->headbit);  
     
     if(bits>=16){
       ++b->headptr;
-      if(!--b->headend)_oggpack_extend(b);
+      if(!--b->headend)_ogg2pack_extend(b);
       *b->headptr=value>>(8+b->headbit);  
       
       if(bits>=24){
 	++b->headptr;
-	if(!--b->headend)_oggpack_extend(b);
+	if(!--b->headend)_ogg2pack_extend(b);
 	*b->headptr=value>>(b->headbit);  
 	
 	if(bits>=32){
 	  ++b->headptr;
-	  if(!--b->headend)_oggpack_extend(b);
+	  if(!--b->headend)_ogg2pack_extend(b);
 	  if(b->headbit)
 	    *b->headptr=value<<(8-b->headbit);
 	  else
@@ -146,42 +146,42 @@
   b->headbit=bits&7;
 }
 
-void oggpack_writealign(oggpack_buffer *b){
+void ogg2pack_writealign(ogg2pack_buffer *b){
   int bits=8-b->headbit;
   if(bits<8)
-    oggpack_write(b,0,bits);
+    ogg2pack_write(b,0,bits);
 }
 
-void oggpackB_writealign(oggpack_buffer *b){
+void ogg2packB_writealign(ogg2pack_buffer *b){
   int bits=8-b->headbit;
   if(bits<8)
-    oggpackB_write(b,0,bits);
+    ogg2packB_write(b,0,bits);
 }
 
-ogg_reference *oggpack_writebuffer(oggpack_buffer *b){
-  /* unlike generic ogg_buffer_references, the oggpack write buffers
-     will never have any potential prefixed/unused ogg_buffer data */
+ogg2_reference *ogg2pack_writebuffer(ogg2pack_buffer *b){
+  /* unlike generic ogg2_buffer_references, the oggpack write buffers
+     will never have any potential prefixed/unused ogg2_buffer data */
 
   b->head->length=b->headptr-b->head->buffer->data+(b->headbit+7)/8;
   return(b->tail);
 }
 
-ogg_reference *oggpackB_writebuffer(oggpack_buffer *b){
-  return oggpack_writebuffer(b);
+ogg2_reference *ogg2packB_writebuffer(ogg2pack_buffer *b){
+  return ogg2pack_writebuffer(b);
 }
 
-/* frees and deallocates the oggpack_buffer ogg_buffer usage */
-void oggpack_writeclear(oggpack_buffer *b){
-  ogg_buffer_release(b->tail);
+/* frees and deallocates the ogg2pack_buffer ogg2_buffer usage */
+void ogg2pack_writeclear(ogg2pack_buffer *b){
+  ogg2_buffer_release(b->tail);
   memset(b,0,sizeof(*b));
 }
 
-void oggpackB_writeclear(oggpack_buffer *b){
-  oggpack_writeclear(b);
+void ogg2packB_writeclear(ogg2pack_buffer *b){
+  ogg2pack_writeclear(b);
 }
 
 /* mark read process as having run off the end */
-static void _adv_halt(oggpack_buffer *b){
+static void _adv_halt(ogg2pack_buffer *b){
   b->headptr=b->head->buffer->data+b->head->begin+b->head->length;
   b->headend=-1;
   b->headbit=0;
@@ -191,7 +191,7 @@
    headend is zero, simply finds next byte.  If we're up to the end
    of the buffer, leaves headend at zero.  If we've read past the end,
    halt the decode process. */
-static void _span(oggpack_buffer *b){
+static void _span(ogg2pack_buffer *b){
   while(b->headend<1){
     if(b->head->next){
       b->count+=b->head->length;
@@ -210,7 +210,7 @@
   }
 }
 
-void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){
+void ogg2pack_readinit(ogg2pack_buffer *b,ogg2_reference *r){
   memset(b,0,sizeof(*b));
 
   b->tail=b->head=r;
@@ -220,8 +220,8 @@
   _span(b);
 }
 
-void oggpackB_readinit(oggpack_buffer *b,ogg_reference *r){
-  oggpack_readinit(b,r);
+void ogg2packB_readinit(ogg2pack_buffer *b,ogg2_reference *r){
+  ogg2pack_readinit(b,r);
 }
 
 #define _lookspan()   while(!end){\
@@ -232,7 +232,7 @@
                       }
 
 /* Read in bits without advancing the bitptr; bits <= 32 */
-int oggpack_look(oggpack_buffer *b,int bits,unsigned long *ret){
+int ogg2pack_look(ogg2pack_buffer *b,int bits,unsigned long *ret){
   unsigned long m=mask[bits];
 
   bits+=b->headbit;
@@ -240,7 +240,7 @@
   if(bits >= b->headend*8){
     int            end=b->headend;
     unsigned char *ptr=b->headptr;
-    ogg_reference *head=b->head;
+    ogg2_reference *head=b->head;
 
     if(end<0)return -1;
     
@@ -291,7 +291,7 @@
 }
 
 /* Read in bits without advancing the bitptr; bits <= 32 */
-int oggpackB_look(oggpack_buffer *b,int bits,unsigned long *ret){
+int ogg2packB_look(ogg2pack_buffer *b,int bits,unsigned long *ret){
   int m=32-bits;
 
   bits+=b->headbit;
@@ -299,7 +299,7 @@
   if(bits >= b->headend<<3){
     int            end=b->headend;
     unsigned char *ptr=b->headptr;
-    ogg_reference *head=b->head;
+    ogg2_reference *head=b->head;
 
     if(end<0)return -1;
     
@@ -348,18 +348,18 @@
   return 0;
 }
 
-long oggpack_look1(oggpack_buffer *b){
+long ogg2pack_look1(ogg2pack_buffer *b){
   if(b->headend<1)return -1;
   return (b->headptr[0]>>b->headbit)&1;
 }
 
-long oggpackB_look1(oggpack_buffer *b){
+long ogg2packB_look1(ogg2pack_buffer *b){
   if(b->headend<1)return -1;
   return (b->headptr[0]>>(7-b->headbit))&1;
 }
 
 /* limited to 32 at a time */
-void oggpack_adv(oggpack_buffer *b,int bits){
+void ogg2pack_adv(ogg2pack_buffer *b,int bits){
   bits+=b->headbit;
   b->headend-=bits/8;
   b->headbit=bits&7;
@@ -367,12 +367,12 @@
   _span(b);
 }
 
-void oggpackB_adv(oggpack_buffer *b,int bits){
-  oggpack_adv(b,bits);
+void ogg2packB_adv(ogg2pack_buffer *b,int bits){
+  ogg2pack_adv(b,bits);
 }
 
 /* spans forward and finds next byte.  Never halts */
-static void _span_one(oggpack_buffer *b){
+static void _span_one(ogg2pack_buffer *b){
   while(b->headend<1){
     if(b->head->next){
       b->count+=b->head->length;
@@ -384,7 +384,7 @@
   }
 }
 
-void oggpack_adv1(oggpack_buffer *b){
+void ogg2pack_adv1(ogg2pack_buffer *b){
   if(b->headend<2){
     if(b->headend<1){
       _adv_halt(b);
@@ -406,11 +406,11 @@
   }
 }
 
-void oggpackB_adv1(oggpack_buffer *b){
-  oggpack_adv1(b);
+void ogg2packB_adv1(ogg2pack_buffer *b){
+  ogg2pack_adv1(b);
 }
 
-static int _halt_one(oggpack_buffer *b){
+static int _halt_one(ogg2pack_buffer *b){
   if(b->headend<1){
     _adv_halt(b);
     return -1;
@@ -419,7 +419,7 @@
 }
 
 /* bits <= 32 */
-int oggpack_read(oggpack_buffer *b,int bits,unsigned long *ret){
+int ogg2pack_read(ogg2pack_buffer *b,int bits,unsigned long *ret){
   unsigned long m=mask[bits];
 
   bits+=b->headbit;
@@ -499,7 +499,7 @@
 }
 
 /* bits <= 32 */
-int oggpackB_read(oggpack_buffer *b,int bits,unsigned long *ret){
+int ogg2packB_read(ogg2pack_buffer *b,int bits,unsigned long *ret){
   long m=32-bits;
   
   bits+=b->headbit;
@@ -577,7 +577,7 @@
   return 0;
 }
 
-long oggpack_read1(oggpack_buffer *b){
+long ogg2pack_read1(ogg2pack_buffer *b){
   long ret;
 
   if(b->headend<2){
@@ -600,7 +600,7 @@
   return ret&1;
 }
 
-long oggpackB_read1(oggpack_buffer *b){
+long ogg2packB_read1(ogg2pack_buffer *b){
   long ret;
 
   if(b->headend<2){
@@ -623,30 +623,30 @@
   return ret&1;
 }
 
-long oggpack_bytes(oggpack_buffer *b){
+long ogg2pack_bytes(ogg2pack_buffer *b){
   return(b->count+b->headptr-b->head->buffer->data-b->head->begin+
 	 (b->headbit+7)/8);
 }
 
-long oggpack_bits(oggpack_buffer *b){
+long ogg2pack_bits(ogg2pack_buffer *b){
   return((b->count+b->headptr-b->head->buffer->data-b->head->begin)*8+
 	 b->headbit);
 }
 
-long oggpackB_bytes(oggpack_buffer *b){
-  return oggpack_bytes(b);
+long ogg2packB_bytes(ogg2pack_buffer *b){
+  return ogg2pack_bytes(b);
 }
 
-long oggpackB_bits(oggpack_buffer *b){
-  return oggpack_bits(b);
+long ogg2packB_bits(ogg2pack_buffer *b){
+  return ogg2pack_bits(b);
 }
 
-int oggpack_eop(oggpack_buffer *b){
+int ogg2pack_eop(ogg2pack_buffer *b){
   return(b->headend<0?-1:0);
 }  
 
-int oggpackB_eop(oggpack_buffer *b){
-  return oggpack_eop(b);
+int ogg2packB_eop(ogg2pack_buffer *b){
+  return ogg2pack_eop(b);
 }  
 
 /* Self test of the bitwise routines; everything else is based on
@@ -664,10 +664,10 @@
   return(ret);
 }
       
-oggpack_buffer o;
-oggpack_buffer r;
-ogg_buffer_state *bs;
-ogg_reference *or;
+ogg2pack_buffer o;
+ogg2pack_buffer r;
+ogg2_buffer_state *bs;
+ogg2_reference *or;
 #define TESTWORDS 4096
 
 void report(char *in){
@@ -675,7 +675,7 @@
   exit(1);
 }
 
-int getbyte(ogg_reference *or,int position){
+int getbyte(ogg2_reference *or,int position){
   while(or && position>=or->length){
     position-=or->length;
     or=or->next;
@@ -690,22 +690,22 @@
 
 void cliptest(unsigned long *b,int vals,int bits,int *comp,int compsize){
   long bytes,i,bitcount=0;
-  ogg_reference *or;
+  ogg2_reference *or;
 
-  oggpack_writeinit(&o,bs);
+  ogg2pack_writeinit(&o,bs);
   for(i=0;i<vals;i++){
-    oggpack_write(&o,b[i],bits?bits:ilog(b[i]));
+    ogg2pack_write(&o,b[i],bits?bits:ilog(b[i]));
     bitcount+=bits?bits:ilog(b[i]);
-    if(bitcount!=oggpack_bits(&o)){
+    if(bitcount!=ogg2pack_bits(&o)){
       report("wrong number of bits while writing!\n");
     }
-    if((bitcount+7)/8!=oggpack_bytes(&o)){
+    if((bitcount+7)/8!=ogg2pack_bytes(&o)){
       report("wrong number of bytes while writing!\n");
     }
   }
 
-  or=oggpack_writebuffer(&o);
-  bytes=oggpack_bytes(&o);
+  or=ogg2pack_writebuffer(&o);
+  bytes=ogg2pack_bytes(&o);
 
   if(bytes!=compsize)report("wrong number of bytes!\n");
   for(i=0;i<bytes;i++)if(getbyte(or,i)!=comp[i]){
@@ -714,24 +714,24 @@
   }
 
   bitcount=0;
-  oggpack_readinit(&r,or);
+  ogg2pack_readinit(&r,or);
   for(i=0;i<vals;i++){
     unsigned long test;
     int tbit=bits?bits:ilog(b[i]);
-    if(oggpack_look(&r,tbit,&test))
+    if(ogg2pack_look(&r,tbit,&test))
       report("out of data!\n");
     if(test!=(b[i]&mask[tbit])){
       fprintf(stderr,"%ld) %lx %lx\n",i,(b[i]&mask[tbit]),test);
       report("looked at incorrect value!\n");
     }
     if(tbit==1)
-      if(oggpack_look1(&r)!=(int)(b[i]&mask[tbit]))
+      if(ogg2pack_look1(&r)!=(int)(b[i]&mask[tbit]))
 	report("looked at single bit incorrect value!\n");
     if(tbit==1){
-      if(oggpack_read1(&r)!=(int)(b[i]&mask[tbit]))
+      if(ogg2pack_read1(&r)!=(int)(b[i]&mask[tbit]))
 	report("read incorrect single bit value!\n");
     }else{
-      if(oggpack_read(&r,tbit,&test)){
+      if(ogg2pack_read(&r,tbit,&test)){
 	report("premature end of data when reading!\n");
       }
       if(test!=(b[i]&mask[tbit])){
@@ -741,59 +741,59 @@
     }
     bitcount+=tbit;
 
-    if(bitcount!=oggpack_bits(&r))
+    if(bitcount!=ogg2pack_bits(&r))
       report("wrong number of bits while reading!\n");
-    if((bitcount+7)/8!=oggpack_bytes(&r))
+    if((bitcount+7)/8!=ogg2pack_bytes(&r))
       report("wrong number of bytes while reading!\n");
 
   }
-  if(oggpack_bytes(&r)!=bytes)report("leftover bytes after read!\n");
-  oggpack_writeclear(&o);
+  if(ogg2pack_bytes(&r)!=bytes)report("leftover bytes after read!\n");
+  ogg2pack_writeclear(&o);
 
 }
 
 void cliptestB(unsigned long *b,int vals,int bits,int *comp,int compsize){
   long bytes,i;
-  ogg_reference *or;
+  ogg2_reference *or;
 
-  oggpackB_writeinit(&o,bs);
+  ogg2packB_writeinit(&o,bs);
   for(i=0;i<vals;i++)
-    oggpackB_write(&o,b[i],bits?bits:ilog(b[i]));
-  or=oggpackB_writebuffer(&o);
-  bytes=oggpackB_bytes(&o);
+    ogg2packB_write(&o,b[i],bits?bits:ilog(b[i]));
+  or=ogg2packB_writebuffer(&o);
+  bytes=ogg2packB_bytes(&o);
   if(bytes!=compsize)report("wrong number of bytes!\n");
   for(i=0;i<bytes;i++)if(getbyte(or,i)!=comp[i]){
     for(i=0;i<bytes;i++)fprintf(stderr,"%x %x\n",getbyte(or,i),(int)comp[i]);
     report("wrote incorrect value!\n");
   }
-  oggpackB_readinit(&r,or);
+  ogg2packB_readinit(&r,or);
   for(i=0;i<vals;i++){
     unsigned long test;
     int tbit=bits?bits:ilog(b[i]);
-    if(oggpackB_look(&r,tbit,&test))
+    if(ogg2packB_look(&r,tbit,&test))
       report("out of data!\n");
     if(test!=(b[i]&mask[tbit]))
       report("looked at incorrect value!\n");
     if(tbit==1)
-      if(oggpackB_look1(&r)!=(int)(b[i]&mask[tbit]))
+      if(ogg2packB_look1(&r)!=(int)(b[i]&mask[tbit]))
 	report("looked at single bit incorrect value!\n");
     if(tbit==1){
-      if(oggpackB_read1(&r)!=(int)(b[i]&mask[tbit]))
+      if(ogg2packB_read1(&r)!=(int)(b[i]&mask[tbit]))
 	report("read incorrect single bit value!\n");
     }else{
-      if(oggpackB_read(&r,tbit,&test))
+      if(ogg2packB_read(&r,tbit,&test))
 	report("premature end of data when reading!\n");
       if(test!=(b[i]&mask[tbit]))
 	report("read incorrect value!\n");
     }
   }
-  if(oggpackB_bytes(&r)!=bytes)report("leftover bytes after read!\n");
-  oggpackB_writeclear(&o);
+  if(ogg2packB_bytes(&r)!=bytes)report("leftover bytes after read!\n");
+  ogg2packB_writeclear(&o);
 }
 
 int flatten (unsigned char *flat){
   unsigned char *ptr=flat;
-  ogg_reference *head=oggpack_writebuffer(&o);
+  ogg2_reference *head=ogg2pack_writebuffer(&o);
   while(head){
     memcpy(ptr,head->buffer->data+head->begin,head->length);
     ptr+=head->length;
@@ -884,27 +884,27 @@
   int i;
 
   /* are the proper number of bits left over? */
-  int leftover=count*8-oggpack_bits(&o);
+  int leftover=count*8-ogg2pack_bits(&o);
   if(leftover>7)
     report("\nERROR: too many bits reported left over.\n");
   
   /* does reading to exactly byte alignment *not* trip EOF? */
-  if(oggpack_read(&o,leftover,&temp))
+  if(ogg2pack_read(&o,leftover,&temp))
     report("\nERROR: read to but not past exact end tripped EOF.\n");
-  if(oggpack_bits(&o)!=count*8)
+  if(ogg2pack_bits(&o)!=count*8)
     report("\nERROR: read to but not past exact end reported bad bitcount.\n");
 
   /* does EOF trip properly after a single additional bit? */
-  if(!oggpack_read(&o,1,&temp))
+  if(!ogg2pack_read(&o,1,&temp))
     report("\nERROR: read past exact end did not trip EOF.\n");
-  if(oggpack_bits(&o)!=count*8)
+  if(ogg2pack_bits(&o)!=count*8)
     report("\nERROR: read past exact end reported bad bitcount.\n");
   
   /* does EOF stay set over additional bit reads? */
   for(i=0;i<=32;i++){
-    if(!oggpack_read(&o,i,&temp))
+    if(!ogg2pack_read(&o,i,&temp))
       report("\nERROR: EOF did not stay set on stream.\n");
-    if(oggpack_bits(&o)!=count*8)
+    if(ogg2pack_bits(&o)!=count*8)
       report("\nERROR: read past exact end reported bad bitcount.\n");
   }
 }	
@@ -913,30 +913,30 @@
   int i;
 
   /* are the proper number of bits left over? */
-  int leftover=count*8-oggpack_bits(&o);
+  int leftover=count*8-ogg2pack_bits(&o);
   if(leftover>7)
     report("\nERROR: too many bits reported left over.\n");
   
   /* does reading to exactly byte alignment *not* trip EOF? */
-  oggpack_adv(&o,leftover);
+  ogg2pack_adv(&o,leftover);
   if(o.headend!=0)
     report("\nERROR: read to but not past exact end tripped EOF.\n");
-  if(oggpack_bits(&o)!=count*8)
+  if(ogg2pack_bits(&o)!=count*8)
     report("\nERROR: read to but not past exact end reported bad bitcount.\n");
   
   /* does EOF trip properly after a single additional bit? */
-  oggpack_adv(&o,1);
+  ogg2pack_adv(&o,1);
   if(o.headend>=0)
     report("\nERROR: read past exact end did not trip EOF.\n");
-  if(oggpack_bits(&o)!=count*8)
+  if(ogg2pack_bits(&o)!=count*8)
     report("\nERROR: read past exact end reported bad bitcount.\n");
   
   /* does EOF stay set over additional bit reads? */
   for(i=0;i<=32;i++){
-    oggpack_adv(&o,i);
+    ogg2pack_adv(&o,i);
     if(o.headend>=0)
       report("\nERROR: EOF did not stay set on stream.\n");
-    if(oggpack_bits(&o)!=count*8)
+    if(ogg2pack_bits(&o)!=count*8)
       report("\nERROR: read past exact end reported bad bitcount.\n");
   }
 }	
@@ -946,27 +946,27 @@
   int i;
 
   /* are the proper number of bits left over? */
-  int leftover=count*8-oggpackB_bits(&o);
+  int leftover=count*8-ogg2packB_bits(&o);
   if(leftover>7)
     report("\nERROR: too many bits reported left over.\n");
   
   /* does reading to exactly byte alignment *not* trip EOF? */
-  if(oggpackB_read(&o,leftover,&temp))
+  if(ogg2packB_read(&o,leftover,&temp))
     report("\nERROR: read to but not past exact end tripped EOF.\n");
-  if(oggpackB_bits(&o)!=count*8)
+  if(ogg2packB_bits(&o)!=count*8)
     report("\nERROR: read to but not past exact end reported bad bitcount.\n");
   
   /* does EOF trip properly after a single additional bit? */
-  if(!oggpackB_read(&o,1,&temp))
+  if(!ogg2packB_read(&o,1,&temp))
     report("\nERROR: read past exact end did not trip EOF.\n");
-  if(oggpackB_bits(&o)!=count*8)
+  if(ogg2packB_bits(&o)!=count*8)
     report("\nERROR: read past exact end reported bad bitcount.\n");
   
   /* does EOF stay set over additional bit reads? */
   for(i=0;i<=32;i++){
-    if(!oggpackB_read(&o,i,&temp))
+    if(!ogg2packB_read(&o,i,&temp))
       report("\nERROR: EOF did not stay set on stream.\n");
-    if(oggpackB_bits(&o)!=count*8)
+    if(ogg2packB_bits(&o)!=count*8)
       report("\nERROR: read past exact end reported bad bitcount.\n");
   }
 }	
@@ -975,32 +975,32 @@
   int i;
 
   /* are the proper number of bits left over? */
-  int leftover=count*8-oggpackB_bits(&o);
+  int leftover=count*8-ogg2packB_bits(&o);
   if(leftover>7)
     report("\nERROR: too many bits reported left over.\n");
   
   /* does reading to exactly byte alignment *not* trip EOF? */
   for(i=0;i<leftover;i++){
-    oggpackB_adv1(&o);
+    ogg2packB_adv1(&o);
     if(o.headend<0)
       report("\nERROR: read to but not past exact end tripped EOF.\n");
   }
-  if(oggpackB_bits(&o)!=count*8)
+  if(ogg2packB_bits(&o)!=count*8)
     report("\nERROR: read to but not past exact end reported bad bitcount.\n");
   
   /* does EOF trip properly after a single additional bit? */
-  oggpackB_adv1(&o);
+  ogg2packB_adv1(&o);
   if(o.headend>=0)
     report("\nERROR: read past exact end did not trip EOF.\n");
-  if(oggpackB_bits(&o)!=count*8)
+  if(ogg2packB_bits(&o)!=count*8)
     report("\nERROR: read past exact end reported bad bitcount.\n");
   
   /* does EOF stay set over additional bit reads? */
   for(i=0;i<=32;i++){
-    oggpackB_adv1(&o);
+    ogg2packB_adv1(&o);
     if(o.headend>=0)
       report("\nERROR: EOF did not stay set on stream.\n");
-    if(oggpackB_bits(&o)!=count*8)
+    if(ogg2packB_bits(&o)!=count*8)
       report("\nERROR: read past exact end reported bad bitcount.\n");
   }
 }	
@@ -1072,7 +1072,7 @@
 
   /* Test read/write together */
   /* Later we test against pregenerated bitstreams */
-  bs=ogg_buffer_create();
+  bs=ogg2_buffer_create();
 
   fprintf(stderr,"\nSmall preclipped packing (LSb): ");
   cliptest(testbuffer1,test1size,0,one,onesize);
@@ -1088,24 +1088,24 @@
 
   fprintf(stderr,"\n32 bit preclipped packing (LSb): ");
 
-  oggpack_writeclear(&o);
-  oggpack_writeinit(&o,bs);
+  ogg2pack_writeclear(&o);
+  ogg2pack_writeinit(&o,bs);
   for(i=0;i<test2size;i++)
-    oggpack_write(&o,large[i],32);
-  or=oggpack_writebuffer(&o);
-  bytes=oggpack_bytes(&o);
-  oggpack_readinit(&r,or);
+    ogg2pack_write(&o,large[i],32);
+  or=ogg2pack_writebuffer(&o);
+  bytes=ogg2pack_bytes(&o);
+  ogg2pack_readinit(&r,or);
   for(i=0;i<test2size;i++){
     unsigned long test;
-    if(oggpack_look(&r,32,&test)==-1)report("out of data. failed!");
+    if(ogg2pack_look(&r,32,&test)==-1)report("out of data. failed!");
     if(test!=large[i]){
       fprintf(stderr,"%ld != %ld (%lx!=%lx):",test,large[i],
 	      test,large[i]);
       report("read incorrect value!\n");
     }
-    oggpack_adv(&r,32);
+    ogg2pack_adv(&r,32);
   }
-  if(oggpack_bytes(&r)!=bytes)report("leftover bytes after read!\n");
+  if(ogg2pack_bytes(&r)!=bytes)report("leftover bytes after read!\n");
   fprintf(stderr,"ok.");
 
   fprintf(stderr,"\nSmall unclipped packing (LSb): ");
@@ -1122,48 +1122,48 @@
 
   fprintf(stderr,"\nTesting read past end (LSb): ");
   {
-    ogg_buffer lob={"\0\0\0\0\0\0\0\0",8,0,{0}};
-    ogg_reference lor={&lob,0,8,0,1};
+    ogg2_buffer lob={"\0\0\0\0\0\0\0\0",8,0,{0}};
+    ogg2_reference lor={&lob,0,8,0,1};
 
-    oggpack_readinit(&r,&lor);
+    ogg2pack_readinit(&r,&lor);
     for(i=0;i<64;i++){
-      if(oggpack_read1(&r)!=0){
+      if(ogg2pack_read1(&r)!=0){
 	fprintf(stderr,"failed; got -1 prematurely.\n");
 	exit(1);
       }
     }
-    if(oggpack_look1(&r)!=-1 ||
-       oggpack_read1(&r)!=-1){
+    if(ogg2pack_look1(&r)!=-1 ||
+       ogg2pack_read1(&r)!=-1){
       fprintf(stderr,"failed; read past end without -1.\n");
       exit(1);
     }
   }
   {
-    ogg_buffer lob={"\0\0\0\0\0\0\0\0",8,0,{0}};
-    ogg_reference lor={&lob,0,8,0,1};
+    ogg2_buffer lob={"\0\0\0\0\0\0\0\0",8,0,{0}};
+    ogg2_reference lor={&lob,0,8,0,1};
     unsigned long test;
 
-    oggpack_readinit(&r,&lor);
-    if(oggpack_read(&r,30,&test)!=0 || oggpack_read(&r,16,&test)!=0){
+    ogg2pack_readinit(&r,&lor);
+    if(ogg2pack_read(&r,30,&test)!=0 || ogg2pack_read(&r,16,&test)!=0){
       fprintf(stderr,"failed 2; got -1 prematurely.\n");
       exit(1);
     }
     
-    if(oggpack_look(&r,18,&test)!=0){
+    if(ogg2pack_look(&r,18,&test)!=0){
       fprintf(stderr,"failed 3; got -1 prematurely.\n");
       exit(1);
     }
-    if(oggpack_look(&r,19,&test)!=-1){
+    if(ogg2pack_look(&r,19,&test)!=-1){
       fprintf(stderr,"failed; read past end without -1.\n");
       exit(1);
     }
-    if(oggpack_look(&r,32,&test)!=-1){
+    if(ogg2pack_look(&r,32,&test)!=-1){
       fprintf(stderr,"failed; read past end without -1.\n");
       exit(1);
     }
   }
   fprintf(stderr,"ok.\n");
-  oggpack_writeclear(&o);
+  ogg2pack_writeclear(&o);
 
   /********** lazy, cut-n-paste retest with MSb packing ***********/
 
@@ -1184,23 +1184,23 @@
 
   fprintf(stderr,"\n32 bit preclipped packing (MSb): ");
 
-  oggpackB_writeinit(&o,bs);
+  ogg2packB_writeinit(&o,bs);
   for(i=0;i<test2size;i++)
-    oggpackB_write(&o,large[i],32);
-  or=oggpackB_writebuffer(&o);
-  bytes=oggpackB_bytes(&o);
-  oggpackB_readinit(&r,or);
+    ogg2packB_write(&o,large[i],32);
+  or=ogg2packB_writebuffer(&o);
+  bytes=ogg2packB_bytes(&o);
+  ogg2packB_readinit(&r,or);
   for(i=0;i<test2size;i++){
     unsigned long test;
-    if(oggpackB_look(&r,32,&test)==-1)report("out of data. failed!");
+    if(ogg2packB_look(&r,32,&test)==-1)report("out of data. failed!");
     if(test!=large[i]){
       fprintf(stderr,"%ld != %ld (%lx!=%lx):",test,large[i],
 	      test,large[i]);
       report("read incorrect value!\n");
     }
-    oggpackB_adv(&r,32);
+    ogg2packB_adv(&r,32);
   }
-  if(oggpackB_bytes(&r)!=bytes)report("leftover bytes after read!\n");
+  if(ogg2packB_bytes(&r)!=bytes)report("leftover bytes after read!\n");
   fprintf(stderr,"ok.");
 
   fprintf(stderr,"\nSmall unclipped packing (MSb): ");
@@ -1217,49 +1217,49 @@
 
   fprintf(stderr,"\nTesting read past end (MSb): ");
   {
-    ogg_buffer lob={"\0\0\0\0\0\0\0\0",8,0,{0}};
-    ogg_reference lor={&lob,0,8,0,1};
+    ogg2_buffer lob={"\0\0\0\0\0\0\0\0",8,0,{0}};
+    ogg2_reference lor={&lob,0,8,0,1};
     unsigned long test;
 
-    oggpackB_readinit(&r,&lor);
+    ogg2packB_readinit(&r,&lor);
     for(i=0;i<64;i++){
-      if(oggpackB_read(&r,1,&test)){
+      if(ogg2packB_read(&r,1,&test)){
 	fprintf(stderr,"failed; got -1 prematurely.\n");
 	exit(1);
       }
     }
-    if(oggpackB_look(&r,1,&test)!=-1 ||
-       oggpackB_read(&r,1,&test)!=-1){
+    if(ogg2packB_look(&r,1,&test)!=-1 ||
+       ogg2packB_read(&r,1,&test)!=-1){
       fprintf(stderr,"failed; read past end without -1.\n");
       exit(1);
     }
   }
   {
-    ogg_buffer lob={"\0\0\0\0\0\0\0\0",8,0,{0}};
-    ogg_reference lor={&lob,0,8,0,1};
+    ogg2_buffer lob={"\0\0\0\0\0\0\0\0",8,0,{0}};
+    ogg2_reference lor={&lob,0,8,0,1};
     unsigned long test;
-    oggpackB_readinit(&r,&lor);
+    ogg2packB_readinit(&r,&lor);
 
-    if(oggpackB_read(&r,30,&test)!=0 || oggpackB_read(&r,16,&test)!=0){
+    if(ogg2packB_read(&r,30,&test)!=0 || ogg2packB_read(&r,16,&test)!=0){
       fprintf(stderr,"failed 2; got -1 prematurely.\n");
       exit(1);
     }
     
-    if(oggpackB_look(&r,18,&test)!=0){
+    if(ogg2packB_look(&r,18,&test)!=0){
       fprintf(stderr,"failed 3; got -1 prematurely.\n");
       exit(1);
     }
-    if(oggpackB_look(&r,19,&test)!=-1){
+    if(ogg2packB_look(&r,19,&test)!=-1){
       fprintf(stderr,"failed 4; read past end without -1.\n");
       exit(1);
     }
-    if(oggpackB_look(&r,32,&test)!=-1){
+    if(ogg2packB_look(&r,32,&test)!=-1){
       fprintf(stderr,"failed 5; read past end without -1.\n");
       exit(1);
     }
     fprintf(stderr,"ok.\n\n");
   }
-  oggpackB_writeclear(&o);
+  ogg2packB_writeclear(&o);
 
   /* now the scary shit: randomized testing */
 
@@ -1270,7 +1270,7 @@
     unsigned char flat[4*TESTWORDS]; /* max possible needed size */
 
     fprintf(stderr,"\rRandomized testing (LSb)... (%ld)   ",10000-i);
-    oggpack_writeinit(&o,bs);
+    ogg2pack_writeinit(&o,bs);
 
     /* generate a list of words and lengths */
     /* write the required number of bits out to packbuffer */
@@ -1278,17 +1278,17 @@
       values[j]=rand();
       len[j]=(rand()%33);
 
-      oggpack_write(&o,values[j],len[j]);
+      ogg2pack_write(&o,values[j],len[j]);
 
       bitcount+=len[j];
-      if(oggpack_bits(&o)!=bitcount){
+      if(ogg2pack_bits(&o)!=bitcount){
 	fprintf(stderr,"\nERROR: Write bitcounter %d != %ld!\n",
-		bitcount,oggpack_bits(&o));
+		bitcount,ogg2pack_bits(&o));
 	exit(1);
       }
-      if(oggpack_bytes(&o)!=(bitcount+7)/8){
+      if(ogg2pack_bytes(&o)!=(bitcount+7)/8){
 	fprintf(stderr,"\nERROR: Write bytecounter %d != %ld!\n",
-		(bitcount+7)/8,oggpack_bytes(&o));
+		(bitcount+7)/8,ogg2pack_bytes(&o));
 	exit(1);
       }
       
@@ -1300,7 +1300,7 @@
       fprintf(stderr,"\nERROR: flattened write buffer incorrect length\n");
       exit(1);
     }
-    oggpack_writeclear(&o);
+    ogg2pack_writeclear(&o);
 
     /* verify against original list */
     lsbverify(values,len,flat);
@@ -1308,7 +1308,7 @@
     /* construct random-length buffer chain from flat vector; random
        byte starting offset within the length of the vector */
     {
-      ogg_reference *or=NULL,*orl=NULL;
+      ogg2_reference *or=NULL,*orl=NULL;
       unsigned char *ptr=flat;
       
       /* build buffer chain */
@@ -1319,9 +1319,9 @@
 	if(ilen>count2)ilen=count2;
 
 	if(or)
-	  orl=ogg_buffer_extend(orl,ilen+ibegin);
+	  orl=ogg2_buffer_extend(orl,ilen+ibegin);
 	else
-	  or=orl=ogg_buffer_alloc(bs,ilen+ibegin);
+	  or=orl=ogg2_buffer_alloc(bs,ilen+ibegin);
 
 	memcpy(orl->buffer->data+ibegin,ptr,ilen);
        
@@ -1332,7 +1332,7 @@
 	ptr+=ilen;
       }
 
-      if(ogg_buffer_length(or)!=(bitcount+7)/8){
+      if(ogg2_buffer_length(or)!=(bitcount+7)/8){
 	fprintf(stderr,"\nERROR: buffer length incorrect after build.\n");
 	exit(1);
       }
@@ -1346,39 +1346,39 @@
 
 	for(j=0;j<begin;j++)
 	  bitcount+=len[j];
-	or=ogg_buffer_pretruncate(or,bitcount/8);
+	or=ogg2_buffer_pretruncate(or,bitcount/8);
 	bitoffset=bitcount%=8;
 	for(;j<begin+ilen;j++)
 	  bitcount+=len[j];
-	ogg_buffer_posttruncate(or,((bitcount+7)/8));
+	ogg2_buffer_posttruncate(or,((bitcount+7)/8));
 
-	if((count=ogg_buffer_length(or))!=(bitcount+7)/8){
+	if((count=ogg2_buffer_length(or))!=(bitcount+7)/8){
 	  fprintf(stderr,"\nERROR: buffer length incorrect after truncate.\n");
 	  exit(1);
 	}
 	
-	oggpack_readinit(&o,or);
+	ogg2pack_readinit(&o,or);
 
 	/* verify bit count */
-	if(oggpack_bits(&o)!=0){
+	if(ogg2pack_bits(&o)!=0){
 	  fprintf(stderr,"\nERROR: Read bitcounter not zero!\n");
 	  exit(1);
 	}
-	if(oggpack_bytes(&o)!=0){
+	if(ogg2pack_bytes(&o)!=0){
 	  fprintf(stderr,"\nERROR: Read bytecounter not zero!\n");
 	  exit(1);
 	}
 
 	bitcount=bitoffset;
-	oggpack_read(&o,bitoffset,&temp);
+	ogg2pack_read(&o,bitoffset,&temp);
 
 	/* read and compare to original list */
 	for(j=begin;j<begin+ilen;j++){
 	  int ret;
 	  if(len[j]==1 && rand()%1)
-	    temp=ret=oggpack_read1(&o);
+	    temp=ret=ogg2pack_read1(&o);
 	  else
-	    ret=oggpack_read(&o,len[j],&temp);
+	    ret=ogg2pack_read(&o,len[j],&temp);
 	  if(ret<0){
 	    fprintf(stderr,"\nERROR: End of stream too soon! word: %d,%d\n",
 		    j-begin,ilen);
@@ -1390,14 +1390,14 @@
 	    exit(1);
 	  }
 	  bitcount+=len[j];
-	  if(oggpack_bits(&o)!=bitcount){
+	  if(ogg2pack_bits(&o)!=bitcount){
 	    fprintf(stderr,"\nERROR: Read bitcounter %d != %ld!\n",
-		    bitcount,oggpack_bits(&o));
+		    bitcount,ogg2pack_bits(&o));
 	    exit(1);
 	  }
-	  if(oggpack_bytes(&o)!=(bitcount+7)/8){
+	  if(ogg2pack_bytes(&o)!=(bitcount+7)/8){
 	    fprintf(stderr,"\nERROR: Read bytecounter %d != %ld!\n",
-		    (bitcount+7)/8,oggpack_bytes(&o));
+		    (bitcount+7)/8,ogg2pack_bytes(&o));
 	    exit(1);
 	  }
 	  
@@ -1405,17 +1405,17 @@
 	_end_verify(count);
 	
 	/* look/adv version */
-	oggpack_readinit(&o,or);
+	ogg2pack_readinit(&o,or);
 	bitcount=bitoffset;
-	oggpack_adv(&o,bitoffset);
+	ogg2pack_adv(&o,bitoffset);
 
 	/* read and compare to original list */
 	for(j=begin;j<begin+ilen;j++){
 	  int ret;
 	  if(len[j]==1 && rand()%1)
-	    temp=ret=oggpack_look1(&o);
+	    temp=ret=ogg2pack_look1(&o);
 	  else
-	    ret=oggpack_look(&o,len[j],&temp);
+	    ret=ogg2pack_look(&o,len[j],&temp);
 
 	  if(ret<0){
 	    fprintf(stderr,"\nERROR: End of stream too soon! word: %d\n",
@@ -1428,18 +1428,18 @@
 	    exit(1);
 	  }
 	  if(len[j]==1 && rand()%1)
-	    oggpack_adv1(&o);
+	    ogg2pack_adv1(&o);
 	  else
-	    oggpack_adv(&o,len[j]);
+	    ogg2pack_adv(&o,len[j]);
 	  bitcount+=len[j];
-	  if(oggpack_bits(&o)!=bitcount){
+	  if(ogg2pack_bits(&o)!=bitcount){
 	    fprintf(stderr,"\nERROR: Look/Adv bitcounter %d != %ld!\n",
-		    bitcount,oggpack_bits(&o));
+		    bitcount,ogg2pack_bits(&o));
 	    exit(1);
 	  }
-	  if(oggpack_bytes(&o)!=(bitcount+7)/8){
+	  if(ogg2pack_bytes(&o)!=(bitcount+7)/8){
 	    fprintf(stderr,"\nERROR: Look/Adv bytecounter %d != %ld!\n",
-		    (bitcount+7)/8,oggpack_bytes(&o));
+		    (bitcount+7)/8,ogg2pack_bytes(&o));
 	    exit(1);
 	  }
 	  
@@ -1447,7 +1447,7 @@
 	_end_verify2(count);
 
       }
-      ogg_buffer_release(or);
+      ogg2_buffer_release(or);
     }
   }
   fprintf(stderr,"\rRandomized testing (LSb)... ok.   \n");
@@ -1461,7 +1461,7 @@
     unsigned char flat[4*TESTWORDS]; /* max possible needed size */
 
     fprintf(stderr,"\rRandomized testing (MSb)... (%ld)   ",10000-i);
-    oggpackB_writeinit(&o,bs);
+    ogg2packB_writeinit(&o,bs);
 
     /* generate a list of words and lengths */
     /* write the required number of bits out to packbuffer */
@@ -1469,17 +1469,17 @@
       values[j]=rand();
       len[j]=(rand()%33);
 
-      oggpackB_write(&o,values[j],len[j]);
+      ogg2packB_write(&o,values[j],len[j]);
 
       bitcount+=len[j];
-      if(oggpackB_bits(&o)!=bitcount){
+      if(ogg2packB_bits(&o)!=bitcount){
 	fprintf(stderr,"\nERROR: Write bitcounter %d != %ld!\n",
-		bitcount,oggpackB_bits(&o));
+		bitcount,ogg2packB_bits(&o));
 	exit(1);
       }
-      if(oggpackB_bytes(&o)!=(bitcount+7)/8){
+      if(ogg2packB_bytes(&o)!=(bitcount+7)/8){
 	fprintf(stderr,"\nERROR: Write bytecounter %d != %ld!\n",
-		(bitcount+7)/8,oggpackB_bytes(&o));
+		(bitcount+7)/8,ogg2packB_bytes(&o));
 	exit(1);
       }
       
@@ -1491,7 +1491,7 @@
       fprintf(stderr,"\nERROR: flattened write buffer incorrect length\n");
       exit(1);
     }
-    oggpackB_writeclear(&o);
+    ogg2packB_writeclear(&o);
 
     /* verify against original list */
     msbverify(values,len,flat);
@@ -1499,7 +1499,7 @@
     /* construct random-length buffer chain from flat vector; random
        byte starting offset within the length of the vector */
     {
-      ogg_reference *or=NULL,*orl=NULL;
+      ogg2_reference *or=NULL,*orl=NULL;
       unsigned char *ptr=flat;
       
       /* build buffer chain */
@@ -1510,9 +1510,9 @@
 	if(ilen>count2)ilen=count2;
 
 	if(or)
-	  orl=ogg_buffer_extend(orl,ilen+ibegin);
+	  orl=ogg2_buffer_extend(orl,ilen+ibegin);
 	else
-	  or=orl=ogg_buffer_alloc(bs,ilen+ibegin);
+	  or=orl=ogg2_buffer_alloc(bs,ilen+ibegin);
 
 	memcpy(orl->buffer->data+ibegin,ptr,ilen);
        
@@ -1523,7 +1523,7 @@
 	ptr+=ilen;
       }
 
-      if(ogg_buffer_length(or)!=(bitcount+7)/8){
+      if(ogg2_buffer_length(or)!=(bitcount+7)/8){
 	fprintf(stderr,"\nERROR: buffer length incorrect after build.\n");
 	exit(1);
       }
@@ -1539,42 +1539,42 @@
 	  bitcount+=len[j];
 	/* also exercise the split code */
 	{
-	  ogg_reference *temp=ogg_buffer_split(&or,0,bitcount/8);
-	  ogg_buffer_release(temp);
+	  ogg2_reference *temp=ogg2_buffer_split(&or,0,bitcount/8);
+	  ogg2_buffer_release(temp);
 	}
 
 	bitoffset=bitcount%=8;
 	for(;j<begin+ilen;j++)
 	  bitcount+=len[j];
-	ogg_buffer_posttruncate(or,((bitcount+7)/8));
+	ogg2_buffer_posttruncate(or,((bitcount+7)/8));
 
-	if((count=ogg_buffer_length(or))!=(bitcount+7)/8){
+	if((count=ogg2_buffer_length(or))!=(bitcount+7)/8){
 	  fprintf(stderr,"\nERROR: buffer length incorrect after truncate.\n");
 	  exit(1);
 	}
 	
-	oggpackB_readinit(&o,or);
+	ogg2packB_readinit(&o,or);
 
 	/* verify bit count */
-	if(oggpackB_bits(&o)!=0){
+	if(ogg2packB_bits(&o)!=0){
 	  fprintf(stderr,"\nERROR: Read bitcounter not zero!\n");
 	  exit(1);
 	}
-	if(oggpackB_bytes(&o)!=0){
+	if(ogg2packB_bytes(&o)!=0){
 	  fprintf(stderr,"\nERROR: Read bytecounter not zero!\n");
 	  exit(1);
 	}
 
 	bitcount=bitoffset;
-	oggpackB_read(&o,bitoffset,&temp);
+	ogg2packB_read(&o,bitoffset,&temp);
 
 	/* read and compare to original list */
 	for(j=begin;j<begin+ilen;j++){
 	  int ret;
 	  if(len[j]==1 && rand()%1)
-	    temp=ret=oggpackB_read1(&o);
+	    temp=ret=ogg2packB_read1(&o);
 	  else
-	    ret=oggpackB_read(&o,len[j],&temp);
+	    ret=ogg2packB_read(&o,len[j],&temp);
 	  if(ret<0){
 	    fprintf(stderr,"\nERROR: End of stream too soon! word: %d,%d\n",
 		    j-begin,ilen);
@@ -1586,14 +1586,14 @@
 	    exit(1);
 	  }
 	  bitcount+=len[j];
-	  if(oggpackB_bits(&o)!=bitcount){
+	  if(ogg2packB_bits(&o)!=bitcount){
 	    fprintf(stderr,"\nERROR: Read bitcounter %d != %ld!\n",
-		    bitcount,oggpackB_bits(&o));
+		    bitcount,ogg2packB_bits(&o));
 	    exit(1);
 	  }
-	  if(oggpackB_bytes(&o)!=(bitcount+7)/8){
+	  if(ogg2packB_bytes(&o)!=(bitcount+7)/8){
 	    fprintf(stderr,"\nERROR: Read bytecounter %d != %ld!\n",
-		    (bitcount+7)/8,oggpackB_bytes(&o));
+		    (bitcount+7)/8,ogg2packB_bytes(&o));
 	    exit(1);
 	  }
 	  
@@ -1601,17 +1601,17 @@
 	_end_verify3(count);
 
 	/* look/adv version */
-	oggpackB_readinit(&o,or);
+	ogg2packB_readinit(&o,or);
 	bitcount=bitoffset;
-	oggpackB_adv(&o,bitoffset);
+	ogg2packB_adv(&o,bitoffset);
 
 	/* read and compare to original list */
 	for(j=begin;j<begin+ilen;j++){
 	  int ret;
 	  if(len[j]==1 && rand()%1)
-	    temp=ret=oggpackB_look1(&o);
+	    temp=ret=ogg2packB_look1(&o);
 	  else
-	    ret=oggpackB_look(&o,len[j],&temp);
+	    ret=ogg2packB_look(&o,len[j],&temp);
 
 	  if(ret<0){
 	    fprintf(stderr,"\nERROR: End of stream too soon! word: %d\n",
@@ -1624,18 +1624,18 @@
 	    exit(1);
 	  }
 	  if(len[j]==1 && rand()%1)
-	    oggpackB_adv1(&o);
+	    ogg2packB_adv1(&o);
 	  else
-	    oggpackB_adv(&o,len[j]);
+	    ogg2packB_adv(&o,len[j]);
 	  bitcount+=len[j];
-	  if(oggpackB_bits(&o)!=bitcount){
+	  if(ogg2packB_bits(&o)!=bitcount){
 	    fprintf(stderr,"\nERROR: Look/Adv bitcounter %d != %ld!\n",
-		    bitcount,oggpackB_bits(&o));
+		    bitcount,ogg2packB_bits(&o));
 	    exit(1);
 	  }
-	  if(oggpackB_bytes(&o)!=(bitcount+7)/8){
+	  if(ogg2packB_bytes(&o)!=(bitcount+7)/8){
 	    fprintf(stderr,"\nERROR: Look/Adv bytecounter %d != %ld!\n",
-		    (bitcount+7)/8,oggpackB_bytes(&o));
+		    (bitcount+7)/8,ogg2packB_bytes(&o));
 	    exit(1);
 	  }
 	  
@@ -1643,12 +1643,12 @@
 	_end_verify4(count);
 
       }
-      ogg_buffer_release(or);
+      ogg2_buffer_release(or);
     }
   }
   fprintf(stderr,"\rRandomized testing (MSb)... ok.   \n");
 
-  ogg_buffer_destroy(bs);
+  ogg2_buffer_destroy(bs);
   return(0);
 }  
 #endif  /* _V_SELFTEST */

Modified: trunk/ogg2/src/buffer.c
===================================================================
--- trunk/ogg2/src/buffer.c	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/src/buffer.c	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,11 +1,11 @@
 /********************************************************************
  *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * THIS FILE IS PART OF THE Ogg Reference Library SOURCE CODE.      *
  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2003             *
+ * THE Ogg Reference Library SOURCE CODE IS (C) COPYRIGHT 1994-2004 *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -30,9 +30,9 @@
 /* management is here; actual production and consumption of data is
    found in the rest of the libogg code */
 
-ogg_buffer_state *ogg_buffer_create(void){
-  ogg_buffer_state *bs=_ogg_calloc(1,sizeof(*bs));
-  ogg_mutex_init(&bs->mutex);
+ogg2_buffer_state *ogg2_buffer_create(void){
+  ogg2_buffer_state *bs=_ogg_calloc(1,sizeof(*bs));
+  ogg2_mutex_init(&bs->mutex);
   return bs;
 }
 
@@ -43,9 +43,9 @@
    finish destruction. */
 
 /* call the helper while holding lock */
-static void _ogg_buffer_destroy(ogg_buffer_state *bs){
-  ogg_buffer *bt;
-  ogg_reference *rt;
+static void _ogg2_buffer_destroy(ogg2_buffer_state *bs){
+  ogg2_buffer *bt;
+  ogg2_reference *rt;
 
   if(bs->shutdown){
 
@@ -60,22 +60,22 @@
     rt=bs->unused_references;
 
     if(!bs->outstanding){
-      ogg_mutex_unlock(&bs->mutex);
-      ogg_mutex_clear(&bs->mutex);
+      ogg2_mutex_unlock(&bs->mutex);
+      ogg2_mutex_clear(&bs->mutex);
       _ogg_free(bs);
       return;
     }else
-      ogg_mutex_unlock(&bs->mutex);
+      ogg2_mutex_unlock(&bs->mutex);
 
     while(bt){
-      ogg_buffer *b=bt;
+      ogg2_buffer *b=bt;
       bt=b->ptr.next;
       if(b->data)_ogg_free(b->data);
       _ogg_free(b);
     }
     bs->unused_buffers=0;
     while(rt){
-      ogg_reference *r=rt;
+      ogg2_reference *r=rt;
       rt=r->next;
       _ogg_free(r);
     }
@@ -83,22 +83,22 @@
   }
 }
 
-void ogg_buffer_destroy(ogg_buffer_state *bs){
-  ogg_mutex_lock(&bs->mutex);
+void ogg2_buffer_destroy(ogg2_buffer_state *bs){
+  ogg2_mutex_lock(&bs->mutex);
   bs->shutdown=1;
-  _ogg_buffer_destroy(bs);
+  _ogg2_buffer_destroy(bs);
 }
 
-static ogg_buffer *_fetch_buffer(ogg_buffer_state *bs,long bytes){
-  ogg_buffer    *ob;
-  ogg_mutex_lock(&bs->mutex);
+static ogg2_buffer *_fetch_buffer(ogg2_buffer_state *bs,long bytes){
+  ogg2_buffer    *ob;
+  ogg2_mutex_lock(&bs->mutex);
   bs->outstanding++;
 
   /* do we have an unused buffer sitting in the pool? */
   if(bs->unused_buffers){
     ob=bs->unused_buffers;
     bs->unused_buffers=ob->ptr.next;
-    ogg_mutex_unlock(&bs->mutex);
+    ogg2_mutex_unlock(&bs->mutex);
 
     /* if the unused buffer is too small, grow it */
     if(ob->size<bytes){
@@ -107,10 +107,10 @@
     }
   }else{
     /* allocate a new buffer */
-    ogg_mutex_unlock(&bs->mutex);
+    ogg2_mutex_unlock(&bs->mutex);
     ob=_ogg_malloc(sizeof(*ob));
-    ob->data=_ogg_malloc(bytes<OGGPACK_MINCHUNKSIZE?
-			 OGGPACK_MINCHUNKSIZE:bytes);
+    ob->data=_ogg_malloc(bytes<OGG2PACK_MINCHUNKSIZE?
+			 OGG2PACK_MINCHUNKSIZE:bytes);
     ob->size=bytes;
   }
 
@@ -119,19 +119,19 @@
   return ob;
 }
 
-static ogg_reference *_fetch_ref(ogg_buffer_state *bs){
-  ogg_reference *or;
-  ogg_mutex_lock(&bs->mutex);
+static ogg2_reference *_fetch_ref(ogg2_buffer_state *bs){
+  ogg2_reference *or;
+  ogg2_mutex_lock(&bs->mutex);
   bs->outstanding++;
 
   /* do we have an unused reference sitting in the pool? */
   if(bs->unused_references){
     or=bs->unused_references;
     bs->unused_references=or->next;
-    ogg_mutex_unlock(&bs->mutex);
+    ogg2_mutex_unlock(&bs->mutex);
   }else{
     /* allocate a new reference */
-    ogg_mutex_unlock(&bs->mutex);
+    ogg2_mutex_unlock(&bs->mutex);
     or=_ogg_malloc(sizeof(*or));
   }
 
@@ -146,16 +146,16 @@
 
 /* fetch a reference pointing to a fresh, initially continguous buffer
    of at least [bytes] length */
-ogg_reference *ogg_buffer_alloc(ogg_buffer_state *bs,long bytes){
-  ogg_buffer    *ob=_fetch_buffer(bs,bytes);
-  ogg_reference *or=_fetch_ref(bs);
+ogg2_reference *ogg2_buffer_alloc(ogg2_buffer_state *bs,long bytes){
+  ogg2_buffer    *ob=_fetch_buffer(bs,bytes);
+  ogg2_reference *or=_fetch_ref(bs);
   or->buffer=ob;
   return or;
 }
 
 /* enlarge the data buffer in the current link */
-void ogg_buffer_realloc(ogg_reference *or,long bytes){
-  ogg_buffer    *ob=or->buffer;
+void ogg2_buffer_realloc(ogg2_reference *or,long bytes){
+  ogg2_buffer    *ob=or->buffer;
   
   /* if the unused buffer is too small, grow it */
   if(ob->size<bytes){
@@ -169,8 +169,8 @@
    of range, NULL is returned; if the desired segment is simply zero
    length, a zero length ref is returned.  Partial range overlap
    returns the overlap of the ranges */
-ogg_reference *ogg_buffer_sub(ogg_reference *or,long begin,long length){
-  ogg_reference *ret=0,*head=0;
+ogg2_reference *ogg2_buffer_sub(ogg2_reference *or,long begin,long length){
+  ogg2_reference *ret=0,*head=0;
 
   /* walk past any preceeding fragments we don't want */
   while(or && begin>=or->length){
@@ -186,7 +186,7 @@
 
   /* duplicate the reference chain; increment refcounts */
   while(or && length){
-    ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner);
+    ogg2_reference *temp=_fetch_ref(or->buffer->ptr.owner);
     if(head)
       head->next=temp;
     else
@@ -212,16 +212,16 @@
     or=or->next;
   }
 
-  ogg_buffer_mark(ret);
+  ogg2_buffer_mark(ret);
   return ret;
 }
 
-ogg_reference *ogg_buffer_dup(ogg_reference *or){
-  ogg_reference *ret=0,*head=0;
+ogg2_reference *ogg2_buffer_dup(ogg2_reference *or){
+  ogg2_reference *ret=0,*head=0;
 
   /* duplicate the reference chain; increment refcounts */
   while(or){
-    ogg_reference *temp=_fetch_ref(or->buffer->ptr.owner);
+    ogg2_reference *temp=_fetch_ref(or->buffer->ptr.owner);
     if(head)
       head->next=temp;
     else
@@ -241,13 +241,13 @@
     or=or->next;
   }
 
-  ogg_buffer_mark(ret);
+  ogg2_buffer_mark(ret);
   return ret;
 }
 
-static void _ogg_buffer_mark_one(ogg_reference *or){
-  ogg_buffer_state *bs=or->buffer->ptr.owner;
-  ogg_mutex_lock(&bs->mutex); /* lock now in case someone is mixing
+static void _ogg2_buffer_mark_one(ogg2_reference *or){
+  ogg2_buffer_state *bs=or->buffer->ptr.owner;
+  ogg2_mutex_lock(&bs->mutex); /* lock now in case someone is mixing
 				 pools */
   
 #ifdef OGGBUFFER_DEBUG
@@ -262,21 +262,21 @@
 #endif
   
   or->buffer->refcount++;
-  ogg_mutex_unlock(&bs->mutex);
+  ogg2_mutex_unlock(&bs->mutex);
 }
 
 /* split a reference into two references; 'return' is a reference to
    the buffer preceeding pos and 'head'/'tail' are the buffer past the
    split.  If pos is at or past the end of the passed in segment,
    'head/tail' are NULL */
-ogg_reference *ogg_buffer_split(ogg_reference **tail,
-				ogg_reference **head,long pos){
+ogg2_reference *ogg2_buffer_split(ogg2_reference **tail,
+				ogg2_reference **head,long pos){
 
   /* walk past any preceeding fragments to one of:
      a) the exact boundary that seps two fragments
      b) the fragment that needs split somewhere in the middle */
-  ogg_reference *ret=*tail;
-  ogg_reference *or=*tail;
+  ogg2_reference *ret=*tail;
+  ogg2_reference *or=*tail;
 
   while(or && pos>or->length){
 #ifdef OGGBUFFER_DEBUG
@@ -323,7 +323,7 @@
       (*tail)->begin=beginB;
       (*tail)->length=lengthB;
       (*tail)->next=or->next;
-      _ogg_buffer_mark_one(*tail);
+      _ogg2_buffer_mark_one(*tail);
       if(head && or==*head)*head=*tail;    
       
       /* update the first piece */
@@ -336,7 +336,7 @@
 }
 
 /* add a new fragment link to the end of a chain; return ptr to the new link */
-ogg_reference *ogg_buffer_extend(ogg_reference *or,long bytes){
+ogg2_reference *ogg2_buffer_extend(ogg2_reference *or,long bytes){
   if(or){
 #ifdef OGGBUFFER_DEBUG
     if(or->used==0){
@@ -353,33 +353,33 @@
       }
 #endif
     }
-    or->next=ogg_buffer_alloc(or->buffer->ptr.owner,bytes);
+    or->next=ogg2_buffer_alloc(or->buffer->ptr.owner,bytes);
     return(or->next);
   }
   return 0;
 }
 
 /* increase the refcount of the buffers to which the reference points */
-void ogg_buffer_mark(ogg_reference *or){
+void ogg2_buffer_mark(ogg2_reference *or){
   while(or){
-    _ogg_buffer_mark_one(or);
+    _ogg2_buffer_mark_one(or);
     or=or->next;
   }
 }
 
-void ogg_buffer_release_one(ogg_reference *or){
-  ogg_buffer *ob=or->buffer;
-  ogg_buffer_state *bs=ob->ptr.owner;
-  ogg_mutex_lock(&bs->mutex);
+void ogg2_buffer_release_one(ogg2_reference *or){
+  ogg2_buffer *ob=or->buffer;
+  ogg2_buffer_state *bs=ob->ptr.owner;
+  ogg2_mutex_lock(&bs->mutex);
 
 #ifdef OGGBUFFER_DEBUG
   if(ob->refcount==0){
-    ogg_mutex_unlock(&bs->mutex);
+    ogg2_mutex_unlock(&bs->mutex);
     fprintf(stderr,"WARNING: releasing buffer fragment with refcount of zero!\n");
     exit(1);
   }
   if(or->used==0){
-    ogg_mutex_unlock(&bs->mutex);
+    ogg2_mutex_unlock(&bs->mutex);
     fprintf(stderr,"WARNING: releasing previously released reference!\n");
     exit(1);
   }
@@ -396,28 +396,28 @@
   bs->outstanding--; /* for the returned reference */
   or->next=bs->unused_references;
   bs->unused_references=or;
-  ogg_mutex_unlock(&bs->mutex);
+  ogg2_mutex_unlock(&bs->mutex);
 
-  _ogg_buffer_destroy(bs); /* lazy cleanup (if needed) */
+  _ogg2_buffer_destroy(bs); /* lazy cleanup (if needed) */
 
 }
 
 /* release the references, decrease the refcounts of buffers to which
    they point, release any buffers with a refcount that drops to zero */
-void ogg_buffer_release(ogg_reference *or){
+void ogg2_buffer_release(ogg2_reference *or){
   while(or){
-    ogg_reference *next=or->next;
-    ogg_buffer_release_one(or);
+    ogg2_reference *next=or->next;
+    ogg2_buffer_release_one(or);
     or=next;
   }
 }
 
-ogg_reference *ogg_buffer_pretruncate(ogg_reference *or,long pos){
+ogg2_reference *ogg2_buffer_pretruncate(ogg2_reference *or,long pos){
   /* release preceeding fragments we don't want */
   while(or && pos>=or->length){
-    ogg_reference *next=or->next;
+    ogg2_reference *next=or->next;
     pos-=or->length;
-    ogg_buffer_release_one(or);
+    ogg2_buffer_release_one(or);
     or=next;
   }
   if (or) {
@@ -433,7 +433,7 @@
   return or;
 }
 
-void ogg_buffer_posttruncate(ogg_reference *or,long pos){
+void ogg2_buffer_posttruncate(ogg2_reference *or,long pos){
   /* walk to the point where we want to begin truncate */
   while(or && pos>or->length){
 #ifdef OGGBUFFER_DEBUG
@@ -447,14 +447,14 @@
   }
   if(or){
     /* release or->next and beyond */
-    ogg_buffer_release(or->next);
+    ogg2_buffer_release(or->next);
     or->next=0;
     /* update length fencepost */
     or->length=pos;
   }
 }
 
-ogg_reference *ogg_buffer_walk(ogg_reference *or){
+ogg2_reference *ogg2_buffer_walk(ogg2_reference *or){
   if(!or)return NULL;
   while(or->next){
 #ifdef OGGBUFFER_DEBUG
@@ -476,7 +476,7 @@
 
 /* *head is appended to the front end (head) of *tail; both continue to
    be valid pointers, with *tail at the tail and *head at the head */
-ogg_reference *ogg_buffer_cat(ogg_reference *tail, ogg_reference *head){
+ogg2_reference *ogg2_buffer_cat(ogg2_reference *tail, ogg2_reference *head){
   if(!tail)return head;
 
   while(tail->next){
@@ -495,10 +495,10 @@
   }
 #endif
   tail->next=head;
-  return ogg_buffer_walk(head);
+  return ogg2_buffer_walk(head);
 }
 
-long ogg_buffer_length(ogg_reference *or){
+long ogg2_buffer_length(ogg2_reference *or){
   int count=0;
   while(or){
 #ifdef OGGBUFFER_DEBUG
@@ -513,7 +513,7 @@
   return count;
 }
 
-void ogg_buffer_outstanding(ogg_buffer_state *bs){
+void ogg2_buffer_outstanding(ogg2_buffer_state *bs){
 #ifdef OGGBUFFER_DEBUG
   fprintf(stderr,"Zero-copy pool %p: %d buffers outstanding.\n",
 	  bs,bs->outstanding);

Modified: trunk/ogg2/src/bytewise.c
===================================================================
--- trunk/ogg2/src/bytewise.c	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/src/bytewise.c	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,11 +1,11 @@
 /********************************************************************
  *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * THIS FILE IS PART OF THE Ogg Reference Library SOURCE CODE.      *
  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2003             *
+ * THE Ogg Reference Library SOURCE CODE IS (C) COPYRIGHT 1994-2004 *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -22,7 +22,7 @@
 /* this is an internal abstraction, and it is not guarded from misuse
    or botching a fencepost. */
 
-static void _positionB(oggbyte_buffer *b,int pos){
+static void _positionB(ogg2byte_buffer *b,int pos){
   if(pos<b->pos){
     /* start at beginning, scan forward */
     b->ref=b->baseref;
@@ -32,7 +32,7 @@
   }
 }
 
-static void _positionF(oggbyte_buffer *b,int pos){
+static void _positionF(ogg2byte_buffer *b,int pos){
   /* scan forward for position */
   while(pos>=b->end){
     /* just seek forward */
@@ -43,7 +43,7 @@
   }
 }
 
-static void _positionFE(oggbyte_buffer *b,int pos){
+static void _positionFE(ogg2byte_buffer *b,int pos){
   /* scan forward for position */
   while(pos>=b->end){
     if(!b->ref->next){
@@ -58,7 +58,7 @@
 	b->ref->length=b->ref->buffer->size-b->ref->begin;
 	/* extend the array and span */
 	b->pos+=b->ref->length;	
-	b->ref=ogg_buffer_extend(b->ref,OGGPACK_CHUNKSIZE);
+	b->ref=ogg2_buffer_extend(b->ref,OGG2PACK_CHUNKSIZE);
 	b->end=b->pos;
 	b->ptr=b->ref->buffer->data+b->ref->begin;
       }
@@ -74,12 +74,12 @@
   }
 }
 
-int oggbyte_init(oggbyte_buffer *b,ogg_reference *or,ogg_buffer_state *bs){
+int ogg2byte_init(ogg2byte_buffer *b,ogg2_reference *or,ogg2_buffer_state *bs){
   memset(b,0,sizeof(*b));
     
   if(!or){
     if(!bs)return -1;
-    or=ogg_buffer_alloc(bs,OGGPACK_CHUNKSIZE);
+    or=ogg2_buffer_alloc(bs,OGG2PACK_CHUNKSIZE);
   }else{
     b->external=1;
   }
@@ -93,27 +93,27 @@
   return(0);
 }
 
-ogg_reference *oggbyte_return_and_reset(oggbyte_buffer *b){
+ogg2_reference *ogg2byte_return_and_reset(ogg2byte_buffer *b){
   if(!b->external){
-    ogg_reference *ret=b->baseref;
+    ogg2_reference *ret=b->baseref;
     memset(b,0,sizeof(*b));
     return(ret);
   }
   return(NULL);
 }
 
-void oggbyte_clear(oggbyte_buffer *b){
-  if(!b->external)ogg_buffer_release(b->baseref);
+void ogg2byte_clear(ogg2byte_buffer *b){
+  if(!b->external)ogg2_buffer_release(b->baseref);
   memset(b,0,sizeof(*b));
 }
 
-void oggbyte_set1(oggbyte_buffer *b,unsigned char val,int pos){
+void ogg2byte_set1(ogg2byte_buffer *b,unsigned char val,int pos){
   _positionB(b,pos);
   _positionFE(b,pos);
   b->ptr[pos-b->pos]=val;
 }
 
-void oggbyte_set2(oggbyte_buffer *b,int val,int pos){
+void ogg2byte_set2(ogg2byte_buffer *b,int val,int pos){
   _positionB(b,pos);
   _positionFE(b,pos);
   b->ptr[pos-b->pos]=val;
@@ -121,7 +121,7 @@
   b->ptr[pos-b->pos]=val>>8;
 }
 
-void oggbyte_set4(oggbyte_buffer *b,ogg_uint32_t val,int pos){
+void ogg2byte_set4(ogg2byte_buffer *b,ogg_uint32_t val,int pos){
   int i;
   _positionB(b,pos);
   for(i=0;i<4;i++){
@@ -132,7 +132,7 @@
   }
 }
 
-void oggbyte_set8(oggbyte_buffer *b,ogg_int64_t val,int pos){
+void ogg2byte_set8(ogg2byte_buffer *b,ogg_int64_t val,int pos){
   int i;
   _positionB(b,pos);
   for(i=0;i<8;i++){
@@ -143,13 +143,13 @@
   }
 }
  
-unsigned char oggbyte_read1(oggbyte_buffer *b,int pos){
+unsigned char ogg2byte_read1(ogg2byte_buffer *b,int pos){
   _positionB(b,pos);
   _positionF(b,pos);
   return b->ptr[pos-b->pos];
 }
 
-int oggbyte_read2(oggbyte_buffer *b,int pos){
+int ogg2byte_read2(ogg2byte_buffer *b,int pos){
   int ret;
   _positionB(b,pos);
   _positionF(b,pos);
@@ -158,7 +158,7 @@
   return ret|b->ptr[pos-b->pos]<<8;  
 }
 
-ogg_uint32_t oggbyte_read4(oggbyte_buffer *b,int pos){
+ogg_uint32_t ogg2byte_read4(ogg2byte_buffer *b,int pos){
   ogg_uint32_t ret;
   _positionB(b,pos);
   _positionF(b,pos);
@@ -172,7 +172,7 @@
   return ret;
 }
 
-ogg_int64_t oggbyte_read8(oggbyte_buffer *b,int pos){
+ogg_int64_t ogg2byte_read8(ogg2byte_buffer *b,int pos){
   ogg_int64_t ret;
   unsigned char t[7];
   int i;
@@ -199,15 +199,15 @@
 
 unsigned char ref[TESTBYTES];
 unsigned char work[TESTBYTES];
-ogg_buffer_state *bs;
+ogg2_buffer_state *bs;
 
-void _read_linear_test1(ogg_reference *or){
-  oggbyte_buffer obb;
+void _read_linear_test1(ogg2_reference *or){
+  ogg2byte_buffer obb;
   int j;
 
-  oggbyte_init(&obb,or,0);
+  ogg2byte_init(&obb,or,0);
   for(j=0;j<TESTBYTES;j++){
-    unsigned char ret=oggbyte_read1(&obb,j);
+    unsigned char ret=ogg2byte_read1(&obb,j);
     if(ref[j]!=ret){
       fprintf(stderr,"\nERROR:  %02x != %02x, position %d\n\n",
 	      ref[j],ret,j);
@@ -216,14 +216,14 @@
   }
 }
 
-void _read_linear_test1b(ogg_reference *or){
-  oggbyte_buffer obb;
+void _read_linear_test1b(ogg2_reference *or){
+  ogg2byte_buffer obb;
   int j;
 
-  oggbyte_init(&obb,or,0);
+  ogg2byte_init(&obb,or,0);
   for(j=0;j<TESTBYTES;j++){
     if(work[j]){
-      unsigned char ret=oggbyte_read1(&obb,j);
+      unsigned char ret=ogg2byte_read1(&obb,j);
       if(ref[j]!=ret){
 	fprintf(stderr,"\nERROR:  %02x != %02x, position %d\n\n",
 		ref[j],ret,j);
@@ -233,13 +233,13 @@
   }
 }
 
-void _read_linear_test2(ogg_reference *or){
-  oggbyte_buffer obb;
+void _read_linear_test2(ogg2_reference *or){
+  ogg2byte_buffer obb;
   int j;
 
-  oggbyte_init(&obb,or,0);
+  ogg2byte_init(&obb,or,0);
   for(j=0;j+1<TESTBYTES;j++){
-    int ret=oggbyte_read2(&obb,j);
+    int ret=ogg2byte_read2(&obb,j);
     if(ref[j]!=(ret&0xff) || ref[j+1]!=((ret>>8)&0xff)){
       fprintf(stderr,"\nERROR:  %02x%02x != %04x, position %d\n\n",
 	      ref[j+1],ref[j],ret,j);
@@ -248,14 +248,14 @@
   }
 }
 
-void _read_linear_test4(ogg_reference *or){
-  oggbyte_buffer obb;
+void _read_linear_test4(ogg2_reference *or){
+  ogg2byte_buffer obb;
   int j;
 
-  oggbyte_init(&obb,or,0);
+  ogg2byte_init(&obb,or,0);
 
   for(j=0;j+3<TESTBYTES;j++){
-    ogg_uint32_t ret=oggbyte_read4(&obb,j);
+    ogg_uint32_t ret=ogg2byte_read4(&obb,j);
     if(ref[j]!=(ret&0xff) ||
        ref[j+1]!=((ret>>8)&0xff) ||
        ref[j+2]!=((ret>>16)&0xff) ||
@@ -268,11 +268,11 @@
   }
 }
 
-void _read_linear_test8(ogg_reference *or){
-  oggbyte_buffer obb;
+void _read_linear_test8(ogg2_reference *or){
+  ogg2byte_buffer obb;
   int j;
 
-  oggbyte_init(&obb,or,0);
+  ogg2byte_init(&obb,or,0);
 
   for(j=0;j+7<TESTBYTES;j++){
     ogg_int64_t ret=ref[j+7];
@@ -284,9 +284,9 @@
     ret=(ret<<8)|ref[j+1];
     ret=(ret<<8)|ref[j];
     
-    if(ret!=oggbyte_read8(&obb,j)){
+    if(ret!=ogg2byte_read8(&obb,j)){
       int i;
-      ret=oggbyte_read8(&obb,j);
+      ret=ogg2byte_read8(&obb,j);
       fprintf(stderr,"\nERROR:  %02x%02x%02x%02x%02x%02x%02x%02x != ",
 	      ref[j+7],ref[j+6],ref[j+5],ref[j+4],
 	      ref[j+3],ref[j+2],ref[j+1],ref[j]);
@@ -303,18 +303,18 @@
   }
 }
 
-void _read_seek_test(ogg_reference *or){
-  oggbyte_buffer obb;
+void _read_seek_test(ogg2_reference *or){
+  ogg2byte_buffer obb;
   int i,j;
   int length=TESTBYTES;
   unsigned char *lref=ref;
 
-  oggbyte_init(&obb,or,0);
+  ogg2byte_init(&obb,or,0);
   
   for(i=0;i<TESTBYTES;i++){
     unsigned char ret;
     j=rand()%length;
-    ret=oggbyte_read1(&obb,j);
+    ret=ogg2byte_read1(&obb,j);
     if(lref[j]!=ret){
       fprintf(stderr,"\nERROR:  %02x != %02x, position %d\n\n",
 	      lref[j],ret,j);
@@ -325,7 +325,7 @@
   for(i=0;i<TESTBYTES;i++){
     int ret;
     j=rand()%(length-1);
-    ret=oggbyte_read2(&obb,j);
+    ret=ogg2byte_read2(&obb,j);
     if(lref[j]!=(ret&0xff) || lref[j+1]!=((ret>>8)&0xff)){
       fprintf(stderr,"\nERROR:  %02x%02x != %04x, position %d\n\n",
 	      lref[j+1],lref[j],ret,j);
@@ -336,7 +336,7 @@
   for(i=0;i<TESTBYTES;i++){
     ogg_uint32_t ret;
     j=rand()%(length-3);
-    ret=oggbyte_read4(&obb,j);
+    ret=ogg2byte_read4(&obb,j);
     if(lref[j]!=(ret&0xff) ||
        lref[j+1]!=((ret>>8)&0xff) ||
        lref[j+2]!=((ret>>16)&0xff) ||
@@ -360,9 +360,9 @@
     ret=(ret<<8)|lref[j+1];
     ret=(ret<<8)|lref[j];
     
-    if(ret!=oggbyte_read8(&obb,j)){
+    if(ret!=ogg2byte_read8(&obb,j)){
       int i;
-      ret=oggbyte_read8(&obb,j);
+      ret=ogg2byte_read8(&obb,j);
       fprintf(stderr,"\nERROR:  %02x%02x%02x%02x%02x%02x%02x%02x != ",
 	      lref[j+7],lref[j+6],lref[j+5],lref[j+4],
 	      lref[j+3],lref[j+2],lref[j+1],lref[j]);
@@ -379,14 +379,14 @@
   }
 }
 
-void _head_prep(ogg_reference *head){
+void _head_prep(ogg2_reference *head){
   int count=0;
   while(head){
     memset(head->buffer->data,0,head->buffer->size);
     count+=head->length;
 
     if(count>TESTBYTES/2+rand()%(TESTBYTES/4)){
-      ogg_buffer_release(head->next);
+      ogg2_buffer_release(head->next);
       head->next=0;
       break;
     }else{
@@ -395,90 +395,90 @@
   }
 }
 
-void _write_linear_test(ogg_reference *tail){
-  oggbyte_buffer ob;
+void _write_linear_test(ogg2_reference *tail){
+  ogg2byte_buffer ob;
   int i;
 
   _head_prep(tail);
-  oggbyte_init(&ob,tail,0);
+  ogg2byte_init(&ob,tail,0);
   for(i=0;i<TESTBYTES;i++)
-    oggbyte_set1(&ob,ref[i],i);
+    ogg2byte_set1(&ob,ref[i],i);
   _read_linear_test1(tail);
-  if(ogg_buffer_length(tail)!=TESTBYTES){
-    fprintf(stderr,"\nERROR: oggbyte_set1 extended incorrectly.\n\n");
+  if(ogg2_buffer_length(tail)!=TESTBYTES){
+    fprintf(stderr,"\nERROR: ogg2byte_set1 extended incorrectly.\n\n");
     exit(1);
   }
 
   _head_prep(tail);
 
-  oggbyte_init(&ob,tail,0);
+  ogg2byte_init(&ob,tail,0);
   for(i=0;i<TESTBYTES;i+=2){
     unsigned int val=ref[i]|(ref[i+1]<<8);
-    oggbyte_set2(&ob,val,i);
+    ogg2byte_set2(&ob,val,i);
   }
   _read_linear_test1(tail);
-  if(ogg_buffer_length(tail)>TESTBYTES){
-    fprintf(stderr,"\nERROR: oggbyte_set2 extended incorrectly.\n\n");
+  if(ogg2_buffer_length(tail)>TESTBYTES){
+    fprintf(stderr,"\nERROR: ogg2byte_set2 extended incorrectly.\n\n");
     exit(1);
   }
 
   _head_prep(tail);
 
-  oggbyte_init(&ob,tail,0);
+  ogg2byte_init(&ob,tail,0);
   for(i=0;i<TESTBYTES;i+=4){
     unsigned long val=ref[i+2]|(ref[i+3]<<8);
     val=(val<<16)|ref[i]|(ref[i+1]<<8);
-    oggbyte_set4(&ob,val,i);
+    ogg2byte_set4(&ob,val,i);
   }
   _read_linear_test1(tail);
-  if(ogg_buffer_length(tail)>TESTBYTES){
-    fprintf(stderr,"\nERROR: oggbyte_set4 extended incorrectly.\n\n");
+  if(ogg2_buffer_length(tail)>TESTBYTES){
+    fprintf(stderr,"\nERROR: ogg2byte_set4 extended incorrectly.\n\n");
     exit(1);
   }
 
   _head_prep(tail);
 
-  oggbyte_init(&ob,tail,0);
+  ogg2byte_init(&ob,tail,0);
   for(i=0;i<TESTBYTES;i+=8){
     ogg_int64_t val=ref[i+6]|(ref[i+7]<<8);
     val=(val<<16)|ref[i+4]|(ref[i+5]<<8);
     val=(val<<16)|ref[i+2]|(ref[i+3]<<8);
     val=(val<<16)|ref[i]|(ref[i+1]<<8);
-    oggbyte_set8(&ob,val,i);
+    ogg2byte_set8(&ob,val,i);
   }
   _read_linear_test1(tail);
-  if(ogg_buffer_length(tail)>TESTBYTES){
-    fprintf(stderr,"\nERROR: oggbyte_set8 extended incorrectly.\n\n");
+  if(ogg2_buffer_length(tail)>TESTBYTES){
+    fprintf(stderr,"\nERROR: ogg2byte_set8 extended incorrectly.\n\n");
     exit(1);
   }
 
 }
 
 void _write_zero_test(void){
-  oggbyte_buffer ob;
+  ogg2byte_buffer ob;
   int i;
 
-  oggbyte_init(&ob,0,bs);
+  ogg2byte_init(&ob,0,bs);
   for(i=0;i<TESTBYTES;i++)
-    oggbyte_set1(&ob,ref[i],i);
+    ogg2byte_set1(&ob,ref[i],i);
   _read_linear_test1(ob.baseref);
-  if(ogg_buffer_length(ob.baseref)!=TESTBYTES){
-    fprintf(stderr,"\nERROR: oggbyte_set1 extended incorrectly.\n\n");
+  if(ogg2_buffer_length(ob.baseref)!=TESTBYTES){
+    fprintf(stderr,"\nERROR: ogg2byte_set1 extended incorrectly.\n\n");
     exit(1);
   }
 }
 
 void _write_seek_test(void){
-  oggbyte_buffer ob;
+  ogg2byte_buffer ob;
   int i;
 
   memset(work,0,TESTBYTES);
 
-  oggbyte_init(&ob,0,bs);
+  ogg2byte_init(&ob,0,bs);
 
   for(i=0;i<TESTBYTES;i++){
     int j=rand()%TESTBYTES;
-    oggbyte_set1(&ob,ref[j],j);
+    ogg2byte_set1(&ob,ref[j],j);
     work[j]=1;
   }
 
@@ -487,7 +487,7 @@
 
 int main(void){
   int i,j;
-  bs=ogg_buffer_create();
+  bs=ogg2_buffer_create();
 
   /* test all codepaths through randomly generated data set */
   fprintf(stderr,"\nRandomized testing of byte aligned access abstraction: \n");
@@ -501,8 +501,8 @@
     /* test basic reading using single synthetic reference 1,2,4,8 */
     fprintf(stderr,"\r\t loops left (%d),  basic read test... ",1000-i);
     {
-      ogg_buffer ob;
-      ogg_reference or;
+      ogg2_buffer ob;
+      ogg2_reference or;
 
       ob.data=ref;
       ob.size=TESTBYTES;
@@ -519,8 +519,8 @@
     /* test basic reading using multiple synthetic refs 1,2,4,8 */
     fprintf(stderr,"\r\t loops left (%d),  fragmented read test... ",1000-i);
     {
-      ogg_reference *tail=0;
-      ogg_reference *head=0;
+      ogg2_reference *tail=0;
+      ogg2_reference *head=0;
       long count=0;
       
       
@@ -532,9 +532,9 @@
 	if(length>TESTBYTES-count)length=TESTBYTES-count;
 
 	if(tail)
-	  head=ogg_buffer_extend(head,begin+length+pad);
+	  head=ogg2_buffer_extend(head,begin+length+pad);
 	else
-	  tail=head=ogg_buffer_alloc(bs,begin+length+pad);
+	  tail=head=ogg2_buffer_alloc(bs,begin+length+pad);
 
 	memcpy(head->buffer->data+begin,ref+count,length);
 	head->begin=begin;
@@ -555,7 +555,7 @@
       fprintf(stderr,"\r\t loops left (%d),  linear write test...       ",1000-i);      
       _write_linear_test(tail);
 
-      ogg_buffer_release(tail);
+      ogg2_buffer_release(tail);
     }    
     
     /* test writing, init blank reference */
@@ -570,7 +570,7 @@
 
   }
   fprintf(stderr,"\r\t all tests ok.                                              \n\n");
-  ogg_buffer_destroy(bs);
+  ogg2_buffer_destroy(bs);
   return 0;
 }
 

Modified: trunk/ogg2/src/mutex.h
===================================================================
--- trunk/ogg2/src/mutex.h	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/src/mutex.h	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,11 +1,11 @@
 /********************************************************************
  *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * THIS FILE IS PART OF THE Ogg Reference Library SOURCE CODE.      *
  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * THE Ogg Reference Library SOURCE CODE IS (C) COPYRIGHT 1994-2004 *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -22,29 +22,29 @@
    Mutexing code isn't requird for a platform, it's only required to
    use threads with libogg and oggfile. */
 
-#ifndef _OGG_MUTEX_H_
-#define _OGG_MUTEX_H_
+#ifndef _OGG2_MUTEX_H_
+#define _OGG2_MUTEX_H_
 
 #ifdef USE_POSIX_THREADS
 #define _REENTRANT 1
 #include <pthread.h>
-typedef pthread_mutex_t ogg_mutex_t;
-#define ogg_mutex_init(m) (pthread_mutex_init((m),NULL))
-#define ogg_mutex_clear(m) (pthread_mutex_destroy(m))
-#define ogg_mutex_lock(m) (pthread_mutex_lock(m))
-#define ogg_mutex_unlock(m) (pthread_mutex_unlock(m))
+typedef pthread_mutex_t ogg2_mutex_t;
+#define ogg2_mutex_init(m) (pthread_mutex_init((m),NULL))
+#define ogg2_mutex_clear(m) (pthread_mutex_destroy(m))
+#define ogg2_mutex_lock(m) (pthread_mutex_lock(m))
+#define ogg2_mutex_unlock(m) (pthread_mutex_unlock(m))
 
 #elif USE_NO_THREADS
-typedef int ogg_mutex_t;
+typedef int ogg2_mutex_t;
 #define noop() do {} while(0)
-#define ogg_mutex_init(m) noop()
-#define ogg_mutex_clear(m) noop()
-#define ogg_mutex_lock(m) noop()
-#define ogg_mutex_unlock(m) noop()
+#define ogg2_mutex_init(m) noop()
+#define ogg2_mutex_clear(m) noop()
+#define ogg2_mutex_lock(m) noop()
+#define ogg2_mutex_unlock(m) noop()
 
 #else
 #error "configure proper threading wrappers for this platform, or compile with -DUSE_NO_THREADS to build without threading support."
 
 #endif
 
-#endif /*_OGG_MUTEX_H_*/
+#endif /*_OGG2_MUTEX_H_*/

Modified: trunk/ogg2/src/ogginternal.h
===================================================================
--- trunk/ogg2/src/ogginternal.h	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/src/ogginternal.h	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,11 +1,11 @@
 /********************************************************************
  *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * THIS FILE IS PART OF THE Ogg Reference Library SOURCE CODE.      *
  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2003             *
+ * THE Ogg Reference Library SOURCE CODE IS (C) COPYRIGHT 1994-2004 *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -15,76 +15,80 @@
 
  ********************************************************************/
 
-#ifndef _OGGI_H
-#define _OGGI_H
+#ifndef _OGG2I_H
+#define _OGG2I_H
 
-#include <ogg2/ogg.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <ogg/ogg2.h>
 #include "mutex.h"
 
-struct ogg_buffer_state{
-  ogg_buffer    *unused_buffers;
-  ogg_reference *unused_references;
+struct ogg2_buffer_state{
+  ogg2_buffer    *unused_buffers;
+  ogg2_reference *unused_references;
   int            outstanding;
 
-  ogg_mutex_t mutex;
+  ogg2_mutex_t mutex;
   int         shutdown;
 };
 
-struct ogg_buffer {
+struct ogg2_buffer {
   unsigned char      *data;
   long                size;
   int                 refcount;
   
   union {
-    ogg_buffer_state *owner;
-    ogg_buffer       *next;
+    ogg2_buffer_state *owner;
+    ogg2_buffer       *next;
   } ptr;
 };
 
-struct ogg_reference {
-  struct ogg_buffer    *buffer;
+struct ogg2_reference {
+  struct ogg2_buffer    *buffer;
   long                  begin;
   long                  length;
 
-  struct ogg_reference *next;
-#ifdef OGGBUFFER_DEBUG
+  struct ogg2_reference *next;
+#ifdef OGG2BUFFER_DEBUG
   int                   used;
 #endif
 };
 
-struct oggpack_buffer {
+struct ogg2pack_buffer {
   int            headbit;
   unsigned char *headptr;
   long           headend;
 
   /* memory management */
-  ogg_reference *head;
-  ogg_reference *tail;
+  ogg2_reference *head;
+  ogg2_reference *tail;
 
   /* render the byte/bit counter API constant time */
   long              count; /* doesn't count the tail */
-  ogg_buffer_state *owner; /* useful on encode side */
+  ogg2_buffer_state *owner; /* useful on encode side */
 };
 
-typedef struct oggbyte_buffer {
-  ogg_reference *baseref;
+typedef struct ogg2byte_buffer {
+  ogg2_reference *baseref;
 
-  ogg_reference *ref;
+  ogg2_reference *ref;
   unsigned char *ptr;
   long           pos;
   long           end;
 
-  ogg_buffer_state *owner; /* if it's to be extensible; encode side */
+  ogg2_buffer_state *owner; /* if it's to be extensible; encode side */
   int               external; /* did baseref come from outside? */ 
-} oggbyte_buffer;
+} ogg2byte_buffer;
 
-struct ogg_sync_state {
+struct ogg2_sync_state {
   /* decode memory management pool */
-  ogg_buffer_state *bufferpool;
+  ogg2_buffer_state *bufferpool;
 
   /* stream buffers */
-  ogg_reference    *fifo_head;
-  ogg_reference    *fifo_tail;
+  ogg2_reference    *fifo_head;
+  ogg2_reference    *fifo_tail;
   long              fifo_fill;
 
   /* stream sync management */
@@ -94,14 +98,14 @@
 
 };
 
-struct ogg_stream_state {
+struct ogg2_stream_state {
   /* encode memory management pool */
-  ogg_buffer_state *bufferpool;
+  ogg2_buffer_state *bufferpool;
 
-  ogg_reference *header_head;
-  ogg_reference *header_tail;
-  ogg_reference *body_head;
-  ogg_reference *body_tail;
+  ogg2_reference *header_head;
+  ogg2_reference *header_tail;
+  ogg2_reference *body_head;
+  ogg2_reference *body_tail;
 
   int            e_o_s;    /* set when we have buffered the last
                               packet in the logical bitstream */
@@ -115,14 +119,16 @@
 			      (which is in a seperate abstraction
 			      layer) also knows about the gap */
   ogg_int64_t    granulepos;
+  int            discont;  /* 0 = continuous, 1 = discontinuous */
 
   int            lacing_fill;
   ogg_uint32_t   body_fill;
 
   /* encode-side header build */
   unsigned int   watermark;
-  oggbyte_buffer header_build;
+  ogg2byte_buffer header_build;
   int            continued;
+  int            packets;
 
   /* decode-side state data */
   int            holeflag;
@@ -133,49 +139,49 @@
   
 };
 
-extern ogg_buffer_state *ogg_buffer_create(void);
-extern void              ogg_buffer_destroy(ogg_buffer_state *bs);
-extern ogg_reference    *ogg_buffer_alloc(ogg_buffer_state *bs,long bytes);
-extern void              ogg_buffer_realloc(ogg_reference *or,long bytes);
-extern ogg_reference    *ogg_buffer_sub(ogg_reference *or,long begin,long length);
-extern ogg_reference    *ogg_buffer_dup(ogg_reference *or);
-extern ogg_reference    *ogg_buffer_extend(ogg_reference *or,long bytes);
-extern void              ogg_buffer_mark(ogg_reference *or);
-extern void              ogg_buffer_release(ogg_reference *or);
-extern void              ogg_buffer_release_one(ogg_reference *or);
-extern ogg_reference    *ogg_buffer_pretruncate(ogg_reference *or,long pos);
-extern void              ogg_buffer_posttruncate(ogg_reference *or,long pos);
-extern ogg_reference    *ogg_buffer_cat(ogg_reference *tail, ogg_reference *head);
-extern ogg_reference    *ogg_buffer_walk(ogg_reference *or);
-extern long              ogg_buffer_length(ogg_reference *or);
-extern ogg_reference    *ogg_buffer_split(ogg_reference **tail,
-				       ogg_reference **head,long pos);
-extern void              ogg_buffer_outstanding(ogg_buffer_state *bs);
+extern ogg2_buffer_state *ogg2_buffer_create(void);
+extern void              ogg2_buffer_destroy(ogg2_buffer_state *bs);
+extern ogg2_reference    *ogg2_buffer_alloc(ogg2_buffer_state *bs,long bytes);
+extern void              ogg2_buffer_realloc(ogg2_reference *or,long bytes);
+extern ogg2_reference    *ogg2_buffer_sub(ogg2_reference *or,long begin,long length);
+extern ogg2_reference    *ogg2_buffer_dup(ogg2_reference *or);
+extern ogg2_reference    *ogg2_buffer_extend(ogg2_reference *or,long bytes);
+extern void              ogg2_buffer_mark(ogg2_reference *or);
+extern void              ogg2_buffer_release(ogg2_reference *or);
+extern void              ogg2_buffer_release_one(ogg2_reference *or);
+extern ogg2_reference    *ogg2_buffer_pretruncate(ogg2_reference *or,long pos);
+extern void              ogg2_buffer_posttruncate(ogg2_reference *or,long pos);
+extern ogg2_reference    *ogg2_buffer_cat(ogg2_reference *tail, ogg2_reference *head);
+extern ogg2_reference    *ogg2_buffer_walk(ogg2_reference *or);
+extern long              ogg2_buffer_length(ogg2_reference *or);
+extern ogg2_reference    *ogg2_buffer_split(ogg2_reference **tail,
+				       ogg2_reference **head,long pos);
+extern void              ogg2_buffer_outstanding(ogg2_buffer_state *bs);
 
-extern  int              oggbyte_init(oggbyte_buffer *b,ogg_reference *or,
-				   ogg_buffer_state *bs);
-extern void              oggbyte_clear(oggbyte_buffer *b);
-extern ogg_reference    *oggbyte_return_and_reset(oggbyte_buffer *b);
-extern void              oggbyte_set1(oggbyte_buffer *b,unsigned char val,
+extern  int              ogg2byte_init(ogg2byte_buffer *b,ogg2_reference *or,
+				   ogg2_buffer_state *bs);
+extern void              ogg2byte_clear(ogg2byte_buffer *b);
+extern ogg2_reference    *ogg2byte_return_and_reset(ogg2byte_buffer *b);
+extern void              ogg2byte_set1(ogg2byte_buffer *b,unsigned char val,
 				   int pos);
-extern void              oggbyte_set2(oggbyte_buffer *b,int val,int pos);
-extern void              oggbyte_set4(oggbyte_buffer *b,ogg_uint32_t val,int pos);
-extern void              oggbyte_set8(oggbyte_buffer *b,ogg_int64_t val,int pos);
-extern unsigned char     oggbyte_read1(oggbyte_buffer *b,int pos);
-extern int               oggbyte_read2(oggbyte_buffer *b,int pos);
-extern ogg_uint32_t      oggbyte_read4(oggbyte_buffer *b,int pos);
-extern ogg_int64_t       oggbyte_read8(oggbyte_buffer *b,int pos);
+extern void              ogg2byte_set2(ogg2byte_buffer *b,int val,int pos);
+extern void              ogg2byte_set4(ogg2byte_buffer *b,ogg_uint32_t val,int pos);
+extern void              ogg2byte_set8(ogg2byte_buffer *b,ogg_int64_t val,int pos);
+extern unsigned char     ogg2byte_read1(ogg2byte_buffer *b,int pos);
+extern int               ogg2byte_read2(ogg2byte_buffer *b,int pos);
+extern ogg_uint32_t      ogg2byte_read4(ogg2byte_buffer *b,int pos);
+extern ogg_int64_t       ogg2byte_read8(ogg2byte_buffer *b,int pos);
+extern int               ogg2_page_checksum_set(ogg2_page *og);
 
 #ifdef _V_SELFTEST
-#define OGGPACK_CHUNKSIZE 3
-#define OGGPACK_MINCHUNKSIZE 1
+#define OGG2PACK_CHUNKSIZE 3
+#define OGG2PACK_MINCHUNKSIZE 1
 #else
-#define OGGPACK_CHUNKSIZE 128
-#define OGGPACK_MINCHUNKSIZE 16
+#define OGG2PACK_CHUNKSIZE 128
+#define OGG2PACK_MINCHUNKSIZE 16
 #endif
 
 #endif
 
 
 
-

Modified: trunk/ogg2/src/stream.c
===================================================================
--- trunk/ogg2/src/stream.c	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/src/stream.c	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,11 +1,11 @@
 /********************************************************************
  *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * THIS FILE IS PART OF THE Ogg Reference Library SOURCE CODE.      *
  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2003             *
+ * THE Ogg Reference Library SOURCE CODE IS (C) COPYRIGHT 1994-2004 *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -23,92 +23,101 @@
 
 /* A complete description of Ogg framing exists in docs/framing.html */
 
-ogg_stream_state *ogg_stream_create(int serialno){
-  ogg_stream_state *os=_ogg_calloc(1,sizeof(*os));
+ogg2_stream_state *ogg2_stream_create(int serialno){
+  ogg2_stream_state *os=_ogg_calloc(1,sizeof(*os));
   os->watermark=4096;
   os->serialno=serialno;
-  os->bufferpool=ogg_buffer_create();
+  os->bufferpool=ogg2_buffer_create();
   return os;
 } 
 
-int ogg_stream_setfill(ogg_stream_state *os,int watermark){
+int ogg2_stream_setdiscont(ogg2_stream_state *os){
+  /* Discont mode must be known and set before Page 1 is processed */
+  if(os->pageno==0||(os->pageno==1&&os->packets==0)){
+    os->discont=1;
+    return OGG2_SUCCESS;
+  }
+  return OGG2_EINVAL;
+}
+
+int ogg2_stream_setfill(ogg2_stream_state *os,int watermark){
   if(os){
     if(watermark>65535)watermark=65535;
     os->watermark=watermark;
     return watermark;
   }
-  return OGG_EINVAL;
+  return OGG2_EINVAL;
 } 
 
 /* _clear does not free os, only the non-flat storage within */
-int ogg_stream_destroy(ogg_stream_state *os){
+int ogg2_stream_destroy(ogg2_stream_state *os){
   if(os){
 
-    ogg_buffer_release(os->header_tail);
-    ogg_buffer_release(os->body_tail);
-    oggbyte_clear(&os->header_build);
-    ogg_buffer_destroy(os->bufferpool);
+    ogg2_buffer_release(os->header_tail);
+    ogg2_buffer_release(os->body_tail);
+    ogg2byte_clear(&os->header_build);
+    ogg2_buffer_destroy(os->bufferpool);
     memset(os,0,sizeof(*os));    
 
   }
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 } 
 
 /* finish building a header then flush the current page header and
    body to the output buffer */
-static void _packet_flush(ogg_stream_state *os,int nextcomplete){
-  oggbyte_buffer *obb=&os->header_build;
+static void _packet_flush(ogg2_stream_state *os,int nextcomplete){
+  ogg2byte_buffer *obb=&os->header_build;
   unsigned char ctemp;
 
   if(os->lacing_fill){
     /* build header */
-    oggbyte_set1(obb,'O',0);
-    oggbyte_set1(obb,'g',1);
-    oggbyte_set1(obb,'g',2);
-    oggbyte_set1(obb,'S',3);
+    ogg2byte_set1(obb,'O',0);
+    ogg2byte_set1(obb,'g',1);
+    ogg2byte_set1(obb,'g',2);
+    ogg2byte_set1(obb,'S',3);
 
-    oggbyte_set1(obb,0x00,4);   /* stream structure version */
+    ogg2byte_set1(obb,0x00,4);   /* stream structure version */
      
     ctemp=0x00;
     if(os->continued)ctemp|=0x01; /* continued packet flag? */
     os->continued=nextcomplete;
     if(os->b_o_s==0)ctemp|=0x02;  /* first page flag? */
     if(os->e_o_s)ctemp|=0x04;     /* last page flag? */
-    oggbyte_set1(obb,ctemp,5);
+    ogg2byte_set1(obb,ctemp,5);
 
-    /* 64 bits of PCM position */
+    /* 64 bits of granule position */
     if(!os->b_o_s)
-      oggbyte_set8(obb,0,6);
+      ogg2byte_set8(obb,0,6);
     else
-      oggbyte_set8(obb,os->granulepos,6);
+      ogg2byte_set8(obb,os->granulepos,6);
     os->b_o_s=1;
+    os->packets=0;
     
-    
     /* 32 bits of stream serial number */
-    oggbyte_set4(obb,os->serialno,14);
+    ogg2byte_set4(obb,os->serialno,14);
     
     /* 32 bits of page counter (we have both counter and page header
        because this val can roll over) */
     if(os->pageno==-1)os->pageno=0; /* because someone called
-				       stream_reset; this would be a
-				       strange thing to do in an
-				       encode stream, but it has
-				       plausible uses */
-    oggbyte_set4(obb,os->pageno++,18);
+                                       stream_reset; this would be a
+                                       strange thing to do in an
+                                       encode stream, but it has
+                                       plausible uses */
+    ogg2byte_set4(obb,os->pageno++,18);
     
     /* CRC filled in later */
     /* segment table size */
-    oggbyte_set1(obb,os->lacing_fill,26);
+    ogg2byte_set1(obb,os->lacing_fill,26);
 
     /* toss the header on the fifo */
     if(os->header_tail){
-      ogg_reference *ret=oggbyte_return_and_reset(&os->header_build);
-      os->header_head=ogg_buffer_cat(os->header_head,ret);
-      if(nextcomplete)oggbyte_init(&os->header_build,0,os->bufferpool);
+      ogg2_reference *ret=ogg2byte_return_and_reset(&os->header_build);
+      os->header_head=ogg2_buffer_cat(os->header_head,ret);
+      if(nextcomplete)ogg2byte_init(&os->header_build,0,os->bufferpool);
     }else{
-      os->header_tail=oggbyte_return_and_reset(&os->header_build);
-      os->header_head=ogg_buffer_walk(os->header_tail);
-      if(nextcomplete)oggbyte_init(&os->header_build,0,os->bufferpool);
+      os->header_tail=ogg2byte_return_and_reset(&os->header_build);
+      os->header_head=ogg2_buffer_walk(os->header_tail);
+      if(nextcomplete)ogg2byte_init(&os->header_build,0,os->bufferpool);
     }
     os->lacing_fill=0;
     os->body_fill=0;
@@ -116,24 +125,28 @@
 }
 
 /* submit data to the internal buffer of the framing engine */
-int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op){
+int ogg2_stream_packetin(ogg2_stream_state *os,ogg2_packet *op){
   /* get sizing */
-  long bytes=ogg_buffer_length(op->packet);
+  long bytes=ogg2_buffer_length(op->packet);
   long lacing_vals=bytes/255+1;
   int  remainder=bytes%255;
   int  i;
 
   if(os->e_o_s){
-    ogg_packet_release(op);
-    return OGG_EEOS;
+    ogg2_packet_release(op);
+    return OGG2_EEOS;
   }
 
   if(!os->lacing_fill)
-    oggbyte_init(&os->header_build,0,os->bufferpool);
+    ogg2byte_init(&os->header_build, 0, os->bufferpool);
 
+  /* for discontinuous mode */
+  if(os->discont && !os->packets) os->granulepos=op->end_granule;
+  os->packets++;   
+
   /* concat packet data */
   if(os->body_head)
-    os->body_head=ogg_buffer_cat(os->body_head,op->packet);
+    os->body_head=ogg2_buffer_cat(os->body_head,op->packet);
   else
     os->body_tail=os->body_head=op->packet;
 
@@ -141,7 +154,7 @@
      (watermark && not initial page) */
   for(i=0;i<lacing_vals-1;i++){ /* handle the 255s first */
     os->body_fill+=255;
-    oggbyte_set1(&os->header_build,255,27+os->lacing_fill++);
+    ogg2byte_set1(&os->header_build,255,27+os->lacing_fill++);
     
     if(os->body_fill>=os->watermark && os->b_o_s)_packet_flush(os,1);
     if(os->lacing_fill==255)_packet_flush(os,1);
@@ -151,10 +164,10 @@
      granulepos et al and then finish packet lacing */
   
   os->body_fill+=remainder;
-  os->granulepos=op->granulepos;
+  if (!os->discont) os->granulepos=op->end_granule;
   os->packetno++;  /* for the sake of completeness */
   if(op->e_o_s)os->e_o_s=1;
-  oggbyte_set1(&os->header_build,remainder,27+os->lacing_fill++);
+  ogg2byte_set1(&os->header_build,remainder,27+os->lacing_fill++);
 
   if(os->e_o_s || 
      os->body_fill>=os->watermark ||
@@ -162,72 +175,71 @@
      os->lacing_fill==255)_packet_flush(os,0);
 
   memset(op,0,sizeof(*op));
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
 /* This constructs pages from buffered packet segments. */
-int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og){
-  oggbyte_buffer ob;
+int ogg2_stream_pageout(ogg2_stream_state *os, ogg2_page *og){
+  ogg2byte_buffer ob;
   long header_bytes;
   long body_bytes=0;
   int i;
 
   /* if the incoming page is still valid (and thus unconsumed),
      release it to prevent a leak */
-  ogg_page_release(og);
+  ogg2_page_release(og);
 
   /* is there a page waiting to come back? */
   if(!os->header_tail) return 0;
 
   /* get header and body sizes */
-  oggbyte_init(&ob,os->header_tail,0);
-  header_bytes=oggbyte_read1(&ob,26)+27;
+  ogg2byte_init(&ob,os->header_tail,0);
+  header_bytes=ogg2byte_read1(&ob,26)+27;
   for(i=27;i<header_bytes;i++)
-    body_bytes+=oggbyte_read1(&ob,i);
+    body_bytes+=ogg2byte_read1(&ob,i);
 
   /* split page references out of the fifos */
   if(og){
-    og->header=ogg_buffer_split(&os->header_tail,&os->header_head,header_bytes);
+    og->header=ogg2_buffer_split(&os->header_tail,&os->header_head,header_bytes);
     og->header_len=header_bytes;
-    og->body=ogg_buffer_split(&os->body_tail,&os->body_head,body_bytes);
+    og->body=ogg2_buffer_split(&os->body_tail,&os->body_head,body_bytes);
     og->body_len=body_bytes;
 
     /* checksum */
-    ogg_page_checksum_set(og);
+    ogg2_page_checksum_set(og);
   }else{
-    os->header_tail=ogg_buffer_pretruncate(os->header_tail,header_bytes);
-    os->body_tail=ogg_buffer_pretruncate(os->body_tail,body_bytes);
+    os->header_tail=ogg2_buffer_pretruncate(os->header_tail,header_bytes);
+    os->body_tail=ogg2_buffer_pretruncate(os->body_tail,body_bytes);
     if(!os->header_tail)os->header_head=0;
     if(!os->body_tail)os->body_head=0;
   }
-  
   return 1;
 }
 
 /* This will flush remaining packets into a page (returning nonzero),
    even if there is not enough data to trigger a flush normally
    (undersized page). If there are no packets or partial packets to
-   flush, ogg_stream_flush returns 0.  Note that ogg_stream_flush will
-   try to flush a normal sized page like ogg_stream_pageout; a call to
-   ogg_stream_flush does not guarantee that all packets have flushed.
-   Only a return value of 0 from ogg_stream_flush indicates all packet
+   flush, ogg2_stream_flush returns 0.  Note that ogg2_stream_flush will
+   try to flush a normal sized page like ogg2_stream_pageout; a call to
+   ogg2_stream_flush does not guarantee that all packets have flushed.
+   Only a return value of 0 from ogg2_stream_flush indicates all packet
    data is flushed into pages.
 
-   since ogg_stream_flush will flush the last page in a stream even if
-   it's undersized, you almost certainly want to use ogg_stream_pageout
-   (and *not* ogg_stream_flush) unless you specifically need to flush 
+   since ogg2_stream_flush will flush the last page in a stream even if
+   it's undersized, you almost certainly want to use ogg2_stream_pageout
+   (and *not* ogg2_stream_flush) unless you specifically need to flush 
    an page regardless of size in the middle of a stream. */
 
-int ogg_stream_flush(ogg_stream_state *os,ogg_page *og){
+int ogg2_stream_flush(ogg2_stream_state *os,ogg2_page *og){
   
   /* If there's no page already waiting for output, flush a partial
      page... assuming we have one */
   if(!os->header_tail)_packet_flush(os,0);
-  return ogg_stream_pageout(os,og);
+  return ogg2_stream_pageout(os,og);
   
 }
 
-int ogg_stream_eos(ogg_stream_state *os){
+int ogg2_stream_eos(ogg2_stream_state *os){
   return os->e_o_s;
 }
 
@@ -236,11 +248,11 @@
 #define FINFLAG 0x80000000UL
 #define FINMASK 0x7fffffffUL
 
-static void _next_lace(oggbyte_buffer *ob,ogg_stream_state *os){
+static void _next_lace(ogg2byte_buffer *ob,ogg2_stream_state *os){
   /* search ahead one lace */
   os->body_fill_next=0;
   while(os->laceptr<os->lacing_fill){
-    int val=oggbyte_read1(ob,27+os->laceptr++);
+    int val=ogg2byte_read1(ob,27+os->laceptr++);
     os->body_fill_next+=val;
     if(val<255){
       os->body_fill_next|=FINFLAG;
@@ -267,7 +279,7 @@
    declared span.  Naturally, this error should also not be
    mistriggered due to seek or reset, or reported redundantly. */
 
-static void _span_queued_page(ogg_stream_state *os){ 
+static void _span_queued_page(ogg2_stream_state *os){ 
   while( !(os->body_fill&FINFLAG) ){
     
     if(!os->header_tail)break;
@@ -276,29 +288,30 @@
        flushed as it's consumed, so that's not done here. */
 
     if(os->lacing_fill>=0)
-      os->header_tail=ogg_buffer_pretruncate(os->header_tail,
+      os->header_tail=ogg2_buffer_pretruncate(os->header_tail,
 					     os->lacing_fill+27);
     os->lacing_fill=0;
     os->laceptr=0;
     os->clearflag=0;
+    os->packets=0;
 
     if(!os->header_tail){
       os->header_head=0;
       break;
     }else{
-      
+
       /* process/prepare next page, if any */
 
-      ogg_page og;               /* only for parsing header values */
+      ogg2_page og;               /* only for parsing header values */
       long pageno;
-      oggbyte_buffer ob;
+      ogg2byte_buffer ob;
 
       og.header=os->header_tail; /* only for parsing header values */
-      pageno=ogg_page_pageno(&og);
+      pageno=ogg2_page_pageno(&og);
 
-      oggbyte_init(&ob,os->header_tail,0);
-      os->lacing_fill=oggbyte_read1(&ob,26);
-      
+      ogg2byte_init(&ob,os->header_tail,0);
+      os->lacing_fill=ogg2byte_read1(&ob,26);
+
       /* are we in sequence? */
       if(pageno!=os->pageno){
 	if(os->pageno==-1) /* indicates seek or reset */
@@ -306,29 +319,31 @@
 	else
 	  os->holeflag=2;  /* set for external reporting */
 
-	os->body_tail=ogg_buffer_pretruncate(os->body_tail,
+	os->body_tail=ogg2_buffer_pretruncate(os->body_tail,
 					     os->body_fill);
 	if(os->body_tail==0)os->body_head=0;
 	os->body_fill=0;
 
       }
-    
-      if(ogg_page_continued(&og)){
+
+      if(ogg2_page_continued(&og)){
+        os->continued=1;
 	if(os->body_fill==0){
 	  /* continued packet, but no preceeding data to continue */
 	  /* dump the first partial packet on the page */
 	  _next_lace(&ob,os);	
 	  os->body_tail=
-	    ogg_buffer_pretruncate(os->body_tail,os->body_fill_next&FINMASK);
+	    ogg2_buffer_pretruncate(os->body_tail,os->body_fill_next&FINMASK);
 	  if(os->body_tail==0)os->body_head=0;
 	  /* set span flag */
 	  if(!os->spanflag && !os->holeflag)os->spanflag=2;
 	}
       }else{
+        os->continued=0;
 	if(os->body_fill>0){
 	  /* preceeding data to continue, but not a continued page */
 	  /* dump body_fill */
-	  os->body_tail=ogg_buffer_pretruncate(os->body_tail,
+	  os->body_tail=ogg2_buffer_pretruncate(os->body_tail,
 					       os->body_fill);
 	  if(os->body_tail==0)os->body_head=0;
 	  os->body_fill=0;
@@ -339,20 +354,20 @@
       }
 
       if(os->laceptr<os->lacing_fill){
-	os->granulepos=ogg_page_granulepos(&og);
+	os->granulepos=ogg2_page_granulepos(&og);
 
-	/* get current packet size & flag */
-	_next_lace(&ob,os);
-	os->body_fill+=os->body_fill_next; /* addition handles the flag fine;
+        /* get current packet size & flag */
+        _next_lace(&ob,os);
+        os->body_fill+=os->body_fill_next; /* addition handles the flag fine;
 					     unsigned on purpose */
-	/* ...and next packet size & flag */
-	_next_lace(&ob,os);
+        /* ...and next packet size & flag */
+        _next_lace(&ob,os);
 
       }
       
       os->pageno=pageno+1;
-      os->e_o_s=ogg_page_eos(&og);
-      os->b_o_s=ogg_page_bos(&og);
+      os->e_o_s=ogg2_page_eos(&og);
+      os->b_o_s=ogg2_page_bos(&og);
     
     }
   }
@@ -361,44 +376,44 @@
 /* add the incoming page to the stream state; we decompose the page
    into packet segments here as well. */
 
-int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){
+int ogg2_stream_pagein(ogg2_stream_state *os, ogg2_page *og){
 
-  int serialno=ogg_page_serialno(og);
-  int version=ogg_page_version(og);
+  int serialno=ogg2_page_serialno(og);
+  int version=ogg2_page_version(og);
 
   /* check the serial number */
   if(serialno!=os->serialno){
-    ogg_page_release(og);
-    return OGG_ESERIAL;
+    ogg2_page_release(og);
+    return OGG2_ESERIAL;
   }
   if(version>0){
-    ogg_page_release(og);
-    return OGG_EVERSION;
+    ogg2_page_release(og);
+    return OGG2_EVERSION;
   }
 
   /* add to fifos */
   if(!os->body_tail){
     os->body_tail=og->body;
-    os->body_head=ogg_buffer_walk(og->body);
+    os->body_head=ogg2_buffer_walk(og->body);
   }else{
-    os->body_head=ogg_buffer_cat(os->body_head,og->body);
+    os->body_head=ogg2_buffer_cat(os->body_head,og->body);
   }
   if(!os->header_tail){
     os->header_tail=og->header;
-    os->header_head=ogg_buffer_walk(og->header);
+    os->header_head=ogg2_buffer_walk(og->header);
     os->lacing_fill=-27;
   }else{
-    os->header_head=ogg_buffer_cat(os->header_head,og->header);
+    os->header_head=ogg2_buffer_cat(os->header_head,og->header);
   }
 
   memset(og,0,sizeof(*og));
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
-int ogg_stream_reset(ogg_stream_state *os){
+int ogg2_stream_reset(ogg2_stream_state *os){
 
-  ogg_buffer_release(os->header_tail);
-  ogg_buffer_release(os->body_tail);
+  ogg2_buffer_release(os->header_tail);
+  ogg2_buffer_release(os->body_tail);
   os->header_tail=os->header_head=0;
   os->body_tail=os->body_head=0;
 
@@ -410,7 +425,8 @@
 
   os->body_fill=0;
   os->lacing_fill=0;
-  oggbyte_clear(&os->header_build);
+  ogg2byte_clear(&os->header_build);
+  os->packets=0;
 
   os->holeflag=0;
   os->spanflag=0;
@@ -418,20 +434,20 @@
   os->laceptr=0;
   os->body_fill_next=0;
 
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
-int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){
-  ogg_stream_reset(os);
+int ogg2_stream_reset_serialno(ogg2_stream_state *os,int serialno){
+  ogg2_stream_reset(os);
   os->serialno=serialno;
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
-static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){
+static int _packetout(ogg2_stream_state *os,ogg2_packet *op,int adv){
 
   /* if the incoming packet is a valid reference, release it such that
      we don't leak the memory */
-  ogg_packet_release(op);
+  ogg2_packet_release(op);
 
   /* buffer packets for return */
   _span_queued_page(os);
@@ -444,7 +460,7 @@
       os->holeflag=1;
     if(temp==2){
       os->packetno++;
-      return OGG_HOLE;
+      return OGG2_HOLE;
     }
   }
   if(os->spanflag){
@@ -455,7 +471,7 @@
       os->spanflag=1;
     if(temp==2){
       os->packetno++;
-      return OGG_SPAN;
+      return OGG2_SPAN;
     }
   }
 
@@ -469,23 +485,38 @@
       op->e_o_s=os->e_o_s;
     else
       op->e_o_s=0;
-    if( (os->body_fill&FINFLAG) && !(os->body_fill_next&FINFLAG) )
-      op->granulepos=os->granulepos;
-    else
-      op->granulepos=-1;
+
+    if (os->discont){
+      /* Discontinuous Mode */
+      if(!os->continued) {
+        if(os->packets==0)op->end_granule=os->granulepos;
+        else op->end_granule=-1;
+      }else{
+        if(os->packets==1)op->end_granule=os->granulepos;
+        else op->end_granule=-1;
+      }
+    }else{
+      /* Continuous Mode */
+      if( (os->body_fill&FINFLAG) && !(os->body_fill_next&FINFLAG) )
+        op->end_granule=os->granulepos;
+      else
+        op->end_granule=-1;
+    }
+    
+    os->packets++;
     op->packetno=os->packetno;
   }
 
   if(adv){
-    oggbyte_buffer ob;
-    oggbyte_init(&ob,os->header_tail,0);
+    ogg2byte_buffer ob;
+    ogg2byte_init(&ob,os->header_tail,0);
 
     /* split the body contents off */
     if(op){
-      op->packet=ogg_buffer_split(&os->body_tail,&os->body_head,os->body_fill&FINMASK);
+      op->packet=ogg2_buffer_split(&os->body_tail,&os->body_head,os->body_fill&FINMASK);
       op->bytes=os->body_fill&FINMASK;
     }else{
-      os->body_tail=ogg_buffer_pretruncate(os->body_tail,os->body_fill&FINMASK);
+      os->body_tail=ogg2_buffer_pretruncate(os->body_tail,os->body_fill&FINMASK);
       if(os->body_tail==0)os->body_head=0;
     }
 
@@ -494,7 +525,7 @@
     _next_lace(&ob,os);
   }else{
     if(op){
-      op->packet=ogg_buffer_sub(os->body_tail,0,os->body_fill&FINMASK);
+      op->packet=ogg2_buffer_sub(os->body_tail,0,os->body_fill&FINMASK);
       op->bytes=os->body_fill&FINMASK;
     }
   }
@@ -507,49 +538,49 @@
   return 1;
 }
 
-int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){
+int ogg2_stream_packetout(ogg2_stream_state *os,ogg2_packet *op){
   return _packetout(os,op,1);
 }
 
-int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op){
+int ogg2_stream_packetpeek(ogg2_stream_state *os,ogg2_packet *op){
   return _packetout(os,op,0);
 }
 
-int ogg_packet_release(ogg_packet *op) {
+int ogg2_packet_release(ogg2_packet *op) {
   if(op){
-    ogg_buffer_release(op->packet);
+    ogg2_buffer_release(op->packet);
     memset(op, 0, sizeof(*op));
   }
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
-int ogg_page_release(ogg_page *og) {
+int ogg2_page_release(ogg2_page *og) {
   if(og){
-    ogg_buffer_release(og->header);
-    ogg_buffer_release(og->body);
+    ogg2_buffer_release(og->header);
+    ogg2_buffer_release(og->body);
     memset(og, 0, sizeof(*og));
   }
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
 #ifdef _V_SELFTEST2
 #include <stdio.h>
 
-ogg_stream_state *os_en, *os_de;
-ogg_sync_state *oy;
-ogg_buffer_state *bs;
+ogg2_stream_state *os_en, *os_de;
+ogg2_sync_state *oy;
+ogg2_buffer_state *bs;
 
-void checkpacket(ogg_packet *op,int len, int no, int pos){
+void checkpacket(ogg2_packet *op,int len, int no, int pos){
   long j;
   static int sequence=0;
   static int lastno=0;
-  oggbyte_buffer ob;
+  ogg2byte_buffer ob;
 
-  if(ogg_buffer_length(op->packet)!=len){
+  if(ogg2_buffer_length(op->packet)!=len){
     fprintf(stderr,"incorrect packet length!\n");
     exit(1);
   }
-  if(op->granulepos!=pos){
+  if(op->end_granule!=pos){
     fprintf(stderr,"incorrect packet position!\n");
     exit(1);
   }
@@ -571,18 +602,18 @@
   }
 
   /* Test data */
-  oggbyte_init(&ob,op->packet,0);
-  for(j=0;j<ogg_buffer_length(op->packet);j++)
-    if(oggbyte_read1(&ob,j)!=((j+no)&0xff)){
+  ogg2byte_init(&ob,op->packet,0);
+  for(j=0;j<ogg2_buffer_length(op->packet);j++)
+    if(ogg2byte_read1(&ob,j)!=((j+no)&0xff)){
       fprintf(stderr,"body data mismatch (1) at pos %ld: %x!=%lx!\n\n",
-	      j,oggbyte_read1(&ob,j),(j+no)&0xff);
+	      j,ogg2byte_read1(&ob,j),(j+no)&0xff);
       exit(1);
     }
 }
 
-void check_page(unsigned char *data,const int *header,ogg_page *og){
+void check_page(unsigned char *data,const int *header,ogg2_page *og){
   long j;
-  oggbyte_buffer ob;
+  ogg2byte_buffer ob;
 
   /* test buffer lengths */
   long header_len=header[26]+27;
@@ -591,65 +622,65 @@
   for(j=27;j<header_len;j++)
     body_len+=header[j];
 
-  if(header_len!=ogg_buffer_length(og->header)){
+  if(header_len!=ogg2_buffer_length(og->header)){
     fprintf(stderr,"page header length mismatch: %ld correct, buffer is %ld\n",
-	    header_len,ogg_buffer_length(og->header));
+	    header_len,ogg2_buffer_length(og->header));
     exit(1);
   }
-  if(body_len!=ogg_buffer_length(og->body)){
+  if(body_len!=ogg2_buffer_length(og->body)){
     fprintf(stderr,"page body length mismatch: %ld correct, buffer is %ld\n",
-	    body_len,ogg_buffer_length(og->body));
+	    body_len,ogg2_buffer_length(og->body));
     exit(1);
   }
 
   /* Test data */
-  oggbyte_init(&ob,og->body,0);
-  for(j=0;j<ogg_buffer_length(og->body);j++)
-    if(oggbyte_read1(&ob,j)!=data[j]){
+  ogg2byte_init(&ob,og->body,0);
+  for(j=0;j<ogg2_buffer_length(og->body);j++)
+    if(ogg2byte_read1(&ob,j)!=data[j]){
       fprintf(stderr,"body data mismatch (2) at pos %ld: %x!=%x!\n\n",
-	      j,data[j],oggbyte_read1(&ob,j));
+	      j,data[j],ogg2byte_read1(&ob,j));
       exit(1);
     }
 
   /* Test header */
-  oggbyte_init(&ob,og->header,0);
-  for(j=0;j<ogg_buffer_length(og->header);j++){
-    if(oggbyte_read1(&ob,j)!=header[j]){
+  ogg2byte_init(&ob,og->header,0);
+  for(j=0;j<ogg2_buffer_length(og->header);j++){
+    if(ogg2byte_read1(&ob,j)!=header[j]){
       fprintf(stderr,"header content mismatch at pos %ld:\n",j);
       for(j=0;j<header[26]+27;j++)
-	fprintf(stderr," (%ld)%02x:%02x",j,header[j],oggbyte_read1(&ob,j));
+	fprintf(stderr," (%ld)%02x:%02x",j,header[j],ogg2byte_read1(&ob,j));
       fprintf(stderr,"\n");
       exit(1);
     }
   }
-  if(ogg_buffer_length(og->header)!=header[26]+27){
+  if(ogg2_buffer_length(og->header)!=header[26]+27){
     fprintf(stderr,"header length incorrect! (%ld!=%d)\n",
-	    ogg_buffer_length(og->header),header[26]+27);
+	    ogg2_buffer_length(og->header),header[26]+27);
     exit(1);
   }
 }
 
-void print_header(ogg_page *og){
+void print_header(ogg2_page *og){
   int j;
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
 
   fprintf(stderr,"\nHEADER:\n");
   fprintf(stderr,"  capture: %c %c %c %c  version: %d  flags: %x\n",
-	  oggbyte_read1(&ob,0),oggbyte_read1(&ob,1),
-	  oggbyte_read1(&ob,2),oggbyte_read1(&ob,3),
-	  (int)oggbyte_read1(&ob,4),(int)oggbyte_read1(&ob,5));
+	  ogg2byte_read1(&ob,0),ogg2byte_read1(&ob,1),
+	  ogg2byte_read1(&ob,2),ogg2byte_read1(&ob,3),
+	  (int)ogg2byte_read1(&ob,4),(int)ogg2byte_read1(&ob,5));
 
   fprintf(stderr,"  granulepos: %08x%08x  serialno: %x  pageno: %ld\n",
-	  oggbyte_read4(&ob,10),oggbyte_read4(&ob,6),
-	  oggbyte_read4(&ob,14),
-	  (long)oggbyte_read4(&ob,18));
+	  ogg2byte_read4(&ob,10),ogg2byte_read4(&ob,6),
+	  ogg2byte_read4(&ob,14),
+	  (long)ogg2byte_read4(&ob,18));
 
   fprintf(stderr,"  checksum: %08x\n  segments: %d (",
-	  oggbyte_read4(&ob,22),(int)oggbyte_read1(&ob,26));
+	  ogg2byte_read4(&ob,22),(int)ogg2byte_read1(&ob,26));
 
-  for(j=27;j<ogg_buffer_length(og->header);j++)
-    fprintf(stderr,"%d ",(int)oggbyte_read1(&ob,j));
+  for(j=27;j<ogg2_buffer_length(og->header);j++)
+    fprintf(stderr,"%d ",(int)ogg2byte_read1(&ob,j));
   fprintf(stderr,")\n\n");
 }
 
@@ -844,7 +875,7 @@
 		       0xd4,0xe0,0x60,0xe5,
 		       1,0};
 
-void bufcpy(void *data,ogg_reference *or){
+void bufcpy(void *data,ogg2_reference *or){
   while(or){
     memcpy(data,or->buffer->data+or->begin,or->length);
     data+=or->length;
@@ -852,7 +883,7 @@
   }
 }
 
-void bufcpy2(void *data,ogg_reference *or,int begin){
+void bufcpy2(void *data,ogg2_reference *or,int begin){
   while(or){
     if(or->length-begin>0){
       memcpy(data,or->buffer->data+or->begin+begin,or->length-begin);
@@ -863,7 +894,7 @@
   }
 }
 
-int bufcmp(void *data,ogg_reference *or){
+int bufcmp(void *data,ogg2_reference *or){
   while(or){
     int ret=memcmp(data,or->buffer->data+or->begin,or->length);
     if(ret)return ret;
@@ -888,10 +919,10 @@
 
   for(i=0;i<packets;i++){
     /* construct a test packet */
-    ogg_packet op={0,0,0,0,0,0};
+    ogg2_packet op={0,0,0,0,0,0};
     int len=pl[i];
     
-    op.packet=ogg_buffer_alloc(bs,len);
+    op.packet=ogg2_buffer_alloc(bs,len);
     op.e_o_s=(pl[i+1]<0?1:0);
     op.granulepos=granulepos;
 
@@ -903,13 +934,13 @@
 
     inptr+=j;
     /* submit the test packet */
-    ogg_stream_packetin(os_en,&op);
+    ogg2_stream_packetin(os_en,&op);
 
     /* retrieve any finished pages */
     {
-      ogg_page og={0,0,0,0};
+      ogg2_page og={0,0,0,0};
       
-      while(ogg_stream_pageout(os_en,&og)){
+      while(ogg2_stream_pageout(os_en,&og)){
 	/* We have a page.  Check it carefully */
 
 	fprintf(stderr,"%ld, ",pageno);
@@ -921,34 +952,34 @@
 
 	check_page(data+outptr,headers[pageno],&og);
 
-	outptr+=ogg_buffer_length(og.body);
+	outptr+=ogg2_buffer_length(og.body);
 	pageno++;
 
 	/* have a complete page; submit it to sync/decode */
 
 	{
-	  ogg_page og_de={0,0,0,0};
-	  ogg_packet op_de={0,0,0,0,0,0},op_de2={0,0,0,0,0,0};
-	  int blen=ogg_buffer_length(og.header)+ogg_buffer_length(og.body);
-	  char *buf=ogg_sync_bufferin(oy,blen);
+	  ogg2_page og_de={0,0,0,0};
+	  ogg2_packet op_de={0,0,0,0,0,0},op_de2={0,0,0,0,0,0};
+	  int blen=ogg2_buffer_length(og.header)+ogg2_buffer_length(og.body);
+	  char *buf=ogg2_sync_bufferin(oy,blen);
 	  bufcpy(buf,og.header);
-	  bufcpy(buf+ogg_buffer_length(og.header),og.body);
-	  ogg_sync_wrote(oy,blen);
+	  bufcpy(buf+ogg2_buffer_length(og.header),og.body);
+	  ogg2_sync_wrote(oy,blen);
 
-	  while(ogg_sync_pageout(oy,&og_de)>0){
+	  while(ogg2_sync_pageout(oy,&og_de)>0){
 	    /* got a page.  Happy happy.  Verify that it's good. */
 	    
 	    check_page(data+deptr,headers[pageout],&og_de);
-	    deptr+=ogg_buffer_length(og_de.body);
+	    deptr+=ogg2_buffer_length(og_de.body);
 	    pageout++;
 
 	    /* submit it to deconstitution */
-	    ogg_stream_pagein(os_de,&og_de);
+	    ogg2_stream_pagein(os_de,&og_de);
 
 	    /* packets out? */
-	    while(ogg_stream_packetpeek(os_de,NULL)>0){
-	      ogg_stream_packetpeek(os_de,&op_de2);
-	      ogg_stream_packetout(os_de,&op_de); /* just catching them all */
+	    while(ogg2_stream_packetpeek(os_de,NULL)>0){
+	      ogg2_stream_packetpeek(os_de,&op_de2);
+	      ogg2_stream_packetout(os_de,&op_de); /* just catching them all */
 	      
 	      /* verify the packets! */
 	      /* check data */
@@ -980,7 +1011,7 @@
 		exit(1);
 	      }
 	      bosflag=1;
-	      depacket+=ogg_buffer_length(op_de.packet);
+	      depacket+=ogg2_buffer_length(op_de.packet);
 	      
 	      /* check eos flag */
 	      if(eosflag){
@@ -1002,12 +1033,12 @@
 		exit(1);
 	      }
 
-	      ogg_packet_release(&op_de);
-	      ogg_packet_release(&op_de2);
+	      ogg2_packet_release(&op_de);
+	      ogg2_packet_release(&op_de2);
 	    }
 	  }
 	}
-	ogg_page_release(&og);
+	ogg2_page_release(&og);
       }
     }
   }
@@ -1038,18 +1069,18 @@
   }
   fprintf(stderr,"ok.\n");
 
-  ogg_stream_reset(os_en);
-  ogg_stream_reset(os_de);
-  ogg_sync_reset(oy);
+  ogg2_stream_reset(os_en);
+  ogg2_stream_reset(os_de);
+  ogg2_sync_reset(oy);
 
 }
 
 int main(void){
 
-  os_en=ogg_stream_create(0x04030201);
-  os_de=ogg_stream_create(0x04030201);
-  oy=ogg_sync_create();
-  bs=ogg_buffer_create();
+  os_en=ogg2_stream_create(0x04030201);
+  os_de=ogg2_stream_create(0x04030201);
+  oy=ogg2_sync_create();
+  bs=ogg2_buffer_create();
 
   /* Exercise each code path in the framing code.  Also verify that
      the checksums are working.  */
@@ -1165,16 +1196,16 @@
     unsigned char *data=_ogg_malloc(1024*1024);
     int pl[]={0,100,4079,2956,2057,76,34,912,0,234,1000,1000,1000,300,-1};
     int inptr=0,i,j;
-    ogg_page og[5];
+    ogg2_page og[5];
     memset(og,0,sizeof(og));
     
-    ogg_stream_reset(os_en);
+    ogg2_stream_reset(os_en);
 
     for(i=0;pl[i]!=-1;i++){
-      ogg_packet op;
+      ogg2_packet op;
       int len=pl[i];
 
-      op.packet=ogg_buffer_alloc(bs,len);
+      op.packet=ogg2_buffer_alloc(bs,len);
       op.e_o_s=(pl[i+1]<0?1:0);
       op.granulepos=(i+1)*1000;
 
@@ -1182,7 +1213,7 @@
       memcpy(op.packet->buffer->data,data+inptr,len);
       op.packet->length=len;
 
-      ogg_stream_packetin(os_en,&op);
+      ogg2_stream_packetin(os_en,&op);
       inptr+=j;
     }
 
@@ -1190,14 +1221,14 @@
 
     /* retrieve finished pages */
     for(i=0;i<5;i++){
-      if(ogg_stream_pageout(os_en,&og[i])==0){
+      if(ogg2_stream_pageout(os_en,&og[i])==0){
 	fprintf(stderr,"Too few pages output building sync tests!\n");
 	exit(1);
       }
     }
     {
-      ogg_page temp;
-      if(ogg_stream_pageout(os_en,&temp)>0){
+      ogg2_page temp;
+      if(ogg2_stream_pageout(os_en,&temp)>0){
 	fprintf(stderr,"Too many pages output building sync tests!\n");
 	exit(1);
       }
@@ -1205,269 +1236,269 @@
     
     /* Test lost pages on pagein/packetout: no rollback */
     {
-      ogg_page temp={0,0,0,0};
-      ogg_packet test={0,0,0,0,0,0};
+      ogg2_page temp={0,0,0,0};
+      ogg2_packet test={0,0,0,0,0,0};
 
       fprintf(stderr,"Testing loss of pages... ");
 
-      ogg_sync_reset(oy);
-      ogg_stream_reset(os_de);
+      ogg2_sync_reset(oy);
+      ogg2_stream_reset(os_de);
       for(i=0;i<5;i++){
-	bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[i].header)),
+	bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[i].header)),
 	       og[i].header);
-	ogg_sync_wrote(oy,ogg_buffer_length(og[i].header));
-	bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[i].body)),
+	ogg2_sync_wrote(oy,ogg2_buffer_length(og[i].header));
+	bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[i].body)),
 	       og[i].body);
-	ogg_sync_wrote(oy,ogg_buffer_length(og[i].body));
+	ogg2_sync_wrote(oy,ogg2_buffer_length(og[i].body));
       }
 
-      ogg_sync_pageout(oy,&temp);
-      ogg_stream_pagein(os_de,&temp);
-      ogg_sync_pageout(oy,&temp);
-      ogg_stream_pagein(os_de,&temp);
-      ogg_sync_pageout(oy,&temp);
-      ogg_page_release(&temp);/* skip */
-      ogg_sync_pageout(oy,&temp);
-      ogg_stream_pagein(os_de,&temp);
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_stream_pagein(os_de,&temp);
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_stream_pagein(os_de,&temp);
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_page_release(&temp);/* skip */
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_stream_pagein(os_de,&temp);
 
       /* do we get the expected results/packets? */
       
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,0,0,0);
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,100,1,-1);
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,4079,2,3000);
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=OGG_HOLE){
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=OGG2_HOLE){
 	fprintf(stderr,"Error: loss of page did not return error\n");
 	exit(1);
       }
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,76,5,-1);
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,34,6,-1);
-      ogg_packet_release(&test);
+      ogg2_packet_release(&test);
       fprintf(stderr,"ok.\n");
     }
 
     /* Test lost pages on pagein/packetout: rollback with continuation */
     {
-      ogg_page temp={0,0,0,0};
-      ogg_packet test={0,0,0,0,0,0};
+      ogg2_page temp={0,0,0,0};
+      ogg2_packet test={0,0,0,0,0,0};
 
       fprintf(stderr,"Testing loss of pages (rollback required)... ");
 
-      ogg_sync_reset(oy);
-      ogg_stream_reset(os_de);
+      ogg2_sync_reset(oy);
+      ogg2_stream_reset(os_de);
       for(i=0;i<5;i++){
-	bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[i].header)),
+	bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[i].header)),
 	       og[i].header);
-	ogg_sync_wrote(oy,ogg_buffer_length(og[i].header));
-	bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[i].body)),
+	ogg2_sync_wrote(oy,ogg2_buffer_length(og[i].header));
+	bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[i].body)),
 	       og[i].body);
-	ogg_sync_wrote(oy,ogg_buffer_length(og[i].body));
+	ogg2_sync_wrote(oy,ogg2_buffer_length(og[i].body));
       }
 
-      ogg_sync_pageout(oy,&temp);
-      ogg_stream_pagein(os_de,&temp);
-      ogg_sync_pageout(oy,&temp);
-      ogg_stream_pagein(os_de,&temp);
-      ogg_sync_pageout(oy,&temp);
-      ogg_stream_pagein(os_de,&temp);
-      ogg_sync_pageout(oy,&temp);
-      ogg_page_release(&temp);/* skip */
-      ogg_sync_pageout(oy,&temp);
-      ogg_stream_pagein(os_de,&temp);
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_stream_pagein(os_de,&temp);
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_stream_pagein(os_de,&temp);
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_stream_pagein(os_de,&temp);
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_page_release(&temp);/* skip */
+      ogg2_sync_pageout(oy,&temp);
+      ogg2_stream_pagein(os_de,&temp);
 
       /* do we get the expected results/packets? */
       
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,0,0,0);
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,100,1,-1);
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,4079,2,3000);
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,2956,3,4000);
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=OGG_HOLE){
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=OGG2_HOLE){
 	fprintf(stderr,"Error: loss of page did not return error\n");
 	exit(1);
       }
-      ogg_packet_release(&test);
-      if(ogg_stream_packetout(os_de,&test)!=1)error();
+      ogg2_packet_release(&test);
+      if(ogg2_stream_packetout(os_de,&test)!=1)error();
       checkpacket(&test,300,13,14000);
-      ogg_packet_release(&test);
+      ogg2_packet_release(&test);
       fprintf(stderr,"ok.\n");
     }
     
     /* the rest only test sync */
     {
-      ogg_page og_de={0,0,0,0};
+      ogg2_page og_de={0,0,0,0};
       /* Test fractional page inputs: incomplete capture */
       fprintf(stderr,"Testing sync on partial inputs... ");
-      ogg_sync_reset(oy);
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header);
-      ogg_sync_wrote(oy,3);
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
+      ogg2_sync_reset(oy);
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header);
+      ogg2_sync_wrote(oy,3);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
       
       /* Test fractional page inputs: incomplete fixed header */
-      bufcpy2(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header,3);
-      ogg_sync_wrote(oy,20);
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
+      bufcpy2(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header,3);
+      ogg2_sync_wrote(oy,20);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
       
       /* Test fractional page inputs: incomplete header */
-      bufcpy2(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header,23);
-      ogg_sync_wrote(oy,5);
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
+      bufcpy2(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header,23);
+      ogg2_sync_wrote(oy,5);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
       
       /* Test fractional page inputs: incomplete body */
       
-      bufcpy2(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header,28);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].header)-28);
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
+      bufcpy2(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header,28);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].header)-28);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
       
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].body)),og[1].body);
-      ogg_sync_wrote(oy,1000);
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].body)),og[1].body);
+      ogg2_sync_wrote(oy,1000);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
       
-      bufcpy2(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].body)),og[1].body,1000);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].body)-1000);
-      if(ogg_sync_pageout(oy,&og_de)<=0)error();
-      ogg_page_release(&og_de);
+      bufcpy2(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].body)),og[1].body,1000);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].body)-1000);
+      if(ogg2_sync_pageout(oy,&og_de)<=0)error();
+      ogg2_page_release(&og_de);
       
       fprintf(stderr,"ok.\n");
     }
 
     /* Test fractional page inputs: page + incomplete capture */
     {
-      ogg_page og_de={0,0,0,0};
+      ogg2_page og_de={0,0,0,0};
       fprintf(stderr,"Testing sync on 1+partial inputs... ");
-      ogg_sync_reset(oy); 
+      ogg2_sync_reset(oy); 
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].header));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].header));
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].body)),og[1].body);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].body));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].body)),og[1].body);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].body));
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header);
-      ogg_sync_wrote(oy,20);
-      if(ogg_sync_pageout(oy,&og_de)<=0)error();
-      ogg_page_release(&og_de);
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header);
+      ogg2_sync_wrote(oy,20);
+      if(ogg2_sync_pageout(oy,&og_de)<=0)error();
+      ogg2_page_release(&og_de);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
 
-      bufcpy2(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header,20);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].header)-20);
+      bufcpy2(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header,20);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].header)-20);
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].body)),og[1].body);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].body));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].body)),og[1].body);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].body));
 
-      if(ogg_sync_pageout(oy,&og_de)<=0)error();
-      ogg_page_release(&og_de);
+      if(ogg2_sync_pageout(oy,&og_de)<=0)error();
+      ogg2_page_release(&og_de);
 
       fprintf(stderr,"ok.\n");
     }
     
     /* Test recapture: garbage + page */
     {
-      ogg_page og_de={0,0,0,0};
+      ogg2_page og_de={0,0,0,0};
       fprintf(stderr,"Testing search for capture... ");
-      ogg_sync_reset(oy); 
+      ogg2_sync_reset(oy); 
       
       /* 'garbage' */
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].body)),og[1].body);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].body));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].body)),og[1].body);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].body));
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].header));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].header));
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].body)),og[1].body);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].body));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].body)),og[1].body);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].body));
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[2].header)),og[2].header);
-      ogg_sync_wrote(oy,20);
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[2].header)),og[2].header);
+      ogg2_sync_wrote(oy,20);
 
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
-      if(ogg_sync_pageout(oy,&og_de)<=0)error();
-      ogg_page_release(&og_de);
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
+      if(ogg2_sync_pageout(oy,&og_de)<=0)error();
+      ogg2_page_release(&og_de);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
 
-      bufcpy2(ogg_sync_bufferin(oy,ogg_buffer_length(og[2].header)),og[2].header,20);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[2].header)-20);
+      bufcpy2(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[2].header)),og[2].header,20);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[2].header)-20);
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[2].body)),og[2].body);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[2].body));
-      if(ogg_sync_pageout(oy,&og_de)<=0)error();
-      ogg_page_release(&og_de);
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[2].body)),og[2].body);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[2].body));
+      if(ogg2_sync_pageout(oy,&og_de)<=0)error();
+      ogg2_page_release(&og_de);
 
       fprintf(stderr,"ok.\n");
     }
 
     /* Test recapture: page + garbage + page */
     {
-      ogg_page og_de={0,0,0,0};
+      ogg2_page og_de={0,0,0,0};
       fprintf(stderr,"Testing recapture... ");
-      ogg_sync_reset(oy); 
+      ogg2_sync_reset(oy); 
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].header)),og[1].header);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].header));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].header)),og[1].header);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].header));
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[1].body)),og[1].body);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[1].body));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[1].body)),og[1].body);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[1].body));
 
       /* garbage */
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[2].header)),og[2].header);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[2].header));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[2].header)),og[2].header);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[2].header));
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[2].header)),og[2].header);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[2].header));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[2].header)),og[2].header);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[2].header));
 
-      if(ogg_sync_pageout(oy,&og_de)<=0)error();
-      ogg_page_release(&og_de);
+      if(ogg2_sync_pageout(oy,&og_de)<=0)error();
+      ogg2_page_release(&og_de);
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[2].body)),og[2].body);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[2].body)-5);
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[2].body)),og[2].body);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[2].body)-5);
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[3].header)),og[3].header);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[3].header));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[3].header)),og[3].header);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[3].header));
 
-      bufcpy(ogg_sync_bufferin(oy,ogg_buffer_length(og[3].body)),og[3].body);
-      ogg_sync_wrote(oy,ogg_buffer_length(og[3].body));
+      bufcpy(ogg2_sync_bufferin(oy,ogg2_buffer_length(og[3].body)),og[3].body);
+      ogg2_sync_wrote(oy,ogg2_buffer_length(og[3].body));
 
-      if(ogg_sync_pageout(oy,&og_de)>0)error();
-      ogg_page_release(&og_de);
-      if(ogg_sync_pageout(oy,&og_de)<=0)error();
-      ogg_page_release(&og_de);
+      if(ogg2_sync_pageout(oy,&og_de)>0)error();
+      ogg2_page_release(&og_de);
+      if(ogg2_sync_pageout(oy,&og_de)<=0)error();
+      ogg2_page_release(&og_de);
 
       fprintf(stderr,"ok.\n");
     }
-    ogg_stream_destroy(os_en);
+    ogg2_stream_destroy(os_en);
     for(i=0;i<5;i++)
-      ogg_page_release(&og[i]);
+      ogg2_page_release(&og[i]);
   }
 
-  ogg_stream_destroy(os_de);
-  ogg_sync_destroy(oy);
+  ogg2_stream_destroy(os_de);
+  ogg2_sync_destroy(oy);
 
-  ogg_buffer_destroy(bs);
+  ogg2_buffer_destroy(bs);
   return 0;
 }
 

Modified: trunk/ogg2/src/sync.c
===================================================================
--- trunk/ogg2/src/sync.c	2006-04-10 16:08:58 UTC (rev 11116)
+++ trunk/ogg2/src/sync.c	2006-04-10 19:14:33 UTC (rev 11117)
@@ -1,11 +1,11 @@
 /********************************************************************
  *                                                                  *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * THIS FILE IS PART OF THE Ogg Reference Library SOURCE CODE.      *
  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2003             *
+ * THE Ogg Reference Library SOURCE CODE IS (C) COPYRIGHT 1994-2004 *
  * by the Xiph.Org Foundation http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -27,46 +27,46 @@
 
 /* A complete description of Ogg framing exists in docs/framing.html */
 
-int ogg_page_version(ogg_page *og){
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
-  return oggbyte_read1(&ob,4);
+int ogg2_page_version(ogg2_page *og){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  return ogg2byte_read1(&ob,4);
 }
 
-int ogg_page_continued(ogg_page *og){
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
-  return oggbyte_read1(&ob,5)&0x01;
+int ogg2_page_continued(ogg2_page *og){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  return ogg2byte_read1(&ob,5)&0x01;
 }
 
-int ogg_page_bos(ogg_page *og){
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
-  return oggbyte_read1(&ob,5)&0x02;
+int ogg2_page_bos(ogg2_page *og){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  return ogg2byte_read1(&ob,5)&0x02;
 }
 
-int ogg_page_eos(ogg_page *og){
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
-  return oggbyte_read1(&ob,5)&0x04;
+int ogg2_page_eos(ogg2_page *og){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  return ogg2byte_read1(&ob,5)&0x04;
 }
 
-ogg_int64_t ogg_page_granulepos(ogg_page *og){
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
-  return oggbyte_read8(&ob,6);
+ogg_int64_t ogg2_page_granulepos(ogg2_page *og){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  return ogg2byte_read8(&ob,6);
 }
 
-ogg_uint32_t ogg_page_serialno(ogg_page *og){
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
-  return oggbyte_read4(&ob,14);
+ogg_uint32_t ogg2_page_serialno(ogg2_page *og){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  return ogg2byte_read4(&ob,14);
 }
  
-ogg_uint32_t ogg_page_pageno(ogg_page *og){
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
-  return oggbyte_read4(&ob,18);
+ogg_uint32_t ogg2_page_pageno(ogg2_page *og){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  return ogg2byte_read4(&ob,18);
 }
 
 /* returns the number of packets that are completed on this page (if
@@ -76,30 +76,90 @@
 /* NOTE:
 If a page consists of a packet begun on a previous page, and a new
 packet begun (but not completed) on this page, the return will be:
-  ogg_page_packets(page)   ==1, 
-  ogg_page_continued(page) !=0
+  ogg2_page_packets(page)   ==1, 
+  ogg2_page_continued(page) !=0
 
 If a page happens to be a single packet that was begun on a
 previous page, and spans to the next page (in the case of a three or
 more page packet), the return will be: 
-  ogg_page_packets(page)   ==0, 
-  ogg_page_continued(page) !=0
+  ogg2_page_packets(page)   ==0, 
+  ogg2_page_continued(page) !=0
 */
 
-int ogg_page_packets(ogg_page *og){
+int ogg2_page_packets(ogg2_page *og){
   int i;
   int n;
   int count=0;
-  oggbyte_buffer ob;
-  oggbyte_init(&ob,og->header,0);
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
 
-  n=oggbyte_read1(&ob,26);
+  n=ogg2byte_read1(&ob,26);
   for(i=0;i<n;i++)
-    if(oggbyte_read1(&ob,27+i)<255)count++;
+    if(ogg2byte_read1(&ob,27+i)<255)count++;
   return(count);
 }
 
-/* Static CRC calculation table.  See older code in CVS for dead
+/*
+   These functions can be used to change some header values of an 
+   Ogg Page without having to decode and recompile the stream.  This can 
+   be very helpful for repairing broken streams, chaining streams which
+   have the same serialno, or intentionally creating broken streams
+   to test how your application will react to the erronious data.
+*/
+
+void ogg2_page_set_continued(ogg2_page *og, int value){
+  int b;
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  b=ogg2byte_read1(&ob,5);
+  if(value)ogg2byte_set1(&ob,b|0x01,5);
+  else ogg2byte_set1(&ob,b&0xFE,5);
+  ogg2_page_checksum_set(og);
+}
+
+void ogg2_page_set_bos(ogg2_page *og, int value){
+  int b;
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  b=ogg2byte_read1(&ob,5);
+  if(value)ogg2byte_set1(&ob,b|0x02,5);
+  else ogg2byte_set1(&ob,b&0xFD,5);
+  ogg2_page_checksum_set(og);
+}
+
+void ogg2_page_set_eos(ogg2_page *og, int value){
+  int b;
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  b=ogg2byte_read1(&ob,5);
+  if(value)ogg2byte_set1(&ob,b|0x04,5);
+  else ogg2byte_set1(&ob,b&0xFB,5);
+  ogg2_page_checksum_set(og);
+}
+
+void ogg2_page_set_granulepos(ogg2_page *og, ogg_int64_t value){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  ogg2byte_set8(&ob,value,6);
+  ogg2_page_checksum_set(og);
+}
+
+void ogg2_page_set_serialno(ogg2_page *og, ogg_uint32_t value){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  ogg2byte_set4(&ob,value,14);
+  ogg2_page_checksum_set(og);
+}
+
+void ogg2_page_set_pageno(ogg2_page *og, ogg_uint32_t value){
+  ogg2byte_buffer ob;
+  ogg2byte_init(&ob,og->header,0);
+  ogg2byte_set4(&ob,value,18);
+  ogg2_page_checksum_set(og);
+}
+
+
+/* Static CRC calculation table.  See older code in SVN for dead
    run-time initialization code. */
 
 static ogg_uint32_t crc_lookup[256]={
@@ -173,34 +233,34 @@
 /* This has two layers (split page decode and packet decode) to place
    more of the multi-serialno and paging control in the hands of
    higher layers (eg, OggFile).  First, we expose a data buffer using
-   ogg_sync_buffer().  The app either copies into the buffer, or
-   passes it directly to read(), etc.  We then call ogg_sync_wrote()
+   ogg2_sync_buffer().  The app either copies into the buffer, or
+   passes it directly to read(), etc.  We then call ogg2_sync_wrote()
    to tell how many bytes we just added. 
 
    Efficiency note: request the same buffer size each time if at all
    possible.
 
-   Pages are returned (pointers into the buffer in ogg_sync_state)
-   by ogg_sync_pageout().  */
+   Pages are returned (pointers into the buffer in ogg2_sync_state)
+   by ogg2_sync_pageout().  */
 
-ogg_sync_state *ogg_sync_create(void){
-  ogg_sync_state *oy=_ogg_calloc(1,sizeof(*oy));
+ogg2_sync_state *ogg2_sync_create(void){
+  ogg2_sync_state *oy=_ogg_calloc(1,sizeof(*oy));
   memset(oy,0,sizeof(*oy));
-  oy->bufferpool=ogg_buffer_create();
+  oy->bufferpool=ogg2_buffer_create();
   return oy;
 }
 
-int ogg_sync_destroy(ogg_sync_state *oy){
+int ogg2_sync_destroy(ogg2_sync_state *oy){
   if(oy){
-    ogg_sync_reset(oy);
-    ogg_buffer_destroy(oy->bufferpool);
+    ogg2_sync_reset(oy);
+    ogg2_buffer_destroy(oy->bufferpool);
     memset(oy,0,sizeof(*oy));
     _ogg_free(oy);
   }
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
-unsigned char *ogg_sync_bufferin(ogg_sync_state *oy, long bytes){
+unsigned char *ogg2_sync_bufferin(ogg2_sync_state *oy, long bytes){
 
   /* [allocate and] expose a buffer for data submission.
 
@@ -218,7 +278,7 @@
 
   /* base case; fifo uninitialized */
   if(!oy->fifo_head){
-    oy->fifo_head=oy->fifo_tail=ogg_buffer_alloc(oy->bufferpool,bytes);
+    oy->fifo_head=oy->fifo_tail=ogg2_buffer_alloc(oy->bufferpool,bytes);
     return oy->fifo_head->buffer->data;
   }
   
@@ -231,29 +291,29 @@
 
   /* current fragment is unused, but too small */
   if(!oy->fifo_head->length){
-    ogg_buffer_realloc(oy->fifo_head,bytes);
+    ogg2_buffer_realloc(oy->fifo_head,bytes);
     return oy->fifo_head->buffer->data+oy->fifo_head->begin;
   }
   
   /* current fragment used/full; get new fragment */
   {
-    ogg_reference *new=ogg_buffer_alloc(oy->bufferpool,bytes);
+    ogg2_reference *new=ogg2_buffer_alloc(oy->bufferpool,bytes);
     oy->fifo_head->next=new;
     oy->fifo_head=new;
   }
   return oy->fifo_head->buffer->data;
 }
 
-int ogg_sync_wrote(ogg_sync_state *oy, long bytes){ 
-  if(!oy->fifo_head)return OGG_EINVAL;
+int ogg2_sync_wrote(ogg2_sync_state *oy, long bytes){ 
+  if(!oy->fifo_head)return OGG2_EINVAL;
   if(oy->fifo_head->buffer->size-oy->fifo_head->length-oy->fifo_head->begin < 
-     bytes)return OGG_EINVAL;
+     bytes)return OGG2_EINVAL;
   oy->fifo_head->length+=bytes;
   oy->fifo_fill+=bytes;
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
-static ogg_uint32_t _checksum(ogg_reference *or, int bytes){
+static ogg_uint32_t _checksum(ogg2_reference *or, int bytes){
   ogg_uint32_t crc_reg=0;
   int j,post;
 
@@ -280,26 +340,26 @@
    
 8*/
 
-long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og){
-  oggbyte_buffer page;
+long ogg2_sync_pageseek(ogg2_sync_state *oy,ogg2_page *og){
+  ogg2byte_buffer page;
   long           bytes,ret=0;
 
   /* don't leak a valid reference */
-  ogg_page_release(og);
+  ogg2_page_release(og);
 
   bytes=oy->fifo_fill;
-  oggbyte_init(&page,oy->fifo_tail,0);
+  ogg2byte_init(&page,oy->fifo_tail,0);
 
   if(oy->headerbytes==0){
     if(bytes<27)goto sync_out; /* not enough for even a minimal header */
     
     /* verify capture pattern */
-    if(oggbyte_read1(&page,0)!=(int)'O' ||
-       oggbyte_read1(&page,1)!=(int)'g' ||
-       oggbyte_read1(&page,2)!=(int)'g' ||
-       oggbyte_read1(&page,3)!=(int)'S'    ) goto sync_fail;
+    if(ogg2byte_read1(&page,0)!=(int)'O' ||
+       ogg2byte_read1(&page,1)!=(int)'g' ||
+       ogg2byte_read1(&page,2)!=(int)'g' ||
+       ogg2byte_read1(&page,3)!=(int)'S'    ) goto sync_fail;
 
-    oy->headerbytes=oggbyte_read1(&page,26)+27;
+    oy->headerbytes=ogg2byte_read1(&page,26)+27;
   }
   if(bytes<oy->headerbytes)goto sync_out; /* not enough for header +
                                              seg table */
@@ -307,7 +367,7 @@
     int i;
     /* count up body length in the segment table */
     for(i=0;i<oy->headerbytes-27;i++)
-      oy->bodybytes+=oggbyte_read1(&page,27+i);
+      oy->bodybytes+=ogg2byte_read1(&page,27+i);
   }
   
   if(oy->bodybytes+oy->headerbytes>bytes)goto sync_out;
@@ -315,8 +375,8 @@
   /* we have what appears to be a complete page; last test: verify
      checksum */
   {
-    ogg_uint32_t chksum=oggbyte_read4(&page,22);
-    oggbyte_set4(&page,0,22);
+    ogg_uint32_t chksum=ogg2byte_read4(&page,22);
+    ogg2byte_set4(&page,0,22);
 
     /* Compare checksums; memory continues to be common access */
     if(chksum!=_checksum(oy->fifo_tail,oy->bodybytes+oy->headerbytes)){
@@ -325,23 +385,23 @@
 	 at all). replace the computed checksum with the one actually
 	 read in; remember all the memory is common access */
       
-      oggbyte_set4(&page,chksum,22);
+      ogg2byte_set4(&page,chksum,22);
       goto sync_fail;
     }
-    oggbyte_set4(&page,chksum,22);
+    ogg2byte_set4(&page,chksum,22);
   }
 
   /* We have a page.  Set up page return. */
   if(og){
     /* set up page output */
-    og->header=ogg_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->headerbytes);
+    og->header=ogg2_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->headerbytes);
     og->header_len=oy->headerbytes;
-    og->body=ogg_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->bodybytes);
+    og->body=ogg2_buffer_split(&oy->fifo_tail,&oy->fifo_head,oy->bodybytes);
     og->body_len=oy->bodybytes;
   }else{
     /* simply advance */
     oy->fifo_tail=
-      ogg_buffer_pretruncate(oy->fifo_tail,oy->headerbytes+oy->bodybytes);
+      ogg2_buffer_pretruncate(oy->fifo_tail,oy->headerbytes+oy->bodybytes);
     if(!oy->fifo_tail)oy->fifo_head=0;
   }
   
@@ -357,7 +417,7 @@
 
   oy->headerbytes=0;
   oy->bodybytes=0;
-  oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,1);
+  oy->fifo_tail=ogg2_buffer_pretruncate(oy->fifo_tail,1);
   ret--;
   
   /* search forward through fragments for possible capture */
@@ -369,14 +429,14 @@
     if(next){
       /* possible capture in this segment */
       long bytes=next-now;
-      oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes);
+      oy->fifo_tail=ogg2_buffer_pretruncate(oy->fifo_tail,bytes);
       ret-=bytes;
       break;
     }else{
       /* no capture.  advance to next segment */
       long bytes=oy->fifo_tail->length;
       ret-=bytes;
-      oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes);
+      oy->fifo_tail=ogg2_buffer_pretruncate(oy->fifo_tail,bytes);
     }
   }
   if(!oy->fifo_tail)oy->fifo_head=0;
@@ -390,21 +450,21 @@
    Supress 'sync errors' after reporting the first.
 
    return values:
-   OGG_HOLE) recapture (hole in data)
+   OGG2_HOLE) recapture (hole in data)
           0) need more data
           1) page returned
 
    Returns pointers into buffered data; invalidated by next call to
    _stream, _clear, _init, or _buffer */
 
-int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og){
+int ogg2_sync_pageout(ogg2_sync_state *oy, ogg2_page *og){
 
   /* all we need to do is verify a page at the head of the stream
      buffer.  If it doesn't verify, we look for the next potential
      frame */
 
   while(1){
-    long ret=ogg_sync_pageseek(oy,og);
+    long ret=ogg2_sync_pageseek(oy,og);
     if(ret>0){
       /* have a page */
       return 1;
@@ -417,7 +477,7 @@
     /* head did not start a synced page... skipped some bytes */
     if(!oy->unsynced){
       oy->unsynced=1;
-      return OGG_HOLE;
+      return OGG2_HOLE;
     }
 
     /* loop. keep looking */
@@ -426,9 +486,9 @@
 }
 
 /* clear things to an initial state.  Good to call, eg, before seeking */
-int ogg_sync_reset(ogg_sync_state *oy){
+int ogg2_sync_reset(ogg2_sync_state *oy){
 
-  ogg_buffer_release(oy->fifo_tail);
+  ogg2_buffer_release(oy->fifo_tail);
   oy->fifo_tail=0;
   oy->fifo_head=0;
   oy->fifo_fill=0;
@@ -436,21 +496,21 @@
   oy->unsynced=0;
   oy->headerbytes=0;
   oy->bodybytes=0;
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
 /* checksum the page; direct table CRC */
 
-int ogg_page_checksum_set(ogg_page *og){
+int ogg2_page_checksum_set(ogg2_page *og){
   if(og && og->header){
-    oggbyte_buffer ob;
-    ogg_reference *or;
+    ogg2byte_buffer ob;
+    ogg2_reference *or;
     ogg_uint32_t crc_reg=0;
     int j;
 
     /* safety; needed for API behavior, but not framing code */
-    oggbyte_init(&ob,og->header,0);
-    oggbyte_set4(&ob,0,22);
+    ogg2byte_init(&ob,og->header,0);
+    ogg2byte_set4(&ob,0,22);
 
     or=og->header;
     while(or){
@@ -468,11 +528,11 @@
       or=or->next;
     }
     
-    oggbyte_set4(&ob,crc_reg,22);
+    ogg2byte_set4(&ob,crc_reg,22);
 
-    return OGG_SUCCESS;
+    return OGG2_SUCCESS;
   }
-  return OGG_EINVAL;
+  return OGG2_EINVAL;
 }
 
 /* ENCODING PRIMITIVES: raw stream and page layer *******************/
@@ -480,20 +540,20 @@
 /* On encode side, the sync layer provides centralized memory
    management, buffering, and and abstraction to deal with fragmented
    linked buffers as an iteration over flat char buffers.
-   ogg_sync_encode and ogg_sync_destroy are as in decode. */
+   ogg2_sync_encode and ogg2_sync_destroy are as in decode. */
 
-int ogg_sync_pagein(ogg_sync_state *oy,ogg_page *og){
+int ogg2_sync_pagein(ogg2_sync_state *oy,ogg2_page *og){
   /* buffer new */
   if(oy->fifo_head)
-    oy->fifo_head=ogg_buffer_cat(oy->fifo_head,og->header);
+    oy->fifo_head=ogg2_buffer_cat(oy->fifo_head,og->header);
   else
-    oy->fifo_head=ogg_buffer_walk(oy->fifo_tail=og->header);
-  oy->fifo_head=ogg_buffer_cat(oy->fifo_head,og->body);
+    oy->fifo_head=ogg2_buffer_walk(oy->fifo_tail=og->header);
+  oy->fifo_head=ogg2_buffer_cat(oy->fifo_head,og->body);
   memset(og,0,sizeof(*og));
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
-long ogg_sync_bufferout(ogg_sync_state *oy, unsigned char **buffer){
+long ogg2_sync_bufferout(ogg2_sync_state *oy, unsigned char **buffer){
   long ret=0;
 
   /* return next fragment */
@@ -512,27 +572,28 @@
   return ret;
 }
 
-int ogg_sync_read(ogg_sync_state *oy, long bytes){ 
-  if(!oy->fifo_tail)return OGG_EINVAL;
-  oy->fifo_tail=ogg_buffer_pretruncate(oy->fifo_tail,bytes);
+int ogg2_sync_read(ogg2_sync_state *oy, long bytes){ 
+  if(!oy->fifo_tail)return OGG2_EINVAL;
+  oy->fifo_tail=ogg2_buffer_pretruncate(oy->fifo_tail,bytes);
   if(!oy->fifo_tail)oy->fifo_head=0;
 
-  return OGG_SUCCESS;
+  return OGG2_SUCCESS;
 }
 
-void ogg_page_dup(ogg_page *dup,ogg_page *orig){
+void ogg2_page_dup(ogg2_page *dup,ogg2_page *orig){
   dup->header_len=orig->header_len;
   dup->body_len=orig->body_len;
-  dup->header=ogg_buffer_dup(orig->header);
-  dup->body=ogg_buffer_dup(orig->body);
+  dup->header=ogg2_buffer_dup(orig->header);
+  dup->body=ogg2_buffer_dup(orig->body);
 }
 
-void ogg_packet_dup(ogg_packet *dup,ogg_packet *orig){
+void ogg2_packet_dup(ogg2_packet *dup,ogg2_packet *orig){
   dup->bytes=orig->bytes;
   dup->b_o_s=orig->b_o_s;
   dup->e_o_s=orig->e_o_s;
-  dup->granulepos=orig->granulepos;
+  dup->top_granule=orig->top_granule;
+  dup->end_granule=orig->end_granule;
   dup->packetno=orig->packetno;
 
-  dup->packet=ogg_buffer_dup(orig->packet);
+  dup->packet=ogg2_buffer_dup(orig->packet);
 }



More information about the commits mailing list