From 40b296112222a7c0bcec6bebb950c79c5f9126cd Mon Sep 17 00:00:00 2001 From: max_10 Date: Tue, 17 Oct 2017 20:58:29 +0200 Subject: [PATCH] libarmbox: fix again resolution icon in infoviewer Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/8268539a06f386af9d63702377563473821bc550 Author: max_10 Date: 2017-10-17 (Tue, 17 Oct 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 07db195..29d8233 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -549,33 +549,9 @@ void cVideo::Standby(unsigned int bOn) int cVideo::getBlank(void) { - static unsigned int lastcount = 0; - unsigned int count = 0; - size_t n = 0; - ssize_t r; - char *line = NULL; - /* hack: the "mailbox" irq is not increasing if - * no audio or video is decoded... */ - FILE *f = fopen("/proc/interrupts", "r"); - if (! f) /* huh? */ - return 0; - while ((r = getline(&line, &n, f)) != -1) - { - if (r <= (ssize_t) strlen("mailbox")) /* should not happen... */ - continue; - line[r - 1] = 0; /* remove \n */ - if (!strcmp(&line[r - 1 - strlen("mailbox")], "mailbox")) - { - count = atoi(line + 5); - break; - } - } - free(line); - fclose(f); - int ret = (count == lastcount); /* no new decode -> return 1 */ - lt_debug("#%d: %s: %d (irq++: %d)\n", devnum, __func__, ret, count - lastcount); - lastcount = count; - return ret; + int ret = proc_get_hex("/proc/stb/vmpeg/0/xres"); + lt_debug("%s => %d\n", __func__, !ret); + return !ret; } void cVideo::Pig(int x, int y, int w, int h, int osd_w, int osd_h, int startx, int starty, int endx, int endy)