From 05aa5f5db549e94f55321823a2d3221fb414c9c2 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Sun, 29 Apr 2001 14:32:11 +0000 Subject: turned ac3dec into a dynamic plugin (well, sort-of ;)), minor fixes CVS patchset: 44 CVS date: 2001/04/29 14:32:11 --- src/libac3/Makefile.am | 14 ++++++++++---- src/libac3/ac3.h | 3 +-- src/libac3/decode.c | 3 +-- src/libmpeg2/xine_decoder.c | 4 ++-- src/xine-engine/Makefile.am | 4 ---- src/xine-engine/audio_decoder.c | 4 ++-- src/xine-engine/video_decoder.c | 5 ++--- src/xine-engine/xine_internal.h | 12 +++++++----- 8 files changed, 25 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/libac3/Makefile.am b/src/libac3/Makefile.am index 6318b3255..3071c7ae9 100644 --- a/src/libac3/Makefile.am +++ b/src/libac3/Makefile.am @@ -1,10 +1,16 @@ -CFLAGS = @BUILD_LIB_STATIC@ @GLOBAL_CFLAGS@ +CFLAGS = @GLOBAL_CFLAGS@ -noinst_LTLIBRARIES = libac3.la +LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic -libac3_la_SOURCES = bitstream.c bit_allocate.c \ +libdir = $(XINE_PLUGINDIR) + +lib_LTLIBRARIES = xineplug_decode_ac3.la + +xineplug_decode_ac3_la_SOURCES = bitstream.c bit_allocate.c \ decode.c coeff.c exponent.c parse.c crc.c rematrix.c \ - dither.c sanity_check.c srfft.c imdct.c downmix.c + dither.c sanity_check.c srfft.c imdct.c downmix.c \ + xine_decoder.c +xineplug_decode_ac3_la_LDFLAGS = -avoid-version -module noinst_HEADERS = ac3.h ac3_internal.h bitstream.h \ imdct.h coeff.h exponent.h bit_allocate.h parse.h \ diff --git a/src/libac3/ac3.h b/src/libac3/ac3.h index 510a97095..dcc125f85 100644 --- a/src/libac3/ac3.h +++ b/src/libac3/ac3.h @@ -47,8 +47,7 @@ typedef struct ac3_config_s { void ac3_init(ac3_config_t *,ao_functions_t*); -size_t ac3_decode_data(metronom_t *metronom, - uint8_t *data_start,uint8_t *data_end,uint32_t pts); +size_t ac3_decode_data(uint8_t *data_start,uint8_t *data_end,uint32_t pts); void ac3_reset(void); diff --git a/src/libac3/decode.c b/src/libac3/decode.c index 5d1fd68b3..3239c5543 100644 --- a/src/libac3/decode.c +++ b/src/libac3/decode.c @@ -194,8 +194,7 @@ void ac3_reset () } -size_t ac3_decode_data (metronom_t *metronom, - uint8_t *data_start, uint8_t *data_end, uint32_t pts_) +size_t ac3_decode_data (uint8_t *data_start, uint8_t *data_end, uint32_t pts_) { uint32_t i; diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c index 9e8214d5e..2892aabd9 100644 --- a/src/libmpeg2/xine_decoder.c +++ b/src/libmpeg2/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.2 2001/04/23 22:43:59 f1rmb Exp $ + * $Id: xine_decoder.c,v 1.3 2001/04/29 14:32:11 guenter Exp $ * * stuff needed to turn libmpeg2 into a xine decoder plugin */ @@ -71,7 +71,7 @@ void mpeg2dec_close (video_decoder_t *this_gen) { } static char *mpeg2dec_get_id(void) { - return "MPEG2DEC"; + return "mpeg2dec"; } video_decoder_t *init_video_decoder_plugin (int iface_version, config_values_t *cfg) { diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 1ae2a2761..3dda77ead 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -11,8 +11,6 @@ libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c monitor.c \ audio_decoder.c video_out.c libxine_la_DEPENDENCIES = libsdeps libxine_la_LIBADD = \ -## $(top_srcdir)/src/libmpeg2/libmpeg2.la \ - $(top_srcdir)/src/libac3/libac3.la \ $(top_srcdir)/src/libmpg123/libmpg123.la \ ## $(top_srcdir)/src/libspudec/libspudec.la \ $(THREAD_LIBS) \ @@ -47,8 +45,6 @@ debug: libsdeps: -## @cd $(top_builddir)/src/libmpeg2 && $(MAKE) libmpeg2.la - @cd $(top_builddir)/src/libac3 && $(MAKE) libac3.la @cd $(top_builddir)/src/libmpg123 && $(MAKE) libmpg123.la ## @cd $(top_builddir)/src/libspudec && $(MAKE) libspudec.la diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 015560844..cac4f56dd 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.5 2001/04/27 10:42:38 f1rmb Exp $ + * $Id: audio_decoder.c,v 1.6 2001/04/29 14:32:11 guenter Exp $ * * * functions that implement audio decoding @@ -76,7 +76,7 @@ void *audio_decoder_loop (void *this_gen) { } - decoder->decode_data (this->metronom, decoder, buf); + decoder->decode_data (decoder, buf); } break; diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 98b84e0ee..e5a886a44 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.8 2001/04/27 10:42:38 f1rmb Exp $ + * $Id: video_decoder.c,v 1.9 2001/04/29 14:32:11 guenter Exp $ * */ @@ -69,8 +69,7 @@ void *video_decoder_loop (void *this_gen) { } - decoder->decode_data (this->metronom, - this->cur_video_decoder_plugin, buf); + decoder->decode_data (this->cur_video_decoder_plugin, buf); } break; diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index ac706d397..7bbf797c1 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_internal.h,v 1.14 2001/04/29 01:09:23 guenter Exp $ + * $Id: xine_internal.h,v 1.15 2001/04/29 14:32:11 guenter Exp $ * */ @@ -56,8 +56,7 @@ struct video_decoder_s { void (*init) (video_decoder_t *this, vo_instance_t *video_out); - void (*decode_data) (metronom_t *metronom, - video_decoder_t *this, buf_element_t *buf); + void (*decode_data) (video_decoder_t *this, buf_element_t *buf); void (*release_img_buffers) (video_decoder_t *this); @@ -69,6 +68,10 @@ struct video_decoder_s { /* * generic xine audio decoder plugin interface + * + * for a dynamic plugin make sure you provide this function call: + * audio_decoder_t *init_audio_decoder_plugin (int iface_version, + * config_values_t *cfg); */ typedef struct audio_decoder_s audio_decoder_t; @@ -81,8 +84,7 @@ struct audio_decoder_s { void (*init) (audio_decoder_t *this, ao_functions_t *audio_out); - void (*decode_data) (metronom_t *metronom, - audio_decoder_t *this, buf_element_t *buf); + void (*decode_data) (audio_decoder_t *this, buf_element_t *buf); void (*close) (audio_decoder_t *this); -- cgit v1.2.3