From 2e399f394d686f2f8dc763af7b2535fb1e184012 Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 28 Dec 2002 12:04:58 +0000 Subject: DVB-HEAD (aka. NEWSTRUCT) detection & support patch by Dimitrios Dimitrakos git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8595 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_mpegpes.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c index 0e186ca23f..a930b6eea5 100644 --- a/libvo/vo_mpegpes.c +++ b/libvo/vo_mpegpes.c @@ -26,9 +26,11 @@ #include #include "mp_msg.h" - +#ifdef HAVE_DVB_HEAD +#define HAVE_DVB 1 +#endif #ifdef HAVE_DVB - +#ifndef HAVE_DVB_HEAD #include #include @@ -41,6 +43,20 @@ #include #include +#else +#define true 1 +#define false 0 +#include + +#include +#include +#include + +#include +#include +#include +#include +#endif #endif #include "config.h" @@ -86,6 +102,7 @@ static uint32_t preinit(const char *arg){ #ifdef HAVE_DVB if(!arg){ //|O_NONBLOCK +#ifndef HAVE_DVB_HEAD if((vo_mpegpes_fd = open("/dev/ost/video",O_RDWR)) < 0){ perror("DVB VIDEO DEVICE: "); return -1; @@ -94,6 +111,16 @@ static uint32_t preinit(const char *arg){ perror("DVB AUDIO DEVICE: "); return -1; } +#else + if((vo_mpegpes_fd = open("/dev/dvb/adapter0/video0",O_RDWR)) < 0){ + perror("DVB VIDEO DEVICE: "); + return -1; + } + if((vo_mpegpes_fd2 = open("/dev/dvb/adapter0/audio0",O_RDWR|O_NONBLOCK)) < 0){ + perror("DVB AUDIO DEVICE: "); + return -1; + } +#endif if ( (ioctl(vo_mpegpes_fd,VIDEO_SET_BLANK, false) < 0)){ perror("DVB VIDEO SET BLANK: "); return -1; -- cgit v1.2.3