summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-08-25 09:36:09 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-08-25 09:36:09 +0200
commitc6ed4da7a0e8d9bf5664ba2c4282e3c6cb6d7932 (patch)
treeaef8dad67f4e01f6655e0e189af7af1576e038af
parentdf5be87dc3aa8a94990dcc387729c551fb14a3db (diff)
downloadvdr-c6ed4da7a0e8d9bf5664ba2c4282e3c6cb6d7932.tar.gz
vdr-c6ed4da7a0e8d9bf5664ba2c4282e3c6cb6d7932.tar.bz2
Added cDevice::NewOsd() to allow a derived cDevice class to implement its own OSD capabilities
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY4
-rw-r--r--PLUGINS.html43
-rw-r--r--device.c7
-rw-r--r--device.h13
-rw-r--r--dvbdevice.c7
-rw-r--r--dvbdevice.h7
-rw-r--r--osd.c5
8 files changed, 67 insertions, 21 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c1536533..a3c12fa3 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -161,6 +161,8 @@ Andreas Schultz <aschultz@warp10.net>
for adding direct access to the index data of cPalette (needed for displaying SPUs)
for pointing out a possible race condition in the cDvbPlayer
for making the use of malloc/free and new/delete consistent
+ for adding cDevice::NewOsd() to allow a derived cDevice class to implement its own
+ OSD capabilities
Aaron Holtzman
for writing 'ac3dec'
diff --git a/HISTORY b/HISTORY
index 0c5518d1..3d05a591 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1416,8 +1416,10 @@ Video Disk Recorder Revision History
there is at least one device, either a DVB device found by the core VDR code
itself, or a device implemented by a plugin.
-2002-08-24: Version 1.1.8
+2002-08-25: Version 1.1.8
- Fixed replaying the last few seconds of a recording.
- Added some missing #includes to files in libdtv for gcc 3.2 (thanks to Jürgen
Zimmermann).
+- Added cDevice::NewOsd() to allow a derived cDevice class to implement its own
+ OSD capabilities (thanks to Andreas Schultz).
diff --git a/PLUGINS.html b/PLUGINS.html
index e1f73f55..12a25b24 100644
--- a/PLUGINS.html
+++ b/PLUGINS.html
@@ -21,18 +21,18 @@ VDR program and present itself to the user.
The <i>inside</i> 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.
<p>
-<!--X1.1.4--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
-Important modifications introduced in version 1.1.4 are marked like this.
-<!--X1.1.4--></td></tr></table>
-<!--X1.1.5--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.1.5--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.5 are marked like this.
<!--X1.1.5--></td></tr></table>
-<!--X1.1.6--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.1.6--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.6 are marked like this.
<!--X1.1.6--></td></tr></table>
-<!--X1.1.7--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.1.7--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.7 are marked like this.
<!--X1.1.7--></td></tr></table>
+<!--X1.1.8--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+Important modifications introduced in version 1.1.8 are marked like this.
+<!--X1.1.8--></td></tr></table>
<a name="Part I - The Outside Interface"><hr><center><h1>Part I - The Outside Interface</h1></center>
@@ -907,7 +907,6 @@ See the file <tt>status.h</tt> for detailed information on which status monitor
member functions are available in <tt>cStatus</tt>. You only need to implement
the functions you actually want to use.
-<!--X1.1.4--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
<hr><h2>Players</h2>
<center><i><b>Play it again, Sam!</b></i></center><p>
@@ -958,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.
-<!--X1.1.7--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.1.7--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
To avoid busy loops the player should call its member function
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
@@ -1065,9 +1064,8 @@ Of course, these are only suggestions which should make it easier for VDR users
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...
-<!--X1.1.4--></td></tr></table>
-<!--X1.1.6--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.1.6--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<hr><h2>Receivers</h2>
<center><i><b>Tapping into the stream...</b></i></center><p>
@@ -1123,7 +1121,7 @@ If the <tt>cReceiver</tt> isn't needed any more, it may simply be <i>deleted</i>
and will automatically detach itself from the <tt>cDevice</tt>.
<!--X1.1.6--></td></tr></table>
-<!--X1.1.5--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.1.5--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
<hr><h2>The On Screen Display</h2>
<center><i><b>Express yourself</b></i></center><p>
@@ -1155,7 +1153,7 @@ of these functions, and VDR/osd.c to see how VDR opens the OSD and sets up
its windows and color depths).
<!--X1.1.5--></td></tr></table>
-<!--X1.1.6--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.1.6--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<hr><h2>Devices</h2>
<center><i><b>Expanding the possibilities</b></i></center><p>
@@ -1228,7 +1226,7 @@ to indicate this to VDR.
<p>
The functions to implement replaying capabilites are
-<!--X1.1.7--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.1.7--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
virtual bool HasDecoder(void) const;
virtual bool SetPlayMode(ePlayMode PlayMode);
@@ -1252,6 +1250,25 @@ virtual void SetVideoFormat(bool VideoFormat16_9);
virtual void SetVolumeDevice(int Volume);
</pre></td></tr></table><p>
+<!--X1.1.8--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<p>
+<b>On Screen Display</b>
+<p>
+If your device provides On Screen Display (OSD) capabilities (which every device
+that is supposed to be used as a primary device should do), it can implement
+the function
+
+<p><table><tr><td bgcolor=#F0F0F0><pre><br>
+virtual cOsdBase *NewOsd(int x, int y);
+</pre></td></tr></table><p>
+
+which must return a newly created object of a derived cOsdBase class that
+implements the functions necessary to display OSD information on your device.
+The caller of this function will delete the object as soon as it is no longer
+needed.
+<!--X1.1.8--></td></tr></table>
+
+<p>
<b>Initializing new devices</b>
<p>
A derived cDevice class shall implement a static function
diff --git a/device.c b/device.c
index 6a310377..48f5d40f 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.12 2002/08/16 09:50:43 kls Exp $
+ * $Id: device.c 1.13 2002/08/25 09:16:51 kls Exp $
*/
#include "device.h"
@@ -111,6 +111,11 @@ bool cDevice::HasDecoder(void) const
return false;
}
+cOsdBase *cDevice::NewOsd(int x, int y)
+{
+ return NULL;
+}
+
cDevice *cDevice::GetDevice(int Ca, int Priority, int Frequency, int Vpid, bool *ReUse)
{
if (ReUse)
diff --git a/device.h b/device.h
index 14d8ec50..5f62417a 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 1.9 2002/08/16 08:52:27 kls Exp $
+ * $Id: device.h 1.10 2002/08/25 09:16:34 kls Exp $
*/
#ifndef __DEVICE_H
@@ -43,6 +43,7 @@ enum ePlayMode { pmNone, // audio/video from decoder
// KNOWN TO YOUR PLAYER.
};
+class cOsdBase;
class cChannel;
class cPlayer;
class cReceiver;
@@ -129,6 +130,16 @@ public:
virtual bool HasDecoder(void) const;
// Tells whether this device has an MPEG decoder.
+// OSD facilities
+
+public:
+ virtual cOsdBase *NewOsd(int x, int y);
+ // Creates a new cOsdBase object that can be used by the cOsd class
+ // to display information on the screen, with the upper left corner
+ // of the OSD at the given coordinates. If a derived cDevice doesn't
+ // implement this function, NULL will be returned by default (which
+ // means the device has no OSD capabilities).
+
// Channel facilities
protected:
diff --git a/dvbdevice.c b/dvbdevice.c
index 6be882fa..52c7c3ba 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.7 2002/08/16 09:27:53 kls Exp $
+ * $Id: dvbdevice.c 1.8 2002/08/25 09:20:53 kls Exp $
*/
#include "dvbdevice.h"
@@ -193,6 +193,11 @@ bool cDvbDevice::HasDecoder(void) const
return fd_video >= 0 && fd_audio >= 0;
}
+cOsdBase *cDvbDevice::NewOsd(int x, int y)
+{
+ return new cDvbOsd(x, y);
+}
+
bool cDvbDevice::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY)
{
int videoDev = DvbOpen(DEV_VIDEO, CardIndex(), O_RDWR, true);
diff --git a/dvbdevice.h b/dvbdevice.h
index ece1b454..a338399b 100644
--- a/dvbdevice.h
+++ b/dvbdevice.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.h 1.5 2002/08/16 08:53:30 kls Exp $
+ * $Id: dvbdevice.h 1.6 2002/08/25 09:19:34 kls Exp $
*/
#ifndef __DVBDEVICE_H
@@ -48,6 +48,11 @@ public:
virtual bool CanBeReUsed(int Frequency, int Vpid);
virtual bool HasDecoder(void) const;
+// OSD facilities
+
+public:
+ cOsdBase *NewOsd(int x, int y);
+
// Channel facilities
private:
diff --git a/osd.c b/osd.c
index 58caf68c..a2daf603 100644
--- a/osd.c
+++ b/osd.c
@@ -4,13 +4,12 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.c 1.34 2002/08/15 11:20:44 kls Exp $
+ * $Id: osd.c 1.35 2002/08/25 09:18:31 kls Exp $
*/
#include "osd.h"
#include <string.h>
#include "device.h"
-#include "dvbosd.h"
#include "i18n.h"
#include "status.h"
@@ -73,7 +72,7 @@ cOsdBase *cOsd::OpenRaw(int x, int y)
#ifdef DEBUG_OSD
return NULL;
#else
- return osd ? NULL : new cDvbOsd(x, y);
+ return osd ? NULL : cDevice::PrimaryDevice()->NewOsd(x, y);
#endif
}