Skip to content

Commit

Permalink
Here it is.
Browse files Browse the repository at this point in the history
--HG--
extra : convert_revision : svn%3Aaec24677-d710-0410-a355-ac75e2bdf181/trunk%406000
  • Loading branch information
smimram@aec24677-d710-0410-a355-ac75e2bdf181 committed Oct 15, 2008
0 parents commit 78ba7c1
Show file tree
Hide file tree
Showing 22 changed files with 5,251 additions and 0 deletions.
78 changes: 78 additions & 0 deletions CHANGES
@@ -0,0 +1,78 @@
0.5.0 ()
====
* Binded low-level decoding API
in order to decode ogg streams.
Previous Decoder module has been
moved to File.Decoder

0.4.1 (16-04-2008)
=====
* Minor fixes
* More portable make invokation
* Install .cmx file

0.4.0 (16-10-2007)
=====
* Complete rewrite of the library in order to use ocaml-ogg.

0.3.1 (20-05-2007)
=====
* Added decode_float to decode directly to float arrays.
* Added encode_float to encode directly from float arrays.
* Made the output format optional for function creating decoders since it is
not used for float output.

0.3.0 (02-03-2007)
=====
* Changed duration value from int to float for more precision.
It is an interface change, hence the new version number.
* Polishing and minor memory related fixes.

0.2.3 (11-11-2006)
=====
* More releases of ocaml's master lock.
* Fine-tuning of CAMLparams, cleaning up.

0.2.2 (07-07-2006)
=====
* Added set_charset function.
* Added blocking section in functions to open files.
* Optional information reading, avoids the computation of the file duration.
* Support for the "comment" metadata field.
* Code hardening, cleanup and documentation.

0.2.1 (15-11-2005)
=====
* Using caml_alloc_custom to create custom blocks.
* Added open_dec_file function to handle decoding of streams using callback
functions.
* Added encode_buffer_part function to encode only a portion of a buffer.
* Added get_dec_file_bitstream, get_dec_file_comments and get_dec_file_info
functions.
* Removed some unused fields in dec_params (sorry for the breakage of
interface).
* Fixed some memory leaks with tags.

0.2.0 (20-04-2005)
=====
* Better conversion of the input audio data: downsampling supported, conversion
from stereo to mono doesn't segfaults anymore. Added a blocking_section by the
way, and a few inline.
* Reverted removal of open_dec_fd.
* Updated OCamlMakefile and improved build system.
* Using caml namespace functions.
* Added wav2ogg encoder example.

0.1.1 (30-06-2004)
=====
* Cleanup of the stubs with better use of the CAML* macros
* Prototype of "create_encoder" changed.
* "get_header_frame" is removed (replaced by the new create_encoder).
* Added "encoder_reset".
* Removed "enc_serial_number" parameter (it is randomly generated by "create_encoder").
* Removed "open_dec_fd" since it is not necessary and fdopen(2) is not ANSI C.
* Improved the mli documentation.

0.1.0 (05-02-2004)
=====
* Initial release.
340 changes: 340 additions & 0 deletions COPYING

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions Makefile
@@ -0,0 +1,46 @@
# OCaml-Vorbis
#
# Copyright (c) 2003 by the Savonet team
#
# $Id$

PROGNAME = ocaml-vorbis
DISTFILES = aclocal.m4 bootstrap CHANGES configure configure.ac \
COPYING Makefile README \
src/OCamlMakefile* src/Makefile.in \
src/META.in src/*.ml src/*.mli src/*.c src/*.h \
examples/configure* examples/*Makefile* examples/*.ml

all:

all opt byte install uninstall update:
$(MAKE) -C src $@

doc:
$(MAKE) -C src htdoc
mkdir -p doc
rm -rf doc/html
mv src/doc/vorbis/html doc
rm -rf src/doc

examples:
$(MAKE) -C examples

clean:
-$(MAKE) -C src clean
-$(MAKE) -C examples clean

distclean: clean
rm -rf autom4te.cache config.log config.status src/META src/Makefile
rm -rf doc
-$(MAKE) -C examples distclean

dist: doc
VERSION="$(shell grep 'AC_INIT' configure.ac)"; \
VERSION=`echo "$$VERSION" | sed -e 's/AC_INIT([^,]*, \([^,]*\), .*)/\1/'`; \
mkdir $(PROGNAME)-$$VERSION; \
cp -r --parents $(DISTFILES) $(PROGNAME)-$$VERSION; \
tar zcvf $(PROGNAME)-$$VERSION.tar.gz $(PROGNAME)-$$VERSION; \
rm -rf $(PROGNAME)-$$VERSION

.PHONY: doc all byte opt install uninstall update clean distclean dist examples
74 changes: 74 additions & 0 deletions README
@@ -0,0 +1,74 @@
OCaml-vorbis - OCaml bindings for the libvorbis
======================================================

Authors: Samuel Mimram <samuel.mimram@ens-lyon.org>
Julien Cristau <julien.cristau@ens-lyon.org>
Email: savonet-users@lists.sourceforge.net
Homepage: http://savonet.sourceforge.net/

Copyright (c) 2003-2006 the Savonet Team.

based on code from:
oggenc/oggdec, (c) 2000-2002 Michael Smith <msmith@labyrinth.net.au>
ices2, (c) 2001 Michael Smith <msmith@labyrinth.net.au>
These are released under the GPL.

Dependencies
============
To build this library you need to have OCaml 3.07 and ocaml-ogg bindings, libvorbis
and libvorbisfile libraries.


Installation
============
To compile the program type:

./configure
make

You can set specific build options with the configure script, see:
./configure --help

Then, to install it, type as root:

make install


Usage
=====
Here are the typical workflows.

Encoding
--------
1. Vorbis.Encoder.create / Vorbis.Encoder.create_vbr: create an encoder
2. Ogg.Stream.create: create an ogg stream
3. Vorbis.Encoder.headerout: output the ogg header
4. Ogg.Stream.flush: flush the ogg stream to ensure that the header will be on
its own page
5. Vorbis.Encoder.encode_buffer_float: encode data
6. Ogg.Stream.pagesout: get the resulting ogg pages
7. goto 5
8. Vorbis.Encoder.end_of_stream: indicate that it is the end of the stream
9. Ogg.Stream.pagesout: get the last pages


License
=======
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.



The version of this README is:
$Id$
4 changes: 4 additions & 0 deletions bootstrap
@@ -0,0 +1,4 @@
#!/bin/sh

aclocal
autoconf

0 comments on commit 78ba7c1

Please sign in to comment.