From fed7126cbce8c32c581c39b306449750f335b408 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 7 May 2017 21:48:16 +0200 Subject: [PATCH 01/19] epgview: minor change in navibar's epg_date format Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/dfd3cdb9a6105c1aa3f34155098e00e0d1feea7c Author: vanhofen Date: 2017-05-07 (Sun, 07 May 2017) Origin message was: ------------------ - epgview: minor change in navibar's epg_date format ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/epgview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index f6833352b..2d49f9b28 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -1428,7 +1428,7 @@ void CEpgData::GetEPGData(const t_channel_id channel_id, uint64_t id, time_t* st char temp[20]={0}; strftime( temp, sizeof(temp),"%d.%m.%Y", pStartZeit); epg_date = g_Locale->getText(CLocaleManager::getWeekday(pStartZeit)); - epg_date += "."; + epg_date += ", "; //NI epg_date += temp; strftime( temp, sizeof(temp), "%H:%M", pStartZeit); epg_start= temp; From 1148afc62bb589f42d7bc2e98547876a1dc119a9 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 8 May 2017 07:53:58 +0200 Subject: [PATCH 02/19] movieplayer.cpp: remove possible compile issue "__STDC_LIMIT_MACROS" redefined Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/65b09044c5a207485ec8e1b832b32a491586157d Author: Thilo Graf Date: 2017-05-08 (Mon, 08 May 2017) ------------------ This commit was generated by Migit --- src/gui/movieplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 46e222231..b62e3d603 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -27,7 +27,7 @@ #include #endif -#define __STDC_LIMIT_MACROS + #include #include #include From 46bd5911eec3c14dae8a64d0f45f1dda571149bd Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 8 May 2017 08:11:30 +0200 Subject: [PATCH 03/19] CNaviBar: prevent compiler warning -Wshadow Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/970390a32069a9f4e7bc5268854f92000086277d Author: Thilo Graf Date: 2017-05-08 (Mon, 08 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/navibar.cpp | 6 +++--- src/gui/widget/navibar.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/widget/navibar.cpp b/src/gui/widget/navibar.cpp index 74e1db74e..6afb1d46e 100644 --- a/src/gui/widget/navibar.cpp +++ b/src/gui/widget/navibar.cpp @@ -31,8 +31,8 @@ using namespace std; -CNaviBar::CNaviBar( const int& x, - const int& y, +CNaviBar::CNaviBar( const int& x_pos, + const int& y_pos, const int& dx, const int& dy, CComponentsForm* parent, @@ -40,7 +40,7 @@ CNaviBar::CNaviBar( const int& x, fb_pixel_t& color_frame, fb_pixel_t& color_body, fb_pixel_t& color_shadow) - : CComponentsFrmChain( x, y, dx, dy, + : CComponentsFrmChain( x_pos, y_pos, dx, dy, NULL, CC_DIR_X, parent, diff --git a/src/gui/widget/navibar.h b/src/gui/widget/navibar.h index 1bc71b6fe..cb3cbe08f 100644 --- a/src/gui/widget/navibar.h +++ b/src/gui/widget/navibar.h @@ -53,9 +53,9 @@ class CNaviBar : public CComponentsFrmChain public: /**CNaviBar Constructor - * @param[in] x + * @param[in] x_pos * @li expects type int, x position - * @param[in] y + * @param[in] y_ypos * @li expects type int, y position * @param[in] dx * @li expects type int, width @@ -74,8 +74,8 @@ class CNaviBar : public CComponentsFrmChain * * @see class CComponentsFrmChain() */ - CNaviBar( const int& x, - const int& y, + CNaviBar( const int& x_pos, + const int& y_pos, const int& dx, const int& dy, CComponentsForm* parent = NULL, From 0a2db29f3ca3092124efe5e0e47b8801e63b48c6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 8 May 2017 08:19:55 +0200 Subject: [PATCH 04/19] CChannelList: fix code indentation Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9fd3b27d61d6e1b087ba614030ad3803f50474ec Author: Thilo Graf Date: 2017-05-08 (Mon, 08 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 176 ++++++++++++++++++++-------------------- 1 file changed, 90 insertions(+), 86 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 4a3735f5b..16f03c41b 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -360,96 +360,100 @@ int CChannelList::doChannelMenu(void) CBouquetList *blist = tvmode ? TVfavList : RADIOfavList; bool fav_found = true; switch(select) { - case 0: {// edit mode - bool unlocked = true; - if (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED) { - int pl_z = g_settings.parentallock_zaptime * 60; - if (g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT] == CPersonalizeGui::PERSONALIZE_MODE_PIN) { - unlocked = false; - } else if (bouquet && bouquet->zapitBouquet && bouquet->zapitBouquet->bLocked) { - /* on locked bouquet, enough to check any channel */ - unlocked = ((*chanlist)[selected]->last_unlocked_time + pl_z > time_monotonic()); + case 0: // edit mode + { + bool unlocked = true; + if (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED) { + int pl_z = g_settings.parentallock_zaptime * 60; + + if (g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT] == CPersonalizeGui::PERSONALIZE_MODE_PIN) { + unlocked = false; + } else if (bouquet && bouquet->zapitBouquet && bouquet->zapitBouquet->bLocked) { + /* on locked bouquet, enough to check any channel */ + unlocked = ((*chanlist)[selected]->last_unlocked_time + pl_z > time_monotonic()); + } else { + /* check all locked channels for last_unlocked_time, overwrite only if already unlocked */ + for (unsigned int j = 0 ; j < (*chanlist).size(); j++) { + if ((*chanlist)[j]->bLocked) + unlocked = unlocked && ((*chanlist)[j]->last_unlocked_time + pl_z > time_monotonic()); + } + } + if (!unlocked) { + CZapProtection *zp = new CZapProtection(g_settings.parentallock_pincode, 0x100); + unlocked = zp->check(); + delete zp; + } + } + if (unlocked) + editMode(true); + + ret = -1; + break; + } + case 1: // add to + if (!addChannelToBouquet()) + return -1; + ret = 1; + break; + case 2: // add to my favorites + for (unsigned n = 0; n < AllFavBouquetList->Bouquets.size(); n++) { + if (AllFavBouquetList->Bouquets[n]->zapitBouquet && AllFavBouquetList->Bouquets[n]->zapitBouquet->bFav) { + CZapitChannel *ch = AllFavBouquetList->Bouquets[n]->zapitBouquet->getChannelByChannelID(channel_id); + if (ch == NULL) { + AllFavBouquetList->Bouquets[n]->zapitBouquet->addService((*chanlist)[selected]); + fav_found = false; + } + break; + } + } + for (unsigned n = 0; n < blist->Bouquets.size() && !fav_found; n++) { + if (blist->Bouquets[n]->zapitBouquet && blist->Bouquets[n]->zapitBouquet->bFav) { + blist->Bouquets[n]->zapitBouquet->getChannels(blist->Bouquets[n]->channelList->channels, tvmode); + saveChanges(); + fav_found = true; + break; + } + } + if (!fav_found) { + CNeutrinoApp::getInstance()->MarkFavoritesChanged(); + CNeutrinoApp::getInstance()->MarkChannelsInit(); + } + ret = 1; + break; + case 3: // reset new + case 4: // reset all new + if (select == 3) { + (*chanlist)[selected]->flags = CZapitChannel::UPDATED; } else { - /* check all locked channels for last_unlocked_time, overwrite only if already unlocked */ - for (unsigned int j = 0 ; j < (*chanlist).size(); j++) { - if ((*chanlist)[j]->bLocked) - unlocked = unlocked && ((*chanlist)[j]->last_unlocked_time + pl_z > time_monotonic()); - } + for (unsigned int j = 0 ; j < (*chanlist).size(); j++) + (*chanlist)[j]->flags = CZapitChannel::UPDATED; } - if (!unlocked) { - CZapProtection *zp = new CZapProtection(g_settings.parentallock_pincode, 0x100); - unlocked = zp->check(); - delete zp; + CNeutrinoApp::getInstance()->MarkChannelsChanged(); + /* if make_new_list == ON, signal to re-init services */ + if(g_settings.make_new_list) + CNeutrinoApp::getInstance()->MarkChannelsInit(); + break; + case 5: // clear channel history + { + CNeutrinoApp::getInstance()->channelList->getLastChannels().clear(); + printf("%s:%d lastChList cleared\n", __FUNCTION__, __LINE__); + ret = -2; // exit channellist } - } - if (unlocked) - editMode(true); - ret = -1; - break; - }case 1: // add to - if (!addChannelToBouquet()) - return -1; - ret = 1; - break; - case 2: // add to my favorites - for (unsigned n = 0; n < AllFavBouquetList->Bouquets.size(); n++) { - if (AllFavBouquetList->Bouquets[n]->zapitBouquet && AllFavBouquetList->Bouquets[n]->zapitBouquet->bFav) { - CZapitChannel *ch = AllFavBouquetList->Bouquets[n]->zapitBouquet->getChannelByChannelID(channel_id); - if (ch == NULL) { - AllFavBouquetList->Bouquets[n]->zapitBouquet->addService((*chanlist)[selected]); - fav_found = false; - } - break; + break; + case 6: // settings + { + previous_channellist_additional = g_settings.channellist_additional; + COsdSetup osd_setup; + osd_setup.showContextChanlistMenu(this); + hide(); + ResetModules(); + //FIXME check font/options changed ? + calcSize(); + ret = -1; } - } - for (unsigned n = 0; n < blist->Bouquets.size() && !fav_found; n++) { - if (blist->Bouquets[n]->zapitBouquet && blist->Bouquets[n]->zapitBouquet->bFav) { - blist->Bouquets[n]->zapitBouquet->getChannels(blist->Bouquets[n]->channelList->channels, tvmode); - saveChanges(); - fav_found = true; - break; - } - } - if (!fav_found) { - CNeutrinoApp::getInstance()->MarkFavoritesChanged(); - CNeutrinoApp::getInstance()->MarkChannelsInit(); - } - ret = 1; - break; - case 3: // reset new - case 4: // reset all new - if (select == 3) { - (*chanlist)[selected]->flags = CZapitChannel::UPDATED; - } else { - for (unsigned int j = 0 ; j < (*chanlist).size(); j++) - (*chanlist)[j]->flags = CZapitChannel::UPDATED; - } - CNeutrinoApp::getInstance()->MarkChannelsChanged(); - /* if make_new_list == ON, signal to re-init services */ - if(g_settings.make_new_list) - CNeutrinoApp::getInstance()->MarkChannelsInit(); - break; - case 5: // clear channel history - { - CNeutrinoApp::getInstance()->channelList->getLastChannels().clear(); - printf("%s:%d lastChList cleared\n", __FUNCTION__, __LINE__); - ret = -2; // exit channellist - } - break; - case 6: // settings - { - previous_channellist_additional = g_settings.channellist_additional; - COsdSetup osd_setup; - osd_setup.showContextChanlistMenu(this); - hide(); - ResetModules(); - //FIXME check font/options changed ? - calcSize(); - ret = -1; - } - break; - default: - break; + break; + default: + break; } } return ret; From 24b744c79d673f5ddc72c7ff3e472df42abf3eea Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 May 2017 08:41:28 +0200 Subject: [PATCH 05/19] epgplus: fix progressbar's type Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7b9f8e9720ac37be59072bc033512ef5d0245766 Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) Origin message was: ------------------ - epgplus: fix progressbar's type ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/epgplus.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index e945d32ee..9fb8f0b57 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -243,6 +243,7 @@ void EpgPlus::TimeLine::paintMark(time_t _startTime, int pduration, int px, int // paint new mark CProgressBar pbbar = CProgressBar(px, this->y + this->font->getHeight(), pwidth, this->font->getHeight()); pbbar.setActiveColor(COL_MENUCONTENTSELECTED_PLUS_0); + pbbar.setType(CProgressBar::PB_TIMESCALE); time_t currentTime; time(¤tTime); From 11b4748125fbed1d432f8a20cd74cb7aca28956d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 8 May 2017 12:14:36 +0200 Subject: [PATCH 06/19] movieplayer.cpp: prevent build error Avoid build error if build not configured with -D__STDC_LIMIT_MACROS Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/f1779d0a971125f9100ffb34c832767e539205b0 Author: Thilo Graf Date: 2017-05-08 (Mon, 08 May 2017) ------------------ This commit was generated by Migit --- src/gui/movieplayer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index b62e3d603..716c7262a 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -27,6 +27,9 @@ #include #endif +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif #include #include From c67039135f4cd6b832aa3265e7c6cd12a5ae348a Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 4 May 2017 00:35:11 +0200 Subject: [PATCH 07/19] HD1 compat #1; master Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/db9d1599eafcf54032859e5f91904508992c2cd8 Author: Michael Liebmann Date: 2017-05-04 (Thu, 04 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- lib/hardware/coolstream/hardware_caps.cpp | 4 +++ .../coolstream/hd1/libcoolstream/cs_api.h | 33 ------------------- .../coolstream/hd1/libcoolstream/video_cs.h | 29 ---------------- 3 files changed, 4 insertions(+), 62 deletions(-) diff --git a/lib/hardware/coolstream/hardware_caps.cpp b/lib/hardware/coolstream/hardware_caps.cpp index b4d4c0a46..4e03fd2df 100644 --- a/lib/hardware/coolstream/hardware_caps.cpp +++ b/lib/hardware/coolstream/hardware_caps.cpp @@ -20,7 +20,9 @@ hw_caps_t *get_hwcaps(void) { if (initialized) return ∩︀ int rev = cs_get_revision(); +#ifdef BOXMODEL_CS_HD2 int chip = cs_get_chip_type(); +#endif caps.has_fan = (rev < 8 && CFEManager::getInstance()->getFE(0)->hasSat()); // only SAT-HD1 before rev 8 has fan caps.has_HDMI = 1; caps.has_SCART = (rev != 10); @@ -55,6 +57,7 @@ hw_caps_t *get_hwcaps(void) { strcpy(caps.boxarch, "Nevis"); caps.force_tuner_2G = 1; break; +#ifdef BOXMODEL_CS_HD2 case 9: strcpy(caps.boxname, "Tank"); strcpy(caps.boxarch, "Apollo"); @@ -88,6 +91,7 @@ hw_caps_t *get_hwcaps(void) { strcpy(caps.boxname, "Trinity Duo"); strcpy(caps.boxarch, "Kronos"); break; +#endif default: strcpy(caps.boxname, "UNKNOWN_BOX"); strcpy(caps.boxarch, "Unknown"); diff --git a/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h b/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h index 9a4e77259..f778e149b 100644 --- a/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h +++ b/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h @@ -17,13 +17,6 @@ typedef void (*cs_messenger) (unsigned int msg, unsigned int data); -#define CS_CHIP_APOLLO 0x8490 -#define CS_CHIP_SHINER 0x8470 -#define CS_CHIP_KRONOS_S 0x7540 -#define CS_CHIP_KRONOS_C 0x7550 -#define CS_CHIP_KRONOS_IP 0x7530 -#define CS_CHIP_NEVIS 0x0000 /* workaround for nonexistant nevis chiptype */ - enum CS_LOG_MODULE { CS_LOG_CI = 0, CS_LOG_HDMI_CEC, @@ -47,9 +40,6 @@ enum CS_LOG_MODULE { void cs_api_init(void); void cs_api_exit(void); -/* Dummy for compatibility with HD2 */ -#define cs_new_auto_videosystem(); - // Memory helpers void *cs_malloc_uncached(size_t size); void cs_free_uncached(void *ptr); @@ -81,29 +71,6 @@ int cs_get_tsp_config(unsigned int port, tsrouter_tsp_config_t *tsp_config); // Serial nr and revision accessors unsigned long long cs_get_serial(void); unsigned int cs_get_revision(void); -/* Dummy function for compatibility with hd2 */ -unsigned int cs_get_chip_type(void); -// library version functions -typedef struct cs_libversion_t -{ - int vMajor; - int vMinor; - int vPatch; - char vStr[16]; - char vGit[41]; - char vGitDescribe[64]; - time_t vGitTime; -} cs_libversion_struct_t; - -void cs_get_lib_version(cs_libversion_t *ver); - -/* return value: - ------------- - 1 Library version newer than given version - 0 library version equals given version - -1 Library version older than given version */ -int cs_compare_lib_versions(int Major, int Minor, int Patch); - #endif //__CS_API_H_ diff --git a/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h b/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h index b29677e83..47524c1b6 100644 --- a/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h +++ b/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h @@ -9,11 +9,9 @@ #ifndef __VIDEO_CS_H_ #define __VIDEO_CS_H_ -#include #include #include #include -#include #include "cs_types.h" @@ -125,18 +123,6 @@ typedef enum VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS } VIDEO_CONTROL; -typedef struct cs_vs_format_t -{ - char format[16]; -} cs_vs_format_struct_t; - -enum { - CS_FBCOPY_BB2FB = 0, - CS_FBCOPY_FB2FB = 1, - CS_FBCOPY_MEM2FB = 2, - CS_FBCOPY_FB2MEM = 3 -}; - class cVideo { private: CS_VIDEO_PDATA *privateData; @@ -169,11 +155,6 @@ private: vfd_icon mode_icon; unsigned int unit; cDemux *demux; - int current_video_system; - bool isReadScreeninfo; - fb_var_screeninfo varScreeninfo; - fb_fix_screeninfo fixScreeninfo; - // int SelectAutoFormat(); void ScalePic(); @@ -182,9 +163,6 @@ public: cVideo(int mode, void * hChannel, void * hBuffer, unsigned int Unit = 0); ~cVideo(void); - /* Important! - Call this function when osd resolution has been changed */ - void updateOsdScreenInfo(); void * GetDRM(void); void * GetTVEnc(); void * GetTVEncSD(); @@ -229,11 +207,6 @@ public: int64_t GetPTS(void); int Flush(void); - /* get video system infos */ - int GetVideoSystem(); - /* when system = -1 then use current video system */ - void GetVideoSystemFormatName(cs_vs_format_t* format, int system = -1); - /* set video_system */ int SetVideoSystem(int video_system, bool remember = true); int SetStreamType(VIDEO_FORMAT type); @@ -261,8 +234,6 @@ public: int StartVBI(unsigned short pid); int StopVBI(void); bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false); - int fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode); - int fbFill(int sx, int sy, int width, int height, fb_pixel_t col, int mode=0); void SetDemux(cDemux *Demux); }; From b2e11a0f61bf0dc070656115517c00009e32531e Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 4 May 2017 02:16:06 +0200 Subject: [PATCH 08/19] HD1 compat #2; pu/fb-setmode Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/894233a9dbf61eef10aea463e83652b8a27f1063 Author: Michael Liebmann Date: 2017-05-04 (Thu, 04 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/fb_accel.h | 6 +++++- src/driver/fb_accel_cs_hd1.cpp | 6 ++++++ src/driver/fb_accel_cs_hdx.cpp | 6 ++++++ src/gui/streaminfo2.cpp | 4 +++- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index 8faebe887..86d90d4d8 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -86,8 +86,11 @@ class CFbAccelCSHDx protected: OpenThreads::Mutex mutex; +/* Function temporarily disabled for HD1 */ +#if BOXMODEL_CS_HD2 int fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode); int fbFill(int sx, int sy, int width, int height, fb_pixel_t color, int mode=0); +#endif public: CFbAccelCSHDx(); @@ -124,7 +127,8 @@ class CFbAccelCSHD1 inline void paintHLineRel(int x, int dx, int y, const fb_pixel_t col) { paintLine(x, y, x+dx, y, col); }; inline void paintVLineRel(int x, int y, int dy, const fb_pixel_t col) { paintLine(x, y, x, y+dy, col); }; void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL); - void fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y); +/* Function temporarily disabled for HD1 */ +// void fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y); void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false, uint32_t unscaled_w = 0, uint32_t unscaled_h = 0); //NI void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff); void waitForIdle(const char *func = NULL); diff --git a/src/driver/fb_accel_cs_hd1.cpp b/src/driver/fb_accel_cs_hd1.cpp index c268263bc..6eebd4b4f 100644 --- a/src/driver/fb_accel_cs_hd1.cpp +++ b/src/driver/fb_accel_cs_hd1.cpp @@ -262,6 +262,8 @@ void CFbAccelCSHD1::paintBoxRel(const int x, const int y, const int dx, const in checkFbArea(x, y, dx, dy, false); } +/* Function temporarily disabled for HD1 */ +#if 0 void CFbAccelCSHD1::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y) { if ((width == 0) || (height == 0)) @@ -280,6 +282,7 @@ void CFbAccelCSHD1::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, fbCopy(NULL, w_, h_, dst_x, dst_y, src_x, src_y_, mode); // printf("\033[31m>>>>\033[0m%s hw blit w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func_ext__, w_, h_, dst_x, dst_y, src_x, src_y); } +#endif void CFbAccelCSHD1::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp, uint32_t unscaled_w, uint32_t unscaled_h) //NI { @@ -386,8 +389,11 @@ int CFbAccelCSHD1::setMode(unsigned int, unsigned int, unsigned int) bpp = screeninfo.bits_per_pixel; printf(LOGTAG "%dx%dx%d line length %d. using %s graphics accelerator.\n", xRes, yRes, bpp, stride, _fix.id); +/* Function temporarily disabled for HD1 */ +#if 0 if (videoDecoder != NULL) videoDecoder->updateOsdScreenInfo(); +#endif int needmem = stride * yRes * 2; if (available >= needmem) diff --git a/src/driver/fb_accel_cs_hdx.cpp b/src/driver/fb_accel_cs_hdx.cpp index 3ab238f35..1594cd97d 100644 --- a/src/driver/fb_accel_cs_hdx.cpp +++ b/src/driver/fb_accel_cs_hdx.cpp @@ -36,6 +36,8 @@ CFbAccelCSHDx::~CFbAccelCSHDx() } */ +/* Function temporarily disabled for HD1 */ +#if BOXMODEL_CS_HD2 int CFbAccelCSHDx::fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode) { @@ -58,7 +60,10 @@ int CFbAccelCSHDx::fbCopy(uint32_t *mem_p, int width, int height, mutex.unlock(); return ret; } +#endif +/* Function temporarily disabled for HD1 */ +#if BOXMODEL_CS_HD2 int CFbAccelCSHDx::fbFill(int sx, int sy, int width, int height, fb_pixel_t color, int mode/*=0*/) { if (videoDecoder == NULL) { @@ -74,6 +79,7 @@ int CFbAccelCSHDx::fbFill(int sx, int sy, int width, int height, fb_pixel_t colo mutex.unlock(); return ret; } +#endif #if 0 /* TODO: Run this functions with hardware acceleration */ diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index f1dc17389..e425bc346 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -560,7 +560,9 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) snprintf(buf, sizeof(buf), "%dx%d", xres, yres); g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width2, buf, COL_MENUCONTENT_TEXT); -#if HAVE_COOL_HARDWARE +//#if HAVE_COOL_HARDWARE +/* Function temporarily disabled for HD1 */ +#if BOXMODEL_CS_HD2 //Video SYSTEM ypos += iheight; snprintf(buf, sizeof(buf), "%s:", g_Locale->getText (LOCALE_STREAMINFO_VIDEOSYSTEM)); From 5dd9d3ccd57b3daf7ab09d9fe9a1f03d594c261c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 May 2017 16:45:10 +0200 Subject: [PATCH 09/19] Revert "- remove obsolete ifdef's" This reverts commit 29a00a81ae7f90c86864d0192386581e46af5f1b. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a6814161a8a982ad87d6c08557853b6a42340ae3 Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) ------------------ This commit was generated by Migit --- src/gui/info_menue.cpp | 2 ++ src/gui/update.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp index 985e41593..b1354e132 100644 --- a/src/gui/info_menue.cpp +++ b/src/gui/info_menue.cpp @@ -72,7 +72,9 @@ int CInfoMenu::exec(CMenuTarget* parent, const std::string &actionKey) //NI { char str[1024]; sprintf(str, "cs_get_revision(): 0x%02X\n", cs_get_revision()); +#ifdef BOXMODEL_CS_HD2 sprintf(str, "%scs_get_chip_type(): 0x%04X\n", str, cs_get_chip_type()); +#endif ShowMsg(LOCALE_MESSAGEBOX_INFO, str, CMsgBox::mbrBack, CMsgBox::mbBack); return res; } diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 8f01a0375..fa899a272 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -141,7 +141,9 @@ void CFlashUpdate::update_php(std::string &url, const char* type) if (url.find("update.php") != std::string::npos) { url += "?revision=" + to_string(cs_get_revision()); +#ifdef BOXMODEL_CS_HD2 url += "&chip_type=" + to_string(cs_get_chip_type()); +#endif url += "&image_type=" + (std::string)type; printf("[update_php] url %s\n", url.c_str()); } From bdb2607b8e0345e50a4e0730174e27e071266ee3 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 8 May 2017 17:39:30 +0200 Subject: [PATCH 10/19] src/gui/eventlist.cpp show prev next channel name on start Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5f9f82b8e6f232218f2a47bcdad7cf365a1e395f Author: Jacek Jendrzej Date: 2017-05-08 (Mon, 08 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 81 +++++++++++++++++++++++++------------------ src/gui/eventlist.h | 3 +- 2 files changed, 50 insertions(+), 34 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 3d7c56e01..b7102cd00 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -263,6 +263,38 @@ void CEventList::readEvents(const t_channel_id channel_id) return; } +void CEventList::getPrvNextChannelName(t_channel_id &channel_id,std::string &next_channel_name,std::string &prev_channel_name,std::string ¤t_channel_name, neutrino_msg_t msg){ + t_bouquet_id current_bouquet_id= bouquetList->getActiveBouquetNumber(); + t_channel_id channel_id_tmp = channel_id; + const unsigned int channel_nr = bouquetList->Bouquets[current_bouquet_id]->channelList->getSize(); + if(channel_nr < 2){ + channel_id = 0; + return; + } + unsigned int tmp_channel = 0; + for(unsigned int channel = 0; channel < channel_nr; channel++) + { + channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); + if(channel_id_tmp == channel_id){ + if ( msg==CRCInput::RC_right || msg==CRCInput::RC_forward ) { + channel = (channel+1) %channel_nr; + }else if ( msg==CRCInput::RC_left || msg==CRCInput::RC_rewind ){ //RC_rewind + channel = (channel == 0) ? channel_nr -1 : channel - 1; + } + channel_id = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); + current_channel_name = CServiceManager::getInstance()->GetServiceName(channel_id); + + tmp_channel = (channel == 0) ? channel_nr - 1 : channel - 1; + channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(tmp_channel)->getChannelID(); + prev_channel_name = CServiceManager::getInstance()->GetServiceName(channel_id_tmp); + + tmp_channel = (channel+1) %channel_nr; + channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(tmp_channel)->getChannelID(); + next_channel_name = CServiceManager::getInstance()->GetServiceName(channel_id_tmp); + break; + } + } +} int CEventList::exec(const t_channel_id channel_id, const std::string& channelname, const std::string& channelname_prev, const std::string& channelname_next,const CChannelEventList &followlist) // UTF-8 { @@ -346,7 +378,14 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna UpdateTimerList(); bool dont_hide = false; - paintHead(channel_id, channelname, channelname_prev, channelname_next); + if(channelname_prev.empty() && channelname_prev.empty()){ + std::string nextChannelName,prevChannelName,tmp; + t_channel_id tmp_channel_id = channel_id; + getPrvNextChannelName(tmp_channel_id, nextChannelName, prevChannelName, tmp,0); + paintHead(channel_id, channelname, prevChannelName, nextChannelName); + }else{ + paintHead(channel_id, channelname, channelname_prev, channelname_next); + } paint(channel_id); showFunctionBar(channel_id); @@ -558,39 +597,15 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna } else if ( msg==CRCInput::RC_left || msg==CRCInput::RC_right || msg==CRCInput::RC_rewind || msg==CRCInput::RC_forward ) { // maybe remove RC_rewind and RC_forward in the future? - bgRightBoxPaint = false; - t_bouquet_id current_bouquet_id= bouquetList->getActiveBouquetNumber(); - t_channel_id channel_id_tmp, _channel_id = channel_id; - const unsigned int channel_nr = bouquetList->Bouquets[current_bouquet_id]->channelList->getSize(); - std::string next_channel_name; - std::string prev_channel_name ; - std::string current_channel_name; - unsigned int tmp_channel = 0; - for(unsigned int channel = 0; channel < channel_nr; channel++) - { - channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); - if(channel_id_tmp == channel_id){ - if ( msg==CRCInput::RC_right || msg==CRCInput::RC_forward ) { - channel = (channel+1) %channel_nr; - }else { //RC_rewind - channel = (channel == 0) ? channel_nr -1 : channel - 1; - } - _channel_id = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); - current_channel_name = CServiceManager::getInstance()->GetServiceName(_channel_id); - - tmp_channel = (channel == 0) ? channel_nr - 1 : channel - 1; - channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(tmp_channel)->getChannelID(); - prev_channel_name = CServiceManager::getInstance()->GetServiceName(channel_id_tmp); - - tmp_channel = (channel+1) %channel_nr; - channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(tmp_channel)->getChannelID(); - next_channel_name = CServiceManager::getInstance()->GetServiceName(channel_id_tmp); - break; - } + std::string next_channel_name, prev_channel_name, current_channel_name; + t_channel_id _channel_id = channel_id; + getPrvNextChannelName(_channel_id, next_channel_name, prev_channel_name, current_channel_name, msg); + if(_channel_id){ + bgRightBoxPaint = false; + loop = false; + dont_hide = true; + exec(_channel_id, current_channel_name, prev_channel_name, next_channel_name); } - loop = false; - dont_hide = true; - exec(_channel_id, current_channel_name, prev_channel_name, next_channel_name); } else if (msg == CRCInput::RC_0) { hide(); diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index 69cf7442c..05d9fbc87 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -116,7 +116,8 @@ class CEventList : public CListHelpers void showProgressBar(int pos); void hide(); void showFunctionBar(t_channel_id channel_id); - + void getPrvNextChannelName(t_channel_id &channel_id,std::string &next_channel_name,std::string &prev_channel_name,std::string ¤t_channel_name, neutrino_msg_t msg); + int timerPre; int timerPost; void UpdateTimerList(void); From 58f78c306b29d298a834057625a9dbf5e4521aad Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 May 2017 17:39:34 +0200 Subject: [PATCH 11/19] icons: add new icons for epg-button Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b44a047e7e63b238d0eacac2e71ee409ef903f7e Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) Origin message was: ------------------ - icons: add new icons for epg-button ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/icons/buttons/Makefile.am | 2 ++ data/icons/buttons/epg.png | Bin 0 -> 262 bytes data/icons/buttons/epg_small.png | Bin 0 -> 262 bytes src/gui/widget/icons.h | 2 ++ 4 files changed, 4 insertions(+) create mode 100644 data/icons/buttons/epg.png create mode 100644 data/icons/buttons/epg_small.png diff --git a/data/icons/buttons/Makefile.am b/data/icons/buttons/Makefile.am index c708942ea..7261b6efc 100644 --- a/data/icons/buttons/Makefile.am +++ b/data/icons/buttons/Makefile.am @@ -22,6 +22,8 @@ install_DATA = \ down.png \ dummy.png \ dummy_small.png \ + epg.png \ + epg_small.png \ gelb.png \ gruen.png \ help.png \ diff --git a/data/icons/buttons/epg.png b/data/icons/buttons/epg.png new file mode 100644 index 0000000000000000000000000000000000000000..64a740c429efc8e0142de16f4a916bdd6932dede GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3&R5tyixC00TkgZ@Q5sC zVBi)8VMc~ob0mO*>?NMQuIvw4IrvrC6N8T@0)-}fx;TbdoPImikn6AkkL%SM{d*-W z@hg*GJhT2`b<1hpQ{{}$Ulvwpb~ne)Qmmiy;A166iT2Vvo_P$5cv@1JH?U2LUTeDR zH-~?S>9Q%`SPvNZxE#65>JXDsw2b-i_N6oT&V4?||I&u#7tc$VF`j+1`26X__`~7# z&vzbHe)q4sy}dzY_A0*SkWi0p3<?NMQuIvw4IrvrC6N8T@0)-}fx;TbdoPImikn6AkkL%SM{d*-W z@hg*GJhT2`b<1hpQ{{}$Ulvwpb~ne)Qmmiy;A166iT2Vvo_P$5cv@1JH?U2LUTeDR zH-~?S>9Q%`SPvNZxE#65>JXDsw2b-i_N6oT&V4?||I&u#7tc$VF`j+1`26X__`~7# z&vzbHe)q4sy}dzY_A0*SkWi0p3< Date: Mon, 8 May 2017 17:51:18 +0200 Subject: [PATCH 12/19] eventlist: add new button for epg-plus Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/caf0c9a166199372d5afa20a85675b4fc574e4e5 Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) Origin message was: ------------------ - eventlist: add new button for epg-plus ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index caf6af2ed..7ce7a5a8f 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -985,7 +985,7 @@ void CEventList::showFunctionBar(t_channel_id channel_id) CColorKeyHelper keyhelper; //user_menue.h neutrino_msg_t dummy = CRCInput::RC_nokey; const char * icon = NULL; - struct button_label buttons[6]; //NI + struct button_label buttons[7]; //NI int btn_cnt = 0; int tID = -1; //any value, not NULL @@ -1043,6 +1043,11 @@ void CEventList::showFunctionBar(t_channel_id channel_id) btn_cnt++; } + //NI epg button for epg-plus + buttons[btn_cnt].button = NEUTRINO_ICON_BUTTON_EPG_SMALL; + buttons[btn_cnt].locale = LOCALE_EPGPLUS_HEAD; + btn_cnt++; + //NI timerlist button buttons[btn_cnt].button = NEUTRINO_ICON_BUTTON_0; buttons[btn_cnt].locale = LOCALE_TIMERLIST_NAME; From cdd0bec2c71596a5663321b2cc71d7232955aef0 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 8 May 2017 18:02:04 +0200 Subject: [PATCH 13/19] supplement to bdb2607b8e0345e50a4e0730174e27e071266ee3 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5dc4424d969c64fde9c61c38606514a5c31bfa11 Author: Jacek Jendrzej Date: 2017-05-08 (Mon, 08 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index b7102cd00..02e205425 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -378,7 +378,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna UpdateTimerList(); bool dont_hide = false; - if(channelname_prev.empty() && channelname_prev.empty()){ + if(channelname_prev.empty() && channelname_next.empty()){ std::string nextChannelName,prevChannelName,tmp; t_channel_id tmp_channel_id = channel_id; getPrvNextChannelName(tmp_channel_id, nextChannelName, prevChannelName, tmp,0); From f35bc8f43069da8dd9b81ccb1f80cd52687efbca Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 8 May 2017 19:43:36 +0200 Subject: [PATCH 14/19] supplement 2 to bdb2607b8e0345e50a4e0730174e27e071266ee3 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d051691f89c2d51fa66b41e218bd34224a067856 Author: Jacek Jendrzej Date: 2017-05-08 (Mon, 08 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 02e205425..9d2acb3b3 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -378,14 +378,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna UpdateTimerList(); bool dont_hide = false; - if(channelname_prev.empty() && channelname_next.empty()){ - std::string nextChannelName,prevChannelName,tmp; - t_channel_id tmp_channel_id = channel_id; - getPrvNextChannelName(tmp_channel_id, nextChannelName, prevChannelName, tmp,0); - paintHead(channel_id, channelname, prevChannelName, nextChannelName); - }else{ - paintHead(channel_id, channelname, channelname_prev, channelname_next); - } + paintHead(channel_id, channelname, channelname_prev, channelname_next); paint(channel_id); showFunctionBar(channel_id); @@ -898,6 +891,10 @@ void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, s header->paint(CC_SAVE_SCREEN_NO); + if(_channelname_prev.empty() && _channelname_next.empty()){ + getPrvNextChannelName(_channel_id, _channelname_next, _channelname_prev, _channelname,0); + } + paintBottomBox(_channelname_prev, _channelname_next); } From 248fca8a7a6f9899884a008fa82dd46e826c7b2d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 May 2017 21:08:23 +0200 Subject: [PATCH 15/19] eventlist: minor cosmetics; rename getPrvNextChannelName() to getChannelNames() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/edb4ce3e4f4b93beb82d9e28e027951866a00323 Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) Origin message was: ------------------ - eventlist: minor cosmetics; rename getPrvNextChannelName() to getChannelNames() ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 11 ++++++----- src/gui/eventlist.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 9d2acb3b3..d8203b2da 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -263,9 +263,10 @@ void CEventList::readEvents(const t_channel_id channel_id) return; } -void CEventList::getPrvNextChannelName(t_channel_id &channel_id,std::string &next_channel_name,std::string &prev_channel_name,std::string ¤t_channel_name, neutrino_msg_t msg){ - t_bouquet_id current_bouquet_id= bouquetList->getActiveBouquetNumber(); - t_channel_id channel_id_tmp = channel_id; +void CEventList::getChannelNames(t_channel_id &channel_id, std::string ¤t_channel_name, std::string &prev_channel_name, std::string &next_channel_name, neutrino_msg_t msg) +{ + t_bouquet_id current_bouquet_id = bouquetList->getActiveBouquetNumber(); + t_channel_id channel_id_tmp = channel_id; const unsigned int channel_nr = bouquetList->Bouquets[current_bouquet_id]->channelList->getSize(); if(channel_nr < 2){ channel_id = 0; @@ -592,7 +593,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna // maybe remove RC_rewind and RC_forward in the future? std::string next_channel_name, prev_channel_name, current_channel_name; t_channel_id _channel_id = channel_id; - getPrvNextChannelName(_channel_id, next_channel_name, prev_channel_name, current_channel_name, msg); + getChannelNames(_channel_id, current_channel_name, prev_channel_name, next_channel_name, msg); if(_channel_id){ bgRightBoxPaint = false; loop = false; @@ -892,7 +893,7 @@ void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, s header->paint(CC_SAVE_SCREEN_NO); if(_channelname_prev.empty() && _channelname_next.empty()){ - getPrvNextChannelName(_channel_id, _channelname_next, _channelname_prev, _channelname,0); + getChannelNames(_channel_id, _channelname, _channelname_prev, _channelname_next, 0); } paintBottomBox(_channelname_prev, _channelname_next); diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index 05d9fbc87..55401bff9 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -116,7 +116,7 @@ class CEventList : public CListHelpers void showProgressBar(int pos); void hide(); void showFunctionBar(t_channel_id channel_id); - void getPrvNextChannelName(t_channel_id &channel_id,std::string &next_channel_name,std::string &prev_channel_name,std::string ¤t_channel_name, neutrino_msg_t msg); + void getChannelNames(t_channel_id &channel_id, std::string ¤t_channel_name, std::string &prev_channel_name, std::string &next_channel_name, neutrino_msg_t msg); int timerPre; int timerPost; From 4ded8abb1220f909f344e6511da2e50dda241881 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 May 2017 23:44:45 +0200 Subject: [PATCH 16/19] neutrino: fix hw_caps init; it must be initialized after zapit start Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/edb0a5937e30477f633550c18c87cdfa6c2a5827 Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) Origin message was: ------------------ - neutrino: fix hw_caps init; it must be initialized after zapit start ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index dda468ad7..07f6d2231 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -456,14 +456,22 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.hdd_noise = configfile.getInt32( "hdd_noise", 254); g_settings.hdd_statfs_mode = configfile.getInt32( "hdd_statfs_mode", SNeutrinoSettings::HDD_STATFS_RECORDING); + /* + hw_caps uses CFEManager and CFEManager needs g_settings. + So g_settings cannot use hw_caps. + + For this reason we need this workaround. + */ + bool can_shutdown = (cs_get_revision() > 7); + g_settings.shutdown_real = false; - if (g_info.hw_caps->can_shutdown) + if (can_shutdown) //(g_info.hw_caps->can_shutdown) g_settings.shutdown_real = configfile.getBool("shutdown_real" , false ); g_settings.shutdown_real_rcdelay = configfile.getBool("shutdown_real_rcdelay", false ); g_settings.shutdown_count = configfile.getInt32("shutdown_count", 0); g_settings.shutdown_min = 0; - if (g_info.hw_caps->can_shutdown) + if (can_shutdown) //(g_info.hw_caps->can_shutdown) g_settings.shutdown_min = configfile.getInt32("shutdown_min", 180); g_settings.sleeptimer_min = configfile.getInt32("sleeptimer_min", 0); @@ -2043,8 +2051,6 @@ TIMER_START(); cs_api_init(); cs_register_messenger(CSSendMessage); - g_info.hw_caps = get_hwcaps(); - g_Locale = new CLocaleManager; int loadSettingsErg = loadSetup(NEUTRINO_SETTINGS_FILE); @@ -2130,6 +2136,9 @@ TIMER_START(); CheckFastScan(); + // init hw_caps *after* zapit start! + g_info.hw_caps = get_hwcaps(); + //timer start timer_wakeup = false;//init wake_up( timer_wakeup ); From 439655d0e172b600045f0b380da3fb6abf78cf90 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 May 2017 23:47:26 +0200 Subject: [PATCH 17/19] Revert "Revert "- remove obsolete ifdef's"" This reverts commit 5dd9d3ccd57b3daf7ab09d9fe9a1f03d594c261c. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3c3707b119987d93faaef1fc052b59329a892ba5 Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) ------------------ This commit was generated by Migit --- src/gui/info_menue.cpp | 2 -- src/gui/update.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp index b1354e132..985e41593 100644 --- a/src/gui/info_menue.cpp +++ b/src/gui/info_menue.cpp @@ -72,9 +72,7 @@ int CInfoMenu::exec(CMenuTarget* parent, const std::string &actionKey) //NI { char str[1024]; sprintf(str, "cs_get_revision(): 0x%02X\n", cs_get_revision()); -#ifdef BOXMODEL_CS_HD2 sprintf(str, "%scs_get_chip_type(): 0x%04X\n", str, cs_get_chip_type()); -#endif ShowMsg(LOCALE_MESSAGEBOX_INFO, str, CMsgBox::mbrBack, CMsgBox::mbBack); return res; } diff --git a/src/gui/update.cpp b/src/gui/update.cpp index fa899a272..8f01a0375 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -141,9 +141,7 @@ void CFlashUpdate::update_php(std::string &url, const char* type) if (url.find("update.php") != std::string::npos) { url += "?revision=" + to_string(cs_get_revision()); -#ifdef BOXMODEL_CS_HD2 url += "&chip_type=" + to_string(cs_get_chip_type()); -#endif url += "&image_type=" + (std::string)type; printf("[update_php] url %s\n", url.c_str()); } From e5597de24d4ab73bc11b5d473623ea03d1f6bb6a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 May 2017 23:47:39 +0200 Subject: [PATCH 18/19] Revert "HD1 compat #2; pu/fb-setmode" This reverts commit b2e11a0f61bf0dc070656115517c00009e32531e. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/48480e94d26c4338f37b5e00c81df012ac0585e7 Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) ------------------ This commit was generated by Migit --- src/driver/fb_accel.h | 6 +----- src/driver/fb_accel_cs_hd1.cpp | 6 ------ src/driver/fb_accel_cs_hdx.cpp | 6 ------ src/gui/streaminfo2.cpp | 4 +--- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index 86d90d4d8..8faebe887 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -86,11 +86,8 @@ class CFbAccelCSHDx protected: OpenThreads::Mutex mutex; -/* Function temporarily disabled for HD1 */ -#if BOXMODEL_CS_HD2 int fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode); int fbFill(int sx, int sy, int width, int height, fb_pixel_t color, int mode=0); -#endif public: CFbAccelCSHDx(); @@ -127,8 +124,7 @@ class CFbAccelCSHD1 inline void paintHLineRel(int x, int dx, int y, const fb_pixel_t col) { paintLine(x, y, x+dx, y, col); }; inline void paintVLineRel(int x, int y, int dy, const fb_pixel_t col) { paintLine(x, y, x, y+dy, col); }; void paintBoxRel(const int x, const int y, const int dx, const int dy, const fb_pixel_t col, int radius = 0, int type = CORNER_ALL); -/* Function temporarily disabled for HD1 */ -// void fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y); + void fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y); void blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp = 0, uint32_t yp = 0, bool transp = false, uint32_t unscaled_w = 0, uint32_t unscaled_h = 0); //NI void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff); void waitForIdle(const char *func = NULL); diff --git a/src/driver/fb_accel_cs_hd1.cpp b/src/driver/fb_accel_cs_hd1.cpp index 6eebd4b4f..c268263bc 100644 --- a/src/driver/fb_accel_cs_hd1.cpp +++ b/src/driver/fb_accel_cs_hd1.cpp @@ -262,8 +262,6 @@ void CFbAccelCSHD1::paintBoxRel(const int x, const int y, const int dx, const in checkFbArea(x, y, dx, dy, false); } -/* Function temporarily disabled for HD1 */ -#if 0 void CFbAccelCSHD1::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y) { if ((width == 0) || (height == 0)) @@ -282,7 +280,6 @@ void CFbAccelCSHD1::fbCopyArea(uint32_t width, uint32_t height, uint32_t dst_x, fbCopy(NULL, w_, h_, dst_x, dst_y, src_x, src_y_, mode); // printf("\033[31m>>>>\033[0m%s hw blit w: %d, h: %d, dst_x: %d, dst_y: %d, src_x: %d, src_y: %d\n", __func_ext__, w_, h_, dst_x, dst_y, src_x, src_y); } -#endif void CFbAccelCSHD1::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp, uint32_t unscaled_w, uint32_t unscaled_h) //NI { @@ -389,11 +386,8 @@ int CFbAccelCSHD1::setMode(unsigned int, unsigned int, unsigned int) bpp = screeninfo.bits_per_pixel; printf(LOGTAG "%dx%dx%d line length %d. using %s graphics accelerator.\n", xRes, yRes, bpp, stride, _fix.id); -/* Function temporarily disabled for HD1 */ -#if 0 if (videoDecoder != NULL) videoDecoder->updateOsdScreenInfo(); -#endif int needmem = stride * yRes * 2; if (available >= needmem) diff --git a/src/driver/fb_accel_cs_hdx.cpp b/src/driver/fb_accel_cs_hdx.cpp index 1594cd97d..3ab238f35 100644 --- a/src/driver/fb_accel_cs_hdx.cpp +++ b/src/driver/fb_accel_cs_hdx.cpp @@ -36,8 +36,6 @@ CFbAccelCSHDx::~CFbAccelCSHDx() } */ -/* Function temporarily disabled for HD1 */ -#if BOXMODEL_CS_HD2 int CFbAccelCSHDx::fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode) { @@ -60,10 +58,7 @@ int CFbAccelCSHDx::fbCopy(uint32_t *mem_p, int width, int height, mutex.unlock(); return ret; } -#endif -/* Function temporarily disabled for HD1 */ -#if BOXMODEL_CS_HD2 int CFbAccelCSHDx::fbFill(int sx, int sy, int width, int height, fb_pixel_t color, int mode/*=0*/) { if (videoDecoder == NULL) { @@ -79,7 +74,6 @@ int CFbAccelCSHDx::fbFill(int sx, int sy, int width, int height, fb_pixel_t colo mutex.unlock(); return ret; } -#endif #if 0 /* TODO: Run this functions with hardware acceleration */ diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index e425bc346..f1dc17389 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -560,9 +560,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) snprintf(buf, sizeof(buf), "%dx%d", xres, yres); g_Font[font_info]->RenderString (xpos+spaceoffset, ypos, box_width2, buf, COL_MENUCONTENT_TEXT); -//#if HAVE_COOL_HARDWARE -/* Function temporarily disabled for HD1 */ -#if BOXMODEL_CS_HD2 +#if HAVE_COOL_HARDWARE //Video SYSTEM ypos += iheight; snprintf(buf, sizeof(buf), "%s:", g_Locale->getText (LOCALE_STREAMINFO_VIDEOSYSTEM)); From 6184ac5eea8fa00ceaa799ada2be5384282fb67f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 May 2017 23:47:51 +0200 Subject: [PATCH 19/19] Revert "HD1 compat #1; master" This reverts commit c67039135f4cd6b832aa3265e7c6cd12a5ae348a. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ebc3ce2e43eb73b337ae783aeb1b22f9c5dff41b Author: vanhofen Date: 2017-05-08 (Mon, 08 May 2017) ------------------ This commit was generated by Migit --- lib/hardware/coolstream/hardware_caps.cpp | 4 --- .../coolstream/hd1/libcoolstream/cs_api.h | 33 +++++++++++++++++++ .../coolstream/hd1/libcoolstream/video_cs.h | 29 ++++++++++++++++ 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/lib/hardware/coolstream/hardware_caps.cpp b/lib/hardware/coolstream/hardware_caps.cpp index 4e03fd2df..b4d4c0a46 100644 --- a/lib/hardware/coolstream/hardware_caps.cpp +++ b/lib/hardware/coolstream/hardware_caps.cpp @@ -20,9 +20,7 @@ hw_caps_t *get_hwcaps(void) { if (initialized) return ∩︀ int rev = cs_get_revision(); -#ifdef BOXMODEL_CS_HD2 int chip = cs_get_chip_type(); -#endif caps.has_fan = (rev < 8 && CFEManager::getInstance()->getFE(0)->hasSat()); // only SAT-HD1 before rev 8 has fan caps.has_HDMI = 1; caps.has_SCART = (rev != 10); @@ -57,7 +55,6 @@ hw_caps_t *get_hwcaps(void) { strcpy(caps.boxarch, "Nevis"); caps.force_tuner_2G = 1; break; -#ifdef BOXMODEL_CS_HD2 case 9: strcpy(caps.boxname, "Tank"); strcpy(caps.boxarch, "Apollo"); @@ -91,7 +88,6 @@ hw_caps_t *get_hwcaps(void) { strcpy(caps.boxname, "Trinity Duo"); strcpy(caps.boxarch, "Kronos"); break; -#endif default: strcpy(caps.boxname, "UNKNOWN_BOX"); strcpy(caps.boxarch, "Unknown"); diff --git a/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h b/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h index f778e149b..9a4e77259 100644 --- a/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h +++ b/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h @@ -17,6 +17,13 @@ typedef void (*cs_messenger) (unsigned int msg, unsigned int data); +#define CS_CHIP_APOLLO 0x8490 +#define CS_CHIP_SHINER 0x8470 +#define CS_CHIP_KRONOS_S 0x7540 +#define CS_CHIP_KRONOS_C 0x7550 +#define CS_CHIP_KRONOS_IP 0x7530 +#define CS_CHIP_NEVIS 0x0000 /* workaround for nonexistant nevis chiptype */ + enum CS_LOG_MODULE { CS_LOG_CI = 0, CS_LOG_HDMI_CEC, @@ -40,6 +47,9 @@ enum CS_LOG_MODULE { void cs_api_init(void); void cs_api_exit(void); +/* Dummy for compatibility with HD2 */ +#define cs_new_auto_videosystem(); + // Memory helpers void *cs_malloc_uncached(size_t size); void cs_free_uncached(void *ptr); @@ -71,6 +81,29 @@ int cs_get_tsp_config(unsigned int port, tsrouter_tsp_config_t *tsp_config); // Serial nr and revision accessors unsigned long long cs_get_serial(void); unsigned int cs_get_revision(void); +/* Dummy function for compatibility with hd2 */ +unsigned int cs_get_chip_type(void); +// library version functions +typedef struct cs_libversion_t +{ + int vMajor; + int vMinor; + int vPatch; + char vStr[16]; + char vGit[41]; + char vGitDescribe[64]; + time_t vGitTime; +} cs_libversion_struct_t; + +void cs_get_lib_version(cs_libversion_t *ver); + +/* return value: + ------------- + 1 Library version newer than given version + 0 library version equals given version + -1 Library version older than given version */ +int cs_compare_lib_versions(int Major, int Minor, int Patch); + #endif //__CS_API_H_ diff --git a/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h b/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h index 47524c1b6..b29677e83 100644 --- a/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h +++ b/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h @@ -9,9 +9,11 @@ #ifndef __VIDEO_CS_H_ #define __VIDEO_CS_H_ +#include #include #include #include +#include #include "cs_types.h" @@ -123,6 +125,18 @@ typedef enum VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS } VIDEO_CONTROL; +typedef struct cs_vs_format_t +{ + char format[16]; +} cs_vs_format_struct_t; + +enum { + CS_FBCOPY_BB2FB = 0, + CS_FBCOPY_FB2FB = 1, + CS_FBCOPY_MEM2FB = 2, + CS_FBCOPY_FB2MEM = 3 +}; + class cVideo { private: CS_VIDEO_PDATA *privateData; @@ -155,6 +169,11 @@ private: vfd_icon mode_icon; unsigned int unit; cDemux *demux; + int current_video_system; + bool isReadScreeninfo; + fb_var_screeninfo varScreeninfo; + fb_fix_screeninfo fixScreeninfo; + // int SelectAutoFormat(); void ScalePic(); @@ -163,6 +182,9 @@ public: cVideo(int mode, void * hChannel, void * hBuffer, unsigned int Unit = 0); ~cVideo(void); + /* Important! + Call this function when osd resolution has been changed */ + void updateOsdScreenInfo(); void * GetDRM(void); void * GetTVEnc(); void * GetTVEncSD(); @@ -207,6 +229,11 @@ public: int64_t GetPTS(void); int Flush(void); + /* get video system infos */ + int GetVideoSystem(); + /* when system = -1 then use current video system */ + void GetVideoSystemFormatName(cs_vs_format_t* format, int system = -1); + /* set video_system */ int SetVideoSystem(int video_system, bool remember = true); int SetStreamType(VIDEO_FORMAT type); @@ -234,6 +261,8 @@ public: int StartVBI(unsigned short pid); int StopVBI(void); bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false); + int fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode); + int fbFill(int sx, int sy, int width, int height, fb_pixel_t col, int mode=0); void SetDemux(cDemux *Demux); };