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 @@