Navigation Menu

Skip to content

Commit

Permalink
MythVideoOutput: Move stereo tracking into MythVideoBounds
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Sep 17, 2020
1 parent 88add49 commit 8b92bbe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
10 changes: 10 additions & 0 deletions mythtv/libs/libmythtv/mythvideobounds.cpp
Expand Up @@ -1065,3 +1065,13 @@ static float snap(float value, float snapto, float diff)
return snapto;
return value;
}

void MythVideoBounds::SetStereoscopicMode(StereoscopicMode Mode)
{
m_stereo = Mode;
}

StereoscopicMode MythVideoBounds::GetStereoscopicMode() const
{
return m_stereo;
}
3 changes: 3 additions & 0 deletions mythtv/libs/libmythtv/mythvideobounds.h
Expand Up @@ -63,6 +63,7 @@ class MythVideoBounds : public QObject
void SetWindowSize (QSize Size);
void SetITVResize (QRect Rect);
void SetRotation (int Rotation);
void SetStereoscopicMode (StereoscopicMode Mode);

public:
// Gets
Expand Down Expand Up @@ -95,6 +96,7 @@ class MythVideoBounds : public QObject
bool DoPixelAdjustment = true) const;
bool VideoIsFullScreen(void) const;
QRegion GetBoundingRegion(void) const;
StereoscopicMode GetStereoscopicMode() const;

private:
void PopulateGeometry (void);
Expand Down Expand Up @@ -142,6 +144,7 @@ class MythVideoBounds : public QObject
/// Zoom mode
AdjustFillMode m_adjustFill {kAdjustFill_Off};
int m_rotation {0};
StereoscopicMode m_stereo { kStereoscopicModeNone };

/// Pixel rectangle in video frame to display
QRect m_videoRect {0,0,0,0};
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythtv/mythvideoout.h
Expand Up @@ -117,8 +117,6 @@ class MythVideoOutput : public MythVideoBounds
virtual QStringList GetVisualiserList () { return QStringList {}; }
virtual void DestroyVisualisation() { }
virtual bool StereoscopicModesAllowed() const { return false; }
virtual void SetStereoscopicMode (StereoscopicMode /*Mode*/) { }
virtual StereoscopicMode GetStereoscopicMode() const { return kStereoscopicModeNone; }

protected:
virtual void ShowPIPs (const PIPMap& /*PiPPlayers*/) { }
Expand Down
12 changes: 1 addition & 11 deletions mythtv/libs/libmythtv/mythvideooutgpu.cpp
Expand Up @@ -453,7 +453,7 @@ void MythVideoOutputGPU::RenderFrame(VideoFrame *Frame, FrameScanType Scan, OSD
// Video
// N.B. dummy streams need the viewport updated in case we have resized the window (i.e. LiveTV)
if (m_video && !dummy)
m_video->RenderFrame(Frame, topfieldfirst, Scan, m_stereo);
m_video->RenderFrame(Frame, topfieldfirst, Scan, GetStereoscopicMode());
else if (dummy)
m_render->SetViewPort(GetWindowRect());

Expand Down Expand Up @@ -553,16 +553,6 @@ bool MythVideoOutputGPU::StereoscopicModesAllowed() const
return true;
}

void MythVideoOutputGPU::SetStereoscopicMode(StereoscopicMode Mode)
{
m_stereo = Mode;
}

StereoscopicMode MythVideoOutputGPU::GetStereoscopicMode() const
{
return m_stereo;
}

QStringList MythVideoOutputGPU::GetVisualiserList()
{
if (m_render)
Expand Down
3 changes: 0 additions & 3 deletions mythtv/libs/libmythtv/mythvideooutgpu.h
Expand Up @@ -38,8 +38,6 @@ class MythVideoOutputGPU : public MythVideoOutput
QStringList GetVisualiserList () override;
void DestroyVisualisation () override;
bool StereoscopicModesAllowed() const override;
void SetStereoscopicMode (StereoscopicMode Mode) override;
StereoscopicMode GetStereoscopicMode () const override;

protected:
virtual MythVideoGPU* CreateSecondaryVideo(const QSize& VideoDim,
Expand Down Expand Up @@ -68,7 +66,6 @@ class MythVideoOutputGPU : public MythVideoOutput
bool m_buffersCreated { false };
QString m_profile;
VideoVisual* m_visual { nullptr };
StereoscopicMode m_stereo { kStereoscopicModeNone };

QMap<MythPlayer*,MythVideoGPU*> m_pxpVideos;
QMap<MythPlayer*,bool> m_pxpVideosReady;
Expand Down

0 comments on commit 8b92bbe

Please sign in to comment.