summaryrefslogtreecommitdiffstats
path: root/src/gsttools/qgstutils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move the gsttools into Qt MultimediaLars Knoll2021-01-221-1150/+0
| | | | | | | | | Let's not have a separate helper lib for those. The longer term goal is to get rid of platform specific plugins anyway. Change-Id: I24c9e984c696a4ecfc4693413ad51264f6926afe Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix detection of audio input devices using gstreamerLars Knoll2021-01-221-0/+11
| | | | | | Change-Id: I34a160388371eb5c159727f9e3fbcce6d2e46405 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Implement proper hardware detection using gstreamerLars Knoll2021-01-221-208/+111
| | | | | | | | | | | | | Scrap all the code that was trying to figure out supported video devices using low level code. Instead do it properly using GstDeviceMonitor. Use the chance to remove some unneccesary arguments to the methods. Change-Id: I7a45035b5340314768a096458d68f78176e58811 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a bunch of compiler warningsLars Knoll2021-01-201-6/+6
| | | | | | Change-Id: I137b07f0909195019d136f1ce8926afd4bbb5e5f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove gstreamer-0.10 code pathsLars Knoll2021-01-201-514/+4
| | | | | | | | In fact, require gstreamer 1.12 as the minimum version. Change-Id: Iad7239dc3907ffceca1454b80f982f8f04aea518 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-251-3/+3
| | | | | | Task-number: QTBUG-84469 Change-Id: Id8d07836a66e4d9223341483bfe0ed251ba2806c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-021-1/+1
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I72aa0ccae06030043ba40f0f908826e5ca4a31ab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* gsttools: use nullptr instead of NULLRolf Eike Beer2020-01-061-29/+29
| | | | | Change-Id: I3b9b75b9f55bbb13bd5751a49b072102af675c4f Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Small performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-071-1/+1
| | | | | | | | * Add const & to function parameters * Add const & to variables assigned from functions returning const & Change-Id: Idc141bd48f37eae92a4d1775caade3c977a42391 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-07-041-3/+1
| | | | | | | | | | Java-style iterators are scheduled to be deprecated, or at the very least banned from use in Qt's own implementation. Ditto for QLinkedList. Change-Id: I5471c293a7a050b92db47f7aeac15dd05bd46650 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-181-1/+1
|\ | | | | | | Change-Id: Ic3ac3515666576046ac1ec5342c5b06aadbc18ac
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-151-1/+1
| |\ | | | | | | | | | Change-Id: Ib819180a25ceedfb072362d55d30f94e40a44f9b
| | * GStreamer: Return busy cameras in QCameraInfo::availableCamerasVaL Doroshchuk2019-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the camera has been already opened, ioctl returns EBUSY, and this camera is not listed in available cameras. Change-Id: I1ee6e067a3d080fe82a528f576ba13e03d5f816e Fixes: QTBUG-76236 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Gstreamer: Introduce support of OpenGL pluginVaL Doroshchuk2019-05-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+2
|/ / | | | | | | | | | | | | | | | | [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>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-161-5/+3
|\| | | | | | | Change-Id: I947a3b4aaf39e56b9505ae802b8b31c718922639
| * Gstreamer: Fix compilation error with 0.10 versionVal Doroshchuk2019-02-141-5/+3
| | | | | | | | | | | | Task-number: QTBUG-73740 Change-Id: I1de087b63f65bab39351d5446254a8d1832e88c3 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Gstreamer: Add support of avfvideosrc for camerabinVaL Doroshchuk2019-02-081-11/+27
| | | | | | | | | | | | | | | | | | Gst Device Provider now can be used for macOS also. Added support of avfvidesrc element to be used within camerabin. Task-number: QTBUG-72125 Change-Id: I69205649c6e75432534e240656d8cb4748ee10cc Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | GStreamer: support video orientationAlexander Volkov2019-02-011-0/+31
| | | | | | | | | | Change-Id: I233c45824f517c185cb245d8a7d77cab8551fc51 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-221-4/+6
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Icf8b9f73c50b16d6f5765040eb7bd918231df94a
| * Migrate QGstUtils to use QRegularExpressionSamuel Gaist2019-01-121-4/+6
| | | | | | | | | | | | | | | | | | This patch updates the QGstUtils class to use QRegularExpression in place of QRegExp which is to be considered deprecated. Fixes: QTBUG-72589 Change-Id: I67e189c48688b512cc76c884fd2a7e51e1b188f9 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Gstreamer: add support for ksvideosrc within camerabinVal Doroshchuk2019-01-171-0/+45
|/ | | | | | Task-number: QTBUG-72125 Change-Id: I12bc684a796c6abb6af3a51edca52011495f4ac9 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* QGstUtils: fix build with MSVCJ-P Nurmi2018-12-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | MSVC didn't like the #iffery that was done with GST_STATIC_CAPS(). The build error was: qtmultimedia\src\gsttools\qgstutils.cpp(1323): error C2121: '#': invalid character: possibly the result of a macro expansion qtmultimedia\src\gsttools\qgstutils.cpp(1323): error C2059: syntax error: 'if' qtmultimedia\src\gsttools\qgstutils.cpp(1323): error C2143: syntax error: missing ';' before '{' qtmultimedia\src\gsttools\qgstutils.cpp(1311): error C2143: syntax error: missing ';' before '}' qtmultimedia\src\gsttools\qgstutils.cpp(1325): error C2059: syntax error: 'return' qtmultimedia\src\gsttools\qgstutils.cpp(1326): error C2059: syntax error: '}' qtmultimedia\src\gsttools\qgstutils.cpp(1326): error C2143: syntax error: missing ';' before '}' qtmultimedia\src\gsttools\qgstutils.cpp(1329): error C2143: syntax error: missing ';' before '{' qtmultimedia\src\gsttools\qgstutils.cpp(1329): error C2447: '{': missing function header (old-style formal list?) Change-Id: Ic9ac64648aba396fc4ef433e73d5c72a8c1c3da1 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Fix comment endThiago Macieira2018-04-271-1/+1
| | | | | | | | Caught by Clang 6: qgstutils.cpp:180:1: warning: '/*' within block comment [-Wcomment] Change-Id: I3840d727dee443318644fffd152938f2b4df5400 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Fix documentation warningsTopi Reinio2018-04-191-2/+7
| | | | | | | | | | | | Add a custom module header, used only for documentation builds, that pulls in also the QtMultimediaWidgets module. Several documentation fixes to clean up warnings from clang. Task-number: QTBUG-67790 Change-Id: I6c1013798a648250c8555eb92684ec3b33ff7531 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-271-1/+2
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/multimedia/declarative-radio/view.qml src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.h Change-Id: I97b507878b6de04ec38ddd13530e58b8f72390e4
| * GStreamer: Fix V4L input queryVaL Doroshchuk2017-10-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | The last ioctl argument expect a pointer to an integer, not the integer value itself. Also, the ioctl call will return 0 on success, or ENOTTY if the input can't be select, both indicating that the device is a camera. Task-number: QTBUG-62245 Change-Id: Ifcf2d30b11ae204036b43daae664f917aaed83ed Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Fix warnings about casting between QString and narrow characterThiago Macieira2017-07-181-35/+35
|/ | | | | Change-Id: I8d96dea9955d4c749b99fffd14cde44ebf1f7290 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Build fix for -no-feature-timezonePaul Olav Tvete2017-03-201-2/+3
| | | | | | | | | Use the QDateTime constructor that takes an offset from UTC instead of creating a timezone that has the same offset. Change-Id: Iceb1bf598263e7d81786fbf847012993d07e08ba Reviewed-by: Yoann Lopes <yoann.lopes@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-101-3/+4
|\ | | | | | | | | | | | | Conflicts: src/plugins/gstreamer/camerabin/camerabincontainer.h Change-Id: I4942d41d69112335fe0c994002f1b32ef3aad051
| * Use QT_CONFIG macro to check for featuresLars Knoll2017-02-271-3/+4
| | | | | | | | | | | | | | And remove many custom defines. Change-Id: I658cc8430d1d99ed3c0aafe03a77adce76621a29 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | GStreamer: move suggestedFileExtension() out of camerabin pluginYoann Lopes2016-08-231-0/+34
|/ | | | | | | Now in QGstUtils, in order to be used from other places. Change-Id: Id8beae1b804fa22bd648e254a1ff2a1f1e455a02 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* GStreamer: support cover artTasuku Suzuki2016-07-261-0/+16
| | | | | Change-Id: I05987f578a40c23dc2eb6f3e6a7f76d11f704214 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* GStreamer: support date time type in metadataTasuku Suzuki2016-07-261-0/+19
| | | | | Change-Id: Ica57abfc0a60b401be88662483d35699d4f76321 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Updated license headersAntti Kokko2016-01-191-14/+20
| | | | | | | | | | | 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>
* QGstTools: replace foreach with range-based forAnton Kudryavtsev2016-01-151-13/+19
| | | | | Change-Id: I4e93978fc41788ac7f524c7c290a9ce25452f04e Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Support compiling with GStreamer < 0.10.32 in the camerabin plugin.Yoann Lopes2015-11-191-0/+10
| | | | | | | | | | | | | | | | | | | The documented minimum GStreamer version for Qt Multimedia is 0.10.24, however, the camerabin plugin actually required 0.10.32 to compile successfully. The reason is mainly due to the GstEncodingProfiles API, which is used to implement the audio and video encoding settings controls. There's no hard requirement for that API anymore and the aforementioned controls simply don't do anything when the GStreamer version used to compile is older than 0.10.32. A few other GStreamer calls had to be ifdef'd or replaced in order to compile with 0.10.24. Note that this patch only makes sure it compiles with older versions, running the camerabin plugin with GStreamer < 0.10.32 is currently untested and it might not work as expected. Task-number: QTBUG-48914 Change-Id: I4ce8e932f24a33e919e29326729e12bbae561faf Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* GStreamer: fix compilation with version < 0.10.31.Yoann Lopes2015-10-201-1/+68
| | | | | | | | | | Qt 5.4 and earlier required GStreamer 0.10.24 as minimum version. Qt 5.5 added code that requires 0.10.31, this code is now ifdef'd and we now support again 0.10.24. Task-number: QTBUG-48353 Change-Id: Ie708a33c0515874b003ce26a3400475075d316ca Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* GStreamer: added convenience function in QGstUtils.Yoann Lopes2015-08-131-0/+11
| | | | | | | -> qt_gst_element_get_factory_name(GstElement *elem) Change-Id: Icf806488b49fbcdecdd605b6316bd1ef8796a883 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-031-0/+7
|\ | | | | | | | | | | | | Conflicts: src/gsttools/qgstutils.cpp Change-Id: Ic54ab6c6560ded0db4b98f83256d997bee828083
| * Fixing camera enumeration on hotplugLibor Tomsik2015-02-251-0/+7
| | | | | | | | | | | | | | | | | | | | Emptying camera HW devices buffer when it becomes obsolete (500ms). Leaving the list filled was causing video cameras to keep on the list even when the camera was unplugged. Or vice versa, empty after the camera was plugged into the system. Change-Id: I3b38a0b327553cbb6e18dd5421cdde3ded1b7895 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | GStreamer: implemented QCameraViewfinderSettingsControl2.Yoann Lopes2015-02-181-66/+154
| | | | | | | | | | Change-Id: I4436e39c152f6c251792c1504d4a7b57db7b9d9a Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | GStreamer 1.0: fix frame rate retrieved with QGstUtils::formatFromCaps.Yoann Lopes2015-02-181-1/+1
| | | | | | | | | | Change-Id: I88e8416e50440bbd14b34a8b2b3b262b5c8401ab Reviewed-by: Christian Stromme <christian.stromme@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>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-171-0/+2
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I31e377cdccf8bf5c1ea8143faf2001ac99608c27
| * GStreamer: better camera device name logic.Yoann Lopes2014-12-091-0/+2
| | | | | | | | | | | | | | | | Use the device ID for QCameraInfo::description() when the driver doesn't provide any display name. Change-Id: Iff1f17187ecb52262412f85db04d7108fae71717 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | GStreamer: port to 1.0.Yoann Lopes2014-11-271-7/+778
|/ | | | | | | | | | | | | | | 0.10 is still used by default. To enable GStreamer 1.0, pass GST_VERSION=1.0 to qmake for qtmultimedia.pro. Contributions from: Andrew den Exter <andrew.den.exter@qinetic.com.au> Ilya Smelykh <ilya@videoexpertsgroup.com> Jim Hodapp <jim.hodapp@canonical.com> Sergio Schvezov <sergio.schvezov@canonical.com> Change-Id: I72a46d1170a8794a149bdb5e20767afcc5b7587c Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Add QT_GSTREAMER_CAMERABIN_VIDEOSRC environment variable.Yoann Lopes2014-10-301-5/+20
| | | | | | | | | It can be used to set which video source element should be used by the camerabin. Change-Id: I8d1cd8c4ba6fe5a89817699f645b0997e713aaca Reviewed-by: Samuli Piippo <samuli.piippo@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Fix V4L usage.Yoann Lopes2014-09-091-2/+6
| | | | | | | | | ff527de0 was submitted to 5.3 while cddbe873 was submitted to 5.4. The former's behavior was not preserved when 5.3 got merged into 5.4. Change-Id: I7435ea30634001ae6e87c316eb8a8ab6f5e988e3 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* 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>