[Mplayer-cvslog] CVS: main cfg-mplayer.h, 1.219, 1.220 mplayer.c, 1.757, 1.758

Alex Beregszaszi syncmail at mplayerhq.hu
Sat Jun 26 12:51:47 CEST 2004


CVS change done by Alex Beregszaszi

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv20933

Modified Files:
	cfg-mplayer.h mplayer.c 
Log Message:
rtc-device cmd option by James Noble

Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -r1.219 -r1.220
--- cfg-mplayer.h	3 May 2004 10:09:18 -0000	1.219
+++ cfg-mplayer.h	26 Jun 2004 10:51:43 -0000	1.220
@@ -412,6 +412,7 @@
 	{"softsleep", &softsleep, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #ifdef HAVE_RTC
 	{"nortc", &nortc, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+        {"rtc", &rtc_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 
 	{"slave", &slave_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.757
retrieving revision 1.758
diff -u -r1.757 -r1.758
--- mplayer.c	26 Jun 2004 09:14:20 -0000	1.757
+++ mplayer.c	26 Jun 2004 10:51:44 -0000	1.758
@@ -343,6 +343,7 @@
 
 #ifdef HAVE_RTC
 static int nortc;
+static char* rtc_device;
 #endif
 
 #ifdef USE_EDL
@@ -1093,8 +1094,9 @@
   if(!nortc)
   {
     // seteuid(0); /* Can't hurt to try to get root here */
-    if ((rtc_fd = open("/dev/rtc", O_RDONLY)) < 0)
-	mp_msg(MSGT_CPLAYER, MSGL_WARN, "Failed to open /dev/rtc: %s (/dev/rtc should be readable by the user.)\n", strerror(errno));
+    if ((rtc_fd = open(rtc_device ? rtc_device : "/dev/rtc", O_RDONLY)) < 0)
+	mp_msg(MSGT_CPLAYER, MSGL_WARN, "Failed to open %s: %s (it should be readable by the user.)\n",
+	    rtc_device ? rtc_device : "/dev/rtc", strerror(errno));
      else {
 	unsigned long irqp = 1024; /* 512 seemed OK. 128 is jerky. */
 




More information about the MPlayer-cvslog mailing list