summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* GStreamer: add private API to access pipeline for capture sessionTim Blechmann12 days11-37/+178
| | | | | | | | | | | | | Allows users to mess with the underlying gstreamer pipeline of the `QMediaCaptureSession` like they can with the `QMediaPlayer` [ChangeLog] QMediaCaptureSession: GStreamer - private interface to access underlying GstPipeline of QMediaCaptureSession Pick-to: 6.5 6.6 6.7 Task-number: QTBUG-123830 Change-Id: I5b17240c9951ee8e05dd6cb4a78b203a56794922 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: unit test native pipeline accessTim Blechmann12 days6-8/+110
| | | | | | | | | | | | Add initial test for the accessing the GStreamer pipeline via a platform-specific interface. Some fixes to the GStreamer plugin were necessary in order to include the headers from the `QGstreamerMediaPluginPrivate` target Pick-to: 6.5 6.6 6.7 Change-Id: Ia60e31426395f5a89b3b76d4d12aedd95f12731c Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Update pffft version to the latest version from upstreamMikko Hallamaa12 days2-29/+21
| | | | | | | | | | | Update pffft from SHA 7641e679 to fbc40586. [ChangeLog][Third-Party Code] Updated pffft to fbc4058. Fixes: QTBUG-124759 Pick-to: 6.7.1 6.7 6.5 6.2 5.15 Change-Id: Id48bd07f396650fcef61a5688f4cc3a32ce1a360 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Manage media backend lifetime using Q_APPLICATION_STATICJøger Hansegård12 days2-61/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reworks lifetime management of the Qt media backend to use a plain Q_APPLICATION_STATIC instead of a hybrid between a Q_APPLICATION_STATIC and a Q_GLOBAL_STATIC. This hybrid mechanism tolerated creating the Qt media backend before a QApplication was instantiated. This was considered necessary because Qt example code for enumerating media devices previously demonstrated this without a QApplication. Unfortunately, the hybrid mechanism prevented maintenance of the Q_APPLICATION_STATIC implementation, and was on its own complex to understand and maintain. By switching to lifetime management using Q_APPLICATION_STATIC, we may break debug builds of legacy applications that enumerate media devices without having a QApplication, but we consider this an unlikely scenario. We have updated Qt documentation to state that a Qt application object is required to access any Qt Multimedia APIs (9cf4494d49170eafb9c179d5304c0a70eaf25b96), and error logging is improved to make developers aware of this requirement (c2b1fb925798f5a87b21891dcf18cd967436de3e). We are now making this requirement harder by asserting in debug. With this change, legacy applications that use Qt Multimedia APIs without having a Qt application object will assert in debug builds. Release builds will for now continue to work as before, but with extra error logging. [ChangeLog][Changed lifetime management of the Qt Media backend. The Qt media backend lifetime is now always bound to a Qt application object, and Qt Multimedia APIs require that a Qt application object exists before use. Using Qt multimedia APIs without a Qt application object will assert in debug builds and result in undefined behavior in release builds.] Fixes: QTBUG-124577 Task-number: QTBUG-120198 Task-number: QTBUG-124578 Change-Id: I2b9864d8ee3dc937a80796891ff13854ce8968ee Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Add since 6.8 to a new QVideoFrame constructor documentationArtem Dyomin12 days1-0/+1
| | | | | | Change-Id: I4f2fd9194a718f061d9c1a43cc69c73c4d5f1805 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: QGstreamerAudioDecoder - simplify message handlerTim Blechmann12 days2-90/+99
| | | | | | | | Splitting up the processBusMessage, as it wat quite long. Pick-to: 6.5 6.7 Change-Id: I2aefc4e73400e6f588cd38e838fabb5b0668c371 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: improve tracing of GstMessagesTim Blechmann12 days7-59/+147
| | | | | | | | | | | | | warning/info/state_changed are often useful to see parsed properly. * print them in a parsed manner on the QDebug output * introduce a QCompactGstMessageAdaptor adaptor that can be used to parse these messages in a consistent manner in message handlers. this can be used to remove boilerplate code. Pick-to: 6.5 6.7 Change-Id: I0ca76bcfc69628b747fd5e095cc1c783287acb3c Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: simplify GstMessage processingTim Blechmann12 days4-34/+19
| | | | | | | | | | * reduce boilerplate code * reduce unnecessary null checks * avoid moc Pick-to: 6.5 6.7 Change-Id: Ic57db040a3acf55f9abd1eeac4e53991650bfa97 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Android: Restart camera after QCameraFormat changesBartlomiej Moskal12 days1-2/+10
| | | | | | | | | | | | | Before this change, QCameraFormat was not immediately updated. It was remembered and updated only after restarting the camera. Because of this, the camera continued to generate frames with the old resolution. When recording the video, each frame had to be scaled to obtain the desired resolution. Task-number: QTBUG-122140 Pick-to: 6.7 6.5 Change-Id: If30ef071f0140bfde4e08afe43bbb9e392dc6e82 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: metadata - fix extraction of rotation metadataTim Blechmann13 days3-5/+58
| | | | | | | Pick-to: 6.5 6.7 Change-Id: Ic5d27ff7c763e5dd05af2f7205028985d97ae650 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: QGstreamerMediaEncoder - fix duration updatesTim Blechmann13 days1-0/+2
| | | | | | | | | | | | `QGstreamerMediaEncoder` has a timer to update the duration. This timer is stopped when `pause` or `stop`. We should update the duration in this case to cope with the duration that may have expired since the last update. Task-number: QTBUG-124183 Pick-to: 6.5 6.7 Change-Id: Ia8b0df7a1e19917b137260069eba1c053188c2b0 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: minimal player - add test to switch output widget dynamicallyTim Blechmann13 days1-15/+69
| | | | | | Pick-to: 6.5 6.7 Change-Id: If948d85b0845247d40dcff1fac0bcaa635d09cd5 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: prevent dangling references on glib callbacksTim Blechmann13 days4-3/+8
| | | | | | | | | by using `QGObjectHandlerScopedConnection` where possible. Pick-to: 6.5 6.7 Change-Id: I60b7c68700fea80cb05f37757d27ba095f840441 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: reference counting cleanupsTim Blechmann13 days12-60/+83
| | | | | | | | Simplify reference counting by using handle types Pick-to: 6.5 6.7 Change-Id: I78788cb73e9597dc9fcd37d86d4ae179dea7bdbf Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* CMake: fix styleTim Blechmann13 days10-27/+27
| | | | | | | | | by removing the space after `if` `endif` Pick-to: 6.5 6.7 Change-Id: I5fdec78af7e92d4f5a88ad79feca222cfeb5b7d1 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* GStreamer: metadata - reduce complexity for metadata lookupTim Blechmann13 days6-53/+185
| | | | | | | | | | Instead of doing a linear search, we can do a binary search in a constexpr array. Reducing O(N) to O(log(N)). Pick-to: 6.5 6.7 Change-Id: I5bdc42bfc73dc9993e80c7352d64e54bbffe9a28 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot13 days1-4/+4
| | | | | Change-Id: I15442dd988e69a92869871d2153e0e8f32a9379e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Ensure that EGL::EGL is promoted to global for the standalone QtMultimedia ↵Alexey Edelev13 days1-1/+5
| | | | | | | | | builds Pick-to: 6.5 6.6 6.7 Change-Id: If3914fcfc52033bc377d47153bdd1a7f4ac1b401 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Tim Blechmann <tim@klingt.org>
* GStreamer: QGstreamerImageCapture - modernisationTim Blechmann14 days2-38/+39
| | | | | | | | | | * use lambdas for asynchronous invocations * simplify control flow Pick-to: 6.5 6.7 Change-Id: I99695977d177978f1f108949d80fa750c0d72e73 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: QGstreamerImageCapture - simplify signalsTim Blechmann14 days1-18/+18
| | | | | | | | | Using a helper function to invoke a function via the event queue. Pick-to: 6.5 6.7 Change-Id: I11c95e5932721cbc373e40b34596f34ef616d812 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: QGstVideoRenderer - stop on EOSTim Blechmann14 days2-6/+36
| | | | | | | | | | This causes the widget to be cleared instead of remaining on the final frame. This brings the behavior in line with the ffmpeg/darwin backends. Pick-to: 6.5 6.7 Change-Id: Ieee834fadf831695891c13d4fc393bf626d19c04 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Update QML Media PlayerEd Cooke2024-04-2453-882/+1158
| | | | | | | | | | | | | | | | | Rewrite the QML media player with a new UI. Changes include: * Remove the menu bar and replace it with popups for file importing and track selection. * Replace the playback rate slider with +/- 10 second buttons and a playback rate combo box. * Add a timer to hide the playback controls when the mouse has been idle for 3 seconds. * Add a button to toggle between single play or infinite loop. * Add a layout for mobile using responsive layouts. Fixes: QTBUG-118474 Pick-to: 6.6 6.7 Change-Id: I0496766a79287e9eabd6f7aff8392a8ea0706920 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: fix unit tests for GStreamerTim Blechmann2024-04-241-21/+47
| | | | | | Pick-to: 6.5 6.7 Change-Id: I3327c62dc5b087402226a97212fa10abc4311a5e Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: media player - ensure semantics of media statusTim Blechmann2024-04-242-31/+137
| | | | | | | | | | | | | | | | | | * Loaded/LoadingMedia should only occur during when StoppedState * Buffered/BufferingMedia should not occur during StoppedState furthermore, not all decoderbin pipelines contain queues, so we need to count the queue elements that decoderbin could potentially add and that could send us GST_MESSAGE_BUFFERING messages. If there is no queue element that could do any buffering, the BufferingMedia will not be reached. Fixes: QTBUG-124414 Fixes: QTBUG-124415 Pick-to: 6.5 6.7 Change-Id: I6f89e607157250d7e1a777d57ec1df51cf462fc1 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: QMediaPlayer - fix playFromBufferTim Blechmann2024-04-241-3/+5
| | | | | | | | | | | `m_localVideoFile->toLocalFile()` didn't result in an QUrl that QFile could load, causing the playFromBuffer test to be skipped. So we need to build an url by hand. Pick-to: 6.5 6.7 Change-Id: I8ba1d7e39613aa8c20aaabe55650587e2ff7694a Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: avoid mocTim Blechmann2024-04-242-13/+10
| | | | | | | | | | | We only need to derive from QObject for the purpose of memory management, but we don't necessarily use slots, since we can use a lambda function to connect the progress timer Pick-to: 6.5 6.7 Change-Id: I4711748efd407fcff9d3e0b2efb0a7843fa72a83 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Fix real dot in location keys regular expressionLucie Gérard2024-04-231-1/+1
| | | | | | | | | | | Location keys are meant to be used as regular expression. The . need to be appear as `\.` in the regular expression. The JSON parser interprets the `\`, hence the `\\.`. Pick-to: 6.7 Task-number: QTBUG-121039 Change-Id: I8aec3c6c55bf8c78008912ee3cae867b5ce4c71e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Tests: improve error reportingTim Blechmann2024-04-231-3/+3
| | | | | | Pick-to: 6.5 6.7 Change-Id: I4eebe17d40fa76ac5335fff2cad88e329cfb14b6 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* QMediaPlayer: add test for un-connected audio/video outputTim Blechmann2024-04-232-1/+56
| | | | | | | Task-number: QTBUG-124501 Pick-to: 6.5 6.7 Change-Id: I9d10151f2b439d2f21916942b14ba7b2227dae5d Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* declarative-camera example: Hide video View button if none recordedMikko Hallamaa2024-04-231-1/+2
| | | | | | | | | | | | | | The View button was visible even when no video was recorded. This was due to the assumption that actualLocation would evaluate to false if empty (see QTBUG-63629). This patch fixes the evaluation by converting the url to string, and comparing to empty string. Fixes: QTBUG-121172 Pick-to: 6.7 6.5 Change-Id: I642b03b439f57002bc505c46ee0045dc7cdbe514 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* QMediaPlayer: tweak test for negative playback ratesTim Blechmann2024-04-232-2/+20
| | | | | | | | | Some backends support negative playback rates, others don't. The tests should reflect that. Pick-to: 6.5 6.7 Change-Id: I15eaa863fc6d082c4fd9597cb5d54b880d927812 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* tests: silence -Wsign-compare warningsTim Blechmann2024-04-232-3/+3
| | | | | | Pick-to: 6.5 6.7 Change-Id: Ia3671bb17b2d1bd818caa0ed8890489dd19e6e92 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: set nativeSize only on video streamsTim Blechmann2024-04-231-3/+3
| | | | | | | | | Prevents warnings of trying to resolve the nativeSize for media without video content. Pick-to: 6.5 6.7 Change-Id: I33c78183314fc2f9c0b0a40745461f045d16aaf7 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: fix setting playback rate when pipeline is stoppedTim Blechmann2024-04-233-3/+9
| | | | | | Pick-to: 6.5 6.7 Change-Id: I4c0a244bd01f44849cb8d96f8473c2848dcc41e6 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: Fix use after scopeTim Blechmann2024-04-231-3/+3
| | | | | | | | | | | `videoFrameChanged` can be called from `~QMediaPlayer`, causing stack-use-after-scope address sanitizer errors. We need to make sure that the counters outlive the QMediaPlayer. Pick-to: 6.5 6.7 Change-Id: I05d9d225a8f5a4b8b6c8c1bf120d93d070e7fc1b Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Add missing 'focusModeChanged' property notificationArtem Dyomin2024-04-221-1/+1
| | | | | | | | | | | | Notifying is need for the correct update of the property dependencies in qml. Pick-to: 6.7 6.5 6.2 Change-Id: I31426c799c3d996b0b02b0bcfe24446bf4e78c2d Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Sutterud <lars.sutterud@qt.io> Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
* Add missing implementation for QWaveDecoder::setIODeviceDoris Verria2024-04-221-0/+4
| | | | | | | | | | | | QWaveDecoder defines setIODevice but the implementation is missing. This was giving missing symbol errors for Python bindings. Add an empty implementation for now to avoid those. Pick-to: 6.7 6.5 6.2 Change-Id: I8ed41df6ccc3075dd79292a28a18f73dbd4d145e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Test: media selector - add environment variable to skip media validationTim Blechmann2024-04-211-0/+3
| | | | | | | | | | Media validation takes some time. This patch allows devs to override the media validation e.g. if they know all formats are supported. This reduces the turnaround times of running tests quite significantly Pick-to: 6.5 6.7 Change-Id: If93795a878eb4dda1ff02797aafe0b56397b4a0a Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Document how to configure and build Qt MultimediaJøger Hansegård2024-04-202-0/+97
| | | | | | | | | | | Building Qt Multimedia with full feature support requires FFmpeg and the build process is currently not well documented. This patch aims at making it easier to build Qt Multimedia. Fixes: QTBUG-118713 Pick-to: 6.7 6.5 Change-Id: I4d4086b4d83445a40a6d9ea6b0bc6eccee05af6f Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Add m_ prefix to member variables in QFFmpegThreadJøger Hansegård2024-04-192-10/+10
| | | | | | | | | | | This makes it a bit easier to distinguish between local variables and member variables. Pick-to: 6.7 6.5 Change-Id: I3a16717f0663c4ef628858f810b36508887f9bad Reviewed-by: Lars Sutterud <lars.sutterud@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Update dependencies on 'dev' in qt/qtmultimediaQt Submodule Update Bot2024-04-191-4/+4
| | | | | Change-Id: I9faa83f0ac5a02f4842c0019e90c38fddc0fd4a1 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* GStreamer: Rank down the gstreamer-vaapi pluginsJithin Nair2024-04-192-0/+28
| | | | | | | | | | | | | Gstreamer-vaapi plugins not working while selecting driver as iHD. Vaapi plugins are disabled from gstreamer release 1.22.0 and suggested to use va plugins instead. Ranked down gstreamer-vaapi plugins if Gstreamer version is less than 1.22 Task-number: QTBUG-123931 Pick-to: 6.5 6.7 Change-Id: I98965cda299394665947e0453699299e0320709d Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Pulseaudio: replace toQString methods with qDebug overloadsTim Blechmann2024-04-185-70/+82
| | | | | | | | | Reduces visual noise of the tracing code and avoids run-time unicode conversions. Pick-to: 6.5 6.7 Change-Id: I083896fcd37e0fd2ebf91da90eda4ef6729dd49d Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* pulseaudio: separate out error getter functionsTim Blechmann2024-04-185-17/+37
| | | | | | | | | | | | * returning as `QUtf8StringView` allows us to enforce the character encoding with the type system * replacing .arg with << to reduce noise in tracing code / avoid qstring conversions Fixes: QTBUG-123447 Pick-to: 6.5 6.7 Change-Id: I53fcc289ebbeca1dd7628a1609cae7e9f6154c77 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: tweak thumbnail testTim Blechmann2024-04-181-1/+5
| | | | | | | | | | Qt interprets GST_TAG_IMAGE as CoverArtImage and GST_TAG_PREVIEW_IMAGE as ThumbnailImage. This is the reverse of the ffmpeg backend. Task-number: QTBUG-124380 Pick-to: 6.5 6.7 Change-Id: Ifb8f2837775893a55de7516fff82772292deab12 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: QGstAppSource - avoid pingpoing with main threadTim Blechmann2024-04-182-15/+51
| | | | | | | | | | By avoid the event queue when interacting with the QIODevice we work around deadlocks when waiting for data which may be fed to the QIODevice from the main event loop. Pick-to: 6.5 6.7 Change-Id: I98c302b55d109a748cdf70401dd77cff6d3da008 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: media backend - align expected durationTim Blechmann2024-04-182-1/+9
| | | | | | | | | The duration differs between the backends, where darwin, gstreamer and ffmpeg report slightly different durations. Pick-to: 6.5 6.7 Change-Id: Id0130b82e9799051a10c0782179452dc56d86cbf Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: improve mediabackendutils.hTim Blechmann2024-04-182-12/+27
| | | | | | | | some quality of life improvements Pick-to: 6.5 6.7 Change-Id: I8cee3f6f59584b95a09569d5a92a2381a5796bfd Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: Media player - ensure `stop()` to go to position 0Tim Blechmann2024-04-181-1/+6
| | | | | | | | Fixes stop_setsPositionToZero_afterPlayingToEndOfMedia. Pick-to: 6.5 6.7 Change-Id: Iade9de963ef4f4925fb5e0ececcc95e2e1c18d7f Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: fix resource not found error handlingTim Blechmann2024-04-182-7/+34
| | | | | | | | | | GStreamer seems to report GST_RESOURCE_ERROR_NOT_FOUND multiple times. So we filter this to send it only once per `setMedia`. We also unset the url to make future `play()` invocations behave correctly Pick-to: 6.5 6.7 Change-Id: Ib04ee8c6b062cd9f343a9323f94678812f7e2d18 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>