mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
Merge branch 'master' into pu/fb-setmode
Origin commit data
------------------
Commit: d76c9c536c
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-02-20 (Mon, 20 Feb 2017)
This commit is contained in:
@@ -5595,7 +5595,7 @@ void CopyBB2FB()
|
|||||||
{
|
{
|
||||||
fb_pixel_t *src, *dst, *topsrc;
|
fb_pixel_t *src, *dst, *topsrc;
|
||||||
int fillcolor, i, screenwidth, swtmp;
|
int fillcolor, i, screenwidth, swtmp;
|
||||||
#ifdef HAVE_SPARK_HARDWARE
|
#if defined(HAVE_SPARK_HARDWARE) || defined(BOXMODEL_CS_HD2)
|
||||||
CFrameBuffer *f = CFrameBuffer::getInstance();
|
CFrameBuffer *f = CFrameBuffer::getInstance();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -5620,6 +5620,8 @@ void CopyBB2FB()
|
|||||||
#else
|
#else
|
||||||
#ifdef HAVE_SPARK_HARDWARE
|
#ifdef HAVE_SPARK_HARDWARE
|
||||||
f->blit2FB(lbb, var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, 0, true);
|
f->blit2FB(lbb, var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, 0, true);
|
||||||
|
#elif defined BOXMODEL_CS_HD2
|
||||||
|
f->fbCopyArea(var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, var_screeninfo.yres);
|
||||||
#else
|
#else
|
||||||
if ((uint32_t)stride > var_screeninfo.xres) {
|
if ((uint32_t)stride > var_screeninfo.xres) {
|
||||||
fb_pixel_t *lfb_ = lfb;
|
fb_pixel_t *lfb_ = lfb;
|
||||||
@@ -5678,12 +5680,16 @@ void CopyBB2FB()
|
|||||||
if (screenmode == 1)
|
if (screenmode == 1)
|
||||||
{
|
{
|
||||||
screenwidth = ( TV43STARTX );
|
screenwidth = ( TV43STARTX );
|
||||||
#ifdef HAVE_SPARK_HARDWARE
|
#if defined(HAVE_SPARK_HARDWARE) || defined(BOXMODEL_CS_HD2)
|
||||||
int cx = var_screeninfo.xres - TV43STARTX; /* x start */
|
int cx = var_screeninfo.xres - TV43STARTX; /* x start */
|
||||||
int cw = TV43STARTX; /* width */
|
int cw = TV43STARTX; /* width */
|
||||||
int cy = StartY;
|
int cy = StartY;
|
||||||
int ch = 24*fontheight;
|
int ch = 24*fontheight;
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SPARK_HARDWARE
|
||||||
f->blit2FB(lbb, cw, ch, cx, cy, cx, cy, true);
|
f->blit2FB(lbb, cw, ch, cx, cy, cx, cy, true);
|
||||||
|
#elif defined BOXMODEL_CS_HD2
|
||||||
|
f->fbCopyArea(cw, ch, cx, cy, cx, cy+var_screeninfo.yres);
|
||||||
#else
|
#else
|
||||||
fb_pixel_t *topdst = dst;
|
fb_pixel_t *topdst = dst;
|
||||||
size_t width = (ex - screenwidth) * sizeof(fb_pixel_t);
|
size_t width = (ex - screenwidth) * sizeof(fb_pixel_t);
|
||||||
|
@@ -100,6 +100,7 @@ class CFbAccelCSHD1
|
|||||||
inline void paintHLineRel(int x, int dx, int y, const fb_pixel_t col) { paintLine(x, y, x+dx, y, col); };
|
inline void paintHLineRel(int x, int dx, int y, const fb_pixel_t col) { paintLine(x, y, x+dx, y, col); };
|
||||||
inline void paintVLineRel(int x, int y, int dy, const fb_pixel_t col) { paintLine(x, y, x, y+dy, col); };
|
inline void paintVLineRel(int x, int y, int dy, const fb_pixel_t col) { paintLine(x, y, x, y+dy, col); };
|
||||||
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
||||||
|
void fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y);
|
||||||
void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
||||||
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||||
void waitForIdle(const char *func = NULL);
|
void waitForIdle(const char *func = NULL);
|
||||||
@@ -124,6 +125,7 @@ class CFbAccelCSHD2
|
|||||||
void paintHLineRel(int x, int dx, int y, const fb_pixel_t col);
|
void paintHLineRel(int x, int dx, int y, const fb_pixel_t col);
|
||||||
void paintVLineRel(int x, int y, int dy, const fb_pixel_t col);
|
void paintVLineRel(int x, int y, int dy, const fb_pixel_t col);
|
||||||
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL);
|
||||||
|
void fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y);
|
||||||
void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
||||||
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||||
fb_pixel_t * getBackBufferPointer() const;
|
fb_pixel_t * getBackBufferPointer() const;
|
||||||
|
@@ -262,6 +262,17 @@ void CFbAccelCSHD1::paintBoxRel(const int x, const int y, const int dx, const in
|
|||||||
checkFbArea(x, y, dx, dy, false);
|
checkFbArea(x, y, dx, dy, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CFbAccelCSHD1::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y)
|
||||||
|
{
|
||||||
|
uint32_t w_, h_;
|
||||||
|
w_ = (width > xRes) ? xRes : width;
|
||||||
|
h_ = (height > yRes) ? yRes : height;
|
||||||
|
|
||||||
|
//printf("\033[33m>>>>\033[0m [CFbAccelCSHD1::%s:%d] fb_copyarea w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func__, __LINE__, w_, h_, dst_x, dst_y, src_x, src_y);
|
||||||
|
printf("\033[31m>>>>\033[0m [CFbAccelCSHD1::%s:%d] sw blit w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func__, __LINE__, w_, h_, dst_x, dst_y, src_x, src_y);
|
||||||
|
CFrameBuffer::fbCopyArea(width, height, dst_x, dst_y, src_x, src_y);
|
||||||
|
}
|
||||||
|
|
||||||
void CFbAccelCSHD1::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
void CFbAccelCSHD1::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
||||||
{
|
{
|
||||||
int xc, yc;
|
int xc, yc;
|
||||||
|
@@ -141,6 +141,28 @@ void CFbAccelCSHD2::paintBoxRel(const int x, const int y, const int dx, const in
|
|||||||
checkFbArea(x, y, dx, dy, false);
|
checkFbArea(x, y, dx, dy, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CFbAccelCSHD2::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y)
|
||||||
|
{
|
||||||
|
uint32_t w_, h_;
|
||||||
|
w_ = (width > xRes) ? xRes : width;
|
||||||
|
h_ = (height > yRes) ? yRes : height;
|
||||||
|
|
||||||
|
if(!(w_%4)) {
|
||||||
|
fb_copyarea area;
|
||||||
|
area.dx = dst_x;
|
||||||
|
area.dy = dst_y;
|
||||||
|
area.width = w_;
|
||||||
|
area.height = h_;
|
||||||
|
area.sx = src_x;
|
||||||
|
area.sy = src_y;
|
||||||
|
ioctl(fd, FBIO_COPY_AREA, &area);
|
||||||
|
//printf("\033[33m>>>>\033[0m [CFbAccelCSHD2::%s:%d] fb_copyarea w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func__, __LINE__, w_, h_, dst_x, dst_y, src_x, src_y);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//printf("\033[31m>>>>\033[0m [CFbAccelCSHD2::%s:%d] sw blit w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func__, __LINE__, w_, h_, dst_x, dst_y, src_x, src_y);
|
||||||
|
CFrameBuffer::fbCopyArea(width, height, dst_x, dst_y, src_x, src_y);
|
||||||
|
}
|
||||||
|
|
||||||
void CFbAccelCSHD2::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
void CFbAccelCSHD2::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp)
|
||||||
{
|
{
|
||||||
int xc, yc;
|
int xc, yc;
|
||||||
|
@@ -1593,6 +1593,62 @@ void * CFrameBuffer::convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, uns
|
|||||||
return int_convertRGB2FB(rgbbuff, x, y, 0, true);
|
return int_convertRGB2FB(rgbbuff, x, y, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CFrameBuffer::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y)
|
||||||
|
{
|
||||||
|
uint32_t w_, h_, i;
|
||||||
|
fb_pixel_t *fromBuf = NULL, *toBuf = NULL;
|
||||||
|
fb_pixel_t *dst_p, *src_p;
|
||||||
|
fb_pixel_t * fbp = getFrameBufferPointer();
|
||||||
|
fb_pixel_t * bbp = getBackBufferPointer();
|
||||||
|
w_ = (width > xRes) ? xRes : width;
|
||||||
|
h_ = (height > yRes) ? yRes : height;
|
||||||
|
|
||||||
|
if ((src_y < yRes) && (dst_y < yRes)) { /* copy within framebuffer */
|
||||||
|
fromBuf = fbp;
|
||||||
|
toBuf = fbp;
|
||||||
|
}
|
||||||
|
else if ((src_y >= yRes) && (dst_y >= yRes)) { /* copy within backbuffer */
|
||||||
|
fromBuf = bbp;
|
||||||
|
toBuf = bbp;
|
||||||
|
dst_y -= yRes;
|
||||||
|
src_y -= yRes;
|
||||||
|
}
|
||||||
|
else if (src_y >= yRes) { /* copy backbuffer => framebuffer */
|
||||||
|
fromBuf = bbp;
|
||||||
|
toBuf = fbp;
|
||||||
|
src_y -= yRes;
|
||||||
|
}
|
||||||
|
else if (dst_y >= yRes) { /* copy framebuffer => backbuffer */
|
||||||
|
fromBuf = fbp;
|
||||||
|
toBuf = bbp;
|
||||||
|
dst_y -= yRes;
|
||||||
|
}
|
||||||
|
if ((fromBuf == NULL) || (toBuf == NULL)) {
|
||||||
|
//printf(">>>>> [%s:%d] buff = NULL\n", __func__, __LINE__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((src_x == dst_x) && (src_y == dst_y) && (fromBuf == toBuf)) { /* self copy? */
|
||||||
|
//printf(">>>>> [%s:%d] self copy?\n", __func__, __LINE__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dst_p = toBuf + dst_y*stride/sizeof(fb_pixel_t);
|
||||||
|
src_p = fromBuf + src_y*stride/sizeof(fb_pixel_t);
|
||||||
|
if ((w_ == xRes) && (stride == (xRes*sizeof(fb_pixel_t)))) { /* copy full width */
|
||||||
|
//printf(">>>>> [%s:%d] copy full width - dst_p: %p, src_p: %p\n", __func__, __LINE__, dst_p, src_p);
|
||||||
|
memcpy(dst_p, src_p, w_*h_*sizeof(fb_pixel_t));
|
||||||
|
}
|
||||||
|
else { /* copy all other */
|
||||||
|
//printf(">>>>> [%s:%d] copy all other - dst_p: %p, src_p: %p\n", __func__, __LINE__, dst_p, src_p);
|
||||||
|
uint32_t wMem = w_*sizeof(fb_pixel_t);
|
||||||
|
for (i = 0; i < h_; i++) {
|
||||||
|
memcpy(dst_p+dst_x, src_p+src_x, wMem);
|
||||||
|
dst_p += stride/sizeof(fb_pixel_t);
|
||||||
|
src_p += stride/sizeof(fb_pixel_t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool /*transp*/)
|
void CFrameBuffer::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool /*transp*/)
|
||||||
{
|
{
|
||||||
int xc, yc;
|
int xc, yc;
|
||||||
|
@@ -273,6 +273,7 @@ class CFrameBuffer : public sigc::trackable
|
|||||||
void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, int transp = 0xFF);
|
void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, int transp = 0xFF);
|
||||||
void* convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y);
|
void* convertRGBA2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y);
|
||||||
void displayRGB(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb = true, int transp = 0xFF);
|
void displayRGB(unsigned char *rgbbuff, int x_size, int y_size, int x_pan, int y_pan, int x_offs, int y_offs, bool clearfb = true, int transp = 0xFF);
|
||||||
|
virtual void fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y);
|
||||||
virtual void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
virtual void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false);
|
||||||
virtual void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
virtual void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff);
|
||||||
|
|
||||||
|
@@ -160,7 +160,7 @@ bool CEpgScan::AddSelected()
|
|||||||
|
|
||||||
void CEpgScan::AddTransponders()
|
void CEpgScan::AddTransponders()
|
||||||
{
|
{
|
||||||
if(bouquetList->Bouquets.empty())
|
if(!bouquetList || bouquetList->Bouquets.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (current_mode != g_settings.epg_scan) {
|
if (current_mode != g_settings.epg_scan) {
|
||||||
|
@@ -118,17 +118,24 @@ CMoviePlayerGui::CMoviePlayerGui()
|
|||||||
|
|
||||||
CMoviePlayerGui::~CMoviePlayerGui()
|
CMoviePlayerGui::~CMoviePlayerGui()
|
||||||
{
|
{
|
||||||
//playback->Close();
|
|
||||||
if (this == instance_mp)
|
if (this == instance_mp)
|
||||||
stopPlayBack();
|
stopPlayBack();
|
||||||
delete moviebrowser;
|
if(moviebrowser){
|
||||||
moviebrowser = NULL;
|
delete moviebrowser;
|
||||||
delete filebrowser;
|
moviebrowser = NULL;
|
||||||
filebrowser = NULL;
|
}
|
||||||
delete bookmarkmanager;
|
if(filebrowser){
|
||||||
bookmarkmanager = NULL;
|
delete filebrowser;
|
||||||
delete playback;
|
filebrowser = NULL;
|
||||||
playback = NULL;
|
}
|
||||||
|
if(bookmarkmanager){
|
||||||
|
delete bookmarkmanager;
|
||||||
|
bookmarkmanager = NULL;
|
||||||
|
}
|
||||||
|
if(playback){
|
||||||
|
delete playback;
|
||||||
|
playback = NULL;
|
||||||
|
}
|
||||||
if (this == instance_mp) {
|
if (this == instance_mp) {
|
||||||
delete instance_bg;
|
delete instance_bg;
|
||||||
instance_bg = NULL;
|
instance_bg = NULL;
|
||||||
|
Reference in New Issue
Block a user