mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Merge branch 'detect-isRadio-workaround' into 'master'
detect isRadio proper in case recording is missing "X 1" (happen on e.g. RTL channel) See merge request kamel5/skindesigner!7
This commit is contained in:
commit
16eb7e8e53
@ -1884,8 +1884,7 @@ bool cLeMenuRecordings::Parse(bool forced) {
|
||||
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'
|
||||
tokenContainer->AddIntToken((int)eLeMenuRecordingsIT::isRadio, RecordingIsRadio(event)); // detect Radio from 'info'
|
||||
|
||||
tokenContainer->AddIntToken((int)eLeMenuRecordingsIT::isRadio, RecordingIsRadio(event, info->FramesPerSecond())); // detect Radio from 'info' and FPS
|
||||
SetScraperRecordingPoster(tokenContainer, usedRecording, true);
|
||||
|
||||
return true;
|
||||
@ -2146,7 +2145,7 @@ bool cCeMenuRecordings::Parse(bool forced) {
|
||||
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'
|
||||
tokenContainer->AddIntToken((int)eCeMenuRecordingsIT::isRadio, RecordingIsRadio(event)); // detect Radio from 'info'
|
||||
tokenContainer->AddIntToken((int)eCeMenuRecordingsIT::isRadio, RecordingIsRadio(event, info->FramesPerSecond())); // detect Radio from 'info' and FPS
|
||||
|
||||
SetScraperRecordingPoster(tokenContainer, usedRecording, false);
|
||||
|
||||
|
@ -698,7 +698,7 @@ bool cViewDetailRec::Parse(bool forced) {
|
||||
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 UHD from 'info'
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isRadio, RecordingIsRadio(event)); // detect Radio from 'info'
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isRadio, RecordingIsRadio(event, info->FramesPerSecond())); // detect Radio from 'info' and FPS
|
||||
}
|
||||
}
|
||||
SetRecInfos();
|
||||
|
@ -657,11 +657,12 @@ bool RecordingIsUHD(const cEvent* event) {
|
||||
return isUHD;
|
||||
};
|
||||
|
||||
bool RecordingIsRadio(const cEvent* event) {
|
||||
bool RecordingIsRadio(const cEvent* event, const double FramesPerSecond) {
|
||||
// detect Radio from 'info'
|
||||
bool isRadio = false;
|
||||
bool hasAudio = false;
|
||||
bool hasVideo = false;
|
||||
|
||||
cComponents *Components = (cComponents *)event->Components();
|
||||
if (Components) {
|
||||
// Stream: 1 = MPEG2-Video, 2 = MPEG2 Audio, 3 = Untertitel, 4 = AC3-Audio, 5 = H.264-Video, 6 = HEAAC-Audio, 7 = DTS/DTS HD audio, 8 = SRM/CPCM data, 9 = HEVC Video, AC4 Audio
|
||||
@ -704,8 +705,11 @@ bool RecordingIsRadio(const cEvent* event) {
|
||||
};
|
||||
};
|
||||
|
||||
if ((hasAudio == true) && (hasVideo == false))
|
||||
isRadio = true;
|
||||
if ((hasAudio == true) && (hasVideo == false)) {
|
||||
if (FramesPerSecond < 24) { // workaround for issue of missing "X 1" on some SD channels (e.g. RTL)
|
||||
isRadio = true;
|
||||
};
|
||||
};
|
||||
|
||||
return isRadio;
|
||||
};
|
||||
|
@ -115,6 +115,6 @@ public:
|
||||
******************************************************************/
|
||||
bool RecordingIsHD(const cEvent* event);
|
||||
bool RecordingIsUHD(const cEvent* event);
|
||||
bool RecordingIsRadio(const cEvent* event);
|
||||
bool RecordingIsRadio(const cEvent* event, const double FramesPerSecond);
|
||||
|
||||
#endif //__VIEWELEMENT_H
|
||||
|
@ -1217,7 +1217,7 @@ bool cVeDmDetailheaderRec::Parse(bool forced) {
|
||||
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'
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isRadio, RecordingIsRadio(event)); // detect Radio from 'info'
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isRadio, RecordingIsRadio(event, info->FramesPerSecond())); // detect Radio from 'info' and FPS
|
||||
}
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
|
Loading…
Reference in New Issue
Block a user