diff --git a/lib/libdvbsub/dvbsub.cpp b/lib/libdvbsub/dvbsub.cpp index 3af6d17fe..fe08ec2d9 100644 --- a/lib/libdvbsub/dvbsub.cpp +++ b/lib/libdvbsub/dvbsub.cpp @@ -15,6 +15,7 @@ #include "PacketQueue.hpp" #include "helpers.hpp" #include "dvbsubtitle.h" +#include #define Log2File printf #define RECVBUFFER_STEPSIZE 1024 @@ -243,6 +244,7 @@ static void* reader_thread(void * /*arg*/) int len; uint16_t packlen; uint8_t* buf; + set_threadname("dvbsub:reader"); dmx = new cDemux(0); dmx->Open(DMX_PES_CHANNEL, NULL, 64*1024); @@ -339,7 +341,7 @@ static void* dvbsub_thread(void* /*arg*/) { struct timespec restartWait; struct timeval now; - + set_threadname("dvbsub:main"); sub_debug.print(Debug::VERBOSE, "%s started\n", __FUNCTION__); if (!dvbSubtitleConverter) dvbSubtitleConverter = new cDvbSubtitleConverter; diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 67890f7c9..d43d9f01b 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -19,6 +19,7 @@ #include #include #include +#include /* same as in rcinput.h... */ #define KEY_TTTV KEY_FN_1 @@ -1514,6 +1515,7 @@ static void cleanup_fb_pan() static void* reader_thread(void * /*arg*/) { printf("TuxTxt subtitle thread started\n"); + set_threadname("tuxtxt:reader"); reader_running = 1; //ttx_paused = 0; while(reader_running) { diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h index 2d9e07d25..22682e41d 100644 --- a/lib/libtuxtxt/tuxtxt_common.h +++ b/lib/libtuxtxt/tuxtxt_common.h @@ -12,6 +12,7 @@ #endif #include +#include tuxtxt_cache_struct tuxtxt_cache; static pthread_mutex_t tuxtxt_cache_lock = PTHREAD_MUTEX_INITIALIZER; @@ -587,6 +588,7 @@ void *tuxtxt_CacheThread(void * /*arg*/) unsigned char pagedata[9][23*40]; tstPageinfo *pageinfo_thread; + set_threadname("tuxtxt:cache"); printf("TuxTxt running thread...(%04x)\n",tuxtxt_cache.vtxtpid); tuxtxt_cache.receiving = 1; nice(3); diff --git a/lib/sectionsdclient/sectionsdMsg.h b/lib/sectionsdclient/sectionsdMsg.h index 440feabae..fb71f8322 100644 --- a/lib/sectionsdclient/sectionsdMsg.h +++ b/lib/sectionsdclient/sectionsdMsg.h @@ -92,7 +92,6 @@ struct sectionsd struct commandSetConfig { - int scanMode; int epg_cache; int epg_old_events; unsigned int epg_max_events; @@ -327,7 +326,6 @@ struct sectionsd // // setConfig // data of request: -// int scanMode; -> updating of services and bouquets -> saved in auto_scanning // int epg_cache; -> in days -> saved in secondsToCache // int epg_old_events; -> in hours -> saved in oldEventsAre // unsigned int epg_max_events; -> #of saved events -> saved in max_events diff --git a/lib/sectionsdclient/sectionsdclient.cpp b/lib/sectionsdclient/sectionsdclient.cpp index c6be1fac2..a8a3c4648 100644 --- a/lib/sectionsdclient/sectionsdclient.cpp +++ b/lib/sectionsdclient/sectionsdclient.cpp @@ -199,7 +199,6 @@ void CSectionsdClient::setConfig(const epg_config config) char* pData = new char[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1]; msg = (sectionsd::commandSetConfig *)pData; - msg->scanMode = config.scanMode; msg->epg_cache = config.epg_cache; msg->epg_old_events = config.epg_old_events; msg->epg_max_events = config.epg_max_events; diff --git a/lib/sectionsdclient/sectionsdclient.h b/lib/sectionsdclient/sectionsdclient.h index c827d83b5..8ba8dfab0 100644 --- a/lib/sectionsdclient/sectionsdclient.h +++ b/lib/sectionsdclient/sectionsdclient.h @@ -154,7 +154,6 @@ class CSectionsdClient : private CBasicClient typedef struct { - int scanMode; int epg_cache; int epg_old_events; int epg_max_events; diff --git a/src/driver/audioplay.cpp b/src/driver/audioplay.cpp index 4359956ba..956319297 100644 --- a/src/driver/audioplay.cpp +++ b/src/driver/audioplay.cpp @@ -43,6 +43,7 @@ #include #include #include // UTF8 +#include void CAudioPlayer::stop() { @@ -88,6 +89,7 @@ CAudioPlayer* CAudioPlayer::getInstance() void* CAudioPlayer::PlayThread( void* /*dummy*/ ) { int soundfd = -1; + set_threadname("audio:play"); g_RCInput->close_click(); /* Decode stdin to stdout. */ CBaseDec::RetCode Status = diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index 32991598f..9c79991c6 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -169,6 +169,8 @@ class CFbAccelTD void paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t col); void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp); void waitForIdle(const char *func = NULL); + void setBlendMode(uint8_t); + void setBlendLevel(int); }; #endif diff --git a/src/driver/fb_accel_td.cpp b/src/driver/fb_accel_td.cpp index 7cddcfa3c..af3bf8f60 100644 --- a/src/driver/fb_accel_td.cpp +++ b/src/driver/fb_accel_td.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -143,6 +144,7 @@ void CFbAccelTD::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t 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... */ @@ -174,3 +176,29 @@ int CFbAccelTD::setMode(unsigned int, unsigned int, unsigned int) 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); +} diff --git a/src/driver/fb_generic.cpp b/src/driver/fb_generic.cpp index 93666f32b..c1b8b55a1 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -82,6 +82,7 @@ CFrameBuffer::CFrameBuffer() fb_name = "generic framebuffer"; iconBasePath = ""; available = 0; + cache_size = 0; cmap.start = 0; cmap.len = 256; cmap.red = red; @@ -93,6 +94,7 @@ CFrameBuffer::CFrameBuffer() background = NULL; backupBackground = NULL; backgroundFilename = ""; + locked = false; fd = 0; tty = 0; m_transparent_default = CFrameBuffer::TM_BLACK; // TM_BLACK: Transparency when black content ('pseudo' transparency) @@ -173,8 +175,6 @@ void CFrameBuffer::init(const char * const fbDevice) goto nolfb; } - cache_size = 0; - /* Windows Colors */ paletteSetColor(0x1, 0x010101, tr); paletteSetColor(0x2, 0x800000, tr); @@ -240,13 +240,14 @@ CFrameBuffer::~CFrameBuffer() if (lfb) munmap(lfb, available); + lfb = NULL; if (virtual_fb){ delete[] virtual_fb; virtual_fb = NULL; } close(fd); - close(tty); + fd = -1; v_fbarea.clear(); } @@ -748,6 +749,12 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i width = (header.width_hi << 8) | header.width_lo; height = (header.height_hi << 8) | header.height_lo; + if (width > 768) { + /* this is not going to happen, but check anyway */ + printf("%s: icon %s too wide (%d)\n", __func__, filename.c_str(), (int)width); + close(lfd); + return false; + } unsigned char pixbuf[768]; uint8_t * d = ((uint8_t *)getFrameBufferPointer()) + x * sizeof(fb_pixel_t) + stride * y; @@ -768,6 +775,7 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i d += stride; } close(lfd); + mark(x, y, x + width, y + height); return true; } diff --git a/src/driver/lcdd.cpp b/src/driver/lcdd.cpp index 74193ed4b..3ff7e111c 100644 --- a/src/driver/lcdd.cpp +++ b/src/driver/lcdd.cpp @@ -47,6 +47,7 @@ #include #include +#include #include extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ @@ -139,6 +140,7 @@ void CLCD::wake_up() { #ifndef BOXMODEL_DM500 void* CLCD::TimeThread(void *) { + set_threadname("lcd:time"); while(1) { sleep(1); diff --git a/src/driver/netfile.cpp b/src/driver/netfile.cpp index f7ac9658e..12270fb93 100644 --- a/src/driver/netfile.cpp +++ b/src/driver/netfile.cpp @@ -108,6 +108,7 @@ #include #include #include +#include /* TODO: - ICECAST support @@ -1603,6 +1604,7 @@ void CacheFillThread(void *c) if(scache->closed) return; + set_threadname("netfile:cache"); dprintf(stderr, "CacheFillThread: thread started, using stream %p\n", scache->fd); buf = (char*)malloc(CACHEBTRANS); diff --git a/src/driver/scanepg.cpp b/src/driver/scanepg.cpp index 39b9040d3..39e89bb5b 100644 --- a/src/driver/scanepg.cpp +++ b/src/driver/scanepg.cpp @@ -91,7 +91,7 @@ void CEpgScan::ConfigureEIT() count++; } } - INFO("added %d channels to EIT white list\n", count); + INFO("added %d channels to EIT white list", count); } void CEpgScan::Clear() diff --git a/src/driver/shutdown_count.cpp b/src/driver/shutdown_count.cpp index 0bd113656..9bba124cf 100644 --- a/src/driver/shutdown_count.cpp +++ b/src/driver/shutdown_count.cpp @@ -35,6 +35,7 @@ #include #include #include +#include SHTDCNT::SHTDCNT() @@ -55,6 +56,7 @@ SHTDCNT* SHTDCNT::getInstance() void* SHTDCNT::TimeThread(void *) { + set_threadname("n:shtdcnt"); while(1) { sleep(1); diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index 94ee98ec0..691714d25 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -369,9 +369,11 @@ bool CStreamManager::Parse(int fd, stream_pids_t &pids, t_channel_id &chid, CFro bp = &cbuf[0]; /* read one line */ - while (bp - &cbuf[0] < (int) sizeof(cbuf)) { + while (bp - &cbuf[0] < (int) sizeof(cbuf) - 1) { unsigned char c; int res = read(fd, &c, 1); + if (res == 0) + break; if (res < 0) { perror("read"); return false; @@ -379,12 +381,11 @@ bool CStreamManager::Parse(int fd, stream_pids_t &pids, t_channel_id &chid, CFro if ((*bp++ = c) == '\n') break; } + *bp = 0; - *bp++ = 0; + printf("CStreamManager::Parse: got %d bytes '%s'", (int)(bp-&cbuf[0]), cbuf); bp = &cbuf[0]; - printf("CStreamManager::Parse: got %s\n", cbuf); - /* send response to http client */ if (!strncmp(cbuf, "GET /", 5)) { fprintf(fp, "HTTP/1.1 200 OK\r\nServer: streamts (%s)\r\n\r\n", "ts" /*&argv[1][1]*/); diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 88f7fe61b..3af811a04 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -2069,6 +2069,7 @@ static void print_meminfo(void) static void *houseKeepingThread(void *) { int count = 0, scount = 0, ecount = 0; + set_threadname("sd:housekeeping"); dprintf("housekeeping-thread started.\n"); pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0); diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index b9035e8db..9ca52c03c 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -25,6 +25,7 @@ #include #include #include "cc_draw.h" +#include "cc_timer.h" #include #include @@ -774,6 +775,7 @@ bool CCDraw::paintBlink(const int& interval, bool is_nano) { if (cc_draw_timer == NULL) cc_draw_timer = new CComponentsTimer(interval, is_nano); + cc_draw_timer->setThreadName(__func__); return paintBlink(cc_draw_timer); } @@ -794,4 +796,4 @@ bool CCDraw::cancelBlink(bool keep_on_screen) return res; -} \ No newline at end of file +} diff --git a/src/gui/components/cc_draw.h b/src/gui/components/cc_draw.h index a144433ec..50be8a71d 100644 --- a/src/gui/components/cc_draw.h +++ b/src/gui/components/cc_draw.h @@ -27,7 +27,6 @@ #include "cc_types.h" #include "cc_signals.h" -#include "cc_timer.h" #include #include #include @@ -38,6 +37,7 @@ Basic paint attributes and member functions for component classes */ +class CComponentsTimer; class CCDraw : public COSDFader, public CComponentsSignals { protected: diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index b52180456..0f4329ea3 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -29,6 +29,7 @@ #include #include "cc_frm_clock.h" +#include "cc_timer.h" #include #include @@ -320,6 +321,7 @@ bool CComponentsFrmClock::startClock() if (cl_timer == NULL){ cl_timer = new CComponentsTimer(0); + cl_timer->setThreadName("frmClock"); if (cl_timer->OnTimer.empty()){ dprintf(DEBUG_INFO,"\033[33m[CComponentsFrmClock]\t[%s] init slot...\033[0m\n", __func__); cl_timer->OnTimer.connect(cl_sl_show); diff --git a/src/gui/components/cc_frm_clock.h b/src/gui/components/cc_frm_clock.h index 22da0af26..23eb726ce 100644 --- a/src/gui/components/cc_frm_clock.h +++ b/src/gui/components/cc_frm_clock.h @@ -34,13 +34,13 @@ #include #include "cc_base.h" #include "cc_frm.h" -#include "cc_timer.h" #include "cc_text_screen.h" //! Sub class of CComponents. Show clock with digits on screen. /*! Usable as simple fixed display or as ticking clock. */ +class CComponentsTimer; class CComponentsFrmClock : public CComponentsForm, public CCTextScreen { private: diff --git a/src/gui/components/cc_timer.cpp b/src/gui/components/cc_timer.cpp index 11ae9b35e..a7b7e13ca 100644 --- a/src/gui/components/cc_timer.cpp +++ b/src/gui/components/cc_timer.cpp @@ -33,11 +33,13 @@ #include #include #include +#include using namespace std; CComponentsTimer::CComponentsTimer(const int& interval, bool is_nano) { + name = "unnamed"; tm_thread = 0; tm_interval = interval; tm_enable_nano = is_nano; @@ -56,7 +58,8 @@ CComponentsTimer::~CComponentsTimer() void CComponentsTimer::runSharedTimerAction() { //start loop - + string tn = "cc:"+name; + set_threadname(tn.c_str()); while(tm_enable && tm_interval > 0) { tm_mutex.lock(); OnTimer(); diff --git a/src/gui/components/cc_timer.h b/src/gui/components/cc_timer.h index 530224f40..c7e2d21cd 100644 --- a/src/gui/components/cc_timer.h +++ b/src/gui/components/cc_timer.h @@ -63,6 +63,9 @@ class CComponentsTimer : public sigc::trackable ///flag to control thread state bool tm_enable; + ///name for the thread + std::string name; + ///mutex for timer OpenThreads::Mutex tm_mutex; ///slot for restart signals @@ -120,6 +123,13 @@ class CComponentsTimer : public sigc::trackable */ void setTimerInterval(const int& interval, bool is_nano = false); + /**set thread name + * @param[in] thread name + * @return + * void + */ + void setThreadName(const std::string& n) { name = n; }; + /**Provides a signal handler to receive any function or methode. * Use this in your class where ever you need time controled actions. * diff --git a/src/gui/epgview.h b/src/gui/epgview.h index 9477c2f3e..f8473714d 100644 --- a/src/gui/epgview.h +++ b/src/gui/epgview.h @@ -40,8 +40,6 @@ #include #include "widget/menue.h" -#include - #include #include diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index c0c15af52..90542ba26 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -28,7 +28,6 @@ #define __EVENTLIST_HPP__ #include -#include #include #include diff --git a/src/gui/infoviewer_bb.h b/src/gui/infoviewer_bb.h index a763848f1..c6861d73d 100644 --- a/src/gui/infoviewer_bb.h +++ b/src/gui/infoviewer_bb.h @@ -33,8 +33,6 @@ #ifndef __infoview_bb__ #define __infoview_bb__ -#include - #include #include #include diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 9e367f4d2..45ef2b6ed 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -34,6 +34,7 @@ #include #include #include "hintbox.h" +#include #include #include @@ -187,8 +188,10 @@ void CHintBox::enableTimeOutBar(bool enable) timeout_pb = new CProgressBar(); timeout_pb->setDimensionsAll(ccw_body->getRealXPos(), ccw_body->getRealYPos(), ccw_body->getWidth(), TIMEOUT_BAR_HEIGHT); timeout_pb->setValues(0, 100*timeout); - if (!timeout_pb_timer) + if (!timeout_pb_timer) { timeout_pb_timer = new CComponentsTimer(1, true); + timeout_pb_timer->setThreadName("hb:tmoutbar"); + } timeout_pb_timer->OnTimer.connect(sigc::mem_fun0(this, &CHintBox::showTimeOutBar)); timeout_pb_timer->startTimer(); } @@ -199,7 +202,6 @@ int CHintBox::exec() neutrino_msg_t msg; neutrino_msg_data_t data; int res = messages_return::none; - if (timeout == NO_TIMEOUT || timeout == DEFAULT_TIMEOUT) timeout = HINTBOX_DEFAULT_TIMEOUT; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 70a2229b2..abb8a86d8 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4069,6 +4069,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby ) if(g_settings.mode_icons && g_settings.mode_icons_skin == INFOICONS_POPUP) InfoIcons->saveIconstate(); + CEpgScan::getInstance()->Start(true); bool alive = recordingstatus || CEpgScan::getInstance()->Running() || CStreamManager::getInstance()->StreamStatus(); if(!alive) @@ -4081,7 +4082,6 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby ) frameBuffer->setActive(false); // Active standby on powerManager->SetStandby(false, false); - CEpgScan::getInstance()->Start(true); if (scansettings.fst_update) fst_timer = g_RCInput->addTimer(30*1000*1000, true); } else { diff --git a/src/nhttpd/tuxboxapi/neutrinoapi.h b/src/nhttpd/tuxboxapi/neutrinoapi.h index 82c9abbf3..5936e194b 100644 --- a/src/nhttpd/tuxboxapi/neutrinoapi.h +++ b/src/nhttpd/tuxboxapi/neutrinoapi.h @@ -7,7 +7,6 @@ // tuxbox #include -#include #include #include diff --git a/src/nhttpd/yhttpd_core/ywebserver.cpp b/src/nhttpd/yhttpd_core/ywebserver.cpp index 0a8b4d77a..e1a5f149d 100644 --- a/src/nhttpd/yhttpd_core/ywebserver.cpp +++ b/src/nhttpd/yhttpd_core/ywebserver.cpp @@ -118,7 +118,7 @@ CWebserver::~CWebserver() { #define MAX_TIMEOUTS_TO_CLOSE 10 #define MAX_TIMEOUTS_TO_TEST 100 bool CWebserver::run(void) { - set_threadname(__func__); + set_threadname("ywebsrv::run"); if (!listenSocket.listen(port, HTTPD_MAX_CONNECTIONS)) { if (port != 80) { fprintf(stderr, "[yhttpd] Socket cannot bind and listen on port %d Abort.\n", port); diff --git a/src/timerd/timerd.cpp b/src/timerd/timerd.cpp index c1661b305..26b22fabf 100644 --- a/src/timerd/timerd.cpp +++ b/src/timerd/timerd.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include "debug.h" #include "timermanager.h" @@ -483,7 +484,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) int timerd_main_thread(void *data) { pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0); - + set_threadname("n:timerd"); printf("timerd startup, tid %ld\n", syscall(__NR_gettid)); CBasicServer timerd_server; diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index b9170ff68..feb437eb5 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -42,7 +42,7 @@ #include "debug.h" #include "timermanager.h" - +#include extern bool timeset; time_t timer_minutes; @@ -89,6 +89,7 @@ void* CTimerManager::timerThread(void *arg) pthread_mutex_t dummy_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t dummy_cond = PTHREAD_COND_INITIALIZER; struct timespec wait; + set_threadname("n:timermanager"); CTimerManager *timerManager = (CTimerManager*) arg; diff --git a/src/zapit/src/Makefile.am b/src/zapit/src/Makefile.am index 0130f3a8a..96e700284 100644 --- a/src/zapit/src/Makefile.am +++ b/src/zapit/src/Makefile.am @@ -34,7 +34,6 @@ libzapit_a_SOURCES = \ zapit.cpp bin_PROGRAMS = pzapit -sbin_PROGRAMS = udpstreampes pzapit_SOURCES = \ pzapit.cpp @@ -44,12 +43,3 @@ pzapit_LDADD = \ $(top_builddir)/lib/connection/libtuxbox-connection.a \ -lOpenThreads \ -lpthread - -udpstreampes_SOURCES = \ - udpstreampes.cpp - -udpstreampes_LDADD = \ - $(top_builddir)/src/zapit/lib/libzapitclient.a \ - $(top_builddir)/lib/connection/libtuxbox-connection.a \ - -lOpenThreads \ - -lpthread diff --git a/src/zapit/src/femanager.cpp b/src/zapit/src/femanager.cpp index c79f34153..2cf50a6a4 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -115,7 +115,7 @@ bool CFEManager::Init() for (unsigned i = 0; i < MAX_DMX_UNITS; i++) dmap.push_back(CFeDmx(i)); - INFO("found %d frontends, %d demuxes\n", (int)femap.size(), (int)dmap.size()); + INFO("found %d frontends, %d demuxes", (int)femap.size(), (int)dmap.size()); if (femap.empty()) return false; @@ -463,7 +463,7 @@ void CFEManager::linkFrontends(bool init) for(unsigned i = 0; i < MAX_DMX_UNITS; i++) { if (demuxes[i] == 0) { unused_demux = i; - INFO("pip demux: %d\n", unused_demux); + INFO("pip demux: %d", unused_demux); break; } } diff --git a/src/zapit/src/getservices.cpp b/src/zapit/src/getservices.cpp index 0d9fac984..e44a36ad8 100644 --- a/src/zapit/src/getservices.cpp +++ b/src/zapit/src/getservices.cpp @@ -1121,7 +1121,11 @@ bool CServiceManager::CopyCurrentServices(transponder_id_t tpid) updated = true; printf("CServiceManager::CopyCurrentServices: [%s] add\n", cI->second.getName().c_str()); } else { - if(cI->second.scrambled != aI->second.scrambled || cI->second.getName() != aI->second.getName()) { + if (cI->second.getName() != aI->second.getName() +#ifdef UPDATE_CHANNELS_ON_SCRAMBLED_CHANGE + || cI->second.scrambled != aI->second.scrambled +#endif + ) { aI->second.setName(cI->second.getName()); aI->second.scrambled = cI->second.scrambled; aI->second.flags = CZapitChannel::UPDATED; @@ -1229,7 +1233,11 @@ bool CServiceManager::SaveCurrentServices(transponder_id_t tpid) if(ccI == allchans.end()) { WriteCurrentService(fd, satfound, tpdone, updated, satstr, tI->second, cI->second, "add"); } else { - if(strcmp(cI->second.getRealname().c_str(), ccI->second.getRealname().c_str()) || cI->second.scrambled != ccI->second.scrambled) { + if (strcmp(cI->second.getRealname().c_str(), ccI->second.getRealname().c_str()) +#ifdef UPDATE_CHANNELS_ON_SCRAMBLED_CHANGE + || cI->second.scrambled != ccI->second.scrambled +#endif + ) { cI->second.number = ccI->second.number; WriteCurrentService(fd, satfound, tpdone, updated, satstr, tI->second, cI->second, "replace"); } diff --git a/src/zapit/src/scan.cpp b/src/zapit/src/scan.cpp index 150bf5b08..29d59eea8 100644 --- a/src/zapit/src/scan.cpp +++ b/src/zapit/src/scan.cpp @@ -137,6 +137,11 @@ void CServiceScan::CleanAllMaps() bool CServiceScan::tuneFrequency(FrontendParameters *feparams, t_satellite_position satellitePosition) { + if (! frontend->supportsDelivery(feparams->delsys)) { + printf("[scan] [fe%d] does not support delivery system %d, skipping\n", + frontend->getNumber(), feparams->delsys); + return false; + } frontend->setInput(satellitePosition, feparams->frequency, feparams->polarization); int ret = frontend->driveToSatellitePosition(satellitePosition, false); //true); if(ret > 0) {