diff --git a/acinclude.m4 b/acinclude.m4 index 670c29114..8ffd2bc5f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -453,9 +453,9 @@ _TUXBOX_APPS_LIB_PKGCONFIG($1,$2) AC_DEFUN([TUXBOX_BOXTYPE], [ AC_ARG_WITH(boxtype, - AS_HELP_STRING([--with-boxtype], [valid values: generic, tripledragon, spark, coolstream, armbox, mipsbox]), + AS_HELP_STRING([--with-boxtype], [valid values: generic, spark, coolstream, armbox, mipsbox]), [case "${withval}" in - generic|tripledragon|spark|coolstream|armbox|mipsbox) + generic|spark|coolstream|armbox|mipsbox) BOXTYPE="$withval" ;; *) @@ -520,7 +520,6 @@ AC_SUBST(BOXTYPE) AC_SUBST(BOXMODEL) AM_CONDITIONAL(BOXTYPE_GENERIC, test "$BOXTYPE" = "generic") -AM_CONDITIONAL(BOXTYPE_TRIPLE, test "$BOXTYPE" = "tripledragon") AM_CONDITIONAL(BOXTYPE_SPARK, test "$BOXTYPE" = "spark") AM_CONDITIONAL(BOXTYPE_COOL, test "$BOXTYPE" = "coolstream") AM_CONDITIONAL(BOXTYPE_ARMBOX, test "$BOXTYPE" = "armbox") @@ -555,8 +554,6 @@ AM_CONDITIONAL(BOXMODEL_VUDUO, test "$BOXMODEL" = "vuduo") if test "$BOXTYPE" = "generic"; then AC_DEFINE(HAVE_GENERIC_HARDWARE, 1, [building for a generic device like a standard PC]) -elif test "$BOXTYPE" = "tripledragon"; then - AC_DEFINE(HAVE_TRIPLEDRAGON, 1, [building for a tripledragon]) elif test "$BOXTYPE" = "spark"; then AC_DEFINE(HAVE_SPARK_HARDWARE, 1, [building for a goldenmedia 990 or edision pingulux]) elif test "$BOXTYPE" = "coolstream"; then diff --git a/data/Makefile.am b/data/Makefile.am index 01135696d..bfb200f7b 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -21,8 +21,3 @@ if ENABLE_GRAPHLCD SUBDIRS += \ oled endif - -if BOXTYPE_TRIPLE -SUBDIRS += \ - lcd -endif diff --git a/lib/libdvbsub/dvbsub.cpp b/lib/libdvbsub/dvbsub.cpp index 355045163..a6c3d5fdc 100644 --- a/lib/libdvbsub/dvbsub.cpp +++ b/lib/libdvbsub/dvbsub.cpp @@ -243,8 +243,8 @@ static void* reader_thread(void * /*arg*/) bool bad_startcode = false; set_threadname("dvbsub:reader"); - dmx = new cDemux(0); - dmx->Open(DMX_PES_CHANNEL, NULL, 64*1024); + dmx = new cDemux(0); + dmx->Open(DMX_PES_CHANNEL, NULL, 64*1024); while (reader_running) { if(dvbsub_stopped /*dvbsub_paused*/) { diff --git a/lib/libtuxtxt/tuxtxt.h b/lib/libtuxtxt/tuxtxt.h index 37517f0ac..7dc2c1755 100644 --- a/lib/libtuxtxt/tuxtxt.h +++ b/lib/libtuxtxt/tuxtxt.h @@ -173,16 +173,9 @@ int tv_pip_y; #define RC_TTTV CRCInput::RC_tttv #define RC_TTZOOM CRCInput::RC_ttzoom #define RC_TTREVEAL CRCInput::RC_ttreveal -#if HAVE_TRIPLEDRAGON -/* td has more keys so use ttx key for switching split mode... */ -#define RC_SPLIT CRCInput::RC_text -/* rc_text is now unused */ -#define RC_TEXT (CRCInput::RC_MaxRC + 1) -#else /* ...while other receivers use the vol- key for that, so rc_split is unused */ #define RC_SPLIT (CRCInput::RC_MaxRC + 1) #define RC_TEXT CRCInput::RC_text -#endif typedef enum /* object type */ { diff --git a/src/Makefile.am b/src/Makefile.am index 77a517601..0cd880858 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,10 +27,6 @@ AM_CPPFLAGS = \ @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ -if BOXTYPE_TRIPLE -SUBDIRS += lcddisplay -endif - if USE_PUGIXML PUGIXML_LIBS = -lpugixml endif @@ -193,16 +189,19 @@ neutrino_LDFLAGS = \ $(STB_HAL_LIB) endif -if BOXTYPE_TRIPLE -neutrino_LDADD += \ - $(top_builddir)/src/lcddisplay/liblcddisplay.a -endif - neutrino_LDADD += \ @AVFORMAT_LIBS@ \ @AVUTIL_LIBS@ \ @AVCODEC_LIBS@ +if BOXTYPE_SPARK +neutrino_LDADD += -lass +endif + +if BOXTYPE_MIPSBOX +neutrino_LDADD += -lass +endif + if BOXTYPE_ARMBOX neutrino_LDADD += @SWSCALE_LIBS@ endif diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 25738ef5f..cd697e544 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -70,13 +70,6 @@ libneutrino_driver_a_SOURCES += \ endif endif -if BOXTYPE_TRIPLE -libneutrino_driver_a_SOURCES += \ - fb_accel_td.cpp \ - newclock.cpp \ - lcdd.cpp -endif - if BOXTYPE_SPARK libneutrino_driver_a_SOURCES += \ fb_accel_sti.cpp \ diff --git a/src/driver/audiodec/vis.cpp b/src/driver/audiodec/vis.cpp index 91e4f2015..3369be165 100644 --- a/src/driver/audiodec/vis.cpp +++ b/src/driver/audiodec/vis.cpp @@ -24,10 +24,6 @@ #include #endif -#if HAVE_TRIPLEDRAGON -#include -#endif - #include "int_fft.c" typedef signed short gint16; diff --git a/src/driver/display.h b/src/driver/display.h index cd5dcbb5b..38d9cdebf 100644 --- a/src/driver/display.h +++ b/src/driver/display.h @@ -2,9 +2,6 @@ #if HAVE_CST_HARDWARE #include #endif -#if HAVE_TRIPLEDRAGON -#include -#endif #if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE #include #endif diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index 541b0477b..944ffc945 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -185,33 +185,6 @@ class CFbAccelGLFB fb_pixel_t * getBackBufferPointer() const; }; -class CFbAccelTD - : public CFbAccel -{ - private: - fb_pixel_t lastcol; - void setColor(fb_pixel_t col); - fb_pixel_t *backbuffer; - public: - CFbAccelTD(); - ~CFbAccelTD(); - void init(const char * const); - int setMode(unsigned int xRes, unsigned int yRes, unsigned int bpp); - void paintPixel(int x, int y, const fb_pixel_t col); - void paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col); - void paintHLineRel(int x, int dx, int y, const fb_pixel_t col) { paintLine(x, y, x + dx, y, col); }; - void paintVLineRel(int x, int y, int dy, const fb_pixel_t col) { paintLine(x, y, x, y + dy, col); }; - void paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col); -#if 0 - /* this is too slow, just use simple software implementation */ - void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp); -#endif - void waitForIdle(const char *func = NULL); - fb_pixel_t * getBackBufferPointer() const; - void setBlendMode(uint8_t); - void setBlendLevel(int); -}; - class CFbAccelARM #if ENABLE_ARM_ACC : public OpenThreads::Thread, public CFbAccel diff --git a/src/driver/fb_accel_td.cpp b/src/driver/fb_accel_td.cpp deleted file mode 100644 index 4a930e276..000000000 --- a/src/driver/fb_accel_td.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/* - Framebuffer acceleration hardware abstraction functions. - The hardware dependent framebuffer acceleration functions for the - TripleDragon are represented in this class using DirectFB. - - License: GPL - - (C) 2017-2018 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 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 . -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define LOGTAG "[fb_accel_td] " - -#include -#include -extern IDirectFB *dfb; -extern IDirectFBSurface *dfbdest; -extern int gfxfd; -void CFbAccelTD::waitForIdle(const char *) -{ -#if 0 - struct timeval ts, te; - gettimeofday(&ts, NULL); -#endif - /* does not work: DFBResult r = dfb->WaitForSync(dfb); */ - ioctl(gfxfd, STB04GFX_ENGINE_SYNC); -#if 0 - gettimeofday(&te, NULL); - printf("STB04GFX_ENGINE_SYNC took %lld us\n", (te.tv_sec * 1000000LL + te.tv_usec) - (ts.tv_sec * 1000000LL + ts.tv_usec)); -#endif -} - -CFbAccelTD::CFbAccelTD() -{ - fb_name = "TripleDragon framebuffer"; - lastcol = 0xffffffff; - lbb = lfb; /* the memory area to draw to... */ -}; - -CFbAccelTD::~CFbAccelTD() -{ - if (lfb) - munmap(lfb, available); - if (fd > -1) - close(fd); -} - -void CFbAccelTD::setColor(fb_pixel_t col) -{ - if (col == lastcol) - return; - char *c = (char *)&col; - dfbdest->SetColor(dfbdest, c[1], c[2], c[3], c[0]); - lastcol = col; -} - -void CFbAccelTD::paintRect(const int x, const int y, const int dx, const int dy, const fb_pixel_t col) -{ - setColor(col); - dfbdest->FillRectangle(dfbdest, x, y, dx, dy); -} - -void CFbAccelTD::paintPixel(const int x, const int y, const fb_pixel_t col) -{ - setColor(col); - dfbdest->DrawLine(dfbdest, x, y, x, y); -} - -void CFbAccelTD::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col) -{ - setColor(col); - dfbdest->DrawLine(dfbdest, xa, ya, xb, yb); -} - -#if 0 -void CFbAccelTD::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp) -{ - DFBRectangle src; - DFBResult err; - IDirectFBSurface *surf; - DFBSurfaceDescription dsc; - int pitch = width * sizeof(fb_pixel_t); - uint8_t *srcbuf = (uint8_t *)fbbuff + (pitch * yp); - - src.x = xp; - src.y = 0; /* y != 0 does not work => add offset to the buffer instead */ - src.w = width - xp; - src.h = height; - - dsc.flags = (DFBSurfaceDescriptionFlags)(DSDESC_CAPS | DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PREALLOCATED); - dsc.caps = DSCAPS_NONE; - dsc.width = width; - dsc.height = height; - dsc.preallocated[0].data = srcbuf; - dsc.preallocated[0].pitch = pitch; - err = dfb->CreateSurface(dfb, &dsc, &surf); - if (err != DFB_OK) { - /* probably width or height out of range... */ - fprintf(stderr, LOGTAG "blit2FB: w:%d h:%d data:0x%p pitch:%d\n", width, height, srcbuf, pitch); - DirectFBError("dfb->CreateSurface(dfb, &dsc, &surf)", err); - return; - } - - if (transp) - dfbdest->SetBlittingFlags(dfbdest, DSBLIT_NOFX); - else - dfbdest->SetBlittingFlags(dfbdest, DSBLIT_BLEND_ALPHACHANNEL); - - err = dfbdest->Blit(dfbdest, surf, &src, xoff, yoff); - if (err != DFB_OK) { - /* something wrong with src or x/yoff... */ - fprintf(stderr, LOGTAG "blit2FB: w:%d h:%d data:0x%p pitch:%d xp:%d yp:%d xo:%d yo:%d\n", - width, height, srcbuf, pitch, xp, yp, xoff, yoff); - DirectFBError("dfbdest->Blit(dfbdest, surf, &src, xoff, yoff)", err); - } - surf->Release(surf); - return; -} -#endif - -void CFbAccelTD::init(const char *) -{ - CFrameBuffer::init(); - fcntl(fd, F_SETFD, FD_CLOEXEC); - 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); - - lbb = lfb; /* the memory area to draw to... */ - available = fix.smem_len; - stride = fix.line_length; - swidth = stride / sizeof(fb_pixel_t); - xRes = screeninfo.xres; - yRes = screeninfo.yres; - bpp = screeninfo.bits_per_pixel; - - return; -} - -/* wrong name... */ -int CFbAccelTD::setMode(unsigned int, unsigned int, unsigned int) -{ - int needmem = stride * yRes * 2; - if (available >= needmem) - { - backbuffer = lfb + swidth * 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; -} - -void CFbAccelTD::setBlendMode(uint8_t mode) -{ - Stb04GFXOsdControl g; - ioctl(gfxfd, STB04GFX_OSD_GETCONTROL, &g); - g.use_global_alpha = (mode == 2); /* 1 == pixel alpha, 2 == global alpha */ - ioctl(gfxfd, STB04GFX_OSD_SETCONTROL, &g); -} - -void CFbAccelTD::setBlendLevel(int level) -{ - /* this is bypassing directfb, but faster and easier */ - Stb04GFXOsdControl g; - ioctl(gfxfd, STB04GFX_OSD_GETCONTROL, &g); - if (g.use_global_alpha == 0) - return; - - if (level < 0 || level > 100) - return; - - /* this is the same as convertSetupAlpha2Alpha(), but non-float */ - g.global_alpha = 255 - (255 * level / 100); - ioctl(gfxfd, STB04GFX_OSD_SETCONTROL, &g); - if (level == 100) // sucks - usleep(20000); -} - -fb_pixel_t *CFbAccelTD::getBackBufferPointer() const -{ - return backbuffer; -} diff --git a/src/driver/fb_generic.cpp b/src/driver/fb_generic.cpp index d2ead9bef..51fbeebe1 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -140,9 +140,6 @@ CFrameBuffer* CFrameBuffer::getInstance() #if HAVE_GENERIC_HARDWARE frameBuffer = new CFbAccelGLFB(); #endif -#if HAVE_TRIPLEDRAGON - frameBuffer = new CFbAccelTD(); -#endif #if HAVE_ARM_HARDWARE frameBuffer = new CFbAccelARM(); #endif diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 425815d7b..c194ce079 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -489,13 +489,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const f } const bool utf8_encoded = flags & IS_UTF8; -#if HAVE_TRIPLEDRAGON - /* the TD Framebufffer is ARGB; the others are BGRA. The fullbg code does not handle that - * the quick workaround is to just disable the fullbg flag */ - useFullBG = false; -#else useFullBG = flags & FULLBG; -#endif /* useFullBg = false fetch bgcolor from framebuffer, using lower left edge of the font diff --git a/src/driver/lcdd.cpp b/src/driver/lcdd.cpp index d5ac2181b..6b64ffb68 100644 --- a/src/driver/lcdd.cpp +++ b/src/driver/lcdd.cpp @@ -309,7 +309,6 @@ void CLCD::displayUpdate() display.update(); } -#ifndef HAVE_TRIPLEDRAGON void CLCD::setlcdparameter(int dimm, const int contrast, const int power, const int inverse, const int bias) { #if defined HAVE_DBOX_HARDWARE || defined HAVE_DREAMBOX_HARDWARE || defined HAVE_IPBOX_HARDWARE @@ -367,23 +366,6 @@ void CLCD::setlcdparameter(int dimm, const int contrast, const int power, const } #endif } -#else -void CLCD::setlcdparameter(int /*dimm*/, const int contrast, const int /*power*/, const int inverse, const int /*bias*/) -{ - int fd = open("/dev/" DEVICE_NAME_LCD, O_RDWR); - if (fd < 0) - { - perror("CLCD::setlcdparameter open " DEVICE_NAME_LCD); - return; - } - if (ioctl(fd, IOC_LCD_INVERS, inverse & 1) < 0) - perror("CLCD::setlcdparameter ioctl IOC_LCD_INVERS"); - if (ioctl(fd, IOC_LCD_POTI, contrast) < 0) - perror("CLCD::setlcdparameter ioctl IOC_LCD_POTI"); - - close(fd); -} -#endif void CLCD::setlcdparameter(void) { diff --git a/src/driver/lcdd.h b/src/driver/lcdd.h index 6c82ab543..b532eb52b 100644 --- a/src/driver/lcdd.h +++ b/src/driver/lcdd.h @@ -119,13 +119,6 @@ typedef enum #include #include -#ifdef HAVE_TRIPLEDRAGON -#include - - -class CLCDPainter; -class LcdFontRenderClass; -#endif class CLCD { public: @@ -157,56 +150,6 @@ class CLCD private: - -#ifdef HAVE_TRIPLEDRAGON - class FontsDef - { - public: - LcdFont *channelname; - LcdFont *time; - LcdFont *menutitle; - LcdFont *menu; - }; - - CLCDDisplay display; - LcdFontRenderClass *fontRenderer; - FontsDef fonts; - -#define LCD_NUMBER_OF_BACKGROUNDS 5 - raw_display_t background[LCD_NUMBER_OF_BACKGROUNDS]; - - MODES mode; - AUDIOMODES movie_playmode; - - std::string servicename; - std::string epg_title; - std::string movie_big; - std::string movie_small; - std::string menutitle; - char volume; - unsigned char percentOver; - bool muted; - bool showclock; - bool movie_centered; - bool movie_is_ac3; - pthread_t thrTime; - bool thread_started; - int last_toggle_state_power; - int clearClock; - unsigned int timeout_cnt; - - void count_down(); - - CLCD(); - - static void* TimeThread(void*); - bool lcdInit(const char * fontfile1, const char * fontname1, - const char * fontfile2=NULL, const char * fontname2=NULL, - const char * fontfile3=NULL, const char * fontname3=NULL); - void setlcdparameter(int dimm, int contrast, int power, int inverse, int bias); - void displayUpdate(); - void showTextScreen(const std::string & big, const std::string & small, int showmode, bool perform_wakeup, bool centered = false); -#else CLCD(); std::string menutitle; std::string servicename; @@ -221,7 +164,6 @@ class CLCD unsigned int switch_name_time_cnt; void setlcdparameter(int dimm, int _power); void count_down(); -#endif public: bool has_lcd; diff --git a/src/driver/record.h b/src/driver/record.h index 5ea5f6426..2e4aca1c9 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -45,12 +45,7 @@ extern "C" { #define REC_MAX_APIDS 10 #define FILENAMEBUFFERSIZE 1024 -#if HAVE_TRIPLEDRAGON -/* I'm not able to get it to work with more than 1 recording at a time :-( */ -#define RECORD_MAX_COUNT 1 -#else #define RECORD_MAX_COUNT 8 -#endif class CFrontend; class CZapitChannel; diff --git a/src/eitd/dmx.cpp b/src/eitd/dmx.cpp index 0e749e7af..8a3943e03 100644 --- a/src/eitd/dmx.cpp +++ b/src/eitd/dmx.cpp @@ -80,11 +80,6 @@ void DMX::init() current_service = 0; first_skipped = 0; -#if HAVE_TRIPLEDRAGON - /* hack, to keep the TD changes in one place. */ - dmxBufferSizeInKB = 128; /* 128kB is enough on TD */ - dmx_num = 0; /* always use demux 0 */ -#endif #ifdef DEBUG_MUTEX pthread_mutexattr_t start_stop_mutex_attr; pthread_mutexattr_init(&start_stop_mutex_attr); @@ -121,13 +116,10 @@ void DMX::closefd(void) #endif if (isOpen()) { -#if HAVE_TRIPLEDRAGON - /* not sure why, but we lose CN events if we do delete / new :-( */ - dmx->Stop(); -#else - delete dmx; - dmx = NULL; -#endif + if (dmx) { + delete dmx; + dmx = NULL; + } } } diff --git a/src/eitd/dmx.h b/src/eitd/dmx.h index 42d42f34b..58ed2af28 100644 --- a/src/eitd/dmx.h +++ b/src/eitd/dmx.h @@ -63,18 +63,7 @@ protected: /* flag to check if there was section for that table, if yes, dont increase timeouts */ bool seen_section; - inline bool isOpen(void) { -#if HAVE_TRIPLEDRAGON - /* unfortunately, this is a bit complicated on TD :-( */ - if (dmx == NULL) - return false; - if (dmx->getBuffer() != NULL) /* getBuffer() is a dummy to indicate that demux is running */ - return true; - return false; -#else - return (dmx != NULL); -#endif - } + inline bool isOpen(void) { return (dmx != NULL); } int immediate_start(void); /* mutex must be locked before and unlocked after this method */ int immediate_stop(void); /* mutex must be locked before and unlocked after this method */ diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 0df4f86e3..97849b7e0 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -1217,39 +1217,6 @@ _remount: snprintf(cmd, sizeof(cmd), "%s/plugins", dst.c_str()); safe_mkdir(cmd); // sync(); -#if HAVE_TRIPLEDRAGON - /* on the tripledragon, we mount via fstab, so we need to add an - fstab entry for dst */ - FILE *g; - char *line = NULL; - unlink("/etc/fstab.new"); - g = fopen("/etc/fstab.new", "w"); - f = fopen("/etc/fstab", "r"); - if (!g) - perror("open /etc/fstab.new"); - else { - if (f) { - int ret; - while (true) { - size_t dummy; - ret = getline(&line, &dummy, f); - if (ret < 0) - break; - /* remove lines that start with the same disk we formatted - devname is /dev/xda" */ - if (strncmp(line, devname.c_str(), devname.length()) != 0) - fprintf(g, "%s", line); - } - free(line); - fclose(f); - } - /* now add our new entry */ - fprintf(g, "%s %s auto defaults 0 0\n", partname.c_str(), dst.c_str()); - fclose(g); - rename("/etc/fstab", "/etc/fstab.old"); - rename("/etc/fstab.new", "/etc/fstab"); - } -#endif } } _return: diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index b6bf16be1..61c5e746b 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -2203,49 +2203,6 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id, const int c return res; } -#if HAVE_TRIPLEDRAGON -/* the cheap COOLSTREAM display cannot do this, so keep the routines separate */ -void CInfoViewer::showLcdPercentOver() -{ - if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) - { - if (fileplay || NeutrinoModes::mode_ts == CNeutrinoApp::getInstance()->getMode()) { - CVFD::getInstance()->showPercentOver(CMoviePlayerGui::getInstance().file_prozent); - return; - } - static long long old_interval = 0; - int runningPercent = -1; - time_t jetzt = time(NULL); - long long interval = 60000000; /* 60 seconds default update time */ - if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) { - if (jetzt < info_CurrentNext.current_zeit.startzeit) - runningPercent = 0; - else if (jetzt > (int)(info_CurrentNext.current_zeit.startzeit + - info_CurrentNext.current_zeit.dauer)) - runningPercent = -2; /* overtime */ - else { - runningPercent = MIN((jetzt-info_CurrentNext.current_zeit.startzeit) * 100 / - info_CurrentNext.current_zeit.dauer, 100); - interval = info_CurrentNext.current_zeit.dauer * 1000LL * (1000/100); // update every percent - if (is_visible && interval > 60000000) // if infobar visible, update at - interval = 60000000; // least once per minute (radio mode) - if (interval < 5000000) - interval = 5000000; // but update only every 5 seconds - } - } - if (interval != old_interval) { - g_RCInput->killTimer(lcdUpdateTimer); - lcdUpdateTimer = g_RCInput->addTimer(interval, false); - //printf("lcdUpdateTimer: interval %lld old %lld\n",interval/1000000,old_interval/1000000); - old_interval = interval; - } - CLCD::getInstance()->showPercentOver(runningPercent); - int mode = CNeutrinoApp::getInstance()->getMode(); - if ((mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_tv)) - CVFD::getInstance()->setEPGTitle(info_CurrentNext.current_name); - } -} -#else void CInfoViewer::showLcdPercentOver () { if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) { @@ -2264,7 +2221,6 @@ void CInfoViewer::showLcdPercentOver () CVFD::getInstance ()->showPercentOver (runningPercent); } } -#endif void CInfoViewer::showEpgInfo() //message on event change { diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index aaa68fc2f..e51f6015d 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -180,11 +180,6 @@ void CMoviePlayerGui::Init(void) // video files filefilter_video.addFilter("ts"); -#if !HAVE_TRIPLEDRAGON - filefilter_video.addFilter("asf"); - filefilter_video.addFilter("avi"); - filefilter_video.addFilter("mkv"); -#endif filefilter_video.addFilter("flv"); filefilter_video.addFilter("iso"); filefilter_video.addFilter("m2p"); diff --git a/src/gui/videosettings.cpp b/src/gui/videosettings.cpp index 6a000f512..7fd26b105 100644 --- a/src/gui/videosettings.cpp +++ b/src/gui/videosettings.cpp @@ -211,31 +211,7 @@ const CMenuOptionChooser::keyval VIDEOMENU_VIDEOSIGNAL_HD1PLUS_CINCH_OPTIONS[VID * key value of -1 means the mode is not available * TODO: instead of #ifdef select at run time */ -#if HAVE_TRIPLEDRAGON -CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] = -{ - { VIDEO_STD_NTSC, NONEXISTANT_LOCALE, "NTSC" }, - { VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" }, - { VIDEO_STD_SECAM, NONEXISTANT_LOCALE, "SECAM" }, - { -1, NONEXISTANT_LOCALE, "480p" }, - { -1, NONEXISTANT_LOCALE, "576p" }, - { -1, NONEXISTANT_LOCALE, "720p 50Hz" }, - { -1, NONEXISTANT_LOCALE, "720p 60Hz" }, - { -1, NONEXISTANT_LOCALE, "1080i 50Hz" }, - { -1, NONEXISTANT_LOCALE, "1080i 60Hz" }, - { -1, NONEXISTANT_LOCALE, "1080p 23.97Hz"}, - { -1, NONEXISTANT_LOCALE, "1080p 24Hz" }, - { -1, NONEXISTANT_LOCALE, "1080p 25Hz" }, - { -1, NONEXISTANT_LOCALE, "1080p 29.97Hz"}, - { -1, NONEXISTANT_LOCALE, "1080p 50Hz" }, - { -1, NONEXISTANT_LOCALE, "1080p 60Hz" }, - { -1, NONEXISTANT_LOCALE, "2160p 24Hz" }, - { -1, NONEXISTANT_LOCALE, "2160p 25Hz" }, - { -1, NONEXISTANT_LOCALE, "2160p 30Hz" }, - { -1, NONEXISTANT_LOCALE, "2160p 50Hz" }, - { -1, NONEXISTANT_LOCALE, "Auto" } -}; -#elif BOXMODEL_CST_HD1 +#if BOXMODEL_CST_HD1 /* numbers corresponding to video.cpp from zapit */ CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] = { diff --git a/src/lcddisplay/lcddisplay.cpp b/src/lcddisplay/lcddisplay.cpp index a7858e61d..1d8c14a4a 100644 --- a/src/lcddisplay/lcddisplay.cpp +++ b/src/lcddisplay/lcddisplay.cpp @@ -63,12 +63,8 @@ CLCDDisplay::CLCDDisplay() } //graphic (binary) mode -#ifdef HAVE_TRIPLEDRAGON - if (ioctl(fd, IOC_LCD_WRMODE, LCD_MODE_BIN) < 0) -#else int i=LCD_MODE_BIN; if ( ioctl(fd,LCD_IOCTL_ASC_MODE,&i) < 0 ) -#endif { perror("graphic mode failed"); return; @@ -105,12 +101,8 @@ void CLCDDisplay::resume() } //graphic (binary) mode -#ifdef HAVE_TRIPLEDRAGON - if (ioctl(fd, IOC_LCD_WRMODE, LCD_MODE_BIN) < 0) -#else int i=LCD_MODE_BIN; if ( ioctl(fd,LCD_IOCTL_ASC_MODE,&i) < 0 ) -#endif { perror("graphic mode failed"); return; @@ -119,71 +111,6 @@ void CLCDDisplay::resume() paused = 0; } -#ifdef HAVE_TRIPLEDRAGON -void CLCDDisplay::convert_data() -{ - int x, y, xx, xp, yp; - unsigned char pix, bit; - - /* 128x64 (8bpp) membuffer -> 16*64 (1bpp) lcdbuffer */ - /* TODO: extend skins to 128x64 */ - - /* the strange offset handling comes from a bug (probably) in the - TD LCD driver: the MSB (0x80) of the first byte (lcd[0]) written to - the device actually appears on the lower right, 8 pixels up, so we - must shift the whole buffer one pixel to the right. This is wrong for - the column 127 (rightmost), which is shifted up 8 lines. - */ - for (y = 0; y < LCD_LINES; y++) { - for (x = 0; x < LCD_STRIDE; x++) { - pix = 0; - bit = 0x80; - - for (xx = x * 8; xx < x * 8 + 8; xx++, bit >>= 1) { - xp = xx - 1; /* shift the whole buffer one pixel to the right */ - yp = y; - if (xp < 0) { /* rightmost column (column 127) */ - xp += LCD_COLS; /* wraparound */ - yp -= 8; /* shift down 8 lines */ - if (yp < 0) /* wraparound */ - yp += LCD_LINES; - } - if (raw[yp][xp] == 1) - pix |= bit; - } -/* I was chasing this one for quite some time, so check it for now */ -#if 1 - if (y * LCD_STRIDE + x > LCD_BUFFER_SIZE) - fprintf(stderr, "%s: y (%d) * LCD_STRIDE (%d) + x (%d) (== %d) > LCD_BUFFER_SIZE (%d)\n", - __FUNCTION__, y, LCD_STRIDE, x, y*LCD_STRIDE+x, LCD_BUFFER_SIZE); - else -#endif - lcd[y * LCD_STRIDE + x] = pix; - } - } - -#if 0 -/* alternative solution, just ignore the rightmost column (which would be the - MSB of the first byte */ - for (y=0; y<64; y++){ - for (x=0; x<(128/8); x++){ - int pix=0, start = 0; - unsigned char bit = 0x80; - int offset=(y*128)+x*8; - if (x == 0) { /* first column, skip MSB */ - start = 1; - bit = 0x40; - } else - offset--; - for (yy=start; yy<8; yy++, bit >>=1) { - pix|=(_buffer[offset++]>=108)?bit:0; - } - raw[y*16+x]=pix; - } - } -#endif -} -#else void CLCDDisplay::convert_data () { #ifndef HAVE_GENERIC_HARDWARE @@ -205,7 +132,6 @@ void CLCDDisplay::convert_data () } #endif } -#endif void CLCDDisplay::update() { diff --git a/src/lcddisplay/lcddisplay.h b/src/lcddisplay/lcddisplay.h index 48339c2c5..a9b5cfb74 100644 --- a/src/lcddisplay/lcddisplay.h +++ b/src/lcddisplay/lcddisplay.h @@ -29,6 +29,7 @@ #ifdef HAVE_SPARK_HARDWARE #error src/lcddisplay/lcddisplay.h must not be included on SPARK #endif + #ifdef HAVE_GENERIC_HARDWARE // dummy #define LCD_ROWS 8 @@ -36,30 +37,6 @@ #define LCD_PIXEL_OFF 0 #define LCD_PIXEL_ON 1 #define LCD_PIXEL_INV 2 - -#else -#ifndef HAVE_TRIPLEDRAGON -/* dreambox is actually compatible to dbox2 wrt. lcd */ -#include -#define LCD_DEVICE "/dev/dbox/lcd0" -#else -#include -#include -#define LCD_LINES 64 -#define LCD_ROWS (LCD_LINES / 8) // compatibility with stupid DBOX LCD driver -#define LCD_COLS 128 -#define LCD_STRIDE (LCD_COLS / 8) -#define LCD_BUFFER_SIZE (LCD_LINES * LCD_STRIDE) -#define LCD_PIXEL_OFF 0 -#define LCD_PIXEL_ON 1 -#define LCD_PIXEL_INV 2 -#define LCD_DEVICE "/dev/" DEVICE_NAME_LCD -#define LCD_MODE_ASC 0 -#define LCD_MODE_BIN 2 -// ioctls -#define LCD_IOCTL_ASC_MODE IOC_LCD_WRMODE -#define LCD_IOCTL_CLEAR IOC_LCD_CLEAR -#endif #endif #include @@ -70,11 +47,7 @@ class CLCDDisplay { private: raw_display_t raw; -#ifdef HAVE_TRIPLEDRAGON - unsigned char lcd[LCD_BUFFER_SIZE]; -#else unsigned char lcd[LCD_ROWS][LCD_COLS]; -#endif int fd, paused; std::string iconBasePath; bool available; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 05ec75231..74d76b3a2 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -400,13 +400,10 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.softupdate_autocheck = configfile.getBool("softupdate_autocheck" , false); // video -#if HAVE_TRIPLEDRAGON - int vid_Mode_default = VIDEO_STD_PAL; -#else int vid_Mode_default = VIDEO_STD_720P50; if (getenv("NEUTRINO_DEFAULT_SCART") != NULL) vid_Mode_default = VIDEO_STD_PAL; -#endif + g_settings.video_Mode = configfile.getInt32("video_Mode", vid_Mode_default); #ifdef ANALOG_MODE g_settings.analog_mode1 = configfile.getInt32("analog_mode1", (int)ANALOG_MODE(BOTH,SD,RGB)); // default RGB @@ -4653,22 +4650,12 @@ void CNeutrinoApp::scartMode( bool bOnOff ) frameBuffer->paintBackground(); //g_Controld->setScartMode( 1 ); -#if HAVE_TRIPLEDRAGON - /* would this hurt on Coolstream? */ - videoDecoder->Stop(true); - videoDecoder->Standby(true); -#endif CVFD::getInstance()->setMode(CVFD::MODE_SCART); lastMode = mode; mode = NeutrinoModes::mode_scart; } else { // SCART AUS //g_Controld->setScartMode( 0 ); -#if HAVE_TRIPLEDRAGON - /* could actually go into radioMode() and tvMode()? */ - videoDecoder->Standby(false); - videoDecoder->Start(); -#endif mode = NeutrinoModes::mode_unknown; //re-set mode if( lastMode == NeutrinoModes::mode_radio || lastMode == NeutrinoModes::mode_webradio) { diff --git a/src/system/flashtool.cpp b/src/system/flashtool.cpp index 881e7f823..cbbe16ebb 100644 --- a/src/system/flashtool.cpp +++ b/src/system/flashtool.cpp @@ -44,11 +44,6 @@ #include #include -#if HAVE_TRIPLEDRAGON -/* TD kernel 2.6.12 is too old and does not have writesize yet, use oobsize instead */ -#define writesize oobsize -#endif - #ifdef ENABLE_LCD4LINUX #include "driver/lcd4l.h" extern CLCD4l *LCD4l; diff --git a/src/zapit/src/scanpmt.cpp b/src/zapit/src/scanpmt.cpp index c8c4ae7e2..4b06df726 100644 --- a/src/zapit/src/scanpmt.cpp +++ b/src/zapit/src/scanpmt.cpp @@ -417,16 +417,10 @@ int pmt_set_update_filter(CZapitChannel * const channel, int * fd) int pmt_stop_update_filter(int * fd) { DBG("[pmt] stop update filter\n"); -#if HAVE_TRIPLEDRAGON - if (pmtDemux) - delete pmtDemux; - /* apparently a close/reopen is needed on TD... */ - pmtDemux = NULL; -#else + if(pmtDemux) pmtDemux->Stop(); -#endif *fd = -1; - return 0; + return 0; }