[MPlayer-dev-eng] [Patch] -nortc switch
Attila Kinali
kinali at gmx.net
Tue Mar 12 09:54:37 CET 2002
Hi,
Here a small patch to disable the RTC timing code.
Why ? To be able to use vidix (as it needs root) on my laptop
w/o external power (a-v sync probs because of speedstep).
Greetings
Attila Kinali
-------------- next part --------------
diff -Naur main/cfg-mplayer.h rtc/cfg-mplayer.h
--- main/cfg-mplayer.h Sun Mar 3 15:17:53 2002
+++ rtc/cfg-mplayer.h Tue Mar 12 08:35:40 2002
@@ -94,6 +94,10 @@
extern int xinerama_screen;
#endif
+#ifdef HAVE_RTC
+extern int nortc;
+#endif
+
/* from libvo/aspect.c */
extern float monitor_aspect;
@@ -305,6 +309,10 @@
#ifdef HAVE_XINERAMA
{"xineramascreen", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, 0, 32, NULL},
+#endif
+
+#ifdef HAVE_RTC
+ {"nortc", &nortc, CONF_TYPE_FLAG, 0, 0, 1, NULL},
#endif
#define MAIN_CONF
diff -Naur main/mplayer.c rtc/mplayer.c
--- main/mplayer.c Tue Mar 12 00:27:10 2002
+++ rtc/mplayer.c Tue Mar 12 08:35:06 2002
@@ -291,6 +291,10 @@
char* current_module=NULL; // for debugging
+#ifdef HAVE_RTC
+int nortc;
+#endif
+
static unsigned int inited_flags=0;
#define INITED_VO 1
#define INITED_AO 2
@@ -679,6 +683,8 @@
#endif
#ifdef HAVE_RTC
+ if(!nortc)
+ {
if ((rtc_fd = open("/dev/rtc", O_RDONLY)) < 0)
perror ("Linux RTC init: open");
else {
@@ -697,6 +703,7 @@
} else
printf("Using Linux's hardware RTC timing (%ldHz)\n", irqp);
}
+ }
#ifdef HAVE_NEW_GUI
// breaks DGA and SVGAlib and VESA drivers: --A'rpi
// and now ? -- Pontscho
More information about the MPlayer-dev-eng
mailing list