From 523c4a07aa9112841743fca2ebcce957fde03bc8 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 8 Sep 2002 18:00:00 +0200 Subject: Version 1.1.9 - Fixed the 'newplugin' script to make it name the target for creating the distribution package 'dist', as stated in the PLUGINS.html documentation. If you have already created a plugin source directory and Makefile you may want to check it and replace the 'package' target with 'dist' if necessary. - Changed device handling for being able to do simultaneous recording and replay on the same device (Time Shifting). In order for this to work you need to use a driver with a firmware version that has this feature implemented. - cDevice::ProvidesCa() is no longer virtual. The new function cDevice::ProvidesChannel() is now used to determine whether a device can receive a given channel, and by default this function returns false. So a device that is a pure replaying device doesn't need to do anything here. - Increased the recorder buffer size to 5MB in order to be able to better handle multiple recordings. - Implemented cTSBuffer for better handling TS packet buffering in derived cDevice classes. - Changed the interface if cDevice::GetTSPacket() to avoid unnecessary copying of data. - Removed cDevice::Channel(), since this makes no more sense with devices receiving multiple channels. - Switching through channels with the 'Up' and 'Down' keys now skips channels that are currently not available (for instance because all devices are recording and these channels are on different transponders). - Implemented an SPU decoder (thanks to Andreas Schultz). - Fixed a crash when entering an integer value outside the limits (thanks to Stefan Huelswitt for reporting this one). - Added play mode pmAudioOnlyBlack (thanks to Stefan Huelswitt). --- PLUGINS.html | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'PLUGINS.html') diff --git a/PLUGINS.html b/PLUGINS.html index 186316d..02fd59a 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -21,18 +21,18 @@ VDR program and present itself to the user. The inside 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.5 are marked like this. -
-
  +
  Important modifications introduced in version 1.1.6 are marked like this.
-
  +
  Important modifications introduced in version 1.1.7 are marked like this.
-
  +
  Important modifications introduced in version 1.1.8 are marked like this.
+
  +Important modifications introduced in version 1.1.9 are marked like this. +

Part I - The Outside Interface

@@ -352,20 +352,20 @@ these values inside the plugin. Here's an example:


bool cPluginHello::ProcessArgs(int argc, char *argv[]) -{ +{ // Implement command line argument processing here if applicable. static struct option long_options[] = { { "aaa", required_argument, NULL, 'a' }, { "bbb", no_argument, NULL, 'b' }, { NULL } }; - + int c; while ((c = getopt_long(argc, argv, "a:b", long_options, NULL)) != -1) { switch (c) { case 'a': option_a = optarg; break; - case 'b': option_b = true; + case 'b': option_b = true; break; default: return false; } @@ -609,7 +609,7 @@ public: }; cMenuSetupHello::cMenuSetupHello(void) -{ +{ newGreetingTime = GreetingTime; newUseAlternateGreeting = UseAlternateGreeting; Add(new cMenuEditIntItem( tr("Greeting time (s)"), &newGreetingTime)); @@ -617,7 +617,7 @@ cMenuSetupHello::cMenuSetupHello(void) } void cMenuSetupHello::Store(void) -{ +{ SetupStore("GreetingTime", GreetingTime = newGreetingTime); SetupStore("UseAlternateGreeting", UseAlternateGreeting = newUseAlternateGreeting); } @@ -957,7 +957,7 @@ stream. There are no prerequisites regarding the length or alignment of an individual block of data. The sum of all blocks must simply result in the desired video data stream, and it must be delivered fast enough so that the DVB device doesn't run out of data. -
  +
  To avoid busy loops the player should call its member function


@@ -1034,7 +1034,7 @@ void DeviceStillPicture(const uchar *Data, int Length); which can be called to display a still picture. VDR uses this function when handling its editing marks. A special case of a "player" might use this function to implement -a "picture viewer". +a "picture viewer".

For detailed information on how to implement your own player, please take a look at VDR's cDvbPlayer and cDvbPlayerControl classes. @@ -1065,7 +1065,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... -
  +
 

Receivers

Tapping into the stream...

@@ -1121,7 +1121,6 @@ If the cReceiver isn't needed any more, it may simply be deleted and will automatically detach itself from the cDevice.

-
 

The On Screen Display

Express yourself

@@ -1151,9 +1150,8 @@ MyOsd->Create(...); to define an actual OSD drawing area (see VDR/osdbase.h for the declarations of these functions, and VDR/osd.c to see how VDR opens the OSD and sets up its windows and color depths). -

-
  +
 

Devices

Expanding the possibilities

@@ -1189,12 +1187,16 @@ the cDvbDevice, which is used to access the DVB PCI cards. If the new device can receive, it most likely needs to provide a way of selecting which channel it shall tune to: +
 


-virtual bool SetChannelDevice(const cChannel *Channel); +virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL); +virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);

-This function will be called with the desired channel and shall return whether -tuning to it was successful. +These functions will be called with the desired channel and shall return whether +this device can provide the requested channel and whether tuning to it was successful, +repectively. +

Recording

@@ -1204,10 +1206,12 @@ A device that can be used for recording must implement the functions virtual bool SetPid(cPidHandle *Handle, int Type, bool On); virtual bool OpenDvr(void); virtual void CloseDvr(void); -virtual int GetTSPacket(uchar *Data); +
  +virtual bool GetTSPacket(uchar *&Data); +

-which allow VDR to set the PIDs that shall be recorded, set up the device fro +which allow VDR to set the PIDs that shall be recorded, set up the device for recording (and shut it down again), and receive the MPEG data stream. The data must be delivered in the form of a Transport Stream (TS), which consists of packets that are all 188 bytes in size. Each call to GetTSPacket() @@ -1226,7 +1230,7 @@ to indicate this to VDR.

The functions to implement replaying capabilites are -
  +
 


virtual bool HasDecoder(void) const; virtual bool SetPlayMode(ePlayMode PlayMode); @@ -1250,7 +1254,7 @@ virtual void SetVideoFormat(bool VideoFormat16_9); virtual void SetVolumeDevice(int Volume);

-
  +
 

On Screen Display

-- cgit v1.2.3