summaryrefslogtreecommitdiffstats
path: root/src/gsttools
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* GStreamer: fix video output stopping when the main thread is blockedYoann Lopes2017-09-221-4/+2
| | | | | | | | | | | | | | | | | When a new frame is ready to be rendered, our gst sink waits until the frame is actually processed in the GUI thread, but never more than 300 ms. The time limit is there to avoid potential dead locks in specific situations. Before, if the wait would timeout, the sink would signal that there was an error rendering the frame, which would in turn put the pipeline in an error state and would stop processing any further frame. We now simply skip the frame if the GUI thread is blocked for too long and signal that everything went fine to the pipeline. This was already the logic in place for GStreamer 0.10 (see qvideosurfacegstsink.cpp). Task-number: QTBUG-60509 Change-Id: I5173a15340c0e2065bb2fb5ca3bc045ac84ba7e1 Reviewed-by: Christian Stromme <christian.stromme@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-103-14/+9
|\ | | | | | | | | | | | | Conflicts: src/plugins/gstreamer/camerabin/camerabincontainer.h Change-Id: I4942d41d69112335fe0c994002f1b32ef3aad051
| * Use QT_CONFIG macro to check for featuresLars Knoll2017-02-273-14/+9
| | | | | | | | | | | | | | And remove many custom defines. Change-Id: I658cc8430d1d99ed3c0aafe03a77adce76621a29 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | GStreamer: Add missing override and remove redundant virtualAlexander Volkov2016-12-131-2/+2
| | | | | | | | | | Change-Id: I61997676d7f002e769de499b19cbea3d96876480 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-123-627/+13
|\| | | | | | | | | | | | | Conflicts: src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp Change-Id: I7c30c2d13fdd07ee07e4449d5d3e256e988d3793
| * Fix mir detectionLars Knoll2016-11-231-2/+1
| | | | | | | | | | | | | | | | | | The old check would have never triggered unless you compiled with CONFIG+=mir by hand. Change-Id: I1d418dce09adaedbdff366dfeb8f4036cac0f075 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Cleanup all maemo/meego specific codeLars Knoll2016-11-143-597/+0
| | | | | | | | | | Change-Id: I6c6f28084c6b030928eebc53c5d0009b168ede6a Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| * Move qtmultimedia over to the new config systemLars Knoll2016-11-141-28/+12
| | | | | | | | | | | | | | | | | | | | | | | | Use the new configuration system to define external libraries, configure tests and features. Don't use pkg-config outside of the configuration step. And move all command line options over from qtbase, so that we can remove them from there in a second step. Change-Id: I1aa4b557a6aee17eeceb00602005a2d28b426a26 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> 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: improve QGstCodecsInfoYoann Lopes2016-08-231-71/+129
|/ | | | | | | | | | | | | | - The class now works with GStreamer < 0.10.31. - New codecElement() function that returns the GStreamer encoder name for a given codec. - New codecOptions() function that returns the list of available GStreamer properties for a given codec. - Don't return duplicate codecs (when several GStreamer plugins are available for a given codec). We now only use the highest ranked one. Change-Id: I4a79099d4469907c73046d7e78df737fe4ed036c Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Adjust to qtConfig() changes in qtbaseLars Knoll2016-08-191-2/+2
| | | | | | Change-Id: I26d80ece18abf882338de5ce0258469ed103a0eb Reviewed-by: Yoann Lopes <yoann.lopes@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* 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>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
|\ | | | | | | Change-Id: Ib95ddbbc6e2b69663597cae045ec81eda6d12d58
| * Make qtmultimedia 5.6 branch compile without c++11:nullptr usageRalf Nolden2016-05-171-1/+1
| | | | | | | | | | | | | | | | 5.6 should not require c++11 features, however, nullptr slipped in here. Replace nullptr with Q_NULLPTR for initialization. Change-Id: Icf62618657b5bb725bd4c8f924853fa191f6e413 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-20/+20
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/mediaplayer.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro Change-Id: I5742596230dc510ba2a09eba624429bb67179194
| * Fix gstreamer camera when env var QT_NO_GLIB is setSergio Martins2016-03-021-20/+20
| | | | | | | | | | | | | | | | | | | | | | It would fall into the glib code path because it was only checking if QT_NO_GLIB was defined, but ignoring the env variable. gst_bus_add_watch_full only works with a glib event loop running. Task-Id: QTBUG-51607 Change-Id: I726afd5d6e114eacea6e5bc71e7a6e2d1c5bbd74 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-16/+23
|\| | | | | | | Change-Id: I2e4e9cca01d63ed0d1e7f71c7a58322390696036
| * GStreamer: fix GstAppSrc usage.Yoann Lopes2016-01-191-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow our GstAppSrc wrapper to be reconfigured with a new GstAppSrc object. This is necessary because that object changes every time playback is restarted, even for the same source. The consequence of not allowing the reconfigure was that playback for a given qrc media would only work the first time; any subsequent calls to play() would not work since our wrapper wouldn't know about the new GstAppSrc object and therefore wouldn't be able to produce any data. Also improved management of the wrapper lifecycle. Task-number: QTBUG-49531 Change-Id: I905afb6848cc7e9a563b4edc2c5875cdd7e53d21 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-1923-322/+460
| | | | | | | | | | | | | | | | | | | | | | 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-155-22/+31
|/ | | | | 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-203-10/+105
| | | | | | | | | | 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: refactored widget and window control.Yoann Lopes2015-08-184-400/+551
| | | | | | | | | | | | | | | | | | | Instead of always using xvimagesink as GStreamer backend for the widget and window control (works only with X11), we now try to pick a video sink that fits the current configuration. It first tries a set of known video sinks that can work with the Qt platform plugin in use. If none is available, it dynamically picks a video sink available on the system that can be used with our backend. Even if the video sink is now picked in a smarter way, xcb is still the only supported platform plugin. The reason is that it's the only Unix plugin which can provide a valid native window handle. Additional work is needed to support other plugins like wayland or directfb. Change-Id: I3843dea363d6a0b85a6cc1f2952783b743e48ac6 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>
* GStreamer: remove unnecessary qWarning().Yoann Lopes2015-06-021-2/+0
| | | | | Change-Id: Ibbf5d5b7e3675fe6fee30e7486e3bc7b59fa231d Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* GStreamer: flush the current frame when stopping a media player.Yoann Lopes2015-05-272-8/+101
| | | | | | | | | | | When stopping, we don't actually stop the GStreamer pipeline, we just pause it and prevent preroll frames from being shown. We also need to make sure the last presented frame is cleared in that case, otherwise it stays on screen. Fixed for both 0.10 and 1.0. Change-Id: Ibe26a7567f271ae0c3d8819eb9d35d6a95da1c6a Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* GStreamer: don't use xvimagesink when Qt is not using Xcb.Yoann Lopes2015-05-262-2/+8
| | | | | | | | | | | | | We need a native X window handle to be able to use xvimagesink. If Qt doesn't use the Xcb platform plugin, don't try to use that element. This patch makes QVideoWidget usable when the system doesn't run X11 but xvimagesink is installed anyway. Widget and window controls become invalid and the plugin therefore falls back to the renderer control. Change-Id: I6efd410508f35b06f00f6e4e5149c97cbd280d0d Task-number: QTBUG-46169 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-3/+0
|\ | | | | | | | | | | | | | | Conflicts: src/multimedia/playback/playlistfileparser.cpp src/plugins/windowsaudio/qwindowsaudiodeviceinfo.cpp Change-Id: I52950def2b8283ae15797d05d4ead6a1256eba19
| * GStreamer: don't use ximagesink in QGstreamerVideoWidget.Yoann Lopes2015-03-241-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When xvimagesink is not available, we were falling back to ximagesink. That element doesn't provide some important features: it doesn't scale frames to the window size and doesn't support brightness, contrast, hue and saturation adjustments. That kind of makes it useless, at least on its own. We would need to use at least a 'videoscale' element together with it to have it working properly. We're better off letting QVideoWidget fall back to QVideoRendererControl when xvimagesink is not available. Change-Id: Ic8c62fbefa3227430e3bae24630c8b3944aabb47 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | GStreamer 1.0: fix frames being presented too many times.Yoann Lopes2015-04-071-9/+8
| | | | | | | | | | | | | | | | | | | | | | Presenting a frame originates from a gstreamer thread, we block there until the frame is actually presented in the main thread. The problem is that it was presented over and over again until the gstreamer thread was unblocked. Make sure a given frame is presented only once. Change-Id: I46f246740313968637add802f509ebffcc5c19b8 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | GStreamer: implement unlock() in QGstVideoRendererSink.Yoann Lopes2015-04-072-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | There are cases where blocking operations happening in the video sink need to be unblocked, that's why GstBaseSink has an unlock() virtual function. Since our custom video sink blocks when starting and when rendering a frame (while waiting for the main thread to actually do these operations), we need to implement the unlock() function in order to unblock these operations when requested by GstBaseSink. Change-Id: I5cb19ea689e655f572729d931cefec8a4266c94e Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | GStreamer 1.0: show preroll frames.Yoann Lopes2015-04-071-2/+4
| | | | | | | | | | | | | | | | | | | | We need to implement the show_frame() function from GstVideoSink, which handles both preroll and normal frames, instead of just GstBaseSink.render(), which is called only for normal frames. This was changed for GStreamer 0.10 by 3b20608f. Change-Id: I4823a575d499cd0d6f9f4cb62e0420e070a05214 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | Remove stray <QtNetwork> includesAndrew Knight2015-03-301-1/+0
| | | | | | | | | | | | | | | | Module includes slow down the build when PCH is disabled, so don't use them. Change-Id: Ic0bf0d938ef06dea9dba6897df592311230a6529 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-171-26/+23
|\| | | | | | | Change-Id: Id24f14bef17b86e7027e055473f0357854780979
| * Revert "Alsa: fix crash when detecting devices."Yoann Lopes2015-03-111-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0ab81ef59f35d103ec8174834c4fc2a4dcced453. The workaround causes software devices not to appear in the list of available devices. Besides, since the crash is caused by a bug in older versions of Alsa, the workaround was probably a bad idea in the first place. People should update Alsa instead. Task-number: QTBUG-42326 Change-Id: I37923a87180d1c5abc18d52d84f633e14ba46860 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>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-20/+17
|\| | | | | | | | | | | | | | | | | Conflicts: qtmultimedia.pro src/gsttools/qgstreamervideowidget.cpp src/plugins/gstreamer/camerabin/camerabinservice.cpp Change-Id: I883f20dc17924ab42514a1aa00d16675a0f13d99
| * GStreamer: improved logic for window and widget controls usage.Yoann Lopes2015-02-181-22/+17
| | | | | | | | | | | | | | | | | | | | Provide these controls only when the xvimagesink gstreamer element is available. This allows QVideoWidget to fallback to QVideoRendererControl when xvimagesink is not available. Task-number: QTBUG-41618 Change-Id: I59f90ea8857c7ec0ffa08be9804e5458d95b79c4 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | GStreamer 1.0: fix some problems with QGstVideoRendererSink.Yoann Lopes2015-02-181-89/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | - Correctly free resources on deletion. - Correctly stop the sink. We were stopping only when null caps were passed to set_caps() but that doesn't seem to always happen. Implement GstBaseSink.stop() which is always and consistently called by GStreamer. - Remove pre-roll support (as done previously for 0.10, see commit 3b20608f). Change-Id: I4c5808938f244f4f8a35e121a3a4a862588b752d Reviewed-by: Christian Stromme <christian.stromme@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-1222-196/+172
| | | | | | | | | | | | | | | | | | 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-2716-329/+2300
|/ | | | | | | | | | | | | | | 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>
* Fix Clang warning about comparison of different signsThiago Macieira2014-11-241-1/+1
| | | | | | | | | | Commit 4d35f66acf90e64e6c174bee9d809713d07fcd7e changed from -1 to ~0 because ICC complained, but Clang still sees ~0 as int. So force to unsigned. qgstappsrc.cpp:144:31: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare] Change-Id: I6b0fdf8dc5df157d8e184f22dba44660e60ca3b2 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>