diff options
author | phintuka <phintuka> | 2011-03-20 21:36:31 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2011-03-20 21:36:31 +0000 |
commit | afe52d74afc4bdb8579024543d8c3d2f6033ad8d (patch) | |
tree | 4a5589493119597660bbe59aec7215024b3f8f60 | |
parent | 994af0bba5e30034791e9a3f26942448d8dad973 (diff) | |
download | xineliboutput-afe52d74afc4bdb8579024543d8c3d2f6033ad8d.tar.gz xineliboutput-afe52d74afc4bdb8579024543d8c3d2f6033ad8d.tar.bz2 |
Added cXinelibDevice::SupportsTrueColorOSD()
-rw-r--r-- | device.c | 26 | ||||
-rw-r--r-- | device.h | 4 |
2 files changed, 28 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.c,v 1.112 2010-06-04 10:40:20 rofafor Exp $ + * $Id: device.c,v 1.113 2011-03-20 21:36:31 phintuka Exp $ * */ @@ -1640,6 +1640,30 @@ void cXinelibDevice::GetOsdSize(int &Width, int &Height, double &PixelAspect) PixelAspect = 16.0 / 9.0 / (double)Width * (double)Height; } +bool cXinelibDevice::SupportsTrueColorOSD(void) +{ + switch (xc.osd_color_depth) { + default: + case OSD_DEPTH_LUT8: return false; + case OSD_DEPTH_TRUECOLOR: return true; + case OSD_DEPTH_auto:; + } + + // Automatic mode: + // Use TrueColor if all clients support it. + // Special handling when no remote clients: + // - local frontend supports TrueColor --> use TrueColor + // - no local frontend --> use LUT8 + + if (m_local) { + if (!m_local->SupportsTrueColorOSD()) + return false; + return !m_server || !!m_server->SupportsTrueColorOSD(); + } + + return m_server && (m_server->SupportsTrueColorOSD() == 1); +} + // // SPU decoder // @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.h,v 1.60 2010-06-04 10:40:20 rofafor Exp $ + * $Id: device.h,v 1.61 2011-03-20 21:36:31 phintuka Exp $ * */ @@ -90,6 +90,8 @@ class cXinelibDevice : public cDevice virtual bool CanReplay(void) const { return true; }; virtual bool HasIBPTrickSpeed(void) { return xc.ibp_trickspeed; } + bool SupportsTrueColorOSD(void); + // Playback control private: |