summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Bieringer <pb@bieringer.de>2021-01-21 20:05:18 +0100
committerPeter Bieringer <pb@bieringer.de>2021-01-21 20:05:18 +0100
commitfdc1a7357e6cc3ba304c89d102ab983cc91da61d (patch)
tree8fde2848d490abbc8290ec20953af7ef76179717
parentbcc24977b0ab25d73589163d33bdffcf490024fa (diff)
downloadvdr-plugin-skindesigner-fdc1a7357e6cc3ba304c89d102ab983cc91da61d.tar.gz
vdr-plugin-skindesigner-fdc1a7357e6cc3ba304c89d102ab983cc91da61d.tar.bz2
add isHD and isUHD to channel list
-rw-r--r--coreengine/definitions.h4
-rw-r--r--coreengine/listelements.c32
2 files changed, 36 insertions, 0 deletions
diff --git a/coreengine/definitions.h b/coreengine/definitions.h
index 17f3c37..a8360b3 100644
--- a/coreengine/definitions.h
+++ b/coreengine/definitions.h
@@ -968,6 +968,8 @@ enum class eLeMenuChannelsIT {
isTerr,
isEncrypted,
isRadio,
+ isHD,
+ isUHD,
count
};
@@ -1014,6 +1016,8 @@ enum class eCeMenuChannelsIT {
isTerr,
isEncrypted,
isRadio,
+ isHD,
+ isUHD,
presenteventduration,
presenteventdurationhours,
presenteventelapsed,
diff --git a/coreengine/listelements.c b/coreengine/listelements.c
index 0c4a387..c46e723 100644
--- a/coreengine/listelements.c
+++ b/coreengine/listelements.c
@@ -1074,6 +1074,8 @@ void cLeMenuChannels::SetTokenContainer(void) {
tokenContainer->DefineIntToken("{isTerr}", (int)eLeMenuChannelsIT::isTerr);
tokenContainer->DefineIntToken("{isEncrypted}", (int)eLeMenuChannelsIT::isEncrypted);
tokenContainer->DefineIntToken("{isRadio}", (int)eLeMenuChannelsIT::isRadio);
+ tokenContainer->DefineIntToken("{isHD}", (int)eLeMenuChannelsIT::isHD);
+ tokenContainer->DefineIntToken("{isUHD}", (int)eLeMenuChannelsIT::isUHD);
InheritTokenContainer();
}
@@ -1095,6 +1097,18 @@ bool cLeMenuChannels::Parse(bool forced) {
bool isRadio = !channel->Vpid() && channel->Apid(0);
+ bool isHD = false;
+ bool isUHD = false;
+ switch (channel->Vtype()) {
+ case 0x1b: // H.264
+ isHD = true;
+ break;
+ case 0x24: // H.265
+ isHD = true;
+ isUHD = true;
+ break;
+ };
+
tokenContainer->Clear();
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::nummenuitem, num);
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::current, current);
@@ -1104,6 +1118,8 @@ bool cLeMenuChannels::Parse(bool forced) {
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::frequency, channel->Frequency());
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::isEncrypted, channel->Ca());
tokenContainer->AddIntToken((int)eLeMenuChannelsIT::isRadio, isRadio);
+ tokenContainer->AddIntToken((int)eLeMenuChannelsIT::isHD, isHD);
+ tokenContainer->AddIntToken((int)eLeMenuChannelsIT::isUHD, isUHD);
tokenContainer->AddStringToken((int)eLeMenuChannelsST::name, channel->Name());
cString channelID = channel->GetChannelID().ToString();
@@ -1201,6 +1217,8 @@ void cCeMenuChannels::SetTokenContainer(void) {
tokenContainer->DefineIntToken("{isTerr}", (int)eCeMenuChannelsIT::isTerr);
tokenContainer->DefineIntToken("{isEncrypted}", (int)eCeMenuChannelsIT::isEncrypted);
tokenContainer->DefineIntToken("{isRadio}", (int)eCeMenuChannelsIT::isRadio);
+ tokenContainer->DefineIntToken("{isHD}", (int)eCeMenuChannelsIT::isHD);
+ tokenContainer->DefineIntToken("{isUHD}", (int)eCeMenuChannelsIT::isUHD);
tokenContainer->DefineIntToken("{presenteventelapsed}", (int)eCeMenuChannelsIT::presenteventelapsed);
tokenContainer->DefineIntToken("{presenteventduration}", (int)eCeMenuChannelsIT::presenteventduration);
tokenContainer->DefineIntToken("{presenteventdurationhours}", (int)eCeMenuChannelsIT::presenteventdurationhours);
@@ -1234,6 +1252,18 @@ bool cCeMenuChannels::Parse(bool forced) {
bool isRadio = !channel->Vpid() && channel->Apid(0);
+ bool isHD = false;
+ bool isUHD = false;
+ switch (channel->Vtype()) {
+ case 0x1b: // H.264
+ isHD = true;
+ break;
+ case 0x24: // H.265
+ isHD = true;
+ isUHD = true;
+ break;
+ };
+
tokenContainer->Clear();
SetListTokens(tokenContainer);
@@ -1243,6 +1273,8 @@ bool cCeMenuChannels::Parse(bool forced) {
tokenContainer->AddIntToken((int)eCeMenuChannelsIT::frequency, channel->Frequency());
tokenContainer->AddIntToken((int)eCeMenuChannelsIT::isEncrypted, channel->Ca());
tokenContainer->AddIntToken((int)eCeMenuChannelsIT::isRadio, isRadio);
+ tokenContainer->AddIntToken((int)eCeMenuChannelsIT::isHD, isHD);
+ tokenContainer->AddIntToken((int)eCeMenuChannelsIT::isUHD, isUHD);
tokenContainer->AddStringToken((int)eCeMenuChannelsST::name, channel->Name());
cString channelID = channel->GetChannelID().ToString();