mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
add-isRadio-to-recording
This commit is contained in:
parent
bcc24977b0
commit
f127c8d948
@ -1165,6 +1165,7 @@ enum class eLeMenuRecordingsIT {
|
||||
framesPerSecond,
|
||||
isHD,
|
||||
isUHD,
|
||||
isRadio,
|
||||
count
|
||||
};
|
||||
|
||||
@ -1211,6 +1212,7 @@ enum class eCeMenuRecordingsIT {
|
||||
framesPerSecond,
|
||||
isHD,
|
||||
isUHD,
|
||||
isRadio,
|
||||
count
|
||||
};
|
||||
|
||||
@ -1324,6 +1326,7 @@ enum class eDmDetailedHeaderRecIT {
|
||||
framesPerSecond,
|
||||
isHD,
|
||||
isUHD,
|
||||
isRadio,
|
||||
count
|
||||
};
|
||||
|
||||
@ -1434,6 +1437,7 @@ enum class eDmDetailedRecIT {
|
||||
framesPerSecond,
|
||||
isHD,
|
||||
isUHD,
|
||||
isRadio,
|
||||
count
|
||||
};
|
||||
|
||||
|
@ -1721,6 +1721,7 @@ void cLeMenuRecordings::SetTokenContainer(void) {
|
||||
tokenContainer->DefineIntToken("{fps}", (int)eLeMenuRecordingsIT::framesPerSecond);
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)eLeMenuRecordingsIT::isHD);
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)eLeMenuRecordingsIT::isUHD);
|
||||
tokenContainer->DefineIntToken("{isRadio}", (int)eLeMenuRecordingsIT::isRadio);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
@ -1851,6 +1852,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'
|
||||
|
||||
SetScraperRecordingPoster(tokenContainer, usedRecording, true);
|
||||
|
||||
@ -1974,6 +1976,7 @@ void cCeMenuRecordings::SetTokenContainer(void) {
|
||||
tokenContainer->DefineIntToken("{fps}", (int)eCeMenuRecordingsIT::framesPerSecond);
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)eCeMenuRecordingsIT::isHD);
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)eCeMenuRecordingsIT::isUHD);
|
||||
tokenContainer->DefineIntToken("{isRadio}", (int)eCeMenuRecordingsIT::isRadio);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
@ -2111,6 +2114,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'
|
||||
|
||||
SetScraperRecordingPoster(tokenContainer, usedRecording, false);
|
||||
|
||||
|
@ -606,6 +606,7 @@ void cViewDetailRec::SetTokenContainer(void) {
|
||||
tokenContainer->DefineIntToken("{fps}", (int)eDmDetailedRecIT::framesPerSecond);
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)eDmDetailedRecIT::isHD);
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)eDmDetailedRecIT::isUHD);
|
||||
tokenContainer->DefineIntToken("{isRadio}", (int)eDmDetailedRecIT::isRadio);
|
||||
tokenContainer->DefineIntToken("{ismovie}", (int)eScraperIT::ismovie);
|
||||
tokenContainer->DefineIntToken("{moviebudget}", (int)eScraperIT::moviebudget);
|
||||
tokenContainer->DefineIntToken("{movierevenue}", (int)eScraperIT::movierevenue);
|
||||
@ -696,7 +697,8 @@ 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'
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isUHD, RecordingIsUHD(event)); // detect UHD from 'info'
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isRadio, RecordingIsRadio(event)); // detect Radio from 'info'
|
||||
}
|
||||
}
|
||||
SetRecInfos();
|
||||
|
@ -596,17 +596,17 @@ bool RecordingIsHD(const cEvent* event) {
|
||||
int type = -1;
|
||||
|
||||
// #1: HVEC (stream content: 9)
|
||||
Component = Components->GetComponent(0, 9, 0);
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
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);
|
||||
Component = Components->GetComponent(0, 5, 0); // recording info: "X 5 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
} else {
|
||||
// #3: MPEG2 (stream content: 1)
|
||||
Component = Components->GetComponent(0, 1, 0);
|
||||
Component = Components->GetComponent(0, 1, 0); // recording info: "X 1 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
};
|
||||
@ -641,7 +641,7 @@ bool RecordingIsUHD(const cEvent* event) {
|
||||
int type = -1;
|
||||
|
||||
// HVEC (stream content: 9)
|
||||
Component = Components->GetComponent(0, 9, 0);
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
};
|
||||
@ -656,3 +656,56 @@ bool RecordingIsUHD(const cEvent* event) {
|
||||
};
|
||||
return isUHD;
|
||||
};
|
||||
|
||||
bool RecordingIsRadio(const cEvent* event) {
|
||||
// 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
|
||||
|
||||
tComponent *Component;
|
||||
|
||||
Component = Components->GetComponent(0, 2, 0); // recording info: "X 2 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 4, 0); // recording info: "X 4 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 6, 0); // recording info: "X 6 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 7, 0); // recording info: "X 7 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 1, 0); // recording info: "X 1 <type>"
|
||||
if (Component) {
|
||||
hasVideo = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 5, 0); // recording info: "X 5 <type>"
|
||||
if (Component) {
|
||||
hasVideo = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
hasVideo = true;
|
||||
};
|
||||
};
|
||||
|
||||
if ((hasAudio == true) && (hasVideo == false))
|
||||
isRadio = true;
|
||||
|
||||
return isRadio;
|
||||
};
|
||||
|
@ -115,5 +115,6 @@ public:
|
||||
******************************************************************/
|
||||
bool RecordingIsHD(const cEvent* event);
|
||||
bool RecordingIsUHD(const cEvent* event);
|
||||
bool RecordingIsRadio(const cEvent* event);
|
||||
|
||||
#endif //__VIEWELEMENT_H
|
||||
|
@ -1169,6 +1169,7 @@ void cVeDmDetailheaderRec::SetTokenContainer(void) {
|
||||
tokenContainer->DefineIntToken("{fps}", (int)eDmDetailedHeaderRecIT::framesPerSecond);
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)eDmDetailedHeaderRecIT::isHD);
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)eDmDetailedHeaderRecIT::isUHD);
|
||||
tokenContainer->DefineIntToken("{isRadio}", (int)eDmDetailedHeaderRecIT::isRadio);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
@ -1216,6 +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'
|
||||
}
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
|
@ -32,6 +32,7 @@
|
||||
{framesPerSecond} frames per second (from EPG info)
|
||||
{isHD} true if recording is HD/UHD (from EPG info)
|
||||
{isUHD} true if recording is UHD (from EPG info)
|
||||
{isRadio} true if recording is AudioOnly (from EPG info)
|
||||
-->
|
||||
<detailheader>
|
||||
</detailheader>
|
||||
@ -55,6 +56,7 @@
|
||||
{framesPerSecond} frames per second (from EPG info)
|
||||
{isHD} true if recording is HD/UHD (from EPG info)
|
||||
{isUHD} true if recording is HD (from EPG info)
|
||||
{isRadio} true if recording is AudioOnly (from EPG info)
|
||||
|
||||
{recordingsize} size of recording (automatically in GB / MB)
|
||||
{recordingsizecutted} size of cutted recording (automatically in GB / MB)
|
||||
|
@ -36,6 +36,7 @@
|
||||
{framesPerSecond} frames per second (from EPG info)
|
||||
{isHD} true if recording is HD/UHD (from EPG info)
|
||||
{isUHD} true if recording is UHD (from EPG info)
|
||||
{isRadio} true if recording is AudioOnly (from EPG info)
|
||||
-->
|
||||
<listelement>
|
||||
</listelement>
|
||||
@ -78,6 +79,7 @@
|
||||
{framesPerSecond} frames per second (from EPG info)
|
||||
{isHD} true if recording is HD/UHD (from EPG info)
|
||||
{isUHD} true if recording is UHD (from EPG info)
|
||||
{isRadio} true if recording is AudioOnly (from EPG info)
|
||||
-->
|
||||
<currentelement delay="500" fadetime="0">
|
||||
</currentelement>
|
||||
|
Loading…
x
Reference in New Issue
Block a user