Commit 36b7d8ef authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/theora.c, configure.ac.in, modules/codec/Modules.am: new
   theora codec plugin.
   This plugin is based on the experimental theora codec from the Xiph.Org
   foundation (http://www.theora.org/). Because the theora bitstream
   specifications are likely to change in the near future, this plugin won't
   be compiled by default. If you want to test/develop theora with vlc, you'll
   need to configure it with --enable-theora and also make sure you've got a
   fresh libogg from cvs.

* modules/demux/ogg.c: modified to handle theora and tarkin bitstreams.

* modules/codec/tarkin.c: fixed a few typos.
parent 22f2fa61
......@@ -1109,8 +1109,11 @@ AC_ARG_ENABLE(ogg,
if test "x${enable_ogg}" != "xno"
then
AC_CHECK_HEADERS(ogg/ogg.h, [
AC_CHECK_LIB( ogg, oggpack_read, [
PLUGINS="${PLUGINS} ogg"
LDFLAGS_ogg="${LDFLAGS_ogg} -logg"
AC_CHECK_LIB( ogg, oggpackB_read, [
CPPFLAGS_ogg="${CPPFLAGS_ogg} -DHAVE_OGGPACKB"])])
],[])
fi
......@@ -1497,6 +1500,7 @@ then
BUILTINS="${BUILTINS} tarkin"
CPPFLAGS_tarkin="${CPPFLAGS_tarkin} -I${real_tarkin_tree}"
LDFLAGS_tarkin="${LDFLAGS_tarkin} ${real_tarkin_tree}/mem.o ${real_tarkin_tree}/pnm.o ${real_tarkin_tree}/wavelet.o ${real_tarkin_tree}/wavelet_xform.o ${real_tarkin_tree}/wavelet_coeff.o ${real_tarkin_tree}/yuv.o ${real_tarkin_tree}/tarkin.o ${real_tarkin_tree}/info.o -logg"
AC_MSG_RESULT(yes)
else
dnl The given tarkin tree wasn't built
AC_MSG_RESULT(no)
......@@ -1506,6 +1510,23 @@ then
fi
fi
dnl
dnl theora decoder plugin
dnl
AC_ARG_ENABLE(theora,
[ --enable-theora experimental theora codec (default disabled)])
if test "x${enable_theora}" = "xyes"
then
AC_CHECK_HEADERS(theora/theora.h, [
AC_CHECK_LIB(theora, theora_granule_time, [
BUILTINS="${BUILTINS} theora"
LDFLAGS_theora="${LDFLAGS_theora} -logg -ltheora" ],[
AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
You also need to check that you have a libogg posterior to the 1.0 release.])],
[-logg])
])
fi
dnl
dnl Video plugins
dnl
......
......@@ -3,5 +3,6 @@ SOURCES_lpcm = modules/codec/lpcm.c
SOURCES_araw = modules/codec/araw.c
SOURCES_vorbis = modules/codec/vorbis.c
SOURCES_tarkin = modules/codec/tarkin.c
SOURCES_theora = modules/codec/theora.c
SOURCES_dv = modules/codec/dv.c
SOURCES_xvid = modules/codec/xvid.c
......@@ -2,7 +2,7 @@
* tarkin.c: tarkin decoder module making use of libtarkin.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: tarkin.c,v 1.1 2002/11/18 13:28:09 gbazin Exp $
* $Id: tarkin.c,v 1.2 2002/11/20 14:09:57 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -45,7 +45,7 @@
#include <tarkin.h>
/*****************************************************************************
* dec_thread_t : vorbis decoder thread descriptor
* dec_thread_t : tarkin decoder thread descriptor
*****************************************************************************/
typedef struct dec_thread_t
{
......@@ -59,10 +59,8 @@ typedef struct dec_thread_t
*/
TarkinStream *tarkin_stream;
TarkinInfo ti; /* struct that stores all the static tarkin bitstream
settings */
TarkinComment tc; /* struct that stores all the bitstream user
* comments */
TarkinInfo ti; /* tarkin bitstream settings */
TarkinComment tc; /* tarkin bitstream user comments */
TarkinTime tarkdate;
/*
......@@ -97,6 +95,7 @@ vlc_module_begin();
set_description( _("Tarkin decoder module") );
set_capability( "decoder", 100 );
set_callbacks( OpenDecoder, NULL );
add_shortcut( "tarkin" );
vlc_module_end();
/*****************************************************************************
......@@ -149,7 +148,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
if( tarkin_synthesis_headerin( &p_dec->ti, &p_dec->tc, &oggpacket ) < 0 )
{
msg_Err( p_dec->p_fifo, "This bitstream does not contain Tarkin "
"vido data");
"video data");
goto error;
}
......@@ -177,13 +176,13 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
/* Initialize the tarkin decoder */
tarkin_synthesis_init( p_dec->tarkin_stream, &p_dec->ti );
/* vorbis decoder thread's main loop */
/* tarkin decoder thread's main loop */
while( (!p_dec->p_fifo->b_die) && (!p_dec->p_fifo->b_error) )
{
DecodePacket( p_dec );
}
/* If b_error is set, the vorbis decoder thread enters the error loop */
/* If b_error is set, the tarkin decoder thread enters the error loop */
if( p_dec->p_fifo->b_error )
{
DecoderError( p_dec->p_fifo );
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment