mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Conflicts:
lib/hardware/coolstream/hd2/libcoolstream/cs_api.h
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8c95f1f7a8
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-03-10 (Fri, 10 Mar 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
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
|
||||
AM_CPPFLAGS = \
|
||||
@HWLIB_CFLAGS@
|
||||
|
||||
noinst_LIBRARIES = libhwcaps.a
|
||||
|
||||
libhwcaps_a_SOURCES = \
|
||||
hardware_caps.cpp
|
||||
|
@@ -18,6 +18,7 @@ hw_caps_t *get_hwcaps(void) {
|
||||
if (initialized)
|
||||
return ∩︀
|
||||
int rev = cs_get_revision();
|
||||
int chip = cs_get_chip_type();
|
||||
caps.has_fan = (rev < 8);
|
||||
caps.has_HDMI = 1;
|
||||
caps.has_SCART = (rev != 10);
|
||||
@@ -33,7 +34,6 @@ hw_caps_t *get_hwcaps(void) {
|
||||
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:
|
||||
@@ -41,7 +41,7 @@ hw_caps_t *get_hwcaps(void) {
|
||||
strcpy(caps.boxname, "HD1");
|
||||
caps.force_tuner_2G = 1;
|
||||
break;
|
||||
case 8:
|
||||
case 8: // TODO: Neo2 - Twin
|
||||
strcpy(caps.boxname, "Neo");
|
||||
caps.force_tuner_2G = 1;
|
||||
break;
|
||||
@@ -53,9 +53,8 @@ hw_caps_t *get_hwcaps(void) {
|
||||
strcpy(caps.boxname, "Zee");
|
||||
caps.force_tuner_2G = 1;
|
||||
break;
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
case 11:
|
||||
if (cs_get_chip_type() == CS_CHIP_SHINER)
|
||||
if (chip == CS_CHIP_SHINER)
|
||||
{
|
||||
strcpy(caps.boxname, "Trinity");
|
||||
strcpy(caps.boxarch, "Shiner");
|
||||
@@ -78,7 +77,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");
|
||||
|
@@ -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,
|
||||
@@ -71,6 +78,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_
|
||||
|
@@ -26,6 +26,7 @@ typedef void (*cs_messenger) (unsigned int msg, unsigned int data);
|
||||
#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,
|
||||
@@ -49,6 +50,7 @@ enum CS_LOG_MODULE {
|
||||
// Initialization
|
||||
void cs_api_init(void);
|
||||
void cs_api_exit(void);
|
||||
/* Preliminary function (for compatibility with older neutrino sources) */
|
||||
void cs_new_auto_videosystem();
|
||||
|
||||
// Memory helpers
|
||||
@@ -90,4 +92,25 @@ bool cs_box_has_ci(void);
|
||||
unsigned int cs_get_chip_id(void);
|
||||
unsigned int cs_get_chip_rev_id(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_
|
||||
|
@@ -152,6 +152,12 @@ typedef enum
|
||||
VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS
|
||||
} VIDEO_CONTROL;
|
||||
|
||||
typedef struct cs_vs_format_t
|
||||
{
|
||||
char formatHD[16];
|
||||
char formatSD[16];
|
||||
} cs_vs_format_struct_t;
|
||||
|
||||
class cDemux;
|
||||
class cAudio;
|
||||
|
||||
@@ -244,6 +250,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 GetVideoSystem();
|
||||
int SetVideoSystem(int video_system, bool remember = true);
|
||||
|
@@ -797,18 +797,18 @@ void CControlAPI::MessageCGI(CyhookHandler *hh)
|
||||
void CControlAPI::InfoCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (hh->ParamList.empty())
|
||||
hh->Write("Neutrino HD\n");
|
||||
hh->Write("Tuxbox-Neutrino\n");
|
||||
else
|
||||
{
|
||||
if (hh->ParamList["1"] == "streaminfo") // print streaminfo
|
||||
SendStreamInfo(hh);
|
||||
else if (hh->ParamList["1"] == "version") // send version file
|
||||
hh->SendFile(TARGET_PREFIX "/.version");
|
||||
else if (hh->ParamList["1"] == "httpdversion") // print httpd version typ (only ffor comptibility)
|
||||
else if (hh->ParamList["1"] == "httpdversion") // print httpd version typ (just for compatibility)
|
||||
hh->Write("3");
|
||||
else if (hh->ParamList["1"] == "nhttpd_version")// print nhttpd version
|
||||
hh->printf("%s\n", HTTPD_VERSION);
|
||||
else if (hh->ParamList["1"] == "hwinfo")// print hwinfo
|
||||
else if (hh->ParamList["1"] == "hwinfo") // print hwinfo
|
||||
HWInfoCGI(hh);
|
||||
else
|
||||
hh->SendError();
|
||||
@@ -817,14 +817,11 @@ void CControlAPI::InfoCGI(CyhookHandler *hh)
|
||||
|
||||
void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
||||
{
|
||||
std::string boxname = NeutrinoAPI->NeutrinoYParser->func_get_boxtype(hh, "");
|
||||
std::string boxmodel = NeutrinoAPI->NeutrinoYParser->func_get_boxmodel(hh, "");
|
||||
|
||||
static CNetAdapter netadapter;
|
||||
std::string eth_id = netadapter.getMacAddr();
|
||||
std::transform(eth_id.begin(), eth_id.end(), eth_id.begin(), ::tolower);
|
||||
|
||||
hh->printf("%s (%s)\nMAC:%s\n", boxname.c_str(), boxmodel.c_str(), eth_id.c_str());
|
||||
hh->printf("%s %s (%s)\nMAC:%s\n", g_info.hw_caps->boxvendor, g_info.hw_caps->boxname, g_info.hw_caps->boxarch, eth_id.c_str());
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void CControlAPI::ShutdownCGI(CyhookHandler *hh)
|
||||
|
@@ -850,103 +850,21 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *, std::str
|
||||
//-------------------------------------------------------------------------
|
||||
std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
|
||||
{
|
||||
unsigned int system_rev = cs_get_revision();
|
||||
std::string boxname = "CST ";
|
||||
std::string boxvendor(g_info.hw_caps->boxvendor);
|
||||
std::string boxname(g_info.hw_caps->boxname);
|
||||
|
||||
#if HAVE_TRIPLEDRAGON
|
||||
boxname = "Armas ";
|
||||
#endif
|
||||
/* workaround for Neo2 */
|
||||
if ((boxname.compare("Neo") == 0) && (CFEManager::getInstance()->getFrontendCount() > 1))
|
||||
boxname += " Twin";
|
||||
|
||||
switch(system_rev)
|
||||
{
|
||||
case 1:
|
||||
if( boxname == "Armas ")
|
||||
boxname += "TripleDragon";
|
||||
break;
|
||||
#ifdef BOXMODEL_CS_HD1
|
||||
case 6:
|
||||
boxname += "HD1";
|
||||
break;
|
||||
case 7:
|
||||
boxname += "BSE";
|
||||
break;
|
||||
case 8:
|
||||
boxname += "Neo";
|
||||
if (CFEManager::getInstance()->getFrontendCount() > 1)
|
||||
boxname += " Twin";
|
||||
break;
|
||||
case 10:
|
||||
boxname += "Zee";
|
||||
break;
|
||||
#endif
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
case 9:
|
||||
boxname += "Tank";
|
||||
break;
|
||||
case 11:
|
||||
boxname += "Trinity";
|
||||
if (cs_get_chip_type() != 33904 /*0x8470*/)
|
||||
boxname += " V2";
|
||||
break;
|
||||
case 12:
|
||||
boxname += "Zee2";
|
||||
break;
|
||||
case 13:
|
||||
boxname += "Link";
|
||||
break;
|
||||
case 14:
|
||||
boxname += "Trinity Duo";
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
char buffer[10];
|
||||
snprintf(buffer, sizeof(buffer), "%u\n", system_rev);
|
||||
boxname += "Unknown nr. ";
|
||||
boxname += buffer;
|
||||
break;
|
||||
}
|
||||
|
||||
return boxname;
|
||||
return boxvendor + " " + boxname;
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
// y-func : get boxmodel
|
||||
//-------------------------------------------------------------------------
|
||||
std::string CNeutrinoYParser::func_get_boxmodel(CyhookHandler *, std::string)
|
||||
{
|
||||
unsigned int system_rev = cs_get_revision();
|
||||
std::string boxmodel = "Unknown";
|
||||
|
||||
switch(system_rev)
|
||||
{
|
||||
#ifdef BOXMODEL_CS_HD1
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 10:
|
||||
boxmodel = "Nevis";
|
||||
break;
|
||||
#endif
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
case 9:
|
||||
boxmodel = "Apollo";
|
||||
break;
|
||||
case 11:
|
||||
if (cs_get_chip_type() == 33904 /*0x8470*/)
|
||||
boxmodel = "Shiner";
|
||||
else
|
||||
boxmodel = "Kronos";
|
||||
break;
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
boxmodel = "Kronos";
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return boxmodel;
|
||||
return g_info.hw_caps->boxarch;
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
// y-func : get stream info
|
||||
|
Reference in New Issue
Block a user