diff options
| author | Thomas Reufer <thomas@reufer.ch> | 2016-07-12 10:28:15 +0200 |
|---|---|---|
| committer | Thomas Reufer <thomas@reufer.ch> | 2016-07-12 10:28:15 +0200 |
| commit | 0b676b7aaa659443c52f4d2f249946c834683fd6 (patch) | |
| tree | 6a7185818b2bd1e08a3cd801c2278cfb18297cfe | |
| parent | 00af2c0eb2b86249b5aa680fccd6d3239a05e8f8 (diff) | |
| download | vdr-plugin-rpihddevice-0b676b7aaa659443c52f4d2f249946c834683fd6.tar.gz vdr-plugin-rpihddevice-0b676b7aaa659443c52f4d2f249946c834683fd6.tar.bz2 | |
fixed compilation with GCC-6
| -rw-r--r-- | HISTORY | 1 | ||||
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | ovgosd.c | 16 | ||||
| -rw-r--r-- | tools.c | 5 |
4 files changed, 13 insertions, 10 deletions
@@ -6,6 +6,7 @@ VDR Plugin 'rpihddevice' Revision History - make use of advanced deinterlacer configurable - add debug option to log number of executed OpenVG commands and flushes - fixed: + - fixed compilation with GCC-6 - implement proper handling of display and pixel aspect ratios - fixed vertical text position @@ -50,6 +50,7 @@ SOFILE = libvdr-$(PLUGIN).so DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' DEFINES += -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM DEFINES += -Wno-psabi -Wno-write-strings -fpermissive +DEFINES += -D__STL_CONFIG_H CXXFLAGS += -D__STDC_CONSTANT_MACROS @@ -1209,14 +1209,14 @@ public: if (m_alignment & taLeft) { if (m_alignment & taBorder) - offsetX += max(height / TEXT_ALIGN_BORDER, 1.0f); + offsetX += std::max(height / TEXT_ALIGN_BORDER, 1.0f); } else if (m_alignment & taRight) { if (width < m_w) offsetX += m_w - width; if (m_alignment & taBorder) - offsetX -= max(height / TEXT_ALIGN_BORDER, 1.0f); + offsetX -= std::max(height / TEXT_ALIGN_BORDER, 1.0f); } else { @@ -1592,8 +1592,8 @@ public: virtual bool Execute(cEgl *egl) { - int w = min(m_w, vgGeti(VG_MAX_IMAGE_WIDTH)); - int h = min(m_h, vgGeti(VG_MAX_IMAGE_HEIGHT)); + int w = std::min(m_w, vgGeti(VG_MAX_IMAGE_WIDTH)); + int h = std::min(m_h, vgGeti(VG_MAX_IMAGE_HEIGHT)); if (w <= 0 || h <= 0) return true; @@ -2375,11 +2375,11 @@ public: { ELOG("[OpenVG] cannot allocate pixmap of %dpx x %dpx, " "clipped to %dpx x %dpx!", width, height, - min(width, m_ovg->MaxImageSize().Width()), - min(height, m_ovg->MaxImageSize().Height())); + std::min(width, m_ovg->MaxImageSize().Width()), + std::min(height, m_ovg->MaxImageSize().Height())); - width = min(width, m_ovg->MaxImageSize().Width()); - height = min(height, m_ovg->MaxImageSize().Height()); + width = std::min(width, m_ovg->MaxImageSize().Width()); + height = std::min(height, m_ovg->MaxImageSize().Height()); } #endif // create pixel buffer and wait until command has been completed @@ -20,6 +20,7 @@ #include <limits.h> #include <vdr/tools.h> #include "tools.h" +#include <algorithm> /* * ffmpeg's implementation for rational numbers: @@ -32,7 +33,7 @@ cRational::cRational(double d) : int exp; frexp(d, &exp); - den = 1LL << (29 - max(exp - 1, 0)); + den = 1LL << (29 - std::max(exp - 1, 0)); num = floor(d * den + 0.5); Reduce(INT_MAX); @@ -62,7 +63,7 @@ bool cRational::Reduce(int max) if (a1.num) x = (max - a0.num) / a1.num; if (a1.den) - x = min(x, (max - a0.den) / a1.den); + x = std::min(x, (max - a0.den) / a1.den); if (den * (2 * x * a1.den + a0.den) > num * a1.den) a1 = cRational(x * a1.num + a0.num, x * a1.den + a0.den); break; |
