mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
Merge branch 'master' of https://github.com/neutrino-mp/neutrino-mp into ni/mp/tuxbox
Conflicts:
configure.ac
src/driver/Makefile.am
src/driver/fb_accel.h
src/driver/fb_accel_glfb.cpp
src/driver/fb_generic.cpp
src/driver/fb_generic.h
src/gui/bookmarkmanager.cpp
src/gui/epgview.h
src/gui/filebrowser.cpp
src/gui/update.h
src/gui/widget/buttons.cpp
src/neutrino.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8f312e1d00
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-12 (Sun, 12 Feb 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -164,6 +164,12 @@ AC_ARG_ENABLE(viasatepg,
|
|||||||
[ --enable-viasatepg enable ViaSat EPG code (experimental)],
|
[ --enable-viasatepg enable ViaSat EPG code (experimental)],
|
||||||
[AC_DEFINE(ENABLE_VIASATEPG,1,[enable ViaSat EPG code])])
|
[AC_DEFINE(ENABLE_VIASATEPG,1,[enable ViaSat EPG code])])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(fastscan,
|
||||||
|
[ --enable-fastscan enable Fastscan code)],
|
||||||
|
[AC_DEFINE(ENABLE_FASTSCAN,1,[enable fastscan code])])
|
||||||
|
|
||||||
|
AM_CONDITIONAL(ENABLE_FASTSCAN, test "$enable_fastscan" = "yes")
|
||||||
|
|
||||||
AC_ARG_ENABLE(giflib,
|
AC_ARG_ENABLE(giflib,
|
||||||
AS_HELP_STRING(--enable-giflib,use giflib instead of libungif),
|
AS_HELP_STRING(--enable-giflib,use giflib instead of libungif),
|
||||||
,[enable_giflib=no])
|
,[enable_giflib=no])
|
||||||
|
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
Neutrino-HD GUI, COSDFader implementation
|
|
||||||
Copyright (C) 2011 Stefan Seyfried
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __FADER_H__
|
|
||||||
#define __FADER_H__
|
|
||||||
|
|
||||||
#include <driver/framebuffer.h>
|
|
||||||
|
|
||||||
class COSDFader
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
CFrameBuffer *fb;
|
|
||||||
int step;
|
|
||||||
int target_trans;
|
|
||||||
int transparency;
|
|
||||||
uint32_t timer;
|
|
||||||
public:
|
|
||||||
COSDFader(int trans);
|
|
||||||
~COSDFader();
|
|
||||||
|
|
||||||
void StartFadeIn();
|
|
||||||
bool StartFadeOut();
|
|
||||||
void Stop();
|
|
||||||
bool Fade();
|
|
||||||
uint32_t GetTimer(){ return timer; };
|
|
||||||
};
|
|
||||||
#endif
|
|
313
src/driver/fb_accel_cs.cpp
Normal file
313
src/driver/fb_accel_cs.cpp
Normal file
@@ -0,0 +1,313 @@
|
|||||||
|
/*
|
||||||
|
Framebuffer acceleration hardware abstraction functions.
|
||||||
|
The hardware dependent acceleration functions for coolstream GXA chips
|
||||||
|
are represented in this class.
|
||||||
|
|
||||||
|
(C) 2017 Stefan Seyfried
|
||||||
|
Derived from old neutrino-hd framebuffer code
|
||||||
|
|
||||||
|
License: GPL
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <driver/fb_generic.h>
|
||||||
|
#include <driver/fb_accel.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#include <memory.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <gui/color.h>
|
||||||
|
|
||||||
|
#include <cs_api.h>
|
||||||
|
#include <cnxtfb.h>
|
||||||
|
|
||||||
|
/*******************************************************************************/
|
||||||
|
#define GXA_POINT(x, y) (((y) & 0x0FFF) << 16) | ((x) & 0x0FFF)
|
||||||
|
#define GXA_SRC_BMP_SEL(x) (x << 8)
|
||||||
|
#define GXA_DST_BMP_SEL(x) (x << 5)
|
||||||
|
#define GXA_PARAM_COUNT(x) (x << 2)
|
||||||
|
|
||||||
|
#define GXA_CMD_REG 0x001C
|
||||||
|
#define GXA_FG_COLOR_REG 0x0020
|
||||||
|
#define GXA_BG_COLOR_REG 0x0024
|
||||||
|
#define GXA_LINE_CONTROL_REG 0x0038
|
||||||
|
#define GXA_BMP1_TYPE_REG 0x0048
|
||||||
|
#define GXA_BMP1_ADDR_REG 0x004C
|
||||||
|
#define GXA_BMP2_TYPE_REG 0x0050
|
||||||
|
#define GXA_BMP2_ADDR_REG 0x0054
|
||||||
|
#define GXA_BMP3_TYPE_REG 0x0058
|
||||||
|
#define GXA_BMP3_ADDR_REG 0x005C
|
||||||
|
#define GXA_BMP4_TYPE_REG 0x0060
|
||||||
|
#define GXA_BMP4_ADDR_REG 0x0064
|
||||||
|
#define GXA_BMP5_TYPE_REG 0x0068
|
||||||
|
#define GXA_BMP5_ADDR_REG 0x006C
|
||||||
|
#define GXA_BMP6_TYPE_REG 0x0070
|
||||||
|
#define GXA_BMP7_TYPE_REG 0x0078
|
||||||
|
#define GXA_DEPTH_REG 0x00F4
|
||||||
|
#define GXA_CONTENT_ID_REG 0x0144
|
||||||
|
|
||||||
|
#define GXA_CMD_BLT 0x00010800
|
||||||
|
#define GXA_CMD_NOT_ALPHA 0x00011000
|
||||||
|
#define GXA_CMD_NOT_TEXT 0x00018000
|
||||||
|
#define GXA_CMD_QMARK 0x00001000
|
||||||
|
|
||||||
|
#define GXA_BLEND_CFG_REG 0x003C
|
||||||
|
#define GXA_CFG_REG 0x0030
|
||||||
|
#define GXA_CFG2_REG 0x00FC
|
||||||
|
|
||||||
|
#define LOGTAG "[fb_accel_gxa] "
|
||||||
|
/*
|
||||||
|
static unsigned int _read_gxa(volatile unsigned char *base_addr, unsigned int offset)
|
||||||
|
{
|
||||||
|
return *(volatile unsigned int *)(base_addr + offset);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
static unsigned int _mark = 0;
|
||||||
|
|
||||||
|
static void _write_gxa(volatile unsigned char *base_addr, unsigned int offset, unsigned int value)
|
||||||
|
{
|
||||||
|
while ((*(volatile unsigned int *)(base_addr + GXA_DEPTH_REG)) & 0x40000000) {};
|
||||||
|
*(volatile unsigned int *)(base_addr + offset) = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this adds a tagged marker into the GXA queue. Once this comes out
|
||||||
|
of the other end of the queue, all commands before it are finished */
|
||||||
|
void CFbAccelCS::add_gxa_sync_marker(void)
|
||||||
|
{
|
||||||
|
unsigned int cmd = GXA_CMD_QMARK | GXA_PARAM_COUNT(1);
|
||||||
|
// TODO: locking?
|
||||||
|
_mark++;
|
||||||
|
_mark &= 0x0000001F; /* bit 0x20 crashes the kernel, if set */
|
||||||
|
_write_gxa(gxa_base, cmd, _mark);
|
||||||
|
//fprintf(stderr, "%s: wrote %02x\n", __FUNCTION__, _mark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* wait until the current marker comes out of the GXA command queue */
|
||||||
|
void CFbAccelCS::waitForIdle(const char *func)
|
||||||
|
{
|
||||||
|
unsigned int cfg, count = 0;
|
||||||
|
do {
|
||||||
|
cfg = *(volatile unsigned int *)(gxa_base + GXA_CMD_REG);
|
||||||
|
cfg >>= 24; /* the token is stored in bits 31...24 */
|
||||||
|
if (cfg == _mark)
|
||||||
|
break;
|
||||||
|
/* usleep is too coarse, because of CONFIG_HZ=100 in kernel
|
||||||
|
so use sched_yield to at least give other threads a chance to run */
|
||||||
|
sched_yield();
|
||||||
|
//fprintf(stderr, "%s: read %02x, expected %02x\n", __FUNCTION__, cfg, _mark);
|
||||||
|
} while(++count < 8192); /* don't deadlock here if there is an error */
|
||||||
|
|
||||||
|
if (count > 2048) /* more than 2000 are unlikely, even for large BMP6 blits */
|
||||||
|
fprintf(stderr, LOGTAG "waitForIdle: count is big (%d) [%s]!\n", count, func?func:"");
|
||||||
|
}
|
||||||
|
|
||||||
|
CFbAccelCS::CFbAccelCS()
|
||||||
|
{
|
||||||
|
fb_name = "Coolstream NEVIS GXA framebuffer";
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::init(const char * const)
|
||||||
|
{
|
||||||
|
fprintf(stderr, ">FBACCEL::INIT\n");
|
||||||
|
CFrameBuffer::init();
|
||||||
|
if (lfb == NULL) {
|
||||||
|
printf(LOGTAG "CFrameBuffer::init() failed.\n");
|
||||||
|
return; /* too bad... */
|
||||||
|
}
|
||||||
|
available = fix.smem_len;
|
||||||
|
printf(LOGTAG "%dk video mem\n", available / 1024);
|
||||||
|
memset(lfb, 0, available);
|
||||||
|
lastcol = 0xffffffff;
|
||||||
|
lbb = lfb; /* the memory area to draw to... */
|
||||||
|
|
||||||
|
/* Open /dev/mem for HW-register access */
|
||||||
|
devmem_fd = open("/dev/mem", O_RDWR | O_SYNC | O_CLOEXEC);
|
||||||
|
if (devmem_fd < 0) {
|
||||||
|
perror("CFbAccel open /dev/mem");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* mmap the GXA's base address */
|
||||||
|
gxa_base = (volatile unsigned char*)mmap(0, 0x00040000, PROT_READ|PROT_WRITE, MAP_SHARED, devmem_fd, 0xE0600000);
|
||||||
|
if (gxa_base == (void *)-1) {
|
||||||
|
perror("CFbAccel mmap /dev/mem");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
setupGXA();
|
||||||
|
error:
|
||||||
|
/* TODO: what to do here? does this really happen? */
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
CFbAccelCS::~CFbAccelCS()
|
||||||
|
{
|
||||||
|
if (gxa_base != MAP_FAILED)
|
||||||
|
munmap((void *)gxa_base, 0x40000);
|
||||||
|
if (devmem_fd != -1)
|
||||||
|
close(devmem_fd);
|
||||||
|
if (lfb)
|
||||||
|
munmap(lfb, available);
|
||||||
|
if (fd > -1)
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::setColor(fb_pixel_t col)
|
||||||
|
{
|
||||||
|
if (col == lastcol)
|
||||||
|
return;
|
||||||
|
_write_gxa(gxa_base, GXA_FG_COLOR_REG, (unsigned int)col); /* setup the drawing color */
|
||||||
|
lastcol = col;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col)
|
||||||
|
{
|
||||||
|
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
||||||
|
unsigned int cmd = GXA_CMD_BLT | GXA_CMD_NOT_TEXT | GXA_CMD_NOT_ALPHA |
|
||||||
|
GXA_SRC_BMP_SEL(6) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(2);
|
||||||
|
|
||||||
|
_write_gxa(gxa_base, GXA_BG_COLOR_REG, (unsigned int)col); /* setup the drawing color */
|
||||||
|
_write_gxa(gxa_base, GXA_BMP6_TYPE_REG, (3 << 16) | (1 << 27)); /* 3 == 32bpp, 1<<27 == fill */
|
||||||
|
_write_gxa(gxa_base, cmd, GXA_POINT(x, y)); /* destination pos */
|
||||||
|
_write_gxa(gxa_base, cmd, GXA_POINT(dx, dy)); /* destination size */
|
||||||
|
_write_gxa(gxa_base, GXA_BG_COLOR_REG, (unsigned int)backgroundColor);
|
||||||
|
|
||||||
|
/* the GXA seems to do asynchronous rendering, so we add a sync marker
|
||||||
|
to which the fontrenderer code can synchronize */
|
||||||
|
add_gxa_sync_marker();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::paintPixel(const int x, const int y, const fb_pixel_t col)
|
||||||
|
{
|
||||||
|
paintLine(x, y, x + 1, y, col);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col)
|
||||||
|
{
|
||||||
|
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
||||||
|
/* draw a single vertical line from point xa/ya to xb/yb */
|
||||||
|
unsigned int cmd = GXA_CMD_NOT_TEXT | GXA_SRC_BMP_SEL(2) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(2) | GXA_CMD_NOT_ALPHA;
|
||||||
|
|
||||||
|
setColor(col);
|
||||||
|
_write_gxa(gxa_base, GXA_LINE_CONTROL_REG, 0x00000404); /* X is major axis, skip last pixel */
|
||||||
|
_write_gxa(gxa_base, cmd, GXA_POINT(xb, yb)); /* end point */
|
||||||
|
_write_gxa(gxa_base, cmd, GXA_POINT(xa, ya)); /* start point */
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::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;
|
||||||
|
xc = (width > xRes) ? xRes : width;
|
||||||
|
yc = (height > yRes) ? yRes : height;
|
||||||
|
(void)transp;
|
||||||
|
u32 cmd;
|
||||||
|
void *uKva;
|
||||||
|
|
||||||
|
uKva = cs_phys_addr(fbbuff);
|
||||||
|
//printf("CFbAccelCS::blit2FB: data %x Kva %x\n", (int) fbbuff, (int) uKva);
|
||||||
|
|
||||||
|
if (uKva != NULL) {
|
||||||
|
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(mutex);
|
||||||
|
cmd = GXA_CMD_BLT | GXA_CMD_NOT_TEXT | GXA_SRC_BMP_SEL(1) | GXA_DST_BMP_SEL(2) | GXA_PARAM_COUNT(3);
|
||||||
|
|
||||||
|
_write_gxa(gxa_base, GXA_BMP1_TYPE_REG, (3 << 16) | width);
|
||||||
|
_write_gxa(gxa_base, GXA_BMP1_ADDR_REG, (unsigned int)uKva);
|
||||||
|
|
||||||
|
_write_gxa(gxa_base, cmd, GXA_POINT(xoff, yoff)); /* destination pos */
|
||||||
|
_write_gxa(gxa_base, cmd, GXA_POINT(xc, yc)); /* source width, FIXME real or adjusted xc, yc ? */
|
||||||
|
_write_gxa(gxa_base, cmd, GXA_POINT(xp, yp)); /* source pos */
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
for(int i = 0; i < yc; i++){
|
||||||
|
memmove(clfb + (i + yoff)*stride + xoff*4, ip + (i + yp)*width + xp, xc*4);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::setupGXA()
|
||||||
|
{
|
||||||
|
// We (re)store the GXA regs here in case DFB override them and was not
|
||||||
|
// able to restore them.
|
||||||
|
_write_gxa(gxa_base, GXA_BMP2_TYPE_REG, (3 << 16) | (unsigned int)screeninfo.xres);
|
||||||
|
_write_gxa(gxa_base, GXA_BMP2_ADDR_REG, (unsigned int) fix.smem_start);
|
||||||
|
_write_gxa(gxa_base, GXA_BLEND_CFG_REG, 0x00089064);
|
||||||
|
// TODO check mono-flip, bit 8
|
||||||
|
_write_gxa(gxa_base, GXA_CFG_REG, 0x100 | (1 << 12) | (1 << 29));
|
||||||
|
_write_gxa(gxa_base, GXA_CFG2_REG, 0x1FF);
|
||||||
|
_write_gxa(gxa_base, GXA_BG_COLOR_REG, (unsigned int)backgroundColor);
|
||||||
|
add_gxa_sync_marker();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* wrong name... */
|
||||||
|
int CFbAccelCS::setMode(unsigned int, unsigned int, unsigned int)
|
||||||
|
{
|
||||||
|
fb_fix_screeninfo _fix;
|
||||||
|
|
||||||
|
if (ioctl(fd, FBIOGET_FSCREENINFO, &_fix) < 0) {
|
||||||
|
perror("FBIOGET_FSCREENINFO");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
stride = _fix.line_length;
|
||||||
|
if (ioctl(fd, FBIOBLANK, FB_BLANK_UNBLANK) < 0)
|
||||||
|
printf("screen unblanking failed\n");
|
||||||
|
xRes = screeninfo.xres;
|
||||||
|
yRes = screeninfo.yres;
|
||||||
|
bpp = screeninfo.bits_per_pixel;
|
||||||
|
int needmem = stride * yRes * 2;
|
||||||
|
if (available >= needmem)
|
||||||
|
{
|
||||||
|
backbuffer = lfb + stride / sizeof(fb_pixel_t) * yRes;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
fprintf(stderr, LOGTAG "not enough FB memory (have %d, need %d)\n", available, needmem);
|
||||||
|
backbuffer = lfb; /* will not work well, but avoid crashes */
|
||||||
|
return 0; /* dont fail because of this */
|
||||||
|
}
|
||||||
|
|
||||||
|
fb_pixel_t * CFbAccelCS::getBackBufferPointer() const
|
||||||
|
{
|
||||||
|
return backbuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::setBlendMode(uint8_t mode)
|
||||||
|
{
|
||||||
|
if (ioctl(fd, FBIO_SETBLENDMODE, mode))
|
||||||
|
printf("FBIO_SETBLENDMODE failed.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void CFbAccelCS::setBlendLevel(int level)
|
||||||
|
{
|
||||||
|
unsigned char value = 0xFF;
|
||||||
|
if (level >= 0 && level <= 100)
|
||||||
|
value = convertSetupAlpha2Alpha(level);
|
||||||
|
|
||||||
|
if (ioctl(fd, FBIO_SETOPACITY, value))
|
||||||
|
printf("FBIO_SETOPACITY failed.\n");
|
||||||
|
#ifndef BOXMODEL_APOLLO
|
||||||
|
if (level == 100) // TODO: sucks.
|
||||||
|
usleep(20000);
|
||||||
|
#endif
|
||||||
|
}
|
@@ -357,7 +357,7 @@ int CFrameBuffer::setMode(unsigned int /*nxRes*/, unsigned int /*nyRes*/, unsign
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
//never used
|
//never used
|
||||||
void CFrameBuffer::setTransparency( int /*tr*/ )
|
void CFrameBuffer::setTransparency( int /*tr*/ )
|
||||||
{
|
{
|
||||||
@@ -371,7 +371,7 @@ void CFrameBuffer::setBlendLevel(int /*level*/)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
//never used
|
//never used
|
||||||
void CFrameBuffer::setAlphaFade(int in, int num, int tr)
|
void CFrameBuffer::setAlphaFade(int in, int num, int tr)
|
||||||
{
|
{
|
||||||
@@ -1200,7 +1200,7 @@ void CFrameBuffer::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t co
|
|||||||
}
|
}
|
||||||
mark(xa, ya, xb, yb);
|
mark(xa, ya, xb, yb);
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
//never used
|
//never used
|
||||||
void CFrameBuffer::setBackgroundColor(const fb_pixel_t color)
|
void CFrameBuffer::setBackgroundColor(const fb_pixel_t color)
|
||||||
{
|
{
|
||||||
|
@@ -176,7 +176,7 @@ class CFrameBuffer : public sigc::trackable
|
|||||||
virtual fb_pixel_t * getBackBufferPointer() const; // pointer to backbuffer
|
virtual fb_pixel_t * getBackBufferPointer() const; // pointer to backbuffer
|
||||||
virtual unsigned int getStride() const; // size of a single line in the framebuffer (in bytes)
|
virtual unsigned int getStride() const; // size of a single line in the framebuffer (in bytes)
|
||||||
unsigned int getScreenWidth(bool real = false);
|
unsigned int getScreenWidth(bool real = false);
|
||||||
unsigned int getScreenHeight(bool real = false);
|
unsigned int getScreenHeight(bool real = false);
|
||||||
unsigned int getScreenWidthRel(bool force_small = false);
|
unsigned int getScreenWidthRel(bool force_small = false);
|
||||||
unsigned int getScreenHeightRel(bool force_small = false);
|
unsigned int getScreenHeightRel(bool force_small = false);
|
||||||
unsigned int getScreenX();
|
unsigned int getScreenX();
|
||||||
@@ -228,7 +228,7 @@ class CFrameBuffer : public sigc::trackable
|
|||||||
|
|
||||||
void getIconSize(const char * const filename, int* width, int *height);
|
void getIconSize(const char * const filename, int* width, int *height);
|
||||||
/* h is the height of the target "window", if != 0 the icon gets centered in that window */
|
/* h is the height of the target "window", if != 0 the icon gets centered in that window */
|
||||||
bool paintIcon (const std::string & filename, const int x, const int y,
|
bool paintIcon (const std::string & filename, const int x, const int y,
|
||||||
const int h = 0, const unsigned char offset = 1, bool paint = true, bool paintBg = false, const fb_pixel_t colBg = 0);
|
const int h = 0, const unsigned char offset = 1, bool paint = true, bool paintBg = false, const fb_pixel_t colBg = 0);
|
||||||
bool paintIcon8(const std::string & filename, const int x, const int y, const unsigned char offset = 0);
|
bool paintIcon8(const std::string & filename, const int x, const int y, const unsigned char offset = 0);
|
||||||
void loadPal (const std::string & filename, const unsigned char offset = 0, const unsigned char endidx = 255);
|
void loadPal (const std::string & filename, const unsigned char offset = 0, const unsigned char endidx = 255);
|
||||||
@@ -304,6 +304,7 @@ class CFrameBuffer : public sigc::trackable
|
|||||||
typedef std::vector<fb_area_t> v_fbarea_t;
|
typedef std::vector<fb_area_t> v_fbarea_t;
|
||||||
typedef v_fbarea_t::iterator fbarea_iterator_t;
|
typedef v_fbarea_t::iterator fbarea_iterator_t;
|
||||||
v_fbarea_t v_fbarea;
|
v_fbarea_t v_fbarea;
|
||||||
|
bool fb_no_check;
|
||||||
bool do_paint_mute_icon;
|
bool do_paint_mute_icon;
|
||||||
|
|
||||||
bool _checkFbArea(int _x, int _y, int _dx, int _dy, bool prev);
|
bool _checkFbArea(int _x, int _y, int _dx, int _dy, bool prev);
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <driver/lcdd.h>
|
#include <driver/lcdd.h>
|
||||||
#include <driver/framebuffer.h>
|
|
||||||
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
@@ -46,6 +45,8 @@
|
|||||||
#define DISPLAY_DEV "/dev/null"
|
#define DISPLAY_DEV "/dev/null"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <system/set_threadname.h>
|
||||||
|
|
||||||
static char volume = 0;
|
static char volume = 0;
|
||||||
//static char percent = 0;
|
//static char percent = 0;
|
||||||
static bool power = true;
|
static bool power = true;
|
||||||
@@ -150,6 +151,7 @@ void CLCD::wake_up()
|
|||||||
|
|
||||||
void* CLCD::TimeThread(void *)
|
void* CLCD::TimeThread(void *)
|
||||||
{
|
{
|
||||||
|
set_threadname("n:boxdisplay"); /* to not confuse with TV display */
|
||||||
while (CLCD::getInstance()->thread_running) {
|
while (CLCD::getInstance()->thread_running) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
CLCD::getInstance()->showTime();
|
CLCD::getInstance()->showTime();
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
Neutrino-GUI - DBoxII-Project
|
Neutrino-GUI - DBoxII-Project
|
||||||
|
|
||||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||||
Copyright (C) 2011-2012 Stefan Seyfried
|
Copyright (C) 2011-2013,2015,2017 Stefan Seyfried
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
|
|
||||||
@@ -170,6 +170,13 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
|||||||
bool test = actionKey == "test";
|
bool test = actionKey == "test";
|
||||||
bool manual = (actionKey == "manual") || test;
|
bool manual = (actionKey == "manual") || test;
|
||||||
bool fast = (actionKey == "fast");
|
bool fast = (actionKey == "fast");
|
||||||
|
#if !ENABLE_FASTSCAN
|
||||||
|
if (fast) {
|
||||||
|
/* popup message? But this *should* be impossible to happen anyway */
|
||||||
|
fprintf(stderr, "CScanTs::exec: fastscan disabled at build-time!\n");
|
||||||
|
return menu_return::RETURN_REPAINT;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (CFrontend::isSat(delsys))
|
if (CFrontend::isSat(delsys))
|
||||||
pname = scansettings.satName;
|
pname = scansettings.satName;
|
||||||
@@ -300,8 +307,10 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
|||||||
} else if(manual)
|
} else if(manual)
|
||||||
success = g_Zapit->scan_TP(TP);
|
success = g_Zapit->scan_TP(TP);
|
||||||
else if(fast) {
|
else if(fast) {
|
||||||
|
#if ENABLE_FASTSCAN
|
||||||
CServiceScan::getInstance()->QuietFastScan(false);
|
CServiceScan::getInstance()->QuietFastScan(false);
|
||||||
success = CZapit::getInstance()->StartFastScan(scansettings.fast_type, scansettings.fast_op);
|
success = CZapit::getInstance()->StartFastScan(scansettings.fast_type, scansettings.fast_op);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
success = g_Zapit->startScan(scan_flags);
|
success = g_Zapit->startScan(scan_flags);
|
||||||
|
@@ -42,8 +42,6 @@
|
|||||||
|
|
||||||
#define scansettings CNeutrinoApp::getInstance()->getScanSettings()
|
#define scansettings CNeutrinoApp::getInstance()->getScanSettings()
|
||||||
|
|
||||||
//#define ENABLE_FASTSCAN //don't define this to remove fast scan menu
|
|
||||||
|
|
||||||
class CScanSetup : public CMenuTarget, public CChangeObserver
|
class CScanSetup : public CMenuTarget, public CChangeObserver
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||||
and some other guys
|
and some other guys
|
||||||
|
|
||||||
Copyright (C) 2006-2014 Stefan Seyfried
|
Copyright (C) 2006-2017 Stefan Seyfried
|
||||||
|
|
||||||
Copyright (C) 2011 CoolStream International Ltd
|
Copyright (C) 2011 CoolStream International Ltd
|
||||||
|
|
||||||
@@ -238,14 +238,14 @@ CNeutrinoApp::CNeutrinoApp()
|
|||||||
: configfile('\t')
|
: configfile('\t')
|
||||||
{
|
{
|
||||||
standby_pressed_at.tv_sec = 0;
|
standby_pressed_at.tv_sec = 0;
|
||||||
|
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
|
||||||
frameBuffer->setIconBasePath(ICONSDIR);
|
|
||||||
#if HAVE_TRIPLEDRAGON || USE_STB_HAL
|
#if HAVE_TRIPLEDRAGON || USE_STB_HAL
|
||||||
/* this needs to happen before the framebuffer is set up */
|
/* this needs to happen before the framebuffer is set up */
|
||||||
init_td_api();
|
init_td_api();
|
||||||
// shutdown_td_api();
|
// shutdown_td_api();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
|
frameBuffer->setIconBasePath(ICONSDIR);
|
||||||
SetupFrameBuffer();
|
SetupFrameBuffer();
|
||||||
|
|
||||||
mode = mode_unknown;
|
mode = mode_unknown;
|
||||||
@@ -5132,6 +5132,7 @@ void CNeutrinoApp::Cleanup()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_FASTSCAN
|
||||||
void CNeutrinoApp::CheckFastScan(bool standby, bool reload)
|
void CNeutrinoApp::CheckFastScan(bool standby, bool reload)
|
||||||
{
|
{
|
||||||
if (scansettings.fst_update) {
|
if (scansettings.fst_update) {
|
||||||
@@ -5163,6 +5164,11 @@ void CNeutrinoApp::CheckFastScan(bool standby, bool reload)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
void CNeutrinoApp::CheckFastScan(bool, bool)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool CNeutrinoApp::adjustToChannelID(const t_channel_id channel_id)
|
bool CNeutrinoApp::adjustToChannelID(const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
|
@@ -109,6 +109,7 @@ class CServiceScan : public OpenThreads::Thread
|
|||||||
uint32_t tune_tp_index;
|
uint32_t tune_tp_index;
|
||||||
|
|
||||||
unsigned char fst_version;
|
unsigned char fst_version;
|
||||||
|
#if ENABLE_FASTSCAN
|
||||||
bool quiet_fastscan;
|
bool quiet_fastscan;
|
||||||
void InitFastscanLnb(int id);
|
void InitFastscanLnb(int id);
|
||||||
bool FastscanTune(int id);
|
bool FastscanTune(int id);
|
||||||
@@ -120,7 +121,7 @@ class CServiceScan : public OpenThreads::Thread
|
|||||||
void process_satellite_delivery_system_descriptor(const unsigned char * const buffer, FrontendParameters * feparams, t_satellite_position * satellitePosition);
|
void process_satellite_delivery_system_descriptor(const unsigned char * const buffer, FrontendParameters * feparams, t_satellite_position * satellitePosition);
|
||||||
bool ScanFast();
|
bool ScanFast();
|
||||||
void ReportFastScan(FrontendParameters &feparams, t_satellite_position satellitePosition);
|
void ReportFastScan(FrontendParameters &feparams, t_satellite_position satellitePosition);
|
||||||
|
#endif
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
CFrontend * frontend;
|
CFrontend * frontend;
|
||||||
@@ -151,12 +152,14 @@ class CServiceScan : public OpenThreads::Thread
|
|||||||
bool isFtaOnly() { return flags & SCAN_FTA; }
|
bool isFtaOnly() { return flags & SCAN_FTA; }
|
||||||
int GetFlags() { return flags; }
|
int GetFlags() { return flags; }
|
||||||
bool SatHaveChannels() { return satHaveChannels; }
|
bool SatHaveChannels() { return satHaveChannels; }
|
||||||
|
#if ENABLE_FASTSCAN
|
||||||
/* fast-scan */
|
/* fast-scan */
|
||||||
bool TestDiseqcConfig(int num);
|
bool TestDiseqcConfig(int num);
|
||||||
bool ReadFstVersion(int num);
|
bool ReadFstVersion(int num);
|
||||||
unsigned char GetFstVersion() { return fst_version; }
|
unsigned char GetFstVersion() { return fst_version; }
|
||||||
void QuietFastScan(bool enable) { quiet_fastscan = enable; }
|
void QuietFastScan(bool enable) { quiet_fastscan = enable; }
|
||||||
bool ScanFast(int num, bool reload = true);
|
bool ScanFast(int num, bool reload = true);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __scan_h__ */
|
#endif /* __scan_h__ */
|
||||||
|
@@ -20,7 +20,6 @@ libzapit_a_SOURCES = \
|
|||||||
bouquets.cpp \
|
bouquets.cpp \
|
||||||
capmt.cpp \
|
capmt.cpp \
|
||||||
channel.cpp \
|
channel.cpp \
|
||||||
fastscan.cpp \
|
|
||||||
femanager.cpp \
|
femanager.cpp \
|
||||||
frontend.cpp \
|
frontend.cpp \
|
||||||
getservices.cpp \
|
getservices.cpp \
|
||||||
@@ -33,6 +32,11 @@ libzapit_a_SOURCES = \
|
|||||||
transponder.cpp \
|
transponder.cpp \
|
||||||
zapit.cpp
|
zapit.cpp
|
||||||
|
|
||||||
|
if ENABLE_FASTSCAN
|
||||||
|
libzapit_a_SOURCES += \
|
||||||
|
fastscan.cpp
|
||||||
|
endif
|
||||||
|
|
||||||
bin_PROGRAMS = pzapit
|
bin_PROGRAMS = pzapit
|
||||||
|
|
||||||
pzapit_SOURCES = \
|
pzapit_SOURCES = \
|
||||||
|
@@ -2620,7 +2620,8 @@ void CZapit::setMoviePlayer(bool enable)
|
|||||||
|
|
||||||
void CZapit::run()
|
void CZapit::run()
|
||||||
{
|
{
|
||||||
#if HAVE_SPARK_HARDWARE
|
//if HAVE_SPARK_HARDWARE
|
||||||
|
#if 0
|
||||||
bool v_stopped = false;
|
bool v_stopped = false;
|
||||||
#endif
|
#endif
|
||||||
set_threadname("zap:main");
|
set_threadname("zap:main");
|
||||||
@@ -2668,7 +2669,8 @@ void CZapit::run()
|
|||||||
SendEvent(CZapitClient::EVT_PMT_CHANGED, &channel_id, sizeof(channel_id));
|
SendEvent(CZapitClient::EVT_PMT_CHANGED, &channel_id, sizeof(channel_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if HAVE_SPARK_HARDWARE
|
//if HAVE_SPARK_HARDWARE
|
||||||
|
#if 0
|
||||||
/* hack: stop videodecoder if the tuner looses lock
|
/* hack: stop videodecoder if the tuner looses lock
|
||||||
* at least the h264 decoder seems unhappy if he runs out of data...
|
* at least the h264 decoder seems unhappy if he runs out of data...
|
||||||
* ...until we fix the driver, let's work around it here.
|
* ...until we fix the driver, let's work around it here.
|
||||||
|
Reference in New Issue
Block a user