summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Remove contrast/brightness/hue/saturation properties from QCameraLars Knoll2021-05-192-105/+11
| | | | | | | | | | | Those methods are only supported on gstreamer (they don't exist on macOS/iOS). They are probably better implemented as a postprocessing effect anyway, so remove the from QCamera to keep the API smaller and more manageable. Change-Id: Ic203b3cac3384cdb0b6648366d47f6254f299197 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Cleanup the QMediaEncoder backend architectureLars Knoll2021-05-192-4/+2
| | | | | | | | | | | QPlatformMediaEncoder should not be a QObject, as with the other backend classes. Instead, the class now tracks some state to simplify the implementation of the platform dependent code and emits the signals for the frontend. Change-Id: Iec45638de4333cb9e88f89c448194b49a5de0e1e Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix recording error in spectrum exampleDoris Verria2021-05-191-0/+5
| | | | | Change-Id: Icbd7c7f9969c13149ca0b455cd7bd43693d5cb01 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge QCameraImageProcessing into QCameraLars Knoll2021-05-182-28/+19
| | | | | | | | | | | At the same time remove the colorFilter property. Color filters are at most a post-processing effect and should not be part of QCamera itself. The support for the filters was in any case missing pretty much everywhere (except gst-photography, which is not supported by most cameras today). Change-Id: I59306cc75470b11490feeb910c26a414d796f9f1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge QCameraExposure into QCameraLars Knoll2021-05-181-1/+1
| | | | | | | As per API review, let's only have one class for QCamera. Change-Id: I663e238e93ffd83708821e46f8f154c1fdc07731 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge the QCameraFocus API into QCameraLars Knoll2021-05-182-5/+5
| | | | | | | | | After API review, we decided that one large API in QCamera is easier than having separate sub-objects that are only trying to structure the API. Change-Id: I5f820a580db1ddb3f47e11b88ca86215997f96ce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Cleanup the audio decoder architectureLars Knoll2021-05-171-1/+1
| | | | | | | | | | | | | | | QPlatformAudioDecoder should not be a QObject, instead just have a pointer back to the front-end class. The backend is now also properly owned by the frontend. Get rid of QAudioDecoderPrivate, we don't need it anymore. Fix the audiodecoderbackend autotest and the audiodecoder example. Change-Id: Id9a3368788b5398f37b77be819e8f12947ba045f Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a number of compiler warnings/errors when using gccLars Knoll2021-05-142-8/+6
| | | | | | Change-Id: Ifa7bcd4507948cd61909a11af203852ee1586787 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove dependency on qtandroidextrasAssam Boudjelthia2021-05-124-58/+12
| | | | | | | Remove use of Qt Android Extras APIs. Change-Id: I020a3966b284f19d7f0c4b313543bb4c4820f039 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Change menu item text in camera exampleDoris Verria2021-05-121-2/+2
| | | | | | | | | For some reason, the menu items in the camera example will not appear on Mac if the text description is set to Settings or Exit. Change-Id: Idd5baa1283dbb75486f8012a8ae559508b4e6850 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Support Audio-Only recordings on macOSDoris Verria2021-05-102-0/+48
| | | | | | | | | Add functionality to AVFAssetWriter to capture audio-only recordings. Change AVFCameraSession and and AVFMediaEncoder accordingly. Change-Id: I65afc50b524eaed82c2baa0dd99fba101a7b111b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some API and doc fixes for QAudioDecoderLars Knoll2021-05-073-4/+4
| | | | | Change-Id: I0f839896c9f813939b99b01242b54a00796731a8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace category in QAudioOutput with an audio roleLars Knoll2021-05-072-13/+0
| | | | | | | | | This makes the API consistent with QMediaPlayer and removes a place where we accepted random strings without knowing what the backend might do with them. Change-Id: Icdd699bc547eacb9250f4e860e23e5f645dc45d8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QMediaDeviceManager to QMediaDevicesVolker Hilsheimer2021-05-0715-43/+43
| | | | | | | | | | Reflect that also in the plugins, where classes are renamed from e.g. QXXXDeviceManager to QXXXMediaDevices. This is for consistency with QPlatformMediaDevices, and because QDarwinDevices would be too generic. Change-Id: I78f63f0b8c2aa68aa3f8fb4936e0838281b3222a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compilation on LinuxLars Knoll2021-05-074-4/+4
| | | | | Change-Id: Id058ad0ba34bf3810a09591dd51cddedbda7c2e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QAudioDeviceInfo: drop Range type, simplify APIVolker Hilsheimer2021-05-075-36/+32
| | | | | | | Adjust platform implementations accordingly. Change-Id: I51a74c62d37d681ef3b604ac6742b1f0f489aa74 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix bugs in QSoundEffectLars Knoll2021-05-071-1/+3
| | | | | | | | | | | | | | Those lead to sound effects not being played back. Also, the audiodecoder example would not close the wav decoder, leading to invalid sizes defined inside the wav file. There's still a bug left that causes the playback to be chopped into chunks, but that seems to be a separate problem inside the gstreamer code base. Change-Id: Id432e7ded128bd2cc0253e12bba06a1595900a3d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: use correct targetSamuli Piippo2021-05-061-1/+1
| | | | | | | Ammend 8314e7216e9f1312bf4294c94977ba75d19b9e9d with correct CMake target. Change-Id: I3b155edce2574683e456e2587c56f62275f8b0c1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup status handling in QMediaPlayerLars Knoll2021-05-031-1/+0
| | | | | | | | | | | | | Remove the UnknownMediaStatus enum (it's really not helpful) and avoid storing a copy of the status in the frontend class. Store the status in the platform media player instance. This requires some further cleanups to avoid that the reimplementations store their own copy. Change-Id: I939e78808f0eaa6a398560661df66c9d986fdd91 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup and refactor QGstAppSrcLars Knoll2021-05-031-1/+1
| | | | | | | | | | | | | Clean up the code in QGstAppSrc. Use the new QGst* classes, and move creation of the GstAppSrc into the class by default. We still need a way to use an externally defined app src for playbin support in the audio decoder, so still allow that. Adjust usages of the API in all places. Change-Id: Ibcad7e4c836ca9572dfc3d8ed17b7f1980913619 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move handling of QAudioInput/Output::processedUSecs() to the frontendLars Knoll2021-04-301-4/+2
| | | | | | | | | There's no need to handle this in platform specific code, when we might as well handle it in platform independent code. Change-Id: Ie0cdd49d41f0ecb5b784fc1564af71a106e41ad0 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: deploy libfftrealSamuli Piippo2021-04-241-0/+14
| | | | | | | Needed by the spectrum example. Change-Id: I37e8e81145c228c9709b42ee59a7d1dbc0878d02 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qaudiobuffer and qaudiodecoder autotestsLars Knoll2021-04-231-1/+1
| | | | | | | | Fix one enum value in the public API to better reflect the error that is happening. Change-Id: I4a71d64c79d443eb6fa9068defb90f3b436ec194 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Remove qmake files from the repositoryLars Knoll2021-04-2328-565/+0
| | | | | | Change-Id: I1131b555014a57e3224a8871de4cb1d01c406fd1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Further cleanups of the VideoOutput APILars Knoll2021-04-191-2/+7
| | | | | | | | | | Remove the mapTo* methods. QQuickItems has mapping methods, and those should cover what's needed. Everything else can be done using the source/contentRect properties. Change-Id: I27d039a4a74ca815f8f5645f50cfc17238842041 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove unused source property from VideoOutputLars Knoll2021-04-192-3/+0
| | | | | | | | It's a left-over from the old architecture. Change-Id: Ide5cf7c6ff79e459a81963e6d04b9e1164bb3491 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QML runtime warningsLars Knoll2021-04-193-5/+6
| | | | | | | | Stop using deprecated syntax. Change-Id: Ic5f4c0a9a3737a61283eb147a9d2323f4de6771a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a nullptr dereferenceLars Knoll2021-04-192-1/+9
| | | | | | Change-Id: I13c484d011b689d3df5d71944d722562181e36d7 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix camera permissions on macOSLars Knoll2021-04-192-0/+50
| | | | | | Change-Id: I0b869bb3db48b16588179ec643999de6885b1d6a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some smaller fixes for declarative-cameraLars Knoll2021-04-193-3/+51
| | | | | | | | | | Add Info.plist template to get camera permissions on macOS Fix camera selection if you have more than one camera Avoid some warnings about non notifiable properties Change-Id: I30e2802053019bb91e6650c9162601aad25bb74d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix the declarative-camera exampleLars Knoll2021-04-196-37/+41
| | | | | | | | Adjust it to the API changes that happened on the QML side. Change-Id: I17e6be334ce5a6afb4558f946d8bd7bbcd0a6d32 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Convert the remaining QML APIs related to captureLars Knoll2021-04-191-1/+1
| | | | | | | | | Expose the C++ classes to QML instead of having all those wrapper classes. Change-Id: Id151a386a8f13da5c0eda3fa06a6e3b7032e0cb6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* New QML API for image capturingLars Knoll2021-04-191-3/+2
| | | | | | | | | | | | | Adjust the QML API for image capturing to fit with the new handling of capture sessions. Simplify some things and avoid using a wrapper class to the largest degree by inheriting from QCameraImageCapture. Remove the old image capturing code. Change-Id: Ic99116f5202f2d0438fe0d048be2faa6687f0e4b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add error handling for QML Camera itemLars Knoll2021-04-192-8/+8
| | | | | | | | | | | | By adding some Q_PROPERTYs and a changed signal for errors. And rename the QMediaPlayer::error() signal to errorOccurred(). This doesn't conflict with the error() getter and makes it consistent with the Camera item. Change-Id: I9d94d86df64066b5b6b2bfa9229d45b80b91b09f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QMediaDeviceManager available to QMLLars Knoll2021-04-199-17/+19
| | | | | | | | | | | | This required some changes to the QMediaDeviceManager API, namely that it can be instantiated itself. Add required API as properties to QMediaDeviceManager and expose QAudioDeviceInfo and QCameraInfo as well. Change-Id: I4f7ef04d703f84cc6caefd62ad453f166e3b1c9b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use the C++ based Camera itemLars Knoll2021-04-161-7/+11
| | | | | | | | | The old one doesn't work anymore, and this allows for some level of testing on the QML side. Change-Id: I8163d8c8cd2ab7c021f138e844128300d26debf2 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename videoPreview to videoOutputLars Knoll2021-04-161-1/+1
| | | | | | | | | | It's better to be consistent with QMediaPlayer. Also add the required QVariant based overloads, that we need for QML. Change-Id: I583bc795c029f35373546a6e673c575a7c20dfa1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Use QCameraFocus directly in QMLLars Knoll2021-04-161-2/+2
| | | | | | | | | | | And get rid of QDeclarativeCameraFocus. At the same time move the zoom methods into the CameraFocus object to be consistent with our C++ API. Change-Id: Ic20027dd320453704d6a5ab3c57bd21e55b4fa90 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Kill all versioned importsLars Knoll2021-04-1694-111/+111
| | | | | | | | And don't register the items with a version neither. Change-Id: I514480fe7570cba468404bc891f238991690f499 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Get rid of QDeclarativeAudioLars Knoll2021-04-161-2/+0
| | | | | | | | | | The class was a wrapper class for QMediaPlayer used for the MediaPlayer and Audio QML types. Remove it, as QMediaPlayer can be exposed directly. Change-Id: I46a13741ceb170db57c8bb54b7a922e483eab537 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* API cleanups in QMediaPlayerLars Knoll2021-04-168-27/+32
| | | | | | | | | Rename some methods with better names and adjust the API so that it also can be used for QML. Change-Id: Ica19675966680416fbe870808336d8fc82065bc1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Clean up QVideoSink and it's platform implementationLars Knoll2021-04-161-4/+4
| | | | | | | | | | | | * Normalize ranges of brightness and friends to [-1, 1] and use floating point numbers. * Remove getters for values from the platform API, rather store them in the frontend. This simplifies the work that needs to be done on the backend side. Change-Id: I8d63dacaa6b2873b33e17fcd7831e41173109a7e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Rename QVideoSurfaceFormat to QVideoFrameFormatLars Knoll2021-04-141-3/+3
| | | | | | | | | The class is used exclusively together with video frames to describe their format, so the name should reflect that. Change-Id: I10bec7a0556b22c69ac790a99282e1376ce4af97 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QAbstractVideoFilterLars Knoll2021-04-147-909/+0
| | | | | | | | | | | | | | The API covers a relatively rare use case, and is far from ideal, as it doesn't cooperate very well with HW accerlerated rendering. Since QVideoFrame and the QML VideoOutput item offer the option to get a texture for the frame, it's probably better to use that as the basis for further processing. Change-Id: I89deb915f660312fb3a83b066a5371f5454346da Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the notifyInterval() functionalityLars Knoll2021-04-082-6/+10
| | | | | | | | | This was nothing else than a timer, something you can just as well implement on top of Qt Multimedia if required. Change-Id: I1ef362f1f4ad5a5f85e92bfbb1d73b7710271e5c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaPlayer::setCustomRole() and relatedLars Knoll2021-04-083-13/+0
| | | | | | | | | setAudioRole should be enough here. And if more roles are required, let's rather extend the enum. Change-Id: I40194171c6053ffa1d3adf309e77d85a8c6524e2 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use the infra in QVideoSurfaceFormat to get shaders and uniformsLars Knoll2021-04-071-1/+1
| | | | | | | | | | frame mapping is still done in qtmultimediaquicktools, but once that's moved as well, we can radically simplify the rendering code there. Change-Id: Ia56c8b62c5726f1bfea0b0c4c46a81e103141e9e Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QAbstractVideoSurfaceLars Knoll2021-04-062-2/+2
| | | | | | | | We're not using it anymore, QVideoSink is the replacement. Change-Id: I6b29838c39db421d5bca281b28e97e0e0b72caad Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Move the PixelFormat enum from QVideoFrame to QVideoSurfaceFormatLars Knoll2021-04-063-6/+6
| | | | | | Change-Id: Ifa888c74c397c640b19387a9ce624dfcf8269c2c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove the custom video surface examplesLars Knoll2021-04-0619-1491/+0
| | | | | | | | | | | They are actually pretty bad examples, as they use QAbstractVideoSurface (which completely changes), and worse, draw everything in software, which is really bad performance wise. Change-Id: I6e6b51baa0915cc52f0741fc47fcbd105d880491 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>