summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of QMediaCaptureSession::isAvailable()Lars Knoll2021-06-172-10/+1
| | | | | | | | We expect some basic capturing support to be there on all our platforms. Change-Id: I913f98562fdd47cf887c98edbefba6976ff211ba Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix parameter namingLars Knoll2021-06-171-2/+2
| | | | | | Change-Id: I23e0820dbf5a46a00c52f67ac58866741b79d07d Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Mark some methods on QMediaFormat as invokableLars Knoll2021-06-171-4/+5
| | | | | Change-Id: Ia2aac9b59458c99aaf3ee34a480e52f9f425576b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix parameter naming after API reviewLars Knoll2021-06-172-10/+10
| | | | | | | | | microseconds is a lot clearer than duration. Change-Id: I9e3aa5b60cac8c16cb7466ed68bd98d4e6f1bc9f Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Fix the QAudioDecoder APILars Knoll2021-06-1714-428/+93
| | | | | | | | | | | | | | | | Adjust API after code review. Remove the audioFormat property. QAudioDecoder will now always decode to the native format used in the encoded file. QAudioBuffer will have the correct format set, and it's up to the app to handle this correctly. Remove state() and replace by isDecoding(). Change-Id: I6f2ac375d98b2d7c36aebaa729599f78699b1c7b Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove old configure-related filesJoerg Bornemann2021-06-171-216/+0
| | | | | | | | | | | | | Remove the configure.json and configure.pri files that were used for the qmake-based configure. Remove the .prev_*.cmake files that were a by-product of configurejson2cmake.py. Pick-to: 6.2 Task-number: QTBUG-89536 Change-Id: Ic49fc29fa36c98d15385d8c94542d5cdc5598520 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix qSwap(QMediaFormat, QMediaFormat)Ulf Hermann2021-06-171-1/+6
| | | | | | | | | You need to swap all members. Fixes: QTBUG-94565 Pick-to: 6.2 Change-Id: I0decfb3ea033bc358c39618a36d77ca9e0972e84 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QCameraImageCapture to QImageCaptureLars Knoll2021-06-1759-363/+362
| | | | | | | | Fixup the backend class and file names while we're at it. Change-Id: Ib0928dfebb6f127b7a43683b2907420c95af6599 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QCamera::StatusLars Knoll2021-06-1717-185/+21
| | | | | | | | The enum is not really useful. Instead isActive() and error() provide all the information required. Change-Id: I2856c833745e79f74bb2a9d95f0ef65eafd24413 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: Fix for content Uri issue on AndroidMediaMetadataRetrieverPekka Gehör2021-06-171-1/+1
| | | | | | | a QFileDialog return file path as content://com.android.providers.media.documents Change-Id: I0ceba5d8cd592c4e7323fdb10aec90d653290932 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add ${QtBase_VERSION_MAJOR} to multimedia jar fileAssam Boudjelthia2021-06-173-5/+5
| | | | | | | Follow the existing pattern for jar files in Qt 6. Change-Id: I0db5435e71743615ff6f4f7f850d0a57504346b6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make setOutputLocation behavior consistent across supported platformsPiotr Srebrny2021-06-1617-199/+103
| | | | | | | | | | | | | | | outputLocation is always set regardless of whether is it valid or not, unless platform does not support encoding. If the output location is not writable an errorOccured signal is emitted. QNX and Android stored outputLocation in the capture session object. This has been removed and instead a recording(QUrl location) call is used to provide location information for the recording session. Reset m_mediaRecorder after deleting in QAndroidCaptureSession::start Change-Id: Ib1048410945aaf36532eb8606a4f9eb47460daf7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows: Fix active camera set in media device sessionAndré de la Rocha2021-06-161-1/+4
| | | | | | | | | Resets the active camera in the media device session when a null camera is set in the capture session. Change-Id: Id843ac556e98dab880720be13beed1bb9c621e0c Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add metadata to captured media on WindowsAndré de la Rocha2021-06-166-23/+245
| | | | | Change-Id: I41957e8f8ba2d8ab59e206e14db349d6fbf13a6c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix media codecs resolver when switching between audio and audio/videoPiotr Srebrny2021-06-161-4/+7
| | | | | | | | | | | | Removing isSupported condition as it is true when audio only format is selected while flags indicate that video codec is required. The same occurs when going from audio/video format to audio format. Reset format if it does not support video while required. Change-Id: I2c056d935351cfc7a471a7376fa51da320cdb353 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* QMediaPlayer API cleanupsLars Knoll2021-06-163-50/+36
| | | | | | | | | | Remove the autoPlay property, and split up the setSource() method into setSource(QUrl) and setSourceDevice(QIODevice) for more clarity. Change-Id: I3e973fb5b6aa50f192af898f1b07769a201c6845 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Rename shutterSpeed() to exposureTime()Lars Knoll2021-06-163-20/+25
| | | | | | | | | | That's really what it is, and how all other frameworks name it. Shutter speed is a name that really only works for old analog cameras. Change-Id: I52fc5619dd9a853cabd3abef2ddec2e2b8cba119 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Rename QCamera::cameraInfo to cameraDeviceLars Knoll2021-06-1612-66/+66
| | | | | | | | And take the opportunity to clean up variable naming as well. Change-Id: I510cc8295b8d35554534a3c2ac9d83bf6f5a9d65 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Add a QAudioDevice property to QSoundEffectLars Knoll2021-06-162-0/+19
| | | | | | | | | Without it, the QML SoundEffect can't target a non default device. Change-Id: I114a1e712cdc4ff1bfdc4b131db97cbe4d6eb90f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* The volume property should use floatLars Knoll2021-06-162-7/+7
| | | | | | | To be consistent across Qt Multimedia Change-Id: Id0cea5bc1c844e43448107d1cf2a2b22ad297109 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Get rid of QAudio::RoleLars Knoll2021-06-1625-364/+7
| | | | | | | | | This was only ever implemented to some extent for Android. Remove for now, as it's not really an important feature and can't be implemented properly on many of our platforms. Change-Id: Idc4d21c857380088ca6d10d59a0e05d192899534 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QAudioDevice::Mode accessible from QMLLars Knoll2021-06-161-0/+1
| | | | | Change-Id: Idad1154f0b4ae5d0737d04ed02a890952ed70b10 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Get rid of QMediaEncoderSettingsLars Knoll2021-06-1621-621/+457
| | | | | | | | | | As per API review, fold this class into QMediaRecorder as that's the only place where it is being used. This removes one level of indirection from the API and also makes it possible to use from QML. Change-Id: Id9157df04512382cce28e89b082433ec67d36b28 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QMediaEncoder to QMediaRecorderLars Knoll2021-06-1645-365/+365
| | | | | | | | As per API review, this is the better name. Since we removed the old QMediaRecorder class, the name is free as well. Change-Id: I1ec9af3876af8b6957e20c13f9e225bf1e5032d5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Kill QMediaEncoderBaseLars Knoll2021-06-1619-91/+81
| | | | | | | | | | The class was only needed because of QMediaRecorder. Now that that class is gone, we can move the enums into QMediaEncoder. Also rename the State enum to RecorderState as per API review. Change-Id: I2e0811e2c29f922265ac5a719226b647236e52b9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Kill the current QMediaRecorder classLars Knoll2021-06-1623-797/+76
| | | | | | | | The class provides only minimal convenience over using QMediaCaptureSession directly. Change-Id: I706bb6821fbf8a7cc79a86819001ee1fd669733e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Get rid of QImageEncoderSettingsLars Knoll2021-06-1617-347/+265
| | | | | | | | | | | Move the API for setting file format, quality and resolution into QCameraImageCapture and get rid of the separate QImageEncoderSettings class. This simplifies our API and makes the QML integration easier. Change-Id: Iaac2a6e3ff50c7379c44d70001db7c52d8cb0c90 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move the QAudio::Mode enum inside QAudioDeviceLars Knoll2021-06-1639-111/+122
| | | | | | | | QAudioDevice is the only class using that enum, so it makes more sense for the enum to live there. Change-Id: I11e6768d1114d63e68d1956f7d6e62786524c291 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Implement QPlatformAudioDecoder for macOS/iOSDoris Verria2021-06-145-0/+680
| | | | | Change-Id: I43fa28f43f6717ea408d677b021db7a90ec1df1d Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Android: Fix for content Uri issuePekka Gehör2021-06-141-16/+6
| | | | | | | a QFileDialog return file path as content://com.android.providers.media.documents Change-Id: I2c10548b5314aba38f3affdb68e7fa0c1f5bb78c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Use QAudioOutput in QMediaPlayerLars Knoll2021-06-1126-447/+310
| | | | | | | | | | | | | | Adjust QMediaPlayer to the new audio output architecture. One now needs to explicitly add a QAudioOutput to the media player to get audio playback. While this requires two more lines of code to set up the media player, it does make the API consistent between audio and video and also consistent with what we have in QMediaCaptureSession. Adjusted auto tests where required and ported all platforms. Change-Id: I247e915e4862dee6d6bce367b83664b1d1d69726 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add audio output selection to the capture sessionLars Knoll2021-06-1110-76/+112
| | | | | | | | | | | | Make it possible to select an audio output in the capture session. This gives an audio monitor channel to monitor the recording. Currently only implemented on gstreamer. Change-Id: I1da3d80c71253364c99ee49c770f8665527d01a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Use QAudioInput in QMediaCaptureSessionLars Knoll2021-06-1132-345/+226
| | | | | | | | | | | | | | | | | | | | | | Convert the audioInput property to use a pointer to a QAudioInput in line with the API changes planned. Not setting up a QAudioInput implies that you do not get any audio. Move the volume and muted properties over to QAudioInput, they should really not be part of the QMediaCaptureSession. Adjust the platform API accordingly and adjust implementations. The Android adaptation is incomplete, but that was the case before as well. This needs some refactoring to properly support setting devices and adjusting volume/muted. Dynamically adjusting to changes of the audio input device is not yet implemented on Windows. Change-Id: I2fb63b9e57908d6dc02130b8d534ef7ac1a1ac85 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add QAudioInput/OutputLars Knoll2021-06-1111-9/+670
| | | | | | | | | | | Add those classes representing physical inputs/outputs to be used together with QMediaPlayer and QMediaCaptureSession. Introduce corresponding backend classes so that the class can directly control what's happening on the backend side. Change-Id: I9b25b2fb30791ef1a38211796917eb63d840db08 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix a compiler warning on MSVCLars Knoll2021-06-111-1/+1
| | | | | | | | MSVC doesn't like */* sequences :) Change-Id: I4bebcea733f803b4cf21de184295836bc3651902 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QMediaEncoder::encoderSettings available from QMLPiotr Srebrny2021-06-102-0/+6
| | | | | Change-Id: I1e7097435ed4e7c5a69766db8a67aae99a7c57df Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use new call of QNativeInterface::runOnAndroidMainThread()Assam Boudjelthia2021-06-102-7/+4
| | | | | | | Remove last usage of QtAndroidPrivate. Change-Id: I9a30f92d84f51b0cb1d1d0298bf523be91d3e8e4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Forward actualLocation from QMediaEncoder to QMediaRecorderPiotr Srebrny2021-06-092-3/+11
| | | | | Change-Id: I6570ea084ccfa2034a2d6c98d0876e8c3e227148 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace deprecated Q_ENUMS with Q_ENUMPiotr Srebrny2021-06-0913-35/+33
| | | | | Change-Id: I86d37b25783c844af92a6ef260547cb26848b1fb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for audio-only recording on WindowsAndré de la Rocha2021-06-0915-215/+240
| | | | | | | | | | Also renaming QWindowsCameraSession to QWindowsMediaDeviceSession and QWindowsCameraReader to QWindowsMediaDeviceReader, since the device now may be an audio-only device as well. Change-Id: I2e7b80b9400086749d3fdb8996e0f4bf642ea94d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove the CaptureMode argument from the createCaptureSession() methodLars Knoll2021-06-0814-18/+17
| | | | | | | | | The argument has not been used since quite a while. Change-Id: If62ee3ad7f93b49d1a8c19fd8fbd084f67c43033 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QCameraInfo/QAudioDeviceInfo to QCamera/AudioDeviceLars Knoll2021-06-08134-578/+581
| | | | | | | | | Those classes represent the physical device and it's properties, thus that name fits best. Change-Id: I0f45fc875ae6110452c1f2fb17f32adbe5155d01 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix a use after free error in QMediaDevicesLars Knoll2021-06-081-22/+5
| | | | | | | | | | Don't hold a pointer to the QPlatformMediaDevice instance, as the instance could get deleted when the QPlatformMediaIntegration gets deleted. Change-Id: Ieb3ba88a6efee55d6816eeea16e4f62edfcf0eac Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Update to latest qml CMake APIAlexandru Croitor2021-06-077-111/+19
| | | | | | Task-number: QTBUG-91621 Change-Id: I0a096697f692378f8be7b942d06ee231c399319d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Indicate default audio device and notify when it changesPiotr Srebrny2021-06-052-75/+60
| | | | | | | | | | | | The availableDevice function uses device enumerator to find default device and devices friendly names. Removing redundant CoInitialize/CoUninitialize as this is done in constructor and destructor. Fixing a memleak in OnDeviceAdded method. Change-Id: I2ee8d52dd2d66e2df81f44fa99519a0c85bf49b0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Remove some outdated internal documentationLars Knoll2021-06-041-64/+0
| | | | | | Change-Id: I95a27d372aae809b1201dbaa0dcd55e9262f1a12 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QAudioOutput to QAudioSinkLars Knoll2021-06-0445-449/+448
| | | | | Change-Id: If852737b85d3ca95d55a852a3c50f80a5a09c61e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QAudioInput to QAudioSourceLars Knoll2021-06-0444-453/+451
| | | | | | | | | | | | | | | | | | | | | | | | | The renaming is a part of some changes coming from an API review that tries to solve the problem of not having API symmetry between QCameraInfo/QCamera and QAudioDeviceInfo where QAudioDevice is missing (so you can't select a nullptr as the input/output device to disable it). One issue is that QAudioInput/QAudioOutput are there for reading and writing low level PCM data from an audio device. They as such are not quite suitable as classes to use together with QMediaPlayer or QMediaCaptureSession, as they allow direct writing of data bypassing the player or capture pipeline. To solve this, we renamve those classes to QAudioSource/Sink (making it a bit more symmetric with QVideoSink). That opens up our API space for a QAudioDevice class avoiding names that feel like they are doing the same thing. The patch also renames things on the backend side to keep API and implementation consistent. Change-Id: I9f6b4892d3eee4e252cb3782e681b0c3824f27e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Allow different camera resolutions and frame rates on WindowsAndré de la Rocha2021-06-046-9/+114
| | | | | | | | | Allows the resolution/frame rate to be selected and uses by default a configuration with high resolution and high frame rates, instead of using the default configuration, which may be of low quality. Change-Id: I21aec48b438d99ea9b38b6257be2f16480523c71 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the inheritance between QMediaEncoderSettings and QMediaFormatLars Knoll2021-06-0415-194/+258
| | | | | | | | | | Inheriting from value classes is not a good principle for our APIs, and it doesn't work for the QML side neither. Instead, simply give QMediaEncoderSettings a QMediaFormat member. Change-Id: Ib2cd8b04c09e89f8f57a91898ce987c199d66c75 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>