diff options
author | lado <herrlado@gmail.com> | 2011-10-20 18:08:29 +0200 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2011-10-20 18:08:29 +0200 |
commit | 6cb812e8f208047e9e0878a25c7f933b0a24cbb4 (patch) | |
tree | 79374fe23d1537967d21ded2fa06f7011361b6e7 | |
parent | dc54116f8e2cd76c9d6ea3373fe75f64e61dc2e9 (diff) | |
download | vdr-manager-6cb812e8f208047e9e0878a25c7f933b0a24cbb4.tar.gz vdr-manager-6cb812e8f208047e9e0878a25c7f933b0a24cbb4.tar.bz2 |
add support for delivering audi track
-rw-r--r-- | vdr-vdrmanager/helpers.cpp | 30 | ||||
-rw-r--r-- | vdr-vdrmanager/helpers.h | 1 |
2 files changed, 31 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); diff --git a/vdr-vdrmanager/helpers.h b/vdr-vdrmanager/helpers.h index 4da5cca..a57d634 100644 --- a/vdr-vdrmanager/helpers.h +++ b/vdr-vdrmanager/helpers.h @@ -40,4 +40,5 @@ private: static string ToText(const cEvent * event); static string ToText(cTimer * timer); static string ToText(cRecording * recording); + static string GetAudioTracks(const cChannel* channel); }; |