diff --git a/HISTORY b/HISTORY index 23775a8..8583bc3 100644 --- a/HISTORY +++ b/HISTORY @@ -5,3 +5,6 @@ VDR Plugin 'skindesigner' Revision History - Initial revision. +Version 0.0.2 + +- added some more tokens with more detailed audio information in displaychannel -> statusinfo diff --git a/skindesigner.c b/skindesigner.c index 822e42f..b2b2b7f 100644 --- a/skindesigner.c +++ b/skindesigner.c @@ -20,7 +20,7 @@ #endif -static const char *VERSION = "0.0.1"; +static const char *VERSION = "0.0.2"; static const char *DESCRIPTION = "SkinDesigner"; static const char *MAINMENUENTRY = "Skin Designer"; diff --git a/skins/default/xmlfiles/displaychannel.xml b/skins/default/xmlfiles/displaychannel.xml index 6162562..7f43e34 100644 --- a/skins/default/xmlfiles/displaychannel.xml +++ b/skins/default/xmlfiles/displaychannel.xml @@ -85,8 +85,12 @@ {isDolby} true if a dolby audio track is available {isEncrypted} true if channel is encrypted {isRecording} true if currently a recording is running on this channel + {numaudiotracks} number of available audio tracks for current channel + {audiochannel} 0 if current channel is stereo, 1 for left chanel only, 2 for right channel only + {trackdesc} description of the current audio track + {tracklang} language of the current audio track --> - + diff --git a/skinskeleton/xmlfiles/displaychannel.xml b/skinskeleton/xmlfiles/displaychannel.xml index 7f55232..716ccad 100644 --- a/skinskeleton/xmlfiles/displaychannel.xml +++ b/skinskeleton/xmlfiles/displaychannel.xml @@ -52,6 +52,10 @@ {isDolby} true if a dolby audio track is available {isEncrypted} true if channel is encrypted {isRecording} true if currently a recording is running on this channel + {numaudiotracks} number of available audio tracks for current channel + {audiochannel} 0 if current channel is stereo, 1 for left chanel only, 2 for right channel only + {trackdesc} description of the current audio track + {tracklang} language of the current audio track --> diff --git a/views/displaychannelview.c b/views/displaychannelview.c index 66155a1..fb264fd 100644 --- a/views/displaychannelview.c +++ b/views/displaychannelview.c @@ -176,6 +176,9 @@ void cDisplayChannelView::DrawStatusIcons(const cChannel *Channel) { return; } + map < string, int > intTokens; + map < string, string > stringTokens; + bool isRadio = !Channel->Vpid() && Channel->Apid(0); bool hasVT = Channel->Vpid() && Channel->Tpid(); bool isStereo = Channel->Apid(0); @@ -188,15 +191,37 @@ void cDisplayChannelView::DrawStatusIcons(const cChannel *Channel) { if (Timer->Recording()) isRecording = true; - map < string, int > intTokens; + //enhanced audio information + int numAudioTracks = 0; + int audioChannel = -1; + string trackDescription = ""; + string trackLanguage = ""; + + cDevice *device = cDevice::PrimaryDevice(); + if (device) { + numAudioTracks = device->NumAudioTracks(); + audioChannel = device->GetAudioChannel(); + if (numAudioTracks > 0) { + const tTrackId *track = device->GetTrack(device->GetCurrentAudioTrack()); + if (track) { + trackDescription = track->description ? track->description : ""; + trackLanguage = track->language ? track->language : ""; + } + } + } + intTokens.insert(pair("isRadio", isRadio)); intTokens.insert(pair("hasVT", hasVT)); intTokens.insert(pair("isStereo", isStereo)); intTokens.insert(pair("isDolby", isDolby)); intTokens.insert(pair("isEncrypted", isEncrypted)); intTokens.insert(pair("isRecording", isRecording)); + intTokens.insert(pair("numaudiotracks", numAudioTracks)); + intTokens.insert(pair("audiochannel", audioChannel)); + stringTokens.insert(pair("trackdesc", trackDescription)); + stringTokens.insert(pair("tracklang", trackLanguage)); - DrawViewElement(veStatusInfo, NULL, &intTokens); + DrawViewElement(veStatusInfo, &stringTokens, &intTokens); } void cDisplayChannelView::ClearStatusIcons(void) {