Bug 556455 - Remove liboggz, liboggplay, libfishsound from video decoder. r=doublec
authorChris Pearce <chris@pearce.org.nz>
Tue, 27 Apr 2010 20:53:48 +1200
changeset 41392 590a7be0e60fb032c2b80e0c4e4b0e7289b1fe22
parent 41391 20cb5fba00897a63afba1b4e915eb530e141e61d
child 41393 29a6a85fab8ecff03dbc573ec87931f5a5333662
push id12998
push usercpearce@mozilla.com
push dateTue, 27 Apr 2010 09:17:07 +0000
treeherdermozilla-central@590a7be0e60f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdoublec
bugs556455
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 556455 - Remove liboggz, liboggplay, libfishsound from video decoder. r=doublec
content/media/ogg/Makefile.in
content/media/ogg/nsChannelReader.cpp
content/media/ogg/nsChannelReader.h
content/media/ogg/nsOggPlayStateMachine.cpp
gfx/layers/ImageLayers.h
layout/build/Makefile.in
media/libfishsound/AUTHORS
media/libfishsound/COPYING
media/libfishsound/ChangeLog
media/libfishsound/Makefile.in
media/libfishsound/README
media/libfishsound/README_MOZILLA
media/libfishsound/bug487519.patch
media/libfishsound/bug520500.patch
media/libfishsound/endian.patch
media/libfishsound/fishsound_reset.patch
media/libfishsound/include/Makefile.in
media/libfishsound/include/fishsound/Makefile.in
media/libfishsound/include/fishsound/comments.h
media/libfishsound/include/fishsound/config.h
media/libfishsound/include/fishsound/constants.h
media/libfishsound/include/fishsound/decode.h
media/libfishsound/include/fishsound/deprecated.h
media/libfishsound/include/fishsound/encode.h
media/libfishsound/include/fishsound/fishsound.h
media/libfishsound/src/Makefile.in
media/libfishsound/src/libfishsound/Makefile.in
media/libfishsound/src/libfishsound/config.h
media/libfishsound/src/libfishsound/convert.h
media/libfishsound/src/libfishsound/convert_c.h
media/libfishsound/src/libfishsound/convert_oil.h
media/libfishsound/src/libfishsound/debug.h
media/libfishsound/src/libfishsound/fishsound.c
media/libfishsound/src/libfishsound/fishsound_comments.c
media/libfishsound/src/libfishsound/fishsound_decode.c
media/libfishsound/src/libfishsound/fishsound_encode.c
media/libfishsound/src/libfishsound/fishsound_flac.c
media/libfishsound/src/libfishsound/fishsound_speex.c
media/libfishsound/src/libfishsound/fishsound_vorbis.c
media/libfishsound/src/libfishsound/fs_compat.h
media/libfishsound/src/libfishsound/fs_vector.c
media/libfishsound/src/libfishsound/fs_vector.h
media/libfishsound/src/libfishsound/private.h
media/libfishsound/trac497.patch
media/libfishsound/update.sh
media/liboggplay/COPYING
media/liboggplay/Makefile.in
media/liboggplay/README
media/liboggplay/README_MOZILLA
media/liboggplay/aspect_ratio.patch
media/liboggplay/bug481921.patch
media/liboggplay/bug487519.patch
media/liboggplay/bug493678.patch
media/liboggplay/bug496529.patch
media/liboggplay/bug500311.patch
media/liboggplay/bug504843.patch
media/liboggplay/bug515217.patch
media/liboggplay/bug520493.patch
media/liboggplay/bug523816.patch
media/liboggplay/endian.patch
media/liboggplay/faster_seek.patch
media/liboggplay/fishsound_reset.patch
media/liboggplay/fix-17ef4ca82df28.patch
media/liboggplay/handle-read-errors.patch
media/liboggplay/include/Makefile.in
media/liboggplay/include/oggplay/Makefile.in
media/liboggplay/include/oggplay/config_win32.h
media/liboggplay/include/oggplay/oggplay.h
media/liboggplay/include/oggplay/oggplay_callback_info.h
media/liboggplay/include/oggplay/oggplay_enums.h
media/liboggplay/include/oggplay/oggplay_query.h
media/liboggplay/include/oggplay/oggplay_reader.h
media/liboggplay/include/oggplay/oggplay_seek.h
media/liboggplay/include/oggplay/oggplay_tools.h
media/liboggplay/liboggplay-199a8cea6c4fd6d.patch
media/liboggplay/oggplay_os2.patch
media/liboggplay/seek_to_key_frame.patch
media/liboggplay/src/Makefile.in
media/liboggplay/src/liboggplay/Makefile.in
media/liboggplay/src/liboggplay/config.h
media/liboggplay/src/liboggplay/cpu.c
media/liboggplay/src/liboggplay/cpu.h
media/liboggplay/src/liboggplay/oggplay.c
media/liboggplay/src/liboggplay/oggplay_buffer.c
media/liboggplay/src/liboggplay/oggplay_buffer.h
media/liboggplay/src/liboggplay/oggplay_callback.c
media/liboggplay/src/liboggplay/oggplay_callback.h
media/liboggplay/src/liboggplay/oggplay_callback_info.c
media/liboggplay/src/liboggplay/oggplay_data.c
media/liboggplay/src/liboggplay/oggplay_data.h
media/liboggplay/src/liboggplay/oggplay_file_reader.c
media/liboggplay/src/liboggplay/oggplay_file_reader.h
media/liboggplay/src/liboggplay/oggplay_private.h
media/liboggplay/src/liboggplay/oggplay_query.c
media/liboggplay/src/liboggplay/oggplay_seek.c
media/liboggplay/src/liboggplay/oggplay_tcp_reader.c
media/liboggplay/src/liboggplay/oggplay_tcp_reader.h
media/liboggplay/src/liboggplay/oggplay_tools.c
media/liboggplay/src/liboggplay/oggplay_yuv2rgb.c
media/liboggplay/src/liboggplay/oggplay_yuv2rgb_template.h
media/liboggplay/src/liboggplay/os2_semaphore.c
media/liboggplay/src/liboggplay/os2_semaphore.h
media/liboggplay/src/liboggplay/std_semaphore.h
media/liboggplay/src/liboggplay/x86/oggplay_yuv2rgb_x86.c
media/liboggplay/src/liboggplay/x86/yuv2rgb_x86.h
media/liboggplay/src/liboggplay/x86/yuv2rgb_x86_vs.h
media/liboggplay/update.sh
media/liboggz/AUTHORS
media/liboggz/COPYING
media/liboggz/ChangeLog
media/liboggz/Makefile.in
media/liboggz/README
media/liboggz/README_MOZILLA
media/liboggz/bug487519.patch
media/liboggz/bug496063.patch
media/liboggz/bug498380.patch
media/liboggz/bug504843.patch
media/liboggz/bug516847.patch
media/liboggz/bug518169.patch
media/liboggz/bug519155.patch
media/liboggz/bug520493.patch
media/liboggz/bug523335.patch
media/liboggz/bug526097.patch
media/liboggz/bug533822.patch
media/liboggz/faster_seek.patch
media/liboggz/include/Makefile.in
media/liboggz/include/oggz/Makefile.in
media/liboggz/include/oggz/config.h
media/liboggz/include/oggz/config_gcc.h
media/liboggz/include/oggz/config_win32.h
media/liboggz/include/oggz/oggz.h
media/liboggz/include/oggz/oggz_comments.h
media/liboggz/include/oggz/oggz_constants.h
media/liboggz/include/oggz/oggz_deprecated.h
media/liboggz/include/oggz/oggz_io.h
media/liboggz/include/oggz/oggz_off_t.h
media/liboggz/include/oggz/oggz_off_t_generated.h
media/liboggz/include/oggz/oggz_read.h
media/liboggz/include/oggz/oggz_seek.h
media/liboggz/include/oggz/oggz_stream.h
media/liboggz/include/oggz/oggz_table.h
media/liboggz/include/oggz/oggz_write.h
media/liboggz/key_frame_seek.patch
media/liboggz/offset_next.patch
media/liboggz/oggz_os2.patch
media/liboggz/seek.patch
media/liboggz/src/Makefile.in
media/liboggz/src/liboggz/Makefile.in
media/liboggz/src/liboggz/dirac.c
media/liboggz/src/liboggz/dirac.h
media/liboggz/src/liboggz/metric_internal.c
media/liboggz/src/liboggz/oggz.c
media/liboggz/src/liboggz/oggz_auto.c
media/liboggz/src/liboggz/oggz_auto.h
media/liboggz/src/liboggz/oggz_byteorder.h
media/liboggz/src/liboggz/oggz_comments.c
media/liboggz/src/liboggz/oggz_compat.h
media/liboggz/src/liboggz/oggz_dlist.c
media/liboggz/src/liboggz/oggz_dlist.h
media/liboggz/src/liboggz/oggz_io.c
media/liboggz/src/liboggz/oggz_macros.h
media/liboggz/src/liboggz/oggz_private.h
media/liboggz/src/liboggz/oggz_read.c
media/liboggz/src/liboggz/oggz_seek.c
media/liboggz/src/liboggz/oggz_stream.c
media/liboggz/src/liboggz/oggz_stream.h
media/liboggz/src/liboggz/oggz_stream_private.h
media/liboggz/src/liboggz/oggz_table.c
media/liboggz/src/liboggz/oggz_vector.c
media/liboggz/src/liboggz/oggz_vector.h
media/liboggz/src/liboggz/oggz_write.c
media/liboggz/update.sh
media/liboggz/wince.patch
media/libsydneyaudio/update.sh
toolkit/content/license.html
toolkit/toolkit-makefiles.sh
toolkit/toolkit-tiers.mk
--- a/content/media/ogg/Makefile.in
+++ b/content/media/ogg/Makefile.in
@@ -42,23 +42,21 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= content
 LIBRARY_NAME	= gkconogg_s
 LIBXUL_LIBRARY 	= 1
 
 
 EXPORTS		+= \
-		nsChannelReader.h \
 		nsOggDecoder.h \
 		nsOggCodecState.h \
 		$(NULL)
 
 CPPSRCS		= \
-		nsChannelReader.cpp \
 		nsOggDecoder.cpp \
 		nsOggCodecState.cpp \
 		nsOggReader.cpp \
 		nsOggPlayStateMachine.cpp \
 		$(NULL)
 
 FORCE_STATIC_LIB = 1
 
deleted file mode 100644
--- a/content/media/ogg/nsChannelReader.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et cindent: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla code.
- *
- * The Initial Developer of the Original Code is the Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Chris Double <chris.double@double.co.nz>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-#include "nsAString.h"
-#include "nsThreadUtils.h"
-#include "nsNetUtil.h"
-#include "prlog.h"
-#include "nsOggDecoder.h"
-#include "nsChannelReader.h"
-#include "nsIScriptSecurityManager.h"
-
-OggPlayErrorCode nsChannelReader::initialise(int aBlock)
-{
-  return E_OGGPLAY_OK;
-}
-
-OggPlayErrorCode nsChannelReader::destroy()
-{
-  // We don't have to do anything here, the decoder will clean stuff up
-  return E_OGGPLAY_OK;
-}
-
-void nsChannelReader::SetLastFrameTime(PRInt64 aTime)
-{
-  mLastFrameTime = aTime;
-}
-
-size_t nsChannelReader::io_read(char* aBuffer, size_t aCount)
-{
-  PRUint32 bytes = 0;
-  nsresult rv = mStream->Read(aBuffer, aCount, &bytes);
-  if (!NS_SUCCEEDED(rv)) {
-    return static_cast<size_t>(OGGZ_ERR_SYSTEM);
-  }
-  nsOggDecoder* decoder =
-    static_cast<nsOggDecoder*>(mStream->Decoder());
-  decoder->NotifyBytesConsumed(bytes);
-  return bytes;
-}
-
-int nsChannelReader::io_seek(long aOffset, int aWhence)
-{
-  nsresult rv = mStream->Seek(aWhence, aOffset);
-  if (NS_SUCCEEDED(rv))
-    return aOffset;
-  
-  return OGGZ_STOP_ERR;
-}
-
-long nsChannelReader::io_tell()
-{
-  return mStream->Tell();
-}
-
-ogg_int64_t nsChannelReader::duration()
-{
-  return mLastFrameTime;
-}
-
-static OggPlayErrorCode oggplay_channel_reader_initialise(OggPlayReader* aReader, int aBlock) 
-{
-  nsChannelReader * me = static_cast<nsChannelReader*>(aReader);
-
-  if (me == NULL) {
-    return E_OGGPLAY_BAD_READER;
-  }
-  return me->initialise(aBlock);
-}
-
-static OggPlayErrorCode oggplay_channel_reader_destroy(OggPlayReader* aReader) 
-{
-  nsChannelReader* me = static_cast<nsChannelReader*>(aReader);
-  return me->destroy();
-}
-
-static size_t oggplay_channel_reader_io_read(void* aReader, void* aBuffer, size_t aCount) 
-{
-  nsChannelReader* me = static_cast<nsChannelReader*>(aReader);
-  return me->io_read(static_cast<char*>(aBuffer), aCount);
-}
-
-static int oggplay_channel_reader_io_seek(void* aReader, long aOffset, int aWhence) 
-{
-  nsChannelReader* me = static_cast<nsChannelReader*>(aReader);
-  return me->io_seek(aOffset, aWhence);
-}
-
-static long oggplay_channel_reader_io_tell(void* aReader) 
-{
-  nsChannelReader* me = static_cast<nsChannelReader*>(aReader);
-  return me->io_tell();
-}
-
-static ogg_int64_t oggplay_channel_reader_duration(struct _OggPlayReader *aReader)
-{
-  nsChannelReader* me = static_cast<nsChannelReader*>(aReader);
-  return me->duration();
-}
-
-void nsChannelReader::Init(nsMediaStream* aStream)
-{
-  mStream = aStream;
-}
-
-nsChannelReader::~nsChannelReader()
-{
-  MOZ_COUNT_DTOR(nsChannelReader);
-}
-
-nsChannelReader::nsChannelReader() :
-  mLastFrameTime(-1)
-{
-  MOZ_COUNT_CTOR(nsChannelReader);
-  OggPlayReader* reader = this;
-  reader->initialise = &oggplay_channel_reader_initialise;
-  reader->destroy = &oggplay_channel_reader_destroy;
-  reader->seek = 0;
-  reader->io_read  = &oggplay_channel_reader_io_read;
-  reader->io_seek  = &oggplay_channel_reader_io_seek;
-  reader->io_tell  = &oggplay_channel_reader_io_tell;
-  reader->duration = &oggplay_channel_reader_duration;
-}
deleted file mode 100644
--- a/content/media/ogg/nsChannelReader.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* vim:set ts=2 sw=2 sts=2 et cindent: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla code.
- *
- * The Initial Developer of the Original Code is the Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *  Chris Double <chris.double@double.co.nz>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-#if !defined(nsChannelReader_h_)
-#define nsChannelReader_h_
-
-#include "nsAutoPtr.h"
-#include "nsMediaStream.h"
-
-#include "oggplay/oggplay.h"
-
-class nsIURI;
-class nsIChannel;
-class nsIStreamListener;
-class nsMediaDecoder;
-
-class nsChannelReader : public OggPlayReader
-{
-public:
-  nsChannelReader();
-  ~nsChannelReader();
-
-  /**
-   * Initialize the reader with the media stream.
-   * This takes ownership of aStream.
-   */
-  void Init(nsMediaStream* aStream);
-
-  nsMediaStream* Stream() { return mStream; }
-
-  // Set the time of the last frame. This is returned in duration() to
-  // liboggplay. Call with decoder lock obtained so that liboggplay cannot
-  // call duration() on the decoder thread while it is changing.
-  void SetLastFrameTime(PRInt64 aTime);
-
-  nsIPrincipal* GetCurrentPrincipal();
-  
-  // Implementation of OggPlay Reader API.
-  OggPlayErrorCode initialise(int aBlock);
-  OggPlayErrorCode destroy();
-  size_t io_read(char* aBuffer, size_t aCount);
-  int io_seek(long aOffset, int aWhence);
-  long io_tell();
-  ogg_int64_t duration();
-  
-public:
-  nsAutoPtr<nsMediaStream> mStream;
-
-  // Timestamp of the end of the last frame in the media resource.
-  // -1 if not known.
-  PRInt64 mLastFrameTime;
-};
-
-#endif
--- a/content/media/ogg/nsOggPlayStateMachine.cpp
+++ b/content/media/ogg/nsOggPlayStateMachine.cpp
@@ -38,17 +38,16 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include <limits>
 #include "nsAudioStream.h"
 #include "nsTArray.h"
 #include "nsBuiltinDecoder.h"
 #include "nsOggReader.h"
 #include "nsOggPlayStateMachine.h"
-#include "oggplay/oggplay.h"
 #include "mozilla/mozalloc.h"
 #include "VideoUtils.h"
 
 using namespace mozilla::layers;
 using mozilla::MonitorAutoExit;
 
 // Adds two 32bit unsigned numbers, retuns PR_TRUE if addition succeeded,
 // or PR_FALSE the if addition would result in an overflow.
