summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Attempt to make the qcamerabackend test passLars Knoll2021-05-262-0/+11
| | | | | | | | | | | | | Blacklist things that are not yet implemented. Fix a nullptr dereference. There is still some race condition in testCameraStartParallel() that leads to occasional crashes. Change-Id: I35242bc88853870386d09fd6150d7bb8bd137674 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>
* Stabilize the qaudioinput autotest on WindowsLars Knoll2021-05-261-4/+4
| | | | | | | | | | Unfortunately, the only way to get reliable results for the failing test is to increase the time spent sampling, so that the inherent jitter contributes less to the measured timings. Change-Id: Ie6bb97174d30b38a911519f73af0ae0881ed3536 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Implement support for QCamera::Features on darwinDoris Verria2021-05-261-1/+0
| | | | | | | | Add FocusDistance and CustomFocusPoint to QCamera::Features. Set supported featurues upon camera change for AVFCamera. Change-Id: Ia2b89dce2770b3c0f0909fbe3df2fb10e05ee507 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some smaller test fixesDoris Verria2021-05-262-1/+2
| | | | | Change-Id: If35ad376f2ca96e740117c71d0e5cc950da9302c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix some logic errors in QWindowsAudioDeviceInfoLars Knoll2021-05-251-1/+1
| | | | | | | | | | With these changes, the qaudiodeviceinfo auto test passes on Windows. Change-Id: Ic139d0213a5ec797dfabd3bfde6b4d00decd0cc1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix a bunch of compiler warnings on MSVCLars Knoll2021-05-252-3/+3
| | | | | | | Change-Id: I9065fba658c506cf2737d922f77f67e27f8ae634 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Some QCamera API cleanupsLars Knoll2021-05-253-23/+26
| | | | | | | | | | | | | | * Add QCamera::Features flags to determine supported features. * Rename (manual)shutterSpeed to (manual)ExposureTime, as digital cameras don't have a shutter anymore. Implement support for those feature flags on gstreamer, and add support for querying iso sensitivity, exposure time and setting a manual iso value. Change-Id: I776aa4bc11b02e4de4b02fe33aaccfb83e220ef7 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix the remaining failures for tst_qmediaplayerbackend in macOSDoris Verria2021-05-251-2/+2
| | | | | | | | Use QTimer to update playback position, fix a crash, and use QTRY_COMPARE when testing the player position. Change-Id: I44840eefb6f90ffc04084fe2743238400ee7a73e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix tst_qcamerabackend failures for macOS and iOSDoris Verria2021-05-233-18/+45
| | | | | | | | | | | | - Blacklist testCameraStartParallel on iOS as it doesn't seem to support two active capture sessions at the same time. - Fix some erroneous values. - Add some missing keys to the Info.plist. * Blacklist testCameraCaptureMetaData for macOS/iOS for now as it's not yet implemented. Change-Id: If889b7e4537c4f08ea810926420da59bd985e8e1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix the qaudioinput test failures on macOSLars Knoll2021-05-212-4/+5
| | | | | | | | | | | There was a race condition in the code as the audio samples can be read read the device from a separate thread. Also the buffer to write to needs to be opened. Change-Id: I89896a8e3258999d51e1415f75df979405306937 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make the QAudioFormat autotest pass on macOSLars Knoll2021-05-211-2/+5
| | | | | | | | | | QWaveDecoder can only write Int16 based formats, so skip the preferred format if it is not Int16 based (macOS seems to prefer Float). Also ensure that all formats are valid by giving them a valid channel count. Change-Id: I0cf4c040eb28b4dbf1faebd1293fe035c8144dc6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Correctly resolve the actual output file for QMediaEncoderLars Knoll2021-05-211-24/+26
| | | | | | | | | | | The gstreamer media encoder remembered the last location as something that could be re-used for the next encoding run. Fix that and ensure it'll pick a new file name if the requested output location is empty. Change-Id: I02077c8632fc106701e8c5081ee8b5e1361b18df Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Improve V4L2 supportLars Knoll2021-05-211-6/+22
| | | | | | | | | | | Check for exposure times and adjustments and implement support for setting those if the camera supports them. Check for those in the camerabackend test. Change-Id: I860b2e7b94ef27e64a62e800cb6c05bfa6134250 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up the videoOutput() APILars Knoll2021-05-218-453/+126
| | | | | | | | | | | | | | | | | | | | The current API was rather messy, with multiple overloads. Change this and make the videoOutput a QObject * based property. To account for QVideoSink, add a videoSink()/setVideoSink() overload. This also helps identifying the correct sink in all cases. Add some code to protect against deletion of the videoOutput or videoSink from somewhere else. Adjust autotests and fix the qquickvideooutput autotests. With this change we are now passing all existing autotests again on Linux/gstreamer. Change-Id: I77b9863e88a7863abf27ab465fadd9c24f486502 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fixes for qaudiooutput on gstreamerLars Knoll2021-05-201-1/+0
| | | | | | | | | | | | Add a queue element into the pipeline to decouple things between input and output. Add ability to suspend/resume the QGstAppSrc. This finally makes the autotest pass consistently. Change-Id: Ib20d1f9e6932aa9459085ad46fe78fdd03749723 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge QPlatformCameraImageProcessing into QPlatformCameraLars Knoll2021-05-207-136/+42
| | | | | | | | | | | | Clean up the API while wer're at it, and rename manualWhiteBalance to colorTemperature. Simplify the backend API now that we only have white balance and color temperature in there. Change-Id: Ied8702b0c68a8fbea08d314d96c0261049db5b4d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove contrast/brightness/hue/saturation properties from QCameraLars Knoll2021-05-192-49/+0
| | | | | | | | | | | 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>
* Move QPlatformCameraExposure API into QPlatformCameraLars Knoll2021-05-197-285/+98
| | | | | | | | | | Clean up the internal API while we're at it and get rid of the multiplexing API. Instead have virtual methods for each property. Change-Id: I62cb178ff8360edbd11abb3fc5a0cfd7d8abdb2b Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Cleanup the QMediaEncoder backend architectureLars Knoll2021-05-193-12/+7
| | | | | | | | | | | 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 test failures in tst_qaudioinput on macOSDoris Verria2021-05-192-4/+23
| | | | | | | | | | Skip recording wav files for not supported formats (only 16-bit sample sizes supported). Set the QAudioFormat's channel count to 1 for mono formats. Blacklist reset test case for now, signal emmission fails some times. Change-Id: Id26519ec313a8b2ab1e65ce08604d207dfea312e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge the QPlatformCameraFocus class into QPlatformCameraLars Knoll2021-05-187-106/+12
| | | | | | | | | | Adjust the backend API while we're at it, so that the base class does some of the state management and signal emissions. Slight cleanups of the code in the different backends. Change-Id: Ie246da060260c5aeb6af54e7414deb0395b0cdf1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QCamera::aperture() and friendsLars Knoll2021-05-182-78/+2
| | | | | | | | | None of the backends implemented support for it, and most cameras today don't allow you to change aperture anyway. Change-Id: Iad820c0a333e23e8a12d36ac2dd511b4ea5fc047 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge QCameraImageProcessing into QCameraLars Knoll2021-05-182-62/+49
| | | | | | | | | | | 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-183-199/+170
| | | | | | | 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-92/+64
| | | | | | | | | 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>
* Fix a crash in the gstreamer audio outputLars Knoll2021-05-181-23/+21
| | | | | | | | | | | Closing the audio output would delete the pipeline, and would lead to deleting the GstAppSrc from within QGstAppSrc::pushData(). Speed up the qsoundeffect autotest (this uncovered the issue). Change-Id: I3c5843854f5a74d563eb271df553c8a1a5854f63 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc improvementsLars Knoll2021-05-181-7/+0
| | | | | | | | | | | | | | | | | | | Try to add at least a short class overview to every C++ class and document most properties there. Some API cleanups in QMediaRecorder. Some rough cleanups in the overview documentation, removing mentions of features and APIs that do not exist anymore and adjust the ones that have changed. Updated the changes.qdoc file to now reflect the changes from Qt 5 to Qt 6, not from Qt 4 to Qt 5 anymore. Change-Id: I42f4994d3af4d35ab5e51afe351afa653964bea8 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup the audio decoder architectureLars Knoll2021-05-174-11/+14
| | | | | | | | | | | | | | | 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 the QSoundEffect autotest on gstreamerLars Knoll2021-05-173-28/+0
| | | | | | | Change-Id: Ifd0001934b6074601a78f3513694e2637a9baf8d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix test failure in a couple of autotestsLars Knoll2021-05-171-1/+1
| | | | | | | | Minimum and maximum are different things :) Change-Id: I5e2edf2750e013a3a48e98f1b99fdccd733d70bc Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Fix most qcamerabackend autotests on macOSDoris Verria2021-05-141-6/+2
| | | | | Change-Id: I5c4f014d18703285c608d5a59610241866e45755 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add an Info.plist to tst_camerabackendDoris Verria2021-05-142-0/+32
| | | | | Change-Id: Id4e1507923103213b5f08efd516d3d9d9dba3da7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QAudioInput/Output::periodSize()Lars Knoll2021-05-142-47/+33
| | | | | | | | The periodSize() is badly defined and one does not really need it in the public API. Get rid of it. Change-Id: If95f040d386ac91620c8de4f907cd206b7dad16a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clean up QMediaTimeRange APIVolker Hilsheimer2021-05-121-32/+32
| | | | | | | | Make the Interval struct a nested type with an entirely constexpr API. Make QMediaTimeRange movable, add documentation for respective specials. Change-Id: I3f1864932671dd59a9d58bdb4c3c90383fc64292 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix most qcamerabackend autotests on gstreamerLars Knoll2021-05-101-31/+64
| | | | | | | | | | | * Properly emit all image capturing signals * Create meta data and write it to the image * Skip tests if there's no camera available * Skip tests if a required feature is not supported Change-Id: I621a8413848d7017aa131ee6dd31071000ef46b1 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build on Windows after QMediaDevices renameVolker Hilsheimer2021-05-101-1/+1
| | | | | | | | | | | | A bit too greedy, matched some Direct3D types. As a drive-by, add missing includes and remove the incorrect export from QMockVideoSink. Change-Id: I9e2fa4a45a2682a1f259d5a11729a76f5172b72a Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Some API and doc fixes for QAudioDecoderLars Knoll2021-05-073-36/+37
| | | | | Change-Id: I0f839896c9f813939b99b01242b54a00796731a8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove StereoFrame types that we don't support in Qt 6Lars Knoll2021-05-071-40/+0
| | | | | | | We only support 8bit unsigned and 16 bit signed PCM data. Change-Id: I206a64dedf81d61ace491f6754b3ec4e63b27ed3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QMediaDeviceManager to QMediaDevicesVolker Hilsheimer2021-05-0712-64/+64
| | | | | | | | | | 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>
* QAudioDeviceInfo: drop Range type, simplify APIVolker Hilsheimer2021-05-071-6/+4
| | | | | | | Adjust platform implementations accordingly. Change-Id: I51a74c62d37d681ef3b604ac6742b1f0f489aa74 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix the sample cache autotestLars Knoll2021-05-071-19/+9
| | | | | | | | | The isLoadingChanged() signal doesn't exist anymore. Query isLoading() instead. Change-Id: Ia278ff3b43a13852b13c86337d356c0087938675 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Pass the remaining mediaplayerbackend autotestsLars Knoll2021-05-071-39/+38
| | | | | | | | | | | | | | | * Add a notification mechanism to the pipeline so the video output knows when QMediaPlayer is in a stopped state (using QProperty), as we want the pipeline to be in a paused state internally, but not get preroll frames if we're in paused externally. * Properly emit metadataChanged() signals, and ensure we're in GST_STATE_PAUSED before trying a seek. Change-Id: I1cad557e648f82909a63cba8d6144df8476524f5 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QVideoFrame(Format) movable, smaller API cleanupsVolker Hilsheimer2021-05-071-30/+0
| | | | | | | Rename nPlanes to planeCount, remove QVideoFrameFormat::sizeHint. Change-Id: Ib176934f4960d01f6bec5258e552e41140dc101a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QAudioInput:: Rename bytesReady to bytesAvailableVolker Hilsheimer2021-05-071-7/+7
| | | | | | | | | And use qsizetype, also for bytesFree and the buffer size APIs. Adjust platform implementations, leave the internal name unchanged for now. Change-Id: I2471090fc5826e992580d557d0d5b545e2be1a0a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Pass more media player autotests on gstreamerLars Knoll2021-05-031-3/+8
| | | | | | | | | | | | Fix a couple of more autotests and do better state and status handling. Move keeping track of state changes into the platform independent code. Change-Id: If401af6cfa2707ce7c7184cf9baff76a60dd41ff Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Some cleanups in the mediaplayerbackend autotestLars Knoll2021-05-032-59/+10
| | | | | | | | | | | Adjusted the signal spys and a few other parts to the API changes in QMediaPlayer. Still getting lots of errors and even crashes on gstreamer. Change-Id: Ic1bca00f3e1fedc6ec77a7d28f83ba00d7d42dcd Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Cleanup status handling in QMediaPlayerLars Knoll2021-05-032-21/+7
| | | | | | | | | | | | | 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>
* Fix the remaining tst_qaudiooutput failures on gstreamerLars Knoll2021-05-031-14/+7
| | | | | | | | | | Some streamlinking of the test code and a couple of fixes in the gstreamer backend so it behaves in all corner cases. Change-Id: Id9f00449dc1dfd9973d68a72d5b276692666713b Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Cleanup and refactor QGstAppSrcLars Knoll2021-05-031-2/+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>
* Fix part of the QAudioOutput test failures on gstreamerLars Knoll2021-05-031-77/+43
| | | | | | Change-Id: I016a84cdfcc93cee4c8c7b1b3c50588644a94566 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>