Commit 49a0736e authored by Henri Fallon's avatar Henri Fallon

All decoders (audio, video, subtitles) are now modules.

- mpeg_vdec, mpeg_adec and ac3_adec are builtins by default
- ac3_spdif, spu_dec and lpcm_dec are plugins by default
parent bee557f9
...@@ -83,8 +83,8 @@ N: Henri Fallon ...@@ -83,8 +83,8 @@ N: Henri Fallon
E: henri@via.ecp.fr E: henri@via.ecp.fr
C: henri C: henri
D: ALSA audio output D: ALSA audio output
D: input netlist D: MPEG TS input, input netlist.
D: MPEG TS input D: Decoder modularization
N: Arnaud Gomes-do-Vale N: Arnaud Gomes-do-Vale
E: arnaud@carrosse.frmug.org E: arnaud@carrosse.frmug.org
......
...@@ -13,7 +13,9 @@ endif ...@@ -13,7 +13,9 @@ endif
# #
# All possible plugin directories, needed for make clean # All possible plugin directories, needed for make clean
# #
PLUGINS_DIR := alsa \ PLUGINS_DIR := ac3_adec \
ac3_spdif \
alsa \
beos \ beos \
darwin \ darwin \
directx \ directx \
...@@ -29,21 +31,24 @@ PLUGINS_DIR := alsa \ ...@@ -29,21 +31,24 @@ PLUGINS_DIR := alsa \
idct \ idct \
imdct \ imdct \
kde \ kde \
lpcm_adec \
macosx \ macosx \
mga \ mga \
motion \ motion \
mpeg \ mpeg \
mpeg_adec \
mpeg_vdec \
qt \ qt \
sdl \ sdl \
spu_dec \
text \ text \
vcd \ vcd \
x11 \ x11 \
yuv yuv
# PLUGINS_TARGETS := ac3_adec/ac3_adec \
# All possible plugin objects ac3_spdif/ac3_spdif \
# alsa/alsa \
PLUGINS_TARGETS := alsa/alsa \
beos/beos \ beos/beos \
darwin/darwin \ darwin/darwin \
directx/directx \ directx/directx \
...@@ -69,6 +74,7 @@ PLUGINS_TARGETS := alsa/alsa \ ...@@ -69,6 +74,7 @@ PLUGINS_TARGETS := alsa/alsa \
imdct/imdct3dn \ imdct/imdct3dn \
imdct/imdctsse \ imdct/imdctsse \
kde/kde \ kde/kde \
lpcm_adec/lpcm_adec \
macosx/macosx \ macosx/macosx \
macosx/macosx_qt \ macosx/macosx_qt \
mga/mga \ mga/mga \
...@@ -77,11 +83,14 @@ PLUGINS_TARGETS := alsa/alsa \ ...@@ -77,11 +83,14 @@ PLUGINS_TARGETS := alsa/alsa \
motion/motionmmxext \ motion/motionmmxext \
motion/motion3dnow \ motion/motion3dnow \
motion/motionaltivec \ motion/motionaltivec \
mpeg_adec/mpeg_adec \
mpeg_vdec/mpeg_vdec \
mpeg/es \ mpeg/es \
mpeg/ps \ mpeg/ps \
mpeg/ts \ mpeg/ts \
qt/qt \ qt/qt \
sdl/sdl \ sdl/sdl \
spu_dec/spu_dec \
text/ncurses \ text/ncurses \
text/rc \ text/rc \
vcd/vcd \ vcd/vcd \
...@@ -89,7 +98,6 @@ PLUGINS_TARGETS := alsa/alsa \ ...@@ -89,7 +98,6 @@ PLUGINS_TARGETS := alsa/alsa \
x11/xvideo \ x11/xvideo \
yuv/yuv \ yuv/yuv \
yuv/yuvmmx yuv/yuvmmx
# #
# C Objects # C Objects
# #
...@@ -97,24 +105,12 @@ INTERFACE := main interface intf_msg intf_playlist intf_channels ...@@ -97,24 +105,12 @@ INTERFACE := main interface intf_msg intf_playlist intf_channels
INPUT := input input_ext-dec input_ext-intf input_dec input_programs input_netlist input_clock mpeg_system INPUT := input input_ext-dec input_ext-intf input_dec input_programs input_netlist input_clock mpeg_system
VIDEO_OUTPUT := video_output video_text video_spu video_yuv VIDEO_OUTPUT := video_output video_text video_spu video_yuv
AUDIO_OUTPUT := audio_output aout_ext-dec aout_u8 aout_s8 aout_u16 aout_s16 aout_spdif AUDIO_OUTPUT := audio_output aout_ext-dec aout_u8 aout_s8 aout_u16 aout_s16 aout_spdif
AC3_DECODER := ac3_decoder_thread ac3_decoder ac3_parse ac3_exponent ac3_bit_allocate ac3_mantissa ac3_rematrix ac3_imdct
AC3_SPDIF := ac3_spdif ac3_iec958
LPCM_DECODER := lpcm_decoder_thread
AUDIO_DECODER := audio_decoder adec_generic adec_layer1 adec_layer2 adec_math
SPU_DECODER := spu_decoder
VIDEO_DECODER := video_parser vpar_headers vpar_blocks vpar_synchro vpar_pool video_decoder
MISC := mtime tests modules netutils iso_lang MISC := mtime tests modules netutils iso_lang
C_OBJ := $(INTERFACE:%=src/interface/%.o) \ C_OBJ := $(INTERFACE:%=src/interface/%.o) \
$(INPUT:%=src/input/%.o) \ $(INPUT:%=src/input/%.o) \
$(VIDEO_OUTPUT:%=src/video_output/%.o) \ $(VIDEO_OUTPUT:%=src/video_output/%.o) \
$(AUDIO_OUTPUT:%=src/audio_output/%.o) \ $(AUDIO_OUTPUT:%=src/audio_output/%.o) \
$(AC3_DECODER:%=src/ac3_decoder/%.o) \
$(AC3_SPDIF:%=src/ac3_spdif/%.o) \
$(LPCM_DECODER:%=src/lpcm_decoder/%.o) \
$(AUDIO_DECODER:%=src/audio_decoder/%.o) \
$(SPU_DECODER:%=src/spu_decoder/%.o) \
$(VIDEO_DECODER:%=src/video_decoder/%.o) \
$(MISC:%=src/misc/%.o) $(MISC:%=src/misc/%.o)
# #
......
...@@ -198,7 +198,7 @@ Task: 0x47 ...@@ -198,7 +198,7 @@ Task: 0x47
Difficulty: Hard Difficulty: Hard
Urgency: Normal Urgency: Normal
Description: Make decoders dynamically loadable Description: Make decoders dynamically loadable
Status: Todo Status: Done 05 October 2001 (henri)
Task: 0x46 Task: 0x46
Difficulty: Hard Difficulty: Hard
......
...@@ -3699,8 +3699,8 @@ fi ...@@ -3699,8 +3699,8 @@ fi
ARCH=${target_cpu} ARCH=${target_cpu}
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix" BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS}" PLUGINS="${PLUGINS} ac3_spdif spu_dec"
MMX_MODULES="yuvmmx idctmmx motionmmx" MMX_MODULES="yuvmmx idctmmx motionmmx"
MMXEXT_MODULES="idctmmxext motionmmxext" MMXEXT_MODULES="idctmmxext motionmmxext"
......
...@@ -295,8 +295,8 @@ ARCH=${target_cpu} ...@@ -295,8 +295,8 @@ ARCH=${target_cpu}
dnl dnl
dnl default modules dnl default modules
dnl dnl
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix" BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS}" PLUGINS="${PLUGINS} ac3_spdif spu_dec"
dnl dnl
dnl Accelerated modules dnl Accelerated modules
......
...@@ -23,20 +23,20 @@ chapters. ...@@ -23,20 +23,20 @@ chapters.
<sect1> <title> Decoder configuration </title> <sect1> <title> Decoder configuration </title>
<para> <para>
The input thread spawns the appropriate decoders [the relation is The input thread spawns the appropriate decoder modules from <filename>
currently hard-wired in <filename>src/input/input_programs.c</filename>]. src/input/input_dec.c</filename>. The <function>Dec_CreateThread</funcion>
It then launches <function> *_CreateThread()</function>, with either function selects the more accurate decoder module. Each decoder module
an <type>adec_config_t</type> (audio) or an <type> vdec_config_t</type> looks at decoder_config.i_type and returns a score [ see the modules
(video) structure, described in <filename> include/input_ext-dec.h</filename>. section ]. It then launches <function> module.pf_RunThread()</function>,
with an <type>decoder_config_t</type> (audio) or an <type> vdec_config_t
</type>, described in <filename> include/input_ext-dec.h</filename>.
</para> </para>
<para> <para>
It contains some parameters relative to the output thread, which will The generic <type>decoder_config_t</type> structure, gives the decoder
be described in the following chapters, and a generic <type> the ES ID and type, and pointers to a <type> stream_control_t </type>
decoder_config_t</type>, which gives the decoder the ES ID and type, and structure (gives information on the play status), a <type> decoder_fifo_t
pointers to a <type> stream_control_t </type> structure (gives </type> and <parameter> pf_init_bit_stream</parameter>, which will be
information on the play status), a <type> decoder_fifo_t </type>
and <parameter> pf_init_bit_stream</parameter>, which will be
described in the next two sections. described in the next two sections.
</para> </para>
...@@ -379,7 +379,8 @@ seven methods : ...@@ -379,7 +379,8 @@ seven methods :
<itemizedlist> <itemizedlist>
<listitem> <para> <function> vdec_IDCT </function> <parameter> <listitem> <para> <function> vdec_IDCT </function> <parameter>
( vdec_thread_t * p_vdec, dctelem_t * p_block, int ) </parameter> : ( decoder_config_t * p_config, dctelem_t * p_block, int )
</parameter> :
Does the complete 2-D IDCT. 64 coefficients are in <parameter> Does the complete 2-D IDCT. 64 coefficients are in <parameter>
p_block</parameter>. p_block</parameter>.
</para> </listitem> </para> </listitem>
......
...@@ -49,8 +49,15 @@ ...@@ -49,8 +49,15 @@
S.A.S. </ulink> </orgname> S.A.S. </ulink> </orgname>
</affiliation> </affiliation>
</collab> </collab>
<collab>
<pubdate> $Id: manual.xml,v 1.1 2001/07/16 15:54:59 massiot Exp $ </pubdate> <collabname> <ulink url="mailto:henri@via.ecp.fr">Henri Fallon
</ulink> </collabname>
<affiliation>
<jobtitle> Developer </jobtitle>
<orgname> VideoLAN project </orgname>
</affiliation>
</collab>
<pubdate> $Id: manual.xml,v 1.2 2001/11/13 12:09:17 henri Exp $ </pubdate>
<copyright> <year> 2001 </year> <copyright> <year> 2001 </year>
<holder> Christophe Massiot, for IDEALX S.A.S. </holder> <holder> Christophe Massiot, for IDEALX S.A.S. </holder>
</copyright> </copyright>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.47 2001/11/08 21:07:24 jlj Exp $ * $Id: common.h,v 1.48 2001/11/13 12:09:17 henri Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -85,6 +85,7 @@ typedef struct plugin_info_s * p_plugin_info_t; ...@@ -85,6 +85,7 @@ typedef struct plugin_info_s * p_plugin_info_t;
/* Plugins */ /* Plugins */
struct playlist_s; struct playlist_s;
struct playlist_item_s; struct playlist_item_s;
struct module_s;
typedef struct playlist_s * p_playlist_t; typedef struct playlist_s * p_playlist_t;
typedef struct playlist_item_s * p_playlist_item_t; typedef struct playlist_item_s * p_playlist_item_t;
...@@ -125,6 +126,7 @@ struct vout_sys_s; ...@@ -125,6 +126,7 @@ struct vout_sys_s;
struct vdec_thread_s; struct vdec_thread_s;
struct vpar_thread_s; struct vpar_thread_s;
struct video_parser_s; struct video_parser_s;
struct picture_t;
typedef struct vout_thread_s * p_vout_thread_t; typedef struct vout_thread_s * p_vout_thread_t;
typedef struct vout_font_s * p_vout_font_t; typedef struct vout_font_s * p_vout_font_t;
...@@ -138,6 +140,13 @@ struct macroblock_s; ...@@ -138,6 +140,13 @@ struct macroblock_s;
struct data_packet_s; struct data_packet_s;
struct es_descriptor_s; struct es_descriptor_s;
struct pgrm_descriptor_s; struct pgrm_descriptor_s;
struct pes_packet_s;
struct input_area_s;
struct bit_stream_s;
/* Decoders */
struct decoder_config_s;
struct decoder_fifo_s;
/***************************************************************************** /*****************************************************************************
* Macros and inline functions * Macros and inline functions
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders * input_ext-dec.h: structures exported to the VideoLAN decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-dec.h,v 1.36 2001/10/03 12:46:17 massiot Exp $ * $Id: input_ext-dec.h,v 1.37 2001/11/13 12:09:17 henri Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr> * Michel Kaempf <maxx@via.ecp.fr>
...@@ -22,6 +22,17 @@ ...@@ -22,6 +22,17 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
/* ES streams types - see ISO/IEC 13818-1 table 2-29 numbers */
#define MPEG1_VIDEO_ES 0x01
#define MPEG2_VIDEO_ES 0x02
#define MPEG1_AUDIO_ES 0x03
#define MPEG2_AUDIO_ES 0x04
#define AC3_AUDIO_ES 0x81
/* These ones might violate the norm : */
#define DVD_SPU_ES 0x82
#define LPCM_AUDIO_ES 0x83
#define UNKNOWN_ES 0xFF
/* Structures exported to the decoders */ /* Structures exported to the decoders */
/***************************************************************************** /*****************************************************************************
...@@ -203,9 +214,11 @@ typedef struct bit_stream_s ...@@ -203,9 +214,11 @@ typedef struct bit_stream_s
/***************************************************************************** /*****************************************************************************
* Protoypes from input_ext-dec.c * Protoypes from input_ext-dec.c
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN
u32 UnalignedShowBits( struct bit_stream_s *, unsigned int ); u32 UnalignedShowBits( struct bit_stream_s *, unsigned int );
void UnalignedRemoveBits( struct bit_stream_s * ); void UnalignedRemoveBits( struct bit_stream_s * );
u32 UnalignedGetBits( struct bit_stream_s *, unsigned int ); u32 UnalignedGetBits( struct bit_stream_s *, unsigned int );
#endif
/***************************************************************************** /*****************************************************************************
* AlignWord : fill in the bit buffer so that the byte pointer be aligned * AlignWord : fill in the bit buffer so that the byte pointer be aligned
...@@ -517,53 +530,13 @@ typedef struct decoder_config_s ...@@ -517,53 +530,13 @@ typedef struct decoder_config_s
void (* pf_bitstream_callback)( struct bit_stream_s *, void (* pf_bitstream_callback)( struct bit_stream_s *,
boolean_t ), boolean_t ),
void * ); void * );
} decoder_config_t; /* Decoder thread */
vlc_thread_t thread_id;
/*****************************************************************************
* vdec_config_t
*****************************************************************************
* Pointers given to video decoders threads.
*****************************************************************************/
struct vout_thread_s;
typedef struct vdec_config_s /* Plugin/Builtin properties */
{ struct module_s * p_dec_module;
struct picture_s * (* pf_create_picture)( struct vout_thread_s *,
int i_type, int i_width,
int i_height );
void (* pf_destroy_picture)( struct vout_thread_s *,
struct picture_s * );
void (* pf_display_picture)( struct vout_thread_s *,
struct picture_s * );
void (* pf_date_picture)( struct vout_thread_s *,
struct picture_s *, mtime_t date );
void (* pf_link_picture)( struct vout_thread_s *,
struct picture_s *, mtime_t date );
void (* pf_unlink_picture)( struct vout_thread_s *,
struct picture_s *, mtime_t date );
struct subpicture_s *(* pf_create_subpicture)( struct vout_thread_s *,
int i_type, int i_size );
void (* pf_destroy_subpicture)( struct vout_thread_s *,
struct subpicture_s * );
void (* pf_display_subpicture)( struct vout_thread_s *,
struct subpicture_s * );
decoder_config_t decoder_config;
} vdec_config_t;
/*****************************************************************************
* adec_config_t
*****************************************************************************
* Pointers given to audio decoders threads.
*****************************************************************************/
typedef struct adec_config_s
{
struct aout_fifo_s * (* pf_create_fifo)( struct aout_fifo_s * );
void (* pf_destroy_fifo)( void );
decoder_config_t decoder_config;
} adec_config_t;
} decoder_config_t;
/* /*
* Communication interface between decoders and input * Communication interface between decoders and input
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* control the pace of reading. * control the pace of reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.46 2001/11/11 18:15:41 sam Exp $ * $Id: input_ext-intf.h,v 1.47 2001/11/13 12:09:17 henri Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -75,6 +75,8 @@ typedef struct es_descriptor_s ...@@ -75,6 +75,8 @@ typedef struct es_descriptor_s
count_t c_packets; /* total packets read */ count_t c_packets; /* total packets read */
count_t c_invalid_packets; /* invalid packets read */ count_t c_invalid_packets; /* invalid packets read */
struct decoder_config_s * p_dec_config;
} es_descriptor_t; } es_descriptor_t;
/* Special PID values - note that the PID is only on 13 bits, and that values /* Special PID values - note that the PID is only on 13 bits, and that values
...@@ -83,16 +85,6 @@ typedef struct es_descriptor_s ...@@ -83,16 +85,6 @@ typedef struct es_descriptor_s
#define CONDITIONNAL_ACCESS_TABLE_PID 0x0001 /* not used */ #define CONDITIONNAL_ACCESS_TABLE_PID 0x0001 /* not used */
#define EMPTY_ID 0xffff /* empty record in a table */ #define EMPTY_ID 0xffff /* empty record in a table */
/* ES streams types - see ISO/IEC 13818-1 table 2-29 numbers */
#define MPEG1_VIDEO_ES 0x01
#define MPEG2_VIDEO_ES 0x02
#define MPEG1_AUDIO_ES 0x03
#define MPEG2_AUDIO_ES 0x04
#define AC3_AUDIO_ES 0x81
/* These ones might violate the norm : */
#define DVD_SPU_ES 0x82
#define LPCM_AUDIO_ES 0x83
#define UNKNOWN_ES 0xFF
/* ES Categories to be used by interface plugins */ /* ES Categories to be used by interface plugins */
#define VIDEO_ES 0x00 #define VIDEO_ES 0x00
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* but exported to plug-ins * but exported to plug-ins
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: input_ext-plugins.h,v 1.3 2001/11/11 01:32:03 stef Exp $ * $Id: input_ext-plugins.h,v 1.4 2001/11/13 12:09:17 henri Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -69,7 +69,7 @@ int input_UnselectES( struct input_thread_s *, struct es_descriptor_s * ); ...@@ -69,7 +69,7 @@ int input_UnselectES( struct input_thread_s *, struct es_descriptor_s * );
* Prototypes from input_dec.c * Prototypes from input_dec.c
*****************************************************************************/ *****************************************************************************/
//decoder_capabilities_s * input_ProbeDecoder( void ); //decoder_capabilities_s * input_ProbeDecoder( void );
vlc_thread_t input_RunDecoder( struct decoder_capabilities_s *, void * ); vlc_thread_t input_RunDecoder( void * );
void input_EndDecoder( struct input_thread_s *, struct es_descriptor_s * ); void input_EndDecoder( struct input_thread_s *, struct es_descriptor_s * );
void input_DecodePES ( struct decoder_fifo_s *, struct pes_packet_s * ); void input_DecodePES ( struct decoder_fifo_s *, struct pes_packet_s * );
void input_EscapeDiscontinuity( struct input_thread_s *, void input_EscapeDiscontinuity( struct input_thread_s *,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules.h : Module management functions. * modules.h : Module management functions.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.30 2001/11/08 01:48:09 jlj Exp $ * $Id: modules.h,v 1.31 2001/11/13 12:09:17 henri Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -59,15 +59,14 @@ typedef void * module_handle_t; ...@@ -59,15 +59,14 @@ typedef void * module_handle_t;
#define MODULE_CAPABILITY_ACCESS 1 << 1 /* Input */ #define MODULE_CAPABILITY_ACCESS 1 << 1 /* Input */
#define MODULE_CAPABILITY_INPUT 1 << 2 /* Input */ #define MODULE_CAPABILITY_INPUT 1 << 2 /* Input */
#define MODULE_CAPABILITY_DECAPS 1 << 3 /* Decaps */ #define MODULE_CAPABILITY_DECAPS 1 << 3 /* Decaps */
#define MODULE_CAPABILITY_ADEC 1 << 4 /* Audio decoder */ #define MODULE_CAPABILITY_DEC 1 << 4 /* Video decoder */
#define MODULE_CAPABILITY_VDEC 1 << 5 /* Video decoder */ #define MODULE_CAPABILITY_MOTION 1 << 5 /* Motion compensation */
#define MODULE_CAPABILITY_MOTION 1 << 6 /* Motion compensation */ #define MODULE_CAPABILITY_IDCT 1 << 6 /* IDCT transformation */
#define MODULE_CAPABILITY_IDCT 1 << 7 /* IDCT transformation */ #define MODULE_CAPABILITY_AOUT 1 << 7 /* Audio output */
#define MODULE_CAPABILITY_AOUT 1 << 8 /* Audio output */ #define MODULE_CAPABILITY_VOUT 1 << 8 /* Video output */
#define MODULE_CAPABILITY_VOUT 1 << 9 /* Video output */ #define MODULE_CAPABILITY_YUV 1 << 9 /* YUV colorspace conversion */
#define MODULE_CAPABILITY_YUV 1 << 10 /* YUV colorspace conversion */ #define MODULE_CAPABILITY_IMDCT 1 << 10 /* IMDCT transformation */
#define MODULE_CAPABILITY_IMDCT 1 << 11 /* IMDCT transformation */ #define MODULE_CAPABILITY_DOWNMIX 1 << 11 /* AC3 downmix */
#define MODULE_CAPABILITY_DOWNMIX 1 << 12 /* AC3 downmix */
/* FIXME: kludge */ /* FIXME: kludge */
struct input_area_s; struct input_area_s;
...@@ -77,9 +76,12 @@ struct dm_par_s; ...@@ -77,9 +76,12 @@ struct dm_par_s;
struct bit_stream_s; struct bit_stream_s;
struct decoder_fifo_s; struct decoder_fifo_s;
struct decoder_config_s;
/* FIXME: not yet used */ /* FIXME: not yet used */
typedef struct probedata_s typedef struct probedata_s
{ {
u8 i_type;
struct struct
{ {
char * psz_data; char * psz_data;
...@@ -214,6 +216,12 @@ typedef struct function_list_s ...@@ -214,6 +216,12 @@ typedef struct function_list_s
} downmix; } downmix;
/* Decoder plugins */
struct
{
int ( * pf_RunThread ) ( struct decoder_config_s * p_config );
} dec;
} functions; } functions;
} function_list_t; } function_list_t;
...@@ -225,8 +233,7 @@ typedef struct module_functions_s ...@@ -225,8 +233,7 @@ typedef struct module_functions_s
function_list_t access; function_list_t access;
function_list_t input; function_list_t input;
function_list_t decaps; function_list_t decaps;
function_list_t adec; function_list_t dec;
function_list_t vdec;
function_list_t motion; function_list_t motion;
function_list_t idct; function_list_t idct;
function_list_t aout; function_list_t aout;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
struct module_t;
typedef struct module_symbols_s typedef struct module_symbols_s
{ {
...@@ -40,6 +41,7 @@ typedef struct module_symbols_s ...@@ -40,6 +41,7 @@ typedef struct module_symbols_s
void ( * intf_Msg ) ( char *, ... ); void ( * intf_Msg ) ( char *, ... );
void ( * intf_ErrMsg ) ( char *, ... ); void ( * intf_ErrMsg ) ( char *, ... );
void ( * intf_StatMsg ) ( char *, ... );
void ( * intf_WarnMsg ) ( int, char *, ... ); void ( * intf_WarnMsg ) ( int, char *, ... );
void ( * intf_WarnMsgImm ) ( int, char *, ... ); void ( * intf_WarnMsgImm ) ( int, char *, ... );
#ifdef TRACE #ifdef TRACE
...@@ -132,6 +134,38 @@ typedef struct module_symbols_s ...@@ -132,6 +134,38 @@ typedef struct module_symbols_s
void ( * input_NetlistDeletePES ) ( void *, struct pes_packet_s * ); void ( * input_NetlistDeletePES ) ( void *, struct pes_packet_s * );
void ( * input_NetlistEnd ) ( struct input_thread_s * ); void ( * input_NetlistEnd ) ( struct input_thread_s * );
struct aout_fifo_s * ( * aout_CreateFifo )
( int, int, long, long, long, void * );
void ( * aout_DestroyFifo ) ( struct aout_fifo_s * );
struct vout_thread_s * (* vout_CreateThread) ( int *, int, int );
struct subpicture_s * (* vout_CreateSubPicture) ( struct vout_thread_s *,
int, int );
struct picture_s * ( * vout_CreatePicture ) ( struct vout_thread_s *,
int, int, int );
void ( * vout_DestroySubPicture ) ( struct vout_thread_s *,
struct subpicture_s * );
void ( * vout_DisplaySubPicture ) ( struct vout_thread_s *,
struct subpicture_s * );
void ( * vout_DisplayPicture ) ( struct vout_thread_s *,
struct picture_s * );
void ( * vout_DestroyPicture ) ( struct vout_thread_s *,
struct picture_s * );
void ( * vout_LinkPicture ) ( struct vout_thread_s *,
struct picture_s * );
void ( * vout_UnlinkPicture ) ( struct vout_thread_s *,
struct picture_s * );
void ( * vout_DatePicture ) ( struct vout_thread_s *p_vout,
struct picture_s *p_pic, mtime_t );
u32 ( * UnalignedShowBits ) ( struct bit_stream_s *, unsigned int );
void ( * UnalignedRemoveBits ) ( struct bit_stream_s * );
u32 ( * UnalignedGetBits ) ( struct bit_stream_s *, unsigned int );
struct module_s * ( * module_Need ) ( int, void * );
void ( * module_Unneed ) ( struct module_s * );
} module_symbols_t; } module_symbols_t;
#define STORE_SYMBOLS( p_symbols ) \ #define STORE_SYMBOLS( p_symbols ) \
...@@ -149,6 +183,7 @@ typedef struct module_symbols_s ...@@ -149,6 +183,7 @@ typedef struct module_symbols_s
(p_symbols)->intf_ProcessKey = intf_ProcessKey; \ (p_symbols)->intf_ProcessKey = intf_ProcessKey; \