boxstack->add(wallpaper);
boxstack->update(wallpaper);
+ OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+ if (osdv)
+ {
+ osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
+ }
+
}
mode=0;
aspect_correction=1.;
+ bcm_backres=NULL;
+
freetype_inited=false;
wait_id=1;
const char *fontname="Droid Sans:style=Regular";
uint32_t back_image_ptr;
bcm_backres=vc_dispmanx_resource_create(VC_IMAGE_RGBX32,16,16,&back_image_ptr);
- unsigned int color[16*16];
- DrawStyle bg=DrawStyle::WALLPAPER;
- if (bg.ft!=DrawStyle::GradientLinear) {
- bg.grad_col[0]=bg;
- }
- //memset(color,0xFF,sizeof(unsigned int)*4*8);
- for (int j=0;j<16;j++) {
- int helpr=(((15-j)*bg.red)+(j*bg.grad_col[0].red))/15;
- int helpb=(((15-j)*bg.blue)+(j*bg.grad_col[0].blue))/15;
- int helpg=(((15-j)*bg.green)+(j*bg.grad_col[0].green))/15;
- //unsigned int cur_col=help | (help<< 8) | (help<< 16) | (0xFF<< 24);
- unsigned int cur_col=helpr | (helpg<< (8)) | (helpb<< (16)) | (0xFF<< (24));
- for (int i=0;i<16;i++) {
- color[i+16*j]=cur_col;
- }
- }
- vc_dispmanx_resource_write_data(bcm_backres,VC_IMAGE_RGBX32,16*4,color,&src_rect_im);
+
+
+ updateBackgroundColor(DrawStyle::WALLPAPER);
+
+
DISPMANX_UPDATE_HANDLE_T bcm_update;
bcm_display=vc_dispmanx_display_open(0);
return 1;
}
+void OsdOpenVG::updateBackgroundColor(DrawStyle bg)
+{
+ unsigned int color[16*16];
+ if (!bcm_backres) return;
+ VC_RECT_T src_rect_im={0,0,16,16};
+
+ if (bg.ft!=DrawStyle::GradientLinear) {
+ bg.grad_col[0]=bg;
+ }
+ //memset(color,0xFF,sizeof(unsigned int)*4*8);
+ for (int j=0;j<16;j++) {
+ int helpr=(((15-j)*bg.red)+(j*bg.grad_col[0].red))/15;
+ int helpb=(((15-j)*bg.blue)+(j*bg.grad_col[0].blue))/15;
+ int helpg=(((15-j)*bg.green)+(j*bg.grad_col[0].green))/15;
+ //unsigned int cur_col=help | (help<< 8) | (help<< 16) | (0xFF<< 24);
+ unsigned int cur_col=helpr | (helpg<< (8)) | (helpb<< (16)) | (0xFF<< (24));
+ for (int i=0;i<16;i++) {
+ color[i+16*j]=cur_col;
+ }
+ }
+ vc_dispmanx_resource_write_data(bcm_backres,VC_IMAGE_RGBX32,16*4,color,&src_rect_im);
+}
+
void OsdOpenVG::getScreenSize(int &width, int &height)
{
width=BACKBUFFER_WIDTH;
vc_dispmanx_element_remove(bcm_update,bcm_background);
vc_dispmanx_update_submit_sync(bcm_update);
vc_dispmanx_resource_delete(bcm_backres);
+ bcm_backres=NULL;
vc_dispmanx_display_close(bcm_display);
bool getEGLPicture(struct OsdVector::PictureInfo & info, EGLDisplay * display);
+ void updateBackgroundColor(DrawStyle bg);
+
protected:
Surface * createNewSurface();
void Blank();
+ virtual void updateBackgroundColor(DrawStyle bg) {};
void updateOrAddSurface(const SurfaceVector *surf,float x,float y,float height,float width,
std::vector<SVGCommand>& commands);
-#endif
\ No newline at end of file
+#endif
seriesInfo = NULL;
movieID = 0;
seriesID =0;
-
vdr->getScraperEventType(fileName, movieID, seriesID, episodeID);
Log::getInstance()->log("Recording", Log::DEBUG, "Got Scraper EventType %d %d %d",
movieID, seriesID, episodeID);
setSize(video->getScreenWidth(), video->getScreenHeight());
createBuffer();
+ transparent.set(0, 0, 0, 0);
+ setBackgroundColour(transparent);
setPosition(0, 0);
barRegion.x = 0;
clocksRegion.h = getFontHeight();
- barBlue.set(0, 0, 150, 150);
+ barBlue.set(0, 0, 0, 128);
barShowing = false;
}
void VRadioRec::draw()
{
- fillColour(DrawStyle::BLACK);
+ fillColour(transparent);
}
void VRadioRec::go()
if (!barShowing) return;
timers->cancelTimer(this, 2);
barShowing = false;
- rectangle(barRegion, DrawStyle::BLACK);
+ rectangle(barRegion, transparent);
boxstack->update(this, &barRegion);
}
BoxStack* boxstack;
DrawStyle barBlue;
+ DrawStyle transparent;
bool playing;
bool barShowing;
delete player;
video->setDefaultAspect();
delData();
+ OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+ if (osdv)
+ {
+ osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
+ }
}
void VVideoLiveTV::delData()
}
#endif
+ OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+ if (osdv)
+ {
+ osdv->updateBackgroundColor(DrawStyle::BLACK);
+ }
+
sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT43;
sAspectRatio.setVisible(true);
sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT169;
sAspectRatio.setVisible(true);
+ OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+ if (osdv)
+ {
+ osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
+ }
+
+
if (osd.getVisible()) // don't wake up the whole osd just for a aspect change
{
osd.draw();
transparent.set(0, 0, 0, 0);
setBackgroundColour(transparent);
+ OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+ if (osdv)
+ {
+ osdv->updateBackgroundColor(DrawStyle::BLACK);
+ }
+
barRegion.x = 0;
barRegion.y = video->getScreenHeight() - 58; // FIXME, need to be - 1? and below?
barRegion.w = video->getScreenWidth();
myRec->dropRecInfo();
// FIXME - do this properly - save the resume point back to the server manually and update
// rec->recInfo->resumePoint - this will fix the ~10s offset problem as well
+
+ OsdVector* osdv=dynamic_cast<OsdVector*>(Osd::getInstance());
+ if (osdv)
+ {
+ osdv->updateBackgroundColor(DrawStyle::WALLPAPER);
+ }
}
void VVideoRec::go(bool resume)