Commit 9a5df48b authored by Laurent Aimar's avatar Laurent Aimar

* araw.c : pseudo pcm decoder

 * wav : demux for wav file( should work with raw pcm, mp3 or a52 stream ) but
untested under big endian machine(for pcm).

All are compiled by default.
parent 141cb731
......@@ -544,6 +544,7 @@ PLUGINS="${PLUGINS} aout_file"
#PLUGINS="${PLUGINS} scope"
PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
PLUGINS="${PLUGINS} id3"
PLUGINS="${PLUGINS} wav araw"
dnl
dnl Network modules
......
......@@ -35,6 +35,7 @@ EXTRA_DIST = \
demux/mp4/Modules.am \
demux/mpeg/Modules.am \
demux/util/Modules.am \
demux/wav/Modules.am \
gui/beos/Modules.am \
gui/familiar/Modules.am \
gui/gtk/Modules.am \
......
SOURCES_a52 = modules/codec/a52.c
SOURCES_lpcm = modules/codec/lpcm.c
SOURCES_araw = modules/codec/araw.c
This diff is collapsed.
......@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.6 2002/08/26 09:12:46 sam Exp $
* $Id: ffmpeg.c,v 1.7 2002/10/14 21:59:44 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -666,8 +666,12 @@ static int InitThread( videodec_thread_t *p_vdec )
}
/* ***** Fill p_context with init values ***** */
p_vdec->p_context = &p_vdec->context;
#if LIBAVCODEC_BUILD >= 4624
p_vdec->p_context = avcodec_alloc_context();
#else
p_vdec->p_context = malloc( sizeof( AVCodecContext ) );
memset( p_vdec->p_context, 0, sizeof( AVCodecContext ) );
#endif
p_vdec->p_context->width = p_vdec->format.i_width;
p_vdec->p_context->height = p_vdec->format.i_height;
......@@ -966,6 +970,7 @@ static void EndThread( videodec_thread_t *p_vdec )
avcodec_close( p_vdec->p_context );
msg_Dbg( p_vdec->p_fifo, "ffmpeg codec (%s) stopped",
p_vdec->psz_namecodec );
free( p_vdec->p_context );
}
if( p_vdec->p_vout != NULL )
......
......@@ -2,7 +2,7 @@
* ffmpeg_vdec.h: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ffmpeg.h,v 1.3 2002/08/10 20:05:21 fenrir Exp $
* $Id: ffmpeg.h,v 1.4 2002/10/14 21:59:44 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -59,7 +59,7 @@ typedef struct videodec_thread_s
bitmapinfoheader_t format;
AVCodecContext context, *p_context;
AVCodecContext *p_context;
AVCodec *p_codec;
vout_thread_t *p_vout;
......
SOURCES_wav = \
modules/demux/wav/wav.c
noinst_HEADERS += \
modules/demux/wav/wav.h
This diff is collapsed.
/*****************************************************************************
* wav.h : wav file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: wav.h,v 1.1 2002/10/14 21:59:44 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* 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, USA.
*****************************************************************************/
/*****************************************************************************
* Structure needed for decoder
*****************************************************************************/
typedef struct waveformatex_s
{
u16 i_format;
u16 i_channels;
u32 i_samplepersec;
u32 i_avgbytespersec;
u16 i_blockalign;
u16 i_bitspersample;
u16 i_size; /* This give size of data
imediatly following this header. */
u8 *p_data;
} waveformatex_t;
/*****************************************************************************
*
*****************************************************************************/
struct demux_sys_t
{
mtime_t i_pcr;
mtime_t i_time;
vlc_fourcc_t i_fourcc;
es_descriptor_t *p_es;
waveformatex_t format;
int i_wf; /* taille de p_wf */
u8 *p_wf; /* waveformatex_t as store in file */
off_t i_data_pos;
u64 i_data_size;
/* Two case:
- we have an internal demux(pcm)
- we use an external demux(mp3, a52 ..)
*/
/* module for external demux */
module_t *p_demux;
int (*pf_demux)( input_thread_t * );
void *p_demux_data;
char *psz_demux;
/* getframe for internal demux */
int (*GetFrame)( input_thread_t *p_input,
waveformatex_t *p_wf,
pes_packet_t **pp_pes,
mtime_t *pi_length );
};
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