--- main/libvo/vo_mpegpes.c 2003-01-12 17:46:21.000000000 +0000 +++ main3/libvo/vo_mpegpes.c 2004-02-21 14:40:06.000000000 +0000 @@ -100,20 +100,47 @@ static uint32_t preinit(const char *arg){ #ifdef HAVE_DVB + int card = 0; + char vo_file[30], ao_file[30], *tmp; + + if(arg != NULL){ + if(strstr(arg, "card=") == arg){ + card = atoi(&arg[5]); + if((card < 1) || (card > 4)){ + mp_msg(MSGT_VO, MSGL_ERR, "DVB card number must be between 1 and 4\n"); + return -1; + } + card--; + + tmp = strchr(arg, ':'); + if(tmp != NULL) + { + if(strlen(tmp) > 1) + arg = tmp+1; + else + arg = NULL; + } + else + arg = NULL; + } + } + if(!arg){ //|O_NONBLOCK #ifndef HAVE_DVB_HEAD - printf("Opening /dev/ost/video+audio\n"); - if((vo_mpegpes_fd = open("/dev/ost/video",O_RDWR)) < 0){ + mp_msg(MSGT_VO,MSGL_INFO, "Opening /dev/dvb/adapter%d/video0+audio0\n", card); + sprintf(vo_file, "/dev/dvb/adapter%d/video0", card); + if((vo_mpegpes_fd = open(vo_file,O_RDWR)) < 0){ perror("DVB VIDEO DEVICE: "); return -1; } - if((vo_mpegpes_fd2 = open("/dev/ost/audio",O_RDWR|O_NONBLOCK)) < 0){ + sprintf(ao_file, "/dev/dvb/adapter%d/audio0", card); + if((vo_mpegpes_fd2 = open(ao_file,O_RDWR|O_NONBLOCK)) < 0){ perror("DVB AUDIO DEVICE: "); return -1; } #else - printf("Opening /dev/dvb/adapter0/video0+audio0\n"); + mp_msg(MSGT_VO,MSGL_INFO, "Opening /dev/dvb/adapter%d/video0+audio0\n", card); if((vo_mpegpes_fd = open("/dev/dvb/adapter0/video0",O_RDWR)) < 0){ perror("DVB VIDEO DEVICE: "); return -1; --- main/DOCS/man/en/mplayer.1 2004-02-17 14:52:59.000000000 +0000 +++ main3/DOCS/man/en/mplayer.1 2004-02-20 00:59:24.000000000 +0000 @@ -3664,6 +3664,12 @@ .TP .B mpegpes DVB specific output driver. +.PD 0 +.RSs +.IPs card= +Specifies the device number to use if you have more than one DVB output card. +.RE +.PD 1 .TP .B zr\ \ \ \ \ Output driver for a number of MJPEG capture/playback cards.