From 7a42265fbf3833b328f7ac87d58d732a179ef6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Mon, 31 Dec 2007 11:40:37 +0100 Subject: Combine vdr plugins into a single binary. Several files were renamed for consistency. --HG-- rename : include/xine/input_vdr.h => include/xine/vdr.h rename : src/vdr/post_vdr.c => src/vdr/combined_vdr.c rename : src/vdr/post_vdr.h => src/vdr/combined_vdr.h --- src/vdr/Makefile.am | 10 ++---- src/vdr/combined_vdr.c | 44 ++++++++++++++++++++++++++ src/vdr/combined_vdr.h | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ src/vdr/input_vdr.c | 18 ++--------- src/vdr/post_vdr.c | 42 ------------------------- src/vdr/post_vdr.h | 81 ----------------------------------------------- src/vdr/post_vdr_audio.c | 2 +- src/vdr/post_vdr_video.c | 2 +- 8 files changed, 134 insertions(+), 147 deletions(-) create mode 100644 src/vdr/combined_vdr.c create mode 100644 src/vdr/combined_vdr.h delete mode 100644 src/vdr/post_vdr.c delete mode 100644 src/vdr/post_vdr.h (limited to 'src') diff --git a/src/vdr/Makefile.am b/src/vdr/Makefile.am index e4912176a..cfbd86be0 100644 --- a/src/vdr/Makefile.am +++ b/src/vdr/Makefile.am @@ -4,12 +4,8 @@ AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) if ENABLE_DVB -xineplug_LTLIBRARIES = xineplug_inp_vdr.la -xinepost_LTLIBRARIES = xineplug_post_vdr.la +xineplug_LTLIBRARIES = xineplug_vdr.la endif -xineplug_inp_vdr_la_SOURCES = input_vdr.c -xineplug_inp_vdr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) - -xineplug_post_vdr_la_SOURCES = post_vdr.c post_vdr_video.c post_vdr_audio.c post_vdr.h -xineplug_post_vdr_la_LIBADD = $(XINE_LIB) +xineplug_vdr_la_SOURCES = combined_vdr.c combined_vdr.h input_vdr.c post_vdr_video.c post_vdr_audio.c +xineplug_vdr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) diff --git a/src/vdr/combined_vdr.c b/src/vdr/combined_vdr.c new file mode 100644 index 000000000..382f490cb --- /dev/null +++ b/src/vdr/combined_vdr.c @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2000-2004 the xine project + * + * This file is part of xine, a free video player. + * + * xine is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * xine is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ + +/* + * plugins for VDR + */ + +#include +#include +#include "combined_vdr.h" + + + +static const post_info_t vdr_video_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; +static const post_info_t vdr_audio_special_info = { XINE_POST_TYPE_AUDIO_FILTER }; + +/* exported plugin catalog entry */ +const plugin_info_t xine_plugin_info[] EXPORTED = +{ + /* type , API, "name" , version , special_info , init_function */ + { PLUGIN_INPUT, 18, "VDR" , XINE_VERSION_CODE, NULL , &vdr_input_init_plugin }, + { PLUGIN_POST , 9, "vdr" , XINE_VERSION_CODE, &vdr_video_special_info, &vdr_video_init_plugin }, + { PLUGIN_POST , 9, "vdr_video", XINE_VERSION_CODE, &vdr_video_special_info, &vdr_video_init_plugin }, + { PLUGIN_POST , 9, "vdr_audio", XINE_VERSION_CODE, &vdr_audio_special_info, &vdr_audio_init_plugin }, + { PLUGIN_NONE , 0, "" , 0 , NULL , NULL } +}; + diff --git a/src/vdr/combined_vdr.h b/src/vdr/combined_vdr.h new file mode 100644 index 000000000..a802e7f2f --- /dev/null +++ b/src/vdr/combined_vdr.h @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2000-2004 the xine project + * + * This file is part of xine, a free video player. + * + * xine is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * xine is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ + +#ifndef __COMBINED_VDR_H +#define __COMBINED_VDR_H + + + +typedef struct vdr_set_video_window_data_s { + int32_t x; + int32_t y; + int32_t w; + int32_t h; + int32_t w_ref; + int32_t h_ref; + +} vdr_set_video_window_data_t; + + + +typedef struct vdr_frame_size_changed_data_s { + int32_t x; + int32_t y; + int32_t w; + int32_t h; + double r; + +} vdr_frame_size_changed_data_t; + + + +typedef struct vdr_select_audio_data_s { + uint8_t channels; + +} vdr_select_audio_data_t; + + + +inline static int vdr_is_vdr_stream(xine_stream_t *stream) +{ + if (!stream + || !stream->input_plugin + || !stream->input_plugin->input_class) + { + return 0; + } + + if (stream->input_plugin->input_class->identifier && + strcmp(stream->input_plugin->input_class->identifier, "VDR")) + return 1; + + return 0; +} + + + +/* plugin class initialization function */ +void *vdr_input_init_plugin(xine_t *xine, void *data); +void *vdr_video_init_plugin(xine_t *xine, void *data); +void *vdr_audio_init_plugin(xine_t *xine, void *data); + + + +#endif /* __COMBINED_VDR_H */ + diff --git a/src/vdr/input_vdr.c b/src/vdr/input_vdr.c index 91c3fa454..9634faa96 100644 --- a/src/vdr/input_vdr.c +++ b/src/vdr/input_vdr.c @@ -45,8 +45,8 @@ #include #include -#include -#include "post_vdr.h" +#include +#include "combined_vdr.h" @@ -2042,7 +2042,7 @@ static char **vdr_class_get_autoplay_list(input_class_t *this_gen, return class->mrls; } -static void *init_class(xine_t *xine, void *data) +void *vdr_input_init_plugin(xine_t *xine, void *data) { vdr_input_class_t *this; @@ -2065,15 +2065,3 @@ static void *init_class(xine_t *xine, void *data) return this; } - -/* - * exported plugin catalog entry - */ - -const plugin_info_t xine_plugin_info[] EXPORTED = -{ - /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 18, "VDR", XINE_VERSION_CODE, NULL, init_class }, - { PLUGIN_NONE, 0, "", 0, NULL, NULL } -}; - diff --git a/src/vdr/post_vdr.c b/src/vdr/post_vdr.c deleted file mode 100644 index 77b8b56fc..000000000 --- a/src/vdr/post_vdr.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2000-2004 the xine project - * - * This file is part of xine, a free video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - */ - -/* - * plugins for VDR - */ - -#include -#include -#include "post_vdr.h" - - - -static const post_info_t vdr_video_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; -static const post_info_t vdr_audio_special_info = { XINE_POST_TYPE_AUDIO_FILTER }; - -const plugin_info_t xine_plugin_info[] EXPORTED = -{ - /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 9, "vdr" , XINE_VERSION_CODE, &vdr_video_special_info, &vdr_video_init_plugin }, - { PLUGIN_POST, 9, "vdr_video", XINE_VERSION_CODE, &vdr_video_special_info, &vdr_video_init_plugin }, - { PLUGIN_POST, 9, "vdr_audio", XINE_VERSION_CODE, &vdr_audio_special_info, &vdr_audio_init_plugin }, - { PLUGIN_NONE, 0, "", 0, NULL, NULL } -}; - diff --git a/src/vdr/post_vdr.h b/src/vdr/post_vdr.h deleted file mode 100644 index 46aa8dcb3..000000000 --- a/src/vdr/post_vdr.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2000-2004 the xine project - * - * This file is part of xine, a free video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - */ - -#ifndef __POST_VDR_H -#define __POST_VDR_H - - - -typedef struct vdr_set_video_window_data_s { - int32_t x; - int32_t y; - int32_t w; - int32_t h; - int32_t w_ref; - int32_t h_ref; - -} vdr_set_video_window_data_t; - - - -typedef struct vdr_frame_size_changed_data_s { - int32_t x; - int32_t y; - int32_t w; - int32_t h; - double r; - -} vdr_frame_size_changed_data_t; - - - -typedef struct vdr_select_audio_data_s { - uint8_t channels; - -} vdr_select_audio_data_t; - - - -inline static int vdr_is_vdr_stream(xine_stream_t *stream) -{ - if (!stream - || !stream->input_plugin - || !stream->input_plugin->input_class) - { - return 0; - } - - if (stream->input_plugin->input_class->identifier && - strcmp(stream->input_plugin->input_class->identifier, "VDR")) - return 1; - - return 0; -} - - - -/* plugin class initialization function */ -void *vdr_video_init_plugin(xine_t *xine, void *); -void *vdr_audio_init_plugin(xine_t *xine, void *); - - - -#endif /* __POST_VDR_H */ - diff --git a/src/vdr/post_vdr_audio.c b/src/vdr/post_vdr_audio.c index 79015ec21..ca45ecd35 100644 --- a/src/vdr/post_vdr_audio.c +++ b/src/vdr/post_vdr_audio.c @@ -30,7 +30,7 @@ #include #include -#include "post_vdr.h" +#include "combined_vdr.h" diff --git a/src/vdr/post_vdr_video.c b/src/vdr/post_vdr_video.c index 8e66c8eb5..ff6c32504 100644 --- a/src/vdr/post_vdr_video.c +++ b/src/vdr/post_vdr_video.c @@ -30,7 +30,7 @@ #include #include -#include "post_vdr.h" +#include "combined_vdr.h" -- cgit v1.2.3