diff options
-rw-r--r-- | frontend.h | 4 | ||||
-rw-r--r-- | frontend_local.c | 7 | ||||
-rw-r--r-- | frontend_local.h | 4 | ||||
-rw-r--r-- | frontend_svr.c | 25 | ||||
-rw-r--r-- | frontend_svr.h | 5 |
5 files changed, 40 insertions, 5 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.h,v 1.40 2010-05-18 15:28:34 phintuka Exp $ + * $Id: frontend.h,v 1.41 2011-03-20 20:59:25 phintuka Exp $ * */ @@ -133,6 +133,8 @@ class cXinelibThread : public cThread, public cListObject // Remote frontend server: virtual bool Listen(int port) { return false; } + virtual int SupportsTrueColorOSD(void) { return 0; } /* 0: no, 1: yes, -1: unknown */ + // // Data // diff --git a/frontend_local.c b/frontend_local.c index 49004a1e..99b19d19 100644 --- a/frontend_local.c +++ b/frontend_local.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_local.c,v 1.54 2011-02-28 13:37:10 phintuka Exp $ + * $Id: frontend_local.c,v 1.55 2011-03-20 20:59:25 phintuka Exp $ * */ @@ -218,6 +218,11 @@ void cXinelibLocal::ConfigureDecoder(int pes_buffers) cCondWait::SleepMs(100); } +int cXinelibLocal::SupportsTrueColorOSD(void) +{ + return !!xc.hud_osd; +} + // // Xine control // diff --git a/frontend_local.h b/frontend_local.h index 72552b03..863d3f0e 100644 --- a/frontend_local.h +++ b/frontend_local.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_local.h,v 1.8 2010-03-13 12:04:29 phintuka Exp $ + * $Id: frontend_local.h,v 1.9 2011-03-20 20:59:25 phintuka Exp $ * */ @@ -49,6 +49,8 @@ class cXinelibLocal : public cXinelibThread int aspect, int scale_video, int field_order); virtual void ConfigureDecoder(int pes_buffers); + virtual int SupportsTrueColorOSD(void); + protected: // Playback control diff --git a/frontend_svr.c b/frontend_svr.c index a37bbe06..0fcf2a0b 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.102 2011-03-19 21:38:20 phintuka Exp $ + * $Id: frontend_svr.c,v 1.103 2011-03-20 20:59:25 phintuka Exp $ * */ @@ -127,6 +127,7 @@ cXinelibServer::cXinelibServer(int listen_port) : m_State[i] = NULL; m_bMulticast[i] = 0; m_bConfigOk[i] = false; + m_bArgbOSD[i] = false; m_bUdp[i] = 0; m_ConnType[i] = ctDetecting; } @@ -219,6 +220,7 @@ void cXinelibServer::CloseDataConnection(int cli) m_bUdp[cli] = false; m_bMulticast[cli] = false; m_bConfigOk[cli] = false; + m_bArgbOSD[cli] = false; m_iMulticastMask &= ~(1<<cli); @@ -766,6 +768,23 @@ bool cXinelibServer::HasClients(void) return false; } +int cXinelibServer::SupportsTrueColorOSD(void) +{ + LOCK_THREAD; + + unsigned i, has_clients = 0; + + for (i = 0; i < MAXCLIENTS; i++) + if (fd_control[i].open() && m_bConfigOk[i]) { + if (!m_bArgbOSD[i]) + return 0; + else + has_clients++; + } + + return has_clients ? 1 : -1; +} + int cXinelibServer::PlayFileCtrl(const char *Cmd, int TimeoutMs) { /* Check if there are any clients */ @@ -1651,6 +1670,10 @@ void cXinelibServer::Handle_Control(int cli, const char *cmd) } } else if(!strncmp(cmd, "INFO ", 5)) { + + if(!strncmp(cmd, "INFO ARGBOSD", 12)) + m_bArgbOSD[cli] = true; + if(!*xc.local_frontend || !strncmp(xc.local_frontend, "none", 4)) cXinelibThread::InfoHandler(cmd+5); diff --git a/frontend_svr.h b/frontend_svr.h index 198e3065..f2720110 100644 --- a/frontend_svr.h +++ b/frontend_svr.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.h,v 1.29 2010-03-13 12:04:29 phintuka Exp $ + * $Id: frontend_svr.h,v 1.30 2011-03-20 20:59:25 phintuka Exp $ * */ @@ -60,6 +60,8 @@ class cXinelibServer : public cXinelibThread // Configuration virtual bool Listen(int port); + virtual int SupportsTrueColorOSD(void); + protected: // Playback control virtual int Xine_Control(const char *cmd); @@ -114,6 +116,7 @@ protected: bool m_bUdp [MAXCLIENTS]; // Client uses UDP transport bool m_bMulticast [MAXCLIENTS]; // Client uses multicast RTP bool m_bConfigOk [MAXCLIENTS]; // Client has been configured + bool m_bArgbOSD [MAXCLIENTS]; // Client supports ARGB OSD int m_iMulticastMask; // bit [cli] is 1 or 0. 1 == multicast in use. int m_MasterCli; // Master client (controls playback speed) |