summaryrefslogtreecommitdiff
path: root/libcore/helpers.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-10-20 17:35:52 +0200
committerlouis <louis.braun@gmx.de>2014-10-20 17:35:52 +0200
commit2c17177f2faa9e03d29fad3e0e4d9b0a827ca401 (patch)
tree1d47610c1ffc227251dabc5ef5958902f5ca86d4 /libcore/helpers.c
parent49c6ef552c7964bd60d19380605c14ec21c36e7e (diff)
downloadvdr-plugin-skindesigner-2c17177f2faa9e03d29fad3e0e4d9b0a827ca401.tar.gz
vdr-plugin-skindesigner-2c17177f2faa9e03d29fad3e0e4d9b0a827ca401.tar.bz2
added extented recording information
Diffstat (limited to 'libcore/helpers.c')
-rw-r--r--libcore/helpers.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/libcore/helpers.c b/libcore/helpers.c
index c8e7fe2..1934f3e 100644
--- a/libcore/helpers.c
+++ b/libcore/helpers.c
@@ -175,3 +175,46 @@ void cStopWatch::Report(const char* message) {
void cStopWatch::Stop(const char* message) {
dsyslog("skindesigner: %s - needed %d ms", message, (int)(cTimeMs::Now() - start));
}
+
+//View Helpers
+string GetScreenResolutionString(int width, int height, bool *isHD) {
+ string name = "";
+ switch (width) {
+ case 1920:
+ case 1440:
+ name = "hd1080i";
+ *isHD = true;
+ break;
+ case 1280:
+ if (height == 720)
+ name = "hd720p";
+ else
+ name = "hd1080i";
+ *isHD = true;
+ break;
+ case 720:
+ name = "sd576i";
+ break;
+ default:
+ name = "sd576i";
+ break;
+ }
+ return name;
+}
+
+string GetScreenAspectString(double aspect, bool *isWideScreen) {
+ string name = "";
+ *isWideScreen = false;
+ if (aspect == 4.0/3.0) {
+ name = "4:3";
+ *isWideScreen = false;
+ } else if (aspect == 16.0/9.0) {
+ name = "16:9";
+ *isWideScreen = true;
+ } else if (aspect == 2.21) {
+ name = "21:9";
+ *isWideScreen = true;
+ }
+ return name;
+}
+