diff --git a/Makefile b/Makefile index 59908382..3359aadb 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Makefile 1.43 2002/07/28 13:24:58 kls Exp $ +# $Id: Makefile 1.44 2002/07/28 15:20:47 kls Exp $ .DELETE_ON_ERROR: @@ -27,7 +27,7 @@ INCLUDES = -I$(DVBDIR)/ost/include DTVLIB = $(DTVDIR)/libdtv.a -OBJS = audio.o config.o cutter.o device.o dvbplayer.o dvbosd.o eit.o eitscan.o font.o i18n.o\ +OBJS = audio.o config.o cutter.o device.o dvbdevice.o dvbosd.o dvbplayer.o eit.o eitscan.o font.o i18n.o\ interface.o menu.o menuitems.o osdbase.o osd.o player.o plugin.o receiver.o\ recorder.o recording.o remote.o remux.o ringbuffer.o status.o svdrp.o thread.o\ tools.o transfer.o vdr.o videodir.o diff --git a/PLUGINS.html b/PLUGINS.html index 2a66e88d..c9d6c542 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -1152,5 +1152,122 @@ of these functions, and VDR/osd.c to see how VDR opens the OSD and sets up its windows and color depths). +
+Devices+ ++ +By default VDR is based on using DVB PCI cards that are supported by the +LinuxDVB driver. However, a plugin can implement additional devices that +can be used as sources of MPEG data for viewing or recording, and also +as output devices for replaying. Such a device can be a physical card +that is installed in the PC (like, for instance, an MPEG encoder card that +allows the analog signal of a proprietary set-top box to be integrated +into a VDR system; or an analog TV receiver card, which does the MPEG encoding +"on the fly" - assuming your machine is fast enough), or just a software program that takes an MPEG data +stream and displays it, for instance, on an existing graphics adapter. + +To implement an additional device, a plugin must derive a class from cDevice: + +
+ +The derived class must implement several virtual functions, according to +the abilities this new class of devices can provide. See the comments in the +file VDR/device.h for more information on the various functions, +and also VDR/dvbdevice.[hc] for details on the implementation of +the cDvbDevice, which is used to access the DVB PCI cards. + +Channel selection + +If the new device can receive, it most likely needs to provide a way of +selecting which channel it shall tune to: + +
+ +This function will be called with the desired channel and shall return whether +tuning to it was successful. + +Recording + +A device that can be used for recording must implement the functions + +
+ +which allow VDR to set the PIDs that shall be recorded, set up the device fro +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() +must deliver exactly one such packet (if one is currently available). + +If this device allows receiving several different data streams, it can +implement + +
+ +to indicate this to VDR. + +Replaying + +The functions to implement replaying capabilites are + +
+ +In addition, the following functions may be implemented to provide further +functionality: + +
+ +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 +might be important), and then creates as many device objects as necessary. +See VDR/dvbdevice.c for the implementation of the cDvbDevice +initialize function. + +A plugin that adds devices to a VDR instance shall call this initializing +function from its Start() function. + +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! + |