- controlapi: add audio to API (/control/audio)
- neutrinoapi: add some new function for streaming infos

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@479 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 6c49e36d50
Author: yjogol <yjogol2@online.de>
Date: 2010-03-13 (Sat, 13 Mar 2010)



------------------
This commit was generated by Migit
This commit is contained in:
yjogol
2010-03-13 09:12:31 +00:00
parent 8813b6b794
commit 3260844a24
5 changed files with 61 additions and 33 deletions

View File

@@ -660,7 +660,6 @@ std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
//-------------------------------------------------------------------------
std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, std::string)
{
int bitInfo[10];
CZapitClient::CCurrentServiceInfo serviceinfo;
serviceinfo = NeutrinoAPI->Zapit->getCurrentServiceInfo();
@@ -674,37 +673,11 @@ std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, s
hh->ParamList["tsfrequency"] = string_printf("%d.%d MHz", serviceinfo.tsfrequency/1000, serviceinfo.tsfrequency%1000);
hh->ParamList["polarisation"] = serviceinfo.polarisation==1?"h":"v";
hh->ParamList["ServiceName"] = NeutrinoAPI->GetServiceName(live_channel_id);//NeutrinoAPI->Zapit->getCurrentServiceID());
NeutrinoAPI->GetStreamInfo(bitInfo);
hh->ParamList["VideoFormat"] = string_printf("%d x %d", bitInfo[0], bitInfo[1] );
hh->ParamList["BitRate"] = string_printf("%d\n", bitInfo[4]*50);
hh->ParamList["VideoFormat"] = NeutrinoAPI->getVideoResolutionAsString();
// hh->ParamList["BitRate"] = NeutrinoAPI->getVideoFramerateAsString();
hh->ParamList["AspectRatio"] = NeutrinoAPI->getVideoAspectRatioAsString();
switch ( bitInfo[3] ) //fps
{
case 3: hh->ParamList["FPS"] = "25"; break;
case 6: hh->ParamList["FPS"] = "50"; break;
default: hh->ParamList["FPS"]= "unknown";
}
if (!bitInfo[7]) hh->ParamList["AudioType"]="unknown";
else {
const char* layernames[4]={"res","III","II","I"};
const char* sampfreqnames[4]={"44,1k","48k","32k","res"};
const char* modenames[4]={"stereo","joint_st","dual_ch","single_ch"};
long header = bitInfo[7];
unsigned char layer = (header>>17)&3;
unsigned char sampfreq =(header>>10)&3;
unsigned char mode = (header>> 6)&3;
unsigned char copy = (header>> 3)&1;
hh->ParamList["AudioType"] =
string_printf("%s (%s/%s) %s", modenames[mode], sampfreqnames[sampfreq],
layernames[layer], copy?"c":"");
}
hh->ParamList["FPS"] = NeutrinoAPI->getVideoFramerateAsString();
hh->ParamList["AudioType"] = NeutrinoAPI->getAudioInfoAsString();
return "";
}
//-------------------------------------------------------------------------