Skip to content

Commit

Permalink
changed: make IPlayer::GetVideoSettings const
Browse files Browse the repository at this point in the history
also have to adjust the IRenderMsg method.
the double vtable entry in VideoPlayer is rather funky
  • Loading branch information
notspiff committed Sep 5, 2022
1 parent 6157b01 commit 9b5cb8f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion xbmc/cores/IPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class IPlayer
}

// video and audio settings
virtual CVideoSettings GetVideoSettings() { return CVideoSettings(); }
virtual CVideoSettings GetVideoSettings() const { return CVideoSettings(); }
virtual void SetVideoSettings(CVideoSettings& settings) {}

/*!
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/VideoPlayer/VideoPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4876,7 +4876,7 @@ void CVideoPlayer::SetDynamicRangeCompression(long drc)
m_VideoPlayerAudio->SetDynamicRangeCompression(drc);
}

CVideoSettings CVideoPlayer::GetVideoSettings()
CVideoSettings CVideoPlayer::GetVideoSettings() const
{
return m_processInfo->GetVideoSettings();
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/VideoPlayer/VideoPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class CVideoPlayer : public IPlayer, public CThread, public IVideoPlayer,
int OnDiscNavResult(void* pData, int iMessage) override;
void GetVideoResolution(unsigned int &width, unsigned int &height) override;

CVideoSettings GetVideoSettings() override;
CVideoSettings GetVideoSettings() const override;
void SetVideoSettings(CVideoSettings& settings) override;

void SetUpdateStreamDetails();
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class IRenderMsg
virtual void UpdateRenderBuffers(int queued, int discard, int free) = 0;
virtual void UpdateGuiRender(bool gui) = 0;
virtual void UpdateVideoRender(bool video) = 0;
virtual CVideoSettings GetVideoSettings() = 0;
virtual CVideoSettings GetVideoSettings() const = 0;
};

class CRenderManager
Expand Down

0 comments on commit 9b5cb8f

Please sign in to comment.