summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename the library for Qt Quick to multimediaquickLars Knoll2021-04-161-714/+0
| | | | | | | | This fits better with our naming convention. Change-Id: I16a430019dfc9c5431009e1be413f635bd95435a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Rename videoPreview to videoOutputLars Knoll2021-04-161-1/+1
| | | | | | | | | | It's better to be consistent with QMediaPlayer. Also add the required QVariant based overloads, that we need for QML. Change-Id: I583bc795c029f35373546a6e673c575a7c20dfa1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Rename QVideoSurfaceFormat to QVideoFrameFormatLars Knoll2021-04-141-2/+2
| | | | | | | | | The class is used exclusively together with video frames to describe their format, so the name should reflect that. Change-Id: I10bec7a0556b22c69ac790a99282e1376ce4af97 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QAbstractVideoFilterLars Knoll2021-04-141-48/+0
| | | | | | | | | | | | | | The API covers a relatively rare use case, and is far from ideal, as it doesn't cooperate very well with HW accerlerated rendering. Since QVideoFrame and the QML VideoOutput item offer the option to get a texture for the frame, it's probably better to use that as the basis for further processing. Change-Id: I89deb915f660312fb3a83b066a5371f5454346da Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the shaders from the quick tools into QtMultimediaLars Knoll2021-04-071-6/+0
| | | | | | | | | | | | | The shader layout is pretty generic, and QVideoSurfaceFormat can give us both the shaders and uniform data that we need to render the video. All the user needs to do then is to provide geometry with a 2D texture coordinate to render the video onto any surface. Change-Id: I95006eaf4a6f039006b8a5da0f53143da03e1ecb Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QML video renderingLars Knoll2021-04-061-12/+11
| | | | | | | | | | | Use the new QVideoSink class to get the video frames. Fix some APIs, so that we correctly connect VideoOutput and MediaPlayer. Change-Id: I65a0d045988c46a917f70dfb922c1bbdb32f6511 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QVideoWindowControl to QPlatformVideoSinkLars Knoll2021-04-061-1/+1
| | | | | | | | | | | | | | | | This class can nicely serve as the basis class for the platform specific new video sink API. For now it will support windowed rendering and the non windowed mode will get folded into this class in follow-up commits. Clean up the QVideoWidget code and always use QVideoSink there to make the transition easier to handle. This implies that QVideoWidget will right now only work in windowed mode. Change-Id: I6db4509ceaa142001ffd59b60406aa98c71f5fc0 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QMediaCaptureSession the new central class for media capturingLars Knoll2021-03-161-7/+6
| | | | | | | | | | | You now need to instantiate a capture session and hook up camera, image capture and recording to it. This gives a cleaner architecture for the whole capturing process. Change-Id: I7c7f6c4a841512b038834f4653ef7ab790c43f8f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some cleanups in QVideoSurfaceFormatLars Knoll2021-03-161-1/+0
| | | | | | | | | | | Remove the pixel aspect ratio property. It's almost always 1/1 or something very close to it. Remove the pseudo property API. If we need to bind this to QML as a value type there are better ways to do it. Change-Id: I02f2170b0f1672529e298593a668eb418caed964 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QVideoRendererControlLars Knoll2021-03-021-2/+2
| | | | | | | | | | It's a pure implementation detail in the backends now (and can in cases even get removed there). No need for an interface. Change-Id: Ib61cebe80d0369424d4ee681992e4abc80c11a14 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Kill QMediaSource and QMediaSinkLars Knoll2021-02-171-7/+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-171-147/+19
| | | | | | | | | | 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-221-25/+25
| | | | | | | | 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>
* Coding style cleanupsLars Knoll2021-01-211-4/+4
| | | | | | | | 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-211-8/+8
| | | | | | | | | 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>
* Fix compilationLars Knoll2021-01-201-3/+3
| | | | | | | | 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: Allow to build with -no-openglVaL Doroshchuk2020-06-101-2/+1
| | | | | Change-Id: I927998b9ffa80a324636855c5dcc92cb57e9d520 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Adapt to geometryChanged => geometryChange renamingMitch Curtis2020-05-291-2/+2
| | | | | | Task-number: QTBUG-82994 Change-Id: I19cd9ce965352c06adc5466a86cd3f32c00a4cd3 Reviewed-by: Shawn Rutledge <shawn.rutledge@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-301-15/+5
| | | | | | | | | | | | | 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-051-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>
* Build without OpenGL supportAndy Shaw2019-10-241-1/+4
| | | | | | | | | 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>
* 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>
* | 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>
* | VideoOutput: Introduce flushMode propertyVaL Doroshchuk2018-11-061-0/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | Added flushMode property to QML VideoOutput element to define what should be shown when flush is requested. Takes affect only for QDeclarativeVideoRendererBackend and when QSGVideoItemSurface is already started. Flushing (passing empty video frame to the surface) is usually performed when EndOfMedia or playback is stopped. Which caused disappearing the content and blinking if playlist is used. Using this property now possible to define what frame (last, first or empty) should be shown when playback is stopped or finished. By default shows empty frame (clears the video output). To show a frame it requires to keep QVideoFrame and thus its data. Task-number: QTBUG-37301 Task-number: QTBUG-49446 Change-Id: I3be5309217b9f543da804e3b616dee9d97fba65f Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Set geometry for recreated video renderer backendVal Doroshchuk2018-05-081-7/+6
| | | | | | | | | | | If video renderer backend has been recreated, then it needs to update its geometry. Which previously didn't happen and as a result no content was shown. The geometry is now updated from within the video node. Task-number: QTBUG-54680 Change-Id: Iadbf324f4734c9ac6c487eaedd014629ca330599 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Updated license headersAntti Kokko2016-01-191-15/+21
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtMultimediaQuickTools: replace foreach with range-based forAnton Kudryavtsev2016-01-151-1/+2
| | | | | Change-Id: I729375c1de712f1fb7915c95ce9eb7dcd00fe757 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Doc: update qml module version to 5.5.Yoann Lopes2015-08-111-4/+0
| | | | | | | | | And remove import statements from snippets. Change-Id: I109beabd445186f96f0750b6f23fb623c125181e Task-number: QTBUG-47620 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Initialize the resource, so it can be used from static libraries.Andras Mantia2015-05-201-0/+5
| | | | | Change-Id: If28509a991fb464dc587705ce62af66b528fdd97 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Update copyright headersAntti Kokko2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Add video filtering support to VideoOutputLaszlo Agocs2015-02-031-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | Add the QAbstractVideoFilter base class and integrate it with VideoOutput. This can be used to perform arbitrary filtering or image processing on the frames of a video stream of a VideoOutput element right before the OpenGL texture is provided to the scenegraph by the video node. This opens up the possibility to integrate computer vision frameworks or accelerated image processing with Qt Quick applications that display video streams using Qt Multimedia. Conceptually it is somewhat similar to QVideoProbe, this approach however allows modifying the frame, in real time with tight integration to the scenegraph node, and targets Qt Quick meaning setting up the filter and processing the results of the computations happen completely in QML. [ChangeLog] Added QAbstractVideoFilter that serves as a base class for QML video filtering elements that integrate compute, vision, and image processing frameworks with VideoOutput. Change-Id: Ice1483f8c2daec5a43536978627a7bbb64549480 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Migrate to categorized logging in Quick 2 video outputLaszlo Agocs2015-01-091-8/+5
| | | | | | | | | | Enable qt.multimedia.video to get the logs. Also enhance the printing when creating the video node implementation. It is essential to have an easy way to figure out what handle and formats the node in use supports. Change-Id: Idf3a9f076ba03b5e613c19f2347204c841850b45 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Fix VideoOutput autoOrientation when switching cameras.Yoann Lopes2014-12-031-11/+40
| | | | | | | The VideoOutput's camera info was not updated when switching cameras. Change-Id: I23537ce98b08009898eaa26ef14d5b9a746ab5f7 Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
* Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* New camera selection API in QML.Yoann Lopes2014-07-171-0/+3
| | | | | | | | | | | | Also added a new QtMultimedia global object which makes it possible to retrieve the list of available cameras. It can be extended with new utility functions in the future. Includes documentation, example and auto tests. Task-number: QTBUG-23770 Change-Id: Ifea076329c3582ea99246ee1131853344a7b773f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Doc: Clean up references to Qt System InfoSze Howe Koh2014-05-121-0/+4
| | | | | | | | | The module is not released yet; the current documentation is misleading. Change-Id: Ia20ac8e3504942f6f60b94264f3a12497e09da24 Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix VideoOutput::autoOrientation documentation.Yoann Lopes2014-03-201-1/+1
| | | | | | | The type was reported to be int instead of bool. Change-Id: I3a76cb76ca70b50060c768f87cf84d8e436d8d7f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* VideoOutput: fix autoOrientation with a camera source.Yoann Lopes2014-02-281-1/+25
| | | | | | | | | Don't assume the camera frames are always in the same orientation as the display in its primary orientation. We now take into account the camera sensor position and orientation to calculate the viewport orientation. Change-Id: Ib333c87f1804d1010ada42cb757e4fab78d75a04 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Ensure the backend has had its geometry updated.Roger Maclean2014-02-031-0/+3
| | | | | | | | | | When trying to play video in an overlay window, the video fails to be displayed because everything that would cause updateGeometry to be called on the backend has already occurred prior to the backend having been created. Change-Id: Ida3c8feea69b497a18e9f44d7143bed03380d6ae Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Allow plugins to override the QML VideoOutput type.Andrew den Exter2014-01-201-0/+760
Move QDeclarativeVideoOutput to the private QtMultimediaQuickTools library to make the QDeclarativeVideoOutputBackend interface implementable by a plugin. Change-Id: I763c483a1fc9ec56dc7b8be0bc71523f029a36ee Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>