diff options
| author | Peter Bieringer <pb@bieringer.de> | 2021-01-20 21:37:36 +0100 |
|---|---|---|
| committer | Peter Bieringer <pb@bieringer.de> | 2021-01-20 21:37:36 +0100 |
| commit | 4c4b9f78372eeabbd394041b63db71c76eec146d (patch) | |
| tree | 0f4561cea26b407454e29cc706c0ff380091191d /coreengine | |
| parent | ce520980fd3de9da99c2ed5f84ea00407b60b20f (diff) | |
| download | vdr-plugin-skindesigner-4c4b9f78372eeabbd394041b63db71c76eec146d.tar.gz vdr-plugin-skindesigner-4c4b9f78372eeabbd394041b63db71c76eec146d.tar.bz2 | |
expose on top of isHD now also isUHD for recordings
Diffstat (limited to 'coreengine')
| -rw-r--r-- | coreengine/definitions.h | 4 | ||||
| -rw-r--r-- | coreengine/listelements.c | 4 | ||||
| -rw-r--r-- | coreengine/viewdetail.c | 2 | ||||
| -rw-r--r-- | coreengine/viewelement.c | 31 | ||||
| -rw-r--r-- | coreengine/viewelement.h | 1 | ||||
| -rw-r--r-- | coreengine/viewelementsdisplaymenu.c | 2 |
6 files changed, 43 insertions, 1 deletions
diff --git a/coreengine/definitions.h b/coreengine/definitions.h index b1fb271..dccd50e 100644 --- a/coreengine/definitions.h +++ b/coreengine/definitions.h @@ -1161,6 +1161,7 @@ enum class eLeMenuRecordingsIT { posterheight, framesPerSecond, isHD, + isUHD, count }; @@ -1206,6 +1207,7 @@ enum class eCeMenuRecordingsIT { posterheight, framesPerSecond, isHD, + isUHD, count }; @@ -1318,6 +1320,7 @@ enum class eDmDetailedHeaderRecIT { recchannelnumber, framesPerSecond, isHD, + isUHD, count }; @@ -1427,6 +1430,7 @@ enum class eDmDetailedRecIT { recimg3avaialble, framesPerSecond, isHD, + isUHD, count }; diff --git a/coreengine/listelements.c b/coreengine/listelements.c index b60bf30..a77ff0e 100644 --- a/coreengine/listelements.c +++ b/coreengine/listelements.c @@ -1712,6 +1712,7 @@ void cLeMenuRecordings::SetTokenContainer(void) { tokenContainer->DefineIntToken("{posterheight}", (int)eLeMenuRecordingsIT::posterheight); tokenContainer->DefineIntToken("{fps}", (int)eLeMenuRecordingsIT::framesPerSecond); tokenContainer->DefineIntToken("{isHD}", (int)eLeMenuRecordingsIT::isHD); + tokenContainer->DefineIntToken("{isUHD}", (int)eLeMenuRecordingsIT::isUHD); InheritTokenContainer(); } @@ -1841,6 +1842,7 @@ bool cLeMenuRecordings::Parse(bool forced) { tokenContainer->AddStringToken((int)eLeMenuRecordingsST::description, info->Description()); tokenContainer->AddIntToken((int)eLeMenuRecordingsIT::framesPerSecond, info->FramesPerSecond()); tokenContainer->AddIntToken((int)eLeMenuRecordingsIT::isHD, RecordingIsHD(event)); // detect HD from 'info' + tokenContainer->AddIntToken((int)eLeMenuRecordingsIT::isUHD, RecordingIsUHD(event)); // detect UHD from 'info' SetScraperRecordingPoster(tokenContainer, usedRecording, true); @@ -1963,6 +1965,7 @@ void cCeMenuRecordings::SetTokenContainer(void) { tokenContainer->DefineIntToken("{posterheight}", (int)eCeMenuRecordingsIT::posterheight); tokenContainer->DefineIntToken("{fps}", (int)eCeMenuRecordingsIT::framesPerSecond); tokenContainer->DefineIntToken("{isHD}", (int)eCeMenuRecordingsIT::isHD); + tokenContainer->DefineIntToken("{isUHD}", (int)eCeMenuRecordingsIT::isUHD); InheritTokenContainer(); } @@ -2099,6 +2102,7 @@ bool cCeMenuRecordings::Parse(bool forced) { tokenContainer->AddStringToken((int)eCeMenuRecordingsST::description, info->Description()); tokenContainer->AddIntToken((int)eCeMenuRecordingsIT::framesPerSecond, info->FramesPerSecond()); tokenContainer->AddIntToken((int)eCeMenuRecordingsIT::isHD, RecordingIsHD(event)); // detect HD from 'info' + tokenContainer->AddIntToken((int)eCeMenuRecordingsIT::isUHD, RecordingIsUHD(event)); // detect UHD from 'info' SetScraperRecordingPoster(tokenContainer, usedRecording, false); diff --git a/coreengine/viewdetail.c b/coreengine/viewdetail.c index ea0dee8..2351e84 100644 --- a/coreengine/viewdetail.c +++ b/coreengine/viewdetail.c @@ -605,6 +605,7 @@ void cViewDetailRec::SetTokenContainer(void) { tokenContainer->DefineIntToken("{recimg3avaialble}", (int)eDmDetailedRecIT::recimg3avaialble);
tokenContainer->DefineIntToken("{fps}", (int)eDmDetailedRecIT::framesPerSecond);
tokenContainer->DefineIntToken("{isHD}", (int)eDmDetailedRecIT::isHD);
+ tokenContainer->DefineIntToken("{isUHD}", (int)eDmDetailedRecIT::isUHD);
tokenContainer->DefineIntToken("{ismovie}", (int)eScraperIT::ismovie);
tokenContainer->DefineIntToken("{moviebudget}", (int)eScraperIT::moviebudget);
tokenContainer->DefineIntToken("{movierevenue}", (int)eScraperIT::movierevenue);
@@ -695,6 +696,7 @@ bool cViewDetailRec::Parse(bool forced) { tokenContainer->AddIntToken((int)eDmDetailedRecIT::durationeventhours, duration / 60);
tokenContainer->AddStringToken((int)eDmDetailedRecST::durationeventminutes, *cString::sprintf("%.2d", duration%60));
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isHD, RecordingIsHD(event)); // detect HD from 'info'
+ tokenContainer->AddIntToken((int)eDmDetailedRecIT::isUHD, RecordingIsUHD(event)); // detect HD from 'info'
}
}
SetRecInfos();
diff --git a/coreengine/viewelement.c b/coreengine/viewelement.c index 306e0ce..370a58f 100644 --- a/coreengine/viewelement.c +++ b/coreengine/viewelement.c @@ -598,7 +598,7 @@ bool RecordingIsHD(const cEvent* event) { // #1: HVEC (stream content: 9) Component = Components->GetComponent(0, 9, 0); if (Component) { - isHD = true; // HVEC is always HD, type 4 would be even UHD + isHD = true; // HVEC is always HD, type 4|5|6|7 would be even UHD (see below dedicated detection function) } else { // #2: H.264 (stream content: 5) Component = Components->GetComponent(0, 5, 0); @@ -627,3 +627,32 @@ bool RecordingIsHD(const cEvent* event) { }; return isHD; }; + +bool RecordingIsUHD(const cEvent* event) { + // detect UHD from 'info' + bool isUHD = false; + cComponents *Components = (cComponents *)event->Components(); + if (Components) { + // detect UHD (see also ETSI EN 300 468) + // Stream: 9 = HEVC Video, AC4 Audio + // Stream == Video(9): 00|01|02|03 = HD, 04|05|06|07 = UHD + + tComponent *Component; + int type = -1; + + // HVEC (stream content: 9) + Component = Components->GetComponent(0, 9, 0); + if (Component) { + type = Component->type; + }; + + switch (type) { + case 0x04: + case 0x05: + case 0x06: + case 0x07: + isUHD = true; + }; + }; + return isUHD; +}; diff --git a/coreengine/viewelement.h b/coreengine/viewelement.h index 2696a0b..83e9e11 100644 --- a/coreengine/viewelement.h +++ b/coreengine/viewelement.h @@ -114,5 +114,6 @@ public: * helper function (did not find any other common place) ******************************************************************/ bool RecordingIsHD(const cEvent* event); +bool RecordingIsUHD(const cEvent* event); #endif //__VIEWELEMENT_H diff --git a/coreengine/viewelementsdisplaymenu.c b/coreengine/viewelementsdisplaymenu.c index 319df41..bf4170e 100644 --- a/coreengine/viewelementsdisplaymenu.c +++ b/coreengine/viewelementsdisplaymenu.c @@ -1168,6 +1168,7 @@ void cVeDmDetailheaderRec::SetTokenContainer(void) { tokenContainer->DefineIntToken("{recchannelnumber}", (int)eDmDetailedHeaderRecIT::recchannelnumber); tokenContainer->DefineIntToken("{fps}", (int)eDmDetailedHeaderRecIT::framesPerSecond); tokenContainer->DefineIntToken("{isHD}", (int)eDmDetailedHeaderRecIT::isHD); + tokenContainer->DefineIntToken("{isUHD}", (int)eDmDetailedHeaderRecIT::isUHD); InheritTokenContainer(); } @@ -1214,6 +1215,7 @@ bool cVeDmDetailheaderRec::Parse(bool forced) { tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::durationeventhours, duration / 60); tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::durationeventminutes, *cString::sprintf("%.2d", duration%60)); tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isHD, RecordingIsHD(event)); // detect HD from 'info' + tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isUHD, RecordingIsUHD(event)); // detect UHD from 'info' } #if defined (APIVERSNUM) && (APIVERSNUM >= 20301) LOCK_CHANNELS_READ; |
