diff -Naurb main/cfg-mplayer.h main2/cfg-mplayer.h --- main/cfg-mplayer.h 2004-02-05 17:08:55.000000000 +0000 +++ main2/cfg-mplayer.h 2004-02-18 20:22:08.000000000 +0000 @@ -101,6 +101,11 @@ extern m_option_t dxr2_opts[]; #endif +#ifdef HAVE_DVB_HEAD +extern m_option_t dvbout_opts[]; +#endif + + #ifdef STREAMING_LIVE_DOT_COM extern int isSDPFile; extern int rtspStreamOverTCP; @@ -330,6 +335,10 @@ {"dxr2", &dxr2_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, #endif +#ifdef HAVE_DVB_HEAD + {"dvbout", &dvbout_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, +#endif + #ifdef STREAMING_LIVE_DOT_COM {"sdp", "-sdp is deprecated, use sdp://file instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, // -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP diff -Naurb main/DOCS/man/en/mplayer.1 main2/DOCS/man/en/mplayer.1 --- main/DOCS/man/en/mplayer.1 2004-02-17 14:52:59.000000000 +0000 +++ main2/DOCS/man/en/mplayer.1 2004-02-18 20:23:37.000000000 +0000 @@ -764,6 +764,18 @@ .PD 1 . .TP +.B \-dvbout +Pass the following parameters to the DVB output module, in order to override +the default ones: + +.PD 0 +.RSs +.IPs card=<1\-4> +Specifies using card number 1\-4 (default: 1). +.RE +.PD 1 +. +.TP .B \-dvd-device Override default DVD device name /dev/\:dvd. .TP diff -Naurb main/libvo/vo_mpegpes.c main2/libvo/vo_mpegpes.c --- main/libvo/vo_mpegpes.c 2003-01-12 17:46:21.000000000 +0000 +++ main2/libvo/vo_mpegpes.c 2004-02-18 20:22:08.000000000 +0000 @@ -62,9 +62,17 @@ #include "config.h" #include "video_out.h" #include "video_out_internal.h" +#include "m_option.h" int vo_mpegpes_fd=-1; int vo_mpegpes_fd2=-1; +static int dvboutcard = 1; + +m_option_t dvbout_opts[] = { + { "card", &dvboutcard, CONF_TYPE_INT, CONF_RANGE, 1, 4, NULL }, + { NULL,NULL, 0, 0, 0, 0, NULL} +}; + static vo_info_t info = { @@ -99,6 +107,10 @@ } static uint32_t preinit(const char *arg){ + char vo_file[30], ao_file[30]; + int card; + + card = dvboutcard-1; #ifdef HAVE_DVB if(!arg){ //|O_NONBLOCK @@ -113,12 +125,14 @@ return -1; } #else - printf("Opening /dev/dvb/adapter0/video0+audio0\n"); - if((vo_mpegpes_fd = open("/dev/dvb/adapter0/video0",O_RDWR)) < 0){ + printf("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/dvb/adapter0/audio0",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; }