From 27c6bdccaff234ebc35dbda23ac79eb570c13ad3 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 14 Feb 2014 14:44:08 +0100 Subject: [PATCH 1/7] CComponentsPicture: fix item position x/y position was not assigned here for internal pic_x/pic_y vars. Therefore x/y was ignored. --- src/gui/components/cc_item_picture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 94f7af613..bc8f67472 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -153,7 +153,7 @@ void CComponentsPicture::initCCItem() void CComponentsPicture::initPosition() { //using of real x/y values to paint images if this picture object is bound in a parent form - int px = x, py = y; + int px = pic_x = x, py = pic_y = y; if (cc_parent){ px = cc_xr; py = cc_yr; From 9a6a2f70c64ae28e6ad79bc2d536d8a7a05f63c7 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 17 Feb 2014 16:24:44 +0100 Subject: [PATCH 2/7] CFfmpegDec::Decoder -fix possible floating point exception --- src/driver/audiodec/ffmpegdec.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index 7f0bb32fb..63713e7cf 100644 --- a/src/driver/audiodec/ffmpegdec.cpp +++ b/src/driver/audiodec/ffmpegdec.cpp @@ -247,16 +247,20 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, AVFrame *frame = NULL; AVPacket rpacket; av_init_packet(&rpacket); + c->channel_layout = c->channel_layout ? c->channel_layout : AV_CH_LAYOUT_STEREO; av_opt_set_int(swr, "in_channel_layout", c->channel_layout, 0); //av_opt_set_int(swr, "out_channel_layout", c->channel_layout, 0); av_opt_set_int(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0); av_opt_set_int(swr, "in_sample_rate", c->sample_rate, 0); av_opt_set_int(swr, "out_sample_rate", c->sample_rate, 0); - av_opt_set_int(swr, "in_sample_fmt", c->sample_fmt, 0); - av_opt_set_int(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); + av_opt_set_sample_fmt(swr, "in_sample_fmt", c->sample_fmt, 0); + av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); - swr_init(swr); + if (( swr_init(swr)) < 0) { + Status=DATA_ERR; + return Status; + } uint8_t *outbuf = NULL; int outsamples = 0; From 1d4025d3be90548d16b46723f1cd132a47dc7e6e Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 16 Feb 2014 13:10:16 +0100 Subject: [PATCH 3/7] personalize: reduce include impact of plugins.h use forward declaration of CPlugins instead of including plugins.h in personalize.h to reduce the massive impact of this header file --- src/gui/personalize.cpp | 1 + src/gui/personalize.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index 9aaac7edf..887cf60b4 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -171,6 +171,7 @@ #include "widget/keychooser.h" #include "color.h" #include "personalize.h" +#include "plugins.h" #include diff --git a/src/gui/personalize.h b/src/gui/personalize.h index 817176cb9..09e97e489 100644 --- a/src/gui/personalize.h +++ b/src/gui/personalize.h @@ -52,7 +52,6 @@ #define __personalize__ #include -#include #include #include "widget/stringinput.h" #include "widget/stringinput_ext.h" @@ -62,6 +61,7 @@ #include #include +class CPlugins; extern CPlugins * g_PluginList; /* neutrino.cpp */ //helper class to enable/disable some items in usermenu setup From 3048eb96ed0ac4a062260082e7c24e18fc0da19a Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 18 Feb 2014 14:57:16 +0100 Subject: [PATCH 4/7] neutrinoMessages.h -fix type of HDMI/MUTE/VOLUME --- src/neutrinoMessages.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/neutrinoMessages.h b/src/neutrinoMessages.h index a0b042ae6..e5110e190 100644 --- a/src/neutrinoMessages.h +++ b/src/neutrinoMessages.h @@ -108,6 +108,12 @@ struct NeutrinoMessages { EVT_SI_FINISHED = CRCInput::RC_Events + 39, EVT_PMT_CHANGED = CRCInput::RC_Events + 40, + /* from nhttpd */ + EVT_HDMI_CEC_VIEW_ON = CRCInput::RC_Events + 41, + EVT_HDMI_CEC_STANDBY = CRCInput::RC_Events + 42, + EVT_SET_MUTE = CRCInput::RC_Events + 43, + EVT_SET_VOLUME = CRCInput::RC_Events + 44, + /* NEVER CHANGE THIS */ EVT_CA_MESSAGE = CRCInput::RC_Events + 60, /* data = CA_MESSAGE pointer */ EVT_SUBT_MESSAGE = CRCInput::RC_Events + 61, /* data = subtitles pointer */ @@ -150,13 +156,7 @@ struct NeutrinoMessages { EVT_RECORDING_ENDED = CRCInput::RC_WithData + 23, /* sectionsd */ EVT_EIT_COMPLETE = CRCInput::RC_WithData + 24, /* data: (t_channel_id *) */ - EVT_BACK_ZAP_COMPLETE = CRCInput::RC_WithData + 25, /* data: (t_channel_id *) */ - - EVT_HDMI_CEC_VIEW_ON = CRCInput::RC_WithData + 26, - EVT_HDMI_CEC_STANDBY = CRCInput::RC_WithData + 27, - - EVT_SET_MUTE = CRCInput::RC_WithData + 28, - EVT_SET_VOLUME = CRCInput::RC_WithData + 29 + EVT_BACK_ZAP_COMPLETE = CRCInput::RC_WithData + 25 /* data: (t_channel_id *) */ }; enum { From f1c7e9002e44d2330224be37e2fc322b86daf575 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 18 Feb 2014 14:59:11 +0100 Subject: [PATCH 5/7] wakeup_hdd: -fix warning -add mode to open --- src/system/helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index df8fc7228..c4a80b7f5 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -82,7 +82,7 @@ void wakeup_hdd(const char *hdd_dir) if(!check_dir(hdd_dir) && hdd_get_standby(hdd_dir)){ std::string wakeup_file = hdd_dir; wakeup_file += "/.wakeup"; - int fd = open(wakeup_file.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC); + int fd = open(wakeup_file.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR); if (fd >= 0) { unsigned char buf[512]; memset(buf, 0xFF, sizeof(buf)); From 088a75b6e22bfcb744851bb6feb78d0a2c9c2a21 Mon Sep 17 00:00:00 2001 From: martii Date: Mon, 17 Feb 2014 21:25:15 +0100 Subject: [PATCH 6/7] driver/rcinput: minor cleanup --- src/driver/rcinput.cpp | 8 ++++---- src/driver/rcinput.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index b0c22373b..2c39718b6 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1229,7 +1229,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 firstKey = false; CTimerManager::getInstance()->cancelShutdownOnWakeup(); } - uint32_t trkey = translate(ev.code, i); + uint32_t trkey = translate(ev.code); #ifdef DEBUG printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, trkey, getKeyName(trkey).c_str()); #endif @@ -1583,14 +1583,14 @@ std::string CRCInput::getKeyName(const unsigned int key) * transforms the rc-key to generic - internal use only! * **************************************************************************/ -int CRCInput::translate(int code, int /*num*/) +int CRCInput::translate(int code) { if(code == 0x100) code = RC_up; else if(code == 0x101) code = RC_down; if ((code >= 0) && (code <= KEY_MAX)) return code; - else - return ( unsigned int)RC_nokey; + + return (int)RC_nokey; } void CRCInput::close_click() diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index 091d36a35..228374297 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -157,7 +157,7 @@ class CRCInput void open(); void close(); - int translate(int code, int num); + int translate(int code); void calculateMaxFd(void); int checkTimers(); #ifdef IOC_IR_SET_PRI_PROTOCOL From ed5708b10d8ef9311e9525affe5720870aaf4c98 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 19 Feb 2014 10:31:47 +0100 Subject: [PATCH 7/7] Revert "neutrinoMessages.h -fix type of HDMI/MUTE/VOLUME" This reverts commit 3048eb96ed0ac4a062260082e7c24e18fc0da19a. (already fixed in my tree) --- src/neutrinoMessages.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/neutrinoMessages.h b/src/neutrinoMessages.h index e5110e190..a0b042ae6 100644 --- a/src/neutrinoMessages.h +++ b/src/neutrinoMessages.h @@ -108,12 +108,6 @@ struct NeutrinoMessages { EVT_SI_FINISHED = CRCInput::RC_Events + 39, EVT_PMT_CHANGED = CRCInput::RC_Events + 40, - /* from nhttpd */ - EVT_HDMI_CEC_VIEW_ON = CRCInput::RC_Events + 41, - EVT_HDMI_CEC_STANDBY = CRCInput::RC_Events + 42, - EVT_SET_MUTE = CRCInput::RC_Events + 43, - EVT_SET_VOLUME = CRCInput::RC_Events + 44, - /* NEVER CHANGE THIS */ EVT_CA_MESSAGE = CRCInput::RC_Events + 60, /* data = CA_MESSAGE pointer */ EVT_SUBT_MESSAGE = CRCInput::RC_Events + 61, /* data = subtitles pointer */ @@ -156,7 +150,13 @@ struct NeutrinoMessages { EVT_RECORDING_ENDED = CRCInput::RC_WithData + 23, /* sectionsd */ EVT_EIT_COMPLETE = CRCInput::RC_WithData + 24, /* data: (t_channel_id *) */ - EVT_BACK_ZAP_COMPLETE = CRCInput::RC_WithData + 25 /* data: (t_channel_id *) */ + EVT_BACK_ZAP_COMPLETE = CRCInput::RC_WithData + 25, /* data: (t_channel_id *) */ + + EVT_HDMI_CEC_VIEW_ON = CRCInput::RC_WithData + 26, + EVT_HDMI_CEC_STANDBY = CRCInput::RC_WithData + 27, + + EVT_SET_MUTE = CRCInput::RC_WithData + 28, + EVT_SET_VOLUME = CRCInput::RC_WithData + 29 }; enum {