mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Cosmetic changes
This commit is contained in:
parent
d11d09ca6e
commit
2f64512710
@ -51,9 +51,9 @@
|
||||
/*----------------------------------------------------------------------------------------------*/
|
||||
/* fill tokens common for eCeMenuTimersIT, eCeMenuTimersST, eLeMenuTimersIT and eLeMenuTimersST */
|
||||
/*----------------------------------------------------------------------------------------------*/
|
||||
#define DEF_TOK_CONT_MT(token_it, token_st) \
|
||||
{ \
|
||||
/* fill tokens for eCeMenuTimersIT, eCeMenuTimersST, eLeMenuTimersIT and eLeMenuTimersST */ \
|
||||
#define DEF_TOK_CONT_MT(token_it, token_st) \
|
||||
{ \
|
||||
/* fill tokens for eCeMenuTimersIT, eCeMenuTimersST, eLeMenuTimersIT and eLeMenuTimersST */ \
|
||||
tokenContainer->DefineStringToken("{title}", (int)token_st::title); \
|
||||
tokenContainer->DefineStringToken("{timerstart}", (int)token_st::timerstart); \
|
||||
tokenContainer->DefineStringToken("{timerstop}", (int)token_st::timerstop); \
|
||||
@ -86,14 +86,14 @@
|
||||
/*-----------------------------------------------------------------*/
|
||||
/* Add token for cCeMenuTimers::Parse() and cLeMenuTimers::Parse() */
|
||||
/*-----------------------------------------------------------------*/
|
||||
#define ADD_TOKEN_MT(token_it) \
|
||||
#define ADD_TOKEN_MT(token_it) \
|
||||
{ \
|
||||
tokenContainer->AddIntToken((int)token_it::flagactive, timer->HasFlags(tfActive)); \
|
||||
tokenContainer->AddIntToken((int)token_it::flaginstant, timer->HasFlags(tfInstant)); \
|
||||
tokenContainer->AddIntToken((int)token_it::flagvps, timer->HasFlags(tfVps)); \
|
||||
tokenContainer->AddIntToken((int)token_it::flagrecording, timer->Recording()); \
|
||||
tokenContainer->AddIntToken((int)token_it::flagpending, timer->Pending()); \
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@ -114,8 +114,8 @@
|
||||
/*-------------------------------------------------------------------------------------------------------*/
|
||||
/* fill tokens for eCeMenuRecordingsIT, eCeMenuRecordingsST, eLeMenuRecordingsIT and eLeMenuRecordingsST */
|
||||
/*-------------------------------------------------------------------------------------------------------*/
|
||||
#define DEF_TOK_CONT_MR(token_it, token_st) \
|
||||
{ \
|
||||
#define DEF_TOK_CONT_MR(token_it, token_st) \
|
||||
{ \
|
||||
tokenContainer->DefineStringToken("{name}", (int)token_st::name); \
|
||||
tokenContainer->DefineStringToken("{epgname}", (int)token_st::epgname); \
|
||||
tokenContainer->DefineStringToken("{shorttext}", (int)token_st::shorttext); \
|
||||
@ -160,13 +160,13 @@
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Add first SW part for cCeMenuRecordings::Parse() and cLeMenuRecordings::Parse() */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
#define ADD_TOKEN_MR1(token_it) \
|
||||
#define ADD_TOKEN_MR1(token_it) \
|
||||
{ \
|
||||
tokenContainer->AddIntToken((int)token_it::percentseen, percSeen); \
|
||||
tokenContainer->AddIntToken((int)token_it::newrecordingsfolder, New); \
|
||||
tokenContainer->AddIntToken((int)token_it::numrecordingsfolder, total); \
|
||||
tokenContainer->AddIntToken((int)token_it::cutted, usedRecording->IsEdited()); \
|
||||
\
|
||||
tokenContainer->AddIntToken((int)token_it::percentseen, percSeen); \
|
||||
tokenContainer->AddIntToken((int)token_it::newrecordingsfolder, New); \
|
||||
tokenContainer->AddIntToken((int)token_it::numrecordingsfolder, total); \
|
||||
tokenContainer->AddIntToken((int)token_it::cutted, usedRecording->IsEdited()); \
|
||||
\
|
||||
bool watched = false; \
|
||||
if (usedRecording->IsEdited()) { \
|
||||
if (percSeen >= 85) \
|
||||
@ -183,8 +183,8 @@
|
||||
/*----------------------------------------------------------------------------------*/
|
||||
/* Add second SW part for cCeMenuRecordings::Parse() and cLeMenuRecordings::Parse() */
|
||||
/*----------------------------------------------------------------------------------*/
|
||||
#define ADD_TOKEN_MR2(token_it, token_st) \
|
||||
{ \
|
||||
#define ADD_TOKEN_MR2(token_it, token_st) \
|
||||
{ \
|
||||
time_t startTime = event->StartTime(); \
|
||||
if (!startTime) \
|
||||
startTime = usedRecording->Start(); \
|
||||
@ -192,7 +192,7 @@
|
||||
tokenContainer->AddIntToken((int)token_it::year, sStartTime->tm_year + 1900); \
|
||||
tokenContainer->AddIntToken((int)token_it::daynumeric, sStartTime->tm_mday); \
|
||||
tokenContainer->AddIntToken((int)token_it::month, sStartTime->tm_mon+1); \
|
||||
\
|
||||
\
|
||||
int duration = event->Duration() / 60; \
|
||||
recDuration = (recDuration>0)?(recDuration / 60):0; \
|
||||
tokenContainer->AddStringToken((int)token_st::date, *recDate); \
|
||||
@ -203,17 +203,17 @@
|
||||
tokenContainer->AddIntToken((int)token_it::durationevent, duration); \
|
||||
tokenContainer->AddIntToken((int)token_it::durationeventhours, duration / 60); \
|
||||
tokenContainer->AddStringToken((int)token_st::durationeventminutes, *cString::sprintf("%.2d", duration%60)); \
|
||||
\
|
||||
\
|
||||
tokenContainer->AddStringToken((int)token_st::shorttext, info->ShortText()); \
|
||||
tokenContainer->AddStringToken((int)token_st::description, info->Description()); \
|
||||
tokenContainer->AddIntToken((int)token_it::framesPerSecond, info->FramesPerSecond()); \
|
||||
tokenContainer->AddIntToken((int)token_it::isHD, RecordingIsHD(event, channelID)); /* detect HD from 'info' */ \
|
||||
tokenContainer->AddIntToken((int)token_it::isHD, RecordingIsHD(event, channelID)); /* detect HD from 'info' */ \
|
||||
tokenContainer->AddIntToken((int)token_it::isUHD, RecordingIsUHD(event, channelID)); /* detect UHD from 'info' */ \
|
||||
tokenContainer->AddIntToken((int)token_it::isRadio, RecordingIsRadio(event, info->FramesPerSecond())); /* detect Radio from 'info' and FPS */ \
|
||||
tokenContainer->AddIntToken((int)token_it::isRecording, usedRecording->IsInUse() & ruTimer); \
|
||||
tokenContainer->AddIntToken((int)token_it::isInUse, usedRecording->IsInUse()); \
|
||||
tokenContainer->AddIntToken((int)token_it::errors, errors); \
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@ -234,7 +234,7 @@
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* fill tokens common for eCeMenuMainIT, eCeMenuMainST, eLeMenuMainIT, eLeMenuMainST */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
#define DEF_TOK_CONT_MM(token_st) \
|
||||
#define DEF_TOK_CONT_MM(token_st) \
|
||||
{ \
|
||||
tokenContainer->DefineStringToken("{label}", (int)token_st::label); \
|
||||
tokenContainer->DefineStringToken("{number}", (int)token_st::number); \
|
||||
@ -244,12 +244,12 @@
|
||||
/*-------------------------------------------------------------*/
|
||||
/* Add token for cCeMenuMain::Parse() and cLeMenuMain::Parse() */
|
||||
/*-------------------------------------------------------------*/
|
||||
#define ADD_TOKEN_MM(token_st) \
|
||||
#define ADD_TOKEN_MM(token_st) \
|
||||
{ \
|
||||
tokenContainer->AddStringToken((int)token_st::number, number); \
|
||||
tokenContainer->AddStringToken((int)token_st::label, label); \
|
||||
tokenContainer->AddStringToken((int)token_st::icon, imgCache->GetIconName(label).c_str()); \
|
||||
}
|
||||
tokenContainer->AddStringToken((int)token_st::number, number); \
|
||||
tokenContainer->AddStringToken((int)token_st::label, label); \
|
||||
tokenContainer->AddStringToken((int)token_st::icon, imgCache->GetIconName(label).c_str()); \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@ -318,7 +318,7 @@
|
||||
/*---------------------------------------------------------------------------------------------------*/
|
||||
/* fill tokens common for eCeMenuChannelsIT, eCeMenuChannelsST, eLeMenuChannelsIT, eLeMenuChannelsST */
|
||||
/*---------------------------------------------------------------------------------------------------*/
|
||||
#define DEF_TOK_CONT_MC(token_it, token_st) \
|
||||
#define DEF_TOK_CONT_MC(token_it, token_st) \
|
||||
{ \
|
||||
tokenContainer->DefineStringToken("{name}", (int)token_st::name); \
|
||||
tokenContainer->DefineStringToken("{channelid}", (int)token_st::channelid); \
|
||||
@ -340,26 +340,26 @@
|
||||
tokenContainer->DefineIntToken("{isRadio}", (int)token_it::isRadio); \
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)token_it::isHD); \
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)token_it::isUHD); \
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
/* Add token for cCeMenuChannels::Parse() and cLeMenuChannels::Parse() */
|
||||
/*---------------------------------------------------------------------*/
|
||||
#define ADD_TOKEN_MC(token_it, token_st) \
|
||||
{ \
|
||||
tokenContainer->AddIntToken((int)token_it::number, channel->Number()); \
|
||||
tokenContainer->AddIntToken((int)token_it::transponder, channel->Transponder()); \
|
||||
tokenContainer->AddIntToken((int)token_it::frequency, channel->Frequency()); \
|
||||
tokenContainer->AddIntToken((int)token_it::isEncrypted, channel->Ca()); \
|
||||
tokenContainer->AddIntToken((int)token_it::isRadio, isRadio); \
|
||||
tokenContainer->AddIntToken((int)token_it::isHD, isHD); \
|
||||
tokenContainer->AddIntToken((int)token_it::isUHD, isUHD); \
|
||||
\
|
||||
#define ADD_TOKEN_MC(token_it, token_st) \
|
||||
{ \
|
||||
tokenContainer->AddIntToken((int)token_it::number, channel->Number()); \
|
||||
tokenContainer->AddIntToken((int)token_it::transponder, channel->Transponder()); \
|
||||
tokenContainer->AddIntToken((int)token_it::frequency, channel->Frequency()); \
|
||||
tokenContainer->AddIntToken((int)token_it::isEncrypted, channel->Ca()); \
|
||||
tokenContainer->AddIntToken((int)token_it::isRadio, isRadio); \
|
||||
tokenContainer->AddIntToken((int)token_it::isHD, isHD); \
|
||||
tokenContainer->AddIntToken((int)token_it::isUHD, isUHD); \
|
||||
\
|
||||
tokenContainer->AddStringToken((int)token_st::name, channel->Name()); \
|
||||
cString channelID = channel->GetChannelID().ToString(); \
|
||||
tokenContainer->AddStringToken((int)token_st::channelid, *channelID); \
|
||||
tokenContainer->AddIntToken((int)token_it::channellogoexists, imgCache->LogoExists(*channelID)); \
|
||||
\
|
||||
\
|
||||
/* Channel Source Information */ \
|
||||
const cSource *source = Sources.Get(channel->Source()); \
|
||||
if (source) { \
|
||||
@ -369,8 +369,8 @@
|
||||
tokenContainer->AddIntToken((int)token_it::isCable, source->IsCable(source->Code())); \
|
||||
tokenContainer->AddIntToken((int)token_it::isSat, source->IsSat(source->Code())); \
|
||||
tokenContainer->AddIntToken((int)token_it::isTerr, source->IsTerr(source->Code())); \
|
||||
} \
|
||||
}
|
||||
} \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@ -873,55 +873,6 @@ void cVeMenuMain::SplitText(void) {
|
||||
number = strdup("");
|
||||
}
|
||||
}
|
||||
/*
|
||||
void cVeMenuMain::SplitText(void) {
|
||||
char *start = skipspace(text);
|
||||
bool found = false;
|
||||
bool doBreak = false;
|
||||
size_t i = 0;
|
||||
char *c = start;
|
||||
while (*c) {
|
||||
if (i==0) {
|
||||
//if text directly starts with nonnumeric, break
|
||||
if (!(*c >= '0' && *c <= '9')) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
//if current char is not a figure anymore, break
|
||||
if (!(*c >= '0' && *c <= '9')) {
|
||||
//there has to be a space after the menu item number
|
||||
//plugins with figures in their name are eval :-)
|
||||
if (*c != ' ')
|
||||
found = false;
|
||||
doBreak = true;
|
||||
}
|
||||
}
|
||||
if (*c >= '0' && *c <= '9') {
|
||||
found = true;
|
||||
}
|
||||
if (doBreak)
|
||||
break;
|
||||
if (i>4)
|
||||
break;
|
||||
c++;
|
||||
i++;
|
||||
}
|
||||
|
||||
free(number);
|
||||
free(label);
|
||||
if (found) {
|
||||
number = (char*)malloc(i+1);
|
||||
memset(number, 0, i+1);
|
||||
strncpy(number, start, i);
|
||||
} else {
|
||||
number = (char*)malloc(2);
|
||||
memset(number, 0, 2);
|
||||
strncpy(number, "", 1);
|
||||
}
|
||||
label = strdup(skipspace(c));
|
||||
}
|
||||
*/
|
||||
|
||||
/******************************************************************
|
||||
* cLeMenuMain
|
||||
@ -1426,13 +1377,13 @@ bool cLeMenuChannels::Parse(bool forced) {
|
||||
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;
|
||||
case 0x1b: // H.264
|
||||
isHD = true;
|
||||
break;
|
||||
case 0x24: // H.265
|
||||
isHD = true;
|
||||
isUHD = true;
|
||||
break;
|
||||
};
|
||||
|
||||
tokenContainer->Clear();
|
||||
@ -1440,8 +1391,8 @@ bool cLeMenuChannels::Parse(bool forced) {
|
||||
ADD_TOKEN_LMC_IT(current, current);
|
||||
ADD_TOKEN_LMC_IT(separator, !selectable);
|
||||
|
||||
// do the same stuff as in cCeMenuChannels::Parse()
|
||||
ADD_TOKEN_MC(TOKEN_LMC_IT, TOKEN_LMC_ST);
|
||||
// do the same stuff as in cCeMenuChannels::Parse()
|
||||
ADD_TOKEN_MC(TOKEN_LMC_IT, TOKEN_LMC_ST);
|
||||
|
||||
//current schedule
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
@ -1546,13 +1497,13 @@ bool cCeMenuChannels::Parse(bool forced) {
|
||||
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;
|
||||
case 0x1b: // H.264
|
||||
isHD = true;
|
||||
break;
|
||||
case 0x24: // H.265
|
||||
isHD = true;
|
||||
isUHD = true;
|
||||
break;
|
||||
};
|
||||
|
||||
tokenContainer->Clear();
|
||||
@ -2271,8 +2222,8 @@ bool cCeMenuRecordings::Parse(bool forced) {
|
||||
ADD_TOKEN_CMR_ST(recchannelname, channel->Name());
|
||||
ADD_TOKEN_CMR_ST(recchannelid, *channel->GetChannelID().ToString());
|
||||
channelID = channel->GetChannelID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ADD_TOKEN_CMR_ST(epgname, info->Title() ? info->Title() : buffer.c_str());
|
||||
|
@ -593,61 +593,61 @@ bool RecordingIsHD(const cEvent* event, const tChannelID channelID) {
|
||||
int type = -1;
|
||||
|
||||
if (event) {
|
||||
cComponents *Components = (cComponents *)event->Components();
|
||||
if (Components) {
|
||||
// detect HD (see also ETSI EN 300 468)
|
||||
// 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
|
||||
// Stream == Video(1|5): 01 = 05 = 4:3, 02 = 03 = 06 = 07 = 16:9, 04 = 08 = >16:9, 09 = 0D = HD 4:3, 0A = 0B = 0E = 0F = HD 16:9, 0C = 10 = HD >16:9
|
||||
cComponents *Components = (cComponents *)event->Components();
|
||||
if (Components) {
|
||||
// detect HD (see also ETSI EN 300 468)
|
||||
// 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
|
||||
// Stream == Video(1|5): 01 = 05 = 4:3, 02 = 03 = 06 = 07 = 16:9, 04 = 08 = >16:9, 09 = 0D = HD 4:3, 0A = 0B = 0E = 0F = HD 16:9, 0C = 10 = HD >16:9
|
||||
|
||||
tComponent *Component;
|
||||
// #1: HVEC (stream content: 9)
|
||||
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); // recording info: "X 5 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
} else {
|
||||
// #3: MPEG2 (stream content: 1)
|
||||
Component = Components->GetComponent(0, 1, 0); // recording info: "X 1 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
};
|
||||
};
|
||||
};
|
||||
tComponent *Component;
|
||||
// #1: HVEC (stream content: 9)
|
||||
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); // recording info: "X 5 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
} else {
|
||||
// #3: MPEG2 (stream content: 1)
|
||||
Component = Components->GetComponent(0, 1, 0); // recording info: "X 1 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
switch (type) {
|
||||
case 0x09:
|
||||
case 0x0A:
|
||||
case 0x0B:
|
||||
case 0x0C:
|
||||
case 0x0D:
|
||||
case 0x0E:
|
||||
case 0x0F:
|
||||
case 0x10:
|
||||
isHD = true;
|
||||
};
|
||||
};
|
||||
switch (type) {
|
||||
case 0x09:
|
||||
case 0x0A:
|
||||
case 0x0B:
|
||||
case 0x0C:
|
||||
case 0x0D:
|
||||
case 0x0E:
|
||||
case 0x0F:
|
||||
case 0x10:
|
||||
isHD = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if ((isHD == false) && (type == -1) && (!(channelID == tChannelID::InvalidID))) {
|
||||
// fallback to retrieve via channel (in case of EPG issues)
|
||||
// fallback to retrieve via channel (in case of EPG issues)
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByChannelID(channelID);
|
||||
#else
|
||||
const cChannel *channel = Channels.GetByChannelID(channelID);
|
||||
#endif
|
||||
if (channel) {
|
||||
switch (channel->Vtype()) {
|
||||
case 0x1b: // H.264
|
||||
case 0x24: // H.265
|
||||
isHD = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
if (channel) {
|
||||
switch (channel->Vtype()) {
|
||||
case 0x1b: // H.264
|
||||
case 0x24: // H.265
|
||||
isHD = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return isHD;
|
||||
@ -659,44 +659,44 @@ bool RecordingIsUHD(const cEvent* event, const tChannelID channelID) {
|
||||
int type = -1;
|
||||
|
||||
if (event) {
|
||||
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
|
||||
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;
|
||||
// HVEC (stream content: 9)
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
};
|
||||
tComponent *Component;
|
||||
// HVEC (stream content: 9)
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
};
|
||||
|
||||
switch (type) {
|
||||
case 0x04:
|
||||
case 0x05:
|
||||
case 0x06:
|
||||
case 0x07:
|
||||
isUHD = true;
|
||||
};
|
||||
};
|
||||
switch (type) {
|
||||
case 0x04:
|
||||
case 0x05:
|
||||
case 0x06:
|
||||
case 0x07:
|
||||
isUHD = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if ((isUHD == false) && (type == -1) && (!(channelID == tChannelID::InvalidID))) {
|
||||
// fallback to retrieve via channel (in case of EPG issues)
|
||||
// fallback to retrieve via channel (in case of EPG issues)
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByChannelID(channelID);
|
||||
#else
|
||||
const cChannel *channel = Channels.GetByChannelID(channelID);
|
||||
#endif
|
||||
if (channel) {
|
||||
switch (channel->Vtype()) {
|
||||
case 0x24: // H.265
|
||||
isUHD = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
if (channel) {
|
||||
switch (channel->Vtype()) {
|
||||
case 0x24: // H.265
|
||||
isUHD = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return isUHD;
|
||||
@ -710,50 +710,50 @@ bool RecordingIsRadio(const cEvent* event, const double FramesPerSecond) {
|
||||
|
||||
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
|
||||
// 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;
|
||||
tComponent *Component;
|
||||
|
||||
Component = Components->GetComponent(0, 2, 0); // recording info: "X 2 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
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, 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, 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, 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, 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, 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;
|
||||
};
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
hasVideo = 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;
|
||||
};
|
||||
if (FramesPerSecond < 24) { // workaround for issue of missing "X 1" on some SD channels (e.g. RTL)
|
||||
isRadio = true;
|
||||
};
|
||||
};
|
||||
|
||||
return isRadio;
|
||||
|
@ -1236,7 +1236,7 @@ bool cVeDmDetailheaderRec::Parse(bool forced) {
|
||||
#endif
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::errors, errors);
|
||||
const cEvent *event = info->GetEvent();
|
||||
tChannelID channelID = tChannelID::InvalidID;
|
||||
tChannelID channelID = tChannelID::InvalidID;
|
||||
if (event) {
|
||||
cString recDate = event->GetDateString();
|
||||
cString recTime = event->GetTimeString();
|
||||
@ -1266,12 +1266,12 @@ bool cVeDmDetailheaderRec::Parse(bool forced) {
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isInUse, recording->IsInUse());
|
||||
}
|
||||
|
||||
if (info->ChannelName() && (strlen(info->ChannelName()) > 0)) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelname, info->ChannelName());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelid, info->ChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::recchannelnumber, 0); // cannot be provided, for backward compatibility only
|
||||
channelID = info->ChannelID();
|
||||
} else {
|
||||
if (info->ChannelName() && (strlen(info->ChannelName()) > 0)) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelname, info->ChannelName());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelid, info->ChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::recchannelnumber, 0); // cannot be provided, for backward compatibility only
|
||||
channelID = info->ChannelID();
|
||||
} else {
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByChannelID(info->ChannelID());
|
||||
@ -1279,12 +1279,12 @@ bool cVeDmDetailheaderRec::Parse(bool forced) {
|
||||
const cChannel *channel = Channels.GetByChannelID(info->ChannelID());
|
||||
#endif
|
||||
if (channel) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelname, channel->Name());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelid, *channel->GetChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::recchannelnumber, channel->Number());
|
||||
channelID = channel->GetChannelID();
|
||||
}
|
||||
}
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelname, channel->Name());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelid, *channel->GetChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::recchannelnumber, channel->Number());
|
||||
channelID = channel->GetChannelID();
|
||||
}
|
||||
}
|
||||
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isHD, RecordingIsHD(event, channelID)); // detect HD from 'info'
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isUHD, RecordingIsUHD(event, channelID)); // detect UHD from 'info'
|
||||
@ -1387,6 +1387,3 @@ bool cVeDmTablabels::Parse(bool forced) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user