summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgtags1
-rw-r--r--ChangeLog1
-rw-r--r--configure.ac2
-rw-r--r--m4/attributes.m42
-rw-r--r--src/input/input_cdda.c16
-rw-r--r--src/input/input_dvd.c3
-rw-r--r--src/input/input_vcd.c18
-rw-r--r--src/libw32dll/wine/pe_image.c2
-rw-r--r--src/post/goom/ppc_zoom_ultimate.h2
-rw-r--r--src/video_dec/libmpeg2new/include/Makefile.am3
-rw-r--r--src/video_dec/libmpeg2new/libmpeg2/Makefile.am2
-rw-r--r--src/xine-engine/demux.c2
-rw-r--r--src/xine-utils/cpu_accel.c4
-rw-r--r--src/xine-utils/mangle.h4
-rw-r--r--src/xine-utils/xine_mmx.h2
15 files changed, 44 insertions, 20 deletions
diff --git a/.hgtags b/.hgtags
index fedfb0905..7e1b9166e 100644
--- a/.hgtags
+++ b/.hgtags
@@ -80,3 +80,4 @@ ffe7962edb79c2ed967b82a82ccfb2ac7eb148a2 vdr-xine-version-802
e33280bcaa3b1f3f5b93e633e2225e2440ecfd7c xine-lib-1_1_16-release
01fac0a015581bbdf7e38561ad2a95405e2ca785 xine-lib-1_1_16_1-release
ff19463729d8f9bbea35171d641c5f28cdacc7c8 xine-lib-1_1_16_2-release
+0c7de0050b8df535dfa76b933979f4fc58bde10e DEBIAN_xine-lib-1.2_1.2.0~hg-0
diff --git a/ChangeLog b/ChangeLog
index 95cb53ab3..efda1eb5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -71,6 +71,7 @@ xine-lib (1.1.90) (Unreleased)
xine-lib (1.1.17) 2009-??-??
* Enable libmpeg2new. This is not yet production code; the old mpeg2
decoder remains the default.
+ * Add support for OpenBSD.
* Fix a build failure on *BSD due to some rather useful GNUisms.
* Protect audio loop so it cannot write to a paused device (fix
pause/resume freeze with pulseaudio).
diff --git a/configure.ac b/configure.ac
index fba14d83e..7fbea32ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1174,7 +1174,7 @@ OBJCFLAGS="$UNIVERSAL_CFLAGS $miscflags $warnflags $OBJCFLAGS"
dnl Some informations about xine-lib compilation for xine-config
XINE_BUILD_CC="`$CC -v 2>&1 | tail -1 2>/dev/null`"
XINE_BUILD_OS="`uname -s -r -m`"
-XINE_BUILD_DATE="`date \"+%a %d %b %Y %T\"`"
+XINE_BUILD_DATE="`date "+%a %d %b %Y %T"`"
AC_SUBST(XINE_BUILD_CC)
AC_SUBST(XINE_BUILD_OS)
AC_SUBST(XINE_BUILD_DATE)
diff --git a/m4/attributes.m4 b/m4/attributes.m4
index ed52ba6d7..4863b6bfe 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -109,7 +109,7 @@ AC_DEFUN([CC_NOUNDEFINED], [
dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
dnl are requested, as different implementations are present; to avoid problems
dnl use -Wl,-z,defs only for those platform not behaving this way.
- *-freebsd*) ;;
+ *-freebsd* | *-openbsd*) ;;
*)
dnl First of all check for the --no-undefined variant of GNU ld. This allows
dnl for a much more readable commandline, so that people can understand what
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c
index b7aed3a5e..cb4c9c20c 100644
--- a/src/input/input_cdda.c
+++ b/src/input/input_cdda.c
@@ -82,6 +82,8 @@
#define DEFAULT_CDDA_DEVICE "/vol/dev/aliases/cdrom0"
#elif defined(WIN32)
#define DEFAULT_CDDA_DEVICE "d:\\"
+#elif defined(__OpenBSD__)
+#define DEFAULT_CDDA_DEVICE "/dev/rcd0c"
#else
#define DEFAULT_CDDA_DEVICE "/dev/cdrom"
#endif
@@ -621,7 +623,7 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f
return 0;
}
-#elif defined(__FreeBSD_kernel__) || defined(__NetBSD__)
+#elif defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/cdio.h>
@@ -634,7 +636,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
struct ioc_toc_header tochdr;
#if defined(__FreeBSD_kernel__)
struct ioc_read_toc_single_entry tocentry;
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
struct ioc_read_toc_entry tocentry;
struct cd_toc_entry data;
#endif
@@ -669,7 +671,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
perror("CDIOREADTOCENTRY");
return -1;
}
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
memset(&data, 0, sizeof(data));
tocentry.data_len = sizeof(data);
tocentry.data = &data;
@@ -690,7 +692,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
(tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) +
(tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) +
tocentry.entry.addr.msf.frame;
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
toc->toc_entries[i-1].track_mode = (tocentry.data->control & 0x04) ? 1 : 0;
toc->toc_entries[i-1].first_frame_minute = tocentry.data->addr.msf.minute;
toc->toc_entries[i-1].first_frame_second = tocentry.data->addr.msf.second;
@@ -712,7 +714,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
perror("CDIOREADTOCENTRY");
return -1;
}
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
memset(&data, 0, sizeof(data));
tocentry.data_len = sizeof(data);
tocentry.data = &data;
@@ -733,7 +735,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
(tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) +
(tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) +
tocentry.entry.addr.msf.frame;
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
toc->leadout_track.track_mode = (tocentry.data->control & 0x04) ? 1 : 0;
toc->leadout_track.first_frame_minute = tocentry.data->addr.msf.minute;
toc->leadout_track.first_frame_second = tocentry.data->addr.msf.second;
@@ -771,7 +773,7 @@ static int read_cdrom_frames(cdda_input_plugin_t *this_gen, int frame, int num_f
perror("CDIOCREADAUDIO");
return -1;
}
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
scsireq_t req;
int nblocks = 1;
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 0e5078099..da52604ca 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -115,6 +115,9 @@
/* There really isn't a default on Windows! */
#define DVD_PATH "d:\\"
#define RDVD_PATH "d:\\"
+#elif defined(__OpenBSD__)
+#define DVD_PATH "/dev/rcd0c"
+#define RDVD_PATH "/dev/rcd0c"
#else
#define DVD_PATH "/dev/dvd"
#define RDVD_PATH "/dev/rdvd"
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index 26eb6344b..ccc75a45a 100644
--- a/src/input/input_vcd.c
+++ b/src/input/input_vcd.c
@@ -92,7 +92,7 @@ typedef struct {
#if defined (__linux__) || defined(__sun)
struct cdrom_tochdr tochdr;
struct cdrom_tocentry tocent[100];
-#elif defined (__FreeBSD_kernel__)
+#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
struct ioc_toc_header tochdr;
struct cd_toc_entry *tocent;
off_t cur_sec;
@@ -117,7 +117,7 @@ typedef struct {
int cur_track;
-#if defined (__linux__) || defined(__sun) || defined (__FreeBSD_kernel__)
+#if defined (__linux__) || defined(__sun) || defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
uint8_t cur_min, cur_sec, cur_frame;
#endif
@@ -177,7 +177,7 @@ static int input_vcd_read_toc (vcd_input_class_t *this, int fd) {
return 0;
}
-#elif defined (__FreeBSD_kernel__)
+#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
static int input_vcd_read_toc (vcd_input_class_t *this, int fd) {
struct ioc_read_toc_entry te;
@@ -394,7 +394,7 @@ static off_t vcd_plugin_read (input_plugin_t *this_gen,
memcpy (buf, data.data, VCDSECTORSIZE); /* FIXME */
return VCDSECTORSIZE;
}
-#elif defined (__FreeBSD_kernel__)
+#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
static off_t vcd_plugin_read (input_plugin_t *this_gen,
void *buf_gen, off_t nlen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
@@ -534,7 +534,7 @@ static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen,
memcpy (buf->mem, data.data, VCDSECTORSIZE); /* FIXME */
return buf;
}
-#elif defined (__FreeBSD_kernel__)
+#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
static buf_element_t *vcd_plugin_read_block (input_plugin_t *this_gen,
fifo_buffer_t *fifo, off_t nlen) {
@@ -693,7 +693,7 @@ static off_t vcd_plugin_seek (input_plugin_t *this_gen,
return offset ; /* FIXME */
}
-#elif defined (__FreeBSD_kernel__)
+#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
static off_t vcd_plugin_seek (input_plugin_t *this_gen,
off_t offset, int origin) {
@@ -767,7 +767,7 @@ static off_t vcd_plugin_get_length (input_plugin_t *this_gen) {
return (off_t) 0;
}
-#elif defined (__FreeBSD_kernel__)
+#elif defined (__FreeBSD_kernel__) || defined (__OpenBSD__)
static off_t vcd_plugin_get_length (input_plugin_t *this_gen) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
off_t len ;
@@ -862,6 +862,10 @@ static int vcd_plugin_open (input_plugin_t *this_gen) {
this->cur_min = this->cls->tocent[this->cur_track].cdte_addr.msf.minute;
this->cur_sec = this->cls->tocent[this->cur_track].cdte_addr.msf.second;
this->cur_frame = this->cls->tocent[this->cur_track].cdte_addr.msf.frame;
+#elif defined (__OpenBSD__)
+ this->cur_min = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.minute;
+ this->cur_sec = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.second;
+ this->cur_frame = this->cls->tocent[this->cur_track + 1 - this->cls->tochdr.starting_track].addr.msf.frame;
#elif defined (__FreeBSD_kernel__)
{
int bsize = 2352;
diff --git a/src/libw32dll/wine/pe_image.c b/src/libw32dll/wine/pe_image.c
index c99bbaed0..1366cc396 100644
--- a/src/libw32dll/wine/pe_image.c
+++ b/src/libw32dll/wine/pe_image.c
@@ -900,7 +900,7 @@ void PE_UnloadLibrary(WINE_MODREF *wm)
*/
static void extend_stack_for_dll_alloca(void)
{
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
void* mem=alloca(0x20000);
*(int*)mem=0x1234;
#endif
diff --git a/src/post/goom/ppc_zoom_ultimate.h b/src/post/goom/ppc_zoom_ultimate.h
index d6932e7e6..d070071c9 100644
--- a/src/post/goom/ppc_zoom_ultimate.h
+++ b/src/post/goom/ppc_zoom_ultimate.h
@@ -11,4 +11,4 @@
void ppc_zoom_generic (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]);
/* G4 Specific PowerPC Code (Possible use of Altivec and Data Streams) */
-void ppc_zoom_G4 (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]); \ No newline at end of file
+void ppc_zoom_G4 (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16]);
diff --git a/src/video_dec/libmpeg2new/include/Makefile.am b/src/video_dec/libmpeg2new/include/Makefile.am
index 781e6d0b5..91d5575ee 100644
--- a/src/video_dec/libmpeg2new/include/Makefile.am
+++ b/src/video_dec/libmpeg2new/include/Makefile.am
@@ -1 +1,4 @@
+include $(top_builddir)/misc/Makefile.plugins
+include $(top_srcdir)/misc/Makefile.common
+
EXTRA_DIST = video_out.h mmx.h alpha_asm.h vis.h attributes.h tendra.h mpeg2.h mpeg2convert.h
diff --git a/src/video_dec/libmpeg2new/libmpeg2/Makefile.am b/src/video_dec/libmpeg2new/libmpeg2/Makefile.am
index 6da65c9f1..f916dacd6 100644
--- a/src/video_dec/libmpeg2new/libmpeg2/Makefile.am
+++ b/src/video_dec/libmpeg2new/libmpeg2/Makefile.am
@@ -7,6 +7,8 @@ noinst_LTLIBRARIES = libmpeg2.la libmpeg2arch.la
libmpeg2_la_SOURCES = alloc.c header.c decode.c slice.c motion_comp.c idct.c
libmpeg2_la_LIBADD = libmpeg2arch.la
+AM_CPPFLAGS = -I$(srcdir)/../include
+
libmpeg2arch_la_SOURCES = motion_comp_mmx.c idct_mmx.c \
motion_comp_altivec.c idct_altivec.c \
motion_comp_alpha.c idct_alpha.c \
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index 449b9f991..ba43ddc60 100644
--- a/src/xine-engine/demux.c
+++ b/src/xine-engine/demux.c
@@ -120,7 +120,7 @@ void _x_demux_flush_engine (xine_stream_t *stream) {
}
-struct timespec _x_compute_interval(unsigned int millisecs) {
+static struct timespec _x_compute_interval(unsigned int millisecs) {
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
uint64_t ttimer = (uint64_t)ts.tv_sec*1000 + ts.tv_nsec/1000000 + millisecs;
diff --git a/src/xine-utils/cpu_accel.c b/src/xine-utils/cpu_accel.c
index 07978b55f..629a09a50 100644
--- a/src/xine-utils/cpu_accel.c
+++ b/src/xine-utils/cpu_accel.c
@@ -41,6 +41,10 @@
#include <xine/xineutils.h>
+#if defined(PIC) && ! defined(__PIC__)
+#define __PIC__
+#endif
+
#if defined(__i386__) || defined(__x86_64__)
#ifndef __x86_64__
diff --git a/src/xine-utils/mangle.h b/src/xine-utils/mangle.h
index 7627ca2fc..746317fa5 100644
--- a/src/xine-utils/mangle.h
+++ b/src/xine-utils/mangle.h
@@ -29,6 +29,10 @@
#ifndef _XINE_MANGLE_H
#define _XINE_MANGLE_H
+#if defined(PIC) && ! defined(__PIC__)
+#define __PIC__
+#endif
+
// Use rip-relative addressing if compiling PIC code on x86-64.
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__DJGPP__) || \
defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
diff --git a/src/xine-utils/xine_mmx.h b/src/xine-utils/xine_mmx.h
index 589e1b7fb..440d1efcc 100644
--- a/src/xine-utils/xine_mmx.h
+++ b/src/xine-utils/xine_mmx.h
@@ -487,4 +487,4 @@ typedef union {
: "X" (mem))
#endif /*ARCH_X86 */
-#endif /*XINE_MMX_H*/ \ No newline at end of file
+#endif /*XINE_MMX_H*/