Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Re : Nexus and remote plugin



Klaus Schmidinger wrote:
> Oliver Endriss wrote:
> > Klaus Schmidinger wrote:
> > > Klaus Schmidinger wrote:
> > > > Oliver Endriss wrote:
> > > > > Is seems that I have to create cRemotes instances in
> > > > > Initialize(), not in Start(). Correct?
> > > >
> > > > Yes. Sorry I didn't think about this when introducing
> > > > Initialize(). At that time it was all about cDevices...
> > >
> > > Maybe I was a little premature with this statement.
> > > Of course the cRemote can be created in Initialize(), but what
> > > if it would depend on the presence of another plugin (maybe one
> > > that implements the primary device)?
> >
> > True, this might be a problem. Right now it isn't since the remote
> > plugin depends on external devices only.
> > I think it's better to call Start() as the last initialization step
> > before entering the the main loop. It's a cleaner concept.
> >
> > > I guess I have put the call of the plugins' Start() functions too
> > > far down in vdr.c. Maybe it should be done _before_ learning the
> > > keys.
> > >
> > > [patch]
> > >
> > > and let me know if this is ok.
> >
> > If required you could add a new function call (RemoteStart() or
> > whatever) later. This would not break any existing code because the
> > well-defined Start() call would not move.
> >
> > Even with the existing calls I could work around the problem:
> > - create the remote in cPlugin::Initialize() w/o accessing the
> > device - complete initialization in cPlugin::Start() or
> > cRemote:Initialize() whichever gets called first.
>
> I wouldn't want to introduce yet another function ;-)

Right now it's not required anyway.
In the future I can see lots of functions added by you ;-) 

> Meanwhile I believe that moving Start() before the LearnKeys() call
> is the right thing to do, because there is also the
> Channels.SwitchTo(Setup.CurrentChannel), which might require a plugin
> to be fully operative (i.e. even have Start() called). Since the only
> reason for introducing Initialize() was that one plugin might require
> another to have been started, keeping Initialize() and Start() a
> little closer together should be reasonable.

Well, you are the boss. I just noticed that 'External audio' and other 
stuff would be called after Start() and wondered whether that might 
lead to problems.

Anyway, I've already released a new remote control plugin.
For vdr <= 1.1.30 it uses Start(), for 1.1.31+ Initialize().
If you add your patch to vdr 1.1.32 nobody needs to upgrade the plugin.

Oliver


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index