Jon Gettler, BtB and the other MVPMC developers
Dominic Morris for the vdr-mediamvp VDR plugin
+Thanks to Louis Braun for his skinnoopacity plugin, where
+a lot of the artwork for the new skin of vomp is borrowed from.
This list is most likely incomplete. Apologies to anyone
I have forgotten, and for forgetting to update this list.
OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o
OBJECTS = $(OBJECTS1)
+PICTURES = -Wl,--format=binary
+PICTURES += -Wl,other/vdrhires.png
+PICTURES += -Wl,other/wallpaper720p.jpg
+PICTURES += -Wl,other/properties.png
+PICTURES += -Wl,other/radio.png
+PICTURES += -Wl,other/timers.png
+PICTURES += -Wl,other/tv.png
+PICTURES += -Wl,other/recordings.png
+PICTURES += -Wl,other/restart.png
+PICTURES += -Wl,--format=default
+
+
+
ifeq ($(vomp_platform),mvp)
$(info MVP flags)
ifeq ($(vomp_platform),raspberry)
$(info Raspberry pi flags)
-LDFLAGS = -Wall -Wl,--format=binary -Wl,other/vdrhires.jpg -Wl,other/wallpaper720p.jpg -Wl,--format=default
+LDFLAGS = -Wall $(PICTURES)
LIBS = -L/opt/vc/lib -lpthread -lrt -lEGL -lOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil -lavresample
OBJECTS += main.o threadp.o osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o imageomx.o wjpegsimple.o remotelinux.o
ifeq ($(vomp_platform),crossraspberry)
$(info Raspberry pi flags cross compiler)
-LDFLAGS = -Wall -Wl,--format=binary -Wl,other/vdrhires.jpg -Wl,other/wallpaper720p.jpg -Wl,--format=default -Wl,--verbose -Xlinker --rpath-link=rpi-root/usr/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/opt/vc/lib
+LDFLAGS = -Wall $(PICTURES) -Wl,--verbose -Xlinker --rpath-link=rpi-root/usr/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/opt/vc/lib
LIBS = -Lrpi-root/opt/vc/lib -Lrpi-root/lib -Lrpi-root/usr/lib -Lrpi-root/lib/arm-linux-gnueabihf -Lrpi-root/usr/lib/arm-linux-gnueabihf -Lrpi-root/usr/local/lib -lpthread -lrt -lEGL -lOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil -lavresample -ldl -lfontconfig
OBJECTS += main.o threadp.o osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o imageomx.o wjpegsimple.o remotelinux.o
#include "boxstack.h"
#include "log.h"
#include "vsleeptimer.h"
+#include "wjpeg.h"
Command* Command::instance = NULL;
}
case Message::NEW_PICTURE:
{
- Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE");
+ //Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE");
OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (osdv) {
osdv->informPicture(m->tag,m->parameter);
} break;
case Message::NEW_PICTURE_STATIC:
{
+ //Log::getInstance()->log("Command", Log::DEBUG, "TVMedia NEW_PICTURE %x %x",m->tag,m->parameter);
OsdVector *osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
if (osdv) {
- osdv->informPicture(((long long)m->tag)<<32LL,m->parameter);
+ osdv->informPicture(((unsigned long long)m->tag)<<32LL,m->parameter);
}
} break;
float tx=command.x;
float ty=command.y;
if (command.corner == TopLeftLimited) {
- if (imagewidth>imageheight && scalex!=0.f) {
- scaley=0.f;
- ty+=(command.h-imageheight * scalex/aspect_correction)*0.5f;
- }
- if (imagewidth<imageheight && scaley!=0.f) {
- scalex=0.f;
- tx+=(command.w-imagewidth * scaley*aspect_correction)*0.5f;
+ if (scalex !=0.f && scaley !=0.f) {
+ float imageaspect=imagewidth/imageheight;
+ float boxaspect=command.w/command.h/aspect_correction;
+ if (imageaspect > boxaspect) {
+ scaley=0.f;
+ ty+=(command.h-imageheight * scalex/aspect_correction)*0.5f;
+ } else {
+ scalex=0.f;
+ tx+=(command.w-imagewidth * scaley*aspect_correction)*0.5f;
+ }
+
}
+
}
if (scalex==0.f && scaley==0.f) {
scalex=aspect_correction;
m->message=Message::NEW_PICTURE_STATIC;
m->tag = info->lindex>> 32LL;
}
- m->tag = info->lindex;
Command::getInstance()->postMessageFromOuterSpace(m); // inform command about new picture
delete info;
eglDestroyImageKHR(egl_display,info->reference);
bool static_image=true;
if (info->lindex & 0xffffffff) static_image=false;
-
Message* m = new Message();
m->from=this;
m->to=Command::getInstance();
vgSetColor(handle,command.param1);
VGuint rgba;
rgba = vgGetColor((VGPaint)handle);
- Log::getInstance()->log("OSD", Log::DEBUG, "Draw Paint %d %x %x",handle,command.param1,rgba);
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Draw Paint %d %x %x",handle,command.param1,rgba);
} break;
case DrawStyle::GradientLinear: {
vgSetParameteri(handle, VG_PAINT_TYPE, VG_PAINT_TYPE_LINEAR_GRADIENT);
VGfloat params[]={style->x1,style->y1,style->x2,style->y2,style->r};
- Log::getInstance()->log("OSD", Log::DEBUG, "Draw Gradient %d %g %g %g %g",handle,params[0],params[1],params[2],params[3]);
+ //Log::getInstance()->log("OSD", Log::DEBUG, "Draw Gradient %d %g %g %g %g",handle,params[0],params[1],params[2],params[3]);
vgSetParameterfv(handle,VG_PAINT_LINEAR_GRADIENT,4,params);
void OsdOpenVG::createPicture(struct PictureInfo& pict_inf)
{
struct OpenVGCommand comm;
+ Log::getInstance()->log("OsdOpenVG", Log::DEBUG, "TVMedia Create Picture %d",pict_inf.type);
if (pict_inf.type == PictureInfo::RGBAMemBlock) {
comm.task = OVGcreateImageMemory;
comm.data = new PictureInfo(pict_inf);
+All png's are extracted from the skinnoopacity plugin by Louis Braun, which is
+also subject to GPL v2 like vomp.
+
+Other artwork:
+
+vdrhires.png and
vdr.jpg is lifted from VDR's home page which states:
"Free project statement This is a FREE and completely non-commercial project.
Any information posted on these pages is freely available to anybody. All
------------------------------------------------------------------
-wallpaper.jpg is actually blue-bend.jpg from the KDE wallpapers.
+wallpaper.jpg and the high resolution version is actually blue-bend.jpg
+from the KDE wallpapers.
It was taken from the debian package kdebase-data - the copyright
file is below.
#define STATIC_ARTWORK_H
#define EXTERNAL_PICTS \
- EXTERNALPICTURE(vdrlogo, vdrhires, jpg) \
- EXTERNALPICTURE(wallpaper, wallpaper720p, jpg)
+ EXTERNALPICTURE(vdrlogo, vdrhires, png) \
+ EXTERNALPICTURE(wallpaper, wallpaper720p, jpg) \
+ EXTERNALPICTURE(properties, properties, png) \
+ EXTERNALPICTURE(radio, radio, png) \
+ EXTERNALPICTURE(recordings, recordings, png) \
+ EXTERNALPICTURE(restart, restart, png) \
+ EXTERNALPICTURE(timers, timers, png) \
+ EXTERNALPICTURE(tv, tv, png)
+
#define EXTERNALPICTURE(name, fname, fileextension) sa_ ## name,
typedef enum tStaticArtwork
{
+ sa_None,
EXTERNAL_PICTS
sa_MAX
} StaticArtwork;
borderOn = 0;
titleText = NULL;
titleBarTextWidth = 0;
+ icon = NULL;
}
TBBoxx::~TBBoxx()
{
if (titleText) delete[] titleText;
+ if (icon) delete icon;
}
void TBBoxx::setTitleText(const char* takeText, int width)
if (titleBarOn)
{
rectangle(0, 0, area.w, 30, titleBarColour);
+ int xpos = 5;
+#ifdef GRADIENT_DRAWING
+ if (icon) {
+ drawTVMedia(*icon, xpos,0,30,30,TopLeftLimited);
+ xpos+=5+30;
+ }
+#endif
if (titleText)
{
- if (titleBarTextWidth) drawText(titleText, 5, 5, titleBarTextWidth, DrawStyle::LIGHTTEXT);
- else drawText(titleText, 5, 5, DrawStyle::LIGHTTEXT);
+ if (titleBarTextWidth) drawText(titleText, xpos, 5, titleBarTextWidth+5-xpos, DrawStyle::LIGHTTEXT);
+ else drawText(titleText, xpos, 5, DrawStyle::LIGHTTEXT);
}
}
titleBarColour = Tcolour;
}
+void TBBoxx::setTitleBarIcon(TVMediaInfo * ticon)
+{
+ if (icon) delete icon;
+ icon = ticon;
+}
+
void TBBoxx::setTitleBarOn(UCHAR on)
{
titleBarOn = on;
void setTitleText(const char* title, int width=0);
void setTitleBarColour(const DrawStyle& colour);
+ void setTitleBarIcon(TVMediaInfo * icon);
char* getTitleText() { return titleText; };
private:
protected:
DrawStyle titleBarColour;
UCHAR titleBarOn;
+ TVMediaInfo *icon;
};
#endif
#include "message.h"
#include "boxstack.h"
#include "vchannelselect.h"
+#include "staticartwork.h"
VChannelList::VChannelList(ULONG type)
{
if (type == VDR::VIDEO)
{
setTitleText(tr("Channels"));
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setStaticArtwork(sa_tv);
+ setTitleBarIcon(info);
}
else if (type == VDR::RADIO)
{
setTitleText(tr("Radio Stations"));
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setStaticArtwork(sa_radio);
+ setTitleBarIcon(info);
}
setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
#include "vepgsummary.h"
#include "vepgsettimer.h"
#include "vepg.h"
+#include "staticartwork.h"
#include <sstream>
setTitleBarOn(1);
setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setChannelLogo(channelNumber);
+ setTitleBarIcon(info);
sl.setPosition(10, 30 + 5);
sl.setSize(area.w*42/100 - 20, area.h - 30 - 15 - 30);
mode=Next;
updateEpgDataNowNext(true);
setButtonText();
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setStaticArtwork(sa_tv);
+ setTitleBarIcon(info);
draw(true);
boxstack->update(this);
}
mode=Now;
updateEpgDataNowNext(true);
setButtonText();
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setStaticArtwork(sa_tv);
+ setTitleBarIcon(info);
draw(true);
boxstack->update(this);
}
channelNumber = chan->number;
updateEpgDataChannel();
setButtonText();
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setChannelLogo(channelNumber);
+ setTitleBarIcon(info);
draw(true);
boxstack->update(this);
}
TBBoxx::draw();
- TVMediaInfo info;
- info.setChannelLogo(channelNumber);
+
+
time(&now);
btime = localtime(&now);
strftime(freeSpace, 299, "%d/%m/%y", btime);
- if (mode == OneChannel) {
- drawTVMedia(info,getWidth(),0.f,0,30.f,TopRight);
- drawTextRJ(freeSpace, getWidth()-30, 5, DrawStyle::LIGHTTEXT);
- } else {
- drawTextRJ(freeSpace, getWidth(), 5, DrawStyle::LIGHTTEXT);
- }
+
+ drawTextRJ(freeSpace, getWidth(), 5, DrawStyle::LIGHTTEXT);
+
// Symbols
WSymbol w;
{
updateEpgData();
int channel=0;
+ if (mode==OneChannel) {
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setChannelLogo(channelNumber);
+ setTitleBarIcon(info);
+ }
Event* toShow = getCurrentOptionEvent(channel);
if (toShow)
{
#include "option.h"
#include "vdr.h"
#include "command.h"
+#include "staticartwork.h"
#ifdef VOMP_PLATTFORM_MVP
#include "mediaoptions.h"
setTitleBarOn(1);
setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
setTitleText(tr("Options"));
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setStaticArtwork(sa_properties);
+ setTitleBarIcon(info);
setSize(520, 360);
#include "timers.h"
#include "vquestion.h"
#include "command.h"
+#include "staticartwork.h"
VTimerEdit::VTimerEdit(RecTimer* trt)
{
setTitleBarOn(1);
setTitleText(tr("Edit Timer"));
setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setStaticArtwork(sa_timers);
+ setTitleBarIcon(info);
}
VTimerEdit::~VTimerEdit()
#include "vdr.h"
#include "vinfo.h"
#include "log.h"
+#include "staticartwork.h"
VTimerList::VTimerList()
{
setTitleBarOn(1);
setTitleText(tr("Timers"));
setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setStaticArtwork(sa_timers);
+ setTitleBarIcon(info);
sl.setPosition(30, 30 + 5);
sl.setSize(area.w - 40, area.h - 30 - 15 - 30);
void VTimerList::drawClock()
{
// Blank the area first
+#ifndef GRADIENT_DRAWING
rectangle(area.w - 150, 0, 150, 30, titleBarColour);
+#endif
char timeString[20];
time_t t;
void VTimerList::timercall(int clientReference)
{
+ flipflop = !flipflop;
+#ifndef GRADIENT_DRAWING
drawClock();
BoxStack::getInstance()->update(this, &clockRegion);
- flipflop = !flipflop;
drawIndicators();
BoxStack::getInstance()->update(this, &indicatorsRegion);
+#else
+ draw();
+ BoxStack::getInstance()->update(this);
+#endif
}
int VTimerList::handleCommand(int command)
#include "vmedialist.h"
#include "boxstack.h"
#include "vopts.h"
+#include "staticartwork.h"
#include "log.h"
clockRegion.w = 60;
clockRegion.h = 30;
+#ifndef GRADIENT_DRAWING
setSize(460, 220);
createBuffer();
if (Video::getInstance()->getFormat() == Video::PAL)
{
setPosition(130, 140);
}
+#else
+ setSize(460, 240);
+ createBuffer();
+ setPosition(140, 150);
+#endif
setTitleBarOn(1);
setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
+
+#ifndef GRADIENT_DRAWING
+ jpeg.setPosition(240, 60);
+#ifndef _MIPS_ARCH
+ jpeg.init("/vdr.jpg");
+#else
+ jpeg.init("vdr.jpg");
+#endif
+ add(&jpeg);
+#else
+ vdr.setPosition(250, 65);
+ vdr.setSize(180, 160);
+ TVMediaInfo sinfo;
+ sinfo.setStaticArtwork(sa_vdrlogo);
+ vdr.setTVMedia(sinfo, WTVMedia::ZoomHorizontal);
+ add(&vdr);
+
+#endif
+
sl.setPosition(20, 40);
+#ifdef GRADIENT_DRAWING
+ sl.addColumn(0);
+ sl.addColumn(25);
+ sl.setLinesPerOption(1.5f);
+ sl.setSize(200, 200);
+#else
sl.setSize(200, 160);
+#endif
add(&sl);
setTitleText(tr("Welcome"));
- sl.addOption(tr("1. Live TV"), 1, 1);
- sl.addOption(tr("2. Radio"), 2, 0);
- sl.addOption(tr("3. Recordings"), 3, 0);
- sl.addOption(tr("4. Timers"), 4, 0);
+
+
+ TVMediaInfo *info= new TVMediaInfo();
+ info->setStaticArtwork(sa_tv);
+ sl.addOption(tr("1. Live TV"), 1, 1,info);
+
+ info= new TVMediaInfo();
+ info->setStaticArtwork(sa_radio);
+ sl.addOption(tr("2. Radio"), 2, 0,info);
+
+ info= new TVMediaInfo();
+ info->setStaticArtwork(sa_recordings);
+ sl.addOption(tr("3. Recordings"), 3, 0,info);
+
+ info= new TVMediaInfo();
+ info->setStaticArtwork(sa_timers);
+ sl.addOption(tr("4. Timers"), 4, 0,info);
#ifdef VOMP_PLATTFORM_MVP
sl.addOption(tr("5. MediaPlayer"), 5, 0);
#endif
- sl.addOption(tr("6. Options"), 6, 0);
+ info= new TVMediaInfo();
+ info->setStaticArtwork(sa_properties);
+ sl.addOption(tr("6. Options"), 6, 0,info);
+
+ info= new TVMediaInfo();
+ info->setStaticArtwork(sa_restart);
#ifndef VOMP_HAS_EXIT
- sl.addOption(tr("7. Reboot"), 7, 0);
+ sl.addOption(tr("7. Reboot"), 7, 0,info);
#else
- sl.addOption(tr("7. Exit"), 7, 0);
+ sl.addOption(tr("7. Exit"), 7, 0,info);
#endif
- jpeg.setPosition(240, 60);
-#ifndef _MIPS_ARCH
- jpeg.init("/vdr.jpg");
-#else
- jpeg.init("vdr.jpg");
-#endif
- add(&jpeg);
+
}
void VWelcome::preDelete()
#include "tbboxx.h"
#include "timerreceiver.h"
#include "wselectlist.h"
+#ifndef GRADIENT_DRAWING
#include "wjpeg.h"
+#else
+#include "wtvmedia.h"
+#endif
+
#include "region.h"
#include "defines.h"
private:
WSelectList sl;
+#ifndef GRADIENT_DRAWING
WJpegTYPE jpeg;
+#else
+ WTVMedia vdr;
+#endif
BoxStack* boxstack;
float ypos_mod= ypos + (linesPerOption-floor(linesPerOption))*((float)fontHeight)*0.5f;
int imagewidth=0;
+ int xposmod=xpos;
if (numColumns>1) imagewidth=columns[1]-columns[0];
if (pict)
{
drawTVMedia(*pict, xpos,ypos,imagewidth,fontHeight*linesPerOption,TopLeftLimited);
taboffset++;
+ xposmod+=xpos;
}
if (!numColumns && linesPerOption == 1)
pointer = strtok(buffer, "\t\n");
while(pointer)
{
- drawText(pointer, xpos + columns[currentColumn], ypos_mod + curline * fontHeight, width - columns[currentColumn], colour);
+ drawText(pointer, xposmod + columns[currentColumn], ypos_mod + curline * fontHeight, width - columns[currentColumn], colour);
pointer = strtok(NULL, "\t\n");
if (pointer) {