[MPlayer-users] Playing trouble with multi-tuner dvb card

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Nov 22 21:05:58 CET 2011


On Tue, Nov 22, 2011 at 07:46:51PM +0100, Dominique Michel wrote:
> Le Mon, 21 Nov 2011 19:53:58 +0100,
> Reimar Döffinger <Reimar.Doeffinger at gmx.de> a écrit :
> 
> > On Mon, Nov 21, 2011 at 01:25:13AM +0100, Dominique Michel wrote:
> > > I think that writing udev rules is behind the capabilities of many
> > > users. So, are you aware of this issue? and do you have any plan in
> > > order to solve this into mplayer?
> > 
> > The short and honest answer: The DVB maintainer has no time for
> > MPlayer development, I have only little time and my only DVB device
> > (DVB-T stick) seems is broken.
> > So the honest truth unfortunately is that it is unlikely someone will
> > fix it I am afraid. While the basic idea of fixing it by changing the
> > syntax to use e.g.
> > dvb://2:3@
> > to mean adapter2/frontend3 is simple enough, making sure everything
> > still works seems quite tricky and few people have a crazy enough
> > setup to actually be able to test it...
> > If you or someone else feel up to do a bit of "simple" C programming
> > I'd be willing to help you getting it implemented.
> > 
> 
> Hi Reimar,
> 
> I can try. But you must know that C is not my cup of tee, even if I do
> understand many of the base concepts of programming. My bigger
> difficulty with C is its syntax, I find it very confusing, certainly
> because I never get the time to seriously look at it. Otherwise, I have
> basic skills on Motorola assembler (even on dsp56k, a very amazing
> baby), basic and bash.
> 
> I am also willing to learn the C, but as I said, I never was able to
> find enough time to seriously do that. If it is a matter of
> "simple" C programming, I can give it a try, but I cannot promise
> anything.
> 
> So, how do you want to process? We can do that on this list or you can
> contact me directly.

Maybe on list is better for the moment, I still have hopes that maybe
others will also help when I am again slow to answer.
I made a hopefully quite complete but very terse list of what needs to
be done.
How to start:
look at stream/stream_dvb.c in some editor.
Near the top you will see (with some distance in-between those):
int card;
{"card", ST_OFF(card), CONF_TYPE_INT, M_OPT_RANGE, 1, 4, NULL},
{"username",    ST_OFF(card), CONF_TYPE_INT, M_OPT_RANGE, 1, 4, NULL},
        {"card", &stream_defaults.card, CONF_TYPE_INT, M_OPT_RANGE, 1, 4, NULL},

You will want want to duplicate those, replacing "card" by e.g.
"frontend", and "username" by "password" (better don't ask about that
one :-) ).

Then in dvb_get_config you will want to add another loop so instead of
only looping i from 0 to MAX_CARDS it will also be some j from 0 to
MAX_FRONTENDS and the filename is generated by
"/dev/dvb/adapter%d/frontend%i", i, j
At the end of the loop there is also
conf->cards[conf->count].devno = i;
You will want to store the frontend number (j) in that struct, too.

Then as a last step in dvb_open there is
if(priv->config->cards[i].devno+1 == p->card)
here you'll want to extend this to also check the (in the first step)
newly added p->frontend value.


More information about the MPlayer-users mailing list