diff --git a/acinclude.m4 b/acinclude.m4 index d355caa08..d3f29e588 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -82,21 +82,33 @@ check_path () { ]) +dnl expand nested ${foo}/bar +AC_DEFUN([TUXBOX_EXPAND_VARIABLE],[__$1="$2" + for __CNT in false false false false true; do dnl max 5 levels of indirection + + $1=`eval echo "$__$1"` + echo ${$1} | grep -q '\$' || break # 'grep -q' is POSIX, exit if no $ in variable + __$1="${$1}" + done + $__CNT && AC_MSG_ERROR([can't expand variable $1=$2]) dnl bail out if we did not expand +]) + AC_DEFUN([TUXBOX_APPS_DIRECTORY_ONE],[ AC_ARG_WITH($1,[ $6$7 [[PREFIX$4$5]]],[ _$2=$withval if test "$TARGET" = "cdk"; then - $2=`eval echo "$TARGET_PREFIX$withval"` + $2=`eval echo "$TARGET_PREFIX$withval"` # no indirection possible IMNSHO else $2=$withval fi TARGET_$2=${$2} ],[ - $2="\${$3}$5" + # RFC 1925: "you can always add another level of indirection..." + TUXBOX_EXPAND_VARIABLE($2,"${$3}$5") if test "$TARGET" = "cdk"; then - _$2=`eval echo "${target$3}$5"` + TUXBOX_EXPAND_VARIABLE(_$2,"${target$3}$5") else - _$2=`eval echo "${$3}$5"` + _$2=${$2} fi TARGET_$2=$_$2 ]) @@ -326,6 +338,7 @@ if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) $1_CFLAGS=$($PKG_CONFIG --cflags "$2") $1_LIBS=$($PKG_CONFIG --libs "$2") + $1_EXISTS=yes else AC_MSG_RESULT(no) fi @@ -336,7 +349,7 @@ AC_SUBST($1_LIBS) AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG],[ _TUXBOX_APPS_LIB_PKGCONFIG($1,$2) -if test -z "$$1_CFLAGS" ; then +if test x"$$1_EXISTS" != xyes; then AC_MSG_ERROR([could not find package $2]); fi ]) diff --git a/configure.ac b/configure.ac index 58fd9cd63..a3b6b0805 100644 --- a/configure.ac +++ b/configure.ac @@ -89,8 +89,16 @@ fi AM_CONDITIONAL(USE_TREMOR, test "$TREMOR" = "yes") # TUXBOX_APPS_LIB_PKGCONFIG(OPENSSL,openssl) -TUXBOX_APPS_LIB_CONFIG(CURL,curl-config) -TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config) +TUXBOX_APPS_LIB_PKGCONFIG(CURL,libcurl) +TUXBOX_APPS_LIB_PKGCONFIG(FREETYPE,freetype2) +# fallback to curl-config (which is ugly for cross-compilation) +if test -z "$CURL_LIBS" -a -z "$CURL_CFLAGS"; then + TUXBOX_APPS_LIB_CONFIG(CURL,curl-config) +fi +# fallback to freetype-config (which is ugly for cross-compilation) +if test -z "$FREETYPE_LIBS" -a -z "$FREETYPE_CFLAGS"; then + TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config) +fi TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng) TUXBOX_APPS_LIB_PKGCONFIG(AVFORMAT,libavformat) @@ -233,24 +241,8 @@ else HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__file__="\"$(subst $(srcdir)/,,$(abspath $<))\""' HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__path_file__="\"$(subst $(top_srcdir)/,,$(abspath $<))\""' fi -# -# Check for libtdservicedb - the new one - for testing only -# -#CSL_VERSION=0.0.1 -#FCSL_VERSION=`$PKG_CONFIG --modversion libcoolstream` -#AC_MSG_CHECKING(for package libcoolstream >= $CSL_VERSION) -#if $PKG_CONFIG --atleast-version $CSL_VERSION libcoolstream ; then - #AC_MSG_RESULT(found (version $FCSL_VERSION)) - #LIBCS_CFLAGS=`$PKG_CONFIG --cflags libcoolstream` - #LIBCS_LIBS=`$PKG_CONFIG --libs libcoolstream` -#else - #AC_MSG_ERROR([ -#*** libcoolstream $CSL_VERSION or newer is required! *** - #]) -#fi + AC_SUBST(HWLIB_CFLAGS) -AC_SUBST(LIBCS_CFLAGS) -AC_SUBST(LIBCS_LIBS) AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_LIBS) AC_SUBST(VORBISIDEC_CFLAGS) @@ -271,7 +263,6 @@ lib/xmltree/Makefile lib/jsoncpp/Makefile lib/sectionsdclient/Makefile lib/timerdclient/Makefile -lib/libtriple/Makefile lib/libtuxtxt/Makefile lib/libdvbsub/Makefile lib/libupnpclient/Makefile diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 30cc5056f..97beeb96f 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1932,7 +1932,7 @@ moviebrowser.short_rating Vote moviebrowser.short_recorddate Datum moviebrowser.short_serie Serie moviebrowser.short_size Größe -moviebrowser.short_spacer +moviebrowser.short_spacer moviebrowser.short_title Titel moviebrowser.start_head Film starten von Position: moviebrowser.start_record_start Aufnahmestart diff --git a/data/locale/english.locale b/data/locale/english.locale index ac01e68ad..37f6eb128 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1932,7 +1932,7 @@ moviebrowser.short_rating Vote moviebrowser.short_recorddate Date moviebrowser.short_serie Serie moviebrowser.short_size MB -moviebrowser.short_spacer +moviebrowser.short_spacer moviebrowser.short_title Title moviebrowser.start_head Start movie from: moviebrowser.start_record_start Movie start diff --git a/lib/Makefile.am b/lib/Makefile.am index ff4f206cb..bc4b8f2e5 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -17,8 +17,3 @@ if ENABLE_UPNP SUBDIRS += \ libupnpclient endif - -if BOXTYPE_TRIPLE -SUBDIRS += \ - libtriple -endif diff --git a/lib/libdvbsub/Makefile.am b/lib/libdvbsub/Makefile.am index 6ac627d08..aa9082181 100644 --- a/lib/libdvbsub/Makefile.am +++ b/lib/libdvbsub/Makefile.am @@ -4,6 +4,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/zapit/include \ @AVFORMAT_CFLAGS@ \ + @SIGC_CFLAGS@ \ @HWLIB_CFLAGS@ AM_CPPFLAGS += -fno-rtti -fno-exceptions diff --git a/lib/libtriple/Makefile.am b/lib/libtriple/Makefile.am deleted file mode 100644 index 4ac1550ca..000000000 --- a/lib/libtriple/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -AM_CPPFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/src/zapit/include \ - -I$(top_srcdir)/lib/connection \ - -I$(top_srcdir)/lib/libeventserver \ - @DIRECTFB_CFLAGS@ - -noinst_LIBRARIES = libtriple.a - -AM_CPPFLAGS += -fno-rtti -fno-exceptions - -libtriple_a_SOURCES = \ - dmx_td.cpp \ - video_td.cpp \ - audio_td.cpp \ - init_td.cpp \ - playback_td.cpp \ - pwrmngr.cpp \ - record_td.cpp - -#libtriple_a_LIBADD = $(top_builddir)/src/driver/libneutrino_driver.a diff --git a/lib/libtriple/cs_api.h b/lib/libtriple/cs_api.h deleted file mode 100644 index 5512b928d..000000000 --- a/lib/libtriple/cs_api.h +++ /dev/null @@ -1,66 +0,0 @@ -/* compatibility header for tripledragon. I'm lazy, so I just left it - as "cs_api.h" so that I don't need too many ifdefs in the code */ - -#ifndef __CS_API_H_ -#define __CS_API_H_ - -#include "init_td.h" -typedef void (*cs_messenger) (unsigned int msg, unsigned int data); - -#if 0 -enum CS_LOG_MODULE { - CS_LOG_CI = 0, - CS_LOG_HDMI_CEC, - CS_LOG_HDMI, - CS_LOG_VIDEO, - CS_LOG_VIDEO_DRM, - CS_LOG_AUDIO, - CS_LOG_DEMUX, - CS_LOG_DENC, - CS_LOG_PVR_RECORD, - CS_LOG_PVR_PLAY, - CS_LOG_POWER_CTRL, - CS_LOG_POWER_CLK, - CS_LOG_MEM, - CS_LOG_API, -}; -#endif - -inline void cs_api_init() -{ - init_td_api(); -}; - -inline void cs_api_exit() -{ - shutdown_td_api(); -}; - -#define cs_malloc_uncached malloc -#define cs_free_uncached free - -// Callback function helpers -static inline void cs_register_messenger(cs_messenger) { return; }; -static inline void cs_deregister_messenger(void) { return; }; -//cs_messenger cs_get_messenger(void); - -#if 0 -// Logging functions -void cs_log_enable(void); -void cs_log_disable(void); -void cs_log_message(const char *prefix, const char *fmt, ...); -void cs_log_module_enable(enum CS_LOG_MODULE module); -void cs_log_module_disable(enum CS_LOG_MODULE module); -void cs_log_module_message(enum CS_LOG_MODULE module, const char *fmt, ...); - -// TS Routing -unsigned int cs_get_ts_output(void); -int cs_set_ts_output(unsigned int port); - -// Serial nr and revision accessors -unsigned long long cs_get_serial(void); -#endif -/* compat... HD1 seems to be version 6. everything newer ist > 6... */ -static unsigned int cs_get_revision(void) { return 1; }; -extern int cnxt_debug; -#endif //__CS_API_H_ diff --git a/lib/libtriple/init_cs.h b/lib/libtriple/init_cs.h deleted file mode 100644 index 5894a14d0..000000000 --- a/lib/libtriple/init_cs.h +++ /dev/null @@ -1,2 +0,0 @@ -#warning using init_cs.h from libtriple -#include "init_td.h" diff --git a/lib/libtriple/init_td.cpp b/lib/libtriple/init_td.cpp deleted file mode 100644 index d56714bf3..000000000 --- a/lib/libtriple/init_td.cpp +++ /dev/null @@ -1,133 +0,0 @@ -#include - -#include "init_td.h" -#include -#include -#include -#include -#include -#include - -#include - -extern "C" { -#include -#include -#include -} - -static const char * FILENAME = "init_td.cpp"; - -static bool initialized = false; - -/* the super interface */ -static IDirectFB *dfb; -/* the primary surface */ -static IDirectFBSurface *primary; -static IDirectFBSurface *dest; -static IDirectFBDisplayLayer *layer; - -#define DFBCHECK(x...) \ - err = x; \ - if (err != DFB_OK) { \ - fprintf(stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \ - DirectFBErrorFatal(#x, err ); \ - } - -static void dfb_init() -{ - int argc = 0; - DFBResult err; - DFBSurfaceDescription dsc; - DFBSurfacePixelFormat pixelformat; - int SW, SH; - - DFBCHECK(DirectFBInit(&argc, NULL)); - /* neutrino does its own VT handling */ - DirectFBSetOption("no-vt-switch", NULL); - DirectFBSetOption("no-vt", NULL); - /* signal handling seems to interfere with neutrino */ - DirectFBSetOption("no-sighandler", NULL); - /* if DirectFB grabs the remote, neutrino does not get events */ - DirectFBSetOption("disable-module", "tdremote"); - DirectFBSetOption("disable-module", "keyboard"); - DirectFBSetOption("disable-module", "linux_input"); - DFBCHECK(DirectFBCreate(&dfb)); - - err = dfb->SetCooperativeLevel(dfb, DFSCL_FULLSCREEN); - if (err) - DirectFBError("Failed to get exclusive access", err); - - dsc.flags = DSDESC_CAPS; - dsc.caps = DSCAPS_PRIMARY; - - DFBCHECK(dfb->CreateSurface( dfb, &dsc, &primary )); - /* set pixel alpha mode */ - dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer); - DFBCHECK(layer->SetCooperativeLevel(layer, DLSCL_EXCLUSIVE)); - DFBDisplayLayerConfig conf; - DFBCHECK(layer->GetConfiguration(layer, &conf)); - conf.flags = DLCONF_OPTIONS; - conf.options = (DFBDisplayLayerOptions)((conf.options & ~DLOP_OPACITY) | DLOP_ALPHACHANNEL); - DFBCHECK(layer->SetConfiguration(layer, &conf)); - - primary->GetPixelFormat(primary, &pixelformat); - primary->GetSize(primary, &SW, &SH); - primary->Clear(primary, 0, 0, 0, 0); - primary->GetSubSurface(primary, NULL, &dest); - dest->Clear(dest, 0, 0, 0, 0); -} - -static void dfb_deinit() -{ - dest->Release(dest); - primary->Release(primary); - layer->Release(layer); - dfb->Release(dfb); -} - -static void rc_init() -{ - /* set remote control address from bootloader config */ - int fd = open("/dev/stb/tdsystem", O_RDWR); - struct BIOS_CONFIG_AREA bca; - unsigned short rc_addr = 0xff; - if (ioctl(fd, IOC_AVS_GET_LOADERCONFIG, &bca) != 0) - fprintf(stderr, "%s: IOC_AVS_GET_LOADERCONFIG failed: %m\n", __FUNCTION__); - else - rc_addr = bca.ir_adrs; - close(fd); - fd = open("/dev/stb/tdremote", O_RDWR); - if (ioctl(fd, IOC_IR_SET_ADDRESS, rc_addr) < 0) - fprintf(stderr, "%s: IOC_IR_SET_ADDRESS %d failed: %m\n", __FUNCTION__, rc_addr); - /* short delay in the driver improves responsiveness and reduces spurious - "key up" events during zapping */ - //ioctl(fd, IOC_IR_SET_DELAY, 1); TODO: needs more work in rcinput - close(fd); - printf("%s: rc_addr=0x%02hx\n", __FUNCTION__, rc_addr); -} - -void init_td_api() -{ - fprintf(stderr, "%s:%s begin, initialized = %d\n", FILENAME, __FUNCTION__, (int)initialized); - if (!initialized) - { - /* DirectFB does setpgid(0,0), which disconnects us from controlling terminal - and thus disables e.g. ctrl-C. work around that. */ - pid_t pid = getpgid(0); - dfb_init(); - if (setpgid(0, pid)) - perror("setpgid"); - rc_init(); - } - initialized = true; - fprintf(stderr, "%s:%s end\n", FILENAME, __FUNCTION__); -} - -void shutdown_td_api() -{ - fprintf(stderr, "%s:%s, initialized = %d\n", FILENAME, __FUNCTION__, (int)initialized); - if (initialized) - dfb_deinit(); - initialized = false; -} diff --git a/lib/libtriple/init_td.h b/lib/libtriple/init_td.h deleted file mode 100644 index d9a6f0963..000000000 --- a/lib/libtriple/init_td.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef __INIT_TD_H -#define __INIT_TD_H -void init_td_api(); -void shutdown_td_api(); -#endif diff --git a/lib/libtriple/playback.h b/lib/libtriple/playback.h deleted file mode 100644 index 6e6b4c5ae..000000000 --- a/lib/libtriple/playback.h +++ /dev/null @@ -1 +0,0 @@ -#include "playback_td.h" diff --git a/lib/libtriple/td-compat/td-audio-compat.h b/lib/libtriple/td-compat/td-audio-compat.h deleted file mode 100644 index 3e0b4a7ff..000000000 --- a/lib/libtriple/td-compat/td-audio-compat.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * compatibility stuff for Tripledragon audio API - * - * (C) 2009 Stefan Seyfried - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __td_audio_compat_h__ -#define __td_audio_compat_h__ - -#include -// types -typedef enum { - AUDIO_SOURCE_DEMUX = AUD_SOURCE_DEMUX, - AUDIO_SOURCE_MEMORY = AUD_SOURCE_MEMORY -} audio_stream_source_t; -#define audio_channel_select_t audChannel_t -// ioctls -#define AUDIO_CHANNEL_SELECT MPEG_AUD_SELECT_CHANNEL -#define AUDIO_SELECT_SOURCE MPEG_AUD_SELECT_SOURCE -#define AUDIO_PLAY MPEG_AUD_PLAY -#define AUDIO_STOP MPEG_AUD_STOP -#define AUDIO_SET_MUTE MPEG_AUD_SET_MUTE - -#endif /* __td_audio_compat_h__ */ diff --git a/lib/libtriple/td-compat/td-demux-compat.h b/lib/libtriple/td-compat/td-demux-compat.h deleted file mode 100644 index 8feacfed3..000000000 --- a/lib/libtriple/td-compat/td-demux-compat.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * compatibility stuff for Tripledragon demux API - * - * (C) 2009 Stefan Seyfried - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __td_demux_compat_h__ -#define __td_demux_compat_h__ - -#include -#include -// types -#define dmx_output_t OutDevice -#define dmx_pes_type_t PesType -#define dmx_sct_filter_params demux_filter_para -#define dmx_pes_filter_params demux_pes_para -#define pes_type pesType -// defines -#define DMX_FILTER_SIZE FILTER_LENGTH -#define DMX_ONESHOT XPDF_ONESHOT -#define DMX_CHECK_CRC 0 // TD checks CRC by default -#define DMX_IMMEDIATE_START XPDF_IMMEDIATE_START -#define DMX_OUT_DECODER OUT_DECODER -// ioctls -#define DMX_SET_FILTER DEMUX_FILTER_SET -#define DMX_SET_PES_FILTER DEMUX_FILTER_PES_SET -#define DMX_START DEMUX_START -#define DMX_STOP DEMUX_STOP -#define DMX_SET_BUFFER_SIZE DEMUX_SET_BUFFER_SIZE - -#endif /* __td_demux_compat_h__ */ diff --git a/lib/libtriple/td-compat/td-frontend-compat.h b/lib/libtriple/td-compat/td-frontend-compat.h deleted file mode 100644 index 46781ce89..000000000 --- a/lib/libtriple/td-compat/td-frontend-compat.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * compatibility stuff for Tripledragon frontend API - * - * (C) 2009 Stefan Seyfried - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __td_frontend_compat_h__ -#define __td_frontend_compat_h__ - -#ifdef __cplusplus -extern "C" { -#endif - #include -#ifdef __cplusplus -} -#endif - -/* I know that those are different. But functions that get a - dvb_frontend_parameters struct passed on dbox/dreambox will most likely - get a tunersetup struct on TD, so it keeps the differences in headers - and function prototypes small. Of course, the functions itself will have - #ifdef TRIPLEDRAGON or similar... */ -#define dvb_frontend_parameters tunersetup - -/* compat stuff for settings.cpp */ -enum { - INVERSION_OFF, - INVERSION_ON, - INVERSION_AUTO -}; -typedef enum fe_code_rate { - FEC_NONE = 0, - FEC_1_2, - FEC_2_3, - FEC_3_4, - FEC_4_5, - FEC_5_6, - FEC_6_7, - FEC_7_8, - FEC_8_9, - FEC_AUTO -} fe_code_rate_t; - -enum td_code_rate { - TD_FEC_AUTO = 0, - TD_FEC_1_2, - TD_FEC_2_3, - TD_FEC_3_4, - TD_FEC_5_6, - TD_FEC_7_8 -}; - -typedef enum fe_sec_tone_mode { - SEC_TONE_ON, - SEC_TONE_OFF -} fe_sec_tone_mode_t; - -typedef enum fe_sec_voltage { - SEC_VOLTAGE_13, - SEC_VOLTAGE_18, - SEC_VOLTAGE_OFF -} fe_sec_voltage_t; - -typedef enum fe_sec_mini_cmd { - SEC_MINI_A, - SEC_MINI_B -} fe_sec_mini_cmd_t; - -struct dvb_diseqc_master_cmd { - unsigned char msg [6]; /* { framing, address, command, data [3] } */ - unsigned char msg_len; /* valid values are 3...6 */ -}; - -typedef enum fe_type { - FE_QPSK, - FE_QAM, - FE_OFDM, - FE_ATSC -} fe_type_t; - -struct dvb_frontend_info { -// char name[128]; - fe_type_t type; -#if 0 - __u32 frequency_min; - __u32 frequency_max; - __u32 frequency_stepsize; - __u32 frequency_tolerance; - __u32 symbol_rate_min; - __u32 symbol_rate_max; - __u32 symbol_rate_tolerance; /* ppm */ - __u32 notifier_delay; /* DEPRECATED */ - fe_caps_t caps; -#endif -}; - -struct dvb_frontend_event { - fe_status_t status; - tunersetup parameters; -}; - -#ifdef _DVBFRONTEND_H_ -#error _DVBFRONTEND_H_ included -#endif - -#endif /* __td_frontend_compat_h__ */ diff --git a/lib/libtriple/td-compat/td-value-compat.h b/lib/libtriple/td-compat/td-value-compat.h deleted file mode 100644 index f7bb9523c..000000000 --- a/lib/libtriple/td-compat/td-value-compat.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * compatibility stuff for conversion of Tripledragon API values to DVB API - * and vice versa - * - * (C) 2009 Stefan Seyfried - * - * Released under the GPL V2. - */ - -#ifndef _td_value_compat_ -#define _td_value_compat_ - -#undef FE_GET_INFO -#undef FE_READ_BER -#undef FE_READ_SIGNAL_STRENGTH -#undef FE_READ_SNR -#undef FE_READ_UNCORRECTED_BLOCKS -#undef FE_GET_EVENT -#undef FE_READ_STATUS -#undef FE_SET_PROPERTY -#undef FE_GET_EVENT -#undef FE_GET_EVENT -#undef FE_SET_PROPERTY -#undef FE_SET_TONE -#undef FE_ENABLE_HIGH_LNB_VOLTAGE -#undef FE_SET_VOLTAGE -#undef FE_DISEQC_SEND_MASTER_CMD -#undef FE_DISEQC_SEND_BURST -/* hack, linux/dvb/frontend.h already defines fe_status */ -#define fe_status td_fe_status -#define fe_status_t td_fe_status_t -#define FE_HAS_SIGNAL TD_FE_HAS_SIGNAL -#define FE_HAS_CARRIER TD_FE_HAS_CARRIER -#define FE_HAS_VITERBI TD_FE_HAS_VITERBI -#define FE_HAS_SYNC TD_FE_HAS_SYNC -#define FE_HAS_LOCK TD_FE_HAS_LOCK -#define FE_TIMEDOUT TD_FE_TIMEDOUT -#define FE_REINIT TD_FE_REINIT -#include -#undef fe_status -#undef fe_status_t -#undef FE_HAS_SIGNAL -#undef FE_HAS_CARRIER -#undef FE_HAS_VITERBI -#undef FE_HAS_SYNC -#undef FE_HAS_LOCK -#undef FE_TIMEDOUT -#undef FE_REINIT -enum td_code_rate { - TD_FEC_AUTO = 0, - TD_FEC_1_2, - TD_FEC_2_3, - TD_FEC_3_4, - TD_FEC_5_6, - TD_FEC_7_8 -}; - -static inline unsigned int dvbfec2tdfec(fe_code_rate_t fec) -{ - switch (fec) { - case FEC_1_2: // FEC_1_2 ... FEC_3_4 are equal to TD_FEC_1_2 ... TD_FEC_3_4 - case FEC_2_3: - case FEC_3_4: - return (unsigned int)fec; - case FEC_5_6: - return TD_FEC_5_6; - case FEC_7_8: - return TD_FEC_7_8; - default: - break; - } - return TD_FEC_AUTO; -} - -static inline fe_code_rate_t tdfec2dvbfec(unsigned int tdfec) -{ - switch (tdfec) - { - case TD_FEC_1_2: - case TD_FEC_2_3: - case TD_FEC_3_4: - return (fe_code_rate_t)tdfec; - case TD_FEC_5_6: - return FEC_5_6; - case TD_FEC_7_8: - return FEC_7_8; - default: - break; - } - return FEC_AUTO; -} - -#endif /* _td_value_compat_ */ diff --git a/lib/libtriple/td-compat/td-video-compat.h b/lib/libtriple/td-compat/td-video-compat.h deleted file mode 100644 index 137a3467a..000000000 --- a/lib/libtriple/td-compat/td-video-compat.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * compatibility stuff for Tripledragon video API - * - * (C) 2009 Stefan Seyfried - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __td_video_compat_h__ -#define __td_video_compat_h__ - -#include -// types -#define video_format_t vidDispSize_t -#define video_displayformat_t vidDispMode_t -typedef enum { - VIDEO_SOURCE_DEMUX = VID_SOURCE_DEMUX, - VIDEO_SOURCE_MEMORY = VID_SOURCE_MEMORY -} video_stream_source_t; -typedef enum { - VIDEO_STOPPED, /* Video is stopped */ - VIDEO_PLAYING, /* Video is currently playing */ - VIDEO_FREEZED /* Video is freezed */ -} video_play_state_t; -//#define video_play_state_t vidState_t -// ioctls -#define VIDEO_SET_SYSTEM MPEG_VID_SET_DISPFMT -#define VIDEO_SET_FORMAT MPEG_VID_SET_DISPSIZE -#define VIDEO_SET_DISPLAY_FORMAT MPEG_VID_SET_DISPMODE -#define VIDEO_SELECT_SOURCE MPEG_VID_SELECT_SOURCE -#define VIDEO_PLAY MPEG_VID_PLAY -#define VIDEO_STOP MPEG_VID_STOP -#define VIDEO_SET_BLANK MPEG_VID_SET_BLANK - -#endif /* __td_video_compat_h__ */ diff --git a/lib/libtuxtxt/Makefile.am b/lib/libtuxtxt/Makefile.am index 7ea232ad1..5d24e483e 100644 --- a/lib/libtuxtxt/Makefile.am +++ b/lib/libtuxtxt/Makefile.am @@ -4,6 +4,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/zapit/include \ $(FREETYPE_CFLAGS) \ + @SIGC_CFLAGS@ \ @HWLIB_CFLAGS@ AM_CPPFLAGS += -fno-rtti -fno-exceptions diff --git a/src/Makefile.am b/src/Makefile.am index a0a03a075..ee2f18e19 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,7 +22,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/libupnpclient \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ - @LIBCS_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ @@ -116,7 +115,6 @@ neutrino_LDADD = \ @FREETYPE_LIBS@ \ @PNG_LIBS@ \ @BLURAY_LIBS@ \ - @LIBCS_LIBS@ \ @AVFORMAT_LIBS@ \ @AVUTIL_LIBS@ \ @AVCODEC_LIBS@ \ @@ -165,10 +163,3 @@ bin_PROGRAMS += mdev_helper mdev_helper_SOURCES = mdev_helper.cpp endif -if BOXTYPE_TRIPLE -neutrino_LDADD += \ - $(top_builddir)/lib/libtriple/libtriple.a \ - @DIRECTFB_LIBS@ \ - $(top_builddir)/src/lcddisplay/liblcddisplay.a -endif - diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index db65b7209..0fb5eeb3e 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1095,10 +1095,12 @@ bool CChannelList::checkLockStatus(neutrino_msg_data_t data, bool pip) out: if (startvideo) { if(pip) { +#ifdef ENABLE_PIP if (CNeutrinoApp::getInstance()->StartPip((*chanlist)[selected]->getChannelID())) { calcSize(); paintBody(); } +#endif } else g_RemoteControl->startvideo(); return true; diff --git a/src/gui/color.cpp b/src/gui/color.cpp index 56382340d..cbc0873e0 100644 --- a/src/gui/color.cpp +++ b/src/gui/color.cpp @@ -233,8 +233,8 @@ void getItemColors(fb_pixel_t &t, fb_pixel_t &b, bool selected, bool marked, boo { if (selected && marked) { - t = COL_MENUCONTENTSELECTED_TEXT_PLUS_2; - b = COL_MENUCONTENTSELECTED_PLUS_2; + t = COL_MENUCONTENTSELECTED_TEXT; + b = COL_MENUCONTENTSELECTED_PLUS_0; return; } diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 2136cade0..b0aeec52c 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3544,7 +3544,7 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite *item_string = str_tmp; break; case MB_INFO_LENGTH: // = 18, - snprintf(str_tmp, sizeof(str_tmp),"%dh %dm", movie_info.length/60, movie_info.length%60); + snprintf(str_tmp, sizeof(str_tmp),"%dh %02dm", movie_info.length/60, movie_info.length%60); *item_string = str_tmp; break; case MB_INFO_SIZE: // = 19, diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 868ffe544..546979fcd 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -296,7 +296,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) if(actionKey == "add_ip") { std::string remoteip; CIPInput remotebox_NetworkIP(LOCALE_REMOTEBOX_IP , &remoteip); - if (remotebox_NetworkIP.exec(NULL,"") == true) { + if ((remotebox_NetworkIP.exec(NULL,"") == true) && (!remoteip.empty())) { remboxmenu->addItem(new CMenuForwarder(remoteip, true, NULL, this, "cha_ip")); remotebox_NetworkIP.hide(); changed = true; @@ -394,22 +394,37 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) } else if ((strcmp(key, "fetch_remotetimer") == 0) && localChanExists(timerlist[selected].channel_id)) { + int pre,post; + Timer->getRecordingSafety(pre,post); + std::string remotebox_ip = timerlist[selected].remotebox_ip; + std::string eventID = to_string((int)timerlist[selected].eventID); + + int res = Timer->addRecordTimerEvent(timerlist[selected].channel_id, timerlist[selected].alarmTime + pre, + timerlist[selected].stopTime - post, 0, 0, timerlist[selected].announceTime, + TIMERD_APIDS_CONF, true, timerlist[selected].announceTime > time(NULL),"",false); + + if (res == -1) + { + bool forceAdd = askUserOnTimerConflict(timerlist[selected].announceTime,timerlist[selected].stopTime); + + if (forceAdd) + { + res = Timer->addRecordTimerEvent(timerlist[selected].channel_id, timerlist[selected].alarmTime + pre, + timerlist[selected].stopTime - post, 0, 0, timerlist[selected].announceTime, + TIMERD_APIDS_CONF, true, timerlist[selected].announceTime > time(NULL),"",true); + } + } + CHTTPTool httpTool; std::string r_url; r_url = "http://"; - r_url += timerlist[selected].remotebox_ip; + r_url += remotebox_ip; r_url += "/control/timer?action=remove"; - r_url += "&id=" + to_string((int)timerlist[selected].eventID); + r_url += "&id=" + eventID; //printf("[remotetimer] url:%s\n",r_url.c_str()); + if (res > 0) r_url = httpTool.downloadString(r_url); //printf("[remotetimer] status:%s\n",r_url.c_str()); - if (r_url=="ok") { - int pre,post; - Timer->getRecordingSafety(pre,post); - Timer->addRecordTimerEvent(timerlist[selected].channel_id, timerlist[selected].alarmTime + pre, - timerlist[selected].stopTime - post, 0, 0, timerlist[selected].announceTime, - TIMERD_APIDS_CONF, true, timerlist[selected].announceTime > time(NULL)); - } } else if (strcmp(key, "del_remotetimer") == 0) { @@ -619,12 +634,6 @@ void CTimerList::updateEvents(void) void CTimerList::select_remotebox_ip() { - if (g_settings.timer_remotebox_ip.size() == 1) { - std::list::iterator it = g_settings.timer_remotebox_ip.begin(); - strncpy(timerlist[selected].remotebox_ip,it->c_str(),sizeof(timerlist[selected].remotebox_ip)); - timerlist[selected].remotebox_ip[sizeof(timerlist[selected].remotebox_ip) - 1] = 0; - } - int select = 0; CMenuWidget *m = new CMenuWidget(LOCALE_REMOTEBOX_HEAD, NEUTRINO_ICON_TIMER); CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select); @@ -638,12 +647,18 @@ void CTimerList::select_remotebox_ip() std::list::iterator it = g_settings.timer_remotebox_ip.begin(); std::advance(it,select); + if (askUserOnRemoteTimerConflict(timerlist[selected].announceTime, timerlist[selected].stopTime, (char*) it->c_str())) + { strncpy(timerlist[selected].remotebox_ip,it->c_str(),sizeof(timerlist[selected].remotebox_ip)); timerlist[selected].remotebox_ip[sizeof(timerlist[selected].remotebox_ip) - 1] = 0; + } } bool CTimerList::remoteChanExists(t_channel_id channel_id) { + if (strcmp(timerlist[selected].remotebox_ip,"") == 0) + return false; + CHTTPTool httpTool; std::string r_url; r_url = "http://"; @@ -1655,6 +1670,72 @@ int CTimerList::newTimer() return ret; } +bool CTimerList::askUserOnRemoteTimerConflict(time_t announceTime, time_t stopTime, char * remotebox_ip) +{ + CTimerd::TimerList overlappingTimers; + int pre,post; + Timer->getRecordingSafety(pre,post); + + for (CTimerd::TimerList::iterator it = timerlist.begin(); + it != timerlist.end();++it) + { + + if (strcmp(it->remotebox_ip,remotebox_ip) == 0) { + + if(it->stopTime != 0 && stopTime != 0) + { + // Check if both timers have start and end. In this case do not show conflict, if endtime is the same than the starttime of the following timer + if ((stopTime+post > it->alarmTime) && (announceTime-pre < it->stopTime)) + { + overlappingTimers.push_back(*it); + } + } + else + { + if (!((stopTime < it->announceTime) || (announceTime > it->stopTime))) + { + overlappingTimers.push_back(*it); + } + } + } + } + + std::string timerbuf = g_Locale->getText(LOCALE_TIMERLIST_OVERLAPPING_TIMER); + timerbuf += "\n"; + for (CTimerd::TimerList::iterator it = overlappingTimers.begin(); + it != overlappingTimers.end(); ++it) + { + timerbuf += CTimerList::convertTimerType2String(it->eventType); + timerbuf += " ("; + timerbuf += CTimerList::convertChannelId2String(it->channel_id); // UTF-8 + if (it->epgID != 0) + { + CEPGData epgdata; + if (CEitManager::getInstance()->getEPGid(it->epgID, it->epg_starttime, &epgdata)) + { + timerbuf += ":"; + timerbuf += epgdata.title; + } + else if (strlen(it->epgTitle)!=0) + { + timerbuf += ":"; + timerbuf += it->epgTitle; + } + } + timerbuf += "):\n"; + + struct tm *annTime = localtime(&(it->announceTime)); + timerbuf += strftime("%d.%m. %H:%M\n",annTime); + + struct tm *sTime = localtime(&(it->stopTime)); + timerbuf += strftime("%d.%m. %H:%M\n",sTime); + } + if (overlappingTimers.size() > 0) + return (ShowMsg(LOCALE_MESSAGEBOX_INFO,timerbuf,CMessageBox::mbrNo,CMessageBox::mbNo|CMessageBox::mbYes) == CMessageBox::mbrYes); + else + return true; +} + bool askUserOnTimerConflict(time_t announceTime, time_t stopTime, t_channel_id channel_id) { //NI diff --git a/src/gui/timerlist.h b/src/gui/timerlist.h index 3ed0af33c..7a633cb7f 100644 --- a/src/gui/timerlist.h +++ b/src/gui/timerlist.h @@ -95,6 +95,7 @@ class CTimerList : public CMenuTarget, public CListHelpers bool changed; int bselected; CMenuWidget *remboxmenu; + bool askUserOnRemoteTimerConflict(time_t announceTime, time_t stopTime, char * remotebox_ip); public: CTimerList(); diff --git a/src/gui/update_ext.cpp b/src/gui/update_ext.cpp index c946c89b5..3e6246d36 100644 --- a/src/gui/update_ext.cpp +++ b/src/gui/update_ext.cpp @@ -324,7 +324,7 @@ bool CExtUpdate::applySettings() fd2 = -1; int tmpCount = 0; while (fd2 < 0) { - fd2 = open(mtdBlockFileName.c_str(), O_WRONLY); + fd2 = open(mtdBlockFileName.c_str(), O_WRONLY, 00644); tmpCount++; if (tmpCount > 3) break; @@ -375,7 +375,7 @@ bool CExtUpdate::applySettings() if (fd1 < 0) return ErrorReset(RESET_UNLOAD | DELETE_MTDBUF, "cannot read mtdBlock"); fsize = mtdRamSize; - fd2 = open(imgFilename.c_str(), O_WRONLY | O_CREAT); + fd2 = open(imgFilename.c_str(), O_WRONLY | O_CREAT, 00644); if (fd2 < 0) return ErrorReset(RESET_UNLOAD | CLOSE_FD1 | DELETE_MTDBUF, "cannot open image file: ", imgFilename); while(fsize > 0) { diff --git a/src/zapit/src/Makefile.am b/src/zapit/src/Makefile.am index a1dac17bc..0130f3a8a 100644 --- a/src/zapit/src/Makefile.am +++ b/src/zapit/src/Makefile.am @@ -11,6 +11,7 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/libeventserver \ -I$(top_srcdir)/lib/xmltree \ @FREETYPE_CFLAGS@ \ + @SIGC_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libzapit.a