summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-20 07:53:20 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-20 07:53:20 +0000
commit109caf6b90051cbd1db0ea76099a7bfa55cde846 (patch)
tree41d8e455143ae21af1a58a4929f6f158c62cf281
parente7df17dcda08cb3bbb5d72494e4adae62721fa77 (diff)
downloadmpv-109caf6b90051cbd1db0ea76099a7bfa55cde846.tar.bz2
mpv-109caf6b90051cbd1db0ea76099a7bfa55cde846.tar.xz
RTC is autodetected
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3016 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-xconfigure32
-rw-r--r--mplayer.c6
2 files changed, 33 insertions, 5 deletions
diff --git a/configure b/configure
index 0980abf8ca..120fc45409 100755
--- a/configure
+++ b/configure
@@ -119,6 +119,7 @@ Optional features:
--disable-xanim disable XAnim DLL support [autodetect]
--enable-vorbis build with OggVorbis support [autodetect]
--disable-iconv do not use iconv(3) function [autodetect]
+ --disable-rtc disable RTC (/dev/rtc) on Linux [autodetect]
Video:
--enable-gl build with OpenGL render support [autodetect]
@@ -147,6 +148,7 @@ Audio:
--disable-alsa disable alsa sound support [autodetect]
--disable-sunaudio disable Sun sound support [autodetect]
--disable-mad disable mad audio support [autodetect]
+ --disable-select disable using select() on OSS audio device [enable]
Miscellaneous options:
--cc=COMPILER use this C compiler to build MPlayer [gcc]
@@ -155,8 +157,6 @@ Miscellaneous options:
options needed : --enable-static="-lslang -lncurses"
--language=xx select a language [en]
(Available: $LANGUAGES)
- --disable-select disable audio select() support (for example, required
- for ALSA or Vortex2 driver) [enable]
Advanced options:
--enable-mmx build with mmx support [autodetect]
@@ -642,6 +642,7 @@ _fbdev=no
_dvb=auto
_dxr3=auto
_iconv=auto
+_rtc=auto
_ossaudio=auto
_mad=auto
_vorbis=auto
@@ -717,6 +718,8 @@ for ac_option do
--disable-dxr3) _dxr3=no ;;
--enable-iconv) _iconv=yes ;;
--disable-iconv) _iconv=no ;;
+ --enable-rtc) _rtc=yes ;;
+ --disable-rtc) _rtc=no ;;
--enable-ossaudio) _ossaudio=yes ;;
--disable-ossaudio) _ossaudio=no ;;
--enable-mad) _mad=yes ;;
@@ -1862,6 +1865,28 @@ fi
echores "$_zlib"
+echocheck "RTC"
+if linux ; then
+ if test "$_rtc" = auto ; then
+ cat > $TMPC << EOF
+#include <sys/ioctl.h>
+#include <linux/rtc.h>
+int main(void) { return RTC_IRQP_READ; }
+EOF
+ _rtc=no
+ cc_check && _rtc=yes
+ fi
+ echores "$_rtc"
+else
+ _rtc=no
+ echores "no (linux-specific)"
+fi
+if test "$_rtc" = yes ; then
+ _def_rtc='#define HAVE_RTC 1'
+else
+ _def_rtc='#undef HAVE_RTC'
+fi
+
echocheck "mad support"
if test "$_mad" = auto ; then
_mad=no
@@ -2449,6 +2474,9 @@ $_def_select
/* define this to use iconv(3) function to codepage conversions */
$_def_iconv
+/* define this to use RTC (/dev/rtc) for video timers (LINUX only) */
+$_def_rtc
+
/* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */
#define MAX_OUTBURST 65536
diff --git a/mplayer.c b/mplayer.c
index b23d5f52c8..7984e5a08f 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -75,7 +75,7 @@ int quiet=0;
#define ABS(x) (((x)>=0)?(x):(-(x)))
-#ifdef TARGET_LINUX
+#ifdef HAVE_RTC
#include <linux/rtc.h>
#endif
@@ -601,7 +601,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
inited_flags|=INITED_LIRC;
#endif
-#ifdef TARGET_LINUX
+#ifdef HAVE_RTC
if ((rtc_fd = open("/dev/rtc", O_RDONLY)) < 0)
perror ("Linux RTC init: open");
else {
@@ -1400,7 +1400,7 @@ if(!dapsync){
if(!(vo_flags&256)){ // flag 256 means: libvo driver does its timing (dvb card)
-#ifdef TARGET_LINUX
+#ifdef HAVE_RTC
if(rtc_fd>=0){
// -------- RTC -----------
while (time_frame > 0.000) {