summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/helpers.cpp
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2011-10-20 18:08:29 +0200
committerlado <herrlado@gmail.com>2011-10-20 18:08:29 +0200
commit6cb812e8f208047e9e0878a25c7f933b0a24cbb4 (patch)
tree79374fe23d1537967d21ded2fa06f7011361b6e7 /vdr-vdrmanager/helpers.cpp
parentdc54116f8e2cd76c9d6ea3373fe75f64e61dc2e9 (diff)
downloadvdr-manager-6cb812e8f208047e9e0878a25c7f933b0a24cbb4.tar.gz
vdr-manager-6cb812e8f208047e9e0878a25c7f933b0a24cbb4.tar.bz2
add support for delivering audi track
Diffstat (limited to 'vdr-vdrmanager/helpers.cpp')
-rw-r--r--vdr-vdrmanager/helpers.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/vdr-vdrmanager/helpers.cpp b/vdr-vdrmanager/helpers.cpp
index 7a4ec47..a20fc98 100644
--- a/vdr-vdrmanager/helpers.cpp
+++ b/vdr-vdrmanager/helpers.cpp
@@ -125,6 +125,11 @@ string cHelpers::GetChannelsIntern(string wantedChannels) {
result += channel->Name();
result += ":";
result += channel->Provider();
+ result += ":";
+ result += channel->GetChannelID().ToString();
+ result += ":";
+ result += GetAudioTracks(channel);
+ result += ":";
result += "\r\n";
}
}
@@ -132,6 +137,31 @@ string cHelpers::GetChannelsIntern(string wantedChannels) {
return result + "END\r\n";
}
+string cHelpers::GetAudioTracks(const cChannel* channel){
+
+ string result = "";
+ int count = 0;
+ for (int i = 0; channel->Apid(i) != 0; ++i, ++count)
+ ;
+ for (int i = 0; channel->Dpid(i) != 0; ++i, ++count)
+ ;
+
+ if (count > 1)
+ {
+ int index = 1;
+ string sep = "";
+ for (int i = 0; channel->Apid(i) != 0; ++i, ++index) {
+ result += sep +"a,"+(const char*)itoa(index) + "," + channel->Alang(i);
+ sep = "|";
+ }
+ for (int i = 0; channel->Dpid(i) != 0; ++i, ++index) {
+ result += sep + "d," + (const char*)itoa(index) + "," + channel->Dlang(i);
+ }
+ sep = "|";
+ }
+ return result;
+}
+
string cHelpers::GetEventsIntern(string wantedChannels, string when) {
when = ToUpper(when);