summaryrefslogtreecommitdiffstats
path: root/src/multimediawidgets
Commit message (Collapse)AuthorAgeFilesLines
* Map QVideoFrame::Format_Y8=>QImage::Format_Grayscale8 in QVideoFrameVaL Doroshchuk2020-06-021-1/+2
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-52455 Change-Id: I30582582935ae0a2c5094db995cba83b62adc767 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Remove ANGLEVaL Doroshchuk2020-05-281-4/+2
| | | | | | | Since it is already removed from qtbase Change-Id: If3a8169705b57d2e39167e2f718524cf3fe8bb1e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove deprecated gl funcsVaL Doroshchuk2020-05-281-6/+7
| | | | | | | glTexCoordPointer, glVertexPointer, glEnableClientState, glDisableClientState Change-Id: I9970a64131e9372b7db48895912b9f481e34bf1a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update qtbase dependencyFriedemann Kleint2020-03-251-1/+1
| | | | | | | | | - Adapt to QOpenGLWidgets split - Use new Q_MOC_INCLUDE directive where required - Fix QtConcurrent usage Change-Id: I9de650ae4fbbd397ef4fd4650c8aa5a0443d566f Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-221-1/+2
|\ | | | | | | Change-Id: I04934575bd661b80b1f012a7e825dcd753d26908
| * Fix false pulse audio dependency of libQt5MultimediaWidgetsJoerg Bornemann2020-02-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | The assignment 'QT += multimedia-private' exports multimedia-private's pulse audio dependencies. Fix this by using 'multimedia' as public dependency and 'multimedia-private' as private dependency. Fixes: QTBUG-62626 Change-Id: I156b705706567d9cde1dd0f44c75acb36938384d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* | Remove usage of QGL* APIsVaL Doroshchuk2020-02-185-75/+37
| | | | | | | | | | | | | | | | | | QOpenGL API should be used instead. Task-number: QTBUG-74409 Fixes: QTBUG-81902 Change-Id: I80d09cba79248451cf211eabd87651301ae18b63 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Make video surfaces constantVaL Doroshchuk2020-01-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Video surface property for QVideoWidget, QGprahicsVideoItem and QDeclarativeVideoOutput should be CONSTANT and kept the same value while the object is alive. Note, currently this property can be suddenly changed, when videoSurface is mixed/used together with source property. To keep the patch simple, this will be fixed in next commits. Change-Id: I80046524a70bcb70bb45e7f1bbae74bff1b3b0f2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Expose video surfaces in rendering componentsVaL Doroshchuk2020-01-056-25/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Currently QVideoWidget, QGraphicsVideoItem and QML Video Output tightly depend on QMediaPlayer, QMediaService etc. Since QMediaService is deprecated and will be removed from Qt6, its usage must be removed from rendering components. * Also it is a part of a task to make all components independent, e.g. without dependencies to another components, like the media player, or video producer. These video consumer components should be reusable without QMediaPlayer too, which today is not possible, and should have responsibility for a single part of the functionality. * It is a part of a task to allow users to decide how to render video, using either video surface or native windows. Introducing QVideoWidget::videoSurface() QGraphicsVideoItem::videoSurface() QDeclarativeVideoOutput::videoSurface() that create a surface, if necessary, and returns the underlying video surface which provides a possibility to render video frames without knowledge of any services and controls. Can be used like: QMediaPlayer->setVideoOutput(QVideoWidget->videoSurface()); or QMediaPlayer->setVideoOutput(QGraphicsVideoItem->videoSurface()); This allows QMediaPlayer to get video frames from a backend, without using QVideoWidget/QGraphicsVideoItem, and to present these frames to provided surface. Moreover, now it is possible to render video frames without QMediaPlayer: QVideoSurfaceFormat format(img.size(), QVideoFrame::Format_ARGB32); videoWidget->videoSurface()->start(format); videoWidget->videoSurface()->present(img); [ChangeLog] Introduced videoSurface property to QVideoWidget, QGraphicsVideoItem and QDeclarativeVideoOutput. Task-number: QTBUG-80431 Change-Id: I49641750537160832e29c297279e72b8288e974c Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-252-34/+15
|/ | | | | | | It is being deprecated. Change-Id: I26b871fe9b989972ab1d2c18de344dc9c9275e9f Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-081-0/+9
|\ | | | | | | | | | | | | Conflicts: src/multimedia/configure.json Change-Id: Ie887a5f4d718cb3e082b0e2ee996c6687af330cb
| * Override QGraphicsItem::type in QGraphicsVideoItemVal Doroshchuk2019-10-021-0/+9
| | | | | | | | | | | | Fixes: QTBUG-45064 Change-Id: I6b4a7a4b92affe80fc288e08d514092ac3d6899a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-124-6/+6
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * Include moc files after QT_END_NAMESPACEVal Doroshchuk2019-09-094-6/+6
| | | | | | | | | | | | Fixes: QTBUG-76574 Change-Id: I69ef47bbd01967c3d7a0c5d1554fcdd29619ebfa Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-171-1/+1
|\| | | | | | | Change-Id: I09f511d894db5e9987ac2b9e42266bb87ef0161d
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-131-1/+1
| |\ | | | | | | | | | Change-Id: I428528333e89214d96acef5c2ba8ea832b2b145f
| | * Fix undefined reference to QVideoSurfacePainter::~QVideoSurfacePainterVaL Doroshchuk2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Change-Id: I8b6b0f9b278ebb4b3eff0caaedab62cebfe9a695 Fixes: QTBUG-77097 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Remove usages of deprecated APIsSona Kurazyan2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace the usages of deprecated APIs by corresponding alternatives. - Made the tests for deprecated APIs to compile conditionally, based on the deprecation version. Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: Ifd397dae9b3ebc2ba2504db7baa2d8ff21bfb3a7 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-111-4/+4
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I2f2a9371dd1085c10450f23e56c9f18078cc8698
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-271-4/+4
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ieed5727ca602712ac008a876333e36ebb3dcba30
| | * Fix compile issue when no opengl in QVideoSurfacePainterVal Doroshchuk2019-06-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | error: invalid use of incomplete type 'class QGLContext' Change-Id: I4bc9bd4231e663b187d3cef917b7a551ba614ba9 Fixes: QTBUG-76405 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-031-8/+17
|\| | | | | | | | | | | Change-Id: Id1638836ea3faf16c4ba39119029522b2afbe803
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-031-8/+17
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowplayerservice.cpp Change-Id: I6b7edc312ecfadf84653ce24321ec55da41e131a
| | * Use QOpenGLContext::makeCurrent if QGLContext::makeCurrent failedVaL Doroshchuk2019-05-141-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QPainterVideoSurface::setGLContext(QGLContext::currentContext()) is used and no valid paint device has been provided to QGLContext, it fails to make the context current. Thus there might be no available current context which might also produce crashes. QGLContext::currentContext() creates QGLContext based on current QOpenGLContext instance, and no paint device is available in QGLContext::device() in this case. Currently QVideoWidget and QGraphicsVideoItem are effected. It is relevant when a renderer calls currentContext->doneCurrent() before using the QPainterVideoSurface. After this there is no any current context which could cause a crash, e.g. within compiling the shaders. Task-number: QTBUG-74277 Change-Id: Ia28f4f6843a82a897399fd1ce2463e3b087b6437 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-181-5/+9
|\| | | | | | | | | | | Change-Id: I82d63ba32a0c9f8b883d00ef1bd68df3a10da96c
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-141-5/+9
| |\| | | | | | | | | | Change-Id: I03225f5e980a69246b046351f7d7d8e84f102ca0
| | * QGraphicsVideoItem: Always use generic painter when no gl paint engineVaL Doroshchuk2019-05-131-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If eglfs is used, then there is valid current gl context and it has OpenGL shader programs (QGLShaderProgram::hasOpenGLShaderPrograms). This gl context makes QPainterVideoSurface to use QVideoSurfaceGlslPainter instead of QVideoSurfaceGenericPainter. QOpenGLCompositorBackingStore uses QImage as a QPaintDevice. In this case QPainter::beginNativePainting does nothing because of QRasterPaintEngine. Since QVideoSurfaceGlslPainter is supposed to work with a gl paint engine and not with a raster one, this prevents rendering any video content. To work this around, view->setViewport(new QOpenGLWidget) could be used, where QOpenGL2PaintEngineEx will be taken into account. If platform was not eglfs, QGLContext::currentContext() could be unavailable which made QPainterVideoSurface to use QVideoSurfaceGenericPainter and the video was rendered correctly. QVideoSurfaceGenericPainter should be used when the paint engine is not gl based. Task-number: QTBUG-57836 Change-Id: Id4839facddb2494ec5abf729ea80068eb5e2af1d Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Fix type of the out parameter "result" of the native event filtersFriedemann Kleint2019-03-252-0/+8
|/ / | | | | | | | | | | | | | | Task-number: QTBUG-72968 Change-Id: I31da3bd3e8a775243b94e02e3659e2d00e46b9b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-161-0/+4
|\| | | | | | | Change-Id: I947a3b4aaf39e56b9505ae802b8b31c718922639
| * Fix static build on WindowsKai Koehne2019-02-111-0/+4
| | | | | | | | | | | | Fixes: QTBUG-73464 Change-Id: I5d1052dec14bbe6ee69b348352991d14d63b9c76 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Fix warnings about deprecated QPalette enumerations and functionsFriedemann Kleint2019-01-141-1/+1
|/ | | | | | | | | | videowidget.cpp:625:32: warning: 'Background' is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] qgstreamervideowidget.cpp:56:36: warning: 'Background' is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] qgstreamervideowidget.cpp:56:36: warning: 'Background' is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] qgstreamervideowidget.cpp:83:55: warning: 'const QBrush& QPalette::background() const' is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] Change-Id: Ieb55a57c5672d3023a48461ec347fbb30210fd1e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Windows: Repaint QVideoWidget when WM_PAINT or WM_ERASEBKGND receivedVal Doroshchuk2018-11-292-0/+21
| | | | | | | | | | | | | | | | Since updates are disabled, and no paint events will be sent to QVideoWidget, need to somehow repaint the video window. When BeginPaint is called outside of the expose event, the window might not be refreshed. So moved calling the repainting within the expose event. Also added repainting when the display rect is changed to immediate refreshing. Task-number: QTBUG-71326 Change-Id: I7c29b3f8ad35e33590c7b138a5141546ce3c1a42 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* GraphicsVideoItem: Interpret ARGB32 as premultipliedVal Doroshchuk2018-10-051-4/+5
| | | | | | | | | | Do not convert ARG32 to premultiplied. Rather interpret it as premultiplied. Should be better even if SSE2 is disabled. Task-number: QTBUG-52114 Change-Id: Ic63f59dc8a940d6d73c618ef3a75b47a0950fff3 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Doc: Move the literal codeblocks to snippet filesVenugopal Shivashankar2018-06-213-6/+59
| | | | | Change-Id: Icd9dff16b807d0bc7143a3d41f9799432035fa54 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix target rectangle coordinates while painting image with QPainterVal Doroshchuk2018-03-221-2/+3
| | | | | | | | | | | | | QRectF::setX() may change the width. QRectF::setY() may change the height. If either width or height has been adjusted incorrect target rect is applied to draw an image which will cause some artefacts to be shown (like rectangle with a garbage) and incorrect size of actual content. Task-number: QTBUG-53594 Change-Id: Iee92aaf908952d7809e8ad62f8d1126b7ecac642 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* DirectShow: Fix blank QVideoWidget when it is pausedVal Doroshchuk2018-03-223-37/+5
| | | | | | | | | | | | | If playback is paused latest video frame is shown. If after that the window is deactivated (unfocused or hidden) the picture is cleared. And just empty area is shown. Provided following fixes: 1. Prevented clearing the painted video picture when the window is unfocused. 2. Repainted latest video frame again when the window gets back from hidden state to shown. Task-number: QTBUG-65780 Change-Id: I62b3c6e25133a7d08a5060a5ab9f6b35d927fbd4 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Allow to receive mouse move events in QVideoWidgetVaL Doroshchuk2018-03-211-1/+3
| | | | | | | | | | | | No move events are being received for QVideoWidget even with enabled Qt::WA_MouseTracking. All these events are ignored because video widget from QVideoWidgetControl always has disabled Qt::WA_MouseTracking. Proxied this mouse tracking property to video widget. Task-number: QTBUG-30728 Change-Id: Ic196042596906ce8b5674b62ea66f5e035ba3cfe Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Fix typosJarek Kobus2018-02-141-1/+1
| | | | | Change-Id: I05983bca18d41ca6440e5e0b04102a8ac8e42136 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-1/+1
|\ | | | | | | Change-Id: I397c78d33594f4b64d9718cd1b180fa0cee1e5bc
| * Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-021-1/+1
| |\ | | | | | | | | | Change-Id: I0564f22f9001d373ad03426dd6d9f584fbab7115
| | * Doc: Fix name of Multimedia Widgets moduleKai Koehne2018-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Drop spurious 'Quick' added in 7638848d2486e2. Change-Id: If11c55a2654ccea2ba674e0b8a4193f8d2b36610 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-0/+9
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm Change-Id: Ic43fb2a805ed9f0f2ea48993d47859716f1f11b4
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-181-0/+9
| |\| | | | | | | | | | Change-Id: I7566f543ce11ff6cddc4d17e2c258a582f365b65
| | * Document licensesKai Koehne2018-01-181-0/+9
| | | | | | | | | | | | | | | Change-Id: I827a8de356f42217a64191a467fa850e3eb6f4ef Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-061-2/+2
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5acdc7e0bd3729b80522dfff0f388cf2507fb111
| * | Fix rendering issue with QGraphicsView and QOpenGLWidget viewportVaL Doroshchuk2017-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since QOpenGLWidget always renders offscreen (uses QOffscreenSurface) the surface size is always (1, 1). Task-number: QTBUG-53099 Change-Id: I3803efba57e04c676eda85f0e29efa34f8d8d5e5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Port away from QRegion::rects()Marc Mutz2017-12-041-4/+2
| | | | | | | | | | | | | | | | | | | | | Use begin()/end() instead. Change-Id: Ifa17458190186b987533bd705717ddaec5fc94d4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-201-0/+4
|\| | | | | | | | | | | Change-Id: Icaf645e271b21320c4cb6269178d9e722092a263
| * | Convert ARGB32 to premultipliedVal Doroshchuk2017-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not render into ARGB32 images using QPainter. Using premultiplied version is significantly faster. Task-number: QTBUG-52114 Change-Id: Ia057788d5af0fb303a69310a7c7a197ec7f76516 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-272-6/+6
|\| | | | | | | | | | | Change-Id: Ib509a8c90dd6c7229510a400612cc27a4957d015