}
epgTVmedia.setPosition(summary->getRegionR().w-130-10,0);
- epgTVmedia.setSize(130,(UINT)(195/Osd::getInstance()->getPixelAspect()));
+ epgTVmedia.setSize(130, static_cast<UINT>(195 / Osd::getInstance()->getPixelAspect()));
summary->add(&epgTVmedia);
if (movieview) movieview->add(&epgTVmedia);
if (seriesview) seriesview->add(&epgTVmedia);
int x = m->parameter - getScreenX();
int y = m->tag - getScreenY();
- if ((boxRed.getX() <= x) && (boxRed.getX() + (int)boxRed.getWidth() >= x) &&
- (boxRed.getY() <= y) && (boxRed.getY() + (int)boxRed.getHeight() >= y)) {
+ if ((boxRed.getX() <= x) && (boxRed.getX() + static_cast<int>(boxRed.getWidth()) >= x) &&
+ (boxRed.getY() <= y) && (boxRed.getY() + static_cast<int>(boxRed.getHeight()) >= y)) {
BoxStack::getInstance()->handleCommand(Input::RED);
cancel = false;
}
player = new PlayerVideoRec(Control::getInstance(), this, this);
player->init(myRec->IsPesRecording,myRec->recInfo->fps);
- char* cstartMargin = vdr->configLoad("Timers", "Start margin");
+ char* cstartMargin = vdr->configLoad("Timers", "Start margin"); // NCONFIG
char* cendMargin = vdr->configLoad("Timers", "End margin");
if (!cstartMargin)
{
// skip to previous mark
Log* logger = Log::getInstance();
int currentFrame = (player->getCurrentFrameNum()); // get current Frame
- currentFrame -= (int)(5. * myRec->recInfo->fps); // subtrack 5 seconds, else you cannot skip more than once back ..
+ currentFrame -= static_cast<int>(5 * myRec->recInfo->fps); // subtrack 5 seconds, else you cannot skip more than once back ..
int prevMark = myRec->getPrevMark(currentFrame); // find previous Frame
if (prevMark)
{
// chasing playback
// Work out an approximate length in frames (good to 1s...)
- lengthFrames = (ULONG)((double)(myRec->recInfo->timerEnd - myRec->recInfo->timerStart) * myRec->recInfo->fps);
+ lengthFrames = static_cast<ULONG>((myRec->recInfo->timerEnd - myRec->recInfo->timerStart) * myRec->recInfo->fps);
}
else
{
&& y<=barRegion.y + 12 - 2+28)
{
int cx=x-(barRegion.x + progBarXbase + 4);
- double percent=((double)cx)/302.*100.;
+ double percent = cx / 302. * 100.;
player->jumpToPercent(percent);
doBar(3);
return;
{
// chasing playback
// Work out an approximate length in frames (good to 1s...)
- lengthFrames =(ULONG) ((double)(myRec->recInfo->timerEnd - myRec->recInfo->timerStart) * myRec->recInfo->fps);
+ lengthFrames = static_cast<ULONG>((myRec->recInfo->timerEnd - myRec->recInfo->timerStart) * myRec->recInfo->fps);
}
else
{
if (myRec->recInfo->timerEnd > time(NULL)) // if chasing
{
- int nrWidth = (int)(302 * ((double)(lengthFrames - player->getLengthFrames()) / lengthFrames));
+ int nrWidth = 302 * (lengthFrames - player->getLengthFrames()) / lengthFrames;
Log::getInstance()->log("GVASDF", Log::DEBUG, "Length Frames: %lu", lengthFrames);
Log::getInstance()->log("GVASDF", Log::DEBUG, "Player lf: %lu", player->getLengthFrames());
{
// Draw blips where start and end margins probably are
- posPix =(int) (302. * myRec->recInfo->fps * ((double)startMargin) /((double) lengthFrames));
+ posPix = static_cast<int>(302 * startMargin * myRec->recInfo->fps / lengthFrames);
rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, DrawStyle::LIGHTTEXT);
rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, DrawStyle::LIGHTTEXT);
- posPix = (int)(302. * ((double)lengthFrames - ((double)endMargin) * myRec->recInfo->fps) / ((double)lengthFrames));
+ posPix = static_cast<int>(302 * (lengthFrames - endMargin * myRec->recInfo->fps) / lengthFrames);
rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, DrawStyle::LIGHTTEXT);
rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, DrawStyle::LIGHTTEXT);
void VVideoRec::clearOSDArea(UINT posX, UINT posY, UINT width, UINT height, const DisplayRegion& region)
{
- Region r;
- r.x = posX+region.windowx; r.y = posY+region.windowy; r.w = width; r.h = height;
+ Region r(r.x = posX + region.windowx, posY + region.windowy, width, height);
//now convert to our display
- float scalex=720.f/((float) (region.framewidth+1));
- float scaley=576.f/((float) (region.frameheight+1));
- r.x=(UINT)floor(scalex*((float)r.x));
- r.y=(UINT)floor(scaley*((float)r.y));
- r.w=(UINT)(ceil(scalex*((float)r.w))+1.f);
- r.h=(UINT)(ceil(scaley*((float)r.h))+1.f);
+ float scalex = 720.f / static_cast<float>(region.framewidth + 1);
+ float scaley = 576.f / static_cast<float>(region.frameheight + 1);
+ r.x = static_cast<UINT>(floor(scalex * static_cast<float>(r.x)));
+ r.y = static_cast<UINT>(floor(scaley * static_cast<float>(r.y)));
+ r.w = static_cast<UINT>(ceil(scalex * static_cast<float>(r.w)) + 1.f);
+ r.h = static_cast<UINT>(ceil(scaley * static_cast<float>(r.h)) + 1.f);
rectangle(r, transparent);
boxstack->update(this, &r);