From d2131a4d4264a86a98722e9da123dceb43063dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 5 May 2008 22:59:36 +0200 Subject: Replace load_plugins.h with a more generic xine_private.h, move the functions that are now hidden from xine_internal.h to xine_private.h. --- include/xine/xine_internal.h | 20 ---------- src/xine-engine/Makefile.am | 2 +- src/xine-engine/input_cache.c | 1 + src/xine-engine/input_rip.c | 1 + src/xine-engine/load_plugins.c | 4 +- src/xine-engine/load_plugins.h | 50 ------------------------- src/xine-engine/xine.c | 3 +- src/xine-engine/xine_private.h | 85 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 91 insertions(+), 75 deletions(-) delete mode 100644 src/xine-engine/load_plugins.h create mode 100644 src/xine-engine/xine_private.h diff --git a/include/xine/xine_internal.h b/include/xine/xine_internal.h index 40c1b75ed..eecae9c30 100644 --- a/include/xine/xine_internal.h +++ b/include/xine/xine_internal.h @@ -377,26 +377,6 @@ int _x_message(xine_stream_t *stream, int type, ...) XINE_SENTINEL XINE_PROTECTE void _x_flush_events_queues (xine_stream_t *stream) XINE_PROTECTED; - -/* find and instantiate input and demux plugins */ - -input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mrl); -demux_plugin_t *_x_find_demux_plugin (xine_stream_t *stream, input_plugin_t *input); -demux_plugin_t *_x_find_demux_plugin_by_name (xine_stream_t *stream, const char *name, input_plugin_t *input); -demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const char *last_demux_name, input_plugin_t *input); -input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const char *filename); -input_plugin_t *_x_cache_plugin_get_instance (xine_stream_t *stream); -void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input); -void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux); - -/* create decoder fifos and threads */ - -int _x_video_decoder_init (xine_stream_t *stream); -void _x_video_decoder_shutdown (xine_stream_t *stream); - -int _x_audio_decoder_init (xine_stream_t *stream); -void _x_audio_decoder_shutdown (xine_stream_t *stream); - /* extra_info operations */ void _x_extra_info_reset( extra_info_t *extra_info ) XINE_PROTECTED; diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 2942d3560..5792b667d 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -25,7 +25,7 @@ libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \ xine_interface.c post.c broadcaster.c io_helper.c \ input_rip.c input_cache.c info_helper.c refcounter.c \ alphablend.c \ - load_plugins.h + xine_private.h libxine_la_DEPENDENCIES = $(XINEUTILS_LIB) $(XDG_BASEDIR_DEPS) \ $(pthread_dep) $(LIBXINEPOSIX) diff --git a/src/xine-engine/input_cache.c b/src/xine-engine/input_cache.c index 658ec0f58..86fb76051 100644 --- a/src/xine-engine/input_cache.c +++ b/src/xine-engine/input_cache.c @@ -34,6 +34,7 @@ */ #include +#include "xine_private.h" #include #define DEFAULT_BUFFER_SIZE 1024 diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index e7ef356b3..9f4d7eb2b 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -65,6 +65,7 @@ #endif #include +#include "xine_private.h" #ifndef HAVE_FSEEKO # define fseeko fseek diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index b3abda893..83442aa8a 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -42,8 +42,6 @@ #include -#include "load_plugins.h" - #define LOG_MODULE "load_plugins" #define LOG_VERBOSE @@ -66,6 +64,8 @@ #include #include +#include "xine_private.h" + #define LINE_MAX_LENGTH (1024 * 32) /* 32 KiB */ #if 0 diff --git a/src/xine-engine/load_plugins.h b/src/xine-engine/load_plugins.h deleted file mode 100644 index 7e7d3cc93..000000000 --- a/src/xine-engine/load_plugins.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2007 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 - */ - -/** - * @file - * @brief Internal functions related to the plugin catalog. - * - * @internal This code should not be used by plugins or frontends, it's only - * used by the xine-engine. - */ - -#ifndef __LOAD_PLUGINS_H__ -#define __LOAD_PLUGINS_H__ - -#include - -/* - * load plugins into catalog - * - * all input+demux plugins will be fully loaded+initialized - * decoder plugins are loaded on demand - * video/audio output plugins have special load/probe functions - */ -void _x_scan_plugins (xine_t *this); - - -/* - * dispose all currently loaded plugins (shutdown) - */ - -void _x_dispose_plugins (xine_t *this); - -#endif diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 890d8ffc6..c51fdaaf7 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -81,8 +81,7 @@ # include #endif /* WIN32 */ -#include "load_plugins.h" - +#include "xine_private.h" static void mutex_cleanup (void *mutex) { pthread_mutex_unlock ((pthread_mutex_t *) mutex); diff --git a/src/xine-engine/xine_private.h b/src/xine-engine/xine_private.h new file mode 100644 index 000000000..41a23d7da --- /dev/null +++ b/src/xine-engine/xine_private.h @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2000-2008 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 + */ + +/** + * @file + * @brief Declaration of internal, private functions for xine-lib. + * + * @internal These functions should not be used by neither plugins nor + * frontends. + */ + +#ifndef XINE_PRIVATE_H__ +#define XINE_PRIVATE_H__ + +#include + +/** + * @defgroup load_plugins Plugins loading + * @brief Functions related with plugins loading. + */ + +/** + * @ingroup load_plugins + * @brief Load plugins into catalog + * @param this xine instance + * + * All input and demux plugins will be fully loaded and initialized. + * Decoder plugins are loaded on demand. Video/audio output plugins + * have special load/probe functions + */ +void _x_scan_plugins (xine_t *this); + +/** + * @ingroup load_plugins + * @brief Dispose (shutdown) all currently loaded plugins + * @param this xine instance + */ +void _x_dispose_plugins (xine_t *this); + +///@{ +/** + * @defgroup + * @brief find and instantiate input and demux plugins + */ +input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mrl); +demux_plugin_t *_x_find_demux_plugin (xine_stream_t *stream, input_plugin_t *input); +demux_plugin_t *_x_find_demux_plugin_by_name (xine_stream_t *stream, const char *name, input_plugin_t *input); +demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const char *last_demux_name, input_plugin_t *input); +input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const char *filename); +input_plugin_t *_x_cache_plugin_get_instance (xine_stream_t *stream); +void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input); +void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux); +///@} + +///@{ +/** + * @defgroup + * @brief create decoder fifos and threads +*/ + +int _x_video_decoder_init (xine_stream_t *stream); +void _x_video_decoder_shutdown (xine_stream_t *stream); + +int _x_audio_decoder_init (xine_stream_t *stream); +void _x_audio_decoder_shutdown (xine_stream_t *stream); +///@} + +#endif -- cgit v1.2.3