From 057be3a11b092f1a1333e62945060cbb5c7ee59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 18:54:49 +0100 Subject: Make the node pointer transparent during xine build. Check XINE_COMPILE definition, if it's present, define node as a plugin_node_t pointer rather than a void pointer. --- include/xine/audio_decoder.h | 17 +++++++++++++++-- include/xine/audio_out.h | 14 ++++++++++++++ include/xine/demux.h | 17 +++++++++++++++-- include/xine/input_plugin.h | 16 +++++++++++++++- include/xine/post.h | 17 +++++++++++++++-- include/xine/spu_decoder.h | 16 +++++++++++++++- include/xine/video_decoder.h | 18 +++++++++++++++--- include/xine/video_out.h | 15 ++++++++++++++- 8 files changed, 118 insertions(+), 12 deletions(-) diff --git a/include/xine/audio_decoder.h b/include/xine/audio_decoder.h index 7e3107727..49194e290 100644 --- a/include/xine/audio_decoder.h +++ b/include/xine/audio_decoder.h @@ -26,6 +26,10 @@ #include #include +#ifdef XINE_COMPILE +# include +#endif + #define AUDIO_DECODER_IFACE_VERSION 16 /* @@ -93,8 +97,17 @@ struct audio_decoder_s { */ void (*dispose) (audio_decoder_t *this); - void *node; /* used by plugin loader */ - + /** + * @brief Pointer to the loaded plugin node. + * + * Used by the plugins loader. It's an opaque type when using the + * structure outside of xine's build. + */ +#ifdef XINE_COMPILE + plugin_node_t *node; +#else + void *node; +#endif }; #endif diff --git a/include/xine/audio_out.h b/include/xine/audio_out.h index 8f73bbbf7..b720110bf 100644 --- a/include/xine/audio_out.h +++ b/include/xine/audio_out.h @@ -29,6 +29,10 @@ extern "C" { #include #include +#ifdef XINE_COMPILE +# include +#endif + #define AUDIO_OUT_IFACE_VERSION 9 /* @@ -118,7 +122,17 @@ struct ao_driver_s { */ int (*control) (ao_driver_t *, int cmd, /* arg */ ...); + /** + * @brief Pointer to the loaded plugin node. + * + * Used by the plugins loader. It's an opaque type when using the + * structure outside of xine's build. + */ +#ifdef XINE_COMPILE + plugin_node_t *node; +#else void *node; +#endif }; typedef struct ao_format_s ao_format_t; diff --git a/include/xine/demux.h b/include/xine/demux.h index 476c80b8e..35a5c9a82 100644 --- a/include/xine/demux.h +++ b/include/xine/demux.h @@ -25,6 +25,10 @@ #include #include +#ifdef XINE_COMPILE +# include +#endif + #define DEMUXER_PLUGIN_IFACE_VERSION 27 #define DEMUX_OK 0 @@ -169,8 +173,17 @@ struct demux_plugin_s { demux_class_t *demux_class; - void *node; /* used by plugin loader */ - + /** + * @brief Pointer to the loaded plugin node. + * + * Used by the plugins loader. It's an opaque type when using the + * structure outside of xine's build. + */ +#ifdef XINE_COMPILE + plugin_node_t *node; +#else + void *node; +#endif } ; #define default_demux_plugin_dispose (void (*) (demux_plugin_t *this))free diff --git a/include/xine/input_plugin.h b/include/xine/input_plugin.h index aa0e2bf47..e434dc5a8 100644 --- a/include/xine/input_plugin.h +++ b/include/xine/input_plugin.h @@ -28,6 +28,10 @@ #include #include +#ifdef XINE_COMPILE +# include +#endif + #define INPUT_PLUGIN_IFACE_VERSION 18 typedef struct input_class_s input_class_t ; @@ -221,7 +225,17 @@ struct input_plugin_s { input_class_t *input_class; - void *node; /* used by plugin loader */ + /** + * @brief Pointer to the loaded plugin node. + * + * Used by the plugins loader. It's an opaque type when using the + * structure outside of xine's build. + */ +#ifdef XINE_COMPILE + plugin_node_t *node; +#else + void *node; +#endif }; diff --git a/include/xine/post.h b/include/xine/post.h index 4f2b8d272..3056f8120 100644 --- a/include/xine/post.h +++ b/include/xine/post.h @@ -29,6 +29,10 @@ #include #include +#ifdef XINE_COMPILE +# include +#endif + #define POST_PLUGIN_IFACE_VERSION 9 @@ -111,8 +115,17 @@ struct post_plugin_s { const char **input_ids; const char **output_ids; - /* used by plugin loader */ - void *node; + /** + * @brief Pointer to the loaded plugin node. + * + * Used by the plugins loader. It's an opaque type when using the + * structure outside of xine's build. + */ +#ifdef XINE_COMPILE + plugin_node_t *node; +#else + void *node; +#endif /* has dispose been called */ int dispose_pending; diff --git a/include/xine/spu_decoder.h b/include/xine/spu_decoder.h index b11bf7952..d36b5b691 100644 --- a/include/xine/spu_decoder.h +++ b/include/xine/spu_decoder.h @@ -27,6 +27,10 @@ #include #include +#ifdef XINE_COMPILE +# include +#endif + #define SPU_DECODER_IFACE_VERSION 17 /* @@ -113,7 +117,17 @@ struct spu_decoder_s { */ void (*set_button) (spu_decoder_t *this_gen, int32_t button, int32_t mode); - void *node; /* used by plugin loader */ + /** + * @brief Pointer to the loaded plugin node. + * + * Used by the plugins loader. It's an opaque type when using the + * structure outside of xine's build. + */ +#ifdef XINE_COMPILE + plugin_node_t *node; +#else + void *node; +#endif }; diff --git a/include/xine/video_decoder.h b/include/xine/video_decoder.h index ec0855277..916cfe68b 100644 --- a/include/xine/video_decoder.h +++ b/include/xine/video_decoder.h @@ -26,6 +26,10 @@ #include #include +#ifdef XINE_COMPILE +# include +#endif + #define VIDEO_DECODER_IFACE_VERSION 19 @@ -98,9 +102,17 @@ struct video_decoder_s { */ void (*dispose) (video_decoder_t *this); - - void *node; /*used by plugin loader */ - + /** + * @brief Pointer to the loaded plugin node. + * + * Used by the plugins loader. It's an opaque type when using the + * structure outside of xine's build. + */ +#ifdef XINE_COMPILE + plugin_node_t *node; +#else + void *node; +#endif }; #endif diff --git a/include/xine/video_out.h b/include/xine/video_out.h index 83d6986bb..c7432e1fc 100644 --- a/include/xine/video_out.h +++ b/include/xine/video_out.h @@ -45,6 +45,9 @@ extern "C" { #include #include +#ifdef XINE_COMPILE +# include +#endif typedef struct vo_frame_s vo_frame_t; typedef struct vo_driver_s vo_driver_t; @@ -354,7 +357,17 @@ struct vo_driver_s { */ void (*dispose) (vo_driver_t *self); - void *node; /* needed by plugin_loader */ + /** + * @brief Pointer to the loaded plugin node. + * + * Used by the plugins loader. It's an opaque type when using the + * structure outside of xine's build. + */ +#ifdef XINE_COMPILE + plugin_node_t *node; +#else + void *node; +#endif }; struct video_driver_class_s { -- cgit v1.2.3