summaryrefslogtreecommitdiffstats
path: root/src/gsttools
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into ↵v5.15.9-lts-lgplTarja Sundqvist2023-03-231-1/+1
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I130d0256d152d5c8bf44db8f5218100d6ea898f0
| * Fix duration() with very long media with gstreamerJoni Poikelin2022-03-121-1/+1
| | | | | | | | | | | | Fixes: QTBUG-101450 Change-Id: I93ab8a9b788eb74b4ef2227b90e30a42a84b9fd6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-2547-971/+971
|/ | | | | | | | | | | This reverts commit 80d46e3a5f64ff2456c40bdba63b6d5c69a32cdd. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I5c64ffa120f916711e5cf01c828774f8456dec06 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-2747-971/+971
| | | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtmultimedia. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reaso for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4171 Change-Id: I86ebf7c3653b55983cefff246c0cb019cbcda8c4 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* GStreamer: Update render rect only if open gl sink is usedVaL Doroshchuk2020-07-201-1/+3
| | | | | | | | | | Only glimagesink requires updated render rect. Change-Id: Ib30bf364edda4cd088a1202bbd5c958b552ba999 Fixes: QTBUG-85545 Reviewed-by: Val Doroshchuk <valentyn.doroshchuk@qt.io> (cherry picked from commit a553c7d1b63defc963a043e363f8d75d255e9c72) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* GStreamer: Start playback when bufferedVaL Doroshchuk2020-06-091-1/+1
| | | | | | | | | | | Regression since d8d072417b08dd75734b3f0aa86c3a49db934770 Fixes: QTBUG-84556 Change-Id: I557ac7eb38ebdbb6c52e5348902ee8c3f1a91f07 Reviewed-by: <roman.valov@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 19cc3a018f2442221d566ec56bda2bdbdce7ec2e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* gsttools: do not use nullptr in C codeRolf Eike Beer2020-05-291-8/+8
| | | | | | | | | Changing this in "gsttools: use nullptr instead of NULL" was an oversight. Change-Id: I6ed4a63800dc288a32c58eafaf74cdc15ea2218d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> (cherry picked from commit ce0ae3f3bfed03e3eb334165f9dbf1151a9f9e5d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iMX: Introduce QT_GSTREAMER_PLAYBIN_CONVERT to inject a converter in playbinVaL Doroshchuk2020-05-281-1/+9
| | | | | | | | | | Injects a converter between decoders and video sink. Task-number: QTBUG-76179 Change-Id: If5fc8090bc1ade424a1157e94d83dc5a51051fd7 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> (cherry picked from commit 92658f152656f6d8373e79be0b2bfe331857560a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* GStreamer: Fix reverse playbackVaL Doroshchuk2020-05-081-10/+10
| | | | | | | | | | | | | | | | | | | | | Each gstreamer plugin is responsible for supporting reverse playback and also might require different start/stop types (GST_SEEK_TYPE_SET, GST_SEEK_TYPE_NONE, GST_SEEK_TYPE_END). Some plugins do not support it at all, e.g. wavparse. if rate > 0: change rate from current position to duration. else: change rate from current position to 0. Fixed also seeking with a negative rate. This should work for mp3 or some video formats too. Fixes: QTBUG-83945 Change-Id: I10a98186b9bc63d908667944aa4459da9e63e343 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-202-2/+17
|\ | | | | | | Change-Id: I160b25219c806d9d3a30644fa1a5e589c5aca039
| * Gstreamer: fix stream bufferingRoman Valov2020-04-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Gstreamer client should handle GST_MESSAGE_BUFFERING to play and pause streams based on buffer-percent value and Qt does it properly. However `updateSessionState` of QGstreamerPlayerControl was implemented to go back into playing state each time session state becomes paused. That behavior resulted into choppy stream playback. Fix with condition to un-pause playback only if it's already buffered. Fixes: QTBUG-83417 Change-Id: Ida4a9e2e196de00050bdc64725fa818c7e939785 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * GSTVideoRender: Update viewport on gst video buffer crop metadataStef Boerrigter2020-04-161-0/+13
| | | | | | | | | | | | | | | | | | If the video buffer contains crop metadata update a viewport for the video frame format. Fixes: QTBUG-82448 Change-Id: Iace150c6c03b48662cc9f0112b45fbe6401d6061 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@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>
* | GStreamer: Introduce reverse playbackVaL Doroshchuk2020-02-031-1/+1
| | | | | | | | | | | | | | Fixed to use negative playback rate. Change-Id: I864e76710f2ea176262639d5e91059c71b9bb382 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | gsttools: do not check pointer before calling free()Rolf Eike Beer2020-01-201-6/+3
| | | | | | | | | | Change-Id: I6deb8d5a282ecfe5cacc884ddfb3d4dc3ef3106d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | gsttools: use nullptr instead of NULLRolf Eike Beer2020-01-0612-144/+144
| | | | | | | | | | Change-Id: I3b9b75b9f55bbb13bd5751a49b072102af675c4f Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | gsttools: use auto for variables assigned from qobject_cast<>Rolf Eike Beer2020-01-064-11/+9
|/ | | | | Change-Id: Ie81bd5a419665756dbdac5dafddf50fdde61019f Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-122-4/+7
|\ | | | | | | Change-Id: I5b99b3d05502e15373ebaedcad06d6ab4d25d387
| * QGstreamerPlayerControl: do not touch m_mediaStatus if it is EndOfMediaRolf Eike Beer2019-11-111-4/+4
| | | | | | | | | | | | | | | | It would be reset to this state at the end of updateMediaStatus() anyway, so simply leave it alone. Change-Id: I7fa24773ebb1dd43ecfa8d7eb28d6f8e7862fa75 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * GStreamer: Fix crash when video sink is used when it has been destroyedVaL Doroshchuk2019-11-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When custom pipeline is requested, all playbin related elements must be cleared. Also when QMediaPlayer is destroying, it disables showing preroll frames, property of the video sink, which was already destroyed. Destroying of m_videoOutputBin decreases refcounter for m_videoSink, since the video sink is owned by m_videoOutputBin. Fixes: QTBUG-79753 Change-Id: I2fcbd19372caf46adf2ae1ed2e5a7d0ee70040ad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | GStreamer: Add support of Androidv5.14.0-beta2Val Doroshchuk2019-10-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since for Android GStreamer is distributed in archives, and should be staticlly linked, so by default it is not built and should be explicitly enabled within configuring by -gstreamer option. (currently it is auto and enabled if gstreamer exists) ("libs" of the gstreamer library in configure.json is empty to prevent any libs to be added while building any code that uses gstreamer library) Some base gst archives are fully included to Qt5MultimediaGstTools. Users would need to just use: QT += multimediagsttools-private Before building, GSTREAMER_ROOT_ANDROID env var should be set to point to gst binaries. Also all necessary plugins must be registered in user's code by GST_PLUGIN_STATIC_DECLARE/GST_PLUGIN_STATIC_REGISTER macros after QGstUtils::initializeGst(). and e.g. project file might contain: INCLUDEPATH += $$(GSTREAMER_ROOT_ANDROID)/armv7/include/ \ $(GSTREAMER_ROOT_ANDROID)/armv7/include/gstreamer-1.0 \ $(GSTREAMER_ROOT_ANDROID)/armv7/include/glib-2.0 \ $(GSTREAMER_ROOT_ANDROID)/armv7/lib/glib-2.0/include LIBS += -L$$(GSTREAMER_ROOT_ANDROID)/armv7/lib/ \ -L$$(GSTREAMER_ROOT_ANDROID)/armv7/lib/gstreamer-1.0 \ __here_list_of_plugins__ See video/android/gstreamer example Change-Id: Ie4e586fa8489f1bd23622763f5578abed1729272 Task-number: QTBUG-72125 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-082-29/+64
|\| | | | | | | | | | | | | Conflicts: src/multimedia/configure.json Change-Id: Ie887a5f4d718cb3e082b0e2ee996c6687af330cb
| * GStreamer: Recreate playbin after custom pipelineVaL Doroshchuk2019-10-012-29/+64
| | | | | | | | | | | | | | | | | | | | | | | | Currently if custom pipeline is set, old playbin elements are destroyed. And if normal url is passed again after the custom pipeline, it is unable to play. Because no playbin elements exist anymore. Adding a fix to recreate playbin elements if "not a pipeline url" is passed. Fixes: QTBUG-78079 Change-Id: I8b3498c4660639f5d757b322a136846ee82fdc28 Reviewed-by: Christian Strømme <christian.stromme@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>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-012-34/+22
|\| | | | | | | | | | | | | Conflicts: src/multimedia/video/qvideoframe.h Change-Id: I8458c4138be05f661d6528116cbc6b18298f0a91
| * GstreamerPlayerControl: use new style connect syntaxRolf Eike Beer2019-09-301-30/+18
| | | | | | | | | | Change-Id: I2fc8d9c8b951092498f11a4a31c6c890df9d7495 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * QGstreamerPlayerSession: build list of debug strings only onceRolf Eike Beer2019-09-301-4/+4
| | | | | | | | | | Change-Id: I9aab0c5c20f97bc45fa26cc3a0faf6cf10c916d2 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-211-2/+4
|\| | | | | | | Change-Id: I2ba97d82a57172656f6549f368ee51f718f9cdf8
| * MultimediaGstTools: fix string warnings when defining DEBUG_PLAYBINRolf Eike Beer2019-09-191-2/+4
| | | | | | | | | | Change-Id: I0069b96f00830cd441b60bef5847b1543ba2c1af Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-1225-183/+100
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * GStreamer: Use member initializationVaL Doroshchuk2019-09-1025-181/+99
| | | | | | | | | | | | Change-Id: I96026828c357677c84e880ea85e6e82b8c0495c7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-173-3/+38
|\| | | | | | | Change-Id: I09f511d894db5e9987ac2b9e42266bb87ef0161d
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-133-3/+38
| |\ | | | | | | | | | Change-Id: I428528333e89214d96acef5c2ba8ea832b2b145f
| | * GStreamer: Don't seek to the beginning when playing is requestedVaL Doroshchuk2019-08-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We promised to not provide any video frames before pause() or play() is called. Regardless the media is loaded or not. It should work like following: setMedia(new) // ... // no video frames returned yet pause() // prerolled frame should be shown To implement this, i.e. showing the prerolled frame after pause, we do seeking to the beginning. But it is totally not necessarily when play() is requested, since here is new media and playback will start from the beginning anyway. This also produces a hang/stuck on some embedded systems with custom pipelines or playing from qrc. So decided to show prerolled frame and this means to seek to the beginning only when pause() is called. Task-number: QTBUG-65399 Change-Id: I9b3dc632fa0df4a1115d852c2d480fd5c7fd9ee5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * GStreamer: Don't share video surfaces between several pipelinesVaL Doroshchuk2019-08-081-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtvideosink element is available in pipelines only if QVideoRendererControl is used, because it requires a video surface. So if qtvideosink is used inside pipeline but a surface is not available, created null/dummy surface to render video frames to and show a warning about this. Change-Id: I924d3baca994363550b7920176e29e9cd0c4dd1f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * GStreamer: Allow audio/x-raw codec in QAudioRecorderVaL Doroshchuk2019-08-071-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently QAudioRecorder is implemented to find a codec and muxer that match some caps. E.g. if we would want "audio/x-wav" container with PCM format, there is only one gst element which supports it: wavenc element accepts "audio/x-raw", "audio/x-alaw" or "audio/x-mulaw" and provides buffers in "audio/x-wav" or "audio/x-rf64". Next, we would need to find a codec which provides buffers in "audio/x-raw", "audio/x-alaw" or "audio/x-mulaw". It might be mulawenc and alawenc. And finally we combine them together to pipeline: audio/x-raw -> mulawenc|alawenc -> wavenc -> audio/x-wav And as a result there will be wav file and encoded in "audio/x-alaw" or "audio/x-mulaw" and not in desired PCM format. So suggesting to add audioconvert element to the audio encoders to allow to link with various containers: audio/x-raw -> audioconvert -> wavenc -> audio/x-wav Change-Id: Icd77124267f5a0999625fa1fe4e3de3740218741 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-302-0/+48
|\| | | | | | | | | | | Change-Id: I329eeefafed87ff7467d21d5d099cf9897660167
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-232-0/+48
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowplayerservice.cpp Change-Id: I482098bb3c3b5b291175ca798b0d6ba61ad87d86
| | * GStreamer: Implement fetching audio/video codecs by containerVaL Doroshchuk2019-07-171-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved stream types to QGstCodecsInfo and added possibility to fetch audio or video codecs by a container. Or fetch containers by audio or video codec. It would allow to debug supported codecs and containers: QGstCodecsInfo containers(QGstCodecsInfo::Muxer); QGstCodecsInfo audioCodecs(QGstCodecsInfo::AudioEncoder); for (auto &container: containers.supportedCodecs()) qDebug() << audioCodecs.supportedCodecs(containers.supportedStreamTypes(container)); Change-Id: I26bf5579db6974a166d408c4865a9ffe314e3e15 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-161-1/+3
|\| | | | | | | | | | | Change-Id: I7ca7fb6143ec296c16a37a7be236470dbd1742a7
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-111-1/+3
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic700bdddc5b4ae663af0daae54feb2420c8a1730
| | * GStreamer: Fix 0.10 compile errorVal Doroshchuk2019-07-051-1/+3
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-76816 Change-Id: I2909c2f2df91ac26b5104e24892310aa62cad172 Reviewed-by: Christian Strømme <christian.stromme@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>
* | | QGstAppSrc: Don't send EOS for at-end sequential devicesArno Rehn2019-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sequential devices such as network sockets may continuously stream data. Thus, the device being atEnd() or returning 0 for read() doesn't automatically mean that the stream is done. This fixes streaming live data over a device (e.g. socket or pipe). [ChangeLog][][GStreamer backend] Fix streaming data from sequential devices. Change-Id: I2fc834479cc6d52a806790ccb722bcfdea4723be 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>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-033-55/+87
|\| | | | | | | | | | | Change-Id: Id1638836ea3faf16c4ba39119029522b2afbe803
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-033-55/+87
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowplayerservice.cpp Change-Id: I6b7edc312ecfadf84653ce24321ec55da41e131a
| | * Gstreamer: Pass GstUDPSrc's caps via "udpsrc.caps=" url's query itemVaL Doroshchuk2019-05-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes it is needed to configure udpsrc element to play a stream, means to set some caps to GstUDPSrc element. But currently there are no any ways to pass such caps. Added parsing of the requested url to find "udpsrc.caps" query item and to use it as the caps for udpsrc source element. It allows to show streams by passing caps within url. E.g. if the stream is created using $ gst-launch-1.0 v4l2src ! videoconvert ! video/x-raw,format=I420,width=800,height=600 ! \ jpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=5001 it could be shown via QMediaPlayer like: MediaPlayer { source: "udp://127.0.0.1:5001/?udpsrc.caps=application/x-rtp,media=video,clock-rate=90000,encoding=JPEG,payload=26" } Change-Id: I6f9c20c6004a34bce5fd1d0073311b7c62a8010f Reviewed-by: Christian Strømme <christian.stromme@qt.io>