diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9d9ad9ba..1fcafd55 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -467,6 +467,8 @@ Oliver Endriss the Main menu for reporting a bug in setting the PCR-PID in case it is equal to one of the other PIDs + for reporting a problem with cPlugin::Start() being called after trying to learn + the remote control keys Reinhard Walter Buchner for adding some satellites to 'sources.conf' diff --git a/HISTORY b/HISTORY index 34d8901f..c1494933 100644 --- a/HISTORY +++ b/HISTORY @@ -2143,10 +2143,12 @@ Video Disk Recorder Revision History - Changed C++ style comments in libdtv into C style to avoid warnings in gcc 3.x (thanks to Andreas Schultz). -2003-05-12: Version 1.1.32 +2003-05-16: Version 1.1.32 - Removed a faulty parameter initialization in menu.c (thanks to Lauri Tischler for reporting this one). - Re-implemented the WaitForPut/WaitForGet stuff in cRingBuffer, since some plugins actually need this. By default the buffer does not wait; if a plugin needs the waiting functionality it can call the new SetTimeouts() function. +- Moved the call to cPlugin::Start() further up in vdr.c, to make sure it gets + called before trying to learn the keys (problem reported by Oliver Endriss). diff --git a/PLUGINS.html b/PLUGINS.html index bd1a0d0f..b632b61d 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -21,18 +21,18 @@ VDR program and present itself to the user. The internal interface provides the plugin code access to VDR's internal data structures and allows it to hook itself into specific areas to perform special actions.

-
  -Important modifications introduced in version 1.1.15 are marked like this. -
-
  +
  Important modifications introduced in version 1.1.17 are marked like this.
-
  +
  Important modifications introduced in version 1.1.27 are marked like this.
-
  +
  Important modifications introduced in version 1.1.31 are marked like this.
+
  +Important modifications introduced in version 1.1.32 are marked like this. +

Table Of Contents

@@ -284,7 +284,7 @@ The constructor shall initialize any member variables the plugin defines, must not access any global structures of VDR. It also must not create any threads or other large data structures. These things are done in the -
  +
  Initialize() or Start()
@@ -460,18 +460,20 @@ thread of its own), or wants to make use of inte it needs to implement one of the functions


-
 
+
 
 virtual bool Initialize(void);
 
virtual bool Start(void);

which are called once for each plugin at program startup. -
  +
  +
  The difference between these two functions is that Initialize() is -called early at program startup, while Start() is called after everything -else has been set up, right before the main program loop is entered. Inside the -Start() function of any plugin it is guaranteed that the Initialize() +called early at program startup, while Start() is called after the primary +device and user interface has been set up, but before the main program loop is entered. +
+Inside the Start() function of any plugin it is guaranteed that the Initialize() functions of all plugins have already been called. For many plugins it probably doesn't matter which of these functions they implement, but it may be of importance for, e.g., plugins that implement devices. Such plugins should create their cDevice @@ -527,7 +529,7 @@ in the call to VDR. If the user selects the main menu entry of a plugin, VDR calls the function -
  +
 


virtual cOsdObject *MainMenuAction(void);

@@ -1044,7 +1046,6 @@ virtual void SetAudioTrack(int Index);

-
  If there is an additional audio track that has to be replayed with external hardware, the player shall call its member function @@ -1053,7 +1054,6 @@ void PlayAudio(const uchar *Data, int Length);

where Data points to a complete audio PES packet of Length bytes. -

The second part needed here is a control object that receives user input from the main program loop and reacts on this by telling the player what to do: @@ -1200,7 +1200,7 @@ a cDevice:


cMyReceiver *Receiver = new cMyReceiver(123); -
  +
  cDevice::ActualDevice()->AttachReceiver(Receiver);

@@ -1372,7 +1372,7 @@ needed.

Initializing new devices

-
  +
  A derived cDevice class shall implement a static function in which it determines whether the necessary hardware to run this sort of device is actually present in this machine (or whatever other prerequisites @@ -1391,7 +1391,6 @@ shut down (delete) all devices when the program terminates. It is therefore important that the devices are created on the heap, using the new operator! -
 

Dolby Digital

"The stereo effect may only be experienced if stereo equipment is used!"

@@ -1434,7 +1433,6 @@ will need to copy it for later processing in your thread.

The Mute() and Clear() functions will be called whenever the audio shall be muted, or any buffered data shall be cleared, respectively. -


Remote Control

@@ -1502,7 +1500,7 @@ the incoming data (by calling your Action() function). In case you need to do any other setup steps, like opening a file or initializing member variables, you should do so before calling Start().

-
  +
  If your remote control for some reason can't work (maybe because it was unable to open some file handle it requires) it can implement the virtual function diff --git a/config.h b/config.h index f474ef9c..4d265ff7 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.158 2003/05/11 13:45:44 kls Exp $ + * $Id: config.h 1.159 2003/05/16 12:27:58 kls Exp $ */ #ifndef __CONFIG_H @@ -19,8 +19,8 @@ #include "device.h" #include "tools.h" -#define VDRVERSION "1.1.31" -#define VDRVERSNUM 10131 // Version * 10000 + Major * 100 + Minor +#define VDRVERSION "1.1.32" +#define VDRVERSNUM 10132 // Version * 10000 + Major * 100 + Minor #define MAXPRIORITY 99 #define MAXLIFETIME 99 diff --git a/vdr.c b/vdr.c index c969e6eb..7962c0a4 100644 --- a/vdr.c +++ b/vdr.c @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.154 2003/05/11 08:39:09 kls Exp $ + * $Id: vdr.c 1.155 2003/05/16 12:11:45 kls Exp $ */ #include @@ -399,6 +399,11 @@ int main(int argc, char *argv[]) Interface = new cInterface(SVDRPport); + // Start plugins: + + if (!PluginManager.StartPlugins()) + return 2; + // Remote Controls: #if defined(REMOTE_RCU) new cRcuRemote("/dev/ttyS1"); @@ -444,11 +449,6 @@ int main(int argc, char *argv[]) alarm(WatchdogTimeout); // Initial watchdog timer start } - // Start plugins: - - if (!PluginManager.StartPlugins()) - return 2; - // Main program loop: cOsdObject *Menu = NULL;