Mailing List archive

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

[vdr] Re: Re : Nexus and remote plugin



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 ;-)

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.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


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



Home | Main Index | Thread Index