Commit e1c7565e authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac.in: fixed linkage of theora plugin.
* modules/codec/theora.c, modules/codec/tarkin.c: fixed breakage.
* modules/codec/vorbis.c: lowered the priority of the tremor plugin.
parent cd70eeac
......@@ -1557,7 +1557,7 @@ then
AC_CHECK_HEADERS(theora/theora.h, [
AC_CHECK_LIB(theora, theora_granule_time, [
BUILTINS="${BUILTINS} theora"
LDFLAGS_theora="${LDFLAGS_theora} -logg -ltheora" ],[
LDFLAGS_theora="${LDFLAGS_theora} -ltheora -logg" ],[
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])
......
......@@ -2,7 +2,7 @@
* tarkin.c: tarkin decoder module making use of libtarkin.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: tarkin.c,v 1.3 2002/11/28 17:34:59 sam Exp $
* $Id: tarkin.c,v 1.4 2002/11/28 21:00:48 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -86,7 +86,7 @@ static void CloseDecoder ( dec_thread_t * );
static void DecodePacket ( dec_thread_t * );
static int GetOggPacket ( dec_thread_t *, ogg_packet *, mtime_t * );
static void tarkin_CopyPicture( dec_thread_t *, picture_t *, uint8_t * );
static void tarkin_CopyPicture( dec_thread_t *, picture_t *, uint8_t *, int );
/*****************************************************************************
* Module descriptor
......@@ -216,8 +216,7 @@ static void DecodePacket( dec_thread_t *p_dec )
ogg_packet oggpacket;
picture_t *p_pic;
mtime_t i_pts;
int i_width, i_height, i_chroma, i_aspect;
uint32_t frame = 0;
int i_width, i_height, i_chroma, i_stride, i_aspect;
uint8_t *rgb;
if( GetOggPacket( p_dec, &oggpacket, &i_pts ) != VLC_SUCCESS )
......@@ -237,21 +236,26 @@ static void DecodePacket( dec_thread_t *p_dec )
switch( p_dec->tarkin_stream->layer->desc.format )
{
case TARKIN_RGB24:
/*i_chroma = VLC_FOURCC('R','G','B','A');*/
i_chroma = VLC_FOURCC('R','V','2','4');
i_stride = i_width * 3;
break;
case TARKIN_RGB32:
i_chroma = VLC_FOURCC('R','V','3','2');
i_stride = i_width * 4;
break;
case TARKIN_RGBA:
i_chroma = VLC_FOURCC('R','G','B','A');
i_stride = i_width * 4;
break;
default:
i_chroma = VLC_FOURCC('Y','V','1','2');
i_stride = i_width;
break;
}
i_aspect = VOUT_ASPECT_FACTOR * i_width / i_height;
p_dec->p_vout = vout_Request( p_dec->p_fifo, p_dec->p_vout,
i_width, i_height, i_aspect, i_chroma );
i_width, i_height, i_chroma, i_aspect );
/* Get a new picture */
while( !(p_pic = vout_CreatePicture( p_dec->p_vout, 0, 0, 0 ) ) )
......@@ -265,7 +269,7 @@ static void DecodePacket( dec_thread_t *p_dec )
if( !p_pic )
break;
tarkin_CopyPicture( p_dec, p_pic, rgb );
tarkin_CopyPicture( p_dec, p_pic, rgb, i_stride );
tarkin_synthesis_freeframe( p_dec->tarkin_stream, rgb );
......@@ -313,7 +317,7 @@ static void CloseDecoder( dec_thread_t * p_dec )
if( p_dec->p_pes )
input_DeletePES( p_dec->p_fifo->p_packets_mgt, p_dec->p_pes );
vout_Request( p_dec, p_dec->p_vout, 0, 0, 0, 0 );
vout_Request( p_dec->p_fifo, p_dec->p_vout, 0, 0, 0, 0 );
if( p_dec->tarkin_stream )
tarkin_stream_destroy( p_dec->tarkin_stream );
......@@ -327,21 +331,23 @@ static void CloseDecoder( dec_thread_t * p_dec )
* picture_t structure.
*****************************************************************************/
static void tarkin_CopyPicture( dec_thread_t *p_dec, picture_t *p_pic,
uint8_t *p_src )
uint8_t *p_src, int i_pitch )
{
int i_plane, i_line, i_width, i_dst_stride;
int i_plane, i_line, i_src_stride, i_dst_stride;
u8 *p_dst;
for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ )
{
p_dst = p_pic->p[i_plane].p_pixels;
i_width = p_pic->p[i_plane].i_visible_pitch;
i_dst_stride = p_pic->p[i_plane].i_pitch;
i_src_stride = i_pitch;
for( i_line = 0; i_line < p_pic->p[i_plane].i_lines; i_line++ )
{
p_dec->p_fifo->p_vlc->pf_memcpy( p_dst, p_src, i_width );
p_src += i_width;
p_dec->p_fifo->p_vlc->pf_memcpy( p_dst, p_src,
i_src_stride );
p_src += i_src_stride;
p_dst += i_dst_stride;
}
}
......
......@@ -2,7 +2,7 @@
* theora.c: theora decoder module making use of libtheora.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: theora.c,v 1.2 2002/11/28 17:34:59 sam Exp $
* $Id: theora.c,v 1.3 2002/11/28 21:00:48 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -155,7 +155,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
p_dec->p_vout = vout_Request( p_dec->p_fifo, p_dec->p_vout,
p_dec->ti.width, p_dec->ti.height,
i_aspect, i_chroma );
i_chroma, i_aspect );
/* theora decoder thread's main loop */
while( (!p_dec->p_fifo->b_die) && (!p_dec->p_fifo->b_error) )
......
......@@ -2,7 +2,7 @@
* vorbis.c: vorbis decoder module making use of libvorbis.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: vorbis.c,v 1.7 2002/11/21 21:37:46 gbazin Exp $
* $Id: vorbis.c,v 1.8 2002/11/28 21:00:48 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -110,7 +110,11 @@ static void Interleave ( float *, const float **, int, int );
*****************************************************************************/
vlc_module_begin();
set_description( _("Vorbis decoder module") );
#ifdef MODULE_NAME_IS_tremor
set_capability( "decoder", 90 );
#else
set_capability( "decoder", 100 );
#endif
set_callbacks( OpenDecoder, NULL );
vlc_module_end();
......
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