From a785a3e404bdba9e901431cf9d2e047e8d4b4c1a Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Wed, 18 Jul 2001 21:38:16 +0000 Subject: Split alsa drivers, more checks about versions. Made xine lib c++ compliant. CVS patchset: 308 CVS date: 2001/07/18 21:38:16 --- src/audio_out/Makefile.am | 14 +++++++++++--- src/audio_out/audio_alsa05_out.c | 6 +----- src/audio_out/audio_alsa_out.c | 6 +----- src/demuxers/demux.h | 10 +++++++++- src/input/input_plugin.h | 9 ++++++++- src/video_out/video_out_x11.h | 10 +++++++++- src/xine-engine/audio_out.h | 10 +++++++++- src/xine-engine/buffer.h | 10 +++++++++- src/xine-engine/configfile.h | 17 +++++++++++++---- src/xine-engine/cpu_accel.h | 8 ++++++++ src/xine-engine/events.h | 8 ++++++++ src/xine-engine/metronom.h | 11 +++++++++-- src/xine-engine/monitor.h | 10 +++++++++- src/xine-engine/spu_decoder.h | 10 +++++++++- src/xine-engine/utils.h | 10 +++++++++- src/xine-engine/video_out.h | 10 +++++++++- src/xine-engine/xine_internal.h | 11 ++++++++++- 17 files changed, 141 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index bf44d5940..00368063d 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -17,8 +17,13 @@ endif # on the alsa project side # if HAVE_ALSA +if HAVE_ALSA05 +alsa05_module = xineplug_ao_out_alsa05.la +endif +if HAVE_ALSA09 alsa_module = xineplug_ao_out_alsa.la endif +endif if HAVE_ESD esd_module = xineplug_ao_out_esd.la @@ -42,15 +47,18 @@ endif # All of xine audio out plugins should be named like the # scheme "xineplug_ao_out_" # -lib_LTLIBRARIES = $(oss_module) $(alsa_module) $(sun_module) \ +lib_LTLIBRARIES = $(oss_module) $(alsa05_module) $(alsa_module) $(sun_module) \ $(arts_module) $(esd_module) ## $(irixal_module) xineplug_ao_out_oss_la_SOURCES = audio_oss_out.c resample.c xineplug_ao_out_oss_la_LDFLAGS = -avoid-version -module -xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c audio_alsa05_out.c \ - resample.c +xineplug_ao_out_alsa05_la_SOURCES = audio_alsa05_out.c resample.c +xineplug_ao_out_alsa05_la_LIBADD = $(ALSA_LIBS) +xineplug_ao_out_alsa05_la_LDFLAGS = -avoid-version -module + +xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c resample.c xineplug_ao_out_alsa_la_LIBADD = $(ALSA_LIBS) xineplug_ao_out_alsa_la_LDFLAGS = -avoid-version -module diff --git a/src/audio_out/audio_alsa05_out.c b/src/audio_out/audio_alsa05_out.c index bbc4c281e..361e1a268 100644 --- a/src/audio_out/audio_alsa05_out.c +++ b/src/audio_out/audio_alsa05_out.c @@ -24,7 +24,7 @@ * for the SPDIF AC3 sync part * (c) 2000 Andy Lo A Foe * - * $Id: audio_alsa05_out.c,v 1.4 2001/07/14 12:50:33 guenter Exp $ + * $Id: audio_alsa05_out.c,v 1.5 2001/07/18 21:38:16 f1rmb Exp $ */ /* required for swab() */ @@ -43,8 +43,6 @@ #include #include -#if (SND_LIB_MAJOR == 0) && (SND_LIB_MINOR <= 5) - #include "xine_internal.h" #include "monitor.h" #include "audio_out.h" @@ -950,5 +948,3 @@ ao_functions_t *init_audio_out_plugin(config_values_t *config) { return &audio_alsaout; } - -#endif diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 430aaeace..23632c96d 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -24,7 +24,7 @@ * (c) 2001 James Courtier-Dutton * * - * $Id: audio_alsa_out.c,v 1.11 2001/06/30 23:09:25 guenter Exp $ + * $Id: audio_alsa_out.c,v 1.12 2001/07/18 21:38:16 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -42,8 +42,6 @@ #include #include -#if (SND_LIB_MAJOR >= 0) && (SND_LIB_MINOR >= 9) - #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) #define error(...) do {\ fprintf(stderr, "XINE lib %s:%d:(%s) ", __FILE__, __LINE__, __FUNCTION__); \ @@ -723,5 +721,3 @@ static ao_info_t ao_info_alsa = { ao_info_t *get_audio_out_plugin_info() { return &ao_info_alsa; } - -#endif /*(SND_LIB_MAJOR >= 0) && (SND_LIB_MINOR >= 9) */ diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h index d284bcd44..017af8f0f 100644 --- a/src/demuxers/demux.h +++ b/src/demuxers/demux.h @@ -17,12 +17,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux.h,v 1.7 2001/07/14 13:28:31 guenter Exp $ + * $Id: demux.h,v 1.8 2001/07/18 21:38:16 f1rmb Exp $ */ #ifndef HAVE_DEMUX_H #define HAVE_DEMUX_H +#ifdef __cplusplus +extern "C" { +#endif + #include "buffer.h" #include "xine_internal.h" #if defined(XINE_COMPILE) @@ -124,4 +128,8 @@ struct demux_plugin_s * */ +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index 5bcd02a78..d788d3bd1 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.h @@ -17,12 +17,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_plugin.h,v 1.9 2001/07/10 21:07:55 f1rmb Exp $ + * $Id: input_plugin.h,v 1.10 2001/07/18 21:38:16 f1rmb Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H #define HAVE_INPUT_PLUGIN_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -309,5 +313,8 @@ struct input_plugin_s #define INPUT_EVENT_KEYPRESS 2 #define INPUT_EVENT_MOUSEMOVE 3 +#ifdef __cplusplus +} #endif +#endif diff --git a/src/video_out/video_out_x11.h b/src/video_out/video_out_x11.h index 73cbe7e6f..eeb0d8244 100644 --- a/src/video_out/video_out_x11.h +++ b/src/video_out/video_out_x11.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: video_out_x11.h,v 1.5 2001/05/28 13:42:02 guenter Exp $ + * $Id: video_out_x11.h,v 1.6 2001/07/18 21:38:16 f1rmb Exp $ * * structs and defines specific to all x11 related output plugins * (any x11 base xine ui should include this) @@ -26,6 +26,10 @@ #ifndef HAVE_VIDEO_OUT_X11_H #define HAVE_VIDEO_OUT_X11_H +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { /* area of that drawable to be used by video */ @@ -93,4 +97,8 @@ typedef struct { /* xevent *data */ #define GUI_DATA_EX_EXPOSE_EVENT 3 +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h index 6b4e7a173..e66419271 100644 --- a/src/xine-engine/audio_out.h +++ b/src/xine-engine/audio_out.h @@ -17,11 +17,15 @@ * 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_out.h,v 1.6 2001/06/23 19:45:47 guenter Exp $ + * $Id: audio_out.h,v 1.7 2001/07/18 21:38:17 f1rmb Exp $ */ #ifndef HAVE_AUDIO_OUT_H #define HAVE_AUDIO_OUT_H +#ifdef __cplusplus +extern "C" { +#endif + #include #if defined(XINE_COMPILE) @@ -153,4 +157,8 @@ typedef struct ao_info_s { int priority; } ao_info_t ; +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 8c972562e..6f9aeb9a0 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.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: buffer.h,v 1.4 2001/07/13 23:43:13 jcdutton Exp $ + * $Id: buffer.h,v 1.5 2001/07/18 21:38:17 f1rmb Exp $ * * * contents: @@ -34,6 +34,10 @@ #ifndef HAVE_BUFFER_H #define HAVE_BUFFER_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -150,4 +154,8 @@ struct fifo_buffer_s fifo_buffer_t *fifo_buffer_new (int num_buffers, uint32_t buf_size); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h index 1e5de7be9..fc1b3c829 100644 --- a/src/xine-engine/configfile.h +++ b/src/xine-engine/configfile.h @@ -17,16 +17,19 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: configfile.h,v 1.1 2001/04/18 22:36:05 f1rmb Exp $ + * $Id: configfile.h,v 1.2 2001/07/18 21:38:17 f1rmb Exp $ * * config file management * */ - #ifndef HAVE_CONFIGFILE_H #define HAVE_CONFIGFILE_H +#ifdef __cplusplus +extern "C" { +#endif + #include typedef struct config_values_s config_values_t; @@ -76,13 +79,19 @@ struct config_values_s { */ config_values_t *config_file_init (char *filename); +#ifdef __cplusplus +} +#endif #endif /* * $Log: configfile.h,v $ - * Revision 1.1 2001/04/18 22:36:05 f1rmb - * Initial revision + * Revision 1.2 2001/07/18 21:38:17 f1rmb + * Split alsa drivers, more checks about versions. Made xine lib c++ compliant. + * + * Revision 1.1.1.1 2001/04/18 22:36:05 f1rmb + * Initial import into CVS * * Revision 1.6 2001/03/31 03:42:25 guenter * more cleanups, started xv driver diff --git a/src/xine-engine/cpu_accel.h b/src/xine-engine/cpu_accel.h index 9583b6681..d563787eb 100644 --- a/src/xine-engine/cpu_accel.h +++ b/src/xine-engine/cpu_accel.h @@ -31,6 +31,10 @@ #ifndef _CPU_ACCEL_H #define _CPU_ACCEL_H +#ifdef __cplusplus +extern "C" { +#endif + #include "attributes.h" /* generic accelerations */ @@ -510,5 +514,9 @@ typedef union { : "X" (mem)) #endif /*ARCH_X86 */ +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/xine-engine/events.h b/src/xine-engine/events.h index eeda3320e..c812d7960 100644 --- a/src/xine-engine/events.h +++ b/src/xine-engine/events.h @@ -24,6 +24,10 @@ #ifndef HAVE_EVENTS_H #define HAVE_EVENTS_H +#ifdef __cplusplus +extern "C" { +#endif + #include /** @@ -49,4 +53,8 @@ typedef struct mouse_event_s { uint16_t x,y; /* In Image space */ } mouse_event_t; +#ifdef __cplusplus +} +#endif + #endif /* HAVE_EVENTS_H */ diff --git a/src/xine-engine/metronom.h b/src/xine-engine/metronom.h index 49058124c..1709a85c1 100644 --- a/src/xine-engine/metronom.h +++ b/src/xine-engine/metronom.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: metronom.h,v 1.7 2001/07/08 18:15:54 guenter Exp $ + * $Id: metronom.h,v 1.8 2001/07/18 21:38:17 f1rmb Exp $ * * metronom: general pts => virtual calculation/assoc * @@ -28,10 +28,13 @@ * */ - #ifndef HAVE_METRONOM_H #define HAVE_METRONOM_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -197,4 +200,8 @@ struct metronom_s { metronom_t *metronom_init (int have_audio); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/xine-engine/monitor.h b/src/xine-engine/monitor.h index f4033a1d5..38c1be91a 100644 --- a/src/xine-engine/monitor.h +++ b/src/xine-engine/monitor.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: monitor.h,v 1.2 2001/07/04 17:10:24 uid32519 Exp $ + * $Id: monitor.h,v 1.3 2001/07/18 21:38:17 f1rmb Exp $ * * debug print and profiling functions * @@ -26,6 +26,10 @@ #ifndef HAVE_MONITOR_H #define HAVE_MONITOR_H +#ifdef __cplusplus +extern "C" { +#endif + #include extern uint32_t xine_debug; @@ -86,4 +90,8 @@ void profiler_print_results (); #endif /* DEBUG*/ +#ifdef __cplusplus +} +#endif + #endif /* HAVE_MONITOR_H */ diff --git a/src/xine-engine/spu_decoder.h b/src/xine-engine/spu_decoder.h index 5d1a2d478..108ec35ed 100644 --- a/src/xine-engine/spu_decoder.h +++ b/src/xine-engine/spu_decoder.h @@ -19,11 +19,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: spu_decoder.h,v 1.3 2001/07/14 12:50:34 guenter Exp $ + * $Id: spu_decoder.h,v 1.4 2001/07/18 21:38:17 f1rmb Exp $ */ #ifndef HAVE_SPU_OUT_H #define HAVE_SPU_OUT_H +#ifdef __cplusplus +extern "C" { +#endif + #include #if defined(XINE_COMPILE) @@ -133,4 +137,8 @@ typedef struct spu_info_s { int priority; } spu_info_t ; +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/xine-engine/utils.h b/src/xine-engine/utils.h index d68cd0999..f45a41dc6 100644 --- a/src/xine-engine/utils.h +++ b/src/xine-engine/utils.h @@ -17,12 +17,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: utils.h,v 1.1 2001/04/18 22:36:09 f1rmb Exp $ + * $Id: utils.h,v 1.2 2001/07/18 21:38:17 f1rmb Exp $ * */ #ifndef HAVE_UTILS_H #define HAVE_UTILS_H +#ifdef __cplusplus +extern "C" { +#endif + void *xmalloc(size_t size); void *xmalloc_aligned(size_t alignment, size_t size); @@ -36,4 +40,8 @@ const char *get_homedir(void); char *chomp (char *str); +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index f73f1a707..b1f00f6c6 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.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: video_out.h,v 1.12 2001/07/10 19:33:05 guenter Exp $ + * $Id: video_out.h,v 1.13 2001/07/18 21:38:17 f1rmb Exp $ * * * xine version of video_out.h @@ -27,6 +27,10 @@ #ifndef HAVE_VIDEO_OUT_H #define HAVE_VIDEO_OUT_H +#ifdef __cplusplus +extern "C" { +#endif + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -316,5 +320,9 @@ typedef struct vo_info_s { } vo_info_t; +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 8b2fac7e8..cf07104fc 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -17,14 +17,19 @@ * 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.31 2001/07/15 10:43:35 guenter Exp $ + * $Id: xine_internal.h,v 1.32 2001/07/18 21:38:17 f1rmb Exp $ * */ #ifndef HAVE_XINE_INTERNAL_H #define HAVE_XINE_INTERNAL_H +#ifdef __cplusplus +extern "C" { +#endif + #include + #include "input/input_plugin.h" #include "demuxers/demux.h" #include "video_out.h" @@ -459,4 +464,8 @@ void xine_send_event(xine_t *this, event_t *event, void *data); /** @} end of eventgroup */ +#ifdef __cplusplus +} +#endif + #endif -- cgit v1.2.3