New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VideoPlayer] SetResolution synchronously instead RM::TriggerResolution #14755
Conversation
m_renderManager.TriggerUpdateResolution(static_cast<float>(framerate), hint.width, hint.stereo_mode); | ||
RESOLUTION res = CResolutionUtils::ChooseBestResolution(static_cast<float>(framerate), hint.width, hint.height, !hint.stereo_mode.empty()); | ||
CServiceBroker::GetWinSystem()->GetGfxContext().SetVideoResolution(res, false); | ||
//RenderManager::UpdateLatencyTweak() should be called automatically as soon GUIFullScreenWindow is ready |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -128,7 +129,6 @@ class CRenderManager | |||
void DeleteRenderer(); | |||
void ManageCaptures(); | |||
|
|||
void UpdateLatencyTweak(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@FernetMenta PR updated. |
@@ -141,6 +141,7 @@ bool CRenderManager::Configure(const VideoPicture& picture, float fps, unsigned | |||
m_dvdClock.SetVsyncAdjust(0); | |||
m_pConfigPicture.reset(new VideoPicture()); | |||
m_pConfigPicture->CopyRef(picture); | |||
UpdateLatencyTweak(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
jenkins build this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
For the record:
Some may think that asynchronous startup of players has zero advantage. Actually it makes behaviour like this possible because main/render thread is free for tasks like this.
This PR introduced playback issues on Raspberry Pi. If during a live TV playback I try to play a file - I get a spinning circle and playback does not start. This does not happen with all videos, mostly with .ts and .m2ts. Debug log - https://paste.kodi.tv/epixewujah.kodi |
Description
Process initial resolution change (if requested in settings / from stream) synchronously on VideoPlayer startup instead using the asynchronous RenderManager::TriggerUpdateResolution.
Motivation and Context
If user has enabled "Adjust display refresh rate" and whitelist includes a resolution matching to the stream to play, we switch resolution / refresh rate on supported devices.
The current async workflow can lead to rough video startup.
This PR processes the ResolutionChange (for fullscreen video playback) before VP initializes the underlying processes. Video playback with resolution change starts with getting screen black and smooth playback afterwards.
Please note, that handling of resolution changes during playback is not changed, its still async.
How Has This Been Tested?
Types of change