From a7187da658eb6074e5357f9a09ffb826eec76bb1 Mon Sep 17 00:00:00 2001 From: yjogol Date: Sat, 13 Mar 2010 10:10:47 +0000 Subject: [PATCH] yweb: new version number 2.8.b.4, nhttpd 3.2.4 - add /control/crypt for crypto information - add crypto information to streaminfo git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@482 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 12 ++++++++++++ src/nhttpd/tuxboxapi/coolstream/controlapi.h | 1 + src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp | 16 ++++++++++++++++ src/nhttpd/tuxboxapi/coolstream/neutrinoapi.h | 1 + .../tuxboxapi/coolstream/neutrinoyparser.cpp | 1 + src/nhttpd/web/Y_StreamInfo.yhtm | 8 ++++++++ src/nhttpd/web/Y_Version.txt | 4 ++-- src/nhttpd/web/languages/Deutsch | 1 + src/nhttpd/web/languages/English | 1 + src/nhttpd/yconfig.h | 2 +- 10 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index ad9cddc2d..75250e200 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -176,6 +176,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]= {"vcroutput", &CControlAPI::VCROutputCGI, "text/plain"}, {"scartmode", &CControlAPI::ScartModeCGI, "text/plain"}, {"audio", &CControlAPI::AudioCGI, "text/plain"}, + {"crypt", &CControlAPI::CryptCGI, "text/plain"}, // timer {"timer", &CControlAPI::TimerCGI, "text/plain"}, // bouquet editing @@ -781,6 +782,17 @@ void CControlAPI::VolumeCGI(CyhookHandler *hh) hh->SendError(); } +//----------------------------------------------------------------------------- +void CControlAPI::CryptCGI(CyhookHandler *hh) +{ + if (hh->ParamList.empty() || hh->ParamList["1"] == "info") { + hh->printf("%s",(NeutrinoAPI->getCryptInfoAsString()).c_str()); + return; + } + //TODO: more +} + + //----------------------------------------------------------------------------- void CControlAPI::ChannellistCGI(CyhookHandler *hh) { diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.h b/src/nhttpd/tuxboxapi/coolstream/controlapi.h index 6f70007aa..26cbd8c40 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.h +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.h @@ -84,6 +84,7 @@ private: void VCROutputCGI(CyhookHandler *hh); void ScartModeCGI(CyhookHandler *hh); void AudioCGI(CyhookHandler *hh); + void CryptCGI(CyhookHandler *hh); void setBouquetCGI(CyhookHandler *hh); void saveBouquetCGI(CyhookHandler *hh); void moveBouquetCGI(CyhookHandler *hh); diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp index 45ea31d1c..c1310c1ef 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp @@ -463,3 +463,19 @@ std::string CNeutrinoAPI::getAudioInfoAsString(void) { return out.str(); } +//------------------------------------------------------------------------- +std::string CNeutrinoAPI::getCryptInfoAsString(void) { + extern int pmt_caids[4][11]; + unsigned short i,j; + std::stringstream out; + std::string casys[11]={"Irdeto:","Betacrypt:","Seca:","Viaccess:","Nagra:","Conax: ","Cryptoworks:","Videoguard:","EBU:","XCrypt:","PowerVU:"}; + for(i=0;i<4;i++){ + for(j=0;j<11;j++){ + if(pmt_caids[i][j]){ + out << casys[j] << hex << pmt_caids[i][j]<< "\n"; + } + } + } + return out.str(); +} + diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.h b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.h index 969fa0252..04cde3f69 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.h +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.h @@ -75,6 +75,7 @@ class CNeutrinoAPI std::string getVideoResolutionAsString(void); std::string getVideoFramerateAsString(void); std::string getAudioInfoAsString(void); + std::string getCryptInfoAsString(void); public: CNeutrinoAPI(); ~CNeutrinoAPI(void); diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp index c0fc71ae6..2452cce20 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp @@ -678,6 +678,7 @@ std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, s hh->ParamList["AspectRatio"] = NeutrinoAPI->getVideoAspectRatioAsString(); hh->ParamList["FPS"] = NeutrinoAPI->getVideoFramerateAsString(); hh->ParamList["AudioType"] = NeutrinoAPI->getAudioInfoAsString(); + hh->ParamList["Crypt"] = NeutrinoAPI->getCryptInfoAsString(); return ""; } //------------------------------------------------------------------------- diff --git a/src/nhttpd/web/Y_StreamInfo.yhtm b/src/nhttpd/web/Y_StreamInfo.yhtm index dfab5136f..d554b0417 100644 --- a/src/nhttpd/web/Y_StreamInfo.yhtm +++ b/src/nhttpd/web/Y_StreamInfo.yhtm @@ -89,6 +89,14 @@  
{=vtxtpid=}
+ +   + + + {=L:epg.si.crypt=}: +   +
{=Crypt=}
+ diff --git a/src/nhttpd/web/Y_Version.txt b/src/nhttpd/web/Y_Version.txt index 793948fd4..146532afc 100644 --- a/src/nhttpd/web/Y_Version.txt +++ b/src/nhttpd/web/Y_Version.txt @@ -1,5 +1,5 @@ -version=2.8.b.3 -date=07.03.2010 +version=2.8.b.4 +date=13.03.2010 type=Beta info=Port Coolstream diff --git a/src/nhttpd/web/languages/Deutsch b/src/nhttpd/web/languages/Deutsch index bcb90649a..b739c09db 100644 --- a/src/nhttpd/web/languages/Deutsch +++ b/src/nhttpd/web/languages/Deutsch @@ -189,6 +189,7 @@ epg.si.tsid=Transponder Stream ID epg.si.vpid=Video PID epg.si.apid=Audio PID epg.si.vtxtpid=Teletext PID +epg.si.crypt=Crypt Systeme ========Neutrino Settings set.reload_neutrino=Neutrino neuladen diff --git a/src/nhttpd/web/languages/English b/src/nhttpd/web/languages/English index 7e1bbef95..eb241258d 100644 --- a/src/nhttpd/web/languages/English +++ b/src/nhttpd/web/languages/English @@ -192,6 +192,7 @@ epg.si.tsid=Transponder Stream ID epg.si.vpid=Video PID epg.si.apid=Audio PID epg.si.vtxtpid=Teletext PID +epg.si.crypt=Crypt systems ========Settings set.reload_neutrino=reload Neutrino diff --git a/src/nhttpd/yconfig.h b/src/nhttpd/yconfig.h index 04d28b9be..a4d6e1293 100644 --- a/src/nhttpd/yconfig.h +++ b/src/nhttpd/yconfig.h @@ -25,7 +25,7 @@ //----------------------------------------------------------------------------- // General central Definitions //----------------------------------------------------------------------------- -#define HTTPD_VERSION "3.2.3" // Webserver version (can be overloaded) +#define HTTPD_VERSION "3.2.4" // Webserver version (can be overloaded) #define YHTTPD_VERSION "1.3.1" // Webserver version (Version of yhttpd-core!) #define IADDR_LOCAL "127.0.0.1" // local IP #define HTTPD_NAME "yhttpd" // Webserver name (can be overloaded)