ui: restore brightness adjustment of a video on intensity change - #1894
Open
jpue wants to merge 1 commit into
Open
ui: restore brightness adjustment of a video on intensity change#1894jpue wants to merge 1 commit into
jpue wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was inspired by https://www.qlcplus.org/forum/viewtopic.php?t=18545 and a previous discussion on this topic can be found at #1888. This PR also fixes the casting issue mentioned over there (see changes to
VideoWidget::slotBrightnessVolumeAdjustin this PR)Describe the bug / To Reproduce
Videofunction. The selected video does not matter as long as it can be played by QLC+.Virtual Console, add a frame and, within it, a button linked to theVideofunction and a slider in submaster mode.Operatemode and start the video by clicking the button.Expected behaviour
The video should fade out according to the value of the slider (
255= full brightness/no changes,0= completely black/no video visible).Problem Analysis
The simple video brightness adjustment from Qt5, which was used by QLC+, has been removed in Qt6. Therefore, it was no longer possible to fade videos in v4.
Proposed Solutions
The
QVideoWidgetclass has been replaced by a more flexibleQGraphicsView, to which aQGraphicsScenecan be added. With the help of thisQGraphicsScene, which can consist of multiple items (layers), the idea of v5 to use a black overlay with variable opacity can be implemented.The most challenging part is to scale all objects correctly (or rather, maintain the scaling) since video functions must be able to operate in two modes, “window” and “fullscreen”. These can be switch at program (!) runtime – not while the function is running, but without reinitialising the
QGraphics*objects.This has been tested on an Ubuntu system with Qt 6.9.2, but it should better be tested on Windows and macOS systems as well because these graphical topics are probably very platform-dependant.