diff --git a/The-VDR-Plugin-System.md b/The-VDR-Plugin-System.md index 43e9019..361a3b0 100644 --- a/The-VDR-Plugin-System.md +++ b/The-VDR-Plugin-System.md @@ -78,9 +78,9 @@ structures and allows it to hook itself into specific areas to perform special a -
@@ -102,7 +102,7 @@ So, for a quick demonstration of the plugin system, there is a sample plugin cal If you enjoyed this brief glimpse into VDR plugin handling, read through the rest of this document and eventually write your own VDR plugin. -
@@ -126,7 +126,7 @@ const char *Name(void); The actual name is derived from the plugin's library file name, as defined in the next chapter. -
@@ -156,7 +156,7 @@ for how to generate an example Makefile. The lib directory contains the dynamically loadable libraries of all available plugins. Note that the names of these files are created by concatenating
-
libvdr- | hello | .so. | 1.1.0 |
VDR plugin library prefix | name of the plugin | shared object indicator | API version number this plugin was compiled for |
-
@@ -229,7 +229,7 @@ have other plans. Add further files and maybe subdirectories to your plugin source directory as necessary. Don't forget to adapt the Makefile appropriately. -
@@ -296,7 +296,7 @@ and implements a file named i18n.h. To make sure it won't clash with VD i18n.h it uses the macro _I18N__H (one underline at the beginning and two replacing the dot). -
@@ -325,7 +325,7 @@ Any threads the plugin may have created shall be stopped in the Of course, if your plugin doesn't define any member variables that need to be initialized (and deleted), you don't need to implement either of these functions. -
@@ -371,7 +371,7 @@ while those with odd release numbers (like 1.1.x, 1.3.x a version number are not limited to single digits, so a version number of 1.2.15 would be acceptable. -
@@ -395,7 +395,7 @@ virtual const char *Description(void) Note the tr() around the DESCRIPTION, which allows the description to be internationalized. -
@@ -449,7 +449,7 @@ correctly, or false in case of an error. The first plugin that returns false from a call to its ProcessArgs() function will cause VDR to exit. -
@@ -478,7 +478,7 @@ same formatting as shown here it will line up nicely. Note that all lines should be terminated with a newline character, and should be shorter than 80 characters. -
@@ -516,7 +516,7 @@ VDR to exit. If the plugin doesn't implement any background functionality or internationalized texts, it doesn't need to implement either of these functions. -
@@ -533,7 +533,7 @@ The Stop() function will only be called if a previous call to the returned true. The Stop() functions are called in the reverse order as the Start() functions were called. -
@@ -579,7 +579,7 @@ purpose of the plugin to display something on stdout, like for instance the Please make any log messages in ENGLISH! Logs are usually sent to the developers of a program, and they may not be able to read them if they are in an exotic language. -
@@ -607,7 +607,7 @@ The menu entries of all plugins will be inserted into VDR's main menu right after the Recordings item, in the same sequence as they were given in the call to VDR. -
@@ -640,7 +640,7 @@ interaction is possible. If a specific action takes longer than a few seconds, the plugin should launch a separate thread to do this. -
@@ -665,7 +665,7 @@ interaction is possible. If a specific action takes longer than a few seconds, the plugin should launch a separate thread to do this. -
@@ -686,7 +686,7 @@ second. as soon as possible! If you spend too much time in this function, the user interface performance will become sluggish! -
@@ -722,7 +722,7 @@ be queried, and further prompts may show up. If all prompts have been confirmed, the shutdown will take place. As soon as one prompt is not confirmed, no further plugins will be queried and no shutdown will be done. -
@@ -755,7 +755,7 @@ return a string when Active() is called at that time, otherwise VDR may again instantly. If WakeupTime() returns a time that is not in the future, the time will be ignored. -
@@ -828,7 +828,7 @@ needs setup parameters that are not directly user adjustable. It can use SetupStore() and SetupParse() without presenting these parameters to the user. -
@@ -886,7 +886,7 @@ You can first assign the temporary values to the global variables and then do th your setup parameters and use that one to copy all parameters with one single statement (like VDR does with its cSetup class). -
@@ -952,7 +952,7 @@ called even from outside any member function of the derived plugin class, by wri const char *MyConfigDir = cPlugin::ConfigDirectory(); -
@@ -998,7 +998,7 @@ and are defined in VDR/tools.h. Most of the time a plugin doesn't need to care about this, but when it comes to handling individual characters these functions may come in handy. -
@@ -1066,7 +1066,7 @@ To send a message to all plugins, a plugin can call the function cPluginManager::CallAllServices(). This function returns true if any plugin handled the request, or false if no plugin handled the request. -
@@ -1161,7 +1161,7 @@ will be set for all but the last one. Therefore the plugin needs to take care of proper locking if it accesses any global data. -
@@ -1211,7 +1211,7 @@ See tools.h, class cListBase for more documentation and information on to use locking with timeouts, and thread.h, classes cStateLock and cStateKey on how to easily react to changes in such lists. -
@@ -1251,7 +1251,7 @@ in the default or given directory that match the VDR plugin naming convention, and display their help and/or version information in addition to its own output. -
@@ -1277,9 +1277,9 @@ vdr-hello-0.0.1.tgz in your source directory, where hello will be replaced with your actual plugin's name, and 0.0.1 will be your plugin's current version number. -
@@ -1352,7 +1352,7 @@ See the file status.h for detailed information on which status monitor member functions are available in cStatus. You only need to implement the functions you actually want to use. -
@@ -1533,7 +1533,7 @@ enjoy additional players, since they will be able to control them with actions that they already know. If you absolutely want to do things differently, just go ahead - it's your show... -
@@ -1599,7 +1599,7 @@ Mode).
The cReceiver must be detached from its device before it is deleted. -
@@ -1643,7 +1643,7 @@ and will automatically detach itself from the cDevice.
See VDR/eit.c or VDR/pat.c to learn how to process filter data. -
@@ -1734,7 +1734,7 @@ int cSkins::QueueMessage(eMessageType Type, const char *s, int Seconds = 0, int to queue that message for display. See VDR/skins.h for details. -
@@ -1791,7 +1791,7 @@ skinxyz where xyz is the actual name of the skin. -
@@ -1839,7 +1839,7 @@ By default this will use the colors that have been defined in the respective THEME_CLR() line, but may be overwritten through user supplied theme files (see man vdr(5) for information about the format of a theme file). -
@@ -2090,7 +2090,7 @@ new cMyDeviceHook; and shall not delete this object. It will be automatically deleted when the program ends. -
@@ -2129,7 +2129,7 @@ Note that the object has to be created on the heap (using new), and you shall not delete it at any point (it will be deleted automatically when the program ends). -
@@ -2172,7 +2172,7 @@ 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. -
@@ -2298,7 +2298,7 @@ if a key is held pressed down for a while, your derived class should use the glo parameters Setup.RcRepeatDelay and Setup.RcRepeatDelta to allow users to configure the behavior of this function. -
@@ -2333,7 +2333,7 @@ virtual bool Assign(cDevice *Device, bool Query = false); See the description of this function in ci.h for details. -
@@ -2363,7 +2363,7 @@ to signal VDR that no other EPG handlers shall be queried after this one.
See VDR/epg.h for details. -