summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools
Commit message (Collapse)AuthorAgeFilesLines
* And finally kill QMediaServiceLars Knoll2021-02-172-2/+0
| | | | | | | | | This removes the past piece of the old service architecture from Qt Multimedia. Change-Id: I607f82a546b2a2e29024b987fed3ba6e3645ae48 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Kill QMediaSource and QMediaSinkLars Knoll2021-02-172-8/+0
| | | | | | | | Those aren't used anymore, get rid of them. Change-Id: I5a17f18a3c87c2c13a9009b1f99ef9e708f7636a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QML VideoOutput elementLars Knoll2021-02-179-612/+82
| | | | | | | | | | Requires a bit of plumming to get this to work. This is currently not ideal, and will require some further work. Change-Id: I5126e8ac0ba1db383d4694c3ab80b67a395a5464 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup QCameraInfoLars Knoll2021-01-291-15/+2
| | | | | | | | | | | | | | | | | | | Various API changes to QCameraInfo: * Remove the camera orientation from our API This is an implementation detail that should never be exposed to the user. For fixed cameras it's uninteresting and for mobile cameras, we can use the physical orientation of the device to create a stream that is oriented the correct way. * Add a QVideoFormat class describing a video format * Add a QList<QVideoFormat> videoFormats() * Add a QList<QSize> photoResolutions() * Implement the API for gstreamer and macOS. Change-Id: I9ffd9caeb6d07a6f267608a6bd794d99699fffbb Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QMediaObject to QMediaSourceLars Knoll2021-01-222-29/+29
| | | | | | | | That actually describes what those classes are. Change-Id: I9ce01707bb260ff6452359e211f2c22b5740e61b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaControlLars Knoll2021-01-212-2/+2
| | | | | | | | | | The class was serving no purpose that QObject doesn't offer, so remove that layer and use QObject as the base class for those controls. Change-Id: Icd434fabe88cbdba5fa54eafe6ba97ac08be61f3 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Coding style cleanupsLars Knoll2021-01-212-5/+5
| | | | | | | | Do some coding style fixes proposed by clang-tidy. Change-Id: I62584767fd7af2f98ac02653c1105d64188f5554 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Modernize code baseLars Knoll2021-01-217-30/+30
| | | | | | | | | Run clang-tidy over the code base with some code modernization options. Change-Id: I9e74d1225bce333e74224e3b92c02c7e9884d8f5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Cleanup the QMediaPluginLoaderLars Knoll2021-01-211-4/+4
| | | | | | | | We expect only one plugin per service type, later on this will get reduced to one plugin per platform. Change-Id: I01383427efa7021f4c33299c551108982a8bc67a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Initial Cmake port for qtmultimediaDoris Verria2021-01-201-0/+47
| | | | | | Fixes: QTBUG-89540 Change-Id: I2cf8d0edae2769a53cadd667ab5ac4f9cb754a50 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compilationLars Knoll2021-01-202-5/+5
| | | | | | | | Adjust to changes in QQmlListProperty Change-Id: I2cc4c82a39a41dbda864e88bf08894a4d61ce993 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Quick: Introduce multiple textures for NV12/NV21 video framesVaL Doroshchuk2020-09-091-1/+23
| | | | | | | | | | | | | | | | | | | For QVideoFrame::Format_NV12 and Format_NV21 formats added a possibility to provide the video frames in QAbstractVideoBuffer::GLTextureHandle, MTLTextureHandle multiple textures. Currently QVideoFrame::handle() is used to have only one texture. Which limits the video frames only for RGBA format. NV12/NV21 requires 2 textures, one for chroma and for luma components. So QVideoFrane::handle() must return a list with 2 native handlers. The patch allows to render the video frames in NV12/NV21 formats with multiple textures, using current QSGTexture's to avoid uploading/downloading the data. Change-Id: I3e6e734948a43dc77bfd2dcacb69cf8ffefdb813 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Quick: Always create sg textures in ctor()VaL Doroshchuk2020-08-303-12/+6
| | | | | | | Since compare() can be called before updateUniformData() Change-Id: I7a1e0a08926cbf6d5629468b8bf64dcd7602b399 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Quick: Update qsb binsVaL Doroshchuk2020-08-259-0/+0
| | | | | | | Regenerated all files to be up-to-date Change-Id: Idc1ef58659500bc3f56b41dab92f5600d0e3e46c Reviewed-by: Val Doroshchuk <valentyn.doroshchuk@qt.io>
* Quick: Copy texture data when updatingVaL Doroshchuk2020-08-032-8/+7
| | | | | | | When the video frame is unmapped, the data might be invalid Change-Id: I0f5db581995ceb0a52ccd69a81a8f04690f3ebfc Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaVaL Doroshchuk2020-06-305-14/+3
| | | | | Change-Id: I463d3a1541cee1fcf4a6b6d1e2e1eac85fbfc682 Reviewed-by: Val Doroshchuk <valentyn.doroshchuk@qt.io>
* IMX: Prepare vivante plugin for RHIVaL Doroshchuk2020-06-301-1/+2
| | | | | | Task-number: QTBUG-78678 Change-Id: I61a62b71f5731949a7e1094efc854bd3d7d1aa6a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Quick: Fix padded video frame when bytes per line > widthVaL Doroshchuk2020-06-151-7/+7
| | | | | Change-Id: I625bb06f81ce9860d49d7998cc49c304f2d6b848 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Quick: Allow to build with -no-openglVaL Doroshchuk2020-06-104-7/+33
| | | | | Change-Id: I927998b9ffa80a324636855c5dcc92cb57e9d520 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Introduce QAbstractVideoBuffer::MTLTextureHandleVal Doroshchuk2020-06-104-7/+6
| | | | | | | | | | | | | | | | Added MTLTextureHandle to render metal textures. Is used by default if rhi is enabled for metal backend. Also fixed the frame renderer to create new opengl context and use provided one from the video surface as a share context. To remember, when the quick item is created and updatePaintNode is called, current gl context is set to the video surface as a property. When the frame renderer is ready, it extracts the gl context and uses it as a share one. Task-number: QTBUG-78678 Change-Id: I51ce666ca7c2adc10dd2c1d1dfed99cc9f596e2b Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Follow QRhi create-destroy API updateLaszlo Agocs2020-06-041-2/+2
| | | | | | | 5697799 in qtbase changes build() to create(). Follow these changes. Change-Id: Icad272f8d3280c15ac4d8a635af90b4bf1fd1437 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* RHI: Remove gl code from video nodesVaL Doroshchuk2020-06-0447-1051/+79
| | | | | | | | Now QSGMaterialShader handles rhi textures too. Task-number: QTBUG-78678 Change-Id: I410185c80bd104741fd5b52deeb87eb97531410a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Quick: Add support of RHI for video framesVaL Doroshchuk2020-05-2926-4/+899
| | | | | | | | Added RHI shaders for RGB*, YUV* and opengl texture video frames. Task-number: QTBUG-78678 Change-Id: I045d6a806fea059a80b8e5d9817b6997af8d0f41 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Adapt to geometryChanged => geometryChange renamingMitch Curtis2020-05-292-3/+3
| | | | | | Task-number: QTBUG-82994 Change-Id: I19cd9ce965352c06adc5466a86cd3f32c00a4cd3 Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
* Update qtbase dependencyFriedemann Kleint2020-03-255-4/+6
| | | | | | | | | - 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>
* Doc: Fix link to the VideoOutput.source propertyTopi Reinio2020-03-031-1/+2
| | | | | Change-Id: If033ba6dbd0653a3a7c3ad882047a8e71f1b24e8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make video surfaces constantVaL Doroshchuk2020-01-302-16/+6
| | | | | | | | | | | | | 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-052-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-251-2/+2
| | | | | | | It is being deprecated. Change-Id: I26b871fe9b989972ab1d2c18de344dc9c9275e9f Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-202-12/+18
|\ | | | | | | Change-Id: Ib250ceecd02291f752b7775f329f0f494c4aed38
| * Doc: Fix documentation warningsTopi Reinio2019-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark member functions of \internal classes also as \internal, as otherwise QDoc fails to match function documentation with the declaration in the header. Comment out one instance of \instantiates referring to an internal class. Fixes: QTBUG-79834 Change-Id: I056c060537ee60beca128166ae3903ae3289a413 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta3Qt Forward Merge Bot2019-11-052-11/+17
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I255dc22dc21d3629a41a8c2ae2076c48b594e626
| | * Build without OpenGL supportAndy Shaw2019-10-242-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is support for rendering video without OpenGL on most platforms although some features are unavailable as a result, so we can make sure that what is available can be used. Change-Id: I63938e8e4e8063fcc2064d0f9d8d5f10e0fb06f9 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Introduce QVideoFrame::image()VaL Doroshchuk2019-10-311-2/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Since QVideoFrame::pixelFormat's do not 100% match QImage::Format's, introducing converstion function. Returns an image based on current frame. Converts data if needed to supported QImage format. Change-Id: I3331578c01cf9c999a380efc4a83bf9eddb07901 (cherry picked from commit 93f966335e1ed8ed47b7e8b32452d43c2f8a7bb1) Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Remove Format_ABGR32 from supported formats for sq texture video nodeVaL Doroshchuk2019-10-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Format_ABGR32 was introduced together with gst opengl support. And is supposed to be used with QT_GSTREAMER_USE_OPENGL_PLUGIN=1, Which should be fine for Raspberry Pi, but suddenly does not work for iMX boards. RPI's omxh264dec provides buffers in RGBA format, and corresponding textures will be created using GL_RGBA. Since we return Format_ABGR32 as supported format, which is RGBA, no conversion is needed and everything was ok. But for iMX, imxvpudec provides buffers in I420 format. And textures will be created using GL_RED with only 1 plane. Following patch https://bugzilla.gnome.org/show_bug.cgi?id=779067 requests RGBA too. Since incaps contains I420 and RGBA, and we say that we support RGBA, this leads to use buffers in I420 but *passthrough* in gst_gl_color_convert_element_prepare_output_buffer(). Since incaps and outcaps contain the same video format. No conversion will be done there and textures will be rendered incorrectly. Removing support of Format_ABGR32 from texture video node will cause to ignore requested RGBA from DIRECTVIV and perform converting, I420->BGRx on iMX and RGBA->BGRA on RPI. QT_GSTREAMER_USE_OPENGL_PLUGIN should be used together with decoders that use gpu memory. Otherwise some converting/uploading operations will be done which will also introduce some performance issues, so not recommended to be used for iMX. Change-Id: I8f037316c40587c81b2116c43a7262c6a70a5b44 Fixes: QTBUG-78855 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-081-2/+1
|\| | | | | | | | | | | | | Conflicts: src/multimedia/configure.json Change-Id: Ie887a5f4d718cb3e082b0e2ee996c6687af330cb
| * Fix leaking QVideoFilterRunnable when window is closedVal Doroshchuk2019-10-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When QDeclarativeVideoOutput::releaseResources() is called, means the window is going to be destroyed and it is too late to use scheduleRenderJob() to clear filters. This beforeSynchronizingJobs will not be handled in this case. Which produces a leak of filter's runnable. Fixes: QTBUG-51588 Change-Id: I71ec351463a2c4136d8b7e241d61e628a1b0c64b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-121-2/+2
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * Fix crash when VideoOutput.sourceRect is requested but playback is stoppedVaL Doroshchuk2019-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the playback is stopped, QAbstractVideoSurface::stop is called where current surface format is reset. And when sourceRect is requested before QAbstractVideoSurface::surfaceFormatChanged() is handled, it produces an ASSERT. Suggesting to use cached surfaceFormat instead of removing the ASSERT. To reproduce: MediaPlayer { onStatusChanged: console.log(output.sourceRect) } Change-Id: I73ad72f1e4968fe45266827ec5c7e3b36333ee30 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-301-2/+7
|\| | | | | | | Change-Id: I329eeefafed87ff7467d21d5d099cf9897660167
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-231-2/+7
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowplayerservice.cpp Change-Id: I482098bb3c3b5b291175ca798b0d6ba61ad87d86
| | * VideoOutput: Update geometry only when the surface is activeVal Doroshchuk2019-07-181-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since starting the surface could be done after updating the geometry of VideoOutput element (paint event is received), and this leads setting invalid geometry to renderer and never updates by correct one. Because the geometry is not "dirty" anymore, means already set. Need just to update geometry when (or keep trying before) the surface is already started with proper video surface format. Change-Id: I338d7fe355c20f2027c6231241714376e9b569b2 Fixes: QTBUG-76205 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Gstreamer: Introduce support of OpenGL pluginVaL Doroshchuk2019-05-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since uploading to gl texture is quite performance-wise operation introduced integration of opengl plugin which can provide a way to avoid uploading to texture on each draw on qt's side. Which potentially fixes some performance issues especially on embedded devices. Added glupload and glcolorconvert gst elements to pipeline. For qml apps current opengl context is provided to the gst plugin to share opengl data with. It allows at the end to just use gl textures that created and filled inside the gst. For overlay apps, glimagesink element is added. Requires gstreamer-gl-1.0 to be installed. Since this plugin is almost always available, so enabling it by default will break behavior of current pipeline and might introduce some side effects. Thus also provided QT_GSTREAMER_USE_OPENGL_PLUGIN env var to explicitly enable OpenGL features from gst. After this change video frames will be texture based. But it is still possible to map frames to download their data. In case if the video surface does not support gl textures, glmemory will be anyway requested, which will lead to uploading data, downloading and uploading it again to textures in scene graph video node. Task-number: QTBUG-66162 Change-Id: I32044ba0bf0c0cf90434d72f8991ad00927e1380 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Add YUV422P format support to QVideoFrame and declarative rendererTomasz Olszak2019-05-101-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog] Added QVideoFrame::Format_YUV422P. Change-Id: If7741db00cf0b628d7fc4b1cd3a6e424e0f8e2c0 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | QtMultimediaQuick: Move headers from multimedia dirVaL Doroshchuk2019-05-095-5/+512
|/ / | | | | | | | | | | | | Headers of multimedia quick module should not be placed in separate dir. Change-Id: Ie1f9df8339847ffbac8f22ac16ab0e613c46d037 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Doc: Fix multiple documentation issuesv5.13.0-beta3Topi Reinio2019-04-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - GstTools has some (internal) documentation, but was causing a number of warnings with QDoc's clang parser - exclude it from the documentation build. - Remove direct links from example documentation to individual example files; they no longer work. - Fix navigation for QML types; The main QML types pages did not list types for QtAudioEngiine. - Use \QtMinorVersion macro to make the documented import versions follow the minor Qt version. - Fix \since usage to be consistent throughout. - Fix linking issues for QML properties/methods - Minor language fixes Change-Id: I735cd13fa6dedd6bf06d6b6ef50ce2e0d69a545b Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Add a revision of QML VideoOutput flushMode property to 5.13VaL Doroshchuk2019-02-251-0/+1
| | | | | | | | | | Change-Id: Ie7982232af45fd09a46854c96d7c7d6672857a97 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-025-5/+9
|\| | | | | | | Change-Id: Ia13d887c3e3bf00b6ded5d052384fc5689b816fe
| * Fix comment for YUV fragment shadersSamuel Gaist2019-01-295-5/+9
| | | | | | | | | | | | | | | | | | The comment contains information which makes it misleading to understand how the components are passed. Change-Id: I29cdb5eec1e8014fa7f0ca3f1a0f54258fdb431f Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com> Reviewed-by: Christian Strømme <christian.stromme@qt.io>