summaryrefslogtreecommitdiff
path: root/coreengine/viewelement.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreengine/viewelement.c')
-rw-r--r--coreengine/viewelement.c31
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;
+};