summaryrefslogtreecommitdiff
path: root/spuencoder.c
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2009-08-31 19:20:22 +0200
committerChristian Gmeiner <christian.gmeiner@gmail.com>2009-08-31 19:20:22 +0200
commit76c5a2b403e79bd9a76b2dcce1a30e601bd0a127 (patch)
treeada4989176c72968f26b24752f613b16bdf11fd9 /spuencoder.c
parent34176db79c1d6bca5d4f76fc34f80e00565091e4 (diff)
downloadvdr-plugin-dxr3-76c5a2b403e79bd9a76b2dcce1a30e601bd0a127.tar.gz
vdr-plugin-dxr3-76c5a2b403e79bd9a76b2dcce1a30e601bd0a127.tar.bz2
add spuencoder implementation
move ClearOsd() from cDxr3Interface to cSpuEncoder class. Also make method simpler to understand. Yet this method is not used.
Diffstat (limited to 'spuencoder.c')
-rw-r--r--spuencoder.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/spuencoder.c b/spuencoder.c
new file mode 100644
index 0000000..b2a9921
--- /dev/null
+++ b/spuencoder.c
@@ -0,0 +1,41 @@
+#include "spuencoder.h"
+#include "dxr3interface.h"
+
+static const uint8_t CMD_FORCE_DISPLAYING = 0x00;
+static const uint8_t CMD_STOP_DISPLAYING = 0x02;
+static const uint8_t CMD_SET_COLOR = 0x03;
+static const uint8_t CMD_SET_ALPHA = 0x04;
+static const uint8_t CMD_SET_DISPLAYAREA = 0x05;
+static const uint8_t CMD_SET_PIXEL_ADDRESES = 0x06;
+static const uint8_t CMD_CHG_COLCON = 0x07;
+
+void cSpuEncoder::clearOsd()
+{
+ uint8_t d[10];
+
+ // packet size
+ d[0] = 0;
+ d[1] = 10;
+
+ // pointer to the SP_DCSQT
+ d[2] = 0;
+ d[3] = 4;
+
+ // display duration...
+ d[4] = 0x00;
+ d[5] = 0x00; // duration before turn on command occurs (will not be used)
+
+ // pointer to next command block
+ d[6] = 0; // since this is the last command block, this
+ d[7] = 4; // points back to itself
+
+ // stop displaying
+ d[8] = CMD_STOP_DISPLAYING;
+
+ // end sequence
+ d[9] = 0xFF;
+
+ // TODO: osd button handling
+
+ cDxr3Interface::instance()->WriteSpu((uchar *)&d, 10);
+}