From 7c80aed9bc8e76f02de7afabccaf7dc535181e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 17 Mar 2007 15:45:37 +0000 Subject: Merge the two real binary codecs plugins in a single plugin that handles both audio and video. CVS patchset: 8703 CVS date: 2007/03/17 15:45:37 --- src/libreal/Makefile.am | 9 +++------ src/libreal/audio_decoder.c | 16 +++------------- src/libreal/real_common.c | 9 ++++++++- src/libreal/real_common.h | 8 +++++++- src/libreal/xine_decoder.c | 15 +++------------ 5 files changed, 24 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/libreal/Makefile.am b/src/libreal/Makefile.am index 21c2e47ba..114a473a7 100644 --- a/src/libreal/Makefile.am +++ b/src/libreal/Makefile.am @@ -1,15 +1,12 @@ include $(top_srcdir)/misc/Makefile.common if ENABLE_REAL -xineplug_LTLIBRARIES = xineplug_decode_real.la xineplug_decode_real_audio.la +xineplug_LTLIBRARIES = xineplug_decode_real.la endif -xineplug_decode_real_la_SOURCES = xine_decoder.c real_common.c +xineplug_decode_real_la_SOURCES = xine_decoder.c real_common.c audio_decoder.c xineplug_decode_real_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) xineplug_decode_real_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_decode_real_la_LDFLAGS = $(xineplug_ldflags) -xineplug_decode_real_audio_la_SOURCES = audio_decoder.c real_common.c -xineplug_decode_real_audio_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) -xineplug_decode_real_audio_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_real_audio_la_LDFLAGS = $(xineplug_ldflags) +noinst_HEADERS = real_common.h diff --git a/src/libreal/audio_decoder.c b/src/libreal/audio_decoder.c index c4447e232..d1bb94230 100644 --- a/src/libreal/audio_decoder.c +++ b/src/libreal/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.58 2007/03/17 00:28:41 dgp85 Exp $ + * $Id: audio_decoder.c,v 1.59 2007/03/17 15:45:41 dgp85 Exp $ * * thin layer to use real binary-only codecs in xine * @@ -597,11 +597,7 @@ static void dispose_class (audio_decoder_class_t *this) { free (this); } -/* - * real audio codec loader - */ - -static void *init_class (xine_t *xine, void *data) { +void *init_realadec (xine_t *xine, void *data) { real_class_t *this; config_values_t *config = xine->config; @@ -626,13 +622,7 @@ static uint32_t audio_types[] = { BUF_AUDIO_COOK, BUF_AUDIO_ATRK, /* BUF_AUDIO_14_4, BUF_AUDIO_28_8, */ BUF_AUDIO_SIPRO, 0 }; -static const decoder_info_t dec_info_audio = { +const decoder_info_t dec_info_realaudio = { audio_types, /* supported types */ 7 /* priority */ }; - -const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "realadec", XINE_VERSION_CODE, &dec_info_audio, init_class }, - { PLUGIN_NONE, 0, "", 0, NULL, NULL } -}; diff --git a/src/libreal/real_common.c b/src/libreal/real_common.c index 7110198db..925a5cc71 100644 --- a/src/libreal/real_common.c +++ b/src/libreal/real_common.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: real_common.c,v 1.11 2007/03/17 06:11:30 dgp85 Exp $ + * $Id: real_common.c,v 1.12 2007/03/17 15:45:41 dgp85 Exp $ * * Common function for the thin layer to use Real binary-only codecs in xine */ @@ -149,3 +149,10 @@ void *_x_real_codec_open(xine_stream_t *const stream, const char *const path, return NULL; } + +const plugin_info_t xine_plugin_info[] EXPORTED = { + /* type, API, "name", version, special_info, init_function */ + { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "realvdec", XINE_VERSION_CODE, &dec_info_realvideo, init_realvdec }, + { PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 15, "realadec", XINE_VERSION_CODE, &dec_info_realaudio, init_realadec }, + { PLUGIN_NONE, 0, "", 0, NULL, NULL } +}; diff --git a/src/libreal/real_common.h b/src/libreal/real_common.h index 7fcd1c4fa..232bf2a4d 100644 --- a/src/libreal/real_common.h +++ b/src/libreal/real_common.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: real_common.h,v 1.6 2007/03/17 06:11:31 dgp85 Exp $ + * $Id: real_common.h,v 1.7 2007/03/17 15:45:41 dgp85 Exp $ * * Common function for the thin layer to use Real binary-only codecs in xine */ @@ -77,4 +77,10 @@ void *_x_real_codec_open(xine_stream_t *const stream, const char *const path, const char *const codec_name, const char *const codec_alternate); +const decoder_info_t dec_info_realvideo; +void *init_realvdec (xine_t *xine, void *data); + +const decoder_info_t dec_info_realaudio; +void *init_realadec (xine_t *xine, void *data); + #endif diff --git a/src/libreal/xine_decoder.c b/src/libreal/xine_decoder.c index 8bc6e4561..ea1fc8c54 100644 --- a/src/libreal/xine_decoder.c +++ b/src/libreal/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.92 2007/03/16 23:22:13 dgp85 Exp $ + * $Id: xine_decoder.c,v 1.93 2007/03/17 15:45:41 dgp85 Exp $ * * thin layer to use real binary-only codecs in xine * @@ -525,10 +525,7 @@ static void dispose_class (video_decoder_class_t *this) { free (this); } - - - -static void *init_class (xine_t *xine, void *data) { +void *init_realvdec (xine_t *xine, void *data) { real_class_t *this; config_values_t *config = xine->config; @@ -554,13 +551,7 @@ static uint32_t supported_types[] = { BUF_VIDEO_RV20, BUF_VIDEO_RV40, 0 }; -static const decoder_info_t dec_info_real = { +const decoder_info_t dec_info_realvideo = { supported_types, /* supported types */ 7 /* priority */ }; - -const plugin_info_t xine_plugin_info[] EXPORTED = { - /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 18, "real", XINE_VERSION_CODE, &dec_info_real, init_class }, - { PLUGIN_NONE, 0, "", 0, NULL, NULL } -}; -- cgit v1.2.3