Project "Tuxbox-GIT: apps": The branch, master has been updated via e2d920c55095f45c80d882089f1a178ca7582cc1 (commit) via 4a17373dc5ca00e740b452e7b16c99a21b691d44 (commit) via a5445b977803e344c342199074c67af8d34155e3 (commit) via 565784e0b973752ab1007c937353cff0e85a54b6 (commit) via bc156a9bee86fe626d56afe18b111d9836c52c61 (commit) via bfc7b0329fcf827e43c4d3875a9c626d55cc4a5c (commit) via 4f28db6d87ae9c34ece8f3bc11d6227f3a8ca6b1 (commit) via ed95433d569739ce7d05670789fbf8bdafbd92d5 (commit) via a0eb7ce18585b8f1e34c83b816906ddb85aa42b7 (commit) via 3236e654dc0d9b5a08c3701a774d24b0d5ea2c7d (commit) via e957d242d357edb15822fea173d1b1c0f102adb3 (commit) via d80721f01e97f446d4313878a16cae18cb574570 (commit) via abbadf0b98661a6e115583f5a08f0284f82b3dcb (commit) from bd00fae5b436145ba55b97d1bc5056abee856698 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e2d920c55095f45c80d882089f1a178ca7582cc1 Author: Christian Schuett <gaucho...@hotmail.com> Date: Mon Feb 9 18:55:53 2015 +0100 Neutrino picture viewer: show selected play list entry on LCD Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/pictureviewer.cpp b/tuxbox/neutrino/src/gui/pictureviewer.cpp index 0d18f1a..25aede2 100644 --- a/tuxbox/neutrino/src/gui/pictureviewer.cpp +++ b/tuxbox/neutrino/src/gui/pictureviewer.cpp @@ -374,6 +374,7 @@ int CPictureViewerGui::show() std::sort(playlist.begin(), playlist.end(), comparePictureByDate); } update = true; + CLCD::getInstance()->setMode(CLCD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_PICTUREVIEWER_HEAD)); } } else if (msg == CRCInput::RC_yellow) @@ -555,6 +556,11 @@ void CPictureViewerGui::paintItem(int pos) int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(timestring); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+fheight, width-30 - w, tmp, color, fheight); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+width-20-w,ypos+fheight, w, timestring, color, fheight); + if (liststart+pos == selected) + { + CLCD::getInstance()->showMenuText(0, tmp.c_str()); + CLCD::getInstance()->showMenuText(1, timestring); + } } // printf("paintItem}\n"); } commit 4a17373dc5ca00e740b452e7b16c99a21b691d44 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sun Feb 8 16:54:39 2015 +0100 Neutrino picture viewer: fix possible segfault when adding entries after removing the last entry from the play list and readding new entries, you get a segfault Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/pictureviewer.cpp b/tuxbox/neutrino/src/gui/pictureviewer.cpp index fe3fb6d..0d18f1a 100644 --- a/tuxbox/neutrino/src/gui/pictureviewer.cpp +++ b/tuxbox/neutrino/src/gui/pictureviewer.cpp @@ -324,7 +324,7 @@ int CPictureViewerGui::show() CViewList::iterator p = playlist.begin() + selected; playlist.erase(p); if (selected >= playlist.size()) - selected = playlist.size()-1; + selected = playlist.empty() ? 0 : playlist.size() - 1; update = true; } } commit a5445b977803e344c342199074c67af8d34155e3 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sun Feb 8 16:47:17 2015 +0100 Neutrino audioplayer: clear whole screen after removing last entry after removing the last entry from the play list, there are left some artefacts on the screen Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp index db74b41..3c2dd77 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.cpp +++ b/tuxbox/neutrino/src/gui/audioplayer.cpp @@ -567,9 +567,11 @@ int CAudioPlayerGui::show() m_current--; //stop(); // Stop if song is deleted, next song will be startet automat. } - if(m_selected >= m_playlist.size()) - m_selected = m_playlist.empty() ? m_playlist.size() : m_playlist.size() - 1; - update = true; + if (m_selected >= m_playlist.size()) + m_selected = m_playlist.empty() ? 0 : m_playlist.size() - 1; + if (m_playlist.empty()) + clear_before_update = true; + update = true; } } else if(m_key_level == 1) commit 565784e0b973752ab1007c937353cff0e85a54b6 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Feb 7 21:01:33 2015 +0100 Neutrino movieplayer: always show play mode next to progress bar on LCD Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp index 39f3548..2266bcd 100644 --- a/tuxbox/neutrino/src/driver/lcdd.cpp +++ b/tuxbox/neutrino/src/driver/lcdd.cpp @@ -577,7 +577,41 @@ void CLCD::setMoviePlaymode(const PLAYMODES playmode) if (mode != MODE_MOVIE) return; - showAudioPlayMode(movie_playmode); + switch (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME]) + { + case STATUSLINE_PLAYTIME: + showAudioPlayMode(movie_playmode); + break; + case STATUSLINE_BOTH: + case STATUSLINE_BOTH_AUDIO: + display.draw_fill_rect(0, 0, 10, 10, CLCDDisplay::PIXEL_OFF); + switch (movie_playmode) + { + case PLAYMODE_PLAY: + { + int x = 3, y = 1; + display.draw_line(x , y , x , y+8, CLCDDisplay::PIXEL_ON); + display.draw_line(x+1, y+1, x+1, y+7, CLCDDisplay::PIXEL_ON); + display.draw_line(x+2, y+2, x+2, y+6, CLCDDisplay::PIXEL_ON); + display.draw_line(x+3, y+3, x+3, y+5, CLCDDisplay::PIXEL_ON); + display.draw_line(x+4, y+4, x+4, y+4, CLCDDisplay::PIXEL_ON); + } + break; + case PLAYMODE_PAUSE: + display.draw_line(1, 2, 1, 8, CLCDDisplay::PIXEL_ON); + display.draw_line(2, 2, 2, 8, CLCDDisplay::PIXEL_ON); + display.draw_line(6, 2, 6, 8, CLCDDisplay::PIXEL_ON); + display.draw_line(7, 2, 7, 8, CLCDDisplay::PIXEL_ON); + break; + default: + break; + } + wake_up(); + displayUpdate(); + break; + default: + break; + } } void CLCD::setMovieInfo(const std::string big, const std::string small) diff --git a/tuxbox/neutrino/src/gui/movieplayer.cpp b/tuxbox/neutrino/src/gui/movieplayer.cpp index 14cb876..21d887f 100644 --- a/tuxbox/neutrino/src/gui/movieplayer.cpp +++ b/tuxbox/neutrino/src/gui/movieplayer.cpp @@ -1357,15 +1357,6 @@ void updateLcd(const std::string & big, const std::string & small) case CMoviePlayerGui::PAUSE: playmode = CLCD::PLAYMODE_PAUSE; break; - - case CMoviePlayerGui::REW: - playmode = CLCD::PLAYMODE_REV; - break; - - case CMoviePlayerGui::FF: - playmode = CLCD::PLAYMODE_FF; - break; - default: playmode = CLCD::PLAYMODE_PLAY; break; commit bc156a9bee86fe626d56afe18b111d9836c52c61 Author: Stefan Seyfried <se...@tuxbox-git.slipkontur.de> Date: Thu Feb 5 16:36:48 2015 +0100 my_system: fix -Wclobbered warnings Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/system/helper.cpp b/tuxbox/neutrino/src/system/helper.cpp index 6bd2bcb..66505f4 100644 --- a/tuxbox/neutrino/src/system/helper.cpp +++ b/tuxbox/neutrino/src/system/helper.cpp @@ -70,7 +70,7 @@ int my_system(const char * cmd) int my_system(int argc, const char *arg, ...) { - int i = 0, ret = 0, childExit = 0; + int i = 0, ret, childExit = 0; #define ARGV_MAX 64 /* static right now but could be made dynamic if necessary */ int argv_max = ARGV_MAX; @@ -100,6 +100,7 @@ int my_system(int argc, const char *arg, ...) ret = -errno; break; case 0: /* child process */ + ret = 0; for(i = 3; i < maxfd; i++) close(i); if (setsid() == -1) @@ -112,6 +113,7 @@ int my_system(int argc, const char *arg, ...) } _exit(ret); // terminate c h i l d proces s only default: /* parent returns to calling process */ + ret = 0; waitpid(pid, &childExit, 0); if (WEXITSTATUS(childExit) != 0) ret = (signed char)WEXITSTATUS(childExit); commit bfc7b0329fcf827e43c4d3875a9c626d55cc4a5c Author: Christian Schuett <gaucho...@hotmail.com> Date: Wed Jan 28 20:07:57 2015 +0100 Neutrino audioplayer: fix SMS input Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp index c4785d1..db74b41 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.cpp +++ b/tuxbox/neutrino/src/gui/audioplayer.cpp @@ -759,36 +759,11 @@ int CAudioPlayerGui::show() { //printf("select by name\n"); unsigned char smsKey = 0; - do - { - smsKey = m_SMSKeyInput.handleMsg(msg); - //printf(" new key: %c", smsKey); - g_RCInput->getMsg_ms(&msg, &data, AUDIOPLAYERGUI_SMSKEY_TIMEOUT - 200); - - -/* show a hint box with current char (too slow at the moment?)*/ -// char selectedKey[1]; -// sprintf(selectedKey,"%c",smsKey); -// int x1 = getScreenStartX(0) - 50; -// int y1 = getScreenStartY(0); -// int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); -// int w = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(selectedKey); -// m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6); -// m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0); -// g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP] -// ->RenderString(x1,y1,w+1,selectedKey,COL_MENUCONTENTSELECTED,0); - - - } while (CRCInput::isNumeric(msg) && !(m_playlist.empty())); - - if (msg == CRCInput::RC_timeout - || msg == CRCInput::RC_nokey) + if (getSMSKeyInput(msg, smsKey)) { //printf("selected key: %c\n",smsKey); selectTitle(smsKey); - update = true; } - m_SMSKeyInput.resetOldKey(); } else { @@ -796,9 +771,8 @@ int CAudioPlayerGui::show() int val = 0; if (getNumericInput(msg,val)) m_selected = std::min((int)m_playlist.size(), val) - 1; - update = true; } - + update = true; } #ifdef ENABLE_GUI_MOUNT @@ -2324,13 +2298,14 @@ bool CAudioPlayerGui::getNumericInput(neutrino_msg_t& msg, int& val) { neutrino_msg_data_t data; int x1 = getScreenStartX(0) - 50; int y1 = getScreenStartY(0); + int w = 0; + int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); char str[11]; do { val = val * 10 + CRCInput::getNumericValue(msg); sprintf(str, "%d", val); - int w = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(str); - int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); + w = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(str); m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6); m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 1, str, COL_MENUCONTENTSELECTED, 0); @@ -2346,12 +2321,48 @@ bool CAudioPlayerGui::getNumericInput(neutrino_msg_t& msg, int& val) { continue; break; } - } while (g_RCInput->isNumeric(msg) && val < 1000000); + } while (CRCInput::isNumeric(msg) && val < 1000000); return (msg == CRCInput::RC_ok); } //------------------------------------------------------------------------ +bool CAudioPlayerGui::getSMSKeyInput(neutrino_msg_t& msg, unsigned char& smsKey) +{ + neutrino_msg_data_t data; + int x1 = getScreenStartX(0) - 50; + int y1 = getScreenStartY(0); + int w = 0; + int h = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight(); + char selectedKey[2]; + do + { + smsKey = m_SMSKeyInput.handleMsg(msg); + //printf(" new key: %c\n", smsKey); + sprintf(selectedKey, "%c", smsKey); + w = std::max(w, g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getRenderWidth(selectedKey)); + m_frameBuffer->paintBoxRel(x1 - 7, y1 - h - 5, w + 14, h + 10, COL_MENUCONTENT_PLUS_6); + m_frameBuffer->paintBoxRel(x1 - 4, y1 - h - 3, w + 8, h + 6, COL_MENUCONTENTSELECTED_PLUS_0); + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(x1, y1, w + 1, selectedKey, COL_MENUCONTENTSELECTED, 0); + while (true) + { + g_RCInput->getMsg_ms(&msg, &data, AUDIOPLAYERGUI_SMSKEY_TIMEOUT - 200); + if (msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_timeout) + { // not a key event + CNeutrinoApp::getInstance()->handleMsg(msg, data); + continue; + } + if (msg & (CRCInput::RC_Repeat|CRCInput::RC_Release)) // repeat / release + continue; + break; + } + } while (CRCInput::isNumeric(msg)); + m_SMSKeyInput.resetOldKey(); + return (msg == CRCInput::RC_timeout || msg == CRCInput::RC_nokey); +} + +//------------------------------------------------------------------------ + void CAudioPlayerGui::getFileInfoToDisplay(std::string &info, CAudiofileExt &file) { @@ -2525,21 +2536,8 @@ void CAudioPlayerGui::selectTitle(unsigned char selectionChar) return; } - int prevselected = m_selected; m_selected = i; - - paintItem(prevselected - m_liststart); - unsigned int oldliststart = m_liststart; m_liststart = (m_selected / m_listmaxshow)*m_listmaxshow; - //printf("before paint\n"); - if(oldliststart != m_liststart) - { - paint(); - } - else - { - paintItem(m_selected - m_liststart); - } } //------------------------------------------------------------------------ diff --git a/tuxbox/neutrino/src/gui/audioplayer.h b/tuxbox/neutrino/src/gui/audioplayer.h index 19d04b1..cf76696 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.h +++ b/tuxbox/neutrino/src/gui/audioplayer.h @@ -168,6 +168,7 @@ class CAudioPlayerGui : public CMenuTarget void showMetaData(); void screensaver(bool on); bool getNumericInput(neutrino_msg_t& msg,int& val); + bool getSMSKeyInput(neutrino_msg_t& msg, unsigned char& smsKey); void addToPlaylist(CAudiofileExt &file); void removeFromPlaylist(long pos); commit 4f28db6d87ae9c34ece8f3bc11d6227f3a8ca6b1 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Jan 24 21:42:37 2015 +0100 Neutrino audioplayer: don't update full LCD every second also remove an unnecessary head refresh because mute icon in head was removed some years ago Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp index 4c1dbf2..c4785d1 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.cpp +++ b/tuxbox/neutrino/src/gui/audioplayer.cpp @@ -836,15 +836,20 @@ int CAudioPlayerGui::show() { CNeutrinoApp::getInstance()->handleMsg( msg, data ); } + else if(msg == g_settings.key_volume_up || + msg == g_settings.key_volume_down || + msg == NeutrinoMessages::EVT_VOLCHANGED || + msg == NeutrinoMessages::EVT_MUTECHANGED) + { + CNeutrinoApp::getInstance()->handleMsg( msg, data ); + paintLCD(); + } else { if( CNeutrinoApp::getInstance()->handleMsg( msg, data ) & messages_return::cancel_all ) { loop = false; } - // update mute icon - paintHead(); - paintLCD(); } } hide(); commit ed95433d569739ce7d05670789fbf8bdafbd92d5 Author: Christian Schuett <gaucho...@hotmail.com> Date: Sat Jan 24 19:57:55 2015 +0100 Neutrino: fix calculation of button bar height in some media players this affects audioplayer, picture viewer and UPnP browser Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp index eb84e00..4c1dbf2 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.cpp +++ b/tuxbox/neutrino/src/gui/audioplayer.cpp @@ -251,7 +251,7 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &) m_width = w_max(720, 2 * ConnectLineBox_Width); m_height = h_max(570, 0); m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); - m_buttonHeight = std::min(25, m_sheight); + m_buttonHeight = std::max(25, m_sheight); m_frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &m_ticonwidth, &m_ticonheight); m_theight = std::max(m_ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); m_fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); diff --git a/tuxbox/neutrino/src/gui/pictureviewer.cpp b/tuxbox/neutrino/src/gui/pictureviewer.cpp index 877c19a..fe3fb6d 100644 --- a/tuxbox/neutrino/src/gui/pictureviewer.cpp +++ b/tuxbox/neutrino/src/gui/pictureviewer.cpp @@ -123,7 +123,7 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & /*actionKey width = w_max (710, 30); height = h_max (570, 0); sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); - buttonHeight = std::min(25, sheight); + buttonHeight = std::max(25, sheight); frameBuffer->getIconSize(NEUTRINO_ICON_MP3, &ticonwidth, &ticonheight); theight = std::max(ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); diff --git a/tuxbox/neutrino/src/gui/upnpbrowser.cpp b/tuxbox/neutrino/src/gui/upnpbrowser.cpp index aa92039..6087ccf 100644 --- a/tuxbox/neutrino/src/gui/upnpbrowser.cpp +++ b/tuxbox/neutrino/src/gui/upnpbrowser.cpp @@ -137,7 +137,7 @@ int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/ m_width = w_max(710, ConnectLineBox_Width); m_height = h_max(570, 0); m_sheight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight(); - m_buttonHeight = std::min(25, m_sheight); + m_buttonHeight = std::max(25, m_sheight); m_frameBuffer->getIconSize(NEUTRINO_ICON_UPNP, &m_ticonwidth, &m_ticonheight); m_theight = std::max(m_ticonheight, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()); m_mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); commit a0eb7ce18585b8f1e34c83b816906ddb85aa42b7 Author: Jacek Jendrzej <crash...@googlemail.com> Date: Fri Jan 16 22:11:37 2015 +0100 nhttpd: ywebserver.cpp - fix possible segfault (svenhoefer) Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ywebserver.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ywebserver.cpp index 1e3a99e..4b44757 100644 --- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ywebserver.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ywebserver.cpp @@ -416,6 +416,10 @@ bool CWebserver::handle_connection(CySocket *newSock) // create arguments TWebserverConnectionArgs *newConn = new TWebserverConnectionArgs; + if (!newConn) { + dperror("CWebserver TWebserverConnectionArgs error!\n"); + return false; + } newConn->ySock = newSock; newConn->ySock->handling = true; newConn->WebserverBackref = this; @@ -456,23 +460,27 @@ bool CWebserver::handle_connection(CySocket *newSock) //------------------------------------------------------------------------- void *WebThread(void *args) { - CWebserverConnection *con; - CWebserver *ws; TWebserverConnectionArgs *newConn = (TWebserverConnectionArgs *) args; - ws = newConn->WebserverBackref; + if (!newConn) { + dperror("WebThread called without arguments!\n"); + return NULL; + } bool is_threaded = newConn->is_treaded; if(is_threaded) log_level_printf(1,"++ Thread 0x06%X gestartet\n", (int) pthread_self()); - if (!newConn) { - dperror("WebThread called without arguments!\n"); - if(newConn->is_treaded) - pthread_exit(NULL); - } - // (1) create & init Connection - con = new CWebserverConnection(ws); + CWebserver *ws = newConn->WebserverBackref; + if (!ws) { + dperror("WebThread CWebserver error!\n"); + return NULL; + } + CWebserverConnection *con = new CWebserverConnection(ws); + if (!con) { + dperror("WebThread CWebserverConnection error!\n"); + return NULL; + } con->Request.UrlData["clientaddr"] = newConn->ySock->get_client_ip(); // TODO:here? con->sock = newConn->ySock; // give socket reference newConn->ySock->handling = true; // dont handle this socket now be webserver main loop commit 3236e654dc0d9b5a08c3701a774d24b0d5ea2c7d Author: Christian Schuett <gaucho...@hotmail.com> Date: Fri Jan 16 21:28:13 2015 +0100 Neutrino locales: add missing dots to two entries Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index 4f2b9fd..4a26c68 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -860,7 +860,7 @@ moviebrowser.info_head Film Informationen moviebrowser.info_head_update Inhalte in allen sichtbaren Filminfos speichern moviebrowser.info_info1 Info 1 moviebrowser.info_info2 Info 2 -moviebrowser.info_length Spieldauer (Min) +moviebrowser.info_length Spieldauer (Min.) moviebrowser.info_parental_lockage Altersfreigabe moviebrowser.info_parental_lockage_0year immer moviebrowser.info_parental_lockage_12year 12 Jahre @@ -918,7 +918,7 @@ moviebrowser.short_genre_major Genre moviebrowser.short_genre_minor Genre moviebrowser.short_info1 Info 1 moviebrowser.short_info2 Info 2 -moviebrowser.short_length Min +moviebrowser.short_length Min. moviebrowser.short_parental_lockage FSK moviebrowser.short_path Pfad moviebrowser.short_prevplaydate Zuletzt diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale index 6f95b6e..c13e022 100644 --- a/tuxbox/neutrino/data/locale/english.locale +++ b/tuxbox/neutrino/data/locale/english.locale @@ -860,7 +860,7 @@ moviebrowser.info_head Film Informations moviebrowser.info_head_update Save changes in all movie info files moviebrowser.info_info1 Info 1 moviebrowser.info_info2 Info 2 -moviebrowser.info_length Length (Min) +moviebrowser.info_length Length (min.) moviebrowser.info_parental_lockage Parental Lock age moviebrowser.info_parental_lockage_0year always moviebrowser.info_parental_lockage_12year 12 years @@ -918,7 +918,7 @@ moviebrowser.short_genre_major Genre moviebrowser.short_genre_minor Genre moviebrowser.short_info1 Info 1 moviebrowser.short_info2 Info 2 -moviebrowser.short_length Min +moviebrowser.short_length Min. moviebrowser.short_parental_lockage Age moviebrowser.short_path Path moviebrowser.short_prevplaydate Last commit e957d242d357edb15822fea173d1b1c0f102adb3 Author: m4r...@gmx.de <m4r...@gmx.de> Date: Tue Jan 6 16:51:23 2015 +0100 libconnection/basicserver: raise queue limit Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/misc/libs/libconnection/basicserver.cpp b/misc/libs/libconnection/basicserver.cpp index 84f511d..dcfc38b 100644 --- a/misc/libs/libconnection/basicserver.cpp +++ b/misc/libs/libconnection/basicserver.cpp @@ -106,7 +106,7 @@ bool CBasicServer::prepare(const char* socketname) return false; } -#define N_connection_requests_queued 5 +#define N_connection_requests_queued 128 if (listen(sock_fd, N_connection_requests_queued) != 0) { commit d80721f01e97f446d4313878a16cae18cb574570 Author: m4r...@gmx.de <m4r...@gmx.de> Date: Tue Jan 6 16:51:07 2015 +0100 libconnection/basicsocket: use poll() instead of select() Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/misc/libs/libconnection/basicsocket.cpp b/misc/libs/libconnection/basicsocket.cpp index 80dc3a2..cf69656 100644 --- a/misc/libs/libconnection/basicsocket.cpp +++ b/misc/libs/libconnection/basicsocket.cpp @@ -29,52 +29,52 @@ #include <stdio.h> #include <sys/socket.h> #include <sys/types.h> -#include <unistd.h> +#include <poll.h> bool send_data(int fd, const void * data, const size_t size, const timeval timeout) { - fd_set writefds; - timeval tv; - const void * buffer; - size_t n; - int rc; - int olderr; + char *buffer = (char *)data; + size_t left = size; - n = size; - - while (n > 0) + while (left > 0) { - buffer = (void *)((char *)data + (size - n)); - rc = ::send(fd, buffer, n, MSG_DONTWAIT | MSG_NOSIGNAL); + int len = ::send(fd, buffer, left, MSG_DONTWAIT | MSG_NOSIGNAL); - if (rc == -1) + if (len < 0) { - olderr = errno; - if (errno != EAGAIN) // this is "write would block...", which is not an error - fprintf(stderr,"[basicsocket] send_data: %m (n = %d/%d, pid = %d)\n", n, size, getpid()); - if (olderr == EPIPE) - return false; + perror("[basicsocket] send_data"); - FD_ZERO(&writefds); - FD_SET(fd, &writefds); + if (errno != EINTR && errno != EAGAIN) + return false; - tv = timeout; + struct pollfd pfd; + pfd.fd = fd; + pfd.events = POLLOUT; + pfd.revents = 0; - rc = select(fd + 1, NULL, &writefds, NULL, &tv); + int rc = poll(&pfd, 1, timeout.tv_sec * 1000 + timeout.tv_usec / 1000); if (rc == 0) { printf("[basicsocket] send timed out.\n"); return false; } - if (rc == -1) + if (rc < 0) + { + perror("[basicsocket] send_data poll"); + return false; + } + if (!(pfd.revents & POLLOUT)) { - perror("[basicsocket] send_data select"); + perror("[basicsocket] send_data POLLOUT"); return false; } } else - n -= rc; + { + buffer += len; + left -= len; + } } return true; } @@ -82,58 +82,55 @@ bool send_data(int fd, const void * data, const size_t size, const timeval timeo bool receive_data(int fd, void * data, const size_t size, const timeval timeout) { - fd_set readfds; - timeval tv; - void * buffer; - size_t n; - int rc; - - n = size; + char *buffer = (char *)data; + size_t left = size; - while (n > 0) + while (left > 0) { - FD_ZERO(&readfds); - FD_SET(fd, &readfds); + struct pollfd pfd; + pfd.fd = fd; + pfd.events = POLLIN; + pfd.revents = 0; - tv = timeout; + int to = timeout.tv_sec * 1000 + timeout.tv_usec / 1000; - rc = select(fd + 1, &readfds, NULL, NULL, &tv); + int rc = poll(&pfd, 1, to); if (rc == 0) { - printf("[basicsocket] receive timed out. waiting process %d\n", getpid()); + printf("[basicsocket] recv timed out.\n"); return false; } - if (rc == -1) + if (rc < 0) { - perror("[basicsocket] receive_data select"); + perror("[basicsocket] recv_data poll"); return false; } - buffer = (void *)((char *)data + (size - n)); - rc = ::recv(fd, buffer, n, MSG_DONTWAIT | MSG_NOSIGNAL); - - if ((rc == 0) || (rc == -1)) + if (!(pfd.revents & POLLIN)) { - if (rc == -1) - { - perror("[basicsocket] receive_data"); + perror("[basicsocket] recv_data POLLIN"); + return false; + } + int len = ::recv(fd, data, left, MSG_DONTWAIT | MSG_NOSIGNAL); - if (errno == EPIPE) - return false; - } - else - { - /* - * silently return false - * - * printf("[basicsocket] no more data\n"); - */ + if (len > 0) { + left -= len; + buffer += len; + } else if (len < 0) + { + perror("[basicsocket] receive_data"); + if (errno != EINTR && errno != EAGAIN) return false; - } - } - else - n -= rc; + else // len == 0 + { + /* + * silently return false + * + * printf("[basicsocket] no more data\n"); + */ + return false; + } } return true; } commit abbadf0b98661a6e115583f5a08f0284f82b3dcb Author: Christian Schuett <gaucho...@hotmail.com> Date: Thu Jan 1 17:47:44 2015 +0100 Neutrino language setup: always mark current language when opening menu if you open the language menu, move the cursor to a new language, leave this menu with home key and enter it again, the selected language is now always the current one Signed-off-by: Christian Schuett <gaucho...@hotmail.com> Signed-off-by: GetAway <get-a...@t-online.de> diff --git a/tuxbox/neutrino/src/gui/osd_setup.cpp b/tuxbox/neutrino/src/gui/osd_setup.cpp index 8539241..efe5f43 100644 --- a/tuxbox/neutrino/src/gui/osd_setup.cpp +++ b/tuxbox/neutrino/src/gui/osd_setup.cpp @@ -169,6 +169,12 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) int res = showOsdChannelListSetup(); return res; } + else if (actionKey == "show_language_setup") + { + COsdLangSetup osd_lang(menue_title); + int res = osd_lang.exec(NULL, ""); + return res; + } else if (actionKey=="select_font") { CFile file; @@ -269,8 +275,7 @@ int COsdSetup::showOsdSetup() CMenuWidget *osd_setup_colors = new CMenuWidget(menue_title, menue_icon, width); // language - COsdLangSetup *osd_lang = new COsdLangSetup(menue_title); - CMenuForwarder *osd_lang_fw = new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE, true, g_settings.language, osd_lang, NULL, CRCInput::RC_red); + CMenuForwarder *osd_lang_fw = new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE, true, g_settings.language, this, "show_language_setup", CRCInput::RC_red); //osd color setup forwarder CMenuForwarder *osd_setup_color_sub_fw = new CMenuForwarder(LOCALE_OSDSETTINGS_COLORMENU_HEAD, true, NULL, osd_setup_colors, NULL, CRCInput::RC_green); @@ -355,7 +360,6 @@ int COsdSetup::showOsdSetup() delete osd_setup; delete osd_setup_colors; - delete osd_lang; delete osd_themes; delete osd_screen; #ifdef HAVE_DBOX_HARDWARE ----------------------------------------------------------------------- Summary of changes: misc/libs/libconnection/basicserver.cpp | 2 +- misc/libs/libconnection/basicsocket.cpp | 119 ++++++++++---------- .../daemons/nhttpd/yhttpd_core/ywebserver.cpp | 28 +++-- tuxbox/neutrino/data/locale/deutsch.locale | 4 +- tuxbox/neutrino/data/locale/english.locale | 4 +- tuxbox/neutrino/src/driver/lcdd.cpp | 36 ++++++- tuxbox/neutrino/src/gui/audioplayer.cpp | 107 +++++++++--------- tuxbox/neutrino/src/gui/audioplayer.h | 1 + tuxbox/neutrino/src/gui/movieplayer.cpp | 9 -- tuxbox/neutrino/src/gui/osd_setup.cpp | 10 +- tuxbox/neutrino/src/gui/pictureviewer.cpp | 10 ++- tuxbox/neutrino/src/gui/upnpbrowser.cpp | 2 +- tuxbox/neutrino/src/system/helper.cpp | 4 +- 13 files changed, 192 insertions(+), 144 deletions(-) -- Tuxbox-GIT: apps ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Tuxbox-cvs-commits mailing list Tuxbox-cvs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits