summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-26 14:35:07 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-26 14:35:07 +0100
commit738e030b340fb9525a75cf87144d5d3965c8ab65 (patch)
tree492af7a8d03d4d9383ff7593ee6bc1891eaf2033
parente62ee2e80946b4593826a1fc244829dca5ba526f (diff)
parent0e5934002fd660a25d844d0f11fa7d2e53a10297 (diff)
downloadxine-lib-738e030b340fb9525a75cf87144d5d3965c8ab65.tar.gz
xine-lib-738e030b340fb9525a75cf87144d5d3965c8ab65.tar.bz2
Merge backout.
-rw-r--r--.hgignore1
-rw-r--r--TODO2
-rw-r--r--include/xine/plugin_catalog.h16
-rw-r--r--src/xine-engine/Makefile.am3
-rw-r--r--src/xine-engine/load_plugins.c8
-rw-r--r--src/xine-engine/load_plugins.h50
-rw-r--r--src/xine-engine/xine.c6
7 files changed, 64 insertions, 22 deletions
diff --git a/.hgignore b/.hgignore
index 38db51c92..973e0a305 100644
--- a/.hgignore
+++ b/.hgignore
@@ -10,6 +10,7 @@ xine-lib-*.tar.bz2
*.lo
*.la
*.so
+*.loT
.libs
.deps/*
.depend
diff --git a/TODO b/TODO
index 103f0468f..81e346b7a 100644
--- a/TODO
+++ b/TODO
@@ -22,6 +22,8 @@ For 1.2 series
- review media_eject_media, possibly rewrite to use libcdio;
- improve error reporting (for when demuxer/decoder plugins aren't found);
- HTTPS.
+- review translable strings, try to follow a defined schema for naming and
+ error reporting;
known bugs
==========
diff --git a/include/xine/plugin_catalog.h b/include/xine/plugin_catalog.h
index 1c2d5e806..be02c3649 100644
--- a/include/xine/plugin_catalog.h
+++ b/include/xine/plugin_catalog.h
@@ -71,20 +71,4 @@ struct plugin_catalog_s {
};
typedef struct plugin_catalog_s plugin_catalog_t;
-/*
- * 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) XINE_PROTECTED;
-
-
-/*
- * dispose all currently loaded plugins (shutdown)
- */
-
-void _x_dispose_plugins (xine_t *this) XINE_PROTECTED;
-
#endif
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index c509b62af..49757f841 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -24,7 +24,8 @@ libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \
video_overlay.c osd.c spu.c scratch.c demux.c vo_scale.c \
xine_interface.c post.c broadcaster.c io_helper.c \
input_rip.c input_cache.c info_helper.c refcounter.c \
- alphablend.c
+ alphablend.c \
+ load_plugins.h
libxine_la_DEPENDENCIES = $(XINEUTILS_LIB) $(XDG_BASEDIR_DEPS) \
$(pthread_dep) $(LIBXINEPOSIX)
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 5f0da4cff..eae30efe4 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -42,6 +42,8 @@
#include <basedir.h>
+#include "load_plugins.h"
+
#define LOG_MODULE "load_plugins"
#define LOG_VERBOSE
@@ -1258,7 +1260,7 @@ void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input) {
input->dispose(input);
if (input->node) {
pthread_mutex_lock(&catalog->lock);
- dec_node_ref(node);
+ dec_node_ref(input->node);
pthread_mutex_unlock(&catalog->lock);
}
}
@@ -1479,7 +1481,7 @@ void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux) {
demux->dispose(demux);
if (demux->node) {
pthread_mutex_lock(&catalog->lock);
- dec_node_ref(node);
+ dec_node_ref(demux->node);
pthread_mutex_unlock(&catalog->lock);
}
}
@@ -1974,7 +1976,7 @@ void _x_free_video_decoder (xine_stream_t *stream, video_decoder_t *vd) {
if (vd->node) {
pthread_mutex_lock (&catalog->lock);
- dec_node_ref(node);
+ dec_node_ref(vd->node);
pthread_mutex_unlock (&catalog->lock);
}
}
diff --git a/src/xine-engine/load_plugins.h b/src/xine-engine/load_plugins.h
new file mode 100644
index 000000000..7e7d3cc93
--- /dev/null
+++ b/src/xine-engine/load_plugins.h
@@ -0,0 +1,50 @@
+/*
+ * 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 <xine.h>
+
+/*
+ * 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 48fb46958..3da311dfc 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -79,6 +79,8 @@
# include <winsock.h>
#endif /* WIN32 */
+#include "load_plugins.h"
+
static void mutex_cleanup (void *mutex) {
pthread_mutex_unlock ((pthread_mutex_t *) mutex);
@@ -591,7 +593,7 @@ static int stream_rewire_video(xine_post_out_t *output, void *data)
return 1;
}
-void xine_dispose_internal (xine_stream_t *stream);
+static void xine_dispose_internal (xine_stream_t *stream);
xine_stream_t *xine_stream_new (xine_t *this,
xine_audio_port_t *ao, xine_video_port_t *vo) {
@@ -1445,7 +1447,7 @@ int xine_eject (xine_stream_t *stream) {
return status;
}
-void xine_dispose_internal (xine_stream_t *stream) {
+static void xine_dispose_internal (xine_stream_t *stream) {
xine_list_iterator_t *ite;