From d0c882b067063e70b193c026da941396932bfcb6 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Tue, 16 Dec 2003 12:38:18 +0000 Subject: [PATCH] * modules/codec/ffmpeg/ffmpeg.c, modules/demux/ogg.c: theora decoding support via ffmpeg (currently slower than libtheora). --- modules/codec/ffmpeg/ffmpeg.c | 11 ++++++++++- modules/demux/ogg.c | 8 +++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/codec/ffmpeg/ffmpeg.c b/modules/codec/ffmpeg/ffmpeg.c index 4812486511..136ec64c93 100644 --- a/modules/codec/ffmpeg/ffmpeg.c +++ b/modules/codec/ffmpeg/ffmpeg.c @@ -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 * Gildas Bazin @@ -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'): diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c index 37b4d8c637..d01eae8ab8 100644 --- a/modules/demux/ogg.c +++ b/modules/demux/ogg.c @@ -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 * @@ -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 && -- 2.39.5