diff options
| author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-12-22 13:26:56 +0100 |
|---|---|---|
| committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-12-22 13:26:56 +0100 |
| commit | 2f645127100f1e5e18d288b6f212f5760398d646 (patch) | |
| tree | 1103a73033b1fcb35c709c2cc843e024fe7e0403 /coreengine/viewelement.c | |
| parent | d11d09ca6e0d0e5f7b316c8779b455ec6e70325e (diff) | |
| download | vdr-plugin-skindesigner-2f645127100f1e5e18d288b6f212f5760398d646.tar.gz vdr-plugin-skindesigner-2f645127100f1e5e18d288b6f212f5760398d646.tar.bz2 | |
Cosmetic changes
Diffstat (limited to 'coreengine/viewelement.c')
| -rw-r--r-- | coreengine/viewelement.c | 232 |
1 files changed, 116 insertions, 116 deletions
diff --git a/coreengine/viewelement.c b/coreengine/viewelement.c index 7f2a072..8566eb1 100644 --- a/coreengine/viewelement.c +++ b/coreengine/viewelement.c @@ -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 - - 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; - }; - }; + 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; + }; + }; + }; + + 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 - - 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; - }; - }; + 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; + }; + + 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 - - 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; - }; + // 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)) { - 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; |
