diff options
| author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-01-22 19:44:15 +0100 |
|---|---|---|
| committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-01-22 19:44:15 +0100 |
| commit | 59248ccebb663fbd8633766490cfd862a0631c14 (patch) | |
| tree | a2eeba1c87b8fe2073f713e36c6fab1d9ce06152 /coreengine/viewelement.c | |
| parent | c0dad5a14f7ae8d95822b7fbe156472d87bada01 (diff) | |
| parent | efeb8d69c4c08664941a9b50904f9b2c2f6db0e5 (diff) | |
| download | vdr-plugin-skindesigner-59248ccebb663fbd8633766490cfd862a0631c14.tar.gz vdr-plugin-skindesigner-59248ccebb663fbd8633766490cfd862a0631c14.tar.bz2 | |
Merge branch 'pbiering/skindesigner-add-isRadio-to-recording'
Diffstat (limited to 'coreengine/viewelement.c')
| -rw-r--r-- | coreengine/viewelement.c | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/coreengine/viewelement.c b/coreengine/viewelement.c index 370a58f..975757c 100644 --- a/coreengine/viewelement.c +++ b/coreengine/viewelement.c @@ -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; +}; |