--- a/gfx/layers/ImageLayers.h
+++ b/gfx/layers/ImageLayers.h
@@ -241,20 +241,18 @@ public:
     PRUint32 mPicX;
     PRUint32 mPicY;
     gfxIntSize mPicSize;
   };
 
   /**
    * This makes a copy of the data buffers.
    * XXX Eventually we will change this to not make a copy of the data,
-   * but we can't do that until we have tighter control of nsOggDecoder's
-   * buffer management (i.e. not going through liboggplay). Right now
-   * it doesn't matter because the BasicLayer implementation does YCbCr
-   * conversion here anyway.
+   * Right now it doesn't matter because the BasicLayer implementation
+   * does YCbCr conversion here anyway.
    */
   virtual void SetData(const Data& aData) = 0;
 
 protected:
   PlanarYCbCrImage(void* aImplData) : Image(aImplData, PLANAR_YCBCR) {}
 };
 
 /**
--- a/layout/build/Makefile.in
+++ b/layout/build/Makefile.in
@@ -113,20 +113,17 @@ SHARED_LIBRARY_LIBS = \
 ifdef MOZ_MEDIA
 SHARED_LIBRARY_LIBS 	+= \
 	$(DEPTH)/content/media/$(LIB_PREFIX)gkconmedia_s.$(LIB_SUFFIX) \
 	$(NULL)
 endif
 
 ifdef MOZ_OGG
 SHARED_LIBRARY_LIBS 	+= \
-	$(DEPTH)/media/libfishsound/src/libfishsound/$(LIB_PREFIX)fishsound.$(LIB_SUFFIX) \
 	$(DEPTH)/media/libogg/src/$(LIB_PREFIX)ogg.$(LIB_SUFFIX) \
-	$(DEPTH)/media/liboggplay/src/liboggplay/$(LIB_PREFIX)oggplay.$(LIB_SUFFIX) \
-	$(DEPTH)/media/liboggz/src/liboggz/$(LIB_PREFIX)oggz.$(LIB_SUFFIX) \
 	$(DEPTH)/media/libtheora/lib/$(LIB_PREFIX)theora.$(LIB_SUFFIX) \
 	$(DEPTH)/media/libvorbis/lib/$(LIB_PREFIX)vorbis.$(LIB_SUFFIX) \
 	$(DEPTH)/content/media/ogg/$(LIB_PREFIX)gkconogg_s.$(LIB_SUFFIX) \
 	$(NULL)
 endif
 
 ifdef MOZ_WAVE
 SHARED_LIBRARY_LIBS 	+= \
deleted file mode 100644
--- a/media/libfishsound/AUTHORS
+++ /dev/null
@@ -1,25 +0,0 @@
-Conrad Parker <conrad@metadecks.org>
-        - Design, implementation.
-	- Vorbis, Speex support
-
-Tobias Gehrig
-	- FLAC support
-
-Michel Salim
-	- libFLAC 1.1.3 support
-  
-Silvia Pfeiffer <silvia@annodex.net>
-        - MS Windows porting, general packaging.
-
-Zentaro Kavanagh <ogg@illiminable.com>
-	- Windows porting and packaging.
-
-
-based on code from:
-
-libvorbis, by Monty <monty@xiph.org>, Xiph.org Foundation.
-
-libspeex, by Jean-Marc Valin <jean-marc.valin@hermes.usherb.ca>,
-Xiph.Org Foundation
-
-libFLAC, by Josh Coalson, Xiph.Org Foundation.
deleted file mode 100644
--- a/media/libfishsound/COPYING
+++ /dev/null
@@ -1,29 +0,0 @@
-   Copyright (C) 2003 CSIRO Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   
-   - Neither the name of the CSIRO nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-   
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
deleted file mode 100644
--- a/media/libfishsound/ChangeLog
+++ /dev/null
@@ -1,83 +0,0 @@
-2007-01-12  Thomas Vander Stichele  <thomas at apestaart dot org>
-
-	* Makefile.am:
-	  dist m4 macro
-	* include/fishsound/Makefile.am:
-	  fix include directory when overriding includedir
-
-2005-06-13  Thomas Vander Stichele  <thomas at apestaart dot org>
-
-	* autogen.sh:
-	* m4/as-ac-expand.m4:
-	  add m4 dir and use it
-	  add an expand macro
-	* configure.ac:
-	  uniformize configure's output across the annodex stack
-
-Thu Jan 13 17:58:45 EST 2005 Conrad Parker <conrad@metadecks.org>
-
-	* added liboil support from David Schleef <ds@schleef.org>
-
-Thu Jun 24 18:48:46 EST 2004 Conrad Parker <conrad@metadecks.org>
-
-	* Version 0.6.3
-
-	Bug fixes:
-	* non-interleaved Speex encoding re-written and tested
-	* memory leak in comments API closed
-
-	Tests and examples:
-	* new examples fishsound-encdec and fishsound-decenc to trial
-	encode<->decode pipelines
-	* improved testing of Speex non-interleaved encoding
-
-Fri May 21 14:32:41 EST 2004 Conrad Parker <conrad@metadecks.org>
-
-	* Version 0.6.2
-
-	Improved handling of first and last blocks of data (bos and eos
-	packets in Ogg):
-        * new fish_sound_prepare_truncation() API call
-        * improved encdec-audio test to keep track of frames in and out,
-          and warn if unequal. (Currently not set to FAIL on this condition
-          as it appears to be common for Speex)
-
-	Updates to Win32 nmake build files
-
-Wed May  5 21:44:26 EST 2004 Conrad Parker <conrad@metadecks.org>
-
-	* Version 0.6.1
-
-	Added support for comment packets, tests, and various bugfixes.
-	* Added fish_sound_comment_() API, <fishsound/comments.h>
-	* Fixed segv bug in decoding stereo Speex to non-interleaved
-	* Added test for encode/decode pipeline with a variety of
-	  combinations of format, interleave, samplerate, channels and
-	  buffer size.
-	* Added tests for comments data structure and encode/decode pipeline
-
-	* Added fish_sound_{get,set}_frameno() API calls
-
-Wed Mar 24 17:53:55 EST 2004 Conrad Parker <conrad@metadecks.org>
-
-	* Version 0.6.0
-	* moved encode and decode to examples, added documentation for each
-	* added fish_sound_{get,set}_interleave() api calls
-	* various bugfixes from zen and silvia
-	* updated win32 dev files from silvia
-
-Sun Mar 07 17:30:00 EST 2004 Silvia Pfeiffer <Silvia.Pfeiffer@csiro.au>
-	* Version 0.5.41
-	* fixed up windows port and release preparation with
-	  REAME files etc.
-	
-
-Some time in the year 2003...
-
-	* A new fish was born...
-
-	* ... by Conrad Parker <Conrad.Parker@csiro.au>
-
-	* ... and it had a long unlogged journey...
-
-	* before arriving at 0.5.40 . :)
deleted file mode 100644
--- a/media/libfishsound/Makefile.in
+++ /dev/null
@@ -1,51 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla code.
-#
-# The Initial Developer of the Original Code is the Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Chris Double <chris.double@double.co.nz>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= fishsound
-
-DIRS		= \
-		include \
-		src \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/libfishsound/README
+++ /dev/null
@@ -1,46 +0,0 @@
-FishSound, the sound of fish!
------------------------------
-
-  Full documentation is available in doc/fishsound/html/index.html,
-  or online at http://www.annodex.net/software/libfishsound/html/
-
-  Updates are available online at the FishSound homepage:
-  http://www.annodex.net/software/libfishsound/
-
-libfishsound provides a simple programming interface for decoding and
-encoding audio data using Xiph.Org codecs (FLAC, Speex and Vorbis).
-
-libfishsound by itself is designed to handle raw codec streams from a
-lower level layer such as UDP datagrams. When these codecs are used in
-files, they are commonly encapsulated in Ogg to produce Ogg FLAC, Speex
-and Ogg Vorbis files.
-
-libfishsound is a wrapper around the existing codec libraries and provides
-a consistent, higher-level programming interface. It has been designed for
-use in a wide variety of applications; it has no direct dependencies on
-Ogg encapsulation, though it is most commonly used in conjunction with
-liboggz to decode or encode FLAC, Speex or Vorbis audio tracks in Ogg files,
-including Ogg Theora and Annodex.
-
-This source tarball
--------------------
-
-FishSound has been developed and tested on GNU/Linux, Darwin/MacOSX and
-Win32. It probably also works on other Unix-like systems via GNU autoconf.
-For Win32: nmake Makefiles, Visual Studio .NET 2003 solution files and
-Visual C++ 6.0 workspace files are all provided in the source distribution.
-
-Details for building with GNU autotools are in the file INSTALL. Read the
-file README.win32 for installing under MS Windows.
-
-  src/libfishsound/  the library source code.
-  src/examples/      example tools for programming with libfishsound.
- 
-  include/           the libfishound include files that will be installed
-                     into the system include directory.
-
-  doc/               documentation for libfishsound. The subdirectory
-                     doc/libfishsound is autocreated by doxygen from
-		     comments contained in <fishsound/fishsound.h>
-  
-  win32/             files necessary to compile under MS Windows.
deleted file mode 100644
--- a/media/libfishsound/README_MOZILLA
+++ /dev/null
@@ -1,18 +0,0 @@
-The source from this directory was copied from the libfishsound git
-distribution using the update.sh script. The only changes made
-were those applied by update.sh and the addition/upate of Makefile.in
-files for the Mozilla build system.
-
-Some files are renamed during the copy to prevent clashes with object
-file names with other Mozilla libraries.
-
-The git commit id used was 20b5cdf6fe38f61a9847e46e82da60d7ac4b7877
-from git://git.xiph.org/libfishsound.git
-
-endian.patch is applied to fix Bug 452698.
-
-bug487519.patch: Fixes for bug487519
-trac497.patch: Annodex trac ticket 497 fix and mozilla bug 462141.
-fishsound_reset.patch: Fixes bug 516323.
-bug520500.patch: Don't reject files with vorbis comments with name or
-                 values of length 0.
deleted file mode 100644
--- a/media/libfishsound/bug487519.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/media/libfishsound/src/libfishsound/fishsound_vorbis.c b/media/libfishsound/src/libfishsound/fishsound_vorbis.c
-index 68bdb3a..236dda4 100644
---- a/media/libfishsound/src/libfishsound/fishsound_vorbis.c
-+++ b/media/libfishsound/src/libfishsound/fishsound_vorbis.c
-@@ -154,9 +154,13 @@ fs_vorbis_decode (FishSound * fsound, unsigned char * buf, long bytes)
-   } else {
-     FishSoundDecoded_FloatIlv df;
-     FishSoundDecoded_Float dfi;
--
--    if (vorbis_synthesis (&fsv->vb, &op) == 0)
-+    int r;
-+    if ((r = vorbis_synthesis (&fsv->vb, &op)) == 0) 
-       vorbis_synthesis_blockin (&fsv->vd, &fsv->vb);
-+    
-+    if (r == OV_EBADPACKET) {
-+      return FISH_SOUND_ERR_GENERIC;
-+    }
- 
-     while ((samples = vorbis_synthesis_pcmout (&fsv->vd, &fsv->pcm)) > 0) {
-       vorbis_synthesis_read (&fsv->vd, samples);
deleted file mode 100644
--- a/media/libfishsound/bug520500.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/media/libfishsound/src/libfishsound/fishsound_comments.c b/media/libfishsound/src/libfishsound/fishsound_comments.c
---- a/media/libfishsound/src/libfishsound/fishsound_comments.c
-+++ b/media/libfishsound/src/libfishsound/fishsound_comments.c
-@@ -480,44 +480,47 @@ fish_sound_comments_decode (FishSound * 
-       len=readint(c, 0);
-       debug_printf (1, "[%d] len %d\n", i, len);
- 
-       c+=4;
-       if (len > (unsigned long) (end-c)) return -1;
- 
-       name = c;
-       value = fs_index_len (c, '=', len);
-+      n = 0;
-       if (value) {
- 	*value = '\0';
- 	value++;
--
- 	n = c+len - value;
-+	
-+      }
-+      if (n) {
- 	if ((nvalue = fs_strdup_len (value, n)) == NULL)
-           return FISH_SOUND_ERR_OUT_OF_MEMORY;
- 
- 	debug_printf (1, "%s -> %s (length %d)", name, nvalue, n);
- 
- 	if ((comment = fs_comment_new (name, nvalue)) == NULL) {
- 	  fs_free (nvalue);
-           return FISH_SOUND_ERR_OUT_OF_MEMORY;
- 	}
- 
- 	if (_fs_comment_add (fsound, comment) == NULL) {
- 	  fs_free (nvalue);
-           return FISH_SOUND_ERR_OUT_OF_MEMORY;
- 	}
- 
- 	fs_free (nvalue);
--      } else {
-+      } else if (len > 0) {
-         debug_printf (1, "[%d] %s (no value)", i, name, len);
- 
- 	if ((nvalue = fs_strdup_len (name, len)) == NULL)
-           return FISH_SOUND_ERR_OUT_OF_MEMORY;
- 
--	if ((comment = fs_comment_new (nvalue, NULL)) == NULL) {
-+	if ((comment = fs_comment_new (nvalue, "")) == NULL) {
- 	  fs_free (nvalue);
-           return FISH_SOUND_ERR_OUT_OF_MEMORY;
- 	}
- 
- 	if (_fs_comment_add (fsound, comment) == NULL) {
- 	  fs_free (nvalue);
-           return FISH_SOUND_ERR_OUT_OF_MEMORY;
- 	}
deleted file mode 100644
--- a/media/libfishsound/endian.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/media/libfishsound/include/fishsound/config.h b/media/libfishsound/include/fishsound/config.h
-index 573822f..b7cae62 100644
---- a/media/libfishsound/include/fishsound/config.h
-+++ b/media/libfishsound/include/fishsound/config.h
-@@ -104,3 +104,8 @@
- #undef HAVE_VORBISENC
- #define HAVE_VORBISENC 0
- #undef DEBUG
-+
-+#include "prcpucfg.h"
-+#ifdef IS_BIG_ENDIAN
-+#define WORDS_BIGENDIAN
-+#endif
-diff --git a/media/libfishsound/src/libfishsound/config.h b/media/libfishsound/src/libfishsound/config.h
-index 573822f..b7cae62 100644
---- a/media/libfishsound/src/libfishsound/config.h
-+++ b/media/libfishsound/src/libfishsound/config.h
-@@ -104,3 +104,8 @@
- #undef HAVE_VORBISENC
- #define HAVE_VORBISENC 0
- #undef DEBUG
-+
-+#include "prcpucfg.h"
-+#ifdef IS_BIG_ENDIAN
-+#define WORDS_BIGENDIAN
-+#endif
deleted file mode 100644
--- a/media/libfishsound/fishsound_reset.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/media/libfishsound/src/libfishsound/fishsound_vorbis.c b/media/libfishsound/src/libfishsound/fishsound_vorbis.c
---- a/media/libfishsound/src/libfishsound/fishsound_vorbis.c
-+++ b/media/libfishsound/src/libfishsound/fishsound_vorbis.c
-@@ -412,7 +412,7 @@
-   FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
- 
-   vorbis_block_init (&fsv->vd, &fsv->vb);
--
-+  fsv->packetno = 0;
-   return 0;
- }
- 
deleted file mode 100644
--- a/media/libfishsound/include/Makefile.in
+++ /dev/null
@@ -1,47 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla code.
-#
-# The Initial Developer of the Original Code is the Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Chris Double <chris.double@double.co.nz>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= fishsound
-DIRS		= fishsound
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/libfishsound/include/fishsound/Makefile.in
+++ /dev/null
@@ -1,55 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla code.
-#
-# The Initial Developer of the Original Code is the Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Chris Double <chris.double@double.co.nz>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-EXPORTS_NAMESPACES = fishsound
-
-EXPORTS_fishsound = \
-		comments.h \
-		constants.h \
-		decode.h \
-		deprecated.h \
-		encode.h \
-		fishsound.h \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/libfishsound/include/fishsound/comments.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_COMMENT_H__
-#define __FISH_SOUND_COMMENT_H__
-
-/** \file
- * Encoding and decoding of comments.
- *
- * Vorbis and Speex bitstreams
- * use a comment format called "Vorbiscomment", defined 
- * <a href="http://www.xiph.org/ogg/vorbis/doc/v-comment.html">here</a>.
- * Many standard comment names (such as TITLE, COPYRIGHT and GENRE) are
- * defined in that document.
- *
- * The following general features of Vorbiscomment are relevant to this API:
- * - Each stream has one comment packet, which occurs before any encoded
- *   audio data in the stream.
- * - When encoding, FishSound will generate the comment block and pass it
- *   to the encoded() callback in sequence, just like any other packet.
- *   Hence, all comments must be set before any call to fish_sound_encode_*().
- * - When decoding, FishSound will decode the comment block before calling
- *   the first decoded() callback. Hence, retrieving comment data is possible
- *   from as soon as the decoded() callback is first called.
- *
- * Each comment block contains one Vendor string, which can be retrieved
- * with fish_sound_comment_get_vendor(). When encoding, this string is
- * effectively fixed by the codec libraries; it cannot be set by the
- * application.
- *
- * The rest of a comment block consists of \a name = \a value pairs, with
- * the following restrictions:
- * - Both the \a name and \a value must be non-empty
- * - The \a name is case-insensitive and must consist of ASCII within the
- *   range 0x20 to 0x7D inclusive, 0x3D ('=') excluded.
- * - The \a name is not unique; multiple entries may exist with equivalent
- *   \a name within a Vorbiscomment block.
- * - The \a value may be any UTF-8 string.
- *
- * \section comments_get Retrieving comments
- *
- * FishSound contains API methods to iterate through all comments associated
- * with a FishSound* handle (fish_sound_comment_first() and
- * fish_sound_comment_next(), and to iterate through comments matching a
- * particular name (fish_sound_comment_first_byname() and
- * fish_sound_comment_next_byname()). Given that multiple comments may exist
- * with the same \a name, you should not use
- * fish_sound_comment_first_byname() as a simple "get" function.
- *
- * \section comments_set Encoding comments
- * 
- * For encoding, FishSound contains API methods for adding comments
- * (fish_sound_comment_add() and fish_sound_comment_add_byname()
- * and for removing comments
- * (fish_sound_comment_remove() and fish_sound_comment_remove_byname()).
- */
-
-#include <fishsound/fishsound.h>
-
-/**
- * A comment.
- */
-typedef struct {
-  /** The name of the comment, eg. "AUTHOR" */
-  char * name;
-
-  /** The value of the comment, as UTF-8 */
-  char * value;
-} FishSoundComment;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Retrieve the vendor string.
- * \param fsound A FishSound* handle
- * \returns A read-only copy of the vendor string
- * \retval NULL No vendor string is associated with \a fsound,
- *              or \a fsound is NULL.
- */
-const char *
-fish_sound_comment_get_vendor (FishSound * fsound);
-
-
-/**
- * Retrieve the first comment.
- * \param fsound A FishSound* handle
- * \returns A read-only copy of the first comment, or NULL if no comments
- * exist for this FishSound* object.
- */
-const FishSoundComment *
-fish_sound_comment_first (FishSound * fsound);
-
-/**
- * Retrieve the next comment.
- * \param fsound A FishSound* handle
- * \param comment The previous comment.
- * \returns A read-only copy of the comment immediately following the given
- * comment.
- */
-const FishSoundComment *
-fish_sound_comment_next (FishSound * fsound, const FishSoundComment * comment);
-
-/**
- * Retrieve the first comment with a given name.
- * \param fsound A FishSound* handle
- * \param name the name of the comment to retrieve.
- * \returns A read-only copy of the first comment matching the given \a name.
- * \retval NULL no match was found.
- * \note If \a name is NULL, the behaviour is the same as for
- *   fish_sound_comment_first()
- */
-const FishSoundComment *
-fish_sound_comment_first_byname (FishSound * fsound, char * name);
-
-/**
- * Retrieve the next comment following and with the same name as a given
- * comment.
- * \param fsound A FishSound* handle
- * \param comment A comment
- * \returns A read-only copy of the next comment with the same name as
- *          \a comment.
- * \retval NULL no further comments with the same name exist for
- *              this FishSound* object.
- */
-const FishSoundComment *
-fish_sound_comment_next_byname (FishSound * fsound,
-				const FishSoundComment * comment);
-
-/**
- * Add a comment
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_ENCODE)
- * \param comment The comment to add
- * \retval 0 Success
- * \retval FISH_SOUND_ERR_BAD \a fsound is not a valid FishSound* handle
- * \retval FISH_SOUND_ERR_INVALID Operation not suitable for this FishSound
- */
-int
-fish_sound_comment_add (FishSound * fsound, FishSoundComment * comment);
-
-/**
- * Add a comment by name and value.
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_ENCODE)
- * \param name The name of the comment to add
- * \param value The contents of the comment to add
- * \retval 0 Success
- * \retval FISH_SOUND_ERR_BAD \a fsound is not a valid FishSound* handle
- * \retval FISH_SOUND_ERR_INVALID Operation not suitable for this FishSound
- */
-int
-fish_sound_comment_add_byname (FishSound * fsound, const char * name,
-			       const char * value);
-
-/**
- * Remove a comment
- * \param fsound A FishSound* handle (created with FISH_SOUND_ENCODE)
- * \param comment The comment to remove.
- * \retval 1 Success: comment removed
- * \retval 0 No-op: comment not found, nothing to remove
- * \retval FISH_SOUND_ERR_BAD \a fsound is not a valid FishSound* handle
- * \retval FISH_SOUND_ERR_INVALID Operation not suitable for this FishSound
- */
-int
-fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment);
-
-/**
- * Remove all comments with a given name.
- * \param fsound A FishSound* handle (created with FISH_SOUND_ENCODE)
- * \param name The name of the comments to remove
- * \retval ">= 0" The number of comments removed
- * \retval FISH_SOUND_ERR_BAD \a fsound is not a valid FishSound* handle
- * \retval FISH_SOUND_ERR_INVALID Operation not suitable for this FishSound
- */
-int
-fish_sound_comment_remove_byname (FishSound * fsound, char * name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __FISH_SOUND_COMMENTS_H__ */
deleted file mode 100644
--- a/media/libfishsound/include/fishsound/config.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* config.h.  Generated from config.h.in by configure.  */
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* Do not build decoding support */
-#define FS_DECODE 1
-
-/* Do not build encoding support */
-#define FS_ENCODE 0
-
-/* Define to build experimental code */
-/* #undef FS_EXPERIMENTAL */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have libFLAC */
-#define HAVE_FLAC 0
-
-/* Define to 1 if you have libFLAC 1.1.2 */
-/* #undef HAVE_FLAC_1_1_2 */
-
-/* Define to 1 if you have libFLAC 1.1.3 */
-/* #undef HAVE_FLAC_1_1_3 */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define if have libsndfile */
-/* #undef HAVE_LIBSNDFILE1 */
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define if have liboggz */
-/* #undef HAVE_OGGZ */
-
-/* Define to 1 if you have libspeex */
-#define HAVE_SPEEX 0
-
-/* Define to 1 if you have libspeex 1.1.x */
-/* #undef HAVE_SPEEX_1_1 */
-
-/* Define to 1 if speex_lib_get_mode() exists in libspeex */
-/* #undef HAVE_SPEEX_LIB_GET_MODE */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-/* #define HAVE_STDINT_H 1 */
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if the system has the type `uintptr_t'. */
-/* #define HAVE_UINTPTR_T 1 */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have libvorbis */
-#define HAVE_VORBIS 1
-
-/* Define to 1 if you have libvorbisenc */
-#define HAVE_VORBISENC 0
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libfishsound"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "0.9.2"
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
-#endif
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-#undef FS_ENCODE
-#define FS_ENCODE 0
-#undef HAVE_FLAC
-#define HAVE_FLAC 0
-#undef HAVE_OGGZ
-#define HAVE_OGGZ 1
-#undef HAVE_SPEEX
-#define HAVE_SPEEX 0
-#undef HAVE_VORBIS
-#define HAVE_VORBIS 1
-#undef HAVE_VORBISENC
-#define HAVE_VORBISENC 0
-#undef DEBUG
-
-#include "prcpucfg.h"
-#ifdef IS_BIG_ENDIAN
-#define WORDS_BIGENDIAN
-#endif
deleted file mode 100644
--- a/media/libfishsound/include/fishsound/constants.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_CONSTANTS_H__
-#define __FISH_SOUND_CONSTANTS_H__
-
-/** \file
- * Constants used by libfishsound
- */
-
-/** Mode of operation (encode or decode) */
-typedef enum _FishSoundMode {
-  /** Decode */
-  FISH_SOUND_DECODE = 0x10,
-
-  /** Encode */
-  FISH_SOUND_ENCODE = 0x20
-} FishSoundMode;
-
-/** Identifiers for supported codecs */
-typedef enum _FishSoundCodecID {
-  /** Unknown */
-  FISH_SOUND_UNKNOWN = 0x00,
-
-  /** Vorbis */
-  FISH_SOUND_VORBIS  = 0x01,
-
-  /** Speex */
-  FISH_SOUND_SPEEX   = 0x02,
-
-  /** Flac */
-  FISH_SOUND_FLAC    = 0x03
-} FishSoundCodecID;
-
-/** Decode callback return values */
-typedef enum _FishSoundStopCtl {
-  /** Continue calling decode callbacks */
-  FISH_SOUND_CONTINUE = 0,
-  
-  /** Stop calling callbacks, but retain buffered data */
-  FISH_SOUND_STOP_OK  = 1,
-  
-  /** Stop calling callbacks, and purge buffered data */
-  FISH_SOUND_STOP_ERR = -1
-} FishSoundStopCtl;
-
-/** Command codes */
-typedef enum _FishSoundCommand {
-  /** No operation */
-  FISH_SOUND_COMMAND_NOP                = 0x0000,
-
-  /** Retrieve the FishSoundInfo */
-  FISH_SOUND_GET_INFO                   = 0x1000,
-
-  /** Query if multichannel audio should be interpreted as interleaved */
-  FISH_SOUND_GET_INTERLEAVE             = 0x2000,
-
-  /** Set to 1 to interleave, 0 to non-interleave */
-  FISH_SOUND_SET_INTERLEAVE             = 0x2001,
-
-  FISH_SOUND_SET_ENCODE_VBR             = 0x4000,
-  
-  FISH_SOUND_COMMAND_MAX
-} FishSoundCommand;
-
-/** Error values */
-typedef enum _FishSoundError {
-  /** No error */
-  FISH_SOUND_OK                         = 0,
-
-  /** generic error */
-  FISH_SOUND_ERR_GENERIC                = -1,
-
-  /** Not a valid FishSound* handle */
-  FISH_SOUND_ERR_BAD                    = -2,
-
-  /** The requested operation is not suitable for this FishSound* handle */
-  FISH_SOUND_ERR_INVALID                = -3,
-
-  /** Out of memory */
-  FISH_SOUND_ERR_OUT_OF_MEMORY          = -4,
-
-  /** Functionality disabled at build time */
-  FISH_SOUND_ERR_DISABLED               = -10,
-
-  /** Too few bytes passed to fish_sound_identify() */
-  FISH_SOUND_ERR_SHORT_IDENTIFY         = -20,
-
-  /** Comment violates VorbisComment restrictions */
-  FISH_SOUND_ERR_COMMENT_INVALID        = -21
-} FishSoundError;
-
-#endif /* __FISH_SOUND_CONSTANTS_H__ */
deleted file mode 100644
--- a/media/libfishsound/include/fishsound/decode.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_DECODE_H__
-#define __FISH_SOUND_DECODE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** \file
- * Decode functions and callback prototypes
- */
-
-/**
- * Signature of a callback for libfishsound to call when it has decoded
- * PCM audio data, and you want this provided as non-interleaved floats.
- * \param fsound The FishSound* handle
- * \param pcm The decoded audio
- * \param frames The count of frames decoded
- * \param user_data Arbitrary user data
- * \retval FISH_SOUND_CONTINUE Continue decoding
- * \retval FISH_SOUND_STOP_OK Stop decoding immediately and
- * return control to the fish_sound_decode() caller
- * \retval FISH_SOUND_STOP_ERR Stop decoding immediately, purge buffered
- * data, and return control to the fish_sound_decode() caller
- */
-typedef int (*FishSoundDecoded_Float) (FishSound * fsound, float * pcm[],
-				       long frames, void * user_data);
-
-/**
- * Signature of a callback for libfishsound to call when it has decoded
- * PCM audio data, and you want this provided as interleaved floats.
- * \param fsound The FishSound* handle
- * \param pcm The decoded audio
- * \param frames The count of frames decoded
- * \param user_data Arbitrary user data
- * \retval FISH_SOUND_CONTINUE Continue decoding
- * \retval FISH_SOUND_STOP_OK Stop decoding immediately and
- * return control to the fish_sound_decode() caller
- * \retval FISH_SOUND_STOP_ERR Stop decoding immediately, purge buffered
- * data, and return control to the fish_sound_decode() caller
- */
-typedef int (*FishSoundDecoded_FloatIlv) (FishSound * fsound, float ** pcm,
-					  long frames, void * user_data);
-
-/**
- * Set the callback for libfishsound to call when it has a block of decoded
- * PCM audio ready, and you want this provided as non-interleaved floats.
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE)
- * \param decoded The callback to call
- * \param user_data Arbitrary user data to pass to the callback
- * \retval 0 Success
- * \retval FISH_SOUND_ERR_BAD Not a valid FishSound* handle
- * \retval FISH_SOUND_ERR_OUT_OF_MEMORY Out of memory
- */
-int fish_sound_set_decoded_float (FishSound * fsound,
-				  FishSoundDecoded_Float decoded,
-				  void * user_data);
-
-/**
- * Set the callback for libfishsound to call when it has a block of decoded
- * PCM audio ready, and you want this provided as interleaved floats.
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE)
- * \param decoded The callback to call
- * \param user_data Arbitrary user data to pass to the callback
- * \retval 0 Success
- * \retval FISH_SOUND_ERR_BAD Not a valid FishSound* handle
- * \retval FISH_SOUND_ERR_OUT_OF_MEMORY Out of memory
- */
-int fish_sound_set_decoded_float_ilv (FishSound * fsound,
-				      FishSoundDecoded_FloatIlv decoded,
-				      void * user_data);
-
-/**
- * Decode a block of compressed data.
- * No internal buffering is done, so a complete compressed audio packet
- * must be passed each time.
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE)
- * \param buf A buffer containing a compressed audio packet
- * \param bytes A count of bytes to decode (i.e. the length of buf)
- * \returns The number of bytes consumed
- * \retval FISH_SOUND_ERR_STOP_OK Decoding was stopped by a FishSoundDecode*
- * callback returning FISH_SOUND_STOP_OK before any input bytes were consumed.
- * This will occur when PCM is decoded from previously buffered input, and
- * stopping is immediately requested.
- * \retval FISH_SOUND_ERR_STOP_ERR Decoding was stopped by a FishSoundDecode*
- * callback returning FISH_SOUND_STOP_ERR before any input bytes were consumed.
- * This will occur when PCM is decoded from previously buffered input, and
- * stopping is immediately requested.
- * \retval FISH_SOUND_ERR_BAD Not a valid FishSound* handle
- * \retval FISH_SOUND_ERR_OUT_OF_MEMORY Out of memory
- */
-long fish_sound_decode (FishSound * fsound, unsigned char * buf, long bytes);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __FISH_SOUND_DECODE_H__ */
deleted file mode 100644
--- a/media/libfishsound/include/fishsound/deprecated.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_DEPRECATED_H__
-#define __FISH_SOUND_DEPRECATED_H__
-
-/** \file
- * Deprecated interfaces
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * DEPRECATED TYPE.
- * Signature of a callback for libfishsound to call when it has decoded
- * PCM audio data, and you want this provided as floats using the current
- * interleave method as set by fish_sound_set_interleave().
- */
-typedef FishSoundDecoded_Float FishSoundDecoded;
-
-/**
- * DEPRECATED FUNCTION.
- * Set the callback for libfishsound to call when it has a block of decoded
- * PCM audio ready, and you want this provided as floats using the current
- * interleave method as set by fish_sound_set_interleave().
- * This function, and fish_sound_set_interleave(), have been superceded by
- * the typesafe fish_sound_set_decoded_TYPE() callbacks, such as
- * fish_sound_set_decoded_float() or fish_sound_set_decoded_float_ilv().
- *
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_DECODE)
- * \param decoded The callback to call
- * \param user_data Arbitrary user data to pass to the callback
- * \returns 0 on success, -1 on failure
- */
-int fish_sound_set_decoded_callback (FishSound * fsound,
-				     FishSoundDecoded decoded,
-				     void * user_data);
-
-/**
- * DEPRECATED FUNCTION.
- * Set the PCM format used by a FishSound object. The default value is
- * non-interleaved.
- * Prior to libfishsound 0.7.0, you would (optionally) specify whether you
- * wanted to receive interleaved or per-channel PCM data using
- * fish_sound_set_interleave(), the default being per-channel
- * (non-interleaved) PCM.
- * Whether or not your decoded callback expects interleaved or
- * non-interleaved data is now implied by the particular
- * fish_sound_set_decoded_TYPE() method you use to set it, such as
- * fish_sound_set_decoded_float() or fish_sound_set_decoded_float_ilv().
- *
- * \param fsound A FishSound* handle
- * \param interleave Whether to use interleaved PCM or not. Valid values are
- * 0 for non-interleaved, and 1 for interleaved.
- * \retval 0 Success
- * \retval -1 Invalid \a fsound
- */
-int fish_sound_set_interleave (FishSound * fsound, int interleave);
-
-/**
- * DEPRECATED FUNCTION.
- * Encode a block of audio
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_ENCODE)
- * \param pcm The audio data to encode
- * \param frames A count of frames to encode
- * \returns The number of frames encoded
- * \note For multichannel audio, the audio data is interpreted according
- * to the current PCM style
- */
-long fish_sound_encode (FishSound * fsound, float ** pcm, long frames);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __FISH_SOUND_DEPRECATED_H__ */
deleted file mode 100644
--- a/media/libfishsound/include/fishsound/encode.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_ENCODE_H__
-#define __FISH_SOUND_ENCODE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** \file
- * Encode functions and callback prototypes
- */
-
-/**
- * Signature of a callback for libfishsound to call when it has encoded
- * data.
- * \param fsound The FishSound* handle
- * \param buf The encoded data
- * \param bytes The count of bytes encoded
- * \param user_data Arbitrary user data
- * \retval 0 to continue
- * \retval non-zero to stop encoding immediately and
- * return control to the fish_sound_encode() caller
- */
-typedef int (*FishSoundEncoded) (FishSound * fsound, unsigned char * buf,
-				 long bytes, void * user_data);
-
-/**
- * Set the callback for libfishsound to call when it has a block of
- * encoded data ready
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_ENCODE)
- * \param encoded The callback to call
- * \param user_data Arbitrary user data to pass to the callback
- * \returns 0 on success, -1 on failure
- */
-int fish_sound_set_encoded_callback (FishSound * fsound,
-				     FishSoundEncoded encoded,
-				     void * user_data);
-
-/**
- * Encode a block of PCM audio given as non-interleaved floats.
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_ENCODE)
- * \param pcm The audio data to encode
- * \param frames A count of frames to encode
- * \returns The number of frames encoded
- * \note For multichannel audio, the audio data is interpreted according
- * to the current PCM style
- */
-long fish_sound_encode_float (FishSound * fsound, float * pcm[], long frames);
-
-/**
- * Encode a block of audio given as interleaved floats.
- * \param fsound A FishSound* handle (created with mode FISH_SOUND_ENCODE)
- * \param pcm The audio data to encode
- * \param frames A count of frames to encode
- * \returns The number of frames encoded
- * \note For multichannel audio, the audio data is interpreted according
- * to the current PCM style
- */
-long fish_sound_encode_float_ilv (FishSound * fsound, float ** pcm,
-				  long frames);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __FISH_SOUND_ENCODE_H__ */
deleted file mode 100644
--- a/media/libfishsound/include/fishsound/fishsound.h
+++ /dev/null
@@ -1,589 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_H__
-#define __FISH_SOUND_H__
-
-#include <fishsound/constants.h>
-
-/** \mainpage
- *
- * \section intro FishSound, the sound of fish!
- *
- * This is the documentation for the FishSound C API. FishSound provides
- * a simple programming interface for decoding and encoding audio data
- * using Xiph.Org codecs (FLAC, Speex and Vorbis).
- *
- * libfishsound by itself is designed to handle raw codec streams from
- * a lower level layer such as UDP datagrams.
- * When these codecs are used in files, they are commonly encapsulated in
- * <a href="http://www.xiph.org/ogg/">Ogg</a> to produce
- * <em>Ogg FLAC</em>, <em>Speex</em> and <em>Ogg Vorbis</em> files.
- * Example C programs using
- * <a href="http://www.annodex.net/software/liboggz/">liboggz</a> to
- * read and write these files are provided in the libfishsound sources.
- *
- * For more information on the design and history of libfishsound, see the
- * \link about About \endlink section of this documentation, and the
- * <a href="http://www.annodex.net/software/libfishsound/">libfishsound</a>
- * homepage.
- *
- * \subsection contents Contents
- *
- * - \link fishsound.h fishsound.h \endlink:
- * Documentation of the FishSound API.
- *
- * - \link comments.h Handling comments \endlink:
- * How to add and retrieve \a name = \a value metadata in Vorbis and Speex
- * streams.
- *
- * - \link decode Decoding audio data \endlink:
- * How to decode audio data with FishSound, including source for a fully
- * working Ogg FLAC, Speex and Ogg Vorbis decoder.
- *
- * - \link encode Encoding audio data \endlink:
- * How to encode audio data with FishSound, including source for a fully
- * working Ogg FLAC, Speex and Ogg Vorbis encoder.
- *
- * - \link configuration Configuration \endlink:
- * Customizing libfishsound to only decode or encode,
- * or to disable support for a particular codec.
- *
- * - \link building Building \endlink:
- * Information related to building software that uses libfishsound.
- *
- * - \link about About \endlink:
- * Design, motivation, history and acknowledgements.
- *
- * \section Licensing 
- * 
- * libfishsound is provided under the following BSD-style open source license: 
- *
- * \include COPYING 
- *
- */
-
-/** \defgroup about About
- *
- * \section design Design
- * libfishsound provides a simple programming interface for decoding and
- * encoding audio data using codecs from
- * <a href="http://www.xiph.org/">Xiph.Org</a>.
- *
- * libfishsound by itself is designed to handle raw codec streams from
- * a lower level layer such as UDP datagrams.
- * When these codecs are used in files, they are commonly encapsulated in
- * <a href="http://www.xiph.org/ogg/">Ogg</a> to produce
- * <em>Ogg FLAC</em>, <em>Speex</em> and <em>Ogg Vorbis</em> files.
- * Example C programs using
- * <a href="http://www.annodex.net/software/liboggz/">liboggz</a> to
- * read and write these files are provided in the libfishsound sources.
- *
- * libfishsound is implemented as a wrapper around the existing codec
- * libraries and provides a consistent, higher-level programming
- * interface. The motivation for this is twofold: to simplify the task
- * of developing application software that supports these codecs,
- * and to ensure that valid codec streams are generated.
- *
- * \section history History
- * libfishsound was designed and developed by Conrad Parker on the
- * weekend of October 18-19 2003. Previously the author had implemented
- * Vorbis and Speex support in the following software:
- * - <a href="http://www.metadecks.org/software/sweep/">Sweep</a>, a
- * digital audio editor with decoding and GUI control of all encoding
- * options of Vorbis and Speex
- * - Speex support in the <a href="http://www.xinehq.org/">xine</a>
- * multimedia player
- * - Vorbis and Speex importers for
- * <a href="http://www.annodex.net/software/libannodex/">libannodex</a>,
- the basic library for reading and writing
- * <a href="http://www.annodex.net/">Annodex.net</a> media files.
- *
- * The implementation of libfishsound draws heavily on these sources, and
- * in turn the original example sources of libvorbis and libvorbisenc by
- * Monty, and libspeex by Jean-Marc Valin.
- *
- * The naming of libfishsound reflects both the Xiph.Org logo and
- * the author's reputation as a dirty, smelly old fish.
- *
- * \section limitations Limitations
- *
- * libfishsound has been designed to accomodate the various decoding and
- * encoding styles required by a wide variety of software. However, as it
- * is an abstraction of the underlying libvorbis, libvorbisenc and libspeex
- * libraries, it may not be possible to implement some low-level techniques
- * that these libraries enable, such as parallelization of Vorbis sub-block
- * decoding. Nevertheless it is expected that libfishsound is a useful
- * API for most software requiring Vorbis or Speex support, including most
- * applications the author has encountered.
- *
- * \section acknowledgements Acknowledgements
- * Much of the API design follows the style of
- * <a href="http://www.zip.com.au/~erikd/libsndfile/">libsndfile</a>.
- * The author would like to thank Erik de Castro Lopo for feedback on the
- * design of libfishsound.
- */
-
-/** \defgroup configuration Configuration
- *
- * \section platforms Platform-specific configuration
- *
- * FishSound can be configured on most platforms using the GNU autoconf
- * ./configure system described below.
- *
- * For Win32, see the \link win32 README.win32 \endlink section. You will
- * need to edit <tt>win32/config.h</tt> by hand to achieve the customizations
- * described below.
- *
- * \section ./configure ./configure
- *
- * It is possible to customize the functionality of libfishsound
- * by using various ./configure flags when
- * building it from source; for example you can build a smaller
- * version of libfishsound to only decode or encode, or and you can
- * choose to disable support for a particular codec.
- * By default, both decoding and encoding support is built for all
- * codecs found on the system.
- *
- * For general information about using ./configure, see the file
- * \link install INSTALL \endlink
- *
- * \subsection no_encode Removing encoding support
- *
- * Configuring with \a --disable-encode will remove all support for encoding:
- * - All internal encoding related functions will not be built
- * - Any attempt to call fish_sound_new() with \a mode == FISH_SOUND_ENCODE
- *   will fail, returning NULL
- * - Any attempt to call fish_sound_encode_*() will return
- *   FISH_SOUND_ERR_DISABLED
- * - The resulting library will not be linked against libvorbisenc
- *
- * \subsection no_decode Removing decoding support
- *
- * Configuring with \a --disable-decode will remove all support for decoding:
- * - All internal decoding related functions will not be built
- * - Any attempt to call fish_sound_new() with \a mode == FISH_SOUND_DECODE
- *   will fail, returning NULL
- * - Any attempt to call fish_sound_decode() will return 
- *   FISH_SOUND_ERR_DISABLED
- *
- * \subsection no_flac Removing FLAC support
- *
- * Configuring with \a --disable-flac will remove all support for FLAC:
- * - All internal FLAC related functions will not be built
- * - Any attempt to call fish_sound_new() with \a mode == FISH_SOUND_ENCODE
- *   and \a fsinfo->format == FISH_SOUND_FLAC will fail, returning NULL
- * - The resulting library will not be linked against libFLAC
- *
- * \subsection no_speex Removing Speex support
- *
- * Configuring with \a --disable-speex will remove all support for Speex:
- * - All internal Speex related functions will not be built
- * - Any attempt to call fish_sound_new() with \a mode == FISH_SOUND_ENCODE
- *   and \a fsinfo->format == FISH_SOUND_SPEEX will fail, returning NULL
- * - The resulting library will not be linked against libspeex
- *
- * \subsection no_vorbis Removing Vorbis support
- *
- * Configuring with \a --disable-vorbis will remove all support for Vorbis:
- * - All internal Vorbis related functions will not be built
- * - Any attempt to call fish_sound_new() with \a mode == FISH_SOUND_ENCODE
- *   and \a fsinfo->format == FISH_SOUND_VORBIS will fail, returning NULL
- * - The resulting library will not be linked against libvorbis or libvorbisenc
- *
- * \subsection summary Configuration summary
- * 
- * Upon successful configuration, you should see something like this:
-<pre>
-------------------------------------------------------------------------
-  libfishsound 0.9.0:  Automatic configuration OK.
-
-  General configuration:
-
-    Experimental code: ........... no
-    Decoding support: ............ yes
-    Encoding support: ............ yes
-
-  Library configuration (./src/libfishsound):
-
-    FLAC support: ................ yes
-    Speex support: ............... yes (1.1.x)
-    Vorbis support: .............. yes
-
-  Example programs (./src/examples):
-
-    fishsound-identify fishsound-decode fishsound-encode
-
-  Installation paths:
-
-    libfishsound: ................ /usr/local/lib
-    C header files: .............. /usr/local/include/fishsound
-    Documentation: ............... /usr/local/share/doc/libfishsound
-
-  Building:
-
-    Type 'make' to compile libfishsound.
-
-    Type 'make install' to install libfishsound.
-
-    Type 'make check' to run test suite (Valgrind testing not enabled)
-
-  Example programs will be built but not installed.
-------------------------------------------------------------------------
-</pre>
- */
-
-/** \defgroup install Installation
- * \section install INSTALL
- *
- * \include INSTALL
- */
-
-/** \defgroup win32 Building on Win32
- * \section win32 README.Win32
- *
- * \include README.win32
- */
-
-/** \defgroup building Building against libfishsound
- *
- *
- * \section autoconf Using GNU autoconf
- *
- * If you are using GNU autoconf, you do not need to call pkg-config
- * directly. Use the following macro to determine if libfishsound is
- * available:
- *
- <pre>
- PKG_CHECK_MODULES(FISHSOUND, fishsound >= 0.6.0,
-                   HAVE_FISHSOUND="yes", HAVE_FISHSOUND="no")
- if test "x$HAVE_FISHSOUND" = "xyes" ; then
-   AC_SUBST(FISHSOUND_CFLAGS)
-   AC_SUBST(FISHSOUND_LIBS)
- fi
- </pre>
- * (Note that if your application requires FLAC support, you should check
- * for a version of fishsound >= 0.9.0).
- *
- * If libfishsound is found, HAVE_FISHSOUND will be set to "yes", and
- * the autoconf variables FISHSOUND_CFLAGS and FISHSOUND_LIBS will
- * be set appropriately.
- *
- * \section pkg-config Determining compiler options with pkg-config
- *
- * If you are not using GNU autoconf in your project, you can use the
- * pkg-config tool directly to determine the correct compiler options.
- *
- <pre>
- FISHSOUND_CFLAGS=`pkg-config --cflags fishsound`
-
- FISHSOUND_LIBS=`pkg-config --libs fishsound`
- </pre>
- *
- */
-
-/** \file
- * The libfishsound C API.
- *
- * \section general General usage
- *
- * All access is managed via a FishSound* handle. This is instantiated
- * using fish_sound_new() and should be deleted with fish_sound_delete()
- * when no longer required. If there is a discontinuity in the input
- * data (eg. after seeking in an input file), call fish_sound_reset() to
- * reset the internal codec state.
- *
- * \section decoding Decoding
- *
- * libfishsound provides callback based decoding: you feed it encoded audio
- * data, and it will call your callback with decoded PCM. A more detailed
- * explanation and a full example of decoding Ogg FLAC, Speex and Ogg Vorbis
- * files is provided in the \link decode Decoding audio data \endlink section.
- *
- * \section encoding Encoding
- *
- * libfishsound provides callback based encoding: you feed it PCM audio,
- * and it will call your callback with encoded audio data. A more detailed
- * explanation and a full example of encoding Ogg FLAC, Speex and Ogg Vorbis
- * files is provided in the \link encode Encoding audio data \endlink section.
- */
-
-/** \defgroup decode Decoding audio data
- *
- * To decode audio data using libfishsound:
- *
- * - create a FishSound* object with mode FISH_SOUND_DECODE. fish_sound_new()
- * will return a new FishSound* object, initialised for decoding, and the
- * FishSoundInfo structure will be cleared.
- * - provide a FishSoundDecoded_* callback for libfishsound to call when it has
- * decoded audio.
- * - (optionally) specify whether you want to receive interleaved or
- * per-channel PCM data, using a fish_sound_set_interleave().
- * The default is for per-channel (non-interleaved) PCM.
- * - feed encoded audio data to libfishsound via fish_sound_decode().
- * libfishsound will decode the audio for you, calling the FishSoundDecoded_*
- * callback you provided earlier each time it has a block of audio ready.
- * - when finished, call fish_sound_delete().
- *
- * This procedure is illustrated in src/examples/fishsound-decode.c.
- * Note that this example additionally:
- * - uses <a href="http://www.annodex.net/software/liboggz/">liboggz</a> to
- * demultiplex audio data from an Ogg encapsulated FLAC, Speex or Vorbis
- * stream. The step of feeding encoded data to libfishsound is done within
- * the OggzReadPacket callback.
- * - uses <a href="http://www.mega-nerd.com/libsndfile/">libsndfile</a> to
- * write the decoded audio to a WAV file.
- *
- * Hence this example code demonstrates all that is needed to decode
- * Ogg FLAC, Speex or Ogg Vorbis files:
- *
- * \include fishsound-decode.c
- */
-
-/** \defgroup encode Encoding audio data
- *
- * To encode audio data using libfishsound:
- *
- * - create a FishSound* object with mode FISH_SOUND_ENCODE, and with a
- * FishSoundInfo structure filled in with the required encoding parameters.
- * fish_sound_new()  will return a new FishSound* object initialised for
- * encoding.
- * - provide a FishSoundEncoded callback for libfishsound to call when it
- * has a block of encoded audio
- * - feed raw PCM audio data to libfishsound via fish_sound_encode_*().
- * libfishsound will encode the audio for you, calling the FishSoundEncoded
- * callback you provided earlier each time it has a block of encoded audio
- * ready.
- * - when finished, call fish_sound_delete().
- *
- * This procedure is illustrated in src/examples/fishsound-encode.c.
- * Note that this example additionally:
- * - uses <a href="http://www.mega-nerd.com/libsndfile/">libsndfile</a> to
- * read input from a PCM audio file (WAV, AIFF, etc.)
- * - uses <a href="http://www.annodex.net/software/liboggz/">liboggz</a> to
- * encapsulate the encoded FLAC, Speex or Vorbis data in an Ogg stream.
- *
- * Hence this example code demonstrates all that is needed to encode
- * Ogg FLAC, Speex and Ogg Vorbis files:
- *
- * \include fishsound-encode.c
- */
-
-/**
- * Info about a particular encoder/decoder instance
- */
-typedef struct {
-  /** Sample rate of audio data in Hz */
-  int samplerate;
-
-  /** Count of channels */
-  int channels;
-
-  /** FISH_SOUND_VORBIS, FISH_SOUND_SPEEX, FISH_SOUND_FLAC etc. */
-  int format;
-} FishSoundInfo;
-
-/**
- * Info about a particular sound format
- */
-typedef struct {
-  /** FISH_SOUND_VORBIS, FISH_SOUND_SPEEX, FISH_SOUND_FLAC etc. */
-  int format;
-
-  /** Printable name */
-  const char * name;     
-
-  /** Commonly used file extension */
-  const char * extension;
-} FishSoundFormat;
-
-/**
- * An opaque handle to a FishSound. This is returned by fishsound_new()
- * and is passed to all other fish_sound_*() functions.
- */
-typedef void * FishSound;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Identify a codec based on the first few bytes of data.
- * \param buf A pointer to the first few bytes of the data
- * \param bytes The count of bytes available at buf
- * \retval FISH_SOUND_xxxxxx FISH_SOUND_VORBIS, FISH_SOUND_SPEEX or
- * FISH_SOUND_FLAC if \a buf was identified as the initial bytes of a
- * supported codec
- * \retval FISH_SOUND_UNKNOWN if the codec could not be identified
- * \retval FISH_SOUND_ERR_SHORT_IDENTIFY if \a bytes is less than 8
- * \note If \a bytes is exactly 8, then only a weak check is performed,
- * which is fast but may return a false positive.
- * \note If \a bytes is greater than 8, then a stronger check is performed
- * in which an attempt is made to decode \a buf as the initial header of
- * each supported codec. This is unlikely to return a false positive but
- * is only useful if \a buf is the entire payload of a packet derived from
- * a lower layer such as Ogg framing or UDP datagrams.
- */
-int
-fish_sound_identify (unsigned char * buf, long bytes);
-
-/**
- * Instantiate a new FishSound* handle
- * \param mode FISH_SOUND_DECODE or FISH_SOUND_ENCODE
- * \param fsinfo Encoder configuration, may be NULL for FISH_SOUND_DECODE
- * \returns A new FishSound* handle, or NULL on error
- */
-FishSound * fish_sound_new (int mode, FishSoundInfo * fsinfo);
-
-/**
- * Flush any internally buffered data, forcing encode
- * \param fsound A FishSound* handle
- * \returns 0 on success, -1 on failure
- */
-long fish_sound_flush (FishSound * fsound);
-
-/**
- * Reset the codec state of a FishSound object.
- *
- * When decoding from a seekable file, fish_sound_reset() should be called
- * after any seek operations. See also fish_sound_set_frameno().
- *
- * \param fsound A FishSound* handle
- * \returns 0 on success, -1 on failure
- */
-int fish_sound_reset (FishSound * fsound);
-
-/**
- * Delete a FishSound object
- * \param fsound A FishSound* handle
- * \returns 0 on success, -1 on failure
- */
-int fish_sound_delete (FishSound * fsound);
-
-/**
- * Command interface
- * \param fsound A FishSound* handle
- * \param command The command action
- * \param data Command data
- * \param datasize Size of the data in bytes
- * \returns 0 on success, -1 on failure
- */
-int fish_sound_command (FishSound * fsound, int command, void * data,
-			int datasize);
-
-/**
- * Query whether a FishSound object is using interleaved PCM
- * \param fsound A FishSound* handle
- * \retval 0 \a fsound uses non-interleaved PCM
- * \retval 1 \a fsound uses interleaved PCM
- * \retval -1 Invalid \a fsound, or out of memory.
- */
-int fish_sound_get_interleave (FishSound * fsound);
-
-/**
- * Query the current frame number of a FishSound object.
- *
- * For decoding, this is the greatest frame index that has been decoded and
- * made available to a FishSoundDecoded callback. This function is safe to
- * call from within a FishSoundDecoded callback, and corresponds to the frame
- * number of the last frame in the current decoded block.
- *
- * For encoding, this is the greatest frame index that has been encoded. This
- * function is safe to call from within a FishSoundEncoded callback, and
- * corresponds to the frame number of the last frame encoded in the current
- * block.
- *
- * \param fsound A FishSound* handle
- * \returns The current frame number
- * \retval -1 Invalid \a fsound
- */
-long fish_sound_get_frameno (FishSound * fsound);
-
-/**
- * Set the current frame number of a FishSound object.
- *
- * When decoding from a seekable file, fish_sound_set_frameno() should be
- * called after any seek operations, otherwise the value returned by
- * fish_sound_get_frameno() will simply continue to increment. See also
- * fish_sound_reset().
- *
- * \param fsound A FishSound* handle
- * \param frameno The current frame number.
- * \retval 0 Success
- * \retval -1 Invalid \a fsound
- */
-int fish_sound_set_frameno (FishSound * fsound, long frameno);
-
-/**
- * Prepare truncation details for the next block of data.
- * The semantics of these parameters derives directly from Ogg encapsulation
- * of Vorbis, described
- * <a href="http://www.xiph.org/ogg/vorbis/doc/Vorbis_I_spec.html#vorbis-over-ogg">here</a>.
- *
- * When decoding from Ogg, you should call this function with the \a granulepos
- * and \a eos of the \a ogg_packet structure. This call should be made before
- * passing the packet's data to fish_sound_decode(). Failure to do so may
- * result in minor decode errors on the first and/or last packet of the stream.
- *
- * When encoding into Ogg, you should call this function with the \a granulepos
- * and \a eos that will be used for the \a ogg_packet structure. This call
- * should be made before passing the block of audio data to
- * fish_sound_encode_*(). Failure to do so may result in minor encoding errors
- * on the first and/or last packet of the stream.
- *
- * \param fsound A FishSound* handle
- * \param next_granulepos The "granulepos" for the next block to decode.
- *        If unknown, set \a next_granulepos to -1. Otherwise,
- *        \a next_granulepos specifies the frameno of the final frame in the
- *        block. This is authoritative, hence can be used to indicate
- *        various forms of truncation at the beginning or end of a stream.
- *        Mid-stream, a later-than-expected "granulepos" indicates that some
- *        data was missing. 
- * \param next_eos A boolean indicating whether the next data block will be
- *        the last in the stream.
- * \retval 0 Success
- * \retval -1 Invalid \a fsound
- */
-int fish_sound_prepare_truncation (FishSound * fsound, long next_granulepos,
-                                   int next_eos);
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <fishsound/decode.h>
-#include <fishsound/encode.h>
-#include <fishsound/comments.h>
-
-#include <fishsound/deprecated.h>
-
-#endif /* __FISH_SOUND_H__ */
deleted file mode 100644
--- a/media/libfishsound/src/Makefile.in
+++ /dev/null
@@ -1,47 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla code.
-#
-# The Initial Developer of the Original Code is the Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Chris Double <chris.double@double.co.nz>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= fishsound
-DIRS		= libfishsound
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/Makefile.in
+++ /dev/null
@@ -1,58 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla code.
-#
-# The Initial Developer of the Original Code is the Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Chris Double <chris.double@double.co.nz>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= fishsound
-LIBRARY_NAME	= fishsound
-FORCE_STATIC_LIB= 1
-
-CSRCS		= \
-		fishsound_comments.c \
-		fishsound_decode.c \
-		fishsound.c \
-		fs_vector.c \
-		fishsound_speex.c \
-		fishsound_vorbis.c \
-		fishsound_flac.c \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/config.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* config.h.  Generated from config.h.in by configure.  */
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* Do not build decoding support */
-#define FS_DECODE 1
-
-/* Do not build encoding support */
-#define FS_ENCODE 0
-
-/* Define to build experimental code */
-/* #undef FS_EXPERIMENTAL */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have libFLAC */
-#define HAVE_FLAC 0
-
-/* Define to 1 if you have libFLAC 1.1.2 */
-/* #undef HAVE_FLAC_1_1_2 */
-
-/* Define to 1 if you have libFLAC 1.1.3 */
-/* #undef HAVE_FLAC_1_1_3 */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define if have libsndfile */
-/* #undef HAVE_LIBSNDFILE1 */
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define if have liboggz */
-/* #undef HAVE_OGGZ */
-
-/* Define to 1 if you have libspeex */
-#define HAVE_SPEEX 0
-
-/* Define to 1 if you have libspeex 1.1.x */
-/* #undef HAVE_SPEEX_1_1 */
-
-/* Define to 1 if speex_lib_get_mode() exists in libspeex */
-/* #undef HAVE_SPEEX_LIB_GET_MODE */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-/* #define HAVE_STDINT_H 1 */
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if the system has the type `uintptr_t'. */
-/* #define HAVE_UINTPTR_T 1 */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have libvorbis */
-#define HAVE_VORBIS 1
-
-/* Define to 1 if you have libvorbisenc */
-#define HAVE_VORBISENC 0
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libfishsound"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "0.9.2"
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
-#endif
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-#undef FS_ENCODE
-#define FS_ENCODE 0
-#undef HAVE_FLAC
-#define HAVE_FLAC 0
-#undef HAVE_OGGZ
-#define HAVE_OGGZ 1
-#undef HAVE_SPEEX
-#define HAVE_SPEEX 0
-#undef HAVE_VORBIS
-#define HAVE_VORBIS 1
-#undef HAVE_VORBISENC
-#define HAVE_VORBISENC 0
-#undef DEBUG
-
-#include "prcpucfg.h"
-#ifdef IS_BIG_ENDIAN
-#define WORDS_BIGENDIAN
-#endif
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/convert.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_CONVERT_H__
-#define __FISH_SOUND_CONVERT_H__
-
-/* inline functions */
-
-static inline void
-_fs_deinterleave (float ** src, float * dest[],
-		  long frames, int channels, float mult_factor)
-{
-  int i, j;
-  float * d, * s = (float *)src;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = s[i*channels + j] * mult_factor;
-    }
-  }
-}
-
-static inline void
-_fs_interleave (float * src[], float ** dest,
-		long frames, int channels, float mult_factor)
-{
-  int i, j;
-  float * s, * d = (float *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = s[i] * mult_factor;
-    }
-  }
-}
-
-#endif /* __FISH_SOUND_CONVERT_H__ */
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/convert_c.h
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_CONVERT_C_H__
-#define __FISH_SOUND_CONVERT_C_H__
-
-#include <string.h>
-#include <ogg/ogg.h>
-
-/* inline functions */
-
-static inline void
-_fs_deinterleave_s_s (short ** src, short * dest[],
-		      long frames, int channels)
-{
-  int i, j;
-  short * d, * s = (short *)src;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = s[i*channels + j];
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_s_i (short ** src, int * dest[], long frames, int channels)
-{
-  int i, j;
-  short * s = (short *)src;
-  int * d;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = (int) s[i*channels + j];
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_s_f (short ** src, float * dest[], long frames, int channels,
-		      float mult)
-{
-  int i, j;
-  short * s = (short *)src;
-  float * d;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = ((float) s[i*channels + j]) * mult;
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_s_d (short ** src, double * dest[], long frames, int channels,
-		      double mult)
-{
-  int i, j;
-  short * s = (short *)src;
-  double * d;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = ((double) s[i*channels + j]) * mult;
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_f_s (float ** src, short * dest[],
-		      long frames, int channels, float mult)
-{
-  int i, j;
-  float * s = (float *)src;
-  short * d;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = (short) (s[i*channels + j] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_f_i (float ** src, int * dest[],
-		      long frames, int channels, float mult)
-{
-  int i, j;
-  float * s = (float *)src;
-  int * d;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = (int) (s[i*channels + j] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_f_f (float ** src, float * dest[],
-		      long frames, int channels, float mult)
-{
-  int i, j;
-  float * s = (float *)src, * d;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = s[i*channels + j] * mult;
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_f_d (float ** src, double * dest[],
-		      long frames, int channels, double mult)
-{
-  int i, j;
-  float * s = (float *)src;
-  double * d;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = (double) s[i*channels + j] * mult;
-    }
-  }
-}
-
-static inline void
-_fs_interleave_f_s (float * src[], short ** dest,
-		    long frames, int channels, float mult)
-{
-  int i, j;
-  float * s;
-  short * d = (short *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (short) (s[i] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_interleave_s_s (short * src[], short ** dest,
-		    long frames, int channels)
-{
-  int i, j;
-  short * s, * d = (short *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = s[i];
-    }
-  }
-}
-
-static inline void
-_fs_interleave_s_f (short * src[], float ** dest,
-		    long frames, int channels, float mult)
-{
-  int i, j;
-  short * s;
-  float * d = (float *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (float) (s[i] * mult);
-    }
-  }
-}
-
-static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
-  int ret=x;
-  ret-= ((x<=32767)-1)&(x-32767);
-  ret-= ((x>=-32768)-1)&(x+32768);
-  return(ret);
-}
-
-static inline void
-_fs_interleave_i_s (ogg_int32_t * src[], short ** dest,
-		    long frames, int channels, int shift)
-{
-  int i, j;
-  ogg_int32_t * s;
-  short * d = (short *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (short) CLIP_TO_15(s[i]>>9);
-    }
-  }
-}
-
-static inline void
-_fs_interleave_i_f (int * src[], float ** dest,
-		    long frames, int channels, float mult)
-{
-  int i, j;
-  int * s;
-  float * d = (float *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (float) (s[i] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_interleave_f_f (float * src[], float ** dest,
-		    long frames, int channels, float mult)
-{
-  int i, j;
-  float * s, * d = (float *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = s[i] * mult;
-    }
-  }
-}
-
-static inline void
-_fs_interleave_d_s (double * src[], short ** dest,
-		    long frames, int channels, double mult)
-{
-  int i, j;
-  double * s;
-  short * d = (short *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (short) (s[i] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_interleave_d_f (double * src[], float ** dest,
-		    long frames, int channels, float mult)
-{
-  int i, j;
-  double * s;
-  float * d = (float *)dest;
-
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (float) s[i] * mult;
-    }
-  }
-}
-
-static inline void
-_fs_convert_s_s (short * src, short * dest, long samples)
-{
-  memcpy (dest, src, samples * sizeof (short));
-}
-
-static inline void
-_fs_convert_s_i (short * src, int * dest, long samples)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (int) src[i];
-  }
-}
-
-static inline void
-_fs_convert_s_f (short * src, float * dest, long samples, float mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (float) src[i] * mult;
-  }
-}
-
-static inline void
-_fs_convert_s_d (short * src, double * dest, long samples, double mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = ((double)src[i]) * mult;
-  }
-}
-
-static inline void
-_fs_convert_i_s (int * src, short * dest, long samples)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (short) src[i];
-  }
-}
-
-static inline void
-_fs_convert_i_f (int * src, float * dest, long samples, float mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (float) src[i] * mult;
-  }
-}
-
-static inline void
-_fs_convert_f_s (float * src, short * dest, long samples, float mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (short) (src[i] * mult);
-  }
-}
-
-static inline void
-_fs_convert_f_i (float * src, int * dest, long samples, float mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (int) (src[i] * mult);
-  }
-}
-
-static inline void
-_fs_convert_f_f (float * src, float * dest, long samples, float mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = src[i] * mult;
-  }
-}
-
-static inline void
-_fs_convert_f_d (float * src, double * dest, long samples, double mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (double)src[i] * mult;
-  }
-}
-
-static inline void
-_fs_convert_d_s (double * src, short * dest, long samples, double mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (short) (src[i] * mult);
-  }
-}
-
-static inline void
-_fs_convert_d_f (double * src, float * dest, long samples, float mult)
-{
-  int i;
-
-  for (i = 0; i < samples; i++) {
-    dest[i] = (float)src[i] * mult;
-  }
-}
-
-#endif /* __FISH_SOUND_CONVERT_C_H__ */
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/convert_oil.h
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- * David Schleef, ds@schleef.org
- * January, 2005
- */
-
-#ifndef __FISH_SOUND_CONVERT_OIL_H__
-#define __FISH_SOUND_CONVERT_OIL_H__
-
-#include <string.h>
-#include <ogg/ogg.h>
-#include <liboil/liboil.h>
-
-/* inline functions */
-
-static inline void
-_fs_deinterleave_s_s (short ** src, short * dest[],
-		      long frames, int channels)
-{
-  int j;
-  short * s = (short *)src;
-
-#define oil_restride_s16(a,b,c,d,e) oil_conv_u16_s16((uint16_t *)a,b,c,d,e)
-  for (j = 0; j < channels; j++) {
-    oil_restride_s16 (dest[j], sizeof(short), s + j,
-        channels * sizeof(short), frames);
-  }
-}
-
-static inline void
-_fs_deinterleave_s_i (short ** src, int * dest[], long frames, int channels)
-{
-  int j;
-  short * s = (short *)src;
-
-  for (j = 0; j < channels; j++) {
-    oil_conv_s32_s16 (dest[j], sizeof(int), s + j,
-        channels * sizeof(short), frames);
-  }
-}
-
-static inline void
-_fs_deinterleave_s_f (short ** src, float * dest[], long frames, int channels,
-		      float mult)
-{
-  int j;
-  short * s = (short *)src;
-
-  for (j = 0; j < channels; j++) {
-    oil_conv_f32_s16 (dest[j], sizeof(float), s + j,
-        channels * sizeof(short), frames);
-    oil_scalarmult_f32 (dest[j], sizeof (float), dest[j], sizeof(float),
-        &mult, frames);
-  }
-}
-
-static inline void
-_fs_deinterleave_s_d (short ** src, double * dest[], long frames, int channels,
-		      double mult)
-{
-  int j;
-  short * s = (short *)src;
-
-  for (j = 0; j < channels; j++) {
-    oil_conv_f64_s16 (dest[j], sizeof(double), s + j,
-        channels * sizeof(short), frames);
-    oil_scalarmult_f64 (dest[j], sizeof (double), dest[j], sizeof (double),
-        &mult, frames);
-  }
-}
-
-static inline void
-_fs_deinterleave_f_s (float ** src, short * dest[],
-		      long frames, int channels, float mult)
-{
-  int i, j;
-  float * s = (float *)src;
-  short * d;
-
-  /* FIXME: this needs a temporary buffer for liboil */
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = (short) (s[i*channels + j] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_f_i (float ** src, int * dest[],
-		      long frames, int channels, float mult)
-{
-  int i, j;
-  float * s = (float *)src;
-  int * d;
-
-  /* FIXME: this needs a temporary buffer for liboil */
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      d = dest[j];
-      d[i] = (int) (s[i*channels + j] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_deinterleave_f_f (float ** src, float * dest[],
-		      long frames, int channels, float mult)
-{
-  int j;
-  float * s = (float *)src;
-
-  for (j = 0; j < channels; j++) {
-    oil_scalarmult_f32 (dest[j], sizeof(float), s + j,
-        channels * sizeof(float), &mult, frames);
-  }
-}
-
-static inline void
-_fs_deinterleave_f_d (float ** src, double * dest[],
-		      long frames, int channels, double mult)
-{
-  int j;
-  float * s = (float *)src;
-
-  for (j = 0; j < channels; j++) {
-    oil_conv_f64_f32 (dest[j], sizeof(double), s + j,
-        channels * sizeof(float), frames);
-    oil_scalarmult_f64 (dest[j], sizeof(double), dest[j],
-        sizeof(double), &mult, frames);
-  }
-}
-
-static inline void
-_fs_interleave_f_s (float * src[], short ** dest,
-		    long frames, int channels, float mult)
-{
-  int i, j;
-  float * s;
-  short * d = (short *)dest;
-
-  /* FIXME: this needs a temporary buffer for liboil */
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (short) (s[i] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_interleave_s_s (short * src[], short ** dest,
-		    long frames, int channels)
-{
-  int j;
-  short * d = (short *)dest;
-
-  for (j = 0; j < channels; j++) {
-    oil_restride_s16 (d + j, sizeof (short) * channels, src[j],
-        sizeof (short), frames);
-  }
-}
-
-static inline void
-_fs_interleave_s_f (short * src[], float ** dest,
-		    long frames, int channels, float mult)
-{
-  int j;
-  float * d = (float *)dest;
-
-  for (j = 0; j < channels; j++) {
-    oil_conv_f32_s16 (d + j, sizeof (float) * channels, src[j],
-        sizeof (short), frames);
-  }
-  oil_scalarmult_f32 (d, sizeof(float), d, sizeof(float), &mult,
-      channels * frames);
-}
-
-static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
-  int ret=x;
-  ret-= ((x<=32767)-1)&(x-32767);
-  ret-= ((x>=-32768)-1)&(x+32768);
-  return(ret);
-}
-
-static inline void
-_fs_interleave_i_s (ogg_int32_t * src[], short ** dest,
-		    long frames, int channels, int shift)
-{
-  int i, j;
-  ogg_int32_t * s;
-  short * d = (short *)dest;
-
-  /* FIXME: shouldn't this use shift? */
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (short) CLIP_TO_15(s[i]>>9);
-    }
-  }
-}
-
-static inline void
-_fs_interleave_i_f (int * src[], float ** dest,
-		    long frames, int channels, float mult)
-{
-  int j;
-  float * d = (float *)dest;
-
-  for (j = 0; j < channels; j++) {
-    oil_conv_f32_s32 (d + j, sizeof (float) * channels, src[j],
-        sizeof (int), frames);
-  }
-  oil_scalarmult_f32 (d, sizeof(float), d, sizeof(float), &mult,
-      channels * frames);
-}
-
-static inline void
-_fs_interleave_f_f (float * src[], float ** dest,
-		    long frames, int channels, float mult)
-{
-  int j;
-  float * d = (float *)dest;
-
-  for (j = 0; j < channels; j++) {
-    oil_scalarmult_f32 (d + j, sizeof (float) * channels, src[j],
-        sizeof (float), &mult, frames);
-  }
-}
-
-static inline void
-_fs_interleave_d_s (double * src[], short ** dest,
-		    long frames, int channels, double mult)
-{
-  int i, j;
-  double * s;
-  short * d = (short *)dest;
-
-  /* FIXME: needs temporary buffer */
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      s = src[j];
-      d[i*channels + j] = (short) (s[i] * mult);
-    }
-  }
-}
-
-static inline void
-_fs_interleave_d_f (double * src[], float ** dest,
-		    long frames, int channels, float mult)
-{
-  int j;
-  float * d = (float *)dest;
-
-  for (j = 0; j < channels; j++) {
-    oil_conv_f32_f64 (d + j, sizeof (float) * channels, src[j],
-        sizeof (double), frames);
-  }
-  oil_scalarmult_f32 (d, sizeof(float), d, sizeof(float), &mult,
-      channels * frames);
-}
-
-static inline void
-_fs_convert_s_s (short * src, short * dest, long samples)
-{
-  memcpy (dest, src, samples * sizeof (short));
-}
-
-static inline void
-_fs_convert_s_i (short * src, int * dest, long samples)
-{
-  oil_conv_s32_s16 (dest, sizeof(int), src, sizeof(short), samples);
-}
-
-static inline void
-_fs_convert_s_f (short * src, float * dest, long samples, float mult)
-{
-  oil_conv_f32_s16 (dest, sizeof(float), src, sizeof(short), samples);
-  oil_scalarmult_f32 (dest, sizeof(float), dest, sizeof(float), &mult, samples);
-}
-
-static inline void
-_fs_convert_s_d (short * src, double * dest, long samples, double mult)
-{
-  oil_conv_f64_s16 (dest, sizeof(double), src, sizeof(short), samples);
-  oil_scalarmult_f64 (dest, sizeof(double), dest, sizeof(double), &mult,
-      samples);
-}
-
-static inline void
-_fs_convert_i_s (int * src, short * dest, long samples)
-{
-  /* FIXME: should this clip? */
-  oil_conv_s16_s32 (dest, sizeof(dest), src, sizeof(int), samples);
-  /* oil_clipconv_s16_s32 (dest, sizeof(dest), src, sizeof(int), samples); */
-}
-
-static inline void
-_fs_convert_i_f (int * src, float * dest, long samples, float mult)
-{
-  oil_conv_f32_s32 (dest, sizeof(float), src, sizeof(int), samples);
-  oil_scalarmult_f32 (dest, sizeof(float), dest, sizeof(float), &mult, samples);
-}
-
-static inline void
-_fs_convert_f_s (float * src, short * dest, long samples, float mult)
-{
-  int i;
-
-  /* FIXME: needs temp buffer */
-  for (i = 0; i < samples; i++) {
-    dest[i] = (short) (src[i] * mult);
-  }
-}
-
-static inline void
-_fs_convert_f_i (float * src, int * dest, long samples, float mult)
-{
-  int i;
-
-  /* FIXME: needs temp buffer */
-  for (i = 0; i < samples; i++) {
-    dest[i] = (int) (src[i] * mult);
-  }
-}
-
-static inline void
-_fs_convert_f_f (float * src, float * dest, long samples, float mult)
-{
-  oil_scalarmult_f32 (dest, sizeof(float), src, sizeof(float), &mult, samples);
-}
-
-static inline void
-_fs_convert_f_d (float * src, double * dest, long samples, double mult)
-{
-  oil_conv_f64_f32 (dest, sizeof(double), src, sizeof(float), samples);
-  oil_scalarmult_f64 (dest, sizeof(double), dest, sizeof(double), &mult, samples);
-}
-
-static inline void
-_fs_convert_d_s (double * src, short * dest, long samples, double mult)
-{
-  int i;
-
-  /* FIXME: needs temp buffer */
-  for (i = 0; i < samples; i++) {
-    dest[i] = (short) (src[i] * mult);
-  }
-}
-
-static inline void
-_fs_convert_d_f (double * src, float * dest, long samples, float mult)
-{
-  int i;
-
-  /* FIXME: needs temp buffer */
-  for (i = 0; i < samples; i++) {
-    dest[i] = (float)src[i] * mult;
-  }
-}
-
-#endif /* __FISH_SOUND_CONVERT_OIL_H__ */
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/debug.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * A generic debugging printer.
- *
- * Conrad Parker <conrad@metadecks.org>, May 2009
- *
- * Usage:
- *
- * #define DEBUG_LEVEL 3
- * #include "debug.h"
- *
- * ...
- *     debug_printf (2, "Something went wrong");
- * ...
- *
- * The macro print_debug(level, fmt) prints a formatted debugging message
- * of level 'level' to stderr. You should set the maximum tolerable debug
- * level before including debug.h. If it is 0, or if neither DEBUG_LEVEL
- * nor DEBUG are defined, then the debug_printf() macro is ignored, and
- * none of this file is included.
- */
-#ifndef __DEBUG_H__
-#define __DEBUG_H__
-
-/* MSVC can't handle C99 */
-#if (defined (_MSCVER) || defined (_MSC_VER))
-#define debug_printf //
-#else
-
-#ifdef DEBUG
-#ifndef DEBUG_LEVEL
-#define DEBUG_LEVEL 1
-#endif
-#endif
-
-#if (DEBUG_LEVEL > 0)
-
-#define DEBUG_MAXLINE 4096
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <errno.h>
-
-/*
- * debug_print_err (func, line, fmt)
- *
- * Print a formatted error message to stderr.
- */
-static void
-debug_print_err (const char * func, int line, const char * fmt, ...)
-{
-  va_list ap;
-  int errno_save;
-  char buf[DEBUG_MAXLINE];
-  int n=0;
-
-  errno_save = errno;
-
-  va_start (ap, fmt);
-
-  if (func) {
-    snprintf (buf+n, DEBUG_MAXLINE-n, "%s():%d: ", func, line);
-    n = strlen (buf);
-  }
-
-  vsnprintf (buf+n, DEBUG_MAXLINE-n, fmt, ap);
-  n = strlen (buf);
-
-  fflush (stdout); /* in case stdout and stderr are the same */
-  fputs (buf, stderr);
-  fputc ('\n', stderr);
-  fflush (NULL);
-
-  va_end (ap);
-}
-
-/*
- * debug_printf (level, fmt)
- *
- * Print a formatted debugging message of level 'level' to stderr
- */
-#define debug_printf(x,y...) {if (x <= DEBUG_LEVEL) debug_print_err (__func__, __LINE__, y);}
-
-#undef MAXLINE
-
-#else
-#define debug_printf(x,y...)
-#endif
-
-#endif /* non-C99 */
-
-#endif /* __DEBUG_H__ */
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fishsound.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include "private.h"
-
-int
-fish_sound_identify (unsigned char * buf, long bytes)
-{
-  if (bytes < 8) return FISH_SOUND_ERR_SHORT_IDENTIFY;
-
-  if (HAVE_VORBIS &&
-      fish_sound_vorbis_identify (buf, bytes) != FISH_SOUND_UNKNOWN)
-    return FISH_SOUND_VORBIS;
-
-  if (HAVE_SPEEX &&
-      fish_sound_speex_identify (buf, bytes) != FISH_SOUND_UNKNOWN)
-    return FISH_SOUND_SPEEX;
-
-  if (fish_sound_flac_identify (buf, bytes) != FISH_SOUND_UNKNOWN)
-    return FISH_SOUND_FLAC;
-
-  return FISH_SOUND_UNKNOWN;
-}
-
-int
-fish_sound_set_format (FishSound * fsound, int format)
-{
-  if (format == FISH_SOUND_VORBIS) {
-    fsound->codec = fish_sound_vorbis_codec ();
-  } else if (format == FISH_SOUND_SPEEX) {
-    fsound->codec = fish_sound_speex_codec ();
-  } else if (format == FISH_SOUND_FLAC) {
-    fsound->codec = fish_sound_flac_codec ();
-   } else {
-    return -1;
-  }
-
-  if (fsound->codec && fsound->codec->init)
-    if (fsound->codec->init (fsound) == NULL) return -1;
-
-  fsound->info.format = format;
-
-  return format;
-}
-
-FishSound *
-fish_sound_new (int mode, FishSoundInfo * fsinfo)
-{
-  FishSound * fsound;
-
-  if (!FS_DECODE && mode == FISH_SOUND_DECODE) return NULL;
-
-  if (!FS_ENCODE && mode == FISH_SOUND_ENCODE) return NULL;
-
-  if (mode == FISH_SOUND_ENCODE) {
-    if (fsinfo == NULL) {
-      return NULL;
-    } else {
-      if (!(HAVE_VORBIS && HAVE_VORBISENC)) {
-	if (fsinfo->format == FISH_SOUND_VORBIS) return NULL;
-      }
-      if (!HAVE_SPEEX) {
-	if (fsinfo->format == FISH_SOUND_SPEEX) return NULL;
-      }
-      if (!HAVE_FLAC) {
-        if (fsinfo->format == FISH_SOUND_FLAC) return NULL;
-      }
-    }
-  } else if (mode != FISH_SOUND_DECODE) {
-    return NULL;
-  }
-
-  fsound = fs_malloc (sizeof (FishSound));
-  if (fsound == NULL) return NULL;
-
-  fsound->mode = mode;
-  fsound->interleave = 0;
-  fsound->frameno = 0;
-  fsound->next_granulepos = -1;
-  fsound->next_eos = 0;
-  fsound->codec = NULL;
-  fsound->codec_data = NULL;
-  fsound->callback.encoded = NULL;
-  fsound->user_data = NULL;
-
-  fish_sound_comments_init (fsound);
-
-  if (mode == FISH_SOUND_DECODE) {
-    fsound->info.samplerate = 0;
-    fsound->info.channels = 0;
-    fsound->info.format = FISH_SOUND_UNKNOWN;
-  } else if (mode == FISH_SOUND_ENCODE) {
-    fsound->info.samplerate = fsinfo->samplerate;
-    fsound->info.channels = fsinfo->channels;
-    fsound->info.format = fsinfo->format;
-
-    if (fish_sound_set_format (fsound, fsinfo->format) == -1) {
-      fs_free (fsound);
-      return NULL;
-    }
-  }
-
-  return fsound;
-}
-
-long
-fish_sound_flush (FishSound * fsound)
-{
-  if (fsound == NULL) return -1;
-
-  if (fsound->codec && fsound->codec->flush)
-    return fsound->codec->flush (fsound);
-
-  return 0;
-}
-
-int
-fish_sound_reset (FishSound * fsound)
-{
-  if (fsound == NULL) return -1;
-
-  if (fsound->codec && fsound->codec->reset)
-    return fsound->codec->reset (fsound);
-
-  return 0;
-}
-
-FishSound *
-fish_sound_delete (FishSound * fsound)
-{
-  if (fsound == NULL) return NULL;
-
-  if (fsound->codec && fsound->codec->del)
-    fsound->codec->del (fsound);
-
-  fs_free (fsound->codec);
-
-  fish_sound_comments_free (fsound);
-
-  fs_free (fsound);
-
-  return NULL;
-}
-
-int
-fish_sound_command (FishSound * fsound, int command, void * data, int datasize)
-{
-  FishSoundInfo * fsinfo = (FishSoundInfo *)data;
-  int * pi = (int *)data;
-
-  if (fsound == NULL) return -1;
-
-  switch (command) {
-  case FISH_SOUND_GET_INFO:
-    memcpy (fsinfo, &fsound->info, sizeof (FishSoundInfo));
-    break;
-  case FISH_SOUND_GET_INTERLEAVE:
-    *pi = fsound->interleave;
-    break;
-  case FISH_SOUND_SET_INTERLEAVE:
-    fsound->interleave = (*pi ? 1 : 0);
-    break;
-  default:
-    if (fsound->codec && fsound->codec->command)
-      return fsound->codec->command (fsound, command, data, datasize);
-    break;
-  }
-
-  return 0;
-}
-
-int
-fish_sound_get_interleave (FishSound * fsound)
-{
-  if (fsound == NULL) return -1;
-
-  return fsound->interleave;
-}
-
-#ifndef FS_DISABLE_DEPRECATED
-int
-fish_sound_set_interleave (FishSound * fsound, int interleave)
-{
-  if (fsound == NULL) return -1;
-
-  fsound->interleave = (interleave ? 1 : 0);
-
-  return 0;
-}
-#endif
-
-long
-fish_sound_get_frameno (FishSound * fsound)
-{
-  if (fsound == NULL) return -1L;
-
-  return fsound->frameno;
-}
-
-int
-fish_sound_set_frameno (FishSound * fsound, long frameno)
-{
-  if (fsound == NULL) return -1;
-
-  fsound->frameno = frameno;
-
-  return 0;
-}
-
-int
-fish_sound_prepare_truncation (FishSound * fsound, long next_granulepos,
-			       int next_eos)
-{
-  if (fsound == NULL) return -1;
-
-  fsound->next_granulepos = next_granulepos;
-  fsound->next_eos = next_eos;
-
-  return 0;
-}
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fishsound_comments.c
+++ /dev/null
@@ -1,654 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h> /* ULONG_MAX */
-#ifndef WIN32
-#include <strings.h>
-#endif
-
-#include "private.h"
-
-/*#define DEBUG*/
-#include "debug.h"
-
-/* Ensure comment vector length can be expressed in 32 bits
- * including space for the trailing NUL */
-#define MAX_COMMENT_LENGTH 0xFFFFFFFE
-#define fs_comment_clamp(c) MIN((c),MAX_COMMENT_LENGTH)
-
-static size_t
-fs_comment_len (const char * s)
-{
-  size_t len;
-
-  if (s == NULL) return 0;
-
-  len = strlen (s);
-  return fs_comment_clamp(len);
-}
-
-static char *
-fs_strdup (const char * s)
-{
-  char * ret;
-  if (s == NULL) return NULL;
-  ret = fs_malloc (fs_comment_len(s) + 1);
-  if (ret == NULL) return NULL;
-  return strcpy (ret, s);
-}
-
-static char *
-fs_strdup_len (const char * s, size_t len)
-{
-  char * ret;
-  if (s == NULL) return NULL;
-  if (len == 0) return NULL;
-  len = fs_comment_clamp(len);
-  ret = fs_malloc (len + 1);
-  if (ret == NULL) return NULL;
-  if (strncpy (ret, s, len) == NULL) {
-    fs_free (ret);
-    return NULL;
-  }
-
-  ret[len] = '\0';
-  return ret;
-}
-
-static char *
-fs_index_len (const char * s, char c, int len)
-{
-  int i;
-
-  for (i = 0; *s && i < len; i++, s++) {
-    if (*s == c) return (char *)s;
-  }
-
-  if (i < len) return (char *)s;
-
-  return NULL;
-}
-
-/*                 
- Comments will be stored in the Vorbis style.            
- It is describled in the "Structure" section of
-    http://www.xiph.org/ogg/vorbis/doc/v-comment.html
-
-The comment header is decoded as follows:
-  1) [vendor_length] = read an unsigned integer of 32 bits
-  2) [vendor_string] = read a UTF-8 vector as [vendor_length] octets
-  3) [user_comment_list_length] = read an unsigned integer of 32 bits
-  4) iterate [user_comment_list_length] times {
-     5) [length] = read an unsigned integer of 32 bits
-     6) this iteration's user comment = read a UTF-8 vector as [length] octets
-     }
-  7) [framing_bit] = read a single bit as boolean
-  8) if ( [framing_bit]  unset or end of packet ) then ERROR
-  9) done.
-
-  If you have troubles, please write to ymnk@jcraft.com.
- */
-
-#define readint(buf, base) (((buf[base+3]<<24)&0xff000000)| \
-                           ((buf[base+2]<<16)&0xff0000)| \
-                           ((buf[base+1]<<8)&0xff00)| \
-  	           	    (buf[base]&0xff))
-#define writeint(buf, base, val) do{ buf[base+3]=((val)>>24)&0xff; \
-                                     buf[base+2]=((val)>>16)&0xff; \
-                                     buf[base+1]=((val)>>8)&0xff; \
-                                     buf[base]=(val)&0xff; \
-                                 }while(0)
-
-static int
-fs_comment_validate_byname (const char * name, const char * value)
-{
-  const char * c;
-
-  if (!name || !value) return 0;
-
-  for (c = name; *c; c++) {
-    if (*c < 0x20 || *c > 0x7D || *c == 0x3D) {
-      debug_printf (1, "XXX char %c in %s invalid", *c, name);
-      return 0;
-    }
-  }
-
-  /* XXX: we really should validate value as UTF-8 here, but ... */
-
-  return 1;
-}
-
-static FishSoundComment *
-fs_comment_new (const char * name, const char * value)
-{
-  FishSoundComment * comment;
-
-  if (!fs_comment_validate_byname (name, value)) return NULL;
-  /* Ensures that name != NULL, value != NULL, and validates strings */
-
-  comment = fs_malloc (sizeof (FishSoundComment));
-  if (comment == NULL) return NULL;
-
-  comment->name = fs_strdup (name);
-  if (comment->name == NULL) {
-    fs_free (comment);
-    return NULL;
-  }
-
-  comment->value = fs_strdup (value);
-  if (comment->value == NULL) {
-    fs_free (comment->name);
-    fs_free (comment);
-    return NULL;
-  }
-
-  return comment;
-}
-
-static void
-fs_comment_free (FishSoundComment * comment)
-{
-  if (!comment) return;
-  if (comment->name) fs_free (comment->name);
-  if (comment->value) fs_free (comment->value);
-  fs_free (comment);
-}
-
-static int
-fs_comment_cmp (const FishSoundComment * comment1, const FishSoundComment * comment2)
-{
-  if (comment1 == comment2) return 1;
-  if (!comment1 || !comment2) return 0;
-
-  if (strcasecmp (comment1->name, comment2->name)) return 0;
-  if (strcmp (comment1->value, comment2->value)) return 0;
-
-  return 1;
-}
-
-int
-fish_sound_comment_set_vendor (FishSound * fsound, const char * vendor_string)
-{
-  if (fsound == NULL) return FISH_SOUND_ERR_BAD;
-
-  if (fsound->vendor) fs_free (fsound->vendor);
-
-  if ((fsound->vendor = fs_strdup (vendor_string)) == NULL)
-    return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-  return 0;
-}
-
-/* Public API */
-
-const char *
-fish_sound_comment_get_vendor (FishSound * fsound)
-{
-  if (fsound == NULL) return NULL;
-
-  return fsound->vendor;
-}
-
-const FishSoundComment *
-fish_sound_comment_first (FishSound * fsound)
-{
-  if (fsound == NULL) return NULL;
-
-  return fs_vector_nth (fsound->comments, 0);
-}
-
-const FishSoundComment *
-fish_sound_comment_first_byname (FishSound * fsound, char * name)
-{
-  FishSoundComment * comment;
-  int i;
-
-  if (fsound == NULL) return NULL;
-
-  if (name == NULL) return fs_vector_nth (fsound->comments, 0);
-
-  if (!fs_comment_validate_byname (name, ""))
-    return NULL;
-  
-  for (i = 0; i < fs_vector_size (fsound->comments); i++) {
-    comment = (FishSoundComment *) fs_vector_nth (fsound->comments, i);
-    if (comment->name && !strcasecmp (name, comment->name))
-      return comment;
-  }
-
-  return NULL;
-}
-
-const FishSoundComment *
-fish_sound_comment_next (FishSound * fsound, const FishSoundComment * comment)
-{
-  int i;
-
-  if (fsound == NULL || comment == NULL) return NULL;
-
-  i = fs_vector_find_index (fsound->comments, comment);
-
-  return fs_vector_nth (fsound->comments, i+1);
-}
-
-const FishSoundComment *
-fish_sound_comment_next_byname (FishSound * fsound,
-				const FishSoundComment * comment)
-{
-  FishSoundComment * v_comment;
-  int i;
-
-  if (fsound == NULL || comment == NULL) return NULL;
-
-  i = fs_vector_find_index (fsound->comments, comment);
-
-  for (i++; i < fs_vector_size (fsound->comments); i++) {
-    v_comment = (FishSoundComment *) fs_vector_nth (fsound->comments, i);
-    if (v_comment->name && !strcasecmp (comment->name, v_comment->name))
-      return v_comment;
-  }
-
-  return NULL;
-}
-
-#define _fs_comment_add(f,c) fs_vector_insert ((f)->comments, (c))
-
-int
-fish_sound_comment_add (FishSound * fsound, FishSoundComment * comment)
-{
-#if FS_ENCODE
-  FishSoundComment * new_comment;
-#endif
-
-  if (fsound == NULL) return FISH_SOUND_ERR_BAD;
-
-  if (fsound->mode != FISH_SOUND_ENCODE)
-    return FISH_SOUND_ERR_INVALID;
-
-#if FS_ENCODE
-  if (!fs_comment_validate_byname (comment->name, comment->value))
-    return FISH_SOUND_ERR_COMMENT_INVALID;
-
-  if ((new_comment = fs_comment_new (comment->name, comment->value)) == NULL)
-    return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-  if (_fs_comment_add (fsound, new_comment) == NULL)
-    return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-  return FISH_SOUND_OK;
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-}
-
-int
-fish_sound_comment_add_byname (FishSound * fsound, const char * name,
-			       const char * value)
-{
-#if FS_ENCODE
-  FishSoundComment * comment;
-#endif
-
-  if (fsound == NULL) return FISH_SOUND_ERR_BAD;
-
-  if (fsound->mode != FISH_SOUND_ENCODE)
-    return FISH_SOUND_ERR_INVALID;
-
-#if FS_ENCODE
-  if (!fs_comment_validate_byname (name, value))
-    return FISH_SOUND_ERR_COMMENT_INVALID;
-
-  if ((comment = fs_comment_new (name, value)) == NULL)
-    return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-  if (_fs_comment_add (fsound, comment) == NULL)
-    return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-  return FISH_SOUND_OK;
-
-  return 0;
-
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-}
-
-int
-fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment)
-{
-#if FS_ENCODE
-  FishSoundComment * v_comment;
-#endif
-
-  if (fsound == NULL) return FISH_SOUND_ERR_BAD;
-
-  if (fsound->mode != FISH_SOUND_ENCODE)
-    return FISH_SOUND_ERR_INVALID;
-
-#if FS_ENCODE
-
-  v_comment = fs_vector_find (fsound->comments, comment);
-
-  if (v_comment == NULL) return 0;
-
-  fs_vector_remove (fsound->comments, v_comment);
-  fs_comment_free (v_comment);
-
-  return 1;
-
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-}
-
-int
-fish_sound_comment_remove_byname (FishSound * fsound, char * name)
-{
-#if FS_ENCODE
-  FishSoundComment * comment;
-  int i;
-#endif
-  int ret = 0;
-
-  if (fsound == NULL) return FISH_SOUND_ERR_BAD;
-
-  if (fsound->mode != FISH_SOUND_ENCODE)
-    return FISH_SOUND_ERR_INVALID;
-
-#if FS_ENCODE
-  for (i = 0; i < fs_vector_size (fsound->comments); i++) {
-    comment = (FishSoundComment *) fs_vector_nth (fsound->comments, i);
-    if (!strcasecmp (name, comment->name)) {
-      fish_sound_comment_remove (fsound, comment);
-      i--;
-      ret++;
-    }
-  }
-
-  return ret;
-
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-}
-
-/* Internal API */
-int
-fish_sound_comments_init (FishSound * fsound)
-{
-  fsound->vendor = NULL;
-  fsound->comments = fs_vector_new ((FishSoundCmpFunc) fs_comment_cmp);
-
-  return 0;
-}
-
-int
-fish_sound_comments_free (FishSound * fsound)
-{
-  fs_vector_foreach (fsound->comments, (FishSoundFunc)fs_comment_free);
-  fs_vector_delete (fsound->comments);
-  fsound->comments = NULL;
-
-  if (fsound->vendor) fs_free (fsound->vendor);
-  fsound->vendor = NULL;
-
-  return 0;
-}
-
-int
-fish_sound_comments_decode (FishSound * fsound, unsigned char * comments,
-			    long length)
-{
-   char *c= (char *)comments;
-   int i, nb_fields, n;
-   size_t len;
-   char *end;
-   char * name, * value, * nvalue = NULL;
-   FishSoundComment * comment;
-   
-   if (length<8)
-      return -1;
-
-   end = c+length;
-   len=readint(c, 0);
-
-   c+=4;
-   if (len > (unsigned long) length - 4) return -1;
-
-   /* Vendor */
-   if (len > 0) {
-     if ((nvalue = fs_strdup_len (c, len)) == NULL)
-       return FISH_SOUND_ERR_OUT_OF_MEMORY;
-     if (fish_sound_comment_set_vendor (fsound, nvalue) == FISH_SOUND_ERR_OUT_OF_MEMORY) {
-       fs_free (nvalue);
-       return FISH_SOUND_ERR_OUT_OF_MEMORY;
-     }
-
-     fs_free (nvalue);
-   }
-#ifdef DEBUG
-   fwrite(c, 1, len, stderr); fputc ('\n', stderr);
-#endif
-   c+=len;
-
-   if (c+4>end) return -1;
-
-   /* This value gets checked effectively by the 'for' condition
-      and the checks within the loop for c running off the end.  */
-   nb_fields=readint(c, 0);
-   debug_printf (1, "%d comments", nb_fields);
-
-   c+=4;
-   for (i=0;i<nb_fields;i++)
-   {
-      if (c+4>end) return -1;
-
-      len=readint(c, 0);
-      debug_printf (1, "[%d] len %d\n", i, len);
-
-      c+=4;
-      if (len > (unsigned long) (end-c)) return -1;
-
-      name = c;
-      value = fs_index_len (c, '=', len);
-      n = 0;
-      if (value) {
-	*value = '\0';
-	value++;
-	n = c+len - value;
-	
-      }
-      if (n) {
-	if ((nvalue = fs_strdup_len (value, n)) == NULL)
-          return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-	debug_printf (1, "%s -> %s (length %d)", name, nvalue, n);
-
-	if ((comment = fs_comment_new (name, nvalue)) == NULL) {
-	  fs_free (nvalue);
-          return FISH_SOUND_ERR_OUT_OF_MEMORY;
-	}
-
-	if (_fs_comment_add (fsound, comment) == NULL) {
-	  fs_free (nvalue);
-          return FISH_SOUND_ERR_OUT_OF_MEMORY;
-	}
-
-	fs_free (nvalue);
-      } else if (len > 0) {
-        debug_printf (1, "[%d] %s (no value)", i, name, len);
-
-	if ((nvalue = fs_strdup_len (name, len)) == NULL)
-          return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-	if ((comment = fs_comment_new (nvalue, "")) == NULL) {
-	  fs_free (nvalue);
-          return FISH_SOUND_ERR_OUT_OF_MEMORY;
-	}
-
-	if (_fs_comment_add (fsound, comment) == NULL) {
-	  fs_free (nvalue);
-          return FISH_SOUND_ERR_OUT_OF_MEMORY;
-	}
-
-	fs_free (nvalue);
-      }
-
-      c+=len;
-   }
-
-   debug_printf (1, "OUT");
-
-   return FISH_SOUND_OK;
-}
-
-/*
- * Pre-condition: at least one of accum, delta are non-zero,
- * ie. don't call accum_length (0, 0);
- * \retval 0 Failure: integer overflow
- */
-static unsigned long
-accum_length (unsigned long * accum, unsigned long delta)
-{
-  /* Pre-condition: don't call accum_length (0, 0) */
-  if (*accum == 0 && delta == 0)
-    return 0;
-
-  /* Check for integer overflow */
-  if (delta > ULONG_MAX - (*accum))
-    return 0;
-
-  *accum += delta;
-
-  return *accum;
-}
-
-long
-fish_sound_comments_encode (FishSound * fsound, unsigned char * buf,
-			    long length)
-{
-  char * c = (char *)buf;
-  const FishSoundComment * comment;
-  int nb_fields = 0, vendor_length = 0;
-  unsigned long actual_length = 0, remaining = length, field_length;
-
-  /* Vendor string */
-  if (fsound->vendor)
-    vendor_length = fs_comment_len (fsound->vendor);
-  if (accum_length (&actual_length, 4 + vendor_length) == 0)
-    return 0;
-
-  /* user comment list length */
-  if (accum_length (&actual_length, 4) == 0)
-    return 0;
-
-  for (comment = fish_sound_comment_first (fsound); comment;
-       comment = fish_sound_comment_next (fsound, comment)) {
-    /* [size]"name" */
-    if (accum_length (&actual_length, 4 + fs_comment_len (comment->name)) == 0)
-      return 0;
-    if (comment->value) {
-      /* "=value" */
-      if (accum_length (&actual_length, 1 + fs_comment_len (comment->value)) == 0)
-        return 0;
-    }
-
-    debug_printf (1, "%s = %s", comment->name, comment->value);
-
-    nb_fields++;
-  }
-
-  /* framing bit */
-  if (accum_length (&actual_length, 1) == 0)
-    return 0;
-
-  /* NB. actual_length is not modified from here onwards */
-
-  if (buf == NULL) return actual_length;
-
-  remaining -= 4;
-  if (remaining <= 0) return actual_length;
-  writeint (c, 0, vendor_length);
-  c += 4;
-
-  if (fsound->vendor) {
-    field_length = fs_comment_len (fsound->vendor);
-    memcpy (c, fsound->vendor, MIN (field_length, remaining));
-    c += field_length; remaining -= field_length;
-    if (remaining <= 0) return actual_length;
-  }
-
-  remaining -= 4;
-  if (remaining <= 0) return actual_length;
-  writeint (c, 0, nb_fields);
-  c += 4;
-
-  for (comment = fish_sound_comment_first (fsound); comment;
-       comment = fish_sound_comment_next (fsound, comment)) {
-
-    field_length = fs_comment_len (comment->name);     /* [size]"name" */
-    if (comment->value)
-      field_length += 1 + fs_comment_len (comment->value); /* "=value" */
-
-    remaining -= 4;
-    if (remaining <= 0) return actual_length;
-    writeint (c, 0, field_length);
-    c += 4;
-
-    field_length = fs_comment_len (comment->name);
-    memcpy (c, comment->name, MIN (field_length, remaining));
-    c += field_length; remaining -= field_length;
-    if (remaining <= 0) return actual_length;
-
-    if (comment->value) {
-      remaining --;
-      if (remaining <= 0) return actual_length;
-      *c = '=';
-      c++;
-
-      field_length = fs_comment_len (comment->value);
-      memcpy (c, comment->value, MIN (field_length, remaining));
-      c += field_length; remaining -= field_length;
-      if (remaining <= 0) return actual_length;
-    }
-  }
-
-  if (remaining <= 0) return actual_length;
-  *c = 0x01;
-
-  return actual_length;
-}
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fishsound_decode.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include "private.h"
-
-static int
-fs_decode_update (FishSound * fsound, int interleave)
-{
-  int ret = 0;
-
-  if (fsound->codec && fsound->codec->update)
-    ret = fsound->codec->update (fsound, interleave);
-
-  if (ret >= 0) {
-    fsound->interleave = interleave;
-  }
-
-  return ret;
-}
-
-int fish_sound_set_decoded_float (FishSound * fsound,
-				  FishSoundDecoded_Float decoded,
-				  void * user_data)
-{
-  int ret = 0;
-
-  if (fsound == NULL) return FISH_SOUND_ERR_BAD;
-
-#if FS_DECODE
-  ret = fs_decode_update (fsound, 0);
-
-  if (ret >= 0) {
-    fsound->callback.decoded_float = decoded;
-    fsound->user_data = user_data;
-  }
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-
-  return ret;
-}
-
-int fish_sound_set_decoded_float_ilv (FishSound * fsound,
-				      FishSoundDecoded_FloatIlv decoded,
-				      void * user_data)
-{
-  int ret = 0;
-
-  if (fsound == NULL) return FISH_SOUND_ERR_BAD;
-
-#if FS_DECODE
-  ret = fs_decode_update (fsound, 1);
-
-  if (ret >= 0) {
-    fsound->callback.decoded_float_ilv = decoded;
-    fsound->user_data = user_data;
-  }
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-
-  return ret;
-}
-
-long
-fish_sound_decode (FishSound * fsound, unsigned char * buf, long bytes)
-{
-  int format;
-
-  if (fsound == NULL) return FISH_SOUND_ERR_BAD;
-
-#if FS_DECODE
-  if (fsound->info.format == FISH_SOUND_UNKNOWN) {
-    format = fish_sound_identify (buf, bytes);
-    if (format == FISH_SOUND_UNKNOWN) return -1;
-
-    fish_sound_set_format (fsound, format);
-  }
-
-  /*printf ("format: %s\n", fsound->codec->format->name);*/
-
-  if (fsound->codec && fsound->codec->decode)
-    return fsound->codec->decode (fsound, buf, bytes);
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-
-  return 0;
-}
-
-
-/* DEPRECATED */
-int fish_sound_set_decoded_callback (FishSound * fsound,
-				     FishSoundDecoded_Float decoded,
-				     void * user_data)
-{
-  if (fsound == NULL) return -1;
-
-  return fsound->interleave ?
-    fish_sound_set_decoded_float_ilv (fsound, decoded, user_data) :
-    fish_sound_set_decoded_float (fsound, decoded, user_data);
-}
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fishsound_encode.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include "private.h"
-
-int
-fish_sound_set_encoded_callback (FishSound * fsound,
-				 FishSoundEncoded encoded,
-				 void * user_data)
-{
-  if (fsound == NULL) return -1;
-
-#if FS_ENCODE
-  fsound->callback.encoded = (void *)encoded;
-  fsound->user_data = user_data;
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-
-  return 0;
-}
-
-long fish_sound_encode_float (FishSound * fsound, float * pcm[], long frames)
-{
-  if (fsound == NULL) return -1;
-
-#if FS_ENCODE
-  if (fsound->codec && fsound->codec->encode_f)
-    return fsound->codec->encode_f (fsound, pcm, frames);
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-
-  return 0;
-}
-
-long fish_sound_encode_float_ilv (FishSound * fsound, float ** pcm,
-				  long frames)
-{
-  if (fsound == NULL) return -1;
-
-#if FS_ENCODE
-  if (fsound->codec && fsound->codec->encode_f_ilv)
-    return fsound->codec->encode_f_ilv (fsound, pcm, frames);
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-
-  return 0;
-}
-
-#ifndef FS_DISABLE_DEPRECATED
-long
-fish_sound_encode (FishSound * fsound, float ** pcm, long frames)
-{
-  if (fsound == NULL) return -1;
-
-#if FS_ENCODE
-  if (fsound->interleave) {
-    if (fsound->codec && fsound->codec->encode_f_ilv)
-      return fsound->codec->encode_f_ilv (fsound, pcm, frames);
-  } else {
-    if (fsound->codec && fsound->codec->encode_f)
-      return fsound->codec->encode_f (fsound, pcm, frames);
-  }
-#else
-  return FISH_SOUND_ERR_DISABLED;
-#endif
-
-  return 0;
-}
-#endif /* DEPRECATED */
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fishsound_flac.c
+++ /dev/null
@@ -1,851 +0,0 @@
-/*
-   Copyright (C) 2007 Annodex Association
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of the Annodex Association nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ASSOCIATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/* Original patches by Tobias Gehrig, 2005
- * http://www.annodex.net/software/libfishsound/libfishsound-flac/
- *
- * The Ogg FLAC mapping is documented in:
- * http://flac.sourceforge.net/ogg_mapping.html
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "private.h"
-#include "convert.h"
-
-#define DEBUG_VERBOSE 2
-/* #define DEBUG */
-/* #define DEBUG_LEVEL DEBUG_VERBOSE */
-#include "debug.h"
-
-#if HAVE_FLAC
-
-#include "FLAC/all.h"
-
-#define BITS_PER_SAMPLE 24
-
-typedef struct _FishSoundFlacInfo {
-  FLAC__StreamDecoder *fsd;
-  FLAC__StreamEncoder *fse;
-  unsigned char * buffer;
-  char header;
-  long bufferlength;
-  unsigned long packetno;
-  struct {
-    unsigned char major, minor;
-  } version;
-  unsigned short header_packets;
-  void * ipcm;
-#if FS_DECODE
-  float * pcm_out[8]; /* non-interleaved pcm, output (decode only);
-                       * FLAC does max 8 channels */
-#endif
-#if FS_ENCODE
-  FLAC__StreamMetadata * enc_vc_metadata; /* FLAC metadata structure for
-                                           * vorbiscomments (encode only) */
-#endif
-} FishSoundFlacInfo;
-
-int
-fish_sound_flac_identify (unsigned char * buf, long bytes)
-{
-  if (bytes < 8) return FISH_SOUND_UNKNOWN;
-  if (buf[0] != 0x7f) return FISH_SOUND_UNKNOWN;
-  if (!strncmp ((char *)buf+1, "FLAC", 4)) {
-    debug_printf(1, "flac found");
-    /* if only a short buffer was passed, do a weak identify */
-    if (bytes == 8) return FISH_SOUND_FLAC;
-
-    /* otherwise, look for the fLaC header preceding STREAMINFO */
-    if (!strncmp ((char *)buf+9, "fLaC", 4)) {
-      return FISH_SOUND_FLAC;
-    }
-  }
-
-  return FISH_SOUND_UNKNOWN;
-}
-
-static int
-fs_flac_command (FishSound * fsound, int command, void * data, int datasize)
-{
-  return 0;
-}
-
-#if FS_DECODE
-static FLAC__StreamDecoderReadStatus
-fs_flac_read_callback(const FLAC__StreamDecoder *decoder,
-                      FLAC__byte buffer[], unsigned *bytes,
-                      void *client_data)
-{
-  FishSound* fsound = (FishSound*)client_data;
-  FishSoundFlacInfo* fi = (FishSoundFlacInfo *)fsound->codec_data;
-  debug_printf(DEBUG_VERBOSE, "fs_flac_read_callback: IN");
-  if (fi->bufferlength > *bytes) {
-    debug_printf(1, "too much data");
-    return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
-  } else if (fi->bufferlength < 1) {
-    debug_printf(1, "no data, %ld",fi->bufferlength);
-    return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
-  }
-
-  memcpy(buffer, fi->buffer, fi->bufferlength);
-  *bytes = fi->bufferlength;
-  fi->bufferlength = 0;
-  return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
-}
-
-static FLAC__StreamDecoderWriteStatus
-fs_flac_write_callback(const FLAC__StreamDecoder *decoder,
-                       const FLAC__Frame *frame,
-                       const FLAC__int32 * const buffer[],
-                       void *client_data)
-{
-  FishSound* fsound = (FishSound*)client_data;
-  FishSoundFlacInfo* fi = (FishSoundFlacInfo *)fsound->codec_data;
-  int i, j, channels, blocksize, offset;
-  float * ipcm;
-
-  channels = frame->header.channels;
-  blocksize = frame->header.blocksize;
-
-  debug_printf(DEBUG_VERBOSE, "IN, blocksize %d", blocksize);
-
-  fsound->frameno += blocksize;
-
-  if (fsound->callback.decoded_float) {
-    float norm = 1.0 / ((1 << (frame->header.bits_per_sample - 1)));
-
-    if (fsound->interleave) {
-	FishSoundDecoded_FloatIlv dfi;
-	float* retpcm;
-
-        if ((ipcm = realloc(fi->ipcm, sizeof(float) * channels * blocksize)) == NULL)
-          return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
-
-	fi->ipcm = ipcm;
-	retpcm = (float*) fi->ipcm;
-	for (i = 0; i < blocksize; i++) {
-	  offset = i * channels;
-	  for (j = 0; j < channels; j++)
-	    retpcm[offset + j] = buffer[j][i] * norm;
-	}
-	dfi = (FishSoundDecoded_FloatIlv)fsound->callback.decoded_float_ilv;
-	dfi (fsound, (float **)retpcm, blocksize, fsound->user_data);
-      } else {
-	FishSoundDecoded_Float df;
-        FLAC__int32 * s = (FLAC__int32 *)buffer; /* de-interleave source */
-	float *d; /* de-interleave dest */
-
-        for (j = 0; j < channels; j++) {
-          if ((ipcm = realloc(fi->pcm_out[j], sizeof(float) * blocksize)) == NULL)
-            return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
-	  fi->pcm_out[j] = ipcm;
-        }
-	for (i = 0; i < blocksize; i++)
-	  for (j = 0; j < channels; j++) {
-	    d = fi->pcm_out[j];
-	    d[i] = s[i*channels + j] * norm;
-	  }
-      	df = (FishSoundDecoded_Float)fsound->callback.decoded_float;
-	df (fsound, fi->pcm_out, blocksize, fsound->user_data);
-    }
-  }
-  return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
-}
-
-static void
-fs_flac_meta_callback(const FLAC__StreamDecoder *decoder,
-                      const FLAC__StreamMetadata *metadata,
-                      void *client_data)
-{
-  FishSound* fsound = (FishSound*)client_data;
-  /*  FishSoundFlacInfo* fi = (FishSoundFlacInfo *)fsound->codec_data; */
-  debug_printf(1, "IN");
-
-  switch (metadata->type) {
-  case FLAC__METADATA_TYPE_STREAMINFO:
-    debug_printf(1, "channels %d, samplerate %d",
-           metadata->data.stream_info.channels,
-           metadata->data.stream_info.sample_rate);
-    fsound->info.channels = metadata->data.stream_info.channels;
-    fsound->info.samplerate = metadata->data.stream_info.sample_rate;
-    break;
-  default:
-    debug_printf(1, "not yet implemented type");
-    break;
-  }
-}
-
-static void
-fs_flac_error_callback(const FLAC__StreamDecoder *decoder,
-                       FLAC__StreamDecoderErrorStatus status,
-                       void *client_data)
-{
-  debug_printf(1, "IN");
-  fprintf(stderr, "FLAC ERROR: %s\n", FLAC__StreamDecoderErrorStatusString[status]);
-}
-#endif
-#if FS_DECODE
-static void*
-fs_flac_decode_header (FishSound * fsound, unsigned char *buf, long bytes)
-{
-  FishSoundFlacInfo *fi = fsound->codec_data;
-
-  if (bytes < 9) return NULL;
-  if (buf[0] != 0x7f) return NULL;
-  if (strncmp((char *)buf+1, "FLAC", 4) != 0) return NULL;
-  fi->version.major = buf[5];
-  fi->version.minor = buf[6];
-  debug_printf(1, "Flac Ogg Mapping Version: %d.%d",
-         fi->version.major, fi->version.minor);
-  fi->header_packets = buf[7] << 8 | buf[8];
-  debug_printf(1, "Number of Header packets: %d", fi->header_packets);
-
-  if ((fi->fsd = FLAC__stream_decoder_new()) == NULL) {
-    debug_printf (1, "unable to create new stream_decoder");
-    return NULL;
-  }
-
-#if defined (HAVE_FLAC_1_1_2)
-  FLAC__stream_decoder_set_read_callback(fi->fsd, fs_flac_read_callback);
-  FLAC__stream_decoder_set_write_callback(fi->fsd, fs_flac_write_callback);
-  FLAC__stream_decoder_set_metadata_callback(fi->fsd, fs_flac_meta_callback);
-  FLAC__stream_decoder_set_error_callback(fi->fsd, fs_flac_error_callback);
-  FLAC__stream_decoder_set_client_data(fi->fsd, fsound);
-
-  if (FLAC__stream_decoder_init(fi->fsd) != FLAC__STREAM_DECODER_SEARCH_FOR_METADATA)
-    return NULL;
-#elif defined (HAVE_FLAC_1_1_3)
-  if (FLAC__stream_decoder_init_stream
-      (fi->fsd,
-       fs_flac_read_callback,
-       NULL, /* seek callback */
-       NULL, /* tell callback */
-       NULL, /* length callback */
-       NULL, /* EOF callback */
-       fs_flac_write_callback,
-       fs_flac_meta_callback,
-       fs_flac_error_callback,
-       fsound
-       ) != FLAC__STREAM_DECODER_SEARCH_FOR_METADATA)
-     return NULL;
-#endif
-
-  return fi->fsd;
-}
-
-static long
-fs_flac_decode (FishSound * fsound, unsigned char * buf, long bytes)
-{
-  FishSoundFlacInfo *fi = fsound->codec_data;
-
-  debug_printf(DEBUG_VERBOSE, "IN, fi->packetno = %ld", fi->packetno);
-
-  if (fi->packetno == 0) {
-    if (fs_flac_decode_header (fsound, buf, bytes) == NULL) {
-      debug_printf(1, "Error reading header");
-      return -1;
-    }
-    if ((fi->buffer = fs_malloc(sizeof(unsigned char)*bytes)) == NULL)
-      return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-    memcpy(fi->buffer, buf+9, bytes-9);
-    fi->bufferlength = bytes-9;
-  }
-  else if (fi->packetno <= fi->header_packets){
-    unsigned char* tmp;
-    debug_printf(1, "handling header (fi->header_packets = %d)",
-                 fi->header_packets);
-
-#if 0
-    if (fi->packetno ==  1) fish_sound_comments_decode (fsound, buf, bytes);
-#endif
-
-    if ((buf[0] & 0x7) == 4) {
-      int len = (buf[1]<<16) + (buf[2]<<8) + buf[3];
-      debug_printf (1, "got vorbiscomments len %d", len);
-
-      if (fish_sound_comments_decode (fsound, buf+4, len) == FISH_SOUND_ERR_OUT_OF_MEMORY) {
-        fi->packetno++;
-        return FISH_SOUND_ERR_OUT_OF_MEMORY;
-      }
-    }
-
-    if ((tmp = fs_malloc(sizeof(unsigned char)*(fi->bufferlength+bytes))) == NULL)
-      return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-    memcpy(tmp, fi->buffer, fi->bufferlength);
-    memcpy(tmp+fi->bufferlength, buf, bytes);
-    fi->bufferlength += bytes;
-    fs_free(fi->buffer);
-    fi->buffer = tmp;
-    if (fi->packetno == fi->header_packets) {
-      if (FLAC__stream_decoder_process_until_end_of_metadata(fi->fsd) == false) {
-        goto dec_err;
-      }
-      fs_free(fi->buffer);
-    }
-  } else {
-    fi->buffer = buf;
-    fi->bufferlength = bytes;
-    if (FLAC__stream_decoder_process_single(fi->fsd) == false) {
-      goto dec_err;
-    }
-  }
-  fi->packetno++;
-
-  return 0;
-
-dec_err:
-    switch (FLAC__stream_decoder_get_state(fi->fsd)) {
-    case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
-      return FISH_SOUND_ERR_OUT_OF_MEMORY;
-    default:
-      return FISH_SOUND_ERR_GENERIC;
-    }
-}
-#else /* !FS_DECODE */
-
-#define fs_flac_decode NULL
-
-#endif
-
-
-#if FS_ENCODE
-static FLAC__StreamEncoderWriteStatus
-fs_flac_enc_write_callback(const FLAC__StreamEncoder *encoder,
-                           const FLAC__byte buffer[], unsigned bytes,
-                           unsigned samples, unsigned current_frame,
-                           void *client_data)
-{
-  FishSound* fsound = (FishSound*)client_data;
-  FishSoundFlacInfo *fi = fsound->codec_data;
-
-  debug_printf(1, "IN");
-  debug_printf(1, "bytes: %d, samples: %d", bytes, samples);
-
-  if (fsound->callback.encoded) {
-    FishSoundEncoded encoded = (FishSoundEncoded) fsound->callback.encoded;
-    if (fi->packetno == 0 && fi->header <= 1) {
-      if (fi->header == 0) {
-        /* libFLAC has called us with data containing the normal fLaC header
-         * and a STREAMINFO block. Prepend the FLAC Ogg mapping header,
-         * as described in http://flac.sourceforge.net/ogg_mapping.html.
-         */
-        debug_printf(1, "generating FLAC header packet: %c%c%c%c",
-                     buffer[0], buffer[1], buffer[2], buffer[3]);
-
-	if ((fi->buffer = (unsigned char*)fs_malloc(sizeof(unsigned char)*(bytes+9))) == NULL)
-          return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
-
-	fi->buffer[0] = 0x7f;
-	fi->buffer[1] = 0x46; /* 'F' */
-	fi->buffer[2] = 0x4c; /* 'L' */
-	fi->buffer[3] = 0x41; /* 'A' */
-	fi->buffer[4] = 0x43; /* 'C' */
-	fi->buffer[5] = 1;    /* Version major generated by this file */
-	fi->buffer[6] = 0;    /* Version minor generated by this file */
-	fi->buffer[7] = 0;    /* MSB(be): Nr. other non-audio header packets */
-	fi->buffer[8] = 1;    /* LSB(be): Nr. other non-audio header packets */
-	memcpy (fi->buffer+9, buffer, bytes); /* fLaC header ++ STREAMINFO */
-        fi->bufferlength = bytes+9;
-
-	fi->header++;
-      } else {
-        /* Make a temporary copy of the metadata header to pass to the user
-         * callback.
-         */
-	unsigned char* tmp;
-
-        if ((tmp = (unsigned char*)fs_malloc(sizeof(unsigned char)*(bytes+fi->bufferlength))) == NULL)
-          return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR;
-
-	memcpy (tmp, fi->buffer, fi->bufferlength);
-	memcpy (tmp+fi->bufferlength, buffer, bytes);
-	fs_free(fi->buffer);
-	fi->buffer = tmp;
-	fi->bufferlength += bytes;
-	fi->header++;
-	encoded (fsound, (unsigned char *)fi->buffer, (long)fi->bufferlength,
-		 fsound->user_data);
-      }
-    } else {
-      fsound->frameno += samples;
-      encoded (fsound, (unsigned char *)buffer, (long)bytes,
-	       fsound->user_data);
-    }
-  }
-
-  return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
-}
-
-static void
-fs_flac_enc_meta_callback(const FLAC__StreamEncoder *encoder,
-                          const FLAC__StreamMetadata *metadata,
-                          void *client_data)
-{
-  /* FishSound* fsound = (FishSound*)client_data; */
-  /* FishSoundFlacInfo* fi = (FishSoundFlacInfo *)fsound->codec_data; */
-  debug_printf(1, "IN");
-
-  switch (metadata->type) {
-  case FLAC__METADATA_TYPE_STREAMINFO:
-    debug_printf(1, "channels %d, samplerate %d",
-           metadata->data.stream_info.channels,
-           metadata->data.stream_info.sample_rate);
-    /*
-    fsound->info.channels = metadata->data.stream_info.channels;
-    fsound->info.samplerate = metadata->data.stream_info.sample_rate;
-    */
-    break;
-  default:
-    debug_printf(1, "metadata type not yet implemented");
-    break;
-  }
-
-  return;
-}
-
-/* Create a local alias for an unwieldy type name */
-typedef FLAC__StreamMetadata_VorbisComment_Entry FLAC__VCEntry;
-
-static void
-fs_flac_metadata_free (FLAC__StreamMetadata * metadata)
-{
-  unsigned int i, length;
-  FLAC__VCEntry * comments;
-
-  if (metadata == NULL) return;
-
-  length = metadata->data.vorbis_comment.num_comments;
-  comments = metadata->data.vorbis_comment.comments;
-
-  for (i = 0; i < length; i++) {
-    fs_free (comments[i].entry);
-  }
-
-  fs_free (comments);
-  fs_free (metadata);
-
-  return;
-}
-
-static FLAC__byte *
-fs_flac_encode_vcentry (const FishSoundComment * comment)
-{
-  FLAC__byte * entry;
-  FLAC__uint32 length;
-  size_t name_len=0, value_len=0;
-
-  name_len = strlen(comment->name);
-  length = name_len + 1;
-
-  if (comment->value) {
-    value_len = strlen (comment->value);
-    length += value_len + 1;
-  }
-
-  if ((entry = fs_malloc (length)) == NULL)
-    return NULL;
-
-  /* We assume that comment->name, value are NUL terminated, as they were
-   * produced by our own comments.c */
-  strcpy ((char *)entry, comment->name);
-
-  if (comment->value) {
-    entry[name_len] = '=';
-    strcpy ((char *)&entry[name_len+1], comment->value);
-  }
-
-  entry[length-1] = '\0';
-
-  return entry;
-}
-
-static FLAC__StreamMetadata *
-fs_flac_encode_vorbiscomments (FishSound * fsound)
-{
-  FishSoundFlacInfo * fi = fsound->codec_data;
-  FLAC__StreamMetadata * metadata = NULL;
-  const FishSoundComment * comment;
-  unsigned int i=0, length=0, total_length;
-  FLAC__VCEntry * comments;
-
-  /* libFLAC seems to require us to know the total length of the generated
-   * vorbiscomment packet, even though it will silently generate the
-   * vendor string. Hence, this value was determined by inspection for
-   * the version "reference libFLAC 1.1.2"
-   */
-  total_length = 40;
-
-  /* Count the number of comments */
-  for (comment = fish_sound_comment_first (fsound); comment;
-       comment = fish_sound_comment_next (fsound, comment)) {
-    length++;
-  }
-
-  if (length == 0) return NULL;
-
-  if ((comments = (FLAC__VCEntry *)fs_malloc (sizeof(FLAC__VCEntry) * length)) == NULL)
-    goto encode_vc_oom;
-  
-  for (comment = fish_sound_comment_first (fsound); comment;
-       comment = fish_sound_comment_next (fsound, comment)) {
-    if ((comments[i].entry = fs_flac_encode_vcentry (comment)) == NULL) {
-    }
-    comments[i].length = strlen((char *)comments[i].entry);
-
-    /* In the generated vorbiscomment data, each entry is preceded by a
-     * 32bit length specifier. */
-    total_length += 4 + comments[i].length;
-    i++;
-  }
-
-  if ((metadata = (FLAC__StreamMetadata *) fs_malloc (sizeof (*metadata))) == NULL)
-    goto encode_vc_oom;
-
-  metadata->type = FLAC__METADATA_TYPE_VORBIS_COMMENT;
-  metadata->is_last = true;
-  metadata->length = total_length;
-  /* Don't bother setting the vendor_string, as libFLAC ignores it */
-  metadata->data.vorbis_comment.num_comments = length;
-  metadata->data.vorbis_comment.comments = comments;
-
-  /* Remember the allocated metadata */
-  fi->enc_vc_metadata = metadata;
-
-  return metadata;
-
-encode_vc_oom:
-  if (metadata != NULL)
-    fs_free (metadata);
-
-  /* Unwind allocated comment entries */
-  for (i--; i >= 0; i--) {
-    if (comments[i].entry != NULL)
-      fs_free (comments[i].entry);
-  }
-
-  if (comments != NULL)
-    fs_free (comments);
-
-  return NULL;
-}
-
-static FishSound *
-fs_flac_enc_headers (FishSound * fsound)
-{
-  FishSoundFlacInfo * fi = fsound->codec_data;
-  FLAC__StreamMetadata * metadata;
-
-  fi->fse = FLAC__stream_encoder_new();
-  FLAC__stream_encoder_set_channels(fi->fse, fsound->info.channels);
-  FLAC__stream_encoder_set_sample_rate(fi->fse, fsound->info.samplerate);
-  FLAC__stream_encoder_set_bits_per_sample(fi->fse, BITS_PER_SAMPLE);
-
-#if defined (HAVE_FLAC_1_1_2)
-  FLAC__stream_encoder_set_write_callback(fi->fse, fs_flac_enc_write_callback);
-  FLAC__stream_encoder_set_metadata_callback(fi->fse, fs_flac_enc_meta_callback);
-  FLAC__stream_encoder_set_client_data(fi->fse, fsound);
-#endif
-
-  metadata = fs_flac_encode_vorbiscomments (fsound);
-  if (metadata != NULL)
-    FLAC__stream_encoder_set_metadata (fi->fse, &metadata, 1);
-
-  /* FLAC__stream_encoder_set_total_samples_estimate(fi->fse, ...);*/
-
-#if defined (HAVE_FLAC_1_1_2)
-  if (FLAC__stream_encoder_init(fi->fse) != FLAC__STREAM_ENCODER_OK)
-    return NULL;
-#elif defined (HAVE_FLAC_1_1_3)
-  if (FLAC__stream_encoder_init_stream
-      (fi->fse,
-       fs_flac_enc_write_callback,
-       NULL, /* seek callback */
-       NULL, /* tell callback */
-       fs_flac_enc_meta_callback,
-       fsound
-       ) != FLAC__STREAM_ENCODER_OK)
-     return NULL;
-
-#endif
-
-  return fsound;
-}
-
-static long
-fs_flac_encode_fatal (FishSoundFlacInfo *fi, long err)
-{
-  FLAC__stream_encoder_delete (fi->fse);
-  fi->fse = NULL;
-  return err;
-}
-
-static long
-fs_flac_encode_f (FishSound * fsound, float * pcm[], long frames)
-{
-  FishSoundFlacInfo *fi = fsound->codec_data;
-  FLAC__int32 *buffer, *ipcm;
-  float * p, norm = (1 << (BITS_PER_SAMPLE - 1));
-  long i;
-  int j, channels = fsound->info.channels;
-
-  debug_printf("IN, frames = %ld", frames);
-
-  if ((ipcm = realloc(fi->ipcm, sizeof(FLAC__int32) * channels * frames)) == NULL)
-    return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-  fi->ipcm = ipcm;
-  buffer = (FLAC__int32*) fi->ipcm;
-  for (i = 0; i < frames; i++) {
-    for (j = 0; j < channels; j++) {
-      p = pcm[j];
-      buffer[i*channels + j] = (FLAC__int32) (p[i] * norm);
-    }
-  }
-
-  if (fi->packetno == 0)
-    fs_flac_enc_headers (fsound);
-
-  /* We could have used FLAC__stream_encoder_process() and a more direct
-   * conversion loop above, rather than converting and interleaving. */
-  if (FLAC__stream_encoder_process_interleaved(fi->fse, buffer, frames) == false) {
-    switch (FLAC__stream_encoder_get_state (fi->fse)) {
-    case FLAC__STREAM_ENCODER_OK:
-    case FLAC__STREAM_ENCODER_UNINITIALIZED:
-      break;
-    case FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR:
-      return fs_flac_encode_fatal (fi, FISH_SOUND_ERR_OUT_OF_MEMORY);
-    default:
-      return fs_flac_encode_fatal (fi, FISH_SOUND_ERR_GENERIC);
-    }
-  }
-
-  fi->packetno++;
-
-  return frames;
-}
-
-static long
-fs_flac_encode_f_ilv (FishSound * fsound, float ** pcm, long frames)
-{
-  FishSoundFlacInfo *fi = fsound->codec_data;
-  FLAC__int32 *buffer, *ipcm;
-  float * p = (float*)pcm, norm = (1 << (BITS_PER_SAMPLE - 1));
-  long i, length = frames * fsound->info.channels;
-
-  debug_printf(1, "IN, frames = %ld", frames);
-
-  if ((ipcm = realloc(fi->ipcm, sizeof(FLAC__int32)*fsound->info.channels*frames)) == NULL)
-    return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-  fi->ipcm = ipcm;
-  buffer = (FLAC__int32*) fi->ipcm;
-  for (i=0; i<length; i++)
-    buffer[i] = p[i] * norm;
-
-  if (fi->packetno == 0)
-    fs_flac_enc_headers (fsound);
-
-  if (FLAC__stream_encoder_process_interleaved(fi->fse, buffer, frames) == false) {
-    switch (FLAC__stream_encoder_get_state (fi->fse)) {
-    case FLAC__STREAM_ENCODER_OK:
-    case FLAC__STREAM_ENCODER_UNINITIALIZED:
-      break;
-    case FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR:
-      return fs_flac_encode_fatal (fi, FISH_SOUND_ERR_OUT_OF_MEMORY);
-    default:
-      return fs_flac_encode_fatal (fi, FISH_SOUND_ERR_GENERIC);
-    }
-  }
-
-  fi->packetno++;
-
-  return frames;
-}
-#else /* ! FS_ENCODE */
-
-#define fs_flac_encode_f NULL
-#define fs_flac_encode_f_ilv NULL
-
-#endif /* ! FS_ENCODE */
-
-
-static FishSound *
-fs_flac_delete (FishSound * fsound)
-{
-  FishSoundFlacInfo * fi = (FishSoundFlacInfo *)fsound->codec_data;
-  int i;
-
-  debug_printf("IN");
-
-  if (fsound->mode == FISH_SOUND_DECODE) {
-    if (fi->fsd) {
-      FLAC__stream_decoder_finish(fi->fsd);
-      FLAC__stream_decoder_delete(fi->fsd);
-    }
-  } else if (fsound->mode == FISH_SOUND_ENCODE) {
-    if (fi->fse) {
-      FLAC__stream_encoder_finish(fi->fse);
-      FLAC__stream_encoder_delete(fi->fse);
-    }
-    if (fi->buffer) {
-      fs_free(fi->buffer);
-      fi->buffer = NULL;
-    }
-  }
-
-  if (fi->ipcm) fs_free(fi->ipcm);
-  for (i = 0; i < 8; i++) {
-    if (fi->pcm_out[i]) fs_free (fi->pcm_out[i]);
-  }
-  
-#if FS_ENCODE
-  if (fi->enc_vc_metadata) {
-    fs_flac_metadata_free (fi->enc_vc_metadata);
-  }
-#endif
-
-  fs_free (fi);
-  fsound->codec_data = NULL;
-
-  return fsound;
-}
-
-static int
-fs_flac_update (FishSound * fsound, int interleave)
-{
-  return 0;
-}
-
-static int
-fs_flac_reset (FishSound * fsound)
-{
-  /*FishSoundFlacInfo * fi = (FishSoundFlacInfo *)fsound->codec_data;*/
-#if 0
-  if (fsound->mode == FISH_SOUND_DECODE) {
-    FLAC__stream_decoder_reset(fi->fsd);
-  } else if (fsound->mode == FISH_SOUND_ENCODE) {
-  }
-#endif
-  return 0;
-}
-
-static long
-fs_flac_flush (FishSound * fsound)
-{
-  FishSoundFlacInfo * fi = (FishSoundFlacInfo *)fsound->codec_data;
-
-  debug_printf("IN (%s)", fsound->mode == FISH_SOUND_DECODE ? "decode" : "encode");
-
-  if (fsound->mode == FISH_SOUND_DECODE) {
-    FLAC__stream_decoder_finish(fi->fsd);
-  } else if (fsound->mode == FISH_SOUND_ENCODE) {
-    FLAC__stream_encoder_finish(fi->fse);
-  }
-
-  return 0;
-}
-
-static FishSound *
-fs_flac_init (FishSound * fsound)
-{
-  FishSoundFlacInfo *fi;
-  int i;
-
-  fi = fs_malloc (sizeof (FishSoundFlacInfo));
-  if (fi == NULL) return NULL;
-  fi->fsd = NULL;
-  fi->fse = NULL;
-  fi->buffer = NULL;
-  fi->packetno = 0;
-  fi->header = 0;
-  fi->header_packets = 0;
-
-  fi->ipcm = NULL;
-  for (i = 0; i < 8; i++) {
-    fi->pcm_out[i] = NULL;
-  }
-
-#if FS_ENCODE
-  fi->enc_vc_metadata = NULL;
-#endif
-
-  fsound->codec_data = fi;
-
-  return fsound;
-}
-
-FishSoundCodec *
-fish_sound_flac_codec (void)
-{
-  FishSoundCodec * codec;
-
-  codec = (FishSoundCodec *) fs_malloc (sizeof (FishSoundCodec));
-  if (codec == NULL) return NULL;
-
-  codec->format.format = FISH_SOUND_FLAC;
-  codec->format.name = "Flac (Xiph.Org)";
-  codec->format.extension = "ogg";
-
-  codec->init = fs_flac_init;
-  codec->del = fs_flac_delete;
-  codec->reset = fs_flac_reset;
-  codec->update = fs_flac_update;
-  codec->command = fs_flac_command;
-  codec->decode = fs_flac_decode;
-  codec->encode_f = fs_flac_encode_f;
-  codec->encode_f_ilv = fs_flac_encode_f_ilv;
-  codec->flush = fs_flac_flush;
-
-  return codec;
-}
-
-#else /* !HAVE_FLAC */
-
-int
-fish_sound_flac_identify (unsigned char * buf, long bytes)
-{
-  return FISH_SOUND_UNKNOWN;
-}
-
-FishSoundCodec *
-fish_sound_flac_codec (void)
-{
-  return NULL;
-}
-
-#endif
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fishsound_speex.c
+++ /dev/null
@@ -1,802 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
-#include <ctype.h>
-
-#include "private.h"
-#include "convert.h"
-
-/*#define DEBUG*/
-#include "debug.h"
-
-#if HAVE_SPEEX
-
-#if HAVE_SPEEX_1_1
-#include <speex/speex.h>
-#include <speex/speex_header.h>
-#include <speex/speex_stereo.h>
-#include <speex/speex_callbacks.h>
-
-#else /* Speex 1.0 */
-
-#include <speex.h>
-#include <speex_header.h>
-#include <speex_stereo.h>
-#include <speex_callbacks.h>
-#endif
-
-/* Format for the vendor string: "Encoded with Speex VERSION", where VERSION
- * is the libspeex version as read from a newly-generated Speex header.
- */
-#define VENDOR_FORMAT "Encoded with Speex %s"
-
-#define DEFAULT_ENH_ENABLED 1
-
-#define MAX_FRAME_BYTES 2000
-
-typedef struct _FishSoundSpeexEnc {
-  int frame_offset; /* number of speex frames done in this packet */
-  int pcm_offset;
-  char cbits[MAX_FRAME_BYTES];
-  int id;
-} FishSoundSpeexEnc;
-
-typedef struct _FishSoundSpeexInfo {
-  int packetno;
-  void * st;
-  SpeexBits bits;
-  int frame_size;
-  int nframes;
-  int extra_headers;
-  SpeexStereoState stereo;
-  int pcm_len; /* nr frames in pcm */
-  float * ipcm; /* interleaved pcm */
-  float * pcm[2]; /* Speex does max 2 channels */
-  FishSoundSpeexEnc * enc;
-} FishSoundSpeexInfo;
-
-int
-fish_sound_speex_identify (unsigned char * buf, long bytes)
-{
-  SpeexHeader * header;
-
-  if (bytes < 8) return FISH_SOUND_UNKNOWN;
-
-  if (!strncmp ((char *)buf, "Speex   ", 8)) {
-    /* if only a short buffer was passed, do a weak identify */
-    if (bytes == 8) return FISH_SOUND_SPEEX;
-
-    /* otherwise, assume the buffer is an entire initial header and
-     * feed it to speex_packet_to_header() */
-    if ((header = speex_packet_to_header ((char *)buf, (int)bytes)) != NULL) {
-      fs_free(header);
-      return FISH_SOUND_SPEEX;
-    }
-  }
-
-  return FISH_SOUND_UNKNOWN;
-}
-
-static int
-fs_speex_command (FishSound * fsound, int command, void * data, int datasize)
-{
-  return 0;
-}
-
-#if FS_DECODE
-static void *
-process_header(unsigned char * buf, long bytes, int enh_enabled,
-	       int * frame_size, int * rate,
-	       int * nframes, int forceMode, int * channels,
-	       SpeexStereoState * stereo, int * extra_headers)
-{
-  void *st;
-  SpeexMode *mode;
-  SpeexHeader *header;
-  int modeID;
-  SpeexCallback callback;
-
-  header = speex_packet_to_header((char*)buf, (int)bytes);
-  if (!header) {
-    /* cannot read header */
-    return NULL;
-  }
-
-  if (header->mode >= SPEEX_NB_MODES || header->mode < 0) {
-    /* Mode number does not (any longer) exist in this version */
-    return NULL;
-  }
-
-  modeID = header->mode;
-  if (forceMode!=-1)
-    modeID = forceMode;
-
-#if HAVE_SPEEX_LIB_GET_MODE
-  mode = (SpeexMode *) speex_lib_get_mode (modeID);
-#else
-  /* speex_mode_list[] is declared const in speex 1.1.x, hence the cast */
-  mode = (SpeexMode *)speex_mode_list[modeID];
-#endif
-
-  if (header->speex_version_id > 1) {
-    /* Unknown bitstream version */
-    return NULL;
-  }
-
-  if (mode->bitstream_version < header->mode_bitstream_version) {
-    /* The file was encoded with a newer version of Speex,
-     * need to upgrade in order to play it */
-    return NULL;
-  }
-
-  if (mode->bitstream_version > header->mode_bitstream_version) {
-    /* The file was encoded with an older version of Speex.
-     * You would need to downgrade the version in order to play it */
-    return NULL;
-  }
-
-  st = speex_decoder_init(mode);
-  if (!st) {
-    /* Decoder initialization failed */
-    return NULL;
-  }
-
-  speex_decoder_ctl(st, SPEEX_SET_ENH, &enh_enabled);
-  speex_decoder_ctl(st, SPEEX_GET_FRAME_SIZE, frame_size);
-
-  if (!(*channels==1))
-    {
-      callback.callback_id = SPEEX_INBAND_STEREO;
-      callback.func = speex_std_stereo_request_handler;
-      callback.data = stereo;
-      speex_decoder_ctl(st, SPEEX_SET_HANDLER, &callback);
-    }
-  if (!*rate)
-    *rate = header->rate;
-  /* Adjust rate if --force-* options are used */
-  if (forceMode!=-1)
-    {
-      if (header->mode < forceMode)
-	*rate <<= (forceMode - header->mode);
-      if (header->mode > forceMode)
-	*rate >>= (header->mode - forceMode);
-    }
-
-  speex_decoder_ctl(st, SPEEX_SET_SAMPLING_RATE, rate);
-
-  *nframes = header->frames_per_packet;
-
-  if (*channels == -1)
-    *channels = header->nb_channels;
-
-  debug_printf (1, "Decoding %d Hz audio using %s mode",
-                *rate, mode->modeName);
-
-#ifdef DEBUG
-  if (*channels==1)
-      fprintf (stderr, " (mono");
-   else
-      fprintf (stderr, " (stereo");
-
-  if (header->vbr)
-    fprintf (stderr, " (VBR)\n");
-  else
-    fprintf(stderr, "\n");
-#endif
-
-  *extra_headers = header->extra_headers;
-
-  fs_free(header);
-
-  return st;
-}
-
-static int
-fs_speex_free_buffers (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-
-  if (fsound->mode == FISH_SOUND_DECODE) {
-    if (fss->ipcm && fss->ipcm != fss->pcm[0]) fs_free (fss->ipcm);
-    if (fss->pcm[0]) fs_free (fss->pcm[0]);
-    if (fss->pcm[1]) fs_free (fss->pcm[1]);
-  } else {
-    if (fss->ipcm) fs_free (fss->ipcm);
-  }
-
-  return 0;
-}
-
-static inline int
-fs_speex_float_dispatch (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  FishSoundDecoded_FloatIlv df;
-  FishSoundDecoded_Float dfi;
-  int retval;
-
-  if (fsound->interleave) {
-    dfi = (FishSoundDecoded_FloatIlv)fsound->callback.decoded_float_ilv;
-    retval = dfi (fsound, (float **)fss->ipcm, fss->frame_size,
-                  fsound->user_data);
-  } else {
-    df = (FishSoundDecoded_Float)fsound->callback.decoded_float;
-    retval = df (fsound, fss->pcm, fss->frame_size, fsound->user_data);
-  }
-  
-  return retval;
-}
-
-static long
-fs_speex_decode (FishSound * fsound, unsigned char * buf, long bytes)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  int enh_enabled = DEFAULT_ENH_ENABLED;
-  int rate = 0;
-  int channels = -1;
-  int forceMode = -1;
-  int i, j;
-
-  if (fss->packetno == 0) {
-    fss->st = process_header (buf, bytes, enh_enabled,
-			      &fss->frame_size, &rate,
-			      &fss->nframes, forceMode, &channels,
-			      &fss->stereo,
-			      &fss->extra_headers);
-
-    if (fss->st == NULL) {
-      /* TODO: Return more specific error identifiers for invalid header fields */
-      return FISH_SOUND_ERR_GENERIC;
-    }
-
-    debug_printf (1, "speex: got %d channels, %d Hz", channels, rate);
-
-    fsound->info.samplerate = rate;
-    fsound->info.channels = channels;
-
-    /* Sanity check the channels value, as we will use it to determine buffer
-       sizes below.
-     */
-    if (channels < 1 || channels > 2)
-      return FISH_SOUND_ERR_GENERIC;
-
-#if HAVE_UINTPTR_T
-    /* Sanity check: frame_size is not so large that the buffer size calculations
-     * would wrap. In reality, frame_size is set by libspeex according to the
-     * mode index specified in the file header, and is usually equal to 320.
-     */
-    if (fss->frame_size > UINTPTR_MAX / (sizeof(float) * channels))
-      return FISH_SOUND_ERR_GENERIC;
-#endif
-
-    fss->ipcm = fs_malloc (sizeof (float) * fss->frame_size * channels);
-    if (fss->ipcm == NULL) {
-      return FISH_SOUND_ERR_OUT_OF_MEMORY;
-    }
-
-    if (channels == 1) {
-      fss->pcm[0] = fss->ipcm;
-    } else if (channels == 2) {
-      fss->pcm[0] = fs_malloc (sizeof (float) * fss->frame_size);
-      if (fss->pcm[0] == NULL) {
-        fs_free (fss->ipcm);
-        return FISH_SOUND_ERR_OUT_OF_MEMORY;
-      }
-      fss->pcm[1] = fs_malloc (sizeof (float) * fss->frame_size);
-      if (fss->pcm[1] == NULL) {
-        fs_free (fss->pcm[0]);
-        fs_free (fss->ipcm);
-        return FISH_SOUND_ERR_OUT_OF_MEMORY;
-      }
-    }
-
-    if (fss->nframes == 0) fss->nframes = 1;
-
-  } else if (fss->packetno == 1) {
-    /* Comments */
-    if (fish_sound_comments_decode (fsound, buf, bytes) == FISH_SOUND_ERR_OUT_OF_MEMORY) {
-      fss->packetno++;
-      return FISH_SOUND_ERR_OUT_OF_MEMORY;
-    }
-  } else if (fss->packetno <= 1+fss->extra_headers) {
-    /* Unknown extra headers */
-  } else {
-    speex_bits_read_from (&fss->bits, (char *)buf, (int)bytes);
-
-    for (i = 0; i < fss->nframes; i++) {
-      /* Decode frame */
-      speex_decode (fss->st, &fss->bits, fss->ipcm);
-
-      if (fsound->info.channels == 2) {
-	speex_decode_stereo (fss->ipcm, fss->frame_size, &fss->stereo);
-	if (fsound->interleave) {
-	  for (j = 0; j < fss->frame_size * fsound->info.channels; j++) {
-	    fss->ipcm[j] /= 32767.0;
-	  }
-	} else {
-	  _fs_deinterleave ((float **)fss->ipcm, fss->pcm,
-			    fss->frame_size, 2, (float)(1/32767.0));
-	}
-      } else {
-	for (j = 0; j < fss->frame_size; j++) {
-	  fss->ipcm[j] /= 32767.0;
-	}
-      }
-
-      fsound->frameno += fss->frame_size;
-
-      fs_speex_float_dispatch (fsound);
-    }
-  }
-
-  fss->packetno++;
-
-  return 0;
-}
-#else /* !FS_DECODE */
-
-#define fs_speex_decode NULL
-
-#endif
-
-
-#if FS_ENCODE
-static FishSound *
-fs_speex_enc_headers (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  int modeID;
-  SpeexMode * mode = NULL;
-  SpeexHeader header;
-  unsigned char * header_buf = NULL, * comments_buf = NULL;
-  int header_bytes, comments_bytes;
-  size_t buflen;
-
-  modeID = 1;
-
-#if HAVE_SPEEX_LIB_GET_MODE
-  mode = (SpeexMode *) speex_lib_get_mode (modeID);
-#else
-  /* speex_mode_list[] is declared const in speex 1.1.x, hence the cast */
-  mode = (SpeexMode *)speex_mode_list[modeID];
-#endif
-
-  speex_init_header (&header, fsound->info.samplerate, 1, mode);
-  header.frames_per_packet = fss->nframes; /* XXX: frames per packet */
-  header.vbr = 1; /* XXX: VBR */
-  header.nb_channels = fsound->info.channels;
-
-  fss->st = speex_encoder_init (mode);
-
-  if (fsound->callback.encoded) {
-    char vendor_string[128];
-
-    /* Allocate and create header */
-    header_buf = (unsigned char *) speex_header_to_packet (&header, &header_bytes);
-    if (header_buf == NULL) {
-      return NULL;
-    }
-
-    /* Allocate and create comments */
-    snprintf (vendor_string, 128, VENDOR_FORMAT, header.speex_version);
-    if (fish_sound_comment_set_vendor (fsound, vendor_string) == FISH_SOUND_ERR_OUT_OF_MEMORY) {
-      fs_free (header_buf);
-      return NULL;
-    }
-    comments_bytes = fish_sound_comments_encode (fsound, NULL, 0);
-    comments_buf = fs_malloc (comments_bytes);
-    if (comments_buf == NULL) {
-      fs_free (header_buf);
-      return NULL;
-    }
-  }
-
-  speex_encoder_ctl (fss->st, SPEEX_SET_SAMPLING_RATE,
-		     &fsound->info.samplerate);
-
-  speex_encoder_ctl (fss->st, SPEEX_GET_FRAME_SIZE, &fss->frame_size);
-
-  debug_printf (1, "got frame size %d", fss->frame_size);
-
-  /* XXX: set VBR etc. */
-
-  buflen = fss->frame_size * fsound->info.channels * sizeof (float);
-  fss->ipcm = fs_malloc (buflen);
-  if (fss->ipcm == NULL) {
-    if (comments_buf) fs_free (comments_buf);
-    if (header_buf) fs_free (header_buf);
-    return NULL;
-  }
-  memset (fss->ipcm, 0, buflen);
-
-  /* Allocations succeeded, actually call encoded callback for headers */
-  if (fsound->callback.encoded) {
-    FishSoundEncoded encoded = (FishSoundEncoded)fsound->callback.encoded;
-
-    /* header */
-    encoded (fsound, header_buf, (long)header_bytes, fsound->user_data);
-    fss->packetno++;
-    fs_free (header_buf);
-
-    /* comments */
-    comments_bytes = fish_sound_comments_encode (fsound, comments_buf, comments_bytes);
-    encoded (fsound, comments_buf, (long)comments_bytes, fsound->user_data);
-    fss->packetno++;
-    fs_free (comments_buf);
-  }
-
-  return fsound;
-}
-
-static long
-fs_speex_encode_write (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  FishSoundSpeexEnc * fse = (FishSoundSpeexEnc *)fss->enc;
-  int bytes;
-
-  speex_bits_insert_terminator (&fss->bits);
-  bytes = speex_bits_write (&fss->bits, fse->cbits, MAX_FRAME_BYTES);
-  speex_bits_reset (&fss->bits);
-
-  if (fsound->callback.encoded) {
-    FishSoundEncoded encoded = (FishSoundEncoded)fsound->callback.encoded;
-
-    encoded (fsound, (unsigned char *)fse->cbits, (long)bytes,
-	     fsound->user_data);
-  }
-
-  return bytes;
-}
-
-static long
-fs_speex_encode_block (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  FishSoundSpeexEnc * fse = (FishSoundSpeexEnc *)fss->enc;
-  long nencoded = fse->pcm_offset;
-
-  if (fsound->info.channels == 2)
-    speex_encode_stereo (fss->ipcm, fse->pcm_offset, &fss->bits);
-
-  speex_encode (fss->st, fss->ipcm, &fss->bits);
-
-  fsound->frameno += fse->pcm_offset;
-  fse->frame_offset++;
-
-  if (fse->frame_offset == fss->nframes) {
-    fs_speex_encode_write (fsound);
-    fse->frame_offset = 0;
-  }
-
-  fse->pcm_offset = 0;
-
-  return nencoded;
-}
-
-static long
-fs_speex_encode_f_ilv (FishSound * fsound, float ** pcm, long frames)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  FishSoundSpeexEnc * fse = (FishSoundSpeexEnc *)fss->enc;
-  long remaining = frames, len, nencoded = 0;
-  int j, start, end;
-  int channels = fsound->info.channels;
-  float * p = (float *)pcm;
-
-  if (fss->packetno == 0)
-    fs_speex_enc_headers (fsound);
-
-  while (remaining > 0) {
-    len = MIN (remaining, fss->frame_size - fse->pcm_offset);
-
-    start = fse->pcm_offset * channels;
-    end = (len + fse->pcm_offset) * channels;
-    for (j = start; j < end; j++) {
-      fss->ipcm[j] = *p++ * (float)32767.0;
-    }
-
-    fse->pcm_offset += len;
-
-    if (fse->pcm_offset == fss->frame_size) {
-      nencoded += fs_speex_encode_block (fsound);
-    }
-
-    remaining -= len;
-  }
-
-  return frames - remaining;
-}
-
-static long
-fs_speex_encode_f (FishSound * fsound, float * pcm[], long frames)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  FishSoundSpeexEnc * fse = (FishSoundSpeexEnc *)fss->enc;
-  long remaining = frames, len, n = 0, nencoded = 0;
-  int j, start;
-
-  if (fss->packetno == 0)
-    fs_speex_enc_headers (fsound);
-
-  while (remaining > 0) {
-    len = MIN (remaining, fss->frame_size - fse->pcm_offset);
-
-    start = fse->pcm_offset;
-    fss->pcm[0] = &pcm[0][n];
-
-    if (fsound->info.channels == 2) {
-      fss->pcm[1] = &pcm[1][n];
-      _fs_interleave (fss->pcm, (float **)&fss->ipcm[start*2],
-		      len, 2, 32767.0);
-    } else {
-      for (j = 0; j < len; j++) {
-	fss->ipcm[start + j] = fss->pcm[0][j] * (float)32767.0;
-      }
-    }
-
-    fse->pcm_offset += len;
-
-    if (fse->pcm_offset == fss->frame_size) {
-      nencoded += fs_speex_encode_block (fsound);
-    }
-
-    remaining -= len;
-    n += len;
-  }
-
-  return frames - remaining;
-}
-
-static long
-fs_speex_flush (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  FishSoundSpeexEnc * fse = (FishSoundSpeexEnc *)fss->enc;
-  long nencoded = 0;
-
-  if (fsound->mode != FISH_SOUND_ENCODE)
-    return 0;
-
-  if (fse->pcm_offset > 0) {
-    nencoded += fs_speex_encode_block (fsound);
-  }
-
-  /* If, at this point, fse->frame_offset == 0, then either:
-     - all remaining encoded data has just been flushed out via
-     fs_speex_encode_block(), OR
-     - there was no data remaining to flush at the beginning of this
-     function (fse->pcm_offset == 0 && fse->frame_offset == 0)
-  */
-  if (fse->frame_offset == 0) return 0;
-
-  while (fse->frame_offset < fss->nframes) {
-    speex_bits_pack (&fss->bits, 15, 5);
-    fse->frame_offset++;
-  }
-
-  nencoded += fs_speex_encode_write (fsound);
-  fse->frame_offset = 0;
-
-  return nencoded;
-}
-
-#else /* !FS_ENCODE */
-
-#define fs_speex_encode_f NULL
-#define fs_speex_encode_f_ilv NULL
-#define fs_speex_flush NULL
-
-#endif
-
-static int
-fs_speex_reset (FishSound * fsound)
-{
-  /*FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;*/
-
-  return 0;
-}
-
-static int
-fs_speex_update (FishSound * fsound, int interleave)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  size_t pcm_size = sizeof (float);
-  float *ipcm_new, *pcm0, *pcm1;
-
-  ipcm_new = (float *)fs_realloc (fss->ipcm,
-		  pcm_size * fss->frame_size * fsound->info.channels);
-  if (ipcm_new == NULL) return FISH_SOUND_ERR_OUT_OF_MEMORY;
-
-  fss->ipcm = ipcm_new;
-
-  if (interleave) {
-    /* if transitioning from non-interleave to interleave,
-       free non-ilv buffers */
-    if (!fsound->interleave && fsound->info.channels == 2) {
-      if (fss->pcm[0]) fs_free (fss->pcm[0]);
-      if (fss->pcm[1]) fs_free (fss->pcm[1]);
-      fss->pcm[0] = NULL;
-      fss->pcm[1] = NULL;
-    }
-  } else {
-    if (fsound->info.channels == 1) {
-      fss->pcm[0] = (float *) fss->ipcm;
-    } else if (fsound->info.channels == 2) {
-#if HAVE_UINTPTR_T
-      /* Sanity check: frame_size is not so large that the buffer size calculations
-       * would wrap. In reality, frame_size is set by libspeex according to the
-       * mode index specified in the file header, and is usually equal to 320.
-       */
-      if (fss->frame_size > UINTPTR_MAX / pcm_size)
-        return FISH_SOUND_ERR_GENERIC;
-#endif
-
-      pcm0 = fs_realloc (fss->pcm[0], pcm_size * fss->frame_size);
-      if (pcm0 == NULL) {
-        return FISH_SOUND_ERR_OUT_OF_MEMORY;
-      }
-
-      pcm1 = fs_realloc (fss->pcm[1], pcm_size * fss->frame_size);
-      if (pcm1 == NULL) {
-        fs_free (pcm0);
-        return FISH_SOUND_ERR_OUT_OF_MEMORY;
-      }
-
-      fss->pcm[0] = pcm0;
-      fss->pcm[1] = pcm1;
-    }
-  }
-
-  return 0;
-}
-
-static FishSound *
-fs_speex_enc_init (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-  FishSoundSpeexEnc * fse;
-
-  fse = fs_malloc (sizeof (FishSoundSpeexEnc));
-  if (fse == NULL) return NULL;
-
-  fse->frame_offset = 0;
-  fse->pcm_offset = 0;
-  fse->id = 0;
-
-  fss->enc = fse;
-
-  return fsound;
-}
-
-static FishSound *
-fs_speex_init (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss;
-  SpeexStereoState stereo_init = SPEEX_STEREO_STATE_INIT;
-
-  fss = fs_malloc (sizeof (FishSoundSpeexInfo));
-  if (fss == NULL) return NULL;
-
-  fss->packetno = 0;
-  fss->st = NULL;
-  fss->frame_size = 0;
-  fss->nframes = 1;
-  fss->pcm_len = 0;
-  fss->ipcm = NULL;
-  fss->pcm[0] = NULL;
-  fss->pcm[1] = NULL;
-
-  memcpy (&fss->stereo, &stereo_init, sizeof (SpeexStereoState));
-
-  speex_bits_init (&fss->bits);
-
-  fsound->codec_data = fss;
-
-  if (fsound->mode == FISH_SOUND_ENCODE)
-    fs_speex_enc_init (fsound);
-
-  return fsound;
-}
-
-static FishSound *
-fs_speex_delete (FishSound * fsound)
-{
-  FishSoundSpeexInfo * fss = (FishSoundSpeexInfo *)fsound->codec_data;
-
-  fs_speex_free_buffers (fsound);
-
-  if (fsound->mode == FISH_SOUND_DECODE) {
-    if (fss->st) speex_decoder_destroy (fss->st);
-  } else if (fsound->mode == FISH_SOUND_ENCODE) {
-    if (fss->st) speex_encoder_destroy (fss->st);
-    if (fss->enc) fs_free (fss->enc);
-  }
-  speex_bits_destroy (&fss->bits);
-
-  fs_free (fss);
-  fsound->codec_data = NULL;
-
-  return fsound;
-}
-
-FishSoundCodec *
-fish_sound_speex_codec (void)
-{
-  FishSoundCodec * codec;
-
-  codec = (FishSoundCodec *) fs_malloc (sizeof (FishSoundCodec));
-  if (codec == NULL) return NULL;
-
-  codec->format.format = FISH_SOUND_SPEEX;
-  codec->format.name = "Speex (Xiph.Org)";
-  codec->format.extension = "spx";
-
-  codec->init = fs_speex_init;
-  codec->del = fs_speex_delete;
-  codec->reset = fs_speex_reset;
-  codec->update = fs_speex_update;
-  codec->command = fs_speex_command;
-  codec->decode = fs_speex_decode;
-  codec->encode_f = fs_speex_encode_f;
-  codec->encode_f_ilv = fs_speex_encode_f_ilv;
-  codec->flush = fs_speex_flush;
-
-  return codec;
-}
-
-#else /* !HAVE_SPEEX */
-
-int
-fish_sound_speex_identify (unsigned char * buf, long bytes)
-{
-  return FISH_SOUND_UNKNOWN;
-}
-
-FishSoundCodec *
-fish_sound_speex_codec (void)
-{
-  return NULL;
-}
-
-#endif
-
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fishsound_vorbis.c
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <ctype.h>
-
-#include "private.h"
-#include "convert.h"
-
-/*#define DEBUG*/
-#include "debug.h"
-
-#if HAVE_VORBIS
-
-#include <vorbis/codec.h>
-#if HAVE_VORBISENC
-#include <vorbis/vorbisenc.h>
-#endif
-
-typedef struct _FishSoundVorbisInfo {
-  int packetno;
-  int finished;
-  vorbis_info vi;
-  vorbis_comment vc;
-  vorbis_dsp_state vd; /** central working state for the PCM->packet encoder */
-  vorbis_block vb;     /** local working space for PCM->packet encode */
-  float ** pcm; /** ongoing pcm working space for decoder (stateful) */
-  float * ipcm; /** interleaved pcm for interfacing with user */
-  long max_pcm;
-} FishSoundVorbisInfo;
-
-int
-fish_sound_vorbis_identify (unsigned char * buf, long bytes)
-{
-  struct vorbis_info vi;
-  struct vorbis_comment vc;
-  ogg_packet op;
-  int ret, id = FISH_SOUND_UNKNOWN;
-
-  if (!strncmp ((char *)&buf[1], "vorbis", 6)) {
-    /* if only a short buffer was passed, do a weak identify */
-    if (bytes == 8) return FISH_SOUND_VORBIS;
-
-    /* otherwise, assume the buffer is an entire initial header and
-     * feed it to vorbis_synthesis_headerin() */
-
-    vorbis_info_init (&vi);
-    vorbis_comment_init (&vc);
-
-    op.packet = buf;
-    op.bytes = bytes;
-    op.b_o_s = 1;
-    op.e_o_s = 0;
-    op.granulepos = 0;
-    op.packetno = 0;
-
-    if ((ret = vorbis_synthesis_headerin (&vi, &vc, &op)) == 0) {
-      if (vi.rate != 0) id = FISH_SOUND_VORBIS;
-    } else {
-      debug_printf (1, "vorbis_synthesis_headerin returned %d", ret);
-    }
-
-    vorbis_info_clear (&vi);
-  }
-
-  return id;
-}
-
-static int
-fs_vorbis_command (FishSound * fsound, int command, void * data,
-		   int datasize)
-{
-  return 0;
-}
-
-#if FS_DECODE
-static long
-fs_vorbis_decode (FishSound * fsound, unsigned char * buf, long bytes)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-  ogg_packet op;
-  long samples;
-  float * pcm_new;
-  int ret;
-
-  /* Make an ogg_packet structure to pass the data to libvorbis */
-  op.packet = buf;
-  op.bytes = bytes;
-  op.b_o_s = (fsv->packetno == 0) ? 1 : 0;
-  op.e_o_s = fsound->next_eos;
-  op.granulepos = fsound->next_granulepos;
-  op.packetno = fsv->packetno;
-
-  if (fsv->packetno < 3) {
-
-    if ((ret = vorbis_synthesis_headerin (&fsv->vi, &fsv->vc, &op)) == 0) {
-      if (fsv->vi.rate != 0) {
-	debug_printf (1, "Got vorbis info: version %d\tchannels %d\trate %ld",
-                      fsv->vi.version, fsv->vi.channels, fsv->vi.rate);
-	fsound->info.samplerate = fsv->vi.rate;
-	fsound->info.channels = fsv->vi.channels;
-      }
-    }
-
-    /* Decode comments from packet 1. Vorbis has 7 bytes of marker at the
-     * start of vorbiscomment packet. */
-    if (fsv->packetno == 1 && bytes > 7 && buf[0] == 0x03 &&
-	!strncmp ((char *)&buf[1], "vorbis", 6)) {
-      if (fish_sound_comments_decode (fsound, buf+7, bytes-7) == FISH_SOUND_ERR_OUT_OF_MEMORY) {
-        fsv->packetno++;
-        return FISH_SOUND_ERR_OUT_OF_MEMORY;
-      }
-    } else if (fsv->packetno == 2) {
-      vorbis_synthesis_init (&fsv->vd, &fsv->vi);
-      vorbis_block_init (&fsv->vd, &fsv->vb);
-    }
-  } else {
-    FishSoundDecoded_FloatIlv df;
-    FishSoundDecoded_Float dfi;
-    int r;
-    if ((r = vorbis_synthesis (&fsv->vb, &op)) == 0) 
-      vorbis_synthesis_blockin (&fsv->vd, &fsv->vb);
-    
-    if (r == OV_EBADPACKET) {
-      return FISH_SOUND_ERR_GENERIC;
-    }
-
-    while ((samples = vorbis_synthesis_pcmout (&fsv->vd, &fsv->pcm)) > 0) {
-      vorbis_synthesis_read (&fsv->vd, samples);
-
-      if (fsound->frameno != -1)
-	fsound->frameno += samples;
-
-      if (fsound->interleave) {
-	if (samples > fsv->max_pcm) {
-          pcm_new = realloc (fsv->ipcm, sizeof(float) * samples *
-			     fsound->info.channels);
-          if (pcm_new == NULL) {
-            /* Allocation failure; just truncate here, fail gracefully elsewhere */
-            samples = fsv->max_pcm;
-          } else {
-	    fsv->ipcm = pcm_new;
-	    fsv->max_pcm = samples;
-          }
-	}
-	_fs_interleave (fsv->pcm, (float **)fsv->ipcm, samples,
-			fsound->info.channels, 1.0);
-
-	dfi = (FishSoundDecoded_FloatIlv)fsound->callback.decoded_float_ilv;
-	dfi (fsound, (float **)fsv->ipcm, samples, fsound->user_data);
-      } else {
-	df = (FishSoundDecoded_Float)fsound->callback.decoded_float;
-	df (fsound, fsv->pcm, samples, fsound->user_data);
-      }
-    }
-  }
-
-  if (fsound->next_granulepos != -1) {
-    fsound->frameno = fsound->next_granulepos;
-    fsound->next_granulepos = -1;
-  }
-
-  fsv->packetno++;
-
-  return 0;
-}
-#else /* !FS_DECODE */
-
-#define fs_vorbis_decode NULL
-
-#endif
-
-#if FS_ENCODE && HAVE_VORBISENC
-
-static FishSound *
-fs_vorbis_enc_headers (FishSound * fsound)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-  const FishSoundComment * comment;
-  ogg_packet header;
-  ogg_packet header_comm;
-  ogg_packet header_code;
-
-  /* Vorbis streams begin with three headers:
-   *   1. The initial header (with most of the codec setup parameters),
-   *      which is mandated by the Ogg bitstream spec,
-   *   2. The second header which holds any comment fields,
-   *   3. The third header which contains the bitstream codebook.
-   * We merely need to make the headers, then pass them to libvorbis one at
-   * a time; libvorbis handles the additional Ogg bitstream constraints.
-   */
-
-  /* Update the comments */
-  for (comment = fish_sound_comment_first (fsound); comment;
-       comment = fish_sound_comment_next (fsound, comment)) {
-    debug_printf (1, "%s = %s", comment->name, comment->value);
-    vorbis_comment_add_tag (&fsv->vc, comment->name, comment->value);
-  }
-
-  /* Generate the headers */
-  vorbis_analysis_headerout(&fsv->vd, &fsv->vc,
-			    &header, &header_comm, &header_code);
-
-  /* Pass the generated headers to the user */
-  if (fsound->callback.encoded) {
-    FishSoundEncoded encoded = (FishSoundEncoded)fsound->callback.encoded;
-
-    encoded (fsound, header.packet, header.bytes, fsound->user_data);
-    encoded (fsound, header_comm.packet, header_comm.bytes,
-	     fsound->user_data);
-    encoded (fsound, header_code.packet, header_code.bytes,
-	     fsound->user_data);
-    fsv->packetno = 3;
-  }
-
-  return fsound;
-}
-
-static long
-fs_vorbis_encode_write (FishSound * fsound, long len)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-  ogg_packet op;
-
-  vorbis_analysis_wrote (&fsv->vd, len);
-
-  while (vorbis_analysis_blockout (&fsv->vd, &fsv->vb) == 1) {
-    vorbis_analysis (&fsv->vb, NULL);
-    vorbis_bitrate_addblock (&fsv->vb);
-
-    while (vorbis_bitrate_flushpacket (&fsv->vd, &op)) {
-      if (fsound->callback.encoded) {
-	FishSoundEncoded encoded = (FishSoundEncoded)fsound->callback.encoded;
-
-	if (op.granulepos != -1)
-	  fsound->frameno = op.granulepos;
-
-	encoded (fsound, op.packet, op.bytes, fsound->user_data);
-
-	fsv->packetno++;
-      }
-    }
-  }
-
-  return len;
-}
-
-static int
-fs_vorbis_finish (FishSound * fsound)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-
-  if (!fsv->finished) {
-    if (fsound->mode == FISH_SOUND_ENCODE) {
-      fs_vorbis_encode_write (fsound, 0);
-    }
-    fsv->finished = 1;
-  }
-
-  return 0;
-}
-
-static long
-fs_vorbis_encode_f_ilv (FishSound * fsound, float ** pcm, long frames)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-  float ** vpcm;
-  long len, remaining = frames;
-  float * d = (float *)pcm;
-
-  if (fsv->packetno == 0) {
-    fs_vorbis_enc_headers (fsound);
-  }
-
-  if (frames == 0) {
-    fs_vorbis_finish (fsound);
-    return 0;
-  }
-
-  while (remaining > 0) {
-    len = MIN (1024, remaining);
-
-    /* expose the buffer to submit data */
-    vpcm = vorbis_analysis_buffer (&fsv->vd, 1024);
-
-    _fs_deinterleave ((float **)d, vpcm, len, fsound->info.channels, 1.0);
-
-    d += (len * fsound->info.channels);
-
-    fs_vorbis_encode_write (fsound, len);
-
-    remaining -= len;
-  }
-
-  /**
-   * End of input. Tell libvorbis we're at the end of stream so that it can
-   * handle the last frame and mark the end of stream in the output properly.
-   */
-  if (fsound->next_eos)
-    fs_vorbis_finish (fsound);
-
-  return 0;
-}
-
-static long
-fs_vorbis_encode_f (FishSound * fsound, float * pcm[], long frames)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-  float ** vpcm;
-  long len, remaining = frames;
-  int i;
-
-  if (fsv->packetno == 0) {
-    fs_vorbis_enc_headers (fsound);
-  }
-
-  if (frames == 0) {
-    fs_vorbis_finish (fsound);
-    return 0;
-  }
-
-  while (remaining > 0) {
-    len = MIN (1024, remaining);
-
-    debug_printf (1, "processing %ld frames", len);
-
-    /* expose the buffer to submit data */
-    vpcm = vorbis_analysis_buffer (&fsv->vd, 1024);
-
-    for (i = 0; i < fsound->info.channels; i++) {
-      memcpy (vpcm[i], pcm[i], sizeof (float) * len);
-    }
-
-    fs_vorbis_encode_write (fsound, len);
-
-    remaining -= len;
-  }
-
-  /**
-   * End of input. Tell libvorbis we're at the end of stream so that it can
-   * handle the last frame and mark the end of stream in the output properly.
-   */
-  if (fsound->next_eos)
-    fs_vorbis_finish (fsound);
-
-  return 0;
-}
-
-static FishSound *
-fs_vorbis_enc_init (FishSound * fsound)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-
-  debug_printf (1, "Vorbis enc init: %d channels, %d Hz", fsound->info.channels,
-                fsound->info.samplerate);
-
-  vorbis_encode_init_vbr (&fsv->vi, fsound->info.channels,
-			  fsound->info.samplerate, (float)0.3 /* quality */);
-
-  /* set up the analysis state and auxiliary encoding storage */
-  vorbis_analysis_init (&fsv->vd, &fsv->vi);
-  vorbis_block_init (&fsv->vd, &fsv->vb);
-
-  return fsound;
-}
-
-#else /* ! FS_ENCODE && HAVE_VORBISENC */
-
-#define fs_vorbis_encode_f NULL
-#define fs_vorbis_encode_f_ilv NULL
-#define fs_vorbis_finish NULL
-
-#endif /* ! FS_ENCODE && HAVE_VORBISENC */
-
-static int
-fs_vorbis_reset (FishSound * fsound)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-
-  vorbis_block_init (&fsv->vd, &fsv->vb);
-  fsv->packetno = 0;
-  return 0;
-}
-
-static FishSound *
-fs_vorbis_init (FishSound * fsound)
-{
-  FishSoundVorbisInfo * fsv;
-
-  fsv = fs_malloc (sizeof (FishSoundVorbisInfo));
-  if (fsv == NULL) return NULL;
-
-  fsv->packetno = 0;
-  fsv->finished = 0;
-  vorbis_info_init (&fsv->vi);
-  vorbis_comment_init (&fsv->vc);
-  memset(&fsv->vd, 0, sizeof(fsv->vd));
-  vorbis_block_init (&fsv->vd, &fsv->vb);
-  fsv->pcm = NULL;
-  fsv->ipcm = NULL;
-  fsv->max_pcm = 0;
-
-  fsound->codec_data = fsv;
-
-#if FS_ENCODE && HAVE_VORBISENC
-
-  if (fsound->mode == FISH_SOUND_ENCODE) {
-    fs_vorbis_enc_init (fsound);
-  }
-
-#endif /* FS_ENCODE && HAVE_VORBISENC */
-
-  return fsound;
-}
-
-static FishSound *
-fs_vorbis_delete (FishSound * fsound)
-{
-  FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
-
-#if FS_ENCODE && HAVE_VORBISENC
-  fs_vorbis_finish (fsound);
-#endif /* FS_ENCODE && HAVE_VORBISENC */
-
-  if (fsv->ipcm) fs_free (fsv->ipcm);
-
-  vorbis_block_clear (&fsv->vb);
-  vorbis_dsp_clear (&fsv->vd);
-  vorbis_comment_clear (&fsv->vc);
-  vorbis_info_clear (&fsv->vi);
-
-  fs_free (fsv);
-  fsound->codec_data = NULL;
-
-  return fsound;
-}
-
-FishSoundCodec *
-fish_sound_vorbis_codec (void)
-{
-  FishSoundCodec * codec;
-
-  codec = (FishSoundCodec *) fs_malloc (sizeof (FishSoundCodec));
-  if (codec == NULL) return NULL;
-
-  codec->format.format = FISH_SOUND_VORBIS;
-  codec->format.name = "Vorbis (Xiph.Org)";
-  codec->format.extension = "ogg";
-
-  codec->init = fs_vorbis_init;
-  codec->del = fs_vorbis_delete;
-  codec->reset = fs_vorbis_reset;
-  codec->update = NULL; /* XXX */
-  codec->command = fs_vorbis_command;
-  codec->decode = fs_vorbis_decode;
-  codec->encode_f = fs_vorbis_encode_f;
-  codec->encode_f_ilv = fs_vorbis_encode_f_ilv;
-  codec->flush = NULL;
-
-  return codec;
-}
-
-#else /* !HAVE_VORBIS */
-
-int
-fish_sound_vorbis_identify (unsigned char * buf, long bytes)
-{
-  return FISH_SOUND_UNKNOWN;
-}
-
-FishSoundCodec *
-fish_sound_vorbis_codec (void)
-{
-  return NULL;
-}
-
-#endif
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fs_compat.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config.h"
-
-/* WINDOWS */
-#ifdef _WIN32
-#define inline __inline
-#define alloca _alloca
-#define strncasecmp _strnicmp
-#define snprintf _snprintf
-#ifndef __SYMBIAN32__
-#define strcasecmp _stricmp
-#endif /* ! __SYMBIAN32__ */
-#endif
-
-/* malloc/realloc/free macros */
-#ifndef fs_malloc
-#define fs_malloc malloc
-#endif
-
-#ifndef fs_realloc
-#define fs_realloc realloc
-#endif
-
-#ifndef fs_free
-#define fs_free free
-#endif
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fs_vector.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "fs_compat.h"
-
-typedef int (*FishSoundFunc) (void * data);
-typedef int (*FishSoundCmpFunc) (const void * data1, const void * data2);
-
-typedef struct _FishSoundVector FishSoundVector;
-
-struct _FishSoundVector {
-  int max_elements;
-  int nr_elements;
-  FishSoundCmpFunc cmp;
-  void ** data;
-};
-
-/*
- * A vector of void *. New elements will be appended at the tail.
- */
-
-FishSoundVector *
-fs_vector_new (FishSoundCmpFunc cmp)
-{
-  FishSoundVector * vector;
-
-  vector = fs_malloc (sizeof (FishSoundVector));
-  if (vector == NULL) return NULL;
-
-  vector->max_elements = 0;
-  vector->nr_elements = 0;
-  vector->cmp = cmp;
-  vector->data = NULL;
-
-  return vector;
-}
-
-static void
-fs_vector_clear (FishSoundVector * vector)
-{
-  fs_free (vector->data);
-  vector->data = NULL;
-  vector->nr_elements = 0;
-  vector->max_elements = 0;
-}
-
-void
-fs_vector_delete (FishSoundVector * vector)
-{
-  fs_vector_clear (vector);
-  fs_free (vector);
-}
-
-int
-fs_vector_size (FishSoundVector * vector)
-{
-  if (vector == NULL) return 0;
-
-  return vector->nr_elements;
-}
-
-void *
-fs_vector_nth (FishSoundVector * vector, int n)
-{
-  if (vector == NULL) return NULL;
-
-  if (n >= vector->nr_elements) return NULL;
-
-  return vector->data[n];
-}
-
-int
-fs_vector_find_index (FishSoundVector * vector, const void * data)
-{
-  void * v_data;
-  int i;
-
-  for (i = 0; i < vector->nr_elements; i++) {
-    v_data = vector->data[i];
-    if (vector->cmp (v_data, data))
-      return i;
-  }
-
-  return -1;
-}
-
-void *
-fs_vector_find (FishSoundVector * vector, const void * data)
-{
-  void * v_data;
-  int i;
-
-  for (i = 0; i < vector->nr_elements; i++) {
-    v_data = vector->data[i];
-    if (vector->cmp (v_data, data))
-      return v_data;
-  }
-
-  return NULL;
-}
-
-int
-fs_vector_foreach (FishSoundVector * vector, FishSoundFunc func)
-{
-  int i;
-
-  for (i = 0; i < vector->nr_elements; i++) {
-    func (vector->data[i]);
-  }
-
-  return 0;
-}
-
-static FishSoundVector *
-fs_vector_grow (FishSoundVector * vector)
-{
-  void * new_elements;
-  int new_max_elements;
-
-  vector->nr_elements++;
-
-  if (vector->nr_elements > vector->max_elements) {
-    if (vector->max_elements == 0) {
-      new_max_elements = 1;
-    } else {
-      new_max_elements = vector->max_elements * 2;
-    }
-
-    new_elements =
-      fs_realloc (vector->data, (size_t)new_max_elements * sizeof (void *));
-
-    if (new_elements == NULL) {
-      vector->nr_elements--;
-      return NULL;
-    }
-
-    vector->max_elements = new_max_elements;
-    vector->data = new_elements;
-  }
-
-  return vector;
-}
-
-void *
-fs_vector_insert (FishSoundVector * vector, void * data)
-{
-  if (vector == NULL) return NULL;
-
-  if (fs_vector_grow (vector) == NULL)
-    return NULL;
-
-  vector->data[vector->nr_elements-1] = data;
-
-  return data;
-
-}
-
-static void *
-fs_vector_remove_nth (FishSoundVector * vector, int n)
-{
-  int i;
-  void * new_elements;
-  int new_max_elements;
-
-  vector->nr_elements--;
-
-  if (vector->nr_elements == 0) {
-    fs_vector_clear (vector);
-  } else {
-    for (i = n; i < vector->nr_elements; i++) {
-      vector->data[i] = vector->data[i+1];
-    }
-
-    if (vector->nr_elements < vector->max_elements/2) {
-      new_max_elements = vector->max_elements/2;
-
-      new_elements =
-	fs_realloc (vector->data,
-		    (size_t)new_max_elements * sizeof (void *));
-      
-      if (new_elements == NULL)
-	return NULL;
-
-      vector->max_elements = new_max_elements;
-      vector->data = new_elements;
-    }
-  }
-
-  return vector;
-}
-
-FishSoundVector *
-fs_vector_remove (FishSoundVector * vector, void * data)
-{
-  int i;
-
-  for (i = 0; i < vector->nr_elements; i++) {
-    if (vector->data[i] == data) {
-      return fs_vector_remove_nth (vector, i);
-    }
-  }
-
-  return vector;
-}
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/fs_vector.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FS_VECTOR_H__
-#define __FS_VECTOR_H__
-
-typedef void FishSoundVector;
-
-typedef int (*FishSoundFunc) (void * data);
-typedef int (*FishSoundCmpFunc) (void * data1, void * data2);
-
-FishSoundVector *
-fs_vector_new (FishSoundCmpFunc cmp);
-
-void
-fs_vector_delete (FishSoundVector * vector);
-
-void *
-fs_vector_nth (FishSoundVector * vector, int n);
-
-int
-fs_vector_find_index (FishSoundVector * vector, const void * data);
-
-void *
-fs_vector_find (FishSoundVector * vector, const void * data);
-
-int
-fs_vector_foreach (FishSoundVector * vector, FishSoundFunc func);
-
-int
-fs_vector_size (FishSoundVector * vector);
-
-/**
- * Add an element to a vector.
- * \param vector An FishSoundVector
- * \param data The new element to add
- * \retval data If the element was successfully added
- * \retval NULL If adding the element failed due to a realloc() error
- */
-void *
-fs_vector_insert (FishSoundVector * vector, void * data);
-
-/**
- * Remove a (void *) element of a vector
- * \retval \a vector on success
- * \retval NULL on failure (realloc error)
- */
-FishSoundVector *
-fs_vector_remove (FishSoundVector * vector, void * data);
-
-#endif /* __FS_VECTOR_H__ */
deleted file mode 100644
--- a/media/libfishsound/src/libfishsound/private.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef __FISH_SOUND_PRIVATE_H__
-#define __FISH_SOUND_PRIVATE_H__
-
-#include <stdlib.h>
-
-#include "fs_compat.h"
-#include "fs_vector.h"
-
-#include <fishsound/constants.h>
-
-#undef MIN
-#define MIN(a,b) (((a)<(b))?(a):(b))
-
-typedef struct _FishSound FishSound;
-typedef struct _FishSoundInfo FishSoundInfo;
-typedef struct _FishSoundCodec FishSoundCodec;
-typedef struct _FishSoundFormat FishSoundFormat;
-typedef struct _FishSoundComment FishSoundComment;
-
-typedef int         (*FSCodecIdentify) (unsigned char * buf, long bytes);
-typedef FishSound * (*FSCodecInit) (FishSound * fsound);
-typedef FishSound * (*FSCodecDelete) (FishSound * fsound);
-typedef int         (*FSCodecReset) (FishSound * fsound);
-typedef int         (*FSCodecUpdate) (FishSound * fsound, int interleave);
-typedef int         (*FSCodecCommand) (FishSound * fsound, int command,
-				       void * data, int datasize);
-typedef long        (*FSCodecDecode) (FishSound * fsound, unsigned char * buf,
-				      long bytes);
-typedef long        (*FSCodecEncode_Float) (FishSound * fsound, float * pcm[],
-					    long frames);
-typedef long        (*FSCodecEncode_FloatIlv) (FishSound * fsound,
-					       float ** pcm, long frames);
-typedef long        (*FSCodecFlush) (FishSound * fsound);
-
-#include <fishsound/decode.h>
-#include <fishsound/encode.h>
-
-struct _FishSoundFormat {
-  int format;
-  const char * name;
-  const char * extension;
-};
-
-struct _FishSoundCodec {
-  struct _FishSoundFormat format;
-  FSCodecInit init;
-  FSCodecDelete del;
-  FSCodecReset reset;
-  FSCodecUpdate update;
-  FSCodecCommand command;
-  FSCodecDecode decode;
-  FSCodecEncode_FloatIlv encode_f_ilv;
-  FSCodecEncode_Float encode_f;
-  FSCodecFlush flush;
-};
-
-struct _FishSoundInfo {
-  int samplerate;
-  int channels;
-  int format;
-};
-
-struct _FishSoundComment {
-  char * name;
-  char * value;
-};
-
-union FishSoundCallback {
-  FishSoundDecoded_Float decoded_float;
-  FishSoundDecoded_FloatIlv decoded_float_ilv;
-  FishSoundEncoded encoded;
-};
-
-struct _FishSound {
-  /** FISH_SOUND_DECODE or FISH_SOUND_ENCODE */
-  FishSoundMode mode;
-
-  /** General info related to sound */
-  FishSoundInfo info;
-
-  /** Interleave boolean */
-  int interleave;
-
-  /**
-   * Current frameno.
-   */
-  long frameno;
-
-  /**
-   * Truncation frameno for the next block of data sent to decode.
-   * In Ogg encapsulation, this is represented by the Ogg packet's
-   * "granulepos" field.
-   */
-  long next_granulepos;
-
-  /**
-   * Flag if the next block of data sent to decode will be the last one
-   * for this stream (eos = End Of Stream).
-   * In Ogg encapsulation, this is represented by the Ogg packet's
-   * "eos" field.
-   */
-  int next_eos;
-
-  /** The codec class structure */
-  FishSoundCodec * codec;
-
-  /** codec specific data */
-  void * codec_data;
-
-  /* encode or decode callback */
-  union FishSoundCallback callback;
-
-  /** user data for encode/decode callback */
-  void * user_data; 
-
-  /** The comments */
-  char * vendor;
-  FishSoundVector * comments;
-};
-
-int fish_sound_identify (unsigned char * buf, long bytes);
-int fish_sound_set_format (FishSound * fsound, int format);  
-
-/* Format specific interfaces */
-int fish_sound_vorbis_identify (unsigned char * buf, long bytes);
-FishSoundCodec * fish_sound_vorbis_codec (void);
-
-int fish_sound_speex_identify (unsigned char * buf, long bytes);
-FishSoundCodec * fish_sound_speex_codec (void);
-
-int fish_sound_flac_identify (unsigned char * buf, long bytes);
-FishSoundCodec * fish_sound_flac_codec (void);
-
-/* comments */
-int fish_sound_comments_init (FishSound * fsound);
-int fish_sound_comments_free (FishSound * fsound);
-int fish_sound_comments_decode (FishSound * fsound, unsigned char * buf,
-				long bytes);
-long fish_sound_comments_encode (FishSound * fsound, unsigned char * buf,
-				 long length);
-
-/**
- * Set the vendor string.
- * \param fsound A FishSound* handle (created with FISH_SOUND_ENCODE)
- * \param vendor The vendor string.
- * \retval 0 Success
- * \retval FISH_SOUND_ERR_BAD \a fsound is not a valid FishSound* handle
- * \retval FISH_SOUND_ERR_INVALID Operation not suitable for this FishSound
- */
-int
-fish_sound_comment_set_vendor (FishSound * fsound, const char * vendor);
-
-const FishSoundComment * fish_sound_comment_first (FishSound * fsound);
-const FishSoundComment *
-fish_sound_comment_next (FishSound * fsound, const FishSoundComment * comment);
-
-#endif /* __FISH_SOUND_PRIVATE_H__ */
deleted file mode 100644
--- a/media/libfishsound/trac497.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/media/libfishsound/src/libfishsound/fishsound_comments.c b/media/libfishsound/src/libfishsound/fishsound_comments.c
-index b71164f..414e210 100644
---- a/media/libfishsound/src/libfishsound/fishsound_comments.c
-+++ b/media/libfishsound/src/libfishsound/fishsound_comments.c
-@@ -290,7 +290,9 @@ fish_sound_comment_next_byname (FishSound * fsound,
- int
- fish_sound_comment_add (FishSound * fsound, FishSoundComment * comment)
- {
-+#if FS_ENCODE
-   FishSoundComment * new_comment;
-+#endif
- 
-   if (fsound == NULL) return FISH_SOUND_ERR_BAD;
- 
-@@ -317,7 +319,9 @@ int
- fish_sound_comment_add_byname (FishSound * fsound, const char * name,
- 			       const char * value)
- {
-+#if FS_ENCODE
-   FishSoundComment * comment;
-+#endif
- 
-   if (fsound == NULL) return FISH_SOUND_ERR_BAD;
- 
-@@ -346,7 +350,9 @@ fish_sound_comment_add_byname (FishSound * fsound, const char * name,
- int
- fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment)
- {
-+#if FS_ENCODE
-   FishSoundComment * v_comment;
-+#endif
- 
-   if (fsound == NULL) return FISH_SOUND_ERR_BAD;
- 
-@@ -372,8 +378,11 @@ fish_sound_comment_remove (FishSound * fsound, FishSoundComment * comment)
- int
- fish_sound_comment_remove_byname (FishSound * fsound, char * name)
- {
-+#if FS_ENCODE
-   FishSoundComment * comment;
--  int i, ret = 0;
-+  int i;
-+#endif
-+  int ret = 0;
- 
-   if (fsound == NULL) return FISH_SOUND_ERR_BAD;
- 
deleted file mode 100644
--- a/media/libfishsound/update.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-# Usage: cp $1/update.sh <libfishsound_src_directory>
-#
-# Copies the needed files from a directory containing the original
-# libfishsound source that we need for the Mozilla HTML5 media support.
-cp $1/config.h ./include/fishsound/config.h
-echo "#undef FS_ENCODE" >>./include/fishsound/config.h
-echo "#define FS_ENCODE 0" >>./include/fishsound/config.h
-echo "#undef HAVE_FLAC" >>./include/fishsound/config.h
-echo "#define HAVE_FLAC 0" >>./include/fishsound/config.h
-echo "#undef HAVE_OGGZ" >>./include/fishsound/config.h
-echo "#define HAVE_OGGZ 1" >>./include/fishsound/config.h
-echo "#undef HAVE_SPEEX" >>./include/fishsound/config.h
-echo "#define HAVE_SPEEX 0" >>./include/fishsound/config.h
-echo "#undef HAVE_VORBIS" >>./include/fishsound/config.h
-echo "#define HAVE_VORBIS 1" >>./include/fishsound/config.h
-echo "#undef HAVE_VORBISENC" >>./include/fishsound/config.h
-echo "#define HAVE_VORBISENC 0" >>./include/fishsound/config.h
-echo "#undef DEBUG" >>./include/fishsound/config.h
-cp $1/include/fishsound/encode.h ./include/fishsound/encode.h
-cp $1/include/fishsound/comments.h ./include/fishsound/comments.h
-cp $1/include/fishsound/deprecated.h ./include/fishsound/deprecated.h
-cp $1/include/fishsound/fishsound.h ./include/fishsound/fishsound.h
-cp $1/include/fishsound/constants.h ./include/fishsound/constants.h
-cp $1/include/fishsound/decode.h ./include/fishsound/decode.h
-cp $1/COPYING ./COPYING
-cp $1/README ./README
-cp ./include/fishsound/config.h ./src/libfishsound/config.h
-cp $1/src/libfishsound/decode.c ./src/libfishsound/fishsound_decode.c
-cp $1/src/libfishsound/fishsound.c ./src/libfishsound/fishsound.c
-sed s/\#include\ \<vorbis\\/vorbisenc.h\>/\#if\ HAVE_VORBISENC\\n\#include\ \<vorbis\\/vorbisenc.h\>\\n\#endif/g  $1/src/libfishsound/vorbis.c >./src/libfishsound/fishsound_vorbis.c
-cp $1/src/libfishsound/flac.c ./src/libfishsound/fishsound_flac.c
-cp $1/src/libfishsound/comments.c ./src/libfishsound/fishsound_comments.c
-cp $1/src/libfishsound/private.h ./src/libfishsound/private.h
-cp $1/src/libfishsound/fs_compat.h ./src/libfishsound/fs_compat.h
-cp $1/src/libfishsound/speex.c ./src/libfishsound/fishsound_speex.c
-cp $1/src/libfishsound/encode.c ./src/libfishsound/fishsound_encode.c
-cp $1/src/libfishsound/fs_vector.h ./src/libfishsound/fs_vector.h
-cp $1/src/libfishsound/fs_vector.c ./src/libfishsound/fs_vector.c
-cp $1/src/libfishsound/convert.h ./src/libfishsound/convert.h
-cp $1/src/libfishsound/debug.h ./src/libfishsound/debug.h
-cp $1/AUTHORS ./AUTHORS
-patch -p3 <endian.patch
-patch -p3 <bug487519.patch
-patch -p3 <trac497.patch
-patch -p3 <fishsound_reset.patch
-patch -p3 <bug520500.patch
deleted file mode 100644
--- a/media/liboggplay/COPYING
+++ /dev/null
@@ -1,29 +0,0 @@
-   Copyright (C) 2003 CSIRO Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   
-   - Neither the name of the CSIRO nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-   
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
deleted file mode 100644
--- a/media/liboggplay/Makefile.in
+++ /dev/null
@@ -1,51 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla code.
-#
-# The Initial Developer of the Original Code is the Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Chris Double <chris.double@double.co.nz>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= oggplay
-
-DIRS		= \
-		include \
-		src \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/liboggplay/README
+++ /dev/null
@@ -1,68 +0,0 @@
-OggPlay: a library for playing Ogg multimedia
-
-Overview
---------
-
-The current version of the plugin is still under development therefore
-the setup requires manual installation of the plugin. For more information,
-see also:
-
-  http://wiki.xiph.org/index.php/OggPlay
-
-Dependencies
-------------
-
-For the core library (liboggplay), you need
-
-  * libogg, libvorbis, libtheora, optionally libspeex -- from http://www.xiph.org/
-
-    svn co http://svn.xiph.org/trunk/ogg/ ogg
-    svn co http://svn.xiph.org/trunk/vorbis/ vorbis
-    svn co http://svn.xiph.org/trunk/theora/ theora
-
-  * liboggz and libfishsound -- from svn.annodex.net:
-
-    git clone git://git.xiph.org/liboggz.git
-    git clone git://git.xiph.org/libfishsound.git
-
-Optionally, for Kate stream support, you need
-
-  * libkate -- from http://libkate.googlecode.com/
-
-To render Kate streams as video overlays, you need
-
-  * libtiger -- from http://libtiger.googlecode.com/
-
-Note that libtiger needs Pango and Cairo:
-
-  * Pango -- http://www.pango.org/
-  * Cairo -- http://cairographics.com/
-
-See the README files associated with these libraries for installation
-instructions.
-
-To build src/examples/glut-player, you need:
-  * The core liboggplay dependencies (listed above)
-  * GLUT -- see http://www.opengl.org/resources/libraries/
-
-To build src/examples/dump-all-streams, you need:
-  * The core liboggplay dependencies (listed above)
-  * libsndfile -- from http://www.mega-nerd.com/libsndfile/
-
-To build src/tools/oggplay-dump-first-frame, you need:
-  * The core liboggplay dependencies (listed above)
-  * Imlib2 -- from your distribution or from 
-              http://sourceforge.net/project/showfiles.php?group_id=2&package_id=11130
-
-On Debian, the required packages for all these additional libraries are:
-  g++ libogg-dev libvorbis-dev libspeex-dev libtheora-dev libsndfile1-dev
-  libimlib2-dev libglut-dev
-
-Compile and Install liboggplay
-------------------------------
-
-./autogen.sh
-./configure
-make && make install
-
-
deleted file mode 100644
--- a/media/liboggplay/README_MOZILLA
+++ /dev/null
@@ -1,48 +0,0 @@
-The source from this directory was copied from the liboggplay svn
-source using the update.sh script. The only changes made were those
-applied by update.sh and the addition/upate of Makefile.in files for
-the Mozilla build system.
-
-git://git.xiph.org/liboggplay.git
-
-The git commit ID used was 404316e5957370b3c854a86910c237c90746c325.
-
-The following local patches have been applied:
-
-endian: pick up NSPR's little/big endian defines in oggplay's config.h.
-
-bug481921: fix a crash in oggplay_callback_info_prepare().
-
-aspect-ratio: Adds oggplay_get_video_aspect_ratio, used for bug 480058.
-
-bug493678.patch: fix for infinite loop in oggplay_step_decode. See bug 493678.
-
-seek_to_key_frame.patch: Adds oggplay_seek_to_keyframe(), as per bug 463358.
-
-oggplay_os2.patch: Bug 448918 - add OS/2 support (this patch should be
-                   removed when OS/2 support is added upstream)
-
-bug496529.patch: Fix bug 496529.
-
-bug500311.patch: Fix crash during decoder initialization.
-
-faster_seek.patch: Fix for bug 501031, make seeking faster over HTTP.
-
-fix-17ef4ca82df28.patch: Fix oggplay_callback_predetected() to return
-                         value interpreted as success upon success.
-                         Fixes liboggplay changeset 17ef4ca82df28.
-
-handle-read-errors.patch: Make oggplay_initialise() handle closing of stream
-                          while reading. Prevents infinite loop. Further fix
-                          to 17ef4ca82df28.
-
-bug515217.patch: Fix crash where presentation thread releases a buffer just
-                 before decode thread tries to set that buffer as the last at EOF.
-bug504843.patch: Abort when decoding video excessively large video frames.
-
-fishsound_reset.patch: Fixes bug 516323.
-
-bug520493.patch: Ensure liboggplay returns data when all tracks
-                 are deactivated when a callback reaches EOF.
-
-bug523816.patch: Correct CMML data buffer size calculation.
deleted file mode 100644
--- a/media/liboggplay/aspect_ratio.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff --git a/media/liboggplay/include/oggplay/oggplay.h b/media/liboggplay/include/oggplay/oggplay.h
---- a/media/liboggplay/include/oggplay/oggplay.h
-+++ b/media/liboggplay/include/oggplay/oggplay.h
-@@ -226,16 +226,19 @@ oggplay_get_audio_samplerate(OggPlay *me
-  * @retval E_OGGPLAY_BAD_TRACK the given track number does not exists
-  * @retval E_OGGPLAY_WRONG_TRACK_TYPE the given track is not an audio track
-  * @retval E_OGGPLAY_UNINITIALISED the OggPlay handle is uninitalised.
-  */
- OggPlayErrorCode
- oggplay_get_video_fps(OggPlay *me, int track, int* fps_denom, int* fps_num);
- 
- OggPlayErrorCode
-+oggplay_get_video_aspect_ratio(OggPlay *me, int track, int* aspect_denom, int* aspect_num);
-+
-+OggPlayErrorCode
- oggplay_convert_video_to_rgb(OggPlay *me, int track, int convert, int swap_rgb);
- 
- OggPlayErrorCode
- oggplay_get_kate_category(OggPlay *me, int track, const char** category);
- 
- OggPlayErrorCode
- oggplay_get_kate_language(OggPlay *me, int track, const char** language);
- 
-diff --git a/media/liboggplay/src/liboggplay/oggplay.c b/media/liboggplay/src/liboggplay/oggplay.c
---- a/media/liboggplay/src/liboggplay/oggplay.c
-+++ b/media/liboggplay/src/liboggplay/oggplay.c
-@@ -297,16 +297,45 @@ oggplay_get_video_fps(OggPlay *me, int t
- 
-   (*fps_denom) = decode->video_info.fps_denominator;
-   (*fps_num) = decode->video_info.fps_numerator;
- 
-   return E_OGGPLAY_OK;
- }
- 
- OggPlayErrorCode
-+oggplay_get_video_aspect_ratio(OggPlay *me, int track, int* aspect_denom, int* aspect_num) {
-+  OggPlayTheoraDecode *decode;
-+
-+  if (me == NULL) {
-+    return E_OGGPLAY_BAD_OGGPLAY;
-+  }
-+
-+  if (track < 0 || track >= me->num_tracks) {
-+    return E_OGGPLAY_BAD_TRACK;
-+  }
-+
-+  if (me->decode_data[track]->decoded_type != OGGPLAY_YUV_VIDEO) {
-+    return E_OGGPLAY_WRONG_TRACK_TYPE;
-+  }
-+
-+  decode = (OggPlayTheoraDecode *)(me->decode_data[track]);
-+
-+  if ((decode->video_info.aspect_denominator == 0)
-+    || (decode->video_info.aspect_numerator == 0)) {
-+    return E_OGGPLAY_UNINITIALISED;
-+  }
-+
-+  (*aspect_denom) = decode->video_info.aspect_denominator;
-+  (*aspect_num) = decode->video_info.aspect_numerator;
-+
-+  return E_OGGPLAY_OK;
-+}
-+
-+OggPlayErrorCode
- oggplay_convert_video_to_rgb(OggPlay *me, int track, int convert, int swap_rgb) {
-   OggPlayTheoraDecode *decode;
- 
-   if (me == NULL) {
-     return E_OGGPLAY_BAD_OGGPLAY;
-   }
- 
-   if (track < 0 || track >= me->num_tracks) {
deleted file mode 100644
--- a/media/liboggplay/bug481921.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay_callback_info.c b/media/liboggplay/src/liboggplay/oggplay_callback_info.c
---- a/media/liboggplay/src/liboggplay/oggplay_callback_info.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_callback_info.c
-@@ -133,21 +133,23 @@ oggplay_callback_info_prepare(OggPlay *m
- 
-     track_info->available_records = count;
-     track_info->required_records = 0;
- 
-     track_info->data_type = track->decoded_type;
-  
-     count = 0;
-     for (p = q; p != NULL; p = p->next) {
--      track_info->records[count++] = p;
--      if (p->presentation_time <= me->target + track->offset) {
--        track_info->required_records++;
--        p->has_been_presented = 1;
--        //lpt = p->presentation_time;
-+      if (!p->has_been_presented) {
-+        track_info->records[count++] = p;
-+        if (p->presentation_time <= me->target + track->offset) {
-+          track_info->required_records++;
-+          p->has_been_presented = 1;
-+          //lpt = p->presentation_time;
-+        }
-       }
-     }
-      
-     if (track_info->required_records > 0) {
-       /*
-        * if the StreamState is FIRST_DATA then update it to INITIALISED, 
-        * as we've marked the first data instance
-        */
deleted file mode 100644
--- a/media/liboggplay/bug487519.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay_callback.c b/media/liboggplay/src/liboggplay/oggplay_callback.c
---- a/media/liboggplay/src/liboggplay/oggplay_callback.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_callback.c
-@@ -543,16 +543,26 @@ oggplay_callback_audio (OGGZ * oggz, ogg
-     }
-     
-     default:
-       /* there was no problem with decoding */
-       if (!common->num_header_packets) common->initialised |= 1;
-       break;
-   }
- 
-+  if (bytes_read < 0) {
-+    printf("\nERROR HADNLING MISMATCH BETWEEN liboggplay AND mozilla\n\n");
-+    // Unrecoverable error, disable track
-+    op->e_o_s = 1;
-+    common->active = 0;
-+    common->player->active_tracks--;
-+    return OGGZ_ERR_HOLE_IN_DATA;
-+  }
-+
-+
-   if (decoder->sound_info.channels == 0) {
-     fish_sound_command(decoder->sound_handle, FISH_SOUND_GET_INFO,
-                        &(decoder->sound_info), sizeof(FishSoundInfo));
-   }
- 
-   if (op->e_o_s) {
-     common->active = 0;
-     common->player->active_tracks--;
deleted file mode 100644
--- a/media/liboggplay/bug493678.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay_callback.c b/media/liboggplay/src/liboggplay/oggplay_callback.c
-index 7683b80..ad127a0 100644
---- a/media/liboggplay/src/liboggplay/oggplay_callback.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_callback.c
-@@ -536,7 +536,7 @@ oggplay_initialise_decoder(OggPlay *me, int content_type, int serialno) {
-   decoder->content_type = content_type;
-   decoder->content_type_name =
-           oggz_stream_get_content_type (me->oggz, serialno);
--  decoder->active = 1;
-+  decoder->active = 0;
-   decoder->final_granulepos = -1;
-   decoder->player = me;
-   decoder->decoded_type = OGGPLAY_TYPE_UNKNOWN;
deleted file mode 100644
--- a/media/liboggplay/bug496529.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay_yuv2rgb.c b/media/liboggplay/src/liboggplay/oggplay_yuv2rgb.c
---- a/media/liboggplay/src/liboggplay/oggplay_yuv2rgb.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_yuv2rgb.c
-@@ -174,17 +174,17 @@ YUV_CONVERT(yuv444_to_argb_vanilla, CONV
-  * macros as there's no way e.g. we could compile a x86 asm code 
-  * on a ppc machine and vica-versa
-  */
- #if defined(i386) || defined(__x86__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64)
- #if !defined(_M_AMD64)
- #define ENABLE_MMX
- #endif
- #include "x86/oggplay_yuv2rgb_x86.c"
--#if defined(ATTRIBUTE_ALIGNED_MAX) && ATTRIBUTE_ALIGNED_MAX >= 16 
-+#if defined(_MSC_VER) || defined(ATTRIBUTE_ALIGNED_MAX) && ATTRIBUTE_ALIGNED_MAX >= 16 
- #define ENABLE_SSE2
- #endif
- #elif defined(__ppc__) || defined(__ppc64__)
- #define ENABLE_ALTIVEC
- //altivec intristics only working with -maltivec gcc flag, 
- //but we want runtime altivec detection, hence this has to be
- //fixed!
- //#include "oggplay_yuv2rgb_altivec.c"
deleted file mode 100644
--- a/media/liboggplay/bug500311.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay.c b/media/liboggplay/src/liboggplay/oggplay.c
---- a/media/liboggplay/src/liboggplay/oggplay.c
-+++ b/media/liboggplay/src/liboggplay/oggplay.c
-@@ -149,16 +149,17 @@ oggplay_initialise(OggPlay *me, int bloc
-   }
- 
-   /*
-    * set all the tracks to inactive
-    */
-   for (i = 0; i < me->num_tracks; i++) {
-     me->decode_data[i]->active = 0;
-   }
-+  me->active_tracks = 0;
- 
-   /*
-    * if the buffer was set up before initialisation, prepare it now
-    */
-   if (me->buffer != NULL) {
-     oggplay_buffer_prepare(me);
-   }
- 
-diff --git a/media/liboggplay/src/liboggplay/oggplay_callback.c b/media/liboggplay/src/liboggplay/oggplay_callback.c
---- a/media/liboggplay/src/liboggplay/oggplay_callback.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_callback.c
-@@ -60,16 +60,17 @@ oggplay_init_theora(void *user_data) {
-   theora_info_init(&(decoder->video_info));
-   theora_comment_init(&(decoder->video_comment));
-   decoder->granulepos_seen = 0;
-   decoder->frame_delta = 0;
-   decoder->y_width = 0;
-   decoder->convert_to_rgb = 0;
-   decoder->swap_rgb = 0;
-   decoder->decoder.decoded_type = OGGPLAY_YUV_VIDEO;
-+  decoder->decoder.player->active_tracks++;
- }
- 
- void
- oggplay_shutdown_theora(void *user_data) {
-   OggPlayDecode         * common;
-   OggPlayTheoraDecode   * decoder = (OggPlayTheoraDecode *)user_data;
- 
-   if (decoder == NULL) {
-@@ -499,16 +500,17 @@ oggplay_init_audio (void * user_data) {
- 	}
- 		
-   decoder->sound_info.channels = 0;
-   fish_sound_set_decoded_float_ilv(decoder->sound_handle,
-                                    oggplay_fish_sound_callback_floats,
-                                    (void *)decoder);
- 
-   decoder->decoder.decoded_type = OGGPLAY_FLOATS_AUDIO;
-+  decoder->decoder.player->active_tracks++;
- }
- 
- void
- oggplay_shutdown_audio(void *user_data) {
- 
-   OggPlayAudioDecode   * decoder = (OggPlayAudioDecode *)user_data;
-   
-   if (decoder == NULL) {
-@@ -814,17 +816,17 @@ oggplay_initialise_decoder(OggPlay *me, 
- 
-   if (decoder == NULL)
-     return NULL;
- 
-   decoder->serialno = serialno;
-   decoder->content_type = content_type;
-   decoder->content_type_name =
-           oggz_stream_get_content_type (me->oggz, serialno);
--  decoder->active = 0;
-+  decoder->active = 1;
-   decoder->final_granulepos = -1;
-   decoder->player = me;
-   decoder->decoded_type = OGGPLAY_TYPE_UNKNOWN;
-   decoder->num_header_packets = 
-           oggz_stream_get_numheaders (me->oggz, serialno);
- 
-   /*
-    * set the StreamInfo to unitialised until we get some real data in
deleted file mode 100644
--- a/media/liboggplay/bug504843.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-diff --git a/media/liboggplay/include/oggplay/oggplay.h b/media/liboggplay/include/oggplay/oggplay.h
---- a/media/liboggplay/include/oggplay/oggplay.h
-+++ b/media/liboggplay/include/oggplay/oggplay.h
-@@ -116,17 +116,17 @@ oggplay_new_with_reader(OggPlayReader *r
-  *
-  * @param me OggPlay handle
-  * @param block passed as the second argument to the OggPlayReader's initialise 
-  * function. E.g. in case of OggPlayTCPReader block == 0 sets the socket to non-blocking
-  * mode.
-  * @retval E_OGGPLAY_OK on success
-  * @retval E_OGGPLAY_OGGZ_UNHAPPY something went wrong while calling oggz_io_set_* functions.
-  * @retval E_OGGPLAY_BAD_INPUT got EOF or OGGZ_ERR_HOLE_IN_DATA occured.
-- * @retval E_OGGPLAY_OUT_OF_MEMORY ran out of memory
-+ * @retval E_OGGPLAY_OUT_OF_MEMORY ran out of memory or video frame too large.
-  * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle. 
-  */
- OggPlayErrorCode
- oggplay_initialise(OggPlay *me, int block);
- 
- /**
-  * Sets a user defined OggPlayDataCallback function for the OggPlay handle.
-  *
-@@ -344,13 +344,31 @@ oggplay_get_available(OggPlay *player);
-  * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle
-  */
- ogg_int64_t
- oggplay_get_duration(OggPlay * player);
- 
- int
- oggplay_media_finished_retrieving(OggPlay * player);
- 
-+/**
-+ * Sets the maximum video frame size, in pixels, which OggPlay will attempt to
-+ * decode. Call this after oggplay_new_with_reader() but before
-+ * oggplay_initialise() to prevent crashes with excessivly large video frame
-+ * sizes. oggplay_initialise() will return E_OGGPLAY_OUT_OF_MEMORY if the
-+ * decoded video's frame requires more than max_frame_pixels. Unless
-+ * oggplay_set_max_video_size() is called, default maximum number of pixels
-+ * per frame is INT_MAX.
-+ *
-+ * @param player OggPlay handle.
-+ * @param max_frame_pixels max number of pixels per frame.
-+ * @retval E_OGGPLAY_OK on success.
-+ * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle.
-+ */
-+int
-+oggplay_set_max_video_frame_pixels(OggPlay *player,
-+                                   int max_frame_pixels);
-+
- #ifdef __cplusplus
- }
- #endif
- 
- #endif /* __OGGPLAY_H__ */
-diff --git a/media/liboggplay/src/liboggplay/oggplay.c b/media/liboggplay/src/liboggplay/oggplay.c
---- a/media/liboggplay/src/liboggplay/oggplay.c
-+++ b/media/liboggplay/src/liboggplay/oggplay.c
-@@ -68,16 +68,17 @@ oggplay_new_with_reader(OggPlayReader *r
-   me->target = 0L;
-   me->active_tracks = 0;
-   me->buffer = NULL;
-   me->shutdown = 0;
-   me->trash = NULL;
-   me->oggz = NULL;
-   me->pt_update_valid = 1;
-   me->duration = -1;
-+  me->max_video_frame_pixels = OGGPLAY_TYPE_MAX_SIGNED(int);
- 
-   return me;
- 
- }
- 
- OggPlayErrorCode
- oggplay_initialise(OggPlay *me, int block) {
- 
-@@ -958,8 +959,16 @@ oggplay_media_finished_retrieving(OggPla
-   if (me->reader == NULL) {
-     return E_OGGPLAY_BAD_READER;
-   }
- 
-   return me->reader->finished_retrieving(me->reader);
- 
- }
- 
-+int
-+oggplay_set_max_video_frame_pixels(OggPlay *player,
-+                                   int max_frame_pixels) {
-+  if (!player)
-+    return E_OGGPLAY_BAD_OGGPLAY;
-+  player->max_video_frame_pixels = max_frame_pixels;
-+  return E_OGGPLAY_OK;
-+}
-diff --git a/media/liboggplay/src/liboggplay/oggplay_callback.c b/media/liboggplay/src/liboggplay/oggplay_callback.c
---- a/media/liboggplay/src/liboggplay/oggplay_callback.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_callback.c
-@@ -83,16 +83,42 @@ oggplay_shutdown_theora(void *user_data)
-   
-   if (common->initialised == 1 && decoder->decoder.num_header_packets == 0) {
-     theora_clear(&(decoder->video_handle));
-   }
-   theora_info_clear(&(decoder->video_info));
-   theora_comment_clear(&(decoder->video_comment));
- }
- 
-+/**
-+ * Returns 1 if the video as described by |info| requires more than
-+ * max_video_pixels pixels per frame, otherwise returns 0.
-+ */
-+static int
-+frame_is_too_large(theora_info *info, long max_video_pixels) {
-+  int overflow = 0;
-+  long frame_pixels = 0;
-+  long display_pixels = 0;
-+  if (!info) {
-+    return 1;
-+  }
-+  overflow |= oggplay_mul_signed_overflow(info->frame_width,
-+                                          info->frame_height,
-+                                          &frame_pixels);
-+  overflow |= oggplay_mul_signed_overflow(info->width,
-+                                          info->height,
-+                                          &display_pixels);
-+  if (overflow ||
-+      frame_pixels > max_video_pixels ||
-+      display_pixels > max_video_pixels) {
-+    return 1;
-+  }
-+  return 0;
-+}
-+
- int
- oggplay_callback_theora (OGGZ * oggz, ogg_packet * op, long serialno,
-                          void * user_data) {
- 
-   OggPlayTheoraDecode   * decoder     = (OggPlayTheoraDecode *)user_data;
-   OggPlayDecode         * common      = NULL;
-   ogg_int64_t             granulepos  = oggz_tell_granulepos(oggz);
-   yuv_buffer              buffer;
-@@ -184,17 +210,24 @@ oggplay_callback_theora (OGGZ * oggz, og
-         ((decoder->video_info.height - decoder->video_info.offset_y)<decoder->video_info.frame_height)
-         ||
-         ((decoder->video_info.width - decoder->video_info.offset_x)<decoder->video_info.frame_width)
-       )
-       {
-         common->initialised |= -1;
-         return OGGZ_CONTINUE;
-       }
--      
-+
-+      /* Ensure the video frames don't require more pixels than our
-+       * allowed maximum. */
-+      if (frame_is_too_large(&decoder->video_info,
-+                             common->player->max_video_frame_pixels)) {
-+        return OGGZ_ERR_OUT_OF_MEMORY;
-+      }
-+
-       if (theora_decode_init(&(decoder->video_handle), &(decoder->video_info))) {
-         common->initialised |= -1;
-         return OGGZ_CONTINUE;
-       }
- 
-       common->initialised |= 1;
-     }
-     return OGGZ_CONTINUE;
-diff --git a/media/liboggplay/src/liboggplay/oggplay_private.h b/media/liboggplay/src/liboggplay/oggplay_private.h
---- a/media/liboggplay/src/liboggplay/oggplay_private.h
-+++ b/media/liboggplay/src/liboggplay/oggplay_private.h
-@@ -256,16 +256,17 @@ struct _OggPlay {
-   ogg_int64_t               target;                 /**< */
-   int                       active_tracks;          /**< number of active tracks */
-   volatile OggPlayBuffer  * buffer;                 /**< @see OggPlayBuffer */
-   ogg_int64_t               presentation_time;      /**< */
-   OggPlaySeekTrash        * trash;                  /**< @see OggPlaySeekTrash */
-   int                       shutdown;               /**< "= 1" indicates shutdown event */
-   int                       pt_update_valid;        /**< */
-   ogg_int64_t               duration;	              /**< The value of the duration the last time it was retrieved.*/
-+  int                       max_video_frame_pixels; /**< Maximum number of pixels we'll allow in a video frame.*/
- };
- 
- void
- oggplay_set_data_callback_force(OggPlay *me, OggPlayDataCallback callback,
-                                 void *user);
- 
- void
- oggplay_take_out_trash(OggPlay *me, OggPlaySeekTrash *trash);
deleted file mode 100644
--- a/media/liboggplay/bug515217.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay.c b/media/liboggplay/src/liboggplay/oggplay.c
---- a/media/liboggplay/src/liboggplay/oggplay.c
-+++ b/media/liboggplay/src/liboggplay/oggplay.c
-@@ -746,29 +746,27 @@ read_more_data:
-         * set all of the tracks to inactive
-         */
-         for (i = 0; i < me->num_tracks; i++) {
-           me->decode_data[i]->active = 0;
-         }
-         me->active_tracks = 0;
- 
-         if (info != NULL) {
-+          /* ensure all tracks have their final data packet set to end_of_stream */
-+          OggPlayCallbackInfo *p = info[0];
-+          for (i = 0; i < me->num_tracks; i++) {
-+            p->stream_info = OGGPLAY_STREAM_LAST_DATA;
-+            p++;
-+          }
-+
-           me->callback (me, num_records, info, me->callback_user_ptr);
-           oggplay_callback_info_destroy(me, info);
-         }
- 
--        /*
--        * ensure all tracks have their final data packet set to end_of_stream
--        * But skip doing this if we're shutting down --- me->buffer may not
--        * be in a safe state.
--        */
--        if (me->buffer != NULL && !me->shutdown) {
--          oggplay_buffer_set_last_data(me, me->buffer);
--        }
--
-         /* we reached the end of the stream */
-         return E_OGGPLAY_OK;
-               
-       case OGGZ_ERR_HOLE_IN_DATA:
-         /* there was a whole in the data */
-         return E_OGGPLAY_BAD_INPUT;
- 
-       case OGGZ_ERR_STOP_ERR:
-diff --git a/media/liboggplay/src/liboggplay/oggplay_buffer.c b/media/liboggplay/src/liboggplay/oggplay_buffer.c
---- a/media/liboggplay/src/liboggplay/oggplay_buffer.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_buffer.c
-@@ -138,38 +138,16 @@ oggplay_buffer_is_full(volatile OggPlayB
-       buffer->buffer_list[WRAP_INC(buffer->last_filled, buffer->buffer_size)]
-       !=
-       NULL
-     )
-   );
- 
- }
- 
--void
--oggplay_buffer_set_last_data(OggPlay *me, volatile OggPlayBuffer *buffer) 
--{
--
--  int                   i;
--  OggPlayCallbackInfo   *p;
--
--  /*
--   * we're at last data before we've even started!
--   */
--  if (buffer->last_filled == -1) {
--    return;
--  }
--
--  p = (OggPlayCallbackInfo *)buffer->buffer_list[buffer->last_filled];
--
--  for (i = 0; i < me->num_tracks; i++) {
--    p->stream_info = OGGPLAY_STREAM_LAST_DATA;
--    p++;
--  }
--}
--
- int
- oggplay_buffer_callback(OggPlay *me, int tracks,
-                         OggPlayCallbackInfo **track_info, void *user) {
- 
-   int                   i;
-   int                   j;
-   int                   k;
-   OggPlayDataHeader  ** headers;
-diff --git a/media/liboggplay/src/liboggplay/oggplay_buffer.h b/media/liboggplay/src/liboggplay/oggplay_buffer.h
---- a/media/liboggplay/src/liboggplay/oggplay_buffer.h
-+++ b/media/liboggplay/src/liboggplay/oggplay_buffer.h
-@@ -53,12 +53,9 @@ int
- oggplay_buffer_is_full(volatile OggPlayBuffer *buffer);
- 
- void
- oggplay_buffer_shutdown(OggPlay *me, volatile OggPlayBuffer *buffer);
- 
- void
- oggplay_buffer_prepare(OggPlay *me);
- 
--void
--oggplay_buffer_set_last_data(OggPlay *me, volatile OggPlayBuffer *buffer);
--
- #endif
deleted file mode 100644
--- a/media/liboggplay/bug520493.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay.c b/media/liboggplay/src/liboggplay/oggplay.c
---- a/media/liboggplay/src/liboggplay/oggplay.c
-+++ b/media/liboggplay/src/liboggplay/oggplay.c
-@@ -638,16 +638,17 @@ OggPlayErrorCode
- oggplay_step_decoding(OggPlay *me) {
- 
-   OggPlayCallbackInfo  ** info;
-   int                     num_records;
-   int                     r;
-   int                     i;
-   int                     need_data  = 0;
-   int                     chunk_count = 0;
-+  int                     read_data = 0;
- 
-   if (me == NULL) {
-     return E_OGGPLAY_BAD_OGGPLAY;
-   }
-   
-   /* 
-    * check whether the OggPlayDataCallback is set for the given
-    * OggPlay handle. If not return with error as there's no callback 
-@@ -686,17 +687,21 @@ read_more_data:
-     if (me->active_tracks == 0) {
-       int remaining = 0;
-       for (i = 0; i < me->num_tracks; i++) {
-         if (me->decode_data[i]->current_loc +
-                      me->decode_data[i]->granuleperiod >= me->target + me->decode_data[i]->offset) {
-           remaining++;
-         }
-       }
--      if (remaining == 0) {
-+      if (remaining == 0 && !read_data) {
-+        /*
-+         * There's no more data to read, and we've not read any that needs 
-+         * to be sent to the buffer list via a callback, so exit.
-+         */
-         return E_OGGPLAY_OK;
-       }
-     }
- 
-     /*
-      * if any of the tracks have not yet met the target (modified by that
-      * track's offset), then retrieve more data
-      */
-@@ -783,16 +788,21 @@ read_more_data:
-          * e.g. some buffer overflow.
-          */
-       
-       case OGGZ_ERR_OUT_OF_MEMORY:
-         /* ran out of memory during decoding! */
-         return E_OGGPLAY_OUT_OF_MEMORY;
-                 
-       default:
-+        /*
-+         * We read some data. Set a flag so that we're guaranteed to try to
-+         * send it to the buffer list via a callback.
-+         */
-+        read_data = 1;
-         break;
-     }
-   }
-   /*
-    * prepare a callback
-    */
-   num_records = oggplay_callback_info_prepare (me, &info);
-   if (info != NULL) {
deleted file mode 100644
--- a/media/liboggplay/bug523816.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay_data.c b/media/liboggplay/src/liboggplay/oggplay_data.c
---- a/media/liboggplay/src/liboggplay/oggplay_data.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_data.c
-@@ -353,22 +353,19 @@ oggplay_data_handle_audio_data (OggPlayD
- OggPlayErrorCode
- oggplay_data_handle_cmml_data(OggPlayDecode *decode, 
-                               unsigned char *data, 
-                               long size) {
- 
-   OggPlayTextRecord * record = NULL;
-   size_t              record_size = sizeof(OggPlayTextRecord);
- 
--  /* check that the size we want to allocate doesn't overflow */
--  if ((size < 0) || (size+1 < 0)) {
--    return E_OGGPLAY_TYPE_OVERFLOW;
--  }
--  size += 1;
--  
-+  /* Include extra byte for null terminating record data buffer */
-+  record_size += 1;
-+
-   if 
-   (
-     oggplay_check_add_overflow (record_size, size, &record_size)
-     == 
-     E_OGGPLAY_TYPE_OVERFLOW
-   ) 
-   {
-     return E_OGGPLAY_TYPE_OVERFLOW;
deleted file mode 100644
--- a/media/liboggplay/endian.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/config.h b/media/liboggplay/src/liboggplay/config.h
---- a/media/liboggplay/src/liboggplay/config.h
-+++ b/media/liboggplay/src/liboggplay/config.h
-@@ -102,8 +102,14 @@
- # ifndef WORDS_BIGENDIAN
- /* #  undef WORDS_BIGENDIAN */
- # endif
- #endif
- 
- /* Define to empty if `const' does not conform to ANSI C. */
- /* #undef const */
- #undef HAVE_GLUT
-+
-+#include "prcpucfg.h"
-+#ifdef IS_BIG_ENDIAN
-+#define WORDS_BIGENDIAN 1
-+#endif
-+
deleted file mode 100644
--- a/media/liboggplay/faster_seek.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff --git a/media/liboggplay/include/oggplay/oggplay_seek.h b/media/liboggplay/include/oggplay/oggplay_seek.h
---- a/media/liboggplay/include/oggplay/oggplay_seek.h
-+++ b/media/liboggplay/include/oggplay/oggplay_seek.h
-@@ -53,15 +53,13 @@
- OggPlayErrorCode
- oggplay_seek(OggPlay *me, ogg_int64_t milliseconds);
- 
- /**
-  * Seeks to key frame before |milliseconds|.
-  */
- OggPlayErrorCode
- oggplay_seek_to_keyframe(OggPlay *me,
--                         int* tracks,
--                         int num_tracks,
-                          ogg_int64_t milliseconds,
-                          ogg_int64_t offset_begin,
-                          ogg_int64_t offset_end);
- 
- #endif
-diff --git a/media/liboggplay/src/liboggplay/oggplay_seek.c b/media/liboggplay/src/liboggplay/oggplay_seek.c
---- a/media/liboggplay/src/liboggplay/oggplay_seek.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_seek.c
-@@ -186,54 +186,39 @@ oggplay_take_out_trash(OggPlay *me, OggP
- 
-   if (p != NULL) {
-     oggplay_free(p);
-   }
- }
- 
- OggPlayErrorCode
- oggplay_seek_to_keyframe(OggPlay *me,
--                         int* tracks,
--                         int num_tracks,
-                          ogg_int64_t milliseconds,
-                          ogg_int64_t offset_begin,
-                          ogg_int64_t offset_end)
- {
--  long *serial_nos;
--  int i;
-   ogg_int64_t eof, time;
- 
-   if (me == NULL) {
-     return E_OGGPLAY_BAD_OGGPLAY;
-   }
- 
--  if (num_tracks > me->num_tracks || milliseconds < 0)
-+  if (milliseconds < 0)
-     return E_OGGPLAY_CANT_SEEK;
-   
-   eof = oggplay_get_duration(me);
-   if (eof > -1 && milliseconds > eof) {
-     return E_OGGPLAY_CANT_SEEK;
-   }
- 
--  // Get the serialnos for the tracks we're seeking.
--  serial_nos = (long*)oggplay_malloc(sizeof(long)*num_tracks);
--  if (!serial_nos) {
--    return E_OGGPLAY_CANT_SEEK;
--  }
--  for (i=0; i<num_tracks; i++) {
--    serial_nos[i] = me->decode_data[tracks[i]]->serialno;
--  }
- 
-   time = oggz_keyframe_seek_set(me->oggz,
--                                serial_nos,
--                                num_tracks,
-                                 milliseconds,
-                                 offset_begin,
-                                 offset_end);
--  oggplay_free(serial_nos);
- 
-   if (time == -1) {
-     return E_OGGPLAY_CANT_SEEK;
-   }
- 
-   oggplay_seek_cleanup(me, time);
- 
-   return E_OGGPLAY_OK;
deleted file mode 100644
--- a/media/liboggplay/fishsound_reset.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay_seek.c b/media/liboggplay/src/liboggplay/oggplay_seek.c
---- a/media/liboggplay/src/liboggplay/oggplay_seek.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_seek.c
-@@ -166,6 +166,20 @@ oggplay_seek_cleanup(OggPlay* me, ogg_in
- 
-   *p = trash;
-   
-+  if (milliseconds == 0) {
-+    for (i = 0; i < me->num_tracks; i++) {
-+      OggPlayDecode *track = me->decode_data[i];
-+      FishSound *sound_handle;
-+      OggPlayAudioDecode *audio_decode;
-+      if (track->content_type != OGGZ_CONTENT_VORBIS) {
-+        continue;
-+      }
-+      audio_decode = (OggPlayAudioDecode*)track;
-+      sound_handle = audio_decode->sound_handle;
-+      fish_sound_reset(sound_handle);
-+    }
-+  }
-+  
-   return E_OGGPLAY_OK;
- }
- 
deleted file mode 100644
--- a/media/liboggplay/fix-17ef4ca82df28.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay_callback.c b/media/liboggplay/src/liboggplay/oggplay_callback.c
---- a/media/liboggplay/src/liboggplay/oggplay_callback.c
-+++ b/media/liboggplay/src/liboggplay/oggplay_callback.c
-@@ -977,10 +982,10 @@ oggplay_callback_predetected (OGGZ *oggz
-       }
-     }
-     
-     /* disable the callback for unforeseen streams */
-     oggz_set_read_callback (me->oggz, -1, NULL, NULL);
-   }
-   
-   /* read the header part of the ogg content in a packet-by-packet manner */
--  return ((ret < 0) ? ret : OGGZ_STOP_OK);
-+  return ((ret < 0) ? ret : OGGZ_CONTINUE);
- }
deleted file mode 100644
--- a/media/liboggplay/handle-read-errors.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/media/liboggplay/src/liboggplay/oggplay.c b/media/liboggplay/src/liboggplay/oggplay.c
---- a/media/liboggplay/src/liboggplay/oggplay.c
-+++ b/media/liboggplay/src/liboggplay/oggplay.c
-@@ -136,16 +136,22 @@ oggplay_initialise(OggPlay *me, int bloc
-       
-       case OGGZ_ERR_OUT_OF_MEMORY:
-         /* ran out of memory during decoding! */
-         return E_OGGPLAY_OUT_OF_MEMORY;
-       
-       case OGGZ_ERR_STOP_ERR:
-         /* */
-         return E_OGGPLAY_BAD_OGGPLAY;
-+
-+      default:
-+        /* If the read otherwise failed, bail out. */
-+        if (i < 0)
-+          return E_OGGPLAY_BAD_INPUT;
-+        break;
-     }
- 
-     if (me->all_tracks_initialised) {
-       break;
-     }
-   }
- 
-   /*
deleted file mode 100644
--- a/media/liboggplay/include/Makefile.in
+++ /dev/null
@@ -1,47 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla code.
-#
-# The Initial Developer of the Original Code is the Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Chris Double <chris.double@double.co.nz>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= oggplay
-DIRS		= oggplay
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/liboggplay/include/oggplay/Makefile.in
+++ /dev/null
@@ -1,57 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla code.
-#
-# The Initial Developer of the Original Code is the Mozilla Corporation.
-# Portions created by the Initial Developer are Copyright (C) 2007
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Chris Double <chris.double@double.co.nz>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-EXPORTS_NAMESPACES = oggplay
-
-EXPORTS_oggplay = \
-  config_win32.h \
-  oggplay.h \
-  oggplay_callback_info.h \
-  oggplay_enums.h \
-  oggplay_reader.h \
-  oggplay_tools.h \
-  oggplay_seek.h \
-  oggplay_query.h \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/media/liboggplay/include/oggplay/config_win32.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* config.h.  Generated from config.h.in by configure.  */
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-/* #undef HAVE_INTTYPES_H */
-
-/* Define to 1 if you have the <memory.h> header file. */
-/* #undef HAVE_MEMORY_H */
-
-/* Define if have liboggz */
-#define HAVE_OGGZ 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-/* #undef HAVE_STDINT_H */
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-/* #undef HAVE_STRINGS_H */
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-/* #undef HAVE_SYS_STAT_H */
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-/* #undef HAVE_SYS_TYPES_H */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-/* #undef HAVE_UNISTD_H */
-
-/* Name of package */
-#define PACKAGE "liboggplay"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "0.2.0"
-
-/* Request Winsock 2.2 */
-#define HAVE_WINSOCK2 1
-
-/* Make sure inline is treated properly */ 
-#define inline __inline
-
-/* snprintf portability */
-#define snprintf _snprintf
-
-/* Define to 1 if your processor stores words with the most significant byte
-   first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Maximum supported data alignment */
-#define ATTRIBUTE_ALIGNED_MAX 16
deleted file mode 100644
--- a/media/liboggplay/include/oggplay/oggplay.h
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
-   Copyright (C) 2003 Commonwealth Scientific and Industrial Research
-   Organisation (CSIRO) Australia
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of CSIRO Australia nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/** @file
- * 
- * The liboggplay C API.
- *
- * @authors
- * Shane Stephens <shane.stephens@annodex.net>
- * Michael Martin
- * Viktor Gal
- */
- 
-#ifndef __OGGPLAY_H__
-#define __OGGPLAY_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <oggplay/oggplay_enums.h>
-#include <oggplay/oggplay_reader.h>
- 
-/**
- * This is returned by oggplay_open_with_reader() or oggplay_new_with_reader().
- */
-typedef struct _OggPlay OggPlay;
-
-/**
- * A structure for storing the decoded frames for the various streams in the 
- * Ogg container.
- */
-typedef struct _OggPlayCallbackInfo OggPlayCallbackInfo;
-
-/**
- * This is the signature of a callback which you must provide for OggPlay
- * to call whenever there's any unpresented decoded frame available.
- * 
- * @see oggplay_step_decoding
- * @param player The OggPlay handle
- * @param num_records size of the OggPlayCallbackInfo array
- * @param records array of OggPlayCallbackInfo
- * @param user A generic pointer for the data the user provided earlier.
- * @returns 0 to continue, non-zero to instruct OggPlay to stop.
- *
- */
-typedef int (OggPlayDataCallback) (OggPlay *player, int num_records, 
-                                   OggPlayCallbackInfo **records, void *user);
-
-#include <oggplay/oggplay_query.h>
-#include <oggplay/oggplay_callback_info.h>
-#include <oggplay/oggplay_tools.h>
-#include <oggplay/oggplay_seek.h>
-
-/**
- * Create an OggPlay handle associated with the given reader.
- * 
- * This functions creates a new OggPlay handle associated with 
- * the OggPlayReader and it calls oggplay_initialise to 
- * read the header packets of the Ogg container. 
- *
- * @param reader an OggPlayReader handle associated with the Ogg content
- * @return A new OggPlay handle
- * @retval NULL in case of error.
- */
-OggPlay *
-oggplay_open_with_reader(OggPlayReader *reader);
-
-/**
- * Create a new OggPlay handle associated with the given reader.
- *
- * @param reader OggPlayReader handle associated with the Ogg content
- * @return A new OggPlay handle
- * @retval NULL in case of error.
- */
-OggPlay *
-oggplay_new_with_reader(OggPlayReader *reader);
-
-
-/**
- * Initialise the OggPlay handle.
- * 
- * This function creates an Oggz handle and sets it's OggzIO*
- * functions to the OggPlayReader's io_* functions. Moreover
- * it reads the Ogg container's content until it hasn't got 
- * all the streams' headers.
- *
- * @param me OggPlay handle
- * @param block passed as the second argument to the OggPlayReader's initialise 
- * function. E.g. in case of OggPlayTCPReader block == 0 sets the socket to non-blocking
- * mode.
- * @retval E_OGGPLAY_OK on success
- * @retval E_OGGPLAY_OGGZ_UNHAPPY something went wrong while calling oggz_io_set_* functions.
- * @retval E_OGGPLAY_BAD_INPUT got EOF or OGGZ_ERR_HOLE_IN_DATA occured.
- * @retval E_OGGPLAY_OUT_OF_MEMORY ran out of memory or video frame too large.
- * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle. 
- */
-OggPlayErrorCode
-oggplay_initialise(OggPlay *me, int block);
-
-/**
- * Sets a user defined OggPlayDataCallback function for the OggPlay handle.
- *
- * @param me OggPlay handle.
- * @param callback A custom callback function.
- * @param user Arbitrary data one wishes to pass to the callback function.
- * @retval E_OGGPLAY_OK on success 
- * @retval E_OGGPLAY_BUFFER_MODE We are running in buffer mode, i.e. oggplay_use_buffer 
- * has been called earlier.
- * @retval E_OGGPLAY_BAD_OGGPLAY Invalid OggPlay handle.
- */
-OggPlayErrorCode
-oggplay_set_data_callback(OggPlay *me, OggPlayDataCallback callback, 
-                          void *user);
-
-
-OggPlayErrorCode
-oggplay_set_callback_num_frames(OggPlay *me, int stream, int frames);
-
-OggPlayErrorCode
-oggplay_set_callback_period(OggPlay *me, int stream, int milliseconds);
-
-OggPlayErrorCode
-oggplay_set_offset(OggPlay *me, int track, ogg_int64_t offset);
-
-/**
- * Get the given video track's Y-plane's width and height.
- * 
- * @param me OggPlay handle
- * @param track the track number of the video track
- * @param y_width the width of the Y-plane
- * @param y_height the height of the Y-plane
- * @retval E_OGGPLAY_OK on success.
- * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle
- * @retval E_OGGPLAY_BAD_TRACK the given track number does not exists
- * @retval E_OGGPLAY_WRONG_TRACK_TYPE the given track is not an audio track
- * @retval E_OGGPLAY_UNINITIALISED the OggPlay handle is uninitalised.
- */
-OggPlayErrorCode
-oggplay_get_video_y_size(OggPlay *me, int track, int *y_width, int *y_height);
-
-/**
- * Get the given video track's UV-plane's width and height.
- * 
- * @param me OggPlay handle
- * @param track the track number of the video track
- * @param uv_width the width of the UV-plane
- * @param uv_height the height of the UV-plane
- * @retval E_OGGPLAY_OK on success.
- * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle
- * @retval E_OGGPLAY_BAD_TRACK the given track number does not exists
- * @retval E_OGGPLAY_WRONG_TRACK_TYPE the given track is not an audio track
- * @retval E_OGGPLAY_UNINITIALISED the OggPlay handle is uninitalised.
- */
-OggPlayErrorCode
-oggplay_get_video_uv_size(OggPlay *me, int track, int *uv_width, int *uv_height);
-
-/**
- * Get the number of channels of the audio track.
- * 
- * @param me OggPlay handle
- * @param track the track number of the audio track
- * @param channels the number of channels of the given audio track.
- * @retval E_OGGPLAY_OK on success.
- * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle
- * @retval E_OGGPLAY_BAD_TRACK the given track number does not exists
- * @retval E_OGGPLAY_WRONG_TRACK_TYPE the given track is not an audio track
- * @retval E_OGGPLAY_UNINITIALISED the OggPlay handle is uninitalised.
- */
-OggPlayErrorCode
-oggplay_get_audio_channels(OggPlay *me, int track, int *channels);
-
-/**
- * Get the sample rate of the of the audio track
- * 
- * @param me OggPlay handle
- * @param track the track number of the audio track
- * @param samplerate the sample rate of the audio track.
- * @retval E_OGGPLAY_OK on success.
- * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle
- * @retval E_OGGPLAY_BAD_TRACK the given track number does not exists
- * @retval E_OGGPLAY_WRONG_TRACK_TYPE the given track is not an audio track
- * @retval E_OGGPLAY_UNINITIALISED the OggPlay handle is uninitalised.
- */
-OggPlayErrorCode
-oggplay_get_audio_samplerate(OggPlay *me, int track, int *samplerate); 
-
-/**
- * Get the frame-per-second value the of a given video track.
- * 
- * @param me OggPlay handle
- * @param track the track number of the audio track
- * @param fps_denom the denumerator of the FPS
- * @param fps_num the numerator of the FPS
- * @retval E_OGGPLAY_OK on success.
- * @retval E_OGGPLAY_BAD_OGGPLAY invalid OggPlay handle
- * @retval E_OGGPLAY_BAD_TRACK the given track number does not exists
- * @retval E_OGGPLAY_WRONG_TRACK_TYPE the given track is not an audio track
- * @retval E_OGGPLAY_UNINITIALISED the OggPlay handle is uninitalised.
- */
-OggPlayErrorCode
-oggplay_get_video_fps(OggPlay *me, int track, int* fps_denom, int* fps_num);
-
-OggPlayErrorCode
-oggplay_get_video_aspect_ratio(OggPlay *me, int track, int* aspect_denom, int* aspect_num);
-
-OggPlayErrorCode
-oggplay_convert_video_to_rgb(OggPlay *me, int track, int convert, int swap_rgb);
-
-OggPlayErrorCode
-oggplay_get_kate_category(OggPlay *me, int track, const char** category);
-
-OggPlayErrorCode
-oggplay_get_kate_language(OggPlay *me, int track, const char** language);
-
-OggPlayErrorCode
-oggplay_set_kate_tiger_rendering(OggPlay *me, int track, int use_tiger, int swap_rgb, int default_width, int default_height);