diff options
author | Thomas Reufer <thomas@reufer.ch> | 2016-04-27 12:52:33 +0200 |
---|---|---|
committer | Thomas Reufer <thomas@reufer.ch> | 2016-04-27 14:04:12 +0200 |
commit | 6e447f1855a76b2a590b34472ca1fb4dfa835a39 (patch) | |
tree | b7ed096b36fb1b982e32b083d5353548d267178b | |
parent | 8828f1e8dd7b64d142053269b3f9387ef35ceb38 (diff) | |
download | vdr-plugin-rpihddevice-6e447f1855a76b2a590b34472ca1fb4dfa835a39.tar.gz vdr-plugin-rpihddevice-6e447f1855a76b2a590b34472ca1fb4dfa835a39.tar.bz2 |
add debug option to log number of executed OpenVG commands and flushes
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | ovgosd.c | 23 |
3 files changed, 31 insertions, 0 deletions
@@ -1,6 +1,9 @@ VDR Plugin 'rpihddevice' Revision History ----------------------------------------- +- new: + - add debug option to log number of executed OpenVG commands and flushes + 2016-04-23: Version 1.0.3 ------------------------- - new: @@ -79,6 +79,11 @@ ifeq ($(DEBUG_BUFFERS), 1) DEFINES += -DDEBUG_BUFFERS endif +DEBUG_OVGSTAT ?= 0 +ifeq ($(DEBUG_OVGSTAT), 1) + DEFINES += -DDEBUG_OVGSTAT +endif + ENABLE_AAC_LATM ?= 0 ifeq ($(ENABLE_AAC_LATM), 1) DEFINES += -DENABLE_AAC_LATM @@ -757,6 +757,7 @@ public: virtual bool Execute(cEgl *egl) = 0; virtual const char* Description(void) = 0; + virtual bool IsFlush(void) { return false; }; protected: @@ -776,6 +777,7 @@ public: cOvgCmd(target) { } virtual const char* Description(void) { return "Flush"; } + virtual bool IsFlush(void) { return true; }; virtual bool Execute(cEgl *egl) { @@ -1866,6 +1868,11 @@ protected: vgSetfv(VG_CLEAR_COLOR, 4, color); vgClear(0, 0, egl.window.width, egl.window.height); +#ifdef DEBUG_OVGSTAT + cTimeMs timer; + int commands = 0, flushes = 0; +#endif + bool reset = false; while (!reset) { @@ -1878,6 +1885,22 @@ protected: m_commands.pop(); Unlock(); +#ifdef DEBUG_OVGSTAT + if (timer.TimedOut()) + { + if (commands || flushes) + { + DLOG("[OpenVG] commands executed: %d, flushes: %d", + commands, flushes); + commands = 0; + flushes = 0; + } + timer.Set(1000); + } + commands++; + if (cmd->IsFlush()) + flushes++; +#endif reset = cmd ? !cmd->Execute(&egl) : true; VGErrorCode err = vgGetError(); |