Commit d0c882b0 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/ffmpeg/ffmpeg.c, modules/demux/ogg.c: theora decoding support...

* modules/codec/ffmpeg/ffmpeg.c, modules/demux/ogg.c: theora decoding support via ffmpeg (currently slower than libtheora).
parent 28c34206
......@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.67 2003/12/01 09:39:04 fenrir Exp $
* $Id: ffmpeg.c,v 1.68 2003/12/16 12:38:18 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -473,6 +473,15 @@ int E_(GetFfmpegCodec)( vlc_fourcc_t i_fourcc, int *pi_cat,
psz_name = "On2's VP3 Video";
break;
#if LIBAVCODEC_BUILD >= 4685
/* Xiph.org theora */
case VLC_FOURCC('t','h','e','o'):
i_cat = VIDEO_ES;
i_codec = CODEC_ID_THEORA;
psz_name = "Xiph.org's Theora Video";
break;
#endif
#if ( !defined( WORDS_BIGENDIAN ) )
/* Asus Video (Another thing that doesn't work on PPC) */
case VLC_FOURCC('A','S','V','1'):
......
......@@ -2,7 +2,7 @@
* ogg.c : ogg stream input module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: ogg.c,v 1.50 2003/12/15 23:31:11 gbazin Exp $
* $Id: ogg.c,v 1.51 2003/12/16 12:38:18 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -683,6 +683,12 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg)
msg_Dbg( p_input,
"found theora header, bitrate: %i, rate: %f",
p_stream->fmt.i_bitrate, p_stream->f_rate );
/* Save this data in p_extra for ffmpeg */
p_stream->fmt.i_extra = oggpacket.bytes;
p_stream->fmt.p_extra = malloc( oggpacket.bytes );
memcpy( p_stream->fmt.p_extra,
oggpacket.packet, oggpacket.bytes );
}
/* Check for Tarkin header */
else if( oggpacket.bytes >= 7 &&
......
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