summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS4
-rw-r--r--configure.ac2
-rw-r--r--include/xine.h.in4
-rw-r--r--m4/xine.m41
-rw-r--r--misc/Makefile.am6
-rw-r--r--misc/xine-config.in7
-rw-r--r--src/xine-engine/Makefile.am4
-rw-r--r--src/xine-utils/Makefile.am4
-rw-r--r--src/xine-utils/xine_check.c265
-rw-r--r--src/xine-utils/xine_check.h34
10 files changed, 313 insertions, 18 deletions
diff --git a/AUTHORS b/AUTHORS
index 65e607e00..424b24369 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -71,6 +71,10 @@ Robin KAY <komadori@myrealbox.com>
pgx64[fb] video output plugin, WVE demuxer, EA ADPCM decoder, various
bugfixes
+Automake, autoconf, libtool development, and build fixes.
+
+ Stephen Torri <storri@users.sourceforge.net>
+
xine is using
mpeg2dec - a free MPEG-2 video stream decoder
liba52 - a free A/52 audio stream decoder
diff --git a/configure.ac b/configure.ac
index 9dc9986b5..dde27dd0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,7 +151,7 @@ dnl ---------------------------------------------
dnl debug cflags
dnl ---------------------------------------------
AC_SUBST(DEBUG_CFLAGS)
-DEBUG_CFLAGS="$CFLAGS -g -O -DDEBUG"
+DEBUG_CFLAGS="$CFLAGS -g -DDEBUG"
dnl ---------------------------------------------
dnl threads
diff --git a/include/xine.h.in b/include/xine.h.in
index f36bbde5f..4c96d253e 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -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: xine.h.in,v 1.21 2002/10/19 21:23:52 guenter Exp $
+ * $Id: xine.h.in,v 1.22 2002/10/20 02:17:36 storri Exp $
*
* public xine-lib (libxine) interface and documentation
*
@@ -612,6 +612,8 @@ typedef struct {
* xine-config stuff
*/
+int xine_health_check(void);
+
/*
* config entry data types
*/
diff --git a/m4/xine.m4 b/m4/xine.m4
index 4af7a64cd..5003f40ad 100644
--- a/m4/xine.m4
+++ b/m4/xine.m4
@@ -72,7 +72,6 @@ AC_ARG_ENABLE(xinetest,
xine_config_sub_version=`$XINE_CONFIG $xine_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
xine_data_dir=`$XINE_CONFIG $xine_config_args --datadir`
- xine_logo_mrl=`$XINE_CONFIG $xine_config_args --logomrl`
xine_script_dir=`$XINE_CONFIG $xine_config_args --scriptdir`
xine_desktop_dir=`$XINE_CONFIG $xine_config_args --desktopdir`
xine_plugin_dir=`$XINE_CONFIG $xine_config_args --plugindir`
diff --git a/misc/Makefile.am b/misc/Makefile.am
index 3213f21df..851c13bd2 100644
--- a/misc/Makefile.am
+++ b/misc/Makefile.am
@@ -7,11 +7,7 @@ EXTRA_DIST = autogen.sh \
vga.xinefont.gz \
xine-fontconv.c \
xine-lib.spec.in \
- xine-lib.spec \
- xine_logo.mpv
-
-datadir = $(XINE_DATADIR)
-data_DATA = xine_logo.mpv
+ xine-lib.spec
bin_SCRIPTS = xine-config
diff --git a/misc/xine-config.in b/misc/xine-config.in
index c1ac67532..5abcbaf0e 100644
--- a/misc/xine-config.in
+++ b/misc/xine-config.in
@@ -19,7 +19,6 @@ Options:
[--cflags]
[--plugindir]
[--datadir]
- [--logomrl]
[--scriptdir]
[--desktopdir]
[--localedir]
@@ -72,9 +71,6 @@ while test $# -gt 0; do
--datadir)
echo_datadir=yes
;;
- --logomrl)
- echo_logomrl=yes
- ;;
--scriptdir)
echo_scriptdir=yes
;;
@@ -116,9 +112,6 @@ fi
if test "$echo_datadir" = "yes"; then
echo "@XINE_DATADIR@"
fi
-if test "$echo_logomrl" = "yes"; then
- echo "file://@XINE_DATADIR@/xine_logo.mpv"
-fi
if test "$echo_scriptdir" = "yes"; then
echo "@XINE_SCRIPTPATH@"
fi
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index 6eb07a850..8418d6910 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -2,7 +2,7 @@
## Process this file with automake to produce Makefile.in
##
-AM_CFLAGS = $(THREAD_CFLAGS) $(X_CFLAGS) -DXINE_LOGO_FILE=\"file://@XINE_DATADIR@/xine_logo.mpv\"
+AM_CFLAGS = $(THREAD_CFLAGS) $(X_CFLAGS)
lib_LTLIBRARIES = libxine.la
@@ -32,7 +32,7 @@ noinst_HEADERS = bswap.h nvtvd.h
@INCLUDED_INTL_TRUE@ @cd $(top_builddir)/intl && $(MAKE) libintl.la
debug:
- @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) $(THREAD_CFLAGS) $(X_CFLAGS) -DXINE_LOGO_FILE=\\\"file://@XINE_DATADIR@/xine_logo.mpv\\\""
+ @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) $(THREAD_CFLAGS) $(X_CFLAGS)
install-debug: debug
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am
index 0b1bf4830..1cca7b514 100644
--- a/src/xine-utils/Makefile.am
+++ b/src/xine-utils/Makefile.am
@@ -19,9 +19,10 @@ libxineutils_la_SOURCES = $(pppc_files) \
memcpy.c \
monitor.c \
utils.c \
+ xine_check.c \
xine_mutex.c \
xmllexer.c \
- xmlparser.c
+ xmlparser.c
libxineutils_la_LIBADD = $(THREAD_LIBS)
@@ -30,6 +31,7 @@ include_HEADERS = attributes.h \
compat.h \
ppcasm_string.h \
xineutils.h \
+ xine_check.h \
xmllexer.h \
xmlparser.h
diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c
new file mode 100644
index 000000000..6fd65515d
--- /dev/null
+++ b/src/xine-utils/xine_check.c
@@ -0,0 +1,265 @@
+#include "xine_check.h"
+#include <stdio.h>
+#include "xineutils.h"
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/utsname.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <linux/major.h>
+#include <linux/hdreg.h>
+#include <errno.h>
+
+typedef struct {
+ FILE *fd;
+ char *filename;
+ char *ln;
+ char buf[256];
+} file_info_t;
+
+int xine_health_check()
+{
+ int retval = 0;
+
+#if 0
+ if (xine_health_check_os() < 0)
+ {
+ retval = -1;
+ }
+#endif
+
+ if (xine_health_check_kernel() < 0)
+ {
+ retval = -1;
+ }
+
+#if ARCH_X86
+ if (xine_health_check_mtrr() < 0)
+ {
+ retval = -1;
+ }
+#endif /* ARCH_X86 */
+
+ if (xine_health_check_cdrom() < 0)
+ {
+ retval = -1;
+ }
+
+ if (xine_health_check_dvdrom() < 0)
+ {
+ retval = -1;
+ }
+
+#if 0
+ if (xine_health_check_dma() < 0)
+ {
+ retval = -1;
+ }
+#endif
+
+ if (xine_health_check_x() < 0)
+ {
+ retval = -1;
+ }
+
+ if (xine_health_check_xv() < 0)
+ {
+ retval = -1;
+ }
+
+ return retval;
+}
+
+int xine_health_check_os(void)
+{
+ fprintf(stdout, "xine health_check (OS): ");
+ int retval = 0;
+
+ return retval;
+}
+
+int xine_health_check_kernel(void)
+{
+ fprintf(stdout, "xine health_check (Kernel):\n");
+
+ struct utsname kernel;
+ if (uname(&kernel) == 0)
+ {
+ fprintf(stdout," sysname: %s\n", kernel.sysname);
+ fprintf(stdout," release: %s\n", kernel.release);
+ fprintf(stdout," machine: %s\n", kernel.machine);
+ }
+ else
+ {
+ fprintf(stdout," FAILURE - Could not get kernel information.\n");
+ return -1;
+ }
+ return 0;
+}
+
+int xine_health_check_mtrr(void)
+{
+ fprintf(stdout, "xine health_check (MTRR):\n");
+
+ char *file = "/proc/mtrr";
+ FILE *fd;
+ fd = fopen(file, "r");
+ if (fd < 0)
+ {
+ fprintf(stdout, " FAILED: mtrr is not enabled.\n");
+ return -1;
+ }
+ else {
+ fprintf(stdout, " SUCCESS: mtrr is enabled.\n");
+ fclose(fd);
+ }
+ return 0;
+}
+
+int xine_health_check_cdrom(void)
+{
+ fprintf(stdout, "xine health_check (CDROM):\n");
+ char* cdrom_name = "/dev/cdrom";
+ struct stat cdrom_st;
+
+ if (stat(cdrom_name,&cdrom_st) < 0)
+ {
+ fprintf(stdout, " FAILED - could not cdrom: %s.\n", cdrom_name);
+ return -1;
+ }
+ else
+ {
+ fprintf(stdout, " SUCCESS - cdrom link %s is present.\n",cdrom_name);
+ }
+
+ if ((cdrom_st.st_mode & S_IFMT) != S_IFBLK)
+ {
+ fprintf(stdout, " FAILED - %s is not a block device.\n", cdrom_name);
+ return -1;
+ }
+ else
+ {
+ fprintf(stdout, " SUCCESS - %s is a block device.\n", cdrom_name);
+ }
+
+ if ((cdrom_st.st_mode & S_IFMT & S_IRWXU & S_IRWXG & S_IRWXO) != (S_IRUSR & S_IXUSR & S_IRGRP & S_IXGRP & S_IROTH & S_IXOTH))
+ {
+ fprintf(stdout, " FAILED - %s permissions are not 'rwxrwxrx'.\n",cdrom_name);
+ }
+ else {
+ fprintf(stdout, " SUCCESS - %s does have proper permission.\n",cdrom_name);
+ }
+
+ return 0;
+}
+
+int xine_health_check_dvdrom(void)
+{
+ fprintf(stdout, "xine health_check (DVDROM):\n");
+ char* dvdrom_name = "/dev/dvd";
+ struct stat dvdrom_st;
+
+ if (stat(dvdrom_name,&dvdrom_st) < 0)
+ {
+ fprintf(stdout, " FAILED - could not dvdrom: %s.\n", dvdrom_name);
+ return -1;
+ }
+ else
+ {
+ fprintf(stdout, " SUCCESS - dvdrom link %s is present.\n",dvdrom_name);
+ }
+
+ if ((dvdrom_st.st_mode & S_IFMT) != S_IFBLK)
+ {
+ fprintf(stdout, " FAILED - %s is not a block device.\n", dvdrom_name);
+ return -1;
+ }
+ else
+ {
+ fprintf(stdout, " SUCCESS - %s is a block device.\n", dvdrom_name);
+ }
+
+ if ((dvdrom_st.st_mode & S_IFMT & S_IRWXU & S_IRWXG & S_IRWXO) != (S_IRUSR & S_IXUSR & S_IRGRP & S_IXGRP & S_IROTH & S_IXOTH))
+ {
+ fprintf(stdout, " FAILED - %s permissions are not 'rwxrwxrx'.\n",dvdrom_name);
+ }
+ else {
+ fprintf(stdout, " SUCCESS - %s does have proper permission.\n",dvdrom_name);
+ }
+
+ return 0;
+}
+
+int xine_health_check_dma(void)
+{
+ fprintf(stdout, "xine health_check (DMA):\n");
+ int retval = 0;
+ int is_scsi_dev = 0;
+ int fd = 0;
+ static long param = 0;
+
+ /* If /dev/dvd points to /dev/scd0 but the drive is IDE (e.g. /dev/hdc) and not scsi
+ * how do we detect the correct one */
+ char* name = "/dev/hdc";
+ struct stat st;
+ if (stat(name, &st)){
+ perror(name);
+ exit(errno);
+ }
+
+ if (major(st.st_rdev) == LVM_BLK_MAJOR){
+ is_scsi_dev = 1;
+ fprintf(stdout, " SKIPPED - Operation not supported on SCSI disks.\n");
+ }
+
+ /* At this time due to the way my system is setup user 'root' must be runnning xine */
+ fd = open(name, O_RDONLY | O_NONBLOCK);
+ if (fd < 0)
+ {
+ perror(name);
+ exit(errno);
+ }
+
+ if (!is_scsi_dev){
+ if(ioctl(fd, HDIO_GET_DMA, &param))
+ {
+ fprintf(stdout, " FAILED - HDIO_GET_DMA failed. Ensure the permissions for %s are 0664.\n", name);
+ }
+ if (param != 1)
+ {
+ fprintf(stdout, " FAILED - DMA not turned on for %s.\n", name);
+ }
+ else
+ {
+ fprintf(stdout, " SUCCESS - DMA turned on for %s.\n", name);
+ close(fd);
+ }
+ }
+
+ return retval;
+}
+
+int xine_health_check_x(void)
+{
+ fprintf(stdout, "xine health_check (X):\n");
+ char* env_display = getenv("DISPLAY");
+ if (strlen(env_display) == 0)
+ {
+ fprintf(stdout, " FAILED - DISPLAY environment variable not set.\n");
+ return -1;
+ }
+ else
+ {
+ fprintf(stdout, " SUCCESS - DISPLAY environment variable is set.\n");
+ }
+ return 0;
+}
+
+int xine_health_check_xv(void)
+{
+ fprintf(stdout, "xine health_check (XV):\n");
+ int retval = 0;
+
+ return retval;
+}
+
diff --git a/src/xine-utils/xine_check.h b/src/xine-utils/xine_check.h
new file mode 100644
index 000000000..836d2d3d4
--- /dev/null
+++ b/src/xine-utils/xine_check.h
@@ -0,0 +1,34 @@
+#ifndef XINE_CHECK_H
+#define XINE_CHECK_H
+
+/* Start checking xine setup here */
+int xine_health_check(void);
+
+/* Get OS information */
+int xine_health_check_os(void);
+
+/* Get Kernel information */
+int xine_health_check_kernel(void);
+
+#if ARCH_X86
+/* health_check MTRR */
+int xine_health_check_mtrr(void);
+#endif /* ARCH_X86 */
+
+/* health_check CDROM */
+int xine_health_check_cdrom(void);
+
+/* health_check DVDROM */
+int xine_health_check_dvdrom(void);
+
+/* health_check DMA settings */
+int xine_health_check_dma(void);
+
+/* health_check X */
+int xine_health_check_x(void);
+
+/* health_check Xv extension */
+int xine_health_check_xv(void);
+
+#endif
+