mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
Merge branch 'master' into pu/fb-setmode
Origin commit data
------------------
Commit: bab10ee438
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-03-06 (Mon, 06 Mar 2017)
This commit is contained in:
13
configure.ac
13
configure.ac
@@ -236,20 +236,22 @@ fi
|
||||
|
||||
|
||||
if test "$BOXTYPE" = "coolstream"; then
|
||||
if test -e ${srcdir}/lib/libcoolstream/nevis_ir.h; then
|
||||
if test -e ${srcdir}/lib/hardware/coolstream/hd1/libcoolstream/nevis_ir.h; then
|
||||
AC_DEFINE(HAVE_COOLSTREAM_NEVIS_IR_H,1,[Define to 1 if you have the <nevis_ir.h> header file.])
|
||||
fi
|
||||
HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream -I$(top_srcdir)/src/zapit/include/private'
|
||||
HWLIB_CFLAGS='-I$(top_srcdir)/lib/hardware/coolstream/hd1/libcoolstream'
|
||||
|
||||
if test "$BOXMODEL" = "hd2"; then
|
||||
if test -e ${srcdir}/lib/libcoolstream2/cs_ir_generic.h; then
|
||||
if test -e ${srcdir}/lib/hardware/coolstream/hd2/libcoolstream/cs_ir_generic.h; then
|
||||
AC_DEFINE(HAVE_COOLSTREAM_CS_IR_GENERIC_H,1,[Define to 1 if you have the <cs_ir_generic.h> header file.])
|
||||
fi
|
||||
if test -e ${srcdir}/lib/libcoolstream2/cs_frontpanel.h; then
|
||||
if test -e ${srcdir}/lib/hardware/coolstream/hd2/libcoolstream/cs_frontpanel.h; then
|
||||
AC_DEFINE(HAVE_COOLSTREAM_CS_FRONTPANEL_H,1,[Define to 1 if you have the <cs_frontpanel.h> header file.])
|
||||
fi
|
||||
HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2 -I$(top_srcdir)/src/zapit/include/private'
|
||||
HWLIB_CFLAGS='-I$(top_srcdir)/lib/hardware/coolstream/hd2/libcoolstream'
|
||||
fi
|
||||
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-I$(top_srcdir)/src/zapit/include/private'
|
||||
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-I$(top_srcdir)/lib/hardware/coolstream'
|
||||
fi
|
||||
|
||||
# hack, so that framebuffer.h does not need to be included everywhere...
|
||||
@@ -313,6 +315,7 @@ data/y-web/scripts/Makefile
|
||||
data/y-web/styles/Makefile
|
||||
lib/Makefile
|
||||
lib/connection/Makefile
|
||||
lib/hardware/coolstream/Makefile
|
||||
lib/jsoncpp/Makefile
|
||||
lib/libconfigfile/Makefile
|
||||
lib/libdvbsub/Makefile
|
||||
|
@@ -17,3 +17,8 @@ if ENABLE_UPNP
|
||||
SUBDIRS += \
|
||||
libupnpclient
|
||||
endif
|
||||
|
||||
if BOXTYPE_COOL
|
||||
SUBDIRS += \
|
||||
hardware/coolstream
|
||||
endif
|
||||
|
12
lib/hardware/coolstream/Makefile.am
Normal file
12
lib/hardware/coolstream/Makefile.am
Normal file
@@ -0,0 +1,12 @@
|
||||
noinst_LIBRARIES = libhwcaps.a
|
||||
|
||||
AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing
|
||||
|
||||
if BOXMODEL_CS_HD2
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/lib/hardware/coolstream/hd2/libcoolstream
|
||||
else
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/lib/hardware/coolstream/hd1/libcoolstream
|
||||
endif
|
||||
|
||||
libhwcaps_a_SOURCES = \
|
||||
hardware_caps.cpp
|
72
lib/hardware/coolstream/hardware_caps.cpp
Normal file
72
lib/hardware/coolstream/hardware_caps.cpp
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* determine the capabilities of the hardware.
|
||||
* part of libstb-hal
|
||||
*
|
||||
* (C) 2010-2012,2016 Stefan Seyfried
|
||||
*
|
||||
* License: GPL v2 or later
|
||||
*/
|
||||
#include "cs_api.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "hardware_caps.h"
|
||||
|
||||
static int initialized = 0;
|
||||
static hw_caps_t caps;
|
||||
|
||||
hw_caps_t *get_hwcaps(void) {
|
||||
if (initialized)
|
||||
return ∩︀
|
||||
int rev = cs_get_revision();
|
||||
caps.has_fan = (rev < 8);
|
||||
caps.has_HDMI = 1;
|
||||
caps.has_SCART = (rev != 10);
|
||||
caps.has_SCART_input = 0;
|
||||
caps.has_YUV_cinch = 1;
|
||||
caps.can_shutdown = (rev > 7);
|
||||
caps.can_cec = 1;
|
||||
caps.display_type = HW_DISPLAY_LINE_TEXT;
|
||||
caps.display_xres = 12;
|
||||
caps.display_yres = 0;
|
||||
caps.can_set_display_brightness = 1;
|
||||
caps.can_ar_14_9 = 1;
|
||||
caps.can_ps_14_9 = 1;
|
||||
caps.force_tuner_2G = 0;
|
||||
strcpy(caps.boxvendor, "Coolstream");
|
||||
/* list of boxnames from neutrinoyparser.cpp */
|
||||
strcpy(caps.boxarch, "Nevis");
|
||||
switch (rev) {
|
||||
case 6:
|
||||
case 7: // Black Stallion Edition
|
||||
strcpy(caps.boxname, "HD1");
|
||||
caps.force_tuner_2G = 1;
|
||||
break;
|
||||
case 8:
|
||||
strcpy(caps.boxname, "Neo");
|
||||
caps.force_tuner_2G = 1;
|
||||
break;
|
||||
case 9:
|
||||
strcpy(caps.boxname, "Tank");
|
||||
strcpy(caps.boxarch, "Apollo");
|
||||
break;
|
||||
case 10:
|
||||
strcpy(caps.boxname, "Zee");
|
||||
caps.force_tuner_2G = 1;
|
||||
break;
|
||||
case 11:
|
||||
strcpy(caps.boxname, "Trinity");
|
||||
strcpy(caps.boxarch, "Shiner");
|
||||
break;
|
||||
case 12:
|
||||
strcpy(caps.boxname, "Zee2");
|
||||
strcpy(caps.boxarch, "Kronos");
|
||||
break;
|
||||
default:
|
||||
strcpy(caps.boxname, "UNKNOWN_BOX");
|
||||
strcpy(caps.boxarch, "Unknown");
|
||||
fprintf(stderr, "[%s] unhandled box revision %d\n", __func__, rev);
|
||||
}
|
||||
initialized = 1;
|
||||
return ∩︀
|
||||
}
|
||||
|
43
lib/hardware/coolstream/hardware_caps.h
Normal file
43
lib/hardware/coolstream/hardware_caps.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* determine the capabilities of the hardware.
|
||||
* part of libstb-hal
|
||||
*
|
||||
* (C) 2010-2012,2016 Stefan Seyfried
|
||||
*
|
||||
* License: GPL v2 or later
|
||||
*/
|
||||
#ifndef __HARDWARE_CAPS_H__
|
||||
#define __HARDWARE_CAPS_H__
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HW_DISPLAY_NONE,
|
||||
HW_DISPLAY_LED_NUM, /* simple 7 segment LED display */
|
||||
HW_DISPLAY_LINE_TEXT, /* 1 line text display */
|
||||
HW_DISPLAY_GFX
|
||||
} display_type_t;
|
||||
|
||||
|
||||
typedef struct hw_caps
|
||||
{
|
||||
int has_fan;
|
||||
int has_HDMI;
|
||||
int has_SCART;
|
||||
int has_SCART_input;
|
||||
int has_YUV_cinch;
|
||||
int can_shutdown;
|
||||
int can_cec;
|
||||
int can_ar_14_9; /* video drivers have 14:9 aspect ratio mode */
|
||||
int can_ps_14_9; /* video drivers have 14:9 panscan mode */
|
||||
int force_tuner_2G; /* force DVB-S2 even though driver may not advertise it */
|
||||
display_type_t display_type;
|
||||
int display_xres; /* x resolution or chars per line */
|
||||
int display_yres;
|
||||
int can_set_display_brightness;
|
||||
char boxvendor[64];
|
||||
char boxname[64];
|
||||
char boxarch[64];
|
||||
} hw_caps_t;
|
||||
|
||||
hw_caps_t *get_hwcaps(void);
|
||||
#endif
|
0
lib/libcoolstream/cs_vfd.h → lib/hardware/coolstream/hd1/libcoolstream/cs_vfd.h
Executable file → Normal file
0
lib/libcoolstream/cs_vfd.h → lib/hardware/coolstream/hd1/libcoolstream/cs_vfd.h
Executable file → Normal file
0
lib/libcoolstream2/cs_vfd.h → lib/hardware/coolstream/hd2/libcoolstream/cs_vfd.h
Executable file → Normal file
0
lib/libcoolstream2/cs_vfd.h → lib/hardware/coolstream/hd2/libcoolstream/cs_vfd.h
Executable file → Normal file
@@ -1,5 +0,0 @@
|
||||
Makefile.in
|
||||
.libs
|
||||
.deps
|
||||
*.la
|
||||
*.lo
|
@@ -142,6 +142,8 @@ neutrino_LDADD += \
|
||||
endif
|
||||
|
||||
if BOXTYPE_COOL
|
||||
neutrino_LDADD += \
|
||||
$(top_builddir)/lib/hardware/coolstream/libhwcaps.a
|
||||
neutrino_LDADD += -lcoolstream-mt -lca-sc
|
||||
if ENABLE_TMSDK
|
||||
else
|
||||
|
@@ -1323,12 +1323,12 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
printf("CMoviePlayerGui::%s: spd %d pos %d/%d (%d, %d%%)\n", __func__, speed, position, duration, duration-position, file_prozent);
|
||||
#endif
|
||||
/* in case ffmpeg report incorrect values */
|
||||
if((playstate == CMoviePlayerGui::PLAY) && (speed == 1)){
|
||||
if(file_prozent > 96 && (playstate == CMoviePlayerGui::PLAY) && (speed == 1)){
|
||||
if(position_tmp != position){
|
||||
position_tmp = position ;
|
||||
eof2 = 0;
|
||||
}else{
|
||||
if (++eof2 > 6) {
|
||||
if (++eof2 > 12) {
|
||||
at_eof = true;
|
||||
break;
|
||||
}
|
||||
|
@@ -299,9 +299,9 @@ void CTextBox::initFramesRel(void)
|
||||
|
||||
if(m_nMode & SCROLL)
|
||||
{
|
||||
m_cFrameScrollRel.iX = m_cFrame.iWidth - SCROLL_FRAME_WIDTH;
|
||||
m_cFrameScrollRel.iY = m_cFrameTextRel.iY + m_nBgRadius;
|
||||
m_cFrameScrollRel.iWidth = SCROLL_FRAME_WIDTH;
|
||||
m_cFrameScrollRel.iX = m_cFrame.iWidth - m_cFrameScrollRel.iWidth;
|
||||
m_cFrameScrollRel.iY = m_cFrameTextRel.iY + m_nBgRadius;
|
||||
m_cFrameScrollRel.iHeight = m_cFrameTextRel.iHeight - 2*m_nBgRadius;
|
||||
}
|
||||
else
|
||||
@@ -708,7 +708,7 @@ void CTextBox::refreshText(void)
|
||||
if (m_nMode & CENTER)
|
||||
x_center /= 2;
|
||||
if (m_nMode & SCROLL)
|
||||
x_center -= SCROLL_FRAME_WIDTH;
|
||||
x_center -= m_cFrameScrollRel.iWidth;
|
||||
}
|
||||
x_center = std::max(x_center, 0);
|
||||
|
||||
|
@@ -2136,6 +2136,8 @@ TIMER_START();
|
||||
cs_new_auto_videosystem();
|
||||
#endif
|
||||
|
||||
g_info.hw_caps = get_hwcaps();
|
||||
|
||||
g_Locale = new CLocaleManager;
|
||||
|
||||
int loadSettingsErg = loadSetup(NEUTRINO_SETTINGS_FILE);
|
||||
|
@@ -39,6 +39,8 @@
|
||||
#include <zapit/client/zapittools.h>
|
||||
#include <eitd/edvbstring.h> // UTF8
|
||||
|
||||
#include <hardware_caps.h>
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
@@ -933,6 +935,7 @@ struct SglobalInfo
|
||||
unsigned char box_Type;
|
||||
delivery_system_t delivery_system;
|
||||
bool has_fan;
|
||||
hw_caps_t *hw_caps;
|
||||
};
|
||||
|
||||
const int RECORDING_OFF = 0;
|
||||
|
Reference in New Issue
Block a user