mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The new functions cDevice::CanScaleVideo() and cDevice::ScaleVideo() can be used by derived output devices to implement scaling the video to a given size and location
This commit is contained in:
parent
1e14401e74
commit
bcce056292
@ -1776,6 +1776,8 @@ Lucian Muresan <lucianm@users.sourceforge.net>
|
|||||||
for reporting duplicate texts in i18n.c
|
for reporting duplicate texts in i18n.c
|
||||||
for suggesting to use 'gettext' for internationalization
|
for suggesting to use 'gettext' for internationalization
|
||||||
for exporting some libsi functions
|
for exporting some libsi functions
|
||||||
|
for suggesting to add functions to cDevice that allow derived output devices to
|
||||||
|
implement scaling the video to a given size and location
|
||||||
|
|
||||||
Mattias Grönlund <Mattias@Gronlund.net>
|
Mattias Grönlund <Mattias@Gronlund.net>
|
||||||
for pointing out a missing cleanup at program exit in case there is a problem
|
for pointing out a missing cleanup at program exit in case there is a problem
|
||||||
|
3
HISTORY
3
HISTORY
@ -7375,3 +7375,6 @@ Video Disk Recorder Revision History
|
|||||||
- Now always setting the TDT EIT filter, because otherwise when turning on using the
|
- Now always setting the TDT EIT filter, because otherwise when turning on using the
|
||||||
transponder time in the Setup menu, it would only be used after the next restart
|
transponder time in the Setup menu, it would only be used after the next restart
|
||||||
of VDR (thanks to Sundararaj Reel).
|
of VDR (thanks to Sundararaj Reel).
|
||||||
|
- The new functions cDevice::CanScaleVideo() and cDevice::ScaleVideo() can be used by
|
||||||
|
derived output devices to implement scaling the video to a given size and location
|
||||||
|
(based on a suggestion by Lucian Muresan).
|
||||||
|
29
device.h
29
device.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.h 2.41 2012/08/26 13:25:44 kls Exp $
|
* $Id: device.h 2.42 2012/12/04 11:52:58 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DEVICE_H
|
#ifndef __DEVICE_H
|
||||||
@ -655,6 +655,33 @@ public:
|
|||||||
virtual bool IsPlayingVideo(void) const { return isPlayingVideo; }
|
virtual bool IsPlayingVideo(void) const { return isPlayingVideo; }
|
||||||
///< \return Returns true if the currently attached player has delivered
|
///< \return Returns true if the currently attached player has delivered
|
||||||
///< any video packets.
|
///< any video packets.
|
||||||
|
virtual cRect CanScaleVideo(const cRect &Rect, int Alignment = taCenter) { return cRect::Null; }
|
||||||
|
///< Asks the output device whether it can scale the currently shown video in
|
||||||
|
///< such a way that it fits into the given Rect, while retaining its proper
|
||||||
|
///< aspect ratio. If the scaled video doesn't exactly fit into Rect, Alignment
|
||||||
|
///< is used to determine how to align the actual rectangle with the requested
|
||||||
|
///< one. The actual rectangle can be smaller, larger or the same size as the
|
||||||
|
///< given Rect, and its location may differ, depending on the capabilities of
|
||||||
|
///< the output device, which may not be able to display a scaled video at
|
||||||
|
///< arbitrary sizes and locations. The device shall, however, do its best to
|
||||||
|
///< match the requested Rect as closely as possible, preferring a size and
|
||||||
|
///< location that fits completely into the requested Rect if possible.
|
||||||
|
///< Returns the rectangle that can actually be used when scaling the video.
|
||||||
|
///< A skin plugin using this function should rearrange its content according
|
||||||
|
///< to the rectangle returned from calling this function, and should especially
|
||||||
|
///< be prepared for cases where the returned rectangle is way off the requested
|
||||||
|
///< Rect, or even Null. In such cases, the skin may want to fall back to
|
||||||
|
///< working with full screen video.
|
||||||
|
///< If this device can't scale the video, a Null rectangle is returned (this
|
||||||
|
///< is also the default implementation).
|
||||||
|
virtual void ScaleVideo(const cRect &Rect = cRect::Null) {}
|
||||||
|
///< Scales the currently shown video in such a way that it fits into the given
|
||||||
|
///< Rect. Rect should be one retrieved through a previous call to
|
||||||
|
///< CanScaleVideo() (otherwise results may be undefined).
|
||||||
|
///< Even if video output is scaled, the functions GetVideoSize() and
|
||||||
|
///< GetOsdSize() must still return the same values as if in full screen mode!
|
||||||
|
///< If this device can't scale the video, nothing happens.
|
||||||
|
///< To restore full screen video, call this function with a Null rectangle.
|
||||||
virtual bool HasIBPTrickSpeed(void) { return false; }
|
virtual bool HasIBPTrickSpeed(void) { return false; }
|
||||||
///< Returns true if this device can handle all frames in 'fast forward'
|
///< Returns true if this device can handle all frames in 'fast forward'
|
||||||
///< trick speeds.
|
///< trick speeds.
|
||||||
|
Loading…
Reference in New Issue
Block a user