From c8da6fe89fb6818f497d9324fcfebacee5e0636a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 8 Nov 2017 09:28:34 +0100 Subject: [PATCH] cleanup from unsupported DUCKBOX_HARDWARE Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/bc0de587217e5699d385737234103add09b5561f Author: vanhofen Date: 2017-11-08 (Wed, 08 Nov 2017) Origin message was: ------------------ - cleanup from unsupported DUCKBOX_HARDWARE --- lib/libtuxtxt/teletext.h | 2 +- lib/libtuxtxt/tuxtxt.cpp | 50 +++++++++++++++++----------------- lib/libtuxtxt/tuxtxt_common.h | 18 ++++++------ src/driver/fade.cpp | 6 ++-- src/driver/radiotext.cpp | 6 ++-- src/driver/screenshot.cpp | 12 ++++---- src/driver/screenshot.h | 2 +- src/gui/audio_select.cpp | 10 +++---- src/gui/movieplayer.cpp | 36 ++++++++++++------------ src/gui/movieplayer.h | 2 +- src/system/setting_helpers.cpp | 2 +- src/system/setting_helpers.h | 2 +- 12 files changed, 74 insertions(+), 74 deletions(-) diff --git a/lib/libtuxtxt/teletext.h b/lib/libtuxtxt/teletext.h index 2966513b2..871fde92f 100644 --- a/lib/libtuxtxt/teletext.h +++ b/lib/libtuxtxt/teletext.h @@ -6,7 +6,7 @@ int tuxtxt_init(); void tuxtxt_close(); void tuxtxt_start(int tpid, int source = 0); // Start caching int tuxtxt_stop(); // Stop caching -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE int tuxtx_main(int pid, int page = 0, int source = 0, bool _isEplayer = false); #else int tuxtx_main(int pid, int page = 0, int source = 0); diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index a31b83491..3314d7c5a 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -29,7 +29,7 @@ #define KEY_TTZOOM KEY_FN_2 #define KEY_REVEAL KEY_FN_D -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE #define MARK_FB(a, b, c, d) if (p == lfb) CFrameBuffer::getInstance()->mark(a, b, (a) + (c), (b) + (d)) #else #define MARK_FB(a, b, c, d) @@ -44,7 +44,7 @@ static int ttx_req_pause; static int sub_pid, sub_page; static bool use_gui; static int cfg_national_subset; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE bool isTtxEplayer = false; #endif @@ -1553,7 +1553,7 @@ void tuxtx_pause_subtitle(bool pause) //printf("TuxTxt subtitle unpause, running %d pid %d page %d\n", reader_running, sub_pid, sub_page); ttx_paused = 0; if(!reader_running && sub_pid && sub_page) -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE tuxtx_main(sub_pid, sub_page, 0, isTtxEplayer); #else tuxtx_main(sub_pid, sub_page); @@ -1615,7 +1615,7 @@ int tuxtx_subtitle_running(int *pid, int *page, int *running) return ret; } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE int tuxtx_main(int pid, int page, int source, bool isEplayer) #else int tuxtx_main(int pid, int page, int source) @@ -1623,7 +1623,7 @@ int tuxtx_main(int pid, int page, int source) { char cvs_revision[] = "$Revision: 1.95 $"; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE if (isTtxEplayer != isEplayer) { tuxtxt_stop(); tuxtxt_clear_cache(); @@ -1653,7 +1653,7 @@ int tuxtx_main(int pid, int page, int source) CFrameBuffer *fbp = CFrameBuffer::getInstance(); lfb = fbp->getFrameBufferPointer(); lbb = fbp->getBackBufferPointer(); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE fb_pixel_t old_border_color = fbp->getBorderColor(); #endif @@ -1848,7 +1848,7 @@ int tuxtx_main(int pid, int page, int source) /* update page or timestring and lcd */ RenderPage(); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE fbp->blit(); #endif } while ((RCCode != RC_HOME) && (RCCode != RC_STANDBY)); @@ -1862,7 +1862,7 @@ int tuxtx_main(int pid, int page, int source) if ( initialized ) tuxtxt_close(); #endif -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE fbp->setBorderColor(old_border_color); #endif @@ -2319,7 +2319,7 @@ void CleanUp() ******************************************************************************/ int GetTeletextPIDs() { -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE if (isTtxEplayer) return 0; #endif @@ -2336,7 +2336,7 @@ int GetTeletextPIDs() unsigned char mask[DMX_FILTER_SIZE] = { 0 }; int res; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE cDemux * dmx = new cDemux(0); // live demux #else cDemux * dmx = new cDemux(1); @@ -3401,7 +3401,7 @@ void ConfigMenu(int Init) break; } } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CopyBB2FB(); #endif UpdateLCD(); /* update number of cached pages */ @@ -3696,7 +3696,7 @@ void PageCatching() RCCode = -1; return; } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CopyBB2FB(); #endif UpdateLCD(); @@ -3853,14 +3853,14 @@ void RenderCatchedPage() if (zoommode == 1 && catch_row > 11) { zoommode = 2; -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE CopyBB2FB(); #endif } else if (zoommode == 2 && catch_row < 12) { zoommode = 1; -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE CopyBB2FB(); #endif } @@ -3885,7 +3885,7 @@ void RenderCatchedPage() RenderCharFB(page_char[catch_row*40 + catch_col ], &a0); RenderCharFB(page_char[catch_row*40 + catch_col + 1], &a1); RenderCharFB(page_char[catch_row*40 + catch_col + 2], &a2); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CopyBB2FB(); #endif } @@ -3996,7 +3996,7 @@ void SwitchScreenMode(int newscreenmode) setfontwidth(fw); CFrameBuffer *f = CFrameBuffer::getInstance(); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE if (!boxed && (f->get3DMode() == CFrameBuffer::Mode3D_off)) videoDecoder->Pig(tx, ty, tw, th, f->getScreenWidth(true), f->getScreenHeight(true), @@ -4893,7 +4893,7 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset) void RenderCharFB(int Char, tstPageAttr *Attribute) { -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE if (zoommode != 2) RenderCharBB(Char, Attribute); #else @@ -5051,7 +5051,7 @@ void RenderMessage(int Message) for (byte = 0; byte < 38; byte++) RenderCharFB(message_6[byte], &atrtable[imenuatr + 2]); national_subset = national_subset_back; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CFrameBuffer::getInstance()->blit(); #endif } @@ -5163,7 +5163,7 @@ void DoFlashing(int startrow) } PosY += fontheight*factor; } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CopyBB2FB(); #endif } @@ -5375,7 +5375,7 @@ void RenderPage() RenderCharFB(ns[0],&atrtable[ATR_WB]); RenderCharFB(ns[1],&atrtable[ATR_WB]); RenderCharFB(ns[2],&atrtable[ATR_WB]); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CopyBB2FB(); #endif @@ -5595,7 +5595,7 @@ void CopyBB2FB() { fb_pixel_t *src, *dst, *topsrc; int fillcolor, i, screenwidth, swtmp; -#if HAVE_SPARK_HARDWARE || HAVE_COOL_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_COOL_HARDWARE CFrameBuffer *f = CFrameBuffer::getInstance(); #endif @@ -5606,7 +5606,7 @@ void CopyBB2FB() /* copy backbuffer to framebuffer */ if (!zoommode) { -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE f->blit2FB(lbb, var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, 0, true); #elif HAVE_COOL_HARDWARE f->fbCopyArea(var_screeninfo.xres, var_screeninfo.yres, 0, 0, 0, var_screeninfo.yres); @@ -5629,7 +5629,7 @@ void CopyBB2FB() FillBorder(*lbb, true); // ClearBB(*(lfb + var_screeninfo.xres * var_screeninfo.yoffset)); } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE f->blit(); #endif @@ -5660,7 +5660,7 @@ void CopyBB2FB() if (screenmode == 1) { screenwidth = ( TV43STARTX ); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE int cx = var_screeninfo.xres - TV43STARTX; /* x start */ int cw = TV43STARTX; /* width */ int cy = StartY; @@ -5705,7 +5705,7 @@ void CopyBB2FB() for (swtmp=0; swtmp<= screenwidth;swtmp++) *(dst + stride * (fontheight + i) + swtmp) = bgra[fillcolor]; } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE f->mark(0, 0, var_screeninfo.xres, var_screeninfo.yres); f->blit(); #endif diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h index 6127a4b76..718da9502 100644 --- a/lib/libtuxtxt/tuxtxt_common.h +++ b/lib/libtuxtxt/tuxtxt_common.h @@ -571,7 +571,7 @@ void tuxtxt_allocate_cache(int magazine) pthread_mutex_unlock(&tuxtxt_cache_lock); } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE /****************************************************************************** * Handling of packets injected by libeplayer3 * ******************************************************************************/ @@ -663,7 +663,7 @@ static bool read_injected_packet(unsigned char * &packet, int &size, int timeout /****************************************************************************** * CacheThread * ******************************************************************************/ -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE extern bool isTtxEplayer; #endif static int stop_cache = 0; @@ -680,7 +680,7 @@ void *tuxtxt_CacheThread(void * /*arg*/) 0x30,0xb0,0x70,0xf0 }; unsigned char pes_packet_dmx[184*20]; unsigned char *pes_packet_ptr = NULL; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE unsigned char *pes_packet_eplayer3 = NULL; #endif unsigned char vtxt_row[42]; @@ -692,7 +692,7 @@ void *tuxtxt_CacheThread(void * /*arg*/) unsigned char pagedata[9][23*40]; tstPageinfo *pageinfo_thread; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE sem_init(&inject_sem, 0, 0); #endif set_threadname("tuxtxt:cache"); @@ -710,7 +710,7 @@ void *tuxtxt_CacheThread(void * /*arg*/) /* read packet */ ssize_t readcnt = 0; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE if (isTtxEplayer) { pes_packet_ptr = NULL; if (pes_packet_eplayer3) { @@ -1188,7 +1188,7 @@ void *tuxtxt_CacheThread(void * /*arg*/) } pthread_mutex_unlock(&tuxtxt_cache_biglock); } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE if (pes_packet_eplayer3) free(pes_packet_eplayer3); #endif @@ -1205,14 +1205,14 @@ int tuxtxt_start_thread(int source) return 0; tuxtxt_cache.thread_starting = 1; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE if (!isTtxEplayer) { #endif tuxtxt_init_demuxer(source); dmx->pesFilter(tuxtxt_cache.vtxtpid); dmx->Start(); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE } #endif stop_cache = 0; @@ -1260,7 +1260,7 @@ int tuxtxt_stop_thread() delete dmx; dmx = NULL; } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE clear_inject_queue(); #endif #if 1//TUXTXT_DEBUG diff --git a/src/driver/fade.cpp b/src/driver/fade.cpp index daefa3696..0c9ee156e 100644 --- a/src/driver/fade.cpp +++ b/src/driver/fade.cpp @@ -58,7 +58,7 @@ void COSDFader::StartFadeIn() frameBuffer->setBlendMode(2); // Global alpha multiplied with pixel alpha frameBuffer->setBlendLevel(fadeValue); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_CS_HD2)) +#if HAVE_SPARK_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_CS_HD2)) usleep(60000); #endif fadeTimer = g_RCInput->addTimer( FADE_TIME, false ); @@ -86,7 +86,7 @@ void COSDFader::StopFade() if ( fadeIn || fadeOut ) { g_RCInput->killTimer(fadeTimer); frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_CS_HD2)) +#if HAVE_SPARK_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_CS_HD2)) usleep(60000); #endif fadeIn = fadeOut = false; @@ -113,7 +113,7 @@ bool COSDFader::FadeDone() g_RCInput->killTimer (fadeTimer); fadeIn = false; frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_CS_HD2)) +#if HAVE_SPARK_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_CS_HD2)) usleep(60000); #endif } else diff --git a/src/driver/radiotext.cpp b/src/driver/radiotext.cpp index a97def1fa..0412fc648 100644 --- a/src/driver/radiotext.cpp +++ b/src/driver/radiotext.cpp @@ -2376,7 +2376,7 @@ void CRadioText::run() uint current_pid = 0; printf("CRadioText::run: ###################### Starting thread ######################\n"); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || HAVE_GENERIC_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE int buflen = 0; unsigned char *buf = NULL; audioDemux = new cDemux(0); // live demux @@ -2407,7 +2407,7 @@ void CRadioText::run() } mutex.unlock(); if (pid) { -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || HAVE_GENERIC_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE int n; unsigned char tmp[6]; @@ -2450,7 +2450,7 @@ void CRadioText::run() } } } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || HAVE_GENERIC_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE if (buf) free(buf); #endif diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index cf5739ee4..cac959886 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -61,7 +61,7 @@ CScreenShot::CScreenShot(const std::string fname, screenshot_format_t fmt) format = fmt; filename = fname; pixel_data = NULL; -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE fd = NULL; xres = 0; yres = 0; @@ -85,14 +85,14 @@ CScreenShot::CScreenShot(const std::string fname, screenshot_format_t fmt) CScreenShot::~CScreenShot() { -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE pthread_mutex_destroy(&thread_mutex); pthread_mutex_destroy(&getData_mutex); #endif // printf("[CScreenShot::%s:%d] thread: %p\n", __func__, __LINE__, this); } -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE #ifdef BOXMODEL_CS_HD2 @@ -224,7 +224,7 @@ bool CScreenShot::startThread() } #endif -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE void* CScreenShot::initThread(void *arg) { CScreenShot *scs = static_cast(arg); @@ -268,7 +268,7 @@ bool CScreenShot::Start() bool CScreenShot::Start(const std::string custom_cmd) { #endif -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE std::string cmd = "/bin/grab "; if (get_osd && !get_video) cmd += "-o "; @@ -311,7 +311,7 @@ bool CScreenShot::Start(const std::string custom_cmd) #endif } -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE /* save file in sync mode, return true if save ok, or false */ bool CScreenShot::StartSync() { diff --git a/src/driver/screenshot.h b/src/driver/screenshot.h index 2200e5caa..714f55323 100644 --- a/src/driver/screenshot.h +++ b/src/driver/screenshot.h @@ -48,7 +48,7 @@ class CScreenShot bool get_osd; bool get_video; bool scale_to_video; -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE FILE *fd; pthread_t scs_thread; pthread_mutex_t thread_mutex; diff --git a/src/gui/audio_select.cpp b/src/gui/audio_select.cpp index 500558b2b..534412c59 100644 --- a/src/gui/audio_select.cpp +++ b/src/gui/audio_select.cpp @@ -70,7 +70,7 @@ CAudioSelectMenuHandler::~CAudioSelectMenuHandler() } -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE // -- this is a copy from neutrino.cpp!! #define AUDIOMENU_ANALOGOUT_OPTION_COUNT 3 const CMenuOptionChooser::keyval AUDIOMENU_ANALOGOUT_OPTIONS[AUDIOMENU_ANALOGOUT_OPTION_COUNT] = @@ -103,7 +103,7 @@ int CAudioSelectMenuHandler::exec(CMenuTarget* parent, const std::string &action } perc_str[sel] = to_string(perc_val[sel]) + "%"; -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE int vol = CZapit::getInstance()->GetVolume(); /* keep resulting volume = (vol * percent)/100 not more than 115 */ if (vol * perc_val[sel] > 11500) @@ -150,7 +150,7 @@ int CAudioSelectMenuHandler::doMenu () AudioSelector->addKey(CRCInput::RC_right, this, "+"); AudioSelector->addKey(CRCInput::RC_left, this, "-"); AudioSelector->addKey(CRCInput::RC_red, this, "x"); -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE AudioSelector->addKey(CRCInput::RC_green, this, "x"); #endif AudioSelector->addKey(CRCInput::RC_yellow, this, "x"); @@ -192,7 +192,7 @@ int CAudioSelectMenuHandler::doMenu () AudioSelector->addItem(fw, sel_apid == i); } unsigned int shortcut_num = p_count; -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE if (p_count) AudioSelector->addItem(GenericMenuSeparatorLine); @@ -298,7 +298,7 @@ int CAudioSelectMenuHandler::doMenu () //tonbug AudioSelector->addItem(GenericMenuSeparatorLine); -#if !HAVE_SPARK_HARDWARE && !HAVE_DUCKBOX_HARDWARE +#if !HAVE_SPARK_HARDWARE AudioSelector->addItem(new CMenuForwarder(LOCALE_CI_RESET, true, NULL, CNeutrinoApp::getInstance(), "tonbug", CRCInput::convertDigitToKey(++shortcut_num))); #else AudioSelector->addItem(new CMenuForwarder(LOCALE_CI_RESET, true, NULL, CNeutrinoApp::getInstance(), "tonbug", CRCInput::RC_green)); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index c6b6c04e5..29c43f945 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -89,7 +89,7 @@ bool glcd_play = false; #include #include #include -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE #include #endif @@ -1379,19 +1379,19 @@ bool CMoviePlayerGui::PlayFileStart(void) duration = p_movie_info->length * 60 * 1000; int percent = CZapit::getInstance()->GetPidVolume(p_movie_info->channelId, currentapid, currentac3 == 1); CZapit::getInstance()->SetVolumePercent(percent); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CScreenSetup cSS; cSS.showBorder(p_movie_info->epgId); #endif } else { -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CScreenSetup cSS; cSS.showBorder(0); #endif } file_prozent = 0; -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE old3dmode = frameBuffer->get3DMode(); #endif #ifdef ENABLE_GRAPHLCD @@ -1456,7 +1456,7 @@ bool CMoviePlayerGui::PlayFileStart(void) repeat_mode = (repeat_mode_enum) g_settings.movieplayer_repeat_on; playstate = CMoviePlayerGui::PLAY; CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, true); -#if HAVE_DUCKBOX_HARDWARE || HAVE_SPARK_HARDWARE +#if HAVE_SPARK_HARDWARE CVFD::getInstance()->ShowIcon(FP_ICON_FR, false); CVFD::getInstance()->ShowIcon(FP_ICON_FF, false); CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, false); @@ -1488,7 +1488,7 @@ bool CMoviePlayerGui::PlayFileStart(void) if (g_settings.timeshift_pause) { playstate = CMoviePlayerGui::PAUSE; -#if HAVE_DUCKBOX_HARDWARE || HAVE_SPARK_HARDWARE +#if HAVE_SPARK_HARDWARE CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, false); CVFD::getInstance()->ShowIcon(FP_ICON_FR, false); CVFD::getInstance()->ShowIcon(FP_ICON_FF, false); @@ -1814,7 +1814,7 @@ void CMoviePlayerGui::PlayFileLoop(void) repeat_mode = REPEAT_OFF; g_settings.movieplayer_repeat_on = repeat_mode; callInfoViewer(); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE } else if (msg == (neutrino_msg_t) g_settings.mpkey_next3dmode) { frameBuffer->set3DMode((CFrameBuffer::Mode3D)(((frameBuffer->get3DMode()) + 1) % CFrameBuffer::Mode3D_SIZE)); #endif @@ -1830,7 +1830,7 @@ void CMoviePlayerGui::PlayFileLoop(void) FileTimeOSD->setMpTimeForced(false); if (playstate > CMoviePlayerGui::PLAY) { playstate = CMoviePlayerGui::PLAY; -#if HAVE_DUCKBOX_HARDWARE || HAVE_SPARK_HARDWARE +#if HAVE_SPARK_HARDWARE CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, true); CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, false); CVFD::getInstance()->ShowIcon(FP_ICON_FR, false); @@ -1875,7 +1875,7 @@ void CMoviePlayerGui::PlayFileLoop(void) if (playstate == CMoviePlayerGui::PAUSE) { playstate = CMoviePlayerGui::PLAY; //CVFD::getInstance()->ShowIcon(VFD_ICON_PAUSE, false); -#if HAVE_DUCKBOX_HARDWARE || HAVE_SPARK_HARDWARE +#if HAVE_SPARK_HARDWARE CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, true); CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, false); CVFD::getInstance()->ShowIcon(FP_ICON_FR, false); @@ -1886,7 +1886,7 @@ void CMoviePlayerGui::PlayFileLoop(void) } else { playstate = CMoviePlayerGui::PAUSE; //CVFD::getInstance()->ShowIcon(VFD_ICON_PAUSE, true); -#if HAVE_DUCKBOX_HARDWARE || HAVE_SPARK_HARDWARE +#if HAVE_SPARK_HARDWARE CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, false); CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, true); CVFD::getInstance()->ShowIcon(FP_ICON_FR, false); @@ -1932,7 +1932,7 @@ void CMoviePlayerGui::PlayFileLoop(void) bool setSpeed = false; if (msg == (neutrino_msg_t) g_settings.mpkey_rewind) { newspeed = (speed >= 0) ? -1 : (speed - 1); -#if HAVE_DUCKBOX_HARDWARE || HAVE_SPARK_HARDWARE +#if HAVE_SPARK_HARDWARE CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, true); CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, false); CVFD::getInstance()->ShowIcon(FP_ICON_FR, true); @@ -1940,7 +1940,7 @@ void CMoviePlayerGui::PlayFileLoop(void) #endif } else { newspeed = (speed <= 0) ? 2 : (speed + 1); -#if HAVE_DUCKBOX_HARDWARE || HAVE_SPARK_HARDWARE +#if HAVE_SPARK_HARDWARE CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, true); CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, false); CVFD::getInstance()->ShowIcon(FP_ICON_FR, false); @@ -2055,7 +2055,7 @@ void CMoviePlayerGui::PlayFileLoop(void) #if 0 clearSubtitle(); #endif -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE } else if (msg == CRCInput::RC_text) { int pid = playback->GetFirstTeletextPid(); if (pid > -1) { @@ -2194,7 +2194,7 @@ void CMoviePlayerGui::PlayFileEnd(bool restore) playback->SetSpeed(1); playback->Close(); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE frameBuffer->set3DMode(old3dmode); CScreenSetup cSS; cSS.showBorder(CZapit::getInstance()->GetCurrentChannelID()); @@ -2213,7 +2213,7 @@ void CMoviePlayerGui::PlayFileEnd(bool restore) CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, false); CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, false); -#if HAVE_DUCKBOX_HARDWARE || HAVE_SPARK_HARDWARE +#if HAVE_SPARK_HARDWARE CVFD::getInstance()->ShowIcon(FP_ICON_FR, false); CVFD::getInstance()->ShowIcon(FP_ICON_FF, false); #endif @@ -2799,7 +2799,7 @@ void CMoviePlayerGui::UpdatePosition() void CMoviePlayerGui::StopSubtitles(bool enable_glcd_mirroring __attribute__((unused))) { -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE printf("[CMoviePlayerGui] %s\n", __FUNCTION__); int ttx, ttxpid, ttxpage; @@ -2850,7 +2850,7 @@ void CMoviePlayerGui::showHelp() void CMoviePlayerGui::StartSubtitles(bool show __attribute__((unused))) { -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE printf("[CMoviePlayerGui] %s: %s\n", __FUNCTION__, show ? "Show" : "Not show"); #ifdef ENABLE_GRAPHLCD nGLCD::MirrorOSD(false); @@ -3537,7 +3537,7 @@ void CMoviePlayerGui::makeScreenShot(bool autoshot, bool forcover) sc->SetSize(w, h); } } -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE sc->Start("-r 320 -j 75"); #else sc->Start(); diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 1b68e6173..d247b92dc 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -183,7 +183,7 @@ class CMoviePlayerGui : public CMenuTarget MI_MOVIE_INFO movie_info; P_MI_MOVIE_LIST milist; const static short MOVIE_HINT_BOX_TIMER = 5; // time to show bookmark hints in seconds -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE CFrameBuffer::Mode3D old3dmode; #endif diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 37d72cd42..c3ce6b08b 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -504,7 +504,7 @@ printf("CSubtitleChangeExec::exec: TTX, pid %x page %x lang %s\n", pid, page, pt playback->SetSubtitlePid(0); playback->SetTeletextPid(pid); tuxtx_set_pid(pid, page, ptr); -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE tuxtx_main(pid, page, 0, true); #else tuxtx_main(pid, page, 0); diff --git a/src/system/setting_helpers.h b/src/system/setting_helpers.h index 210fb0714..70a310d2f 100644 --- a/src/system/setting_helpers.h +++ b/src/system/setting_helpers.h @@ -37,7 +37,7 @@ #include #include #include -#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE +#if HAVE_SPARK_HARDWARE #include #endif