mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 19:25:18 +00:00
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
5 changed files with 29 additions and 13 deletions
|
@ -2,6 +2,8 @@
|
|||
#undef PLUGINS_SRCDIR
|
||||
#undef PLUGINS_USE_SRCDIR
|
||||
|
||||
#undef GST_CONFIG_DIR
|
||||
|
||||
#undef HAVE_CPU_I386
|
||||
#undef HAVE_CPU_PPC
|
||||
|
||||
|
|
17
configure.in
17
configure.in
|
@ -408,6 +408,17 @@ AC_ARG_ENABLE(profiling,
|
|||
esac],
|
||||
[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 # Set defines according to variables set above #
|
||||
|
@ -493,6 +504,11 @@ dnl ############################
|
|||
dnl # Set up some more defines #
|
||||
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
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
PLUGINS_DIR=${ac_default_prefix}/lib/gst
|
||||
|
@ -509,7 +525,6 @@ AC_SUBST(PLUGINS_SRCDIR)
|
|||
|
||||
|
||||
|
||||
|
||||
dnl ##############################
|
||||
dnl # Set up the defaults cflags #
|
||||
dnl ##############################
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
</programlisting>
|
||||
|
||||
<para>
|
||||
While this mechanism is quite effective it also has one big problems:
|
||||
The elements are created base on their name. Indeed, we create an
|
||||
While this mechanism is quite effective it also has some big problems:
|
||||
The elements are created based on their name. Indeed, we create an
|
||||
element mpg123 by explicitly stating the mpg123 elements name.
|
||||
Our little program therefore always uses the mpg123 decoder element
|
||||
to decode the MP3 audio stream, even if there are 3 other MP3 decoders
|
||||
|
|
|
@ -25,14 +25,11 @@
|
|||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
|
||||
//#define GST_DEBUG_ENABLED
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstplugin.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
//#undef PLUGINS_USE_SRCDIR
|
||||
|
||||
/* list of loaded modules and its sequence number */
|
||||
GList *_gst_modules;
|
||||
gint _gst_modules_seqno;
|
||||
|
@ -77,12 +74,12 @@ _gst_plugin_initialize (void)
|
|||
PLUGINS_SRCDIR "/gst/elements");
|
||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths,
|
||||
PLUGINS_SRCDIR "/gst/types");
|
||||
#else
|
||||
#else /* PLUGINS_USE_SRCDIR */
|
||||
/* add the main (installed) library path */
|
||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths, PLUGINS_DIR);
|
||||
#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")) {
|
||||
g_warning ("gstplugin: registry needs rebuild\n");
|
||||
|
|
|
@ -31,9 +31,11 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define GST_CONFIG_DIR "/etc/gstreamer"
|
||||
#define GLOBAL_REGISTRY_FILE GST_CONFIG_DIR"/reg.xml"
|
||||
#define GLOBAL_REGISTRY_FILE_TMP GST_CONFIG_DIR"/.reg.xml.tmp"
|
||||
#include "config.h"
|
||||
|
||||
#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;
|
||||
|
||||
|
@ -102,7 +104,7 @@ int main(int argc,char *argv[])
|
|||
if (argc != 1) usage(argv[0]);
|
||||
|
||||
// Check that directory for config exists
|
||||
check_dir(GST_CONFIG_DIR);
|
||||
check_dir(GLOBAL_REGISTRY_DIR);
|
||||
|
||||
// Read the plugins
|
||||
_gst_plugin_spew = TRUE;
|
||||
|
|
Loading…
Reference in a new issue