Config directory (which currently just holds the registry)ecan now be set by configure --with-configdir=<directory path>
Original commit message from CVS: Config directory (which currently just holds the registry)ecan now be set by configure --with-configdir=<directory path>
This commit is contained in:
parent
62c3227e2f
commit
0a418d15d0
@ -2,6 +2,8 @@
|
|||||||
#undef PLUGINS_SRCDIR
|
#undef PLUGINS_SRCDIR
|
||||||
#undef PLUGINS_USE_SRCDIR
|
#undef PLUGINS_USE_SRCDIR
|
||||||
|
|
||||||
|
#undef GST_CONFIG_DIR
|
||||||
|
|
||||||
#undef HAVE_CPU_I386
|
#undef HAVE_CPU_I386
|
||||||
#undef HAVE_CPU_PPC
|
#undef HAVE_CPU_PPC
|
||||||
|
|
||||||
|
17
configure.in
17
configure.in
@ -408,6 +408,17 @@ AC_ARG_ENABLE(profiling,
|
|||||||
esac],
|
esac],
|
||||||
[USE_PROFILING=no]) dnl Default value
|
[USE_PROFILING=no]) dnl Default value
|
||||||
|
|
||||||
|
dnl Default value
|
||||||
|
GST_CONFIG_DIR="/etc/gstreamer"
|
||||||
|
AC_ARG_WITH(configdir,
|
||||||
|
[ --with-configdir specify path to use for configdir],
|
||||||
|
[case "${withval}" in
|
||||||
|
yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
|
||||||
|
no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
|
||||||
|
*) GST_CONFIG_DIR="${withval}" ;;
|
||||||
|
esac],
|
||||||
|
[:]) dnl Default value
|
||||||
|
|
||||||
|
|
||||||
dnl ################################################
|
dnl ################################################
|
||||||
dnl # Set defines according to variables set above #
|
dnl # Set defines according to variables set above #
|
||||||
@ -493,6 +504,11 @@ dnl ############################
|
|||||||
dnl # Set up some more defines #
|
dnl # Set up some more defines #
|
||||||
dnl ############################
|
dnl ############################
|
||||||
|
|
||||||
|
dnl Set location of configuration dir.
|
||||||
|
GST_CONFIG_DIR="/etc/gstreamer"
|
||||||
|
AC_DEFINE_UNQUOTED(GST_CONFIG_DIR,"$GST_CONFIG_DIR")
|
||||||
|
AC_SUBST(GST_CONFIG_DIR)
|
||||||
|
|
||||||
dnl Set location of plugin directory
|
dnl Set location of plugin directory
|
||||||
if test "x${prefix}" = "xNONE"; then
|
if test "x${prefix}" = "xNONE"; then
|
||||||
PLUGINS_DIR=${ac_default_prefix}/lib/gst
|
PLUGINS_DIR=${ac_default_prefix}/lib/gst
|
||||||
@ -509,7 +525,6 @@ AC_SUBST(PLUGINS_SRCDIR)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dnl ##############################
|
dnl ##############################
|
||||||
dnl # Set up the defaults cflags #
|
dnl # Set up the defaults cflags #
|
||||||
dnl ##############################
|
dnl ##############################
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
While this mechanism is quite effective it also has one big problems:
|
While this mechanism is quite effective it also has some big problems:
|
||||||
The elements are created base on their name. Indeed, we create an
|
The elements are created based on their name. Indeed, we create an
|
||||||
element mpg123 by explicitly stating the mpg123 elements name.
|
element mpg123 by explicitly stating the mpg123 elements name.
|
||||||
Our little program therefore always uses the mpg123 decoder element
|
Our little program therefore always uses the mpg123 decoder element
|
||||||
to decode the MP3 audio stream, even if there are 3 other MP3 decoders
|
to decode the MP3 audio stream, even if there are 3 other MP3 decoders
|
||||||
|
@ -25,14 +25,11 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
//#define GST_DEBUG_ENABLED
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
|
||||||
#include "gstplugin.h"
|
#include "gstplugin.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
//#undef PLUGINS_USE_SRCDIR
|
|
||||||
|
|
||||||
/* list of loaded modules and its sequence number */
|
/* list of loaded modules and its sequence number */
|
||||||
GList *_gst_modules;
|
GList *_gst_modules;
|
||||||
gint _gst_modules_seqno;
|
gint _gst_modules_seqno;
|
||||||
@ -77,12 +74,12 @@ _gst_plugin_initialize (void)
|
|||||||
PLUGINS_SRCDIR "/gst/elements");
|
PLUGINS_SRCDIR "/gst/elements");
|
||||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
||||||
PLUGINS_SRCDIR "/gst/types");
|
PLUGINS_SRCDIR "/gst/types");
|
||||||
#else
|
#else /* PLUGINS_USE_SRCDIR */
|
||||||
/* add the main (installed) library path */
|
/* add the main (installed) library path */
|
||||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths, PLUGINS_DIR);
|
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths, PLUGINS_DIR);
|
||||||
#endif /* PLUGINS_USE_SRCDIR */
|
#endif /* PLUGINS_USE_SRCDIR */
|
||||||
|
|
||||||
doc = xmlParseFile ("/etc/gstreamer/reg.xml");
|
doc = xmlParseFile (GST_CONFIG_DIR"/reg.xml");
|
||||||
|
|
||||||
if (!doc || strcmp (doc->root->name, "GST-PluginRegistry")) {
|
if (!doc || strcmp (doc->root->name, "GST-PluginRegistry")) {
|
||||||
g_warning ("gstplugin: registry needs rebuild\n");
|
g_warning ("gstplugin: registry needs rebuild\n");
|
||||||
|
@ -31,9 +31,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#define GST_CONFIG_DIR "/etc/gstreamer"
|
#include "config.h"
|
||||||
#define GLOBAL_REGISTRY_FILE GST_CONFIG_DIR"/reg.xml"
|
|
||||||
#define GLOBAL_REGISTRY_FILE_TMP GST_CONFIG_DIR"/.reg.xml.tmp"
|
#define GLOBAL_REGISTRY_DIR GST_CONFIG_DIR
|
||||||
|
#define GLOBAL_REGISTRY_FILE GLOBAL_REGISTRY_DIR"/reg.xml"
|
||||||
|
#define GLOBAL_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.reg.xml.tmp"
|
||||||
|
|
||||||
extern gboolean _gst_plugin_spew;
|
extern gboolean _gst_plugin_spew;
|
||||||
|
|
||||||
@ -102,7 +104,7 @@ int main(int argc,char *argv[])
|
|||||||
if (argc != 1) usage(argv[0]);
|
if (argc != 1) usage(argv[0]);
|
||||||
|
|
||||||
// Check that directory for config exists
|
// Check that directory for config exists
|
||||||
check_dir(GST_CONFIG_DIR);
|
check_dir(GLOBAL_REGISTRY_DIR);
|
||||||
|
|
||||||
// Read the plugins
|
// Read the plugins
|
||||||
_gst_plugin_spew = TRUE;
|
_gst_plugin_spew = TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user