summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/audio_out/audio_directx_out.c5
-rw-r--r--src/demuxers/demux_cdda.c12
-rw-r--r--src/input/input_dvd.c32
-rw-r--r--src/input/media_helper.c19
-rw-r--r--src/libspucc/cc_decoder.c9
-rw-r--r--src/xine-engine/video_out.c6
6 files changed, 63 insertions, 20 deletions
diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c
index 12b66fb08..7f6550701 100755
--- a/src/audio_out/audio_directx_out.c
+++ b/src/audio_out/audio_directx_out.c
@@ -936,8 +936,3 @@ plugin_info_t xine_plugin_info[] = {
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
-ao_info_t *get_audio_out_plugin_info()
-{
- return (ao_info_t *)&dec_info_audio;
-}
-
diff --git a/src/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c
index b8ed0bf5c..028443f35 100644
--- a/src/demuxers/demux_cdda.c
+++ b/src/demuxers/demux_cdda.c
@@ -22,7 +22,7 @@
* linear PCM "decoder" (which in turn sends them directly to the audio
* output target; this is a really fancy CD-playing architecture).
*
- * $Id: demux_cdda.c,v 1.5 2003/03/07 12:51:47 guenter Exp $
+ * $Id: demux_cdda.c,v 1.6 2003/05/06 14:02:25 tchamp Exp $
*
*/
@@ -282,3 +282,13 @@ void *demux_cdda_init_plugin (xine_t *xine, void *data) {
return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_DEMUX, 21, "cdda", XINE_VERSION_CODE, NULL, demux_cdda_init_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 8a207a644..492afcfaa 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,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: input_dvd.c,v 1.159 2003/05/03 14:24:08 mroi Exp $
+ * $Id: input_dvd.c,v 1.160 2003/05/06 14:02:25 tchamp Exp $
*
*/
@@ -83,14 +83,9 @@
/* DVDNAV includes */
#ifdef HAVE_DVDNAV
-#ifndef _MSC_VER
# include <dvdnav/dvdnav.h>
# include <dvdnav/nav_read.h>
#else
-# include "dvdnav.h"
-# include "nav_read.h"
-#endif /* _MSC_VER */
-#else
# define DVDNAV_COMPILE
# include "dvdnav.h"
#endif
@@ -121,6 +116,10 @@
#if defined(__sun)
#define DVD_PATH "/vol/dev/aliases/cdrom0"
#define RDVD_PATH ""
+#elif WIN32
+/* There really isn't a default on Windows! */
+#define DVD_PATH "d:\\"
+#define RDVD_PATH "d:\\"
#else
#define DVD_PATH "/dev/dvd"
#define RDVD_PATH "/dev/rdvd"
@@ -1228,12 +1227,17 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
/* we already checked the "dvd:/" MRL above */
locator = &this->mrl[strlen(handled_mrl)];
while (*locator == '/') locator++;
+
+#ifndef _MSC_VER
/* we skipped at least one slash, get it back */
locator--;
+#endif
/* Attempt to parse MRL */
last_slash = strlen(locator);
- while(last_slash && locator[last_slash] != '/') last_slash--;
+ while(last_slash &&
+ ((locator[last_slash] != '/') && (locator[last_slash] != '\\')))
+ last_slash--;
if(last_slash) {
/* we have an alternative dvd_path */
@@ -1243,7 +1247,13 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
}else{
intended_dvd_device=class->dvd_device;
}
+
+#ifdef _MSC_VER
+ if (*locator == '/')
+ locator++;
+#else
locator++;
+#endif
if(locator[0]) {
this->mode = MODE_TITLE;
@@ -1304,8 +1314,7 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
/* Set seek mode */
if (xine_config_lookup_entry(this->stream->xine, "input.dvd_seek_behaviour",
&cache_entry))
- seek_mode_cb(class, &cache_entry);
-
+ seek_mode_cb(class, &cache_entry);
if(this->mode == MODE_TITLE) {
int tt, i, pr, found;
@@ -1321,8 +1330,8 @@ static int dvd_plugin_open (input_plugin_t *this_gen) {
locator[i] = '\0';
}
}
- tt = strtol(locator, NULL,10);
+ tt = strtol(locator, NULL,10);
dvdnav_get_number_of_titles(this->dvdnav, &titles);
if((tt <= 0) || (tt > titles)) {
printf("input_dvd: Title %i is out of range (1 to %i).\n", tt,
@@ -1612,6 +1621,9 @@ static void *init_class (xine_t *xine, void *data) {
/*
* $Log: input_dvd.c,v $
+ * Revision 1.160 2003/05/06 14:02:25 tchamp
+ * This is some general Win32 cleanup and getting ready for DVD support.
+ *
* Revision 1.159 2003/05/03 14:24:08 mroi
* as announced on xine-devel:
* * I change the SPU decoder API to make it look less DVD specific
diff --git a/src/input/media_helper.c b/src/input/media_helper.c
index 8c71e09f7..5d387bb44 100644
--- a/src/input/media_helper.c
+++ b/src/input/media_helper.c
@@ -27,9 +27,13 @@
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
+
+#ifndef WIN32
#include <sys/wait.h>
-#include <unistd.h>
#include <sys/ioctl.h>
+#endif
+
+#include <unistd.h>
#include <string.h>
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
@@ -38,6 +42,7 @@
#include <linux/cdrom.h>
#elif defined(HAVE_SYS_CDIO_H)
#include <sys/cdio.h>
+#elif WIN32
#else
#warning "This might not compile due to missing cdrom ioctls"
#endif
@@ -47,6 +52,7 @@
static int media_umount_media(char *device)
{
+#ifndef WIN32
char *argv[10];
int i;
pid_t pid;
@@ -71,11 +77,17 @@ static int media_umount_media(char *device)
} while(1);
return -1;
+#else
+ return 0;
+#endif /* WIN32 */
}
int media_eject_media (char *device) {
+
+#ifndef WIN32
int ret, status;
int fd;
+#endif /* WIN32 */
/* printf("input_dvd: Eject Device %s current device %s opened=%d handle=%p trying...\n",device, this->current_dvd_device, this->opened, this->dvdnav); */
media_umount_media(device);
@@ -83,6 +95,8 @@ int media_eject_media (char *device) {
printf("ipnut_dvd: umount result: %s\n",
strerror(errno));
***********/
+
+#ifndef WIN32
if ((fd = open (device, O_RDONLY|O_NONBLOCK)) > -1) {
#if defined (__linux__)
@@ -130,5 +144,8 @@ int media_eject_media (char *device) {
printf("input_dvd: Device %s failed to open during eject calls\n",device);
}
return 1;
+#else
+ return 0;
+#endif /* WIN32 */
}
diff --git a/src/libspucc/cc_decoder.c b/src/libspucc/cc_decoder.c
index ca52f869e..5c47b4a53 100644
--- a/src/libspucc/cc_decoder.c
+++ b/src/libspucc/cc_decoder.c
@@ -20,7 +20,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: cc_decoder.c,v 1.20 2003/03/26 11:06:55 miguelfreitas Exp $
+ * $Id: cc_decoder.c,v 1.21 2003/05/06 14:02:26 tchamp Exp $
*
* stuff needed to provide closed captioning decoding and display
*
@@ -62,8 +62,15 @@
/* number of text colors specified by EIA-608 standard */
#define NUM_FG_COL 7
+#ifndef _MSC_VER
/* colors specified by the EIA 608 standard */
enum { WHITE, GREEN, BLUE, CYAN, RED, YELLOW, MAGENTA, BLACK, TRANSPARENT };
+#else
+/* colors specified by the EIA 608 standard */
+enum { WHITE, GREEN, BLUE, CYAN, RED, YELLOW, MAGENTA, BLACK };
+#endif
+
+
/* color mapping to OSD text color indices */
static int text_colormap[NUM_FG_COL] = {
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 30c4d5197..7dea53123 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.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: video_out.c,v 1.156 2003/05/05 22:29:31 tmattern Exp $
+ * $Id: video_out.c,v 1.157 2003/05/06 14:02:27 tchamp Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -837,13 +837,15 @@ static void *video_out_loop (void *this_gen) {
int64_t frame_duration, next_frame_vpts;
int64_t usec_to_sleep;
+#ifndef WIN32
/* nice(-value) will fail silently for normal users.
* however when running as root this may provide smoother
* playback. follow the link for more information:
* http://cambuca.ldhs.cetuc.puc-rio.br/~miguel/multimedia_sim/
*/
nice(-2);
-
+#endif /* WIN32 */
+
/*
* here it is - the heart of xine (or rather: one of the hearts
* of xine) : the video output loop