I am playing video using the Qgrpahicsscene, QgraphicsView, qvideowidget
videoWidget = new QVideoWidget;
QGraphicsScene *scene = new QGraphicsScene;
QGraphicsView *graphicsView = new QGraphicsView(scene);
scene->addWidget(videoWidget);
the video playing correctly, what i need is when i adjust brightness in videowidget it is not reflecting and i have checked the videowidget brightness level it is setting. please share some ideas, thanks in advance
Update the scene after the change of brightness. Like this:
videoWidget->setBrightness(bright);
scene->update(scene->sceneRect());
You can achieve pretty much all kinds of effects and corrections with the use of shaders, brightness in particular is a very simple fragment shader, just multiply each pixel's luminosity by a real multiplier. With QML you even have the ready to use shader effects as well as the QML video effects example.
Brightness/Contrast
All ready to use effects
QML video effects example
You could use shaders even with widgets if you go for a QGLWidget
base widget and still get the great performance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With