From 497553d9859aad4dfa0a07dcbae83423928557de Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 8 Apr 2013 08:58:49 +0200 Subject: Removed all "modified since version 1.6" markers from PLUGINS.html --- HISTORY | 1 + PLUGINS.html | 62 ++++++++++++------------------------------------------------ 2 files changed, 13 insertions(+), 50 deletions(-) diff --git a/HISTORY b/HISTORY index 2664f119..3215d5df 100644 --- a/HISTORY +++ b/HISTORY @@ -7794,3 +7794,4 @@ Video Disk Recorder Revision History - Fixed initializing cDevice::keepTracks. - Fixed an endless loop in cTextWrapper::Set() in case the given Width is smaller than one character (reported by Stefan Braun). +- Removed all "modified since version 1.6" markers from PLUGINS.html. diff --git a/PLUGINS.html b/PLUGINS.html index d864fe23..0141c563 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -31,14 +31,14 @@ modified {

The VDR Plugin System

-Version 2.0 +Version 2.1

Copyright © 2013 Klaus Schmidinger
vdr@tvdr.de
www.tvdr.de

-Important modifications introduced since version 1.6 are marked like this. +Important modifications introduced since version 2.0 are marked like this.

VDR provides an easy to use plugin interface that allows additional functionality @@ -82,7 +82,7 @@ structures and allows it to hook itself into specific areas to perform special a

  • Wakeup
  • Setup parameters
  • The Setup menu -
  • Additional files +
  • Additional files
  • Internationalization
  • Custom services
  • SVDRP commands @@ -102,7 +102,7 @@ structures and allows it to hook itself into specific areas to perform special a
  • Audio
  • Remote Control
  • Conditional Access -
  • Electronic Program Guide +
  • Electronic Program Guide @@ -173,15 +173,13 @@ The src directory contains one subdirectory for each plugin, which carr the name of that plugin (in the above example that would be hello). What's inside the individual source directory of a plugin is entirely up to the author of that plugin. The only prerequisites are -that there is a Makefile that provides the targets all, install and +that there is a Makefile that provides the targets all, install and clean, and that a call to make all actually produces a dynamically loadable library file for that plugin (we'll get to the details later). - The dynamically loadable library file for the plugin shall be located directly under the plugin's source directory. See the section Initializing a new plugin directory 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 @@ -891,70 +889,51 @@ 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). -


    Additional files

    +

    Additional files

    I want my own stuff!

    - There may be situations where a plugin requires files of its own. While the plugin is free to store such files anywhere it sees fit, it might be a good idea to put them in a common place, preferably where such data already exists. -

    - configuration files, maybe for data that can't be stored in the simple setup parameters of VDR, or maybe because it needs to launch other programs that simply need a separate configuration file. -

    - cache files, to store data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere. -

    - resource files, for providing additional files, like pictures, movie clips or channel logos. -

    - Therefore VDR provides the functions

    -
     const char *ConfigDirectory(const char *PluginName = NULL);
     const char *CacheDirectory(const char *PluginName = NULL);
     const char *ResourceDirectory(const char *PluginName = NULL);
    -
     

    - each of which returns a string containing the directory that VDR uses for its own files (defined through the options in the call to VDR), extended by - "/plugins". So assuming the VDR configuration directory is /video (the default if no -c or -v option is given), a call to ConfigDirectory() will return /video/plugins. The first call to ConfigDirectory() will automatically make sure that the plugins subdirectory will exist. If, for some reason, this cannot be achieved, NULL will be returned. - The behavior of CacheDirectory() and ResourceDirectory() is similar. -

    The additional plugins directory is used to keep files from plugins apart from those of VDR itself, making sure there will be no name clashes. If a plugin - needs only one extra file, it is suggested that this file be named name.*, where name shall be the name of the plugin. -

    If a plugin needs more than one such file, it is suggested that the plugin stores these in a subdirectory of its own, named after the plugin. To easily get such a name - the functions can be given an additional string that will be appended to the returned directory name, as in -

     const char *MyConfigDir = ConfigDirectory(Name());
    @@ -965,16 +944,12 @@ plugin's name. Again, VDR will make sure that the requested directory will exist
     (or return NULL in case of an error).
     

    - The returned strings are statically allocated and will be overwritten by subsequent calls! -

    - The ConfigDirectory(), CacheDirectory() and ResourceDirectory() functions are static member functions of the cPlugin class. This allows them to be called even from outside any member function of the derived plugin class, by writing -

     const char *MyConfigDir = cPlugin::ConfigDirectory();
    @@ -1265,10 +1240,10 @@ If a plugin wants to get informed on various events in VDR, it can derive a clas
     
     class cMyStatusMonitor : public cStatus {
     protected:
    -  virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView);
    +  virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView);
       };
     
    -void cMyStatusMonitor::ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView)
    +void cMyStatusMonitor::ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView)
     {
       if (ChannelNumber)
          dsyslog("channel switched to %d on DVB %d", ChannelNumber, Device->CardIndex());
    @@ -1525,13 +1500,11 @@ public:
       cMyReceiver(int Pid);
       };
     
    -
     cMyReceiver::cMyReceiver(int Pid)
     :cReceiver(NULL, -1)
     {
       AddPid(Pid);
     }
    -
     
     cMyReceiver::~cMyReceiver()
     {
    @@ -1557,7 +1530,7 @@ The above example sets up a receiver that wants to receive data from only one
     PID (for example the Teletext PID). In order to not interfere with other recording
     operations, it sets its priority to -1 (any negative value will allow
     a cReceiver to be detached from its cDevice at any time
    -in favor of a timer recording or live viewing).
    +in favor of a timer recording or live viewing).
     

    Once a cReceiver has been created, it needs to be attached to a cDevice: @@ -1573,9 +1546,7 @@ the receiver is attached to the device that actually receives the current live video stream (this may be different from the primary device in case of Transfer Mode).

    - The cReceiver must be detached from its device before it is deleted. -


    Filters

    @@ -1853,7 +1824,7 @@ If the new device can receive, it most likely needs to provide a way of selecting which channel it shall tune to:

    -virtual int NumProvidedSystems(void) const;
    +virtual int NumProvidedSystems(void) const;
     virtual bool ProvidesSource(int Source) const;
     virtual bool ProvidesTransponder(const cChannel *Channel) const;
     virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
    @@ -1902,7 +1873,7 @@ virtual bool HasDecoder(void) const;
     virtual bool CanReplay(void) const;
     virtual bool SetPlayMode(ePlayMode PlayMode);
     virtual int64_t GetSTC(void);
    -virtual bool IsPlayingVideo(void) const;
    +virtual bool IsPlayingVideo(void) const;
     virtual bool HasIBPTrickSpeed(void);
     virtual void TrickSpeed(int Speed);
     virtual void Clear(void);
    @@ -1931,7 +1902,7 @@ the functions
     
     

     virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
    -virtual int ReadFilter(int Handle, void *Buffer, size_t Length);
    +virtual int ReadFilter(int Handle, void *Buffer, size_t Length);
     virtual void CloseFilter(int Handle);
     

    @@ -1987,7 +1958,6 @@ user - whether this goes through OSD facilities of the physical device (like a "full featured" DVB card) or through a graphics adapter that overlays its output with the video signal, doesn't matter.

    -

    In order to be able to determine the proper size of the OSD, the device should implement the function @@ -1996,7 +1966,6 @@ virtual void GetOsdSize(int &Width, int &Height, double &Aspect);

    By default, an OSD size of 720x480 with an aspect ratio of 1.0 is assumed. -

    Initializing new devices @@ -2017,8 +1986,6 @@ Nothing needs to be done to shut down the devices. VDR will automatically 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! - -

    Device hooks

    @@ -2056,7 +2023,6 @@ new cMyDeviceHook;

    and shall not delete this object. It will be automatically deleted when the program ends. -


    Audio

    @@ -2222,12 +2188,10 @@ Put(uint64 Code, bool Repeat = false, bool Release = false); The other parameters have the same meaning as in the first version of this function.

    - If your remote control has a repeat function that automatically repeats key events if a key is held pressed down for a while, your derived class should use the global parameters Setup.RcRepeatDelay and Setup.RcRepeatDelta to allow users to configure the behavior of this function. -


    Conditional Access

    @@ -2264,7 +2228,6 @@ virtual bool Assign(cDevice *Device, bool Query = false); See the description of this function in ci.h for details. -

    Electronic Program Guide

    The grass is always greener on the other side...

    @@ -2294,7 +2257,6 @@ where DescriptionFromDatabase() would derive the description of the to signal VDR that no other EPG handlers shall be queried after this one.

    See VDR/epg.h for details. -

    -- cgit v1.2.3