diff options
| author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-01-21 11:55:05 +0100 |
|---|---|---|
| committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-01-21 11:55:05 +0100 |
| commit | ddf861d6f630dd4db3e69395a68ad89af776e47f (patch) | |
| tree | 0f4561cea26b407454e29cc706c0ff380091191d /coreengine/viewelement.c | |
| parent | 7a6858b8f30bb3c817276cd7fb4299c14d75a091 (diff) | |
| parent | 4c4b9f78372eeabbd394041b63db71c76eec146d (diff) | |
| download | vdr-plugin-skindesigner-ddf861d6f630dd4db3e69395a68ad89af776e47f.tar.gz vdr-plugin-skindesigner-ddf861d6f630dd4db3e69395a68ad89af776e47f.tar.bz2 | |
Merge branch 'pbiering/skindesigner-expose-recording-isUHD'
Diffstat (limited to 'coreengine/viewelement.c')
| -rw-r--r-- | coreengine/viewelement.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/coreengine/viewelement.c b/coreengine/viewelement.c index 306e0ce..370a58f 100644 --- a/coreengine/viewelement.c +++ b/coreengine/viewelement.c @@ -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; +}; |
