diff options
author | phintuka <phintuka> | 2013-08-21 09:40:22 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2013-08-21 09:40:22 +0000 |
commit | 0604936163f999fd86789e7d1c8bf25810829943 (patch) | |
tree | 39c7052cd540f2bf91112ef6fba20b7719b31a51 | |
parent | 93a3128953313254cc82e58dc15715f1bcdebbe2 (diff) | |
download | xineliboutput-0604936163f999fd86789e7d1c8bf25810829943.tar.gz xineliboutput-0604936163f999fd86789e7d1c8bf25810829943.tar.bz2 |
Support for cDevice::ScaleVideo()
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | device.c | 15 | ||||
-rw-r--r-- | device.h | 7 | ||||
-rw-r--r-- | osd.c | 7 |
4 files changed, 27 insertions, 3 deletions
@@ -3,6 +3,7 @@ VDR Plugin 'xineliboutput' Revision History ????-??-??: Version 2.0.0 +- Support for cDevice::ScaleVideo() - Dropped support for vdr < 2.0 2013-08-20: Version 1.1.0 @@ -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.126 2013-08-21 09:14:36 phintuka Exp $ + * $Id: device.c,v 1.127 2013-08-21 09:40:22 phintuka Exp $ * */ @@ -1518,6 +1518,19 @@ bool cXinelibDevice::SupportsTrueColorOSD(void) return m_server && (m_server->SupportsTrueColorOSD() == 1); } +cRect cXinelibDevice::CanScaleVideo(const cRect &Rect, int Alignment) +{ + return Rect; +} + +void cXinelibDevice::ScaleVideo(const cRect &Rect) +{ + if (m_VideoWindow != Rect) { + m_VideoWindow = Rect; + cXinelibOsdProvider::RefreshOsd(); + } +} + // // 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.64 2013-08-21 09:14:36 phintuka Exp $ + * $Id: device.h,v 1.65 2013-08-21 09:40:22 phintuka Exp $ * */ @@ -90,6 +90,7 @@ class cXinelibDevice : public cDevice virtual bool HasDecoder(void) const { return true; }; virtual bool CanReplay(void) const { return true; }; virtual bool HasIBPTrickSpeed(void) { return xc.ibp_trickspeed; } + virtual cRect CanScaleVideo(const cRect &Rect, int Alignment = taCenter); bool SupportsTrueColorOSD(void); @@ -99,11 +100,14 @@ class cXinelibDevice : public cDevice ePlayMode m_PlayMode; int m_TrickSpeed; int m_TrickSpeedMode; + cRect m_VideoWindow; public: virtual bool SetPlayMode(ePlayMode PlayMode); ePlayMode GetPlayMode(void) const { return m_PlayMode; }; + const cRect& GetVideoWindow(void) { return m_VideoWindow; } + protected: virtual void Clear(void); virtual void Play(void); @@ -111,6 +115,7 @@ class cXinelibDevice : public cDevice virtual void Freeze(void); virtual bool Flush(int TimeoutMs = 0); virtual int64_t GetSTC(void); + virtual void ScaleVideo(const cRect &Rect = cRect::Null); // Video format facilities @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: osd.c,v 1.49 2013-08-21 09:14:36 phintuka Exp $ + * $Id: osd.c,v 1.50 2013-08-21 09:40:22 phintuka Exp $ * */ @@ -506,6 +506,11 @@ void cXinelibOsd::Flush(void) if(!m_IsVisible) return; + const cRect& videoWindow = m_Device->GetVideoWindow(); + if (videoWindow != cRect::Null) { + CmdVideoWindow(videoWindow.X(), videoWindow.Y(), videoWindow.Width(), videoWindow.Height()); + } + if (IsTrueColor()) { LOCK_PIXMAPS; |