From 3c5d25cc63a15efe6fe8ff80d6c6522ed546872c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 26 Sep 2016 18:35:56 +0200 Subject: [PATCH 1/9] lcd4l: try to fix encoding mess Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/bdbd8b55922e438ee0c82a5b5dc76751665746a2 Author: vanhofen Date: 2016-09-26 (Mon, 26 Sep 2016) Origin message was: ------------------ - lcd4l: try to fix encoding mess ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lcd4l.cpp | 28 ++++++++++++---------------- src/gui/lcd4l.h | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/gui/lcd4l.cpp b/src/gui/lcd4l.cpp index 44cfa1a1f..81cb04a77 100644 --- a/src/gui/lcd4l.cpp +++ b/src/gui/lcd4l.cpp @@ -792,13 +792,13 @@ bool CLCD4l::WriteFile(const char *file, std::string content, bool convert) if (convert) // align to internal lcd4linux font { - strReplace(content, "ä", "á"); - strReplace(content, "ö", "ï"); - strReplace(content, "ü", "õ"); - strReplace(content, "Ä", "Ae"); - strReplace(content, "Ö", "Oe"); - strReplace(content, "Ü", "Ue"); - strReplace(content, "ß", "â"); + strReplace(content, "ä", "\xe1\0"); + strReplace(content, "ö", "\xef\0"); + strReplace(content, "ü", "\xf5\0"); + strReplace(content, "Ä", "\xc4\0"); + strReplace(content, "Ö", "\xd6\0"); + strReplace(content, "Ü", "\xdc\0"); + strReplace(content, "ß", "\xe2\0"); strReplace(content, "é", "e"); } @@ -853,17 +853,13 @@ bool CLCD4l::CompareParseID(uint64_t &i_ParseID) return ret; } -// stolen from gui/movieinfo.cpp -void CLCD4l::strReplace(std::string & orig, const char *fstr, const std::string rstr) +void CLCD4l::strReplace(std::string &orig, const std::string &fstr, const std::string &rstr) { - unsigned int index = 0; - unsigned int fstrlen = strlen(fstr); - int rstrlen = rstr.size(); - - while ((index = orig.find(fstr, index)) != std::string::npos) + size_t pos = 0; + while ((pos = orig.find(fstr, pos)) != std::string::npos) { - orig.replace(index, fstrlen, rstr); - index += rstrlen; + orig.replace(pos, fstr.length(), rstr); + pos += rstr.length(); } } diff --git a/src/gui/lcd4l.h b/src/gui/lcd4l.h index a172bad48..7506e1b1a 100644 --- a/src/gui/lcd4l.h +++ b/src/gui/lcd4l.h @@ -80,7 +80,7 @@ class CLCD4l bool GetLogoName(uint64_t channel_id, std::string channel_name, std::string & logo); std::string hexStr(unsigned char* data); - void strReplace(std::string & orig, const char *fstr, const std::string rstr); + void strReplace(std::string &orig, const std::string &fstr, const std::string &rstr); bool WriteFile(const char *file, std::string content = "", bool convert = false); // Variables From c83282823eb4ffac1c151bfa0bbb4dcf51d05d84 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 27 Sep 2016 00:15:14 +0200 Subject: [PATCH 2/9] lcd4l: try to fix encoding mess again Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/100e6c2e69b62d035943e345ed750c269581cd8f Author: vanhofen Date: 2016-09-27 (Tue, 27 Sep 2016) Origin message was: ------------------ - lcd4l: try to fix encoding mess again ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lcd4l.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/lcd4l.cpp b/src/gui/lcd4l.cpp index 81cb04a77..13e9fcd86 100644 --- a/src/gui/lcd4l.cpp +++ b/src/gui/lcd4l.cpp @@ -792,9 +792,9 @@ bool CLCD4l::WriteFile(const char *file, std::string content, bool convert) if (convert) // align to internal lcd4linux font { - strReplace(content, "ä", "\xe1\0"); - strReplace(content, "ö", "\xef\0"); - strReplace(content, "ü", "\xf5\0"); + strReplace(content, "ä", "\xe4\0"); + strReplace(content, "ö", "\xf6\0"); + strReplace(content, "ü", "\xfc\0"); strReplace(content, "Ä", "\xc4\0"); strReplace(content, "Ö", "\xd6\0"); strReplace(content, "Ü", "\xdc\0"); From 8af87ddd678e575b10960b395b7d6a9a336f35be Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 27 Sep 2016 22:57:36 +0200 Subject: [PATCH 3/9] neutrino: remove ng leftovers Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3df9dbb93a3a383f7e69b8ce3df07e6ad62d48c7 Author: vanhofen Date: 2016-09-27 (Tue, 27 Sep 2016) Origin message was: ------------------ - neutrino: remove ng leftovers ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index bd868e310..dcf9b0434 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2103,9 +2103,9 @@ TIMER_START(); CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_NEUTRINO_STARTING)); //NI show startlogo - bool ng_startlogo = false; + bool startlogo = false; if (!show_startwizard) { - ng_startlogo = true; + startlogo = true; } else { hintBox->paint(); @@ -2153,7 +2153,7 @@ TIMER_START(); g_videoSettings->setVideoSettings(); //NI show startlogo - if (ng_startlogo) { + if (startlogo) { frameBuffer->showFrame("start.jpg"); } @@ -2266,8 +2266,8 @@ TIMER_START(); } //NI - show startlogo - if(ng_startlogo) { - ng_startlogo = false; + if (startlogo) { + startlogo = false; sleep(3); frameBuffer->stopFrame(); } From a45417ba8b9ec443d8108b806c26a004617d0763 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 28 Sep 2016 12:54:40 +0200 Subject: [PATCH 4/9] Revert "CInfoViewer: try to fix show current frontend before paint signallbars" This reverts commit 224c7a0545b9637c438e2bb117c665fd45c47acf. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/608247657cf266d4dc71d32ce889a4ab9555af16 Author: vanhofen Date: 2016-09-28 (Wed, 28 Sep 2016) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index eca6d3c89..e4a3799e3 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1744,8 +1744,7 @@ void CInfoViewer::showSNR () sigbox->setColorBody(numbox->getColorBody()); sigbox->doPaintBg(false); sigbox->enableTboxSaveScreen(numbox->getColBodyGradientMode()); - }else - sigbox->setFrontEnd(CFEManager::getInstance()->getLiveFE()); + } sigbox->paint(CC_SAVE_SCREEN_NO); } if(showButtonBar) From eb0ee7724c7ea9629a61677062711575306b2747 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 28 Sep 2016 12:55:02 +0200 Subject: [PATCH 5/9] Revert "CSignalBox: add missing member to set frontend" This reverts commit df3ffab9b6f9f60ceab1b2fa15dd67403843db9d. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0fbb5326da55f3cd06c79f1418ec422b2eea493c Author: vanhofen Date: 2016-09-28 (Wed, 28 Sep 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_signalbars.cpp | 5 +++-- src/gui/components/cc_frm_signalbars.h | 5 +---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index edc7804c2..ed43f3ade 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -339,9 +339,10 @@ void CSignalBox::paintScale() void CSignalBox::paint(bool do_save_bg) { //paint frame and body - initSignalItems(); - if (!is_painted) + if (!is_painted){ + initSignalItems(); paintForm(do_save_bg); + } //paint current signal value paintScale(); diff --git a/src/gui/components/cc_frm_signalbars.h b/src/gui/components/cc_frm_signalbars.h index c27b69962..be9ade31c 100644 --- a/src/gui/components/cc_frm_signalbars.h +++ b/src/gui/components/cc_frm_signalbars.h @@ -296,10 +296,7 @@ class CSignalBox : public CComponentsForm, public CCTextScreen ///returns the signal object, type = CSignalBar* CSignalBar* getScaleObject(){return sbar;}; ///returns the signal noise ratio object, type = CSignalNoiseRatioBar* - CSignalNoiseRatioBar* getLabelObject(){return snrbar;} - - ///assigns the current used frontend, simplified a tuner object, see frontend_c.h - void setFrontEnd(CFrontend *frontend_ref){sbx_frontend = frontend_ref;} + CSignalNoiseRatioBar* getLabelObject(){return snrbar;}; ///sets the caption color of signalbars, see also property 'sbx_caption_color' void setTextColor(const fb_pixel_t& caption_color){ sbx_caption_color = caption_color;}; From 7f241e9c9ee8f637f575f7777e4abfc1342b5220 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 28 Sep 2016 21:12:32 +0200 Subject: [PATCH 6/9] Revert "CSignalBox: Set current tuner as the default frontend" This reverts commit 960502da2a13839d1ba0e66eaf40331bbf921a37. Conflicts: src/gui/components/cc_frm_signalbars.h Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/59ac9e57e107eae188bc1cdab6a3e8988fe49513 Author: vanhofen Date: 2016-09-28 (Wed, 28 Sep 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_signalbars.cpp | 3 +-- src/gui/components/cc_frm_signalbars.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index ed43f3ade..703c5e67c 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -29,7 +29,6 @@ #include #include -#include #include "cc_frm_signalbars.h" #include @@ -256,7 +255,7 @@ CSignalBox::CSignalBox(const int& xpos, const int& ypos, const int& w, const int initVarSigBox(); vertical = vert; - sbx_frontend = (frontend_ref == NULL) ? CFEManager::getInstance()->getLiveFE() : frontend_ref; + sbx_frontend = frontend_ref; x = xpos; y = ypos; width = w; diff --git a/src/gui/components/cc_frm_signalbars.h b/src/gui/components/cc_frm_signalbars.h index be9ade31c..110060b66 100644 --- a/src/gui/components/cc_frm_signalbars.h +++ b/src/gui/components/cc_frm_signalbars.h @@ -291,7 +291,7 @@ class CSignalBox : public CComponentsForm, public CCTextScreen public: ///class constructor for signal noise ratio. - CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref = NULL, const bool vertical = true, CComponentsForm *parent = NULL, const std::string& sig_name = "SIG", const std::string& snr_name = "SNR" ); + CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const bool vertical = true, CComponentsForm *parent = NULL, const std::string& sig_name = "SIG", const std::string& snr_name = "SNR" ); ///returns the signal object, type = CSignalBar* CSignalBar* getScaleObject(){return sbar;}; From 631dcbf2440c68359dfc4b3806115a03a985fccd Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 28 Sep 2016 21:12:32 +0200 Subject: [PATCH 7/9] CSignalBox: add missing member to set frontend Remove double init of sig items; Will be done already by paintScale(). Ensure reset of last sig value on fe change. Prevent possible segfault if fe is not defined. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f68fd5ac19a4eda74a3bf2535a119a679a4d7371 Author: Thilo Graf Date: 2016-09-28 (Wed, 28 Sep 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_signalbars.cpp | 12 +++++++----- src/gui/components/cc_frm_signalbars.h | 5 ++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index 703c5e67c..4dc677e93 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -192,7 +192,9 @@ void CSignalBar::initSBarName() void CSignalBar::Refresh() { //get current value from frontend - sb_signal = sb_frontend->getSignalStrength(); + sb_signal = 0; + if (sb_frontend) + sb_signal = sb_frontend->getSignalStrength(); //reinit items with current values initSBItems(); @@ -242,7 +244,9 @@ void CSignalBar::paint(bool do_save_bg) void CSignalNoiseRatioBar::Refresh() { //get current value from frontend - sb_signal = sb_frontend->getSignalNoiseRatio(); + sb_signal = 0; + if (sb_frontend) + sb_signal = sb_frontend->getSignalNoiseRatio(); //reinit items with current values initSBItems(); @@ -338,10 +342,8 @@ void CSignalBox::paintScale() void CSignalBox::paint(bool do_save_bg) { //paint frame and body - if (!is_painted){ - initSignalItems(); + if (!is_painted) paintForm(do_save_bg); - } //paint current signal value paintScale(); diff --git a/src/gui/components/cc_frm_signalbars.h b/src/gui/components/cc_frm_signalbars.h index 110060b66..b69516a6c 100644 --- a/src/gui/components/cc_frm_signalbars.h +++ b/src/gui/components/cc_frm_signalbars.h @@ -116,7 +116,7 @@ class CSignalBar : public CComponentsForm, public CCTextScreen CSignalBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const std::string& sb_name = "SIG", CComponentsForm *parent = NULL); ///assigns the current used frontend, simplified a tuner object, see frontend_c.h - virtual void setFrontEnd(CFrontend *frontend_ref){sb_frontend = frontend_ref;}; + virtual void setFrontEnd(CFrontend *frontend_ref){if (sb_frontend != frontend_ref) {sb_lastsig = 0; sb_frontend = frontend_ref;}} ///assigns font for caption virtual void setTextFont(Font* font_text){sb_font = font_text;}; ///sets the caption color, see also property 'sb_caption_color' @@ -298,6 +298,9 @@ class CSignalBox : public CComponentsForm, public CCTextScreen ///returns the signal noise ratio object, type = CSignalNoiseRatioBar* CSignalNoiseRatioBar* getLabelObject(){return snrbar;}; + ///assigns the current used frontend, simplified a tuner object, see frontend_c.h + void setFrontEnd(CFrontend *frontend_ref){sbx_frontend = frontend_ref;} + ///sets the caption color of signalbars, see also property 'sbx_caption_color' void setTextColor(const fb_pixel_t& caption_color){ sbx_caption_color = caption_color;}; ///get caption color of signalbars, see also property 'sbx_caption_color' From 74e7a6901f3d4a7e96c0ce55ad7616b173562125 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 28 Sep 2016 21:12:32 +0200 Subject: [PATCH 8/9] CInfoViewer: allow fe change without new sigbox object Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ad189f180da464086d0e3b6333dc0f7e38d973bf Author: Thilo Graf Date: 2016-09-28 (Wed, 28 Sep 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index e65128d75..2fed5ce3c 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1658,12 +1658,13 @@ void CInfoViewer::showSNR () } if (sigbox == NULL){ int sigbox_offset = ChanWidth *10/100; - sigbox = new CSignalBox(BoxStartX + sigbox_offset, y_numbox+ChanHeight/2, ChanWidth - 2*sigbox_offset, ChanHeight/2, CFEManager::getInstance()->getLiveFE(), true, NULL, "S", "Q"); + sigbox = new CSignalBox(BoxStartX + sigbox_offset, y_numbox+ChanHeight/2, ChanWidth - 2*sigbox_offset, ChanHeight/2, NULL, true, NULL, "S", "Q"); sigbox->setTextColor(COL_INFOBAR_TEXT); sigbox->setColorBody(numbox->getColorBody()); sigbox->doPaintBg(false); sigbox->enableTboxSaveScreen(numbox->getColBodyGradientMode()); } + sigbox->setFrontEnd(CFEManager::getInstance()->getLiveFE()); sigbox->paint(CC_SAVE_SCREEN_NO); } if(showButtonBar) From 5542fae5782e2e86c28459615cc2f2e6d9ab6b6a Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 28 Sep 2016 21:12:32 +0200 Subject: [PATCH 9/9] channellist: paint events in additional box in a separated thread Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d35cf3cd55988dc86ff7fc5ac63ce127d91ca428 Author: TangoCash Date: 2016-09-28 (Wed, 28 Sep 2016) Origin message was: ------------------ - channellist: paint events in additional box in a separated thread ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 80 +++++++++++++++++++++++++++++++++++++---- src/gui/channellist.h | 13 +++++-- 2 files changed, 85 insertions(+), 8 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index aba0ff042..82518bc4c 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -63,6 +63,7 @@ #include #include #include +#include #include #include @@ -126,6 +127,8 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl move_state = beDefault; edit_state = false; channelsChanged = false; + + paint_events_index = -2; } CChannelList::~CChannelList() @@ -157,6 +160,8 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to) return; size_t chanlist_size = to - from; + if (chanlist_size <= 0) // WTF??? + return; CChannelEventList events; if (displayNext) { @@ -184,16 +189,18 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to) for (uint32_t count = 0; count < chanlist_size; count++) p_requested_channels[count] = (*chanlist)[count + from]->getEpgID(); - CEitManager::getInstance()->getChannelEvents(events, p_requested_channels, chanlist_size); + CChannelEventList levents; + CEitManager::getInstance()->getChannelEvents(levents, p_requested_channels, chanlist_size); for (uint32_t count=0; count < chanlist_size; count++) { (*chanlist)[count + from]->currentEvent = CChannelEvent(); - for (CChannelEventList::iterator e = events.begin(); e != events.end(); ++e) { + for (CChannelEventList::iterator e = levents.begin(); e != levents.end(); ++e) { if (((*chanlist)[count + from]->getEpgID()&0xFFFFFFFFFFFFULL) == e->get_channel_id()) { (*chanlist)[count + from]->currentEvent = *e; break; } } } + levents.clear(); delete[] p_requested_channels; } } @@ -919,6 +926,8 @@ int CChannelList::show() } } + paint_events(-2); // cancel paint_events thread + if (move_state == beMoving) cancelMoveChannel(); if (edit_state) @@ -2269,9 +2278,70 @@ void CChannelList::paintPig (int _x, int _y, int w, int h) } void CChannelList::paint_events(int index) +{ + if (index == -2 && paint_events_index > -2) { + pthread_mutex_lock(&paint_events_mutex); + paint_events_index = index; + sem_post(&paint_events_sem); + pthread_join(paint_events_thr, NULL); + sem_destroy(&paint_events_sem); + pthread_mutex_unlock(&paint_events_mutex); + } else if (paint_events_index == -2) { + if (index == -2) + return; + // First paint_event. No need to lock. + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP); + pthread_mutex_init(&paint_events_mutex, &attr); + + sem_init(&paint_events_sem, 0, 0); + paint_events_index = index; + if (!pthread_create(&paint_events_thr, NULL, paint_events, (void *) this)) + sem_post(&paint_events_sem); + else + paint_events_index = -2; + } else { + pthread_mutex_lock(&paint_events_mutex); + paint_events_index = index; + pthread_mutex_unlock(&paint_events_mutex); + sem_post(&paint_events_sem); + } +} + +void *CChannelList::paint_events(void *arg) +{ + CChannelList *me = (CChannelList *) arg; + me->paint_events(); + pthread_exit(NULL); +} + +void CChannelList::paint_events() +{ + set_threadname(__func__); + + while (paint_events_index != -2) { + sem_wait(&paint_events_sem); + if (paint_events_index < 0) + continue; + while(!sem_trywait(&paint_events_sem)); + int current_index = paint_events_index; + + CChannelEventList evtlist; + readEvents((*chanlist)[current_index]->getChannelID(), evtlist); + if (current_index == paint_events_index) { + pthread_mutex_lock(&paint_events_mutex); + if (current_index == paint_events_index) + paint_events_index = -1; + pthread_mutex_unlock(&paint_events_mutex); + paint_events(evtlist); + } + } +} + +void CChannelList::paint_events(CChannelEventList &evtlist) { ffheight = g_Font[eventFont]->getHeight(); - readEvents((*chanlist)[index]->getEpgID()); frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0); char startTime[10]; @@ -2333,8 +2403,6 @@ void CChannelList::paint_events(int index) } i++; } - if ( !evtlist.empty() ) - evtlist.clear(); } static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b) @@ -2342,7 +2410,7 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b) return a.startTime < b.startTime; } -void CChannelList::readEvents(const t_channel_id channel_id) +void CChannelList::readEvents(const t_channel_id channel_id, CChannelEventList &evtlist) { CEitManager::getInstance()->getEventsServiceKey(channel_id , evtlist); diff --git a/src/gui/channellist.h b/src/gui/channellist.h index d1bd179e4..49d057105 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -46,6 +46,8 @@ #include #include +#include +#include enum { LIST_MODE_FAV, @@ -117,6 +119,11 @@ private: int infozone_height; int previous_channellist_additional; + int paint_events_index; + sem_t paint_events_sem; + pthread_t paint_events_thr; + pthread_mutex_t paint_events_mutex; + const char * unit_short_minute; CEPGData epgData; @@ -147,9 +154,11 @@ private: void calcSize(); std::string MaxChanNr(); void paintPig(int x, int y, int w, int h); + void paint_events(); void paint_events(int index); - CChannelEventList evtlist; - void readEvents(const t_channel_id channel_id); + void paint_events(CChannelEventList &evtlist); + static void *paint_events(void *arg); + void readEvents(const t_channel_id channel_id, CChannelEventList &evtlist); void showdescription(int index); typedef std::pair epg_pair; std::vector epgText;