mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
added some more tokens with more detailed audio information in displaychannel -> statusinfo
This commit is contained in:
parent
45d84b7d8a
commit
86ec43925f
3
HISTORY
3
HISTORY
@ -5,3 +5,6 @@ VDR Plugin 'skindesigner' Revision History
|
|||||||
|
|
||||||
- Initial revision.
|
- Initial revision.
|
||||||
|
|
||||||
|
Version 0.0.2
|
||||||
|
|
||||||
|
- added some more tokens with more detailed audio information in displaychannel -> statusinfo
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const char *VERSION = "0.0.1";
|
static const char *VERSION = "0.0.2";
|
||||||
static const char *DESCRIPTION = "SkinDesigner";
|
static const char *DESCRIPTION = "SkinDesigner";
|
||||||
static const char *MAINMENUENTRY = "Skin Designer";
|
static const char *MAINMENUENTRY = "Skin Designer";
|
||||||
|
|
||||||
|
@ -85,8 +85,12 @@
|
|||||||
{isDolby} true if a dolby audio track is available
|
{isDolby} true if a dolby audio track is available
|
||||||
{isEncrypted} true if channel is encrypted
|
{isEncrypted} true if channel is encrypted
|
||||||
{isRecording} true if currently a recording is running on this channel
|
{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
|
||||||
-->
|
-->
|
||||||
<statusinfo>
|
<statusinfo debug="true">
|
||||||
<area x="22%" y="94%" width="76%" height="6%" layer="2">
|
<area x="22%" y="94%" width="76%" height="6%" layer="2">
|
||||||
<!-- encrypted / decrypted icon -->
|
<!-- encrypted / decrypted icon -->
|
||||||
<drawimage name="enc" condition="{isEncrypted}" imagetype="icon" path="ico_crypt_on" x="{areawidth} - {width(enc)}" valign="center" width="{areaheight}*0.8*1.76" height="{areaheight}*0.8"/>
|
<drawimage name="enc" condition="{isEncrypted}" imagetype="icon" path="ico_crypt_on" x="{areawidth} - {width(enc)}" valign="center" width="{areaheight}*0.8*1.76" height="{areaheight}*0.8"/>
|
||||||
|
@ -52,6 +52,10 @@
|
|||||||
{isDolby} true if a dolby audio track is available
|
{isDolby} true if a dolby audio track is available
|
||||||
{isEncrypted} true if channel is encrypted
|
{isEncrypted} true if channel is encrypted
|
||||||
{isRecording} true if currently a recording is running on this channel
|
{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
|
||||||
-->
|
-->
|
||||||
<statusinfo>
|
<statusinfo>
|
||||||
</statusinfo>
|
</statusinfo>
|
||||||
|
@ -176,6 +176,9 @@ void cDisplayChannelView::DrawStatusIcons(const cChannel *Channel) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
map < string, int > intTokens;
|
||||||
|
map < string, string > stringTokens;
|
||||||
|
|
||||||
bool isRadio = !Channel->Vpid() && Channel->Apid(0);
|
bool isRadio = !Channel->Vpid() && Channel->Apid(0);
|
||||||
bool hasVT = Channel->Vpid() && Channel->Tpid();
|
bool hasVT = Channel->Vpid() && Channel->Tpid();
|
||||||
bool isStereo = Channel->Apid(0);
|
bool isStereo = Channel->Apid(0);
|
||||||
@ -188,15 +191,37 @@ void cDisplayChannelView::DrawStatusIcons(const cChannel *Channel) {
|
|||||||
if (Timer->Recording())
|
if (Timer->Recording())
|
||||||
isRecording = true;
|
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<string,int>("isRadio", isRadio));
|
intTokens.insert(pair<string,int>("isRadio", isRadio));
|
||||||
intTokens.insert(pair<string,int>("hasVT", hasVT));
|
intTokens.insert(pair<string,int>("hasVT", hasVT));
|
||||||
intTokens.insert(pair<string,int>("isStereo", isStereo));
|
intTokens.insert(pair<string,int>("isStereo", isStereo));
|
||||||
intTokens.insert(pair<string,int>("isDolby", isDolby));
|
intTokens.insert(pair<string,int>("isDolby", isDolby));
|
||||||
intTokens.insert(pair<string,int>("isEncrypted", isEncrypted));
|
intTokens.insert(pair<string,int>("isEncrypted", isEncrypted));
|
||||||
intTokens.insert(pair<string,int>("isRecording", isRecording));
|
intTokens.insert(pair<string,int>("isRecording", isRecording));
|
||||||
|
intTokens.insert(pair<string,int>("numaudiotracks", numAudioTracks));
|
||||||
|
intTokens.insert(pair<string,int>("audiochannel", audioChannel));
|
||||||
|
stringTokens.insert(pair<string,string>("trackdesc", trackDescription));
|
||||||
|
stringTokens.insert(pair<string,string>("tracklang", trackLanguage));
|
||||||
|
|
||||||
DrawViewElement(veStatusInfo, NULL, &intTokens);
|
DrawViewElement(veStatusInfo, &stringTokens, &intTokens);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDisplayChannelView::ClearStatusIcons(void) {
|
void cDisplayChannelView::ClearStatusIcons(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user