[MPlayer-dvb] Re: [PATCH] Allow simultaneous playing of multiple DVB cards

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Nov 24 12:39:57 CET 2006


Hi Nico!

Nico Sabbi <nsabbi <at> email.it> writes:

> >While using the first card (mplayer dvb://1 <at> ORF1), it's not possible to
> >start receiving from the second one: NO CONFIGURATION FOUND FOR CARD N. 2,
> >exit
>
> in that case scale down the card number.

I thought that behaviour is a bug, but it might of course be a feature;-)

Following patch works if one has more than two cards installed.

Carl Eugen

Index: stream/stream_dvb.c
===================================================================
--- stream/stream_dvb.c (Revision 21185)
+++ stream/stream_dvb.c (Arbeitskopie)
@@ -666,7 +666,7 @@
        struct stream_priv_s* p = (struct stream_priv_s*)opts;
        dvb_priv_t *priv;
        char *progname;
-       int tuner_type = 0;
+       int tuner_type = 0, i;


        if(mode != STREAM_READ)
@@ -688,6 +688,13 @@
        dvb_config->priv = priv;
        priv->config = dvb_config;

+       for(i=0; i<priv->config->count; i++)
+               if(priv->config->cards[i].devno+1 == p->card)
+               {
+                       p->card = i+1;
+                       break;
+               }
+
        if(p->card < 1 || p->card > priv->config->count)
        {
                free(priv);





More information about the MPlayer-dvb mailing list