diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2004-09-01 18:19:49 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2004-09-01 18:19:49 +0000 |
commit | ebdf62cd13f7976890cbf3703571fc55a20df47e (patch) | |
tree | 2ce7eea59f7ff5173e2c91f550d86b9cfe2f392a /src | |
parent | 8c04de48fdd50d279f1b7d93f184006ca1db056a (diff) | |
download | xine-lib-ebdf62cd13f7976890cbf3703571fc55a20df47e.tar.gz xine-lib-ebdf62cd13f7976890cbf3703571fc55a20df47e.tar.bz2 |
Improvements and implementing Michael's suggestions:
- new flags added at the end, so the users can override them properly
- removed X11 libs and cflags from xine-config and libxine.pc
- removed replacing for setenv (thanks to Robin for the hint)
- better way for temporary disabling of w32dll module
- data directories will be different on Windows
- force installing catalogs with translation into XINE_LOCALEDIR
- timer linked in xine-engine (just central place for linking such stuff)
- adjusted load_plugins and remove reduntant WIN32 conditionals
- removed unused $(lib_thr)
CVS patchset: 6927
CVS date: 2004/09/01 18:19:49
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/xine-engine/Makefile.am | 18 | ||||
-rw-r--r-- | src/xine-engine/audio_out.c | 10 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 34 | ||||
-rw-r--r-- | src/xine-utils/Makefile.am | 11 | ||||
-rw-r--r-- | src/xine-utils/utils.c | 4 | ||||
-rw-r--r-- | src/xine-utils/xineutils.h | 15 |
7 files changed, 36 insertions, 62 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index d63729331..f35db8cb7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,9 +1,5 @@ include $(top_srcdir)/misc/Makefile.common -if !WIN32 - w32dll = libw32dll -endif - # Order is important be careful changing SUBDIRS SUBDIRS = \ xine-utils \ @@ -21,7 +17,7 @@ SUBDIRS = \ libsputext \ libdts \ libmad \ - $(w32dll) \ + libw32dll \ liblpcm \ libxinevdec \ libxineadec \ diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 07d7f9806..6c22f2481 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -9,16 +9,15 @@ XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la INTERNAL_ZLIB_LIB = $(top_builddir)/win32/contrib/zlib/libzlib.la DIRENT_LIB = $(top_builddir)/win32/contrib/libdirent.la INTERNAL_PTHREAD_LIB = $(top_builddir)/win32/contrib/pthreads/libpthread.la -SETENV_LIB = $(top_builddir)/win32/contrib/libsetenv.la +TIMER_LIB = $(top_builddir)/win32/contrib/libtimer.la if !HAVE_ZLIB zlib_lib = $(INTERNAL_ZLIB_LIB) endif if WIN32 -if !HAVE_SETENV -setenv_lib = $(SETENV_LIB) -endif dirent_lib = $(DIRENT_LIB) pthread_lib = $(INTERNAL_PTHREAD_LIB) +timer_lib = $(TIMER_LIB) +def_ldflags="-Wl,--output-def,libxine.def" endif libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \ @@ -32,14 +31,13 @@ libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \ EXTRA_DIST = lrb.c lrb.h libxine_la_DEPENDENCIES = @INTLLIBS@ $(XINEUTILS_LIB) $(zlib_lib) \ - $(dirent_lib) $(pthread_lib) \ - $(setenv_lib) + $(dirent_lib) $(pthread_lib) $(timer_lib) libxine_la_LIBADD = $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) @INTLLIBS@ $(ZLIB_LIBS) \ -lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) \ - $(dirent_lib) $(setenv_lib) + $(dirent_lib) $(timer_lib) libxine_la_LDFLAGS = \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) $(def_ldflags) include_HEADERS = buffer.h metronom.h configfile.h vo_scale.h \ @@ -65,5 +63,5 @@ $(INTERNAL_ZLIB_LIB): $(DIRENT_LIB): $(MAKE) -C $(top_builddir)/win32/contrib libdirent.la -$(SETENV_LIB): - $(MAKE) -C $(top_builddir)/win32/contrib libsetenv.la +$(TIMER_LIB): + $(MAKE) -C $(top_builddir)/win32/contrib libtimer.la diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 381d33aef..a91911f74 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.183 2004/08/02 12:51:11 miguelfreitas Exp $ + * $Id: audio_out.c,v 1.184 2004/09/01 18:19:50 valtri Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -450,7 +450,7 @@ static void ao_fill_gap (aos_t *this, int64_t pts_len) { num_frames = pts_len * this->frames_per_kpts / 1024; xprintf (this->xine, XINE_VERBOSITY_DEBUG, - "inserting %" PRId64 " 0-frames to fill a gap of %" PRId64 " pts\n", num_frames, pts_len); + "audio_out: inserting %" PRId64 " 0-frames to fill a gap of %" PRId64 " pts\n", num_frames, pts_len); if ((this->output.mode == AO_CAP_MODE_A52) || (this->output.mode == AO_CAP_MODE_AC5)) { write_pause_burst(this,num_frames); @@ -1274,7 +1274,7 @@ static int ao_change_settings(aos_t *this, uint32_t bits, uint32_t rate, int mod if ( output_sample_rate == 0) { this->driver_open = 0; - xprintf (this->xine, XINE_VERBOSITY_DEBUG, "open failed!\n"); + xprintf (this->xine, XINE_VERBOSITY_DEBUG, "audio_out: open failed!\n"); return 0; } else { this->driver_open = 1; @@ -1452,7 +1452,7 @@ static void ao_close(xine_audio_port_t *this_gen, xine_stream_t *stream) { /* close driver if no streams left */ if (!cur && !this->grab_only) { - xprintf (this->xine, XINE_VERBOSITY_DEBUG, "no streams left, closing driver\n"); + xprintf (this->xine, XINE_VERBOSITY_DEBUG, "audio_out: no streams left, closing driver\n"); if (this->audio_loop_running) { /* make sure there are no more buffers on queue */ @@ -2056,7 +2056,7 @@ xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, _x_abort(); } else - xprintf (this->xine, XINE_VERBOSITY_DEBUG, "thread created\n"); + xprintf (this->xine, XINE_VERBOSITY_DEBUG, "audio_out: thread created\n"); pthread_attr_destroy(&pth_attrs); } diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index b85b1920a..8faddd427 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.185 2004/08/28 20:03:42 valtri Exp $ + * $Id: load_plugins.c,v 1.186 2004/09/01 18:19:50 valtri Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -512,7 +512,7 @@ static void collect_plugins(xine_t *this, char *path){ printf("load_plugins: %s not cached\n", str); #endif - if(!info && !(lib = dlopen (str, RTLD_LAZY | RTLD_GLOBAL))) { + if(!info && (lib = dlopen (str, RTLD_LAZY | RTLD_GLOBAL)) == NULL) { char *error = dlerror(); /* too noisy -- but good to catch unresolved references */ xprintf(this, XINE_VERBOSITY_LOG, @@ -636,7 +636,7 @@ static void *_load_plugin_class(xine_t *this, void *lib; - if(!(lib = dlopen (filename, RTLD_LAZY | RTLD_GLOBAL))) { + if((lib = dlopen (filename, RTLD_LAZY | RTLD_GLOBAL)) == NULL) { char *error = dlerror(); xine_log (this, XINE_LOG_PLUGIN, @@ -979,33 +979,33 @@ static void load_cached_catalog (xine_t *this) { */ void _x_scan_plugins (xine_t *this) { - const char *homedir; - char *plugindir; - char *pluginpath; + char *homedir, *plugindir, *pluginpath; int i,j; int lenpluginpath; lprintf("_x_scan_plugins()\n"); -/* TODO - This needs to be fixed for WIN32 */ -#ifndef WIN32 if (this == NULL || this->config == NULL) { fprintf(stderr, "%s(%s@%d): parameter should be non null, exiting\n", __FILE__, __XINE_FUNCTION__, __LINE__); _x_abort(); } -#endif - homedir = xine_get_homedir(); + homedir = strdup(xine_get_homedir()); this->plugin_catalog = _new_catalog(); load_cached_catalog (this); - if ( !(pluginpath = getenv("XINE_PLUGIN_PATH")) ){ -#ifndef WIN32 - pluginpath = "~/.xine/plugins:" XINE_PLUGINDIR; -#else - pluginpath = XINE_PLUGINDIR; -#endif + if ((pluginpath = getenv("XINE_PLUGIN_PATH")) != NULL) { + pluginpath = strdup(pluginpath); + } else { + char *str1, *str2; + int len; + + str1 = "~/.xine/plugins"; + str2 = XINE_PLUGINDIR; + len = strlen(str1) + strlen(str2) + 2; + pluginpath = xine_xmalloc(len); + snprintf(pluginpath, len, "%s:%s", str1, str2); } plugindir = xine_xmalloc(strlen(pluginpath)+strlen(homedir)+2); j=0; @@ -1029,6 +1029,8 @@ void _x_scan_plugins (xine_t *this) { } } free(plugindir); + free(pluginpath); + free(homedir); save_catalog (this); diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index 3fefad590..99b819044 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -9,12 +9,6 @@ if PPC_ARCH pppc_files = ppcasm_string.S endif -if WIN32 -TIMER_LIB = $(top_builddir)/win32/contrib/libtimer.la -else -#lib_thr = $(THREAD_LIBS) -endif - AM_CFLAGS = $(X_CFLAGS) libxineutils_la_SOURCES = $(pppc_files) \ @@ -30,9 +24,6 @@ libxineutils_la_SOURCES = $(pppc_files) \ xmllexer.c \ xine_buffer.c -libxineutils_la_DEPENDENCIES = $(TIMER_LIB) -libxineutils_la_LIBADD = $(lib_thr) $(TIMER_LIB) - include_HEADERS = \ attributes.h \ compat.h \ @@ -43,5 +34,3 @@ include_HEADERS = \ noinst_HEADERS = ppcasm_string.h xine_check.h -$(TIMER_LIB): - $(MAKE) -C $(top_builddir)/win32/contrib libtimer.la diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index 70bb406fa..52364b397 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: utils.c,v 1.30 2004/08/27 19:33:37 valtri Exp $ + * $Id: utils.c,v 1.31 2004/09/01 18:19:51 valtri Exp $ * */ #define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */ @@ -259,7 +259,7 @@ void *xine_xmalloc_aligned(size_t alignment, size_t size, void **base) { return ptr; } -#if defined(WIN32) +#if defined(__CYGWIN__) || defined(WIN32) /* Ridiculous hack to return valid xine support * directories. These should be read from diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index 77a9c9217..fffc2b304 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.90 2004/08/27 19:33:37 valtri Exp $ + * $Id: xineutils.h,v 1.91 2004/09/01 18:19:51 valtri Exp $ * */ #ifndef XINEUTILS_H @@ -55,17 +55,6 @@ extern "C" { #include <stdio.h> #include <string.h> -#ifdef WIN32 -/* Ridiculous hack to return valid xine support - * directories. These should be read from - * a registry entry set at install time. - */ - /* -# define XINE_PLUGINDIR exec_path_append_subdir( "plugins" ) -# define XINE_FONTDIR exec_path_append_subdir( "plugins" ) -# define XINE_LOCALEDIR exec_path_append_subdir( "plugins" )*/ -#endif - /* * debugable mutexes */ @@ -1120,7 +1109,7 @@ char *xine_basename (char *name); */ const char *xine_hstrerror(int err); -#ifdef WIN32 +#if defined(__CYGWIN__) || defined(WIN32) char *exec_path_append_subdir(char * string); #endif |