mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
expose on top of isHD now also isUHD for recordings
This commit is contained in:
parent
ce520980fd
commit
4c4b9f7837
@ -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
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -30,7 +30,8 @@
|
||||
{recchannelid} id of channel from which was recorded
|
||||
{recchannelnumber} number of channel from which was recorded
|
||||
{framesPerSecond} frames per second (from EPG info)
|
||||
{isHD} true if recording is HD (from EPG info)
|
||||
{isHD} true if recording is HD/UHD (from EPG info)
|
||||
{isUHD} true if recording is UHD (from EPG info)
|
||||
-->
|
||||
<detailheader>
|
||||
</detailheader>
|
||||
@ -52,7 +53,8 @@
|
||||
{durationeventminutes} event duration, rest of minutes
|
||||
{cutted} true if recording is cutted
|
||||
{framesPerSecond} frames per second (from EPG info)
|
||||
{isHD} true if recording is HD (from EPG info)
|
||||
{isHD} true if recording is HD/UHD (from EPG info)
|
||||
{isUHD} true if recording is HD (from EPG info)
|
||||
|
||||
{recordingsize} size of recording (automatically in GB / MB)
|
||||
{recordingsizecutted} size of cutted recording (automatically in GB / MB)
|
||||
|
@ -34,7 +34,8 @@
|
||||
{posterheight} height of scraped poster
|
||||
{posterpath} absolute path of scraped poster
|
||||
{framesPerSecond} frames per second (from EPG info)
|
||||
{isHD} true if recording is HD (from EPG info)
|
||||
{isHD} true if recording is HD/UHD (from EPG info)
|
||||
{isUHD} true if recording is UHD (from EPG info)
|
||||
-->
|
||||
<listelement>
|
||||
</listelement>
|
||||
@ -75,7 +76,8 @@
|
||||
{bannerheight} height of scraped banner
|
||||
{bannerpath} absolute path of scraped banner
|
||||
{framesPerSecond} frames per second (from EPG info)
|
||||
{isHD} true if recording is HD (from EPG info)
|
||||
{isHD} true if recording is HD/UHD (from EPG info)
|
||||
{isUHD} true if recording is UHD (from EPG info)
|
||||
-->
|
||||
<currentelement delay="500" fadetime="0">
|
||||
</currentelement>
|
||||
|
Loading…
Reference in New Issue
Block a user