Go to the documentation of this file.
8 #ifndef MYTHVIDEOBOUNDS_H_
9 #define MYTHVIDEOBOUNDS_H_
13 #include <QCoreApplication>
31 bool InitBounds(QSize VideoDim, QSize VideoDispDim,
32 float Aspect, QRect WindowRect);
49 void SourceChanged (QSize VideoDim, QSize VideoDispDim,
float Aspect);
95 static QSize
Fix1088 (QSize Dimensions);
~MythVideoBounds() override=default
bool IsEmbeddingAndHidden() const
static const float kManualZoomMaxVerticalZoom
bool IsEmbedding(void) const
void VideoAspectRatioChanged(float Aspect)
Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.
void PhysicalDPIChanged(qreal)
QRect m_rawWindowRect
Rectangle describing QWidget bounds - not adjusted for high DPI scaling (macos)
QRect m_displayVideoRect
Pixel rectangle in display window into which video_rect maps to.
QRect m_tmpDisplayVisibleRect
Used to save the display_visible_rect for restoration after video embedding ends.
float m_dbVertScale
Vertical Overscan/Underscan percentage.
virtual void EmbedPlayback(bool Embed, QRect Rect)
QRect GetDisplayVisibleRect(void) const
void ApplyDBScaleAndMove(void)
Apply scales and moves for "Overscan" and "Underscan" DB settings.
float GetDisplayAspect(void) const
void RefreshVideoBoundsState()
Send out latest state to listeners.
float m_videoAspect
Physical aspect ratio of video.
QRect m_rawItvDisplayVideoRect
void VideoRectsChanged(const QRect &DisplayVideoRect, const QRect &VideoRect)
bool UsingGuiSize(void) const
bool m_dbScalingAllowed
disable this to prevent overscan/underscan
QRect GetVideoRect(void) const
void PrintMoveResizeDebug(void)
QRect GetDisplayVideoRect(void) const
void UpdateOSDMessage(const QString &Message)
void SaveBottomLine(void)
bool m_embedding
State variables.
AspectOverrideMode m_dbAspectOverride
AdjustFillMode GetAdjustFill(void) const
static const int kManualZoomMaxMove
void SetDisplayAspect(float DisplayAspect)
AdjustFillMode m_adjustFill
Zoom mode.
void SetDisplay(MythDisplay *mDisplay)
void ResizeDisplayWindow(QRect Rect, bool SaveVisibleRect)
Resize Display Window.
void VisibleRectChanged(const QRect &DisplayVisibleRect)
float m_dbHorizScale
Horizontal Overscan/Underscan percentage.
static const float kManualZoomMaxHorizontalZoom
void SourceChanged(QSize VideoDim, QSize VideoDispDim, float Aspect)
Update for new source video dimensions and aspect ratio.
void SetStereoOverride(StereoscopicMode Mode)
static QSize Fix1088(QSize Dimensions)
void ToggleAspectOverride(AspectOverrideMode AspectMode=kAspect_Toggle)
Enforce different aspect ratio than detected, then calls VideoAspectRatioChanged(float) to apply them...
void PopulateGeometry(void)
QRect m_windowRect
Rectangle describing QWidget bounds.
AspectOverrideMode m_videoAspectOverrideMode
AspectOverrideMode to use to modify overriden_video_aspect.
AdjustFillMode m_dbAdjustFill
float m_videoAspectOverride
Normally this is the same as videoAspect, but may not be if the user has toggled the aspect override ...
float m_manualHorizScale
Manually applied horizontal scaling.
QRect m_displayVisibleRect
Visible portion of display window in pixels.
QRect GetEmbeddingRect(void) const
void ApplyLetterboxing(void)
void ToggleAdjustFill(AdjustFillMode AdjustFillMode=kAdjustFill_Toggle)
Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize()...
void SetRotation(int Rotation)
Set the rotation in degrees.
float GetOverridenVideoAspect(void) const
QSize GetVideoDispDim(void) const
void VideoSizeChanged(const QSize &VideoDim, const QSize &VideoDispDim)
static const float kManualZoomMinVerticalZoom
void ToggleMoveBottomLine(void)
void SetITVResize(QRect Rect)
void MoveResize(void)
performs all the calculations for video framing and any resizing.
QRegion GetBoundingRegion(void) const
Return the region of DisplayVisibleRect that lies outside of DisplayVideoRect.
void Zoom(ZoomDirection Direction)
Sets up zooming into to different parts of the video.
QRect m_itvDisplayVideoRect
void SetVideoAspectRatio(float Aspect)
Sets MythVideoBounds::video_aspect to aspect, and sets MythVideoBounds::overriden_video_aspect if asp...
void ScreenChanged(QScreen *screen)
static const float kManualZoomMinHorizontalZoom
bool InitBounds(QSize VideoDim, QSize VideoDispDim, float Aspect, QRect WindowRect)
void SetVideoScalingAllowed(bool Change)
Disable or enable underscan/overscan.
QPoint m_manualMove
Manually applied percentage move.
QSize m_videoDim
Pixel dimensions of video buffer.
void Rotate(void)
Adjust various settings to facilitate portrait mode calculations.
void ApplyManualScaleAndMove(void)
Apply scales and moves from "Zoom Mode" settings.
void WindowRectChanged(const QRect &WindowRect)
QRect m_embeddingRect
Embedded video rectangle.
QRect GetWindowRect(void) const
QRect GetRawWindowRect(void) const
bool m_dbUseGUISize
Use the gui size for video window.
QRect m_videoRect
Pixel rectangle in video frame to display.
bool VideoIsFullScreen(void) const
Check whether the video display rect covers the entire window/framebuffer.
void VideoBoundsStateChanged(MythVideoBoundsState VideoState)
QSize GetVideoDim(void) const
StereoscopicMode m_stereoOverride
QPoint m_dbMove
Percentage move from database.
float m_manualVertScale
Manually applied vertical scaling.
QSize m_videoDispDim
Pixel dimensions of video display area.
float GetVideoAspect(void) const
float m_displayAspect
Physical aspect ratio of playback window.
void SetWindowSize(QSize Size)
StereoscopicMode GetStereoOverride() const