summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2009-03-03 22:27:25 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2009-03-03 22:27:25 +0000
commitd031764edb6050623f0e399be5a7cbc7bee76249 (patch)
tree5712270b75712ad067ecd7c8a807c483b8f0db4a /src
parentb4eea697942773917c2b4c8b932e246227ba01d4 (diff)
parentbc0969908f75c641469ab46e9866c3ee3026a435 (diff)
downloadxine-lib-d031764edb6050623f0e399be5a7cbc7bee76249.tar.gz
xine-lib-d031764edb6050623f0e399be5a7cbc7bee76249.tar.bz2
Merge from 1.1.
--HG-- rename : src/libmpeg2new/include/Makefile.am => src/video_dec/libmpeg2new/include/Makefile.am rename : src/libmpeg2new/libmpeg2/Makefile.am => src/video_dec/libmpeg2new/libmpeg2/Makefile.am
Diffstat (limited to 'src')
-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
11 files changed, 40 insertions, 18 deletions
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*/