LDFLAGS = -Wall -static\r
LIBS = -lpthread -lrt\r
\r
-OBJECTS += main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o vmedialist.o vcolourtuner.o vmediaview.o vvideomedia.o mediafile.o \r
+OBJECTS += wwss.o main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o vmedialist.o vcolourtuner.o vmediaview.o vvideomedia.o mediafile.o \r
TIOBJECT = ticonfig.o\r
CROSSLIBS = ../jpeg/jpeg-6b/libjpeg.a\r
INCLUDES = -I../jpeg/jpeg-6b -DVOMP_PLATTFORM_MVP \r
if (parent) parent->drawTextCentre(text, area.x + x, area.y + y, colour);\r
else surface->drawTextCentre(text, x, y, colour.rgba());\r
}\r
-\r
+// Now deprecated\r
+/*\r
void Boxx::drawPixelAlpha(UINT x, UINT y, const Colour& colour,bool fastdraw)\r
{\r
if (parent) parent->drawPixelAlpha(area.x + x, area.y + y, colour,fastdraw);\r
surface->drawPixel(x, y, c,fastdraw);\r
}\r
}\r
+*/\r
\r
void Boxx::drawTTChar(int ox, int oy,int x, int y, cTeletextChar c)\r
{\r
else if (surface) surface->drawJpeg(fileName,x,y,width,height);\r
}\r
\r
+void Boxx::drawMonoBitmap(UCHAR*base, int dx, int dy, unsigned int height,unsigned int width, Colour& nextColour)\r
+{\r
+ if (parent) parent->drawMonoBitmap(base, area.x +dx,area.y +dy, height,width, nextColour);\r
+ else if (surface) surface->drawMonoBitmap(base, dx,dy, height,width, nextColour);\r
+}\r
+\r
int Boxx::getFontHeight()\r
{\r
if (parent) return parent->getFontHeight();\r
\r
class Boxx\r
{\r
+ friend class Wwss;\r
public:\r
Boxx();\r
virtual ~Boxx();\r
void drawText(const char* text, int x, int y, int width, const Colour& colour);\r
void drawTextRJ(const char* text, int x, int y, const Colour& colour);\r
void drawTextCentre(const char* text, int x, int y, const Colour& colour);\r
- void drawPixel(UINT x, UINT y, const Colour& colour, bool fastdraw=false);\r
+ //Now deprecated\r
+ //void drawPixel(UINT x, UINT y, const Colour& colour, bool fastdraw=false);\r
void drawBitmap(UINT x, UINT y, const Bitmap& bm);\r
- void drawPixelAlpha(UINT x, UINT y, const Colour& colour,bool fastdraw=false);\r
+ //Now deprecated\r
+ // void drawPixelAlpha(UINT x, UINT y, const Colour& colour,bool fastdraw=false);\r
int getFontHeight();\r
\r
void drawJpeg(const char *fileName,int x, int y,int *width, int *height);\r
\r
void drawTTChar(int ox, int oy,int x, int y, cTeletextChar c);\r
+ void drawMonoBitmap(UCHAR*base, int dx, int dy, unsigned int height,unsigned int width, Colour& nextColour);\r
\r
/* This is for system which need a locking of the drawing surface to speed up drawing */\r
void startFastDraw();\r
#define Audio_TYPE AudioMVP\r
#define Video_TYPE VideoMVP\r
#define DEFAULT_TCP_WINDOWSIZENR 1 /*=2048*/\r
+ #define PAL_WSS\r
#endif\r
\r
#ifdef VOMP_PLATTFORM_NMT // This was the attempt to port vomp to nmt, it failed but maybe the code is useful at some time\r
vchannellist.o vwelcome.o vvideorec.o vepgsettimer.o \\r
vchannelselect.o vserverselect.o vconnect.o vepg.o vrecmove.o \\r
vradiorec.o vaudioselector.o vscreensaver.o vopts.o \\r
- wselectlist.o wjpeg.o wsymbol.o wbutton.o wtextbox.o wwss.o \\r
+ wselectlist.o wjpeg.o wsymbol.o wbutton.o wtextbox.o \\r
woptionpane.o woptionbox.o wremoteconfig.o wtabbar.o \\r
fonts/helvB24.o fonts/helvB18.o \\r
remote.o led.o mtd.o osd.o surface.o \\r
\r
\r
}\r
+\r
+void Surface::drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,\r
+ unsigned int width, Colour& nextColour) {\r
+ startFastDraw();\r
+ int x, y;\r
+ unsigned int bytesIn, bitsIn;\r
+ int widthBytes=width/8;\r
+ for (y = 0; y < height; y++) {\r
+ for (x = 0; x < width; x++) {\r
+ bytesIn = (y * widthBytes) + (int) (x / 8);\r
+ bitsIn = x % 8;\r
+\r
+ if ((base[bytesIn] >> (7 - bitsIn)) & 0x01) {\r
+ drawPixel(dx+x, dy+y, nextColour, true);\r
+ }\r
+ }\r
+ }\r
+ endFastDraw();\r
+}\r
+\r
+void Surface::drawPoint(int x, int y, Colour& c, bool fastdraw)\r
+{\r
+ drawPixel(x,y,c,fastdraw);\r
+}\r
\r
class Surface\r
{\r
+ friend class Wwss;\r
public:\r
Surface(int id = 0);\r
virtual ~Surface();\r
virtual void display()=0;\r
\r
virtual int fillblt(int x, int y, int width, int height, unsigned int c)=0;\r
- virtual void drawPixel(int x, int y, unsigned int c, bool fastdraw=false)=0;\r
- virtual void drawPixel(int x, int y, Colour& c, bool fastdraw=false)=0;\r
virtual void drawHorzLine(int x1, int x2, int y, unsigned int c)=0;\r
virtual void drawVertLine(int x, int y1, int y2, unsigned int c)=0;\r
virtual void drawBitmap(int x, int y, const Bitmap& bm)=0;\r
+ virtual void drawPoint(int x, int y, Colour& c, bool fastdraw=false); // This draws a point, must not be a pixel\r
+ virtual void drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, Colour& nextColour);\r
virtual int updateToScreen(int sx, int sy, int w, int h, int dx, int dy)=0;\r
virtual void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b)=0;\r
virtual void screenShot(const char* fileName)=0;\r
static osd_font_t* font;\r
Colour enumTeletextColorToCoulour(enumTeletextColor ttcol);\r
\r
+ virtual void drawPixel(int x, int y, unsigned int c, bool fastdraw=false)=0; // deprecated preparation for vector based drawing, only allowed to be called inside implementation\r
+ virtual void drawPixel(int x, int y, Colour& c, bool fastdraw=false)=0; // deprecated preparation for vector based drawing, only allowed to be called inside implementation\r
+\r
};\r
\r
#endif\r
void display();\r
\r
int fillblt(int x, int y, int width, int height, unsigned int rgba);\r
- void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);\r
- void drawPixel(int x, int y, Colour& c, bool fastdraw=false);\r
+\r
void drawHorzLine(int x1, int x2, int y, unsigned int c);\r
void drawVertLine(int x, int y1, int y2, unsigned int c);\r
void drawBitmap(int x, int y, const Bitmap& bm);\r
private:\r
IDirectFBSurface *surface;\r
\r
+ void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);\r
+ void drawPixel(int x, int y, Colour& c, bool fastdraw=false);\r
+\r
\r
\r
};\r
unsigned long getSurfaceHandle();\r
\r
int fillblt(int x, int y, int width, int height, unsigned int rgba);\r
- void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);\r
- void drawPixel(int x, int y, Colour& c, bool fastdraw=false);\r
+\r
void drawHorzLine(int x1, int x2, int y, unsigned int c);\r
void drawVertLine(int x, int y1, int y2, unsigned int c);\r
void drawBitmap(int x, int y, const Bitmap& bm);\r
static int conv_BV[256];\r
static int conv_GV[256];\r
static int conv_RV[256];\r
+ protected:\r
+ void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);\r
+ void drawPixel(int x, int y, Colour& c, bool fastdraw=false);\r
\r
};\r
\r
void endFastDraw();\r
\r
int fillblt(int x, int y, int width, int height, unsigned int c);\r
- void drawPixel(int x, int y, Colour& c, bool fastdraw=false);\r
- void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);\r
+\r
void drawHorzLine(int x1, int x2, int y, unsigned int c);\r
void drawVertLine(int x, int y1, int y2, unsigned int c);\r
void drawBitmap(int x, int y, const Bitmap& bm);\r
\r
\r
Mutex srf_mutex;\r
+ protected:\r
+ void drawPixel(int x, int y, Colour& c, bool fastdraw=false);\r
+ void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);\r
\r
};\r
\r
void endFastDraw();\r
\r
int fillblt(int x, int y, int width, int height, unsigned int c);\r
- void drawPixel(int x, int y, Colour& c, bool fastdraw=false);\r
- void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);\r
void drawHorzLine(int x1, int x2, int y, unsigned int c);\r
void drawVertLine(int x, int y1, int y2, unsigned int c);\r
void drawBitmap(int x, int y, const Bitmap& bm);\r
D3DLOCKED_RECT lockrect;\r
UINT sheight,swidth;\r
HANDLE event;\r
+ protected:\r
+ void drawPixel(int x, int y, Colour& c, bool fastdraw=false);\r
+ void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);\r
};\r
\r
#endif\r
option = new Option(13, "TCP receive window size", "Advanced", "TCP receive window", Option::TYPE_TEXT, 7, /*1*/DEFAULT_TCP_WINDOWSIZENR, 0, options13);\r
options.push_back(option);\r
wop->addOptionLine(option);\r
+#ifdef PAL_WSS\r
option = new Option(14, "Use WSS (PAL only)", "General", "WSS", Option::TYPE_TEXT, 2, 0, 0, options14);\r
options.push_back(option);\r
- wop->addOptionLine(option); \r
+ wop->addOptionLine(option);\r
+#endif\r
\r
Remote::getInstance()->addOptionsToPanes(2,&options,wop);\r
Video::getInstance()->addOptionsToPanes(2,&options,wop);\r
tail = head + 1;
if (tail == h) tail = 0;
- // Undraw oldest pixel
- if (x[tail] != -1) surface->drawPixel(x[tail], y[tail], Colour::BLACK.rgba());
+ // Undraw oldest point
+ if (x[tail] != -1) surface->drawPoint(x[tail], y[tail], Colour::BLACK);// was rgba
dd = ((rand() / (double)RAND_MAX) * deviation) - halfdeviation;
direction += dd;
x[head] = (int)fx;
y[head] = (int)fy;
- surface->drawPixel(x[head], y[head], Colour::SELECTHIGHLIGHT.rgba());
+ surface->drawPoint(x[head], y[head], Colour::SELECTHIGHLIGHT); // was rgba
MILLISLEEP(10);
}
}
createBuffer();\r
Colour transparent(0, 0, 0, 0);\r
setBackgroundColour(transparent);\r
-\r
+#ifdef PAL_WSS\r
dowss = false;\r
char* optionWSS = vdr->configLoad("General", "WSS");\r
if (optionWSS)\r
wssRegion.w = video->getScreenWidth();\r
wssRegion.h = 2;\r
}\r
- \r
+#endif\r
// This variable is set to true if the user pressed OK to bring the OSD on screen\r
// This is only used on old remotes to stop up/down buttons being used for osd-epg scrolling\r
okTriggeredOSD = false;\r
\r
case PlayerLiveTV::ASPECT43:\r
{\r
+#ifdef PAL_WSS\r
if ((video->getTVsize() == Video::ASPECT16X9) && dowss)\r
{\r
Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 43");\r
wss.draw();\r
BoxStack::getInstance()->update(this, &wssRegion);\r
}\r
+#endif\r
\r
sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT43;\r
sAspectRatio.setVisible(true);\r
}\r
case PlayerLiveTV::ASPECT169:\r
{\r
+#ifdef PAL_WSS\r
if ((video->getTVsize() == Video::ASPECT16X9) && dowss)\r
{\r
Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 169");\r
wss.draw();\r
BoxStack::getInstance()->update(this, &wssRegion);\r
}\r
+#endif\r
\r
sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT169;\r
sAspectRatio.setVisible(true);\r
#include "boxx.h"
#include "region.h"
-#include "wwss.h"
#include "vdr.h"
#include "wtextbox.h"
#include "wselectlist.h"
#include "wprogressbar.h"
#include "osdreceiver.h"
+#ifdef PAL_WSS
+#include "wwss.h"
+#endif
+
class VChannelList;
class Video;
class VChannelList;
void showUnavailable();
VAudioSelector* vas;
-
+#ifdef PAL_WSS
Wwss wss;
Region wssRegion;
bool dowss;
+#endif
Boxx osd;
WTextbox clock;
barGenHold = false;\r
barScanHold = false;\r
barVasHold = false;\r
-\r
+#ifdef PAL_WSS\r
dowss = false;\r
char* optionWSS = vdr->configLoad("General", "WSS");\r
if (optionWSS)\r
wssRegion.w = video->getScreenWidth();\r
wssRegion.h = 300;\r
}\r
+#endif\r
}\r
\r
void VVideoRec::preDelete()\r
}\r
case Player::ASPECT43:\r
{\r
+#ifdef PAL_WSS\r
if (dowss)\r
{\r
Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 43");\r
wss.draw();\r
boxstack->update(this, &wssRegion);\r
}\r
+#endif\r
break;\r
}\r
case Player::ASPECT169:\r
{\r
+#ifdef PAL_WSS\r
if (dowss)\r
{\r
Log::getInstance()->log("VVideoRec", Log::DEBUG, "Received do WSS 169");\r
wss.draw();\r
boxstack->update(this, &wssRegion);\r
}\r
+#endif\r
break;\r
}\r
}\r
#include "boxx.h"
#include "timerreceiver.h"
-#include "wwss.h"
#include "region.h"
#include "colour.h"
#include "osdreceiver.h"
#include "video.h"
+#ifdef PAL_WSS
+#include "wwss.h"
+#endif
+
class VDR;
class Timers;
class Player;
{
public:
VVideoRec(Recording* rec, bool ish264);
- ~VVideoRec();
+ virtual ~VVideoRec();
void preDelete();
int handleCommand(int command);
void go(bool resume);
UINT startMargin;
UINT endMargin;
-
+#ifdef PAL_WSS
Wwss wss;
Region wssRegion;
bool dowss;
+#endif
VInfo* vsummary;
};
int x, y, bytesIn, bitsIn;
- startFastDraw();
+ drawMonoBitmap(base,0,0,sHeight,widthBits, nextColour);
+ /* startFastDraw();
for (y = 0; y < sHeight; y++)
{
for (x = 0; x < widthBits; x++)
}
}
}
- endFastDraw();
+ endFastDraw();*/
}
bool WSymbol::mouseLBDOWN(int x, int y)
{
value = (UINT)(dst[q] * 182); // Apparently this is a better number than 255 for the colour value
c.set(value, value, value);
- drawPixel(q, 6, c);
+ getSurface()->drawPixel(q, 6, c);
}
}
{
value = (UINT)(dst[q] * 182); // Apparently this is a better number than 255 for the colour value
c.set(value, value, value);
- drawPixel(q, 6, c);
+ getSurface()->drawPixel(q, 6, c);
}
*/
{
value = (UINT)(dst[q] * 182); // Apparently this is a better number than 255 for the colour value
c.set(value, value, value);
- drawPixel(q+0, yy, c);
+ getSurface()->drawPixel(q+0, yy, c);
}
}
{
public:
Wwss();
- ~Wwss();
+ virtual ~Wwss();
void draw();
void setWide(bool wide);
void setFormat(UCHAR tformat);