summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration
Commit message (Collapse)AuthorAgeFilesLines
* Tests: relax play_waitsForLastFrameEnd_whenPlayingVideoWithLongTim Blechmann29 hours1-1/+1
| | | | | | | | As we've seen an elapsed time of 899ms on CI Pick-to: 6.5 6.7 6.8 Change-Id: I4d4a8e85e253d9ebecdea419765b3a794ecca1e4 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Add HasHdrContent metadata info for Darwin backendPavel Dubsky38 hours1-1/+2
| | | | | | | Fixes: QTBUG-114427 Pick-to: 6.8 Change-Id: I566d327dba8faebb0256f82bced7701a75869378 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Decrease flakiness in multiplePlaybackRateChangingStressTestArtem Dyomin44 hours1-11/+20
| | | | | | | | | | | | | | Improving calculating time intervals is supposed to reduce flakiness. The idea is to calculate the exact time for intervals of each playback rate. The patch amends 9ec3a237a5ea3a1b065c379b601cb0fea1b5df74 Pick-to: 6.8 6.7 6.5 Change-Id: I750426c969aeac535c3ebd5f50487abc66a709f3 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io> Reviewed-by: Tim Blechmann <tim@klingt.org>
* Tests: Silence spurious gstreamer test failuresTim Blechmann44 hours1-1/+3
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: I2fea5694ab5935133ca22efdc67ea6930080927a Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Test sending frames of different sizes and colors to media recorderJøger Hansegård3 days5-1/+177
| | | | | | | | | | | | | Sending frames of different sizes exercises separate code paths in the encoding code and should be tested. We also add tests to verify that images are correctly oriented with sensible colors (not corrupted colors) Task-number: QTBUG-125956 Pick-to: 6.8 Change-Id: Iae7eb28b0810ed939fa08aef6be501d8a73776d6 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: add more tests to validate state after setSource or pausedTim Blechmann3 days2-15/+146
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: Icf10861ea39f879d4eb6aa09ff1a28e0c3042788 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: verify that playbackRate is actually taken into accountTim Blechmann3 days1-0/+71
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: I4f5c00c1ee037a97fb97ef62539c25748f5c6221 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: debounce StalledMedia stateTim Blechmann3 days1-29/+36
| | | | | | | | | | There are cases when the pipeline is flushed where the buffering states goes to zero from non-zero. In this case we shouldn't immediately send a StalledMedia notification, but instead start a debounce timer. Pick-to: 6.5 6.7 6.8 Change-Id: If872dd207d6b3d9102eec863aa48c74ebc8b03a4 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: add tests for multi-track filesTim Blechmann3 days3-0/+281
| | | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: I7cf4a09d7bb77d42aa58e0717dbec504006512dd Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: add test for reading subtitlesTim Blechmann3 days3-0/+55
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: I6a8ff0d6d4c81276d9156a6ec895629e47620de6 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: relax tests for gstreamerTim Blechmann3 days1-7/+7
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: I185bf7d92a38aa3ed5704859b6741ed21171083f Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: skip createMediaPlayerFrame based testsTim Blechmann4 days1-0/+6
| | | | | | | | | GStreamer can reach EOS early, which seems to result in an empty frame being emitted. Pick-to: 6.5 6.7 6.8 Change-Id: Ic0056c1229f0c00defb5a01e9c9c0ccd3d0137b5 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: relax timing tests in multiplePlaybackRateChangingStressTestTim Blechmann4 days1-1/+1
| | | | | | | | | On CI we've seen a duration of 2800(ms) instead of the expected minimum duration of 2900(ms). So we relax this constraint a bit Pick-to: 6.5 6.7 6.8 Change-Id: I40d20e99eb70a70443e4087c69f79955b1ad404f Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: add test to swap audio device while playback is runningTim Blechmann4 days1-0/+59
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: Ib51a21f6266b35c190fd2ccbd4150f1edc1fcc7d Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: add test to add/remove audio/video output while playingTim Blechmann4 days2-0/+114
| | | | | | | | | | Ensuring that playback continues when dynamically switching audio/video outputs. Ticket-number: QTBUG-126014 Pick-to: 6.5 6.7 6.8 Change-Id: I3eaeba53219e690b114676c482b1d3c22415754b Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: skip/relax tests for gstreamerTim Blechmann7 days2-19/+45
| | | | | | | | Reduces the amount of spurious failures on CI. Pick-to: 6.5 6.7 6.8 Change-Id: I288924f59d2d7cd8e45cabb2b4aa20c103598a0f Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: Avoid a compile warningUlf Hermann8 days1-2/+2
| | | | | | | | | The screen sparkles at the corners because it doesn't want to escape the line endings. Pick-to: 6.8 6.7 6.5 Change-Id: I8f6cada3c1ad3c6440324af446bbb7b284396b56 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Fix wrong frame rate and frame count when encoding custom video framesJøger Hansegård9 days2-21/+26
| | | | | | | | | | | | | | | | | | This patch sets duration of AVPackets before they are sent from video encoding to muxer. This fixes issues where single-frame videos could not be played in ffplay and QMediaPlayer. It also fixes issues with lost frames and incorrect media duration. It is not clear why FFmpeg muxer is unable to produce valid video files without duration estimates, but internal muxer function guess_pkt_duration appears to be assuming that either duration is already set, or avg_frame_rate is set on the stream before avformat_write_header is called. Fixes: QTBUG-125957 Pick-to: 6.8 Change-Id: Ibb6853a356242271be404f26715095be835a1924 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Extend tests for custom video inputJøger Hansegård10 days9-215/+633
| | | | | | | | | Tolerances will be tightened in upcoming patches. Task-number: QTBUG-125956 Pick-to: 6.8 6.7 6.5 Change-Id: I40822d84abd62d95ef523e05a9ced6bc2d4a3358 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: add tests to check track property updatesTim Blechmann10 days1-0/+69
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: Id09340d25095686ec80f749c06ea839c4c457d87 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: tst_QSoundEffect - silence warning outputTim Blechmann10 days1-0/+6
| | | | | | | | | Ignoring the error, both silences the debug output and validates the error message. Pick-to: 6.5 6.7 6.8 Change-Id: I370ce8ba69e55fff66f3d6ccdbd0eef5e9082700 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: add tests for hasAudio/hasVideo on media changesTim Blechmann10 days1-0/+41
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: Ied58ae6f417622021211f5164981e738524bb2f1 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: relax tests for gstreamerTim Blechmann10 days1-10/+14
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: I5b014e8faee7a67899cb4296f32fd5987b456a80 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: clean up bundling of test resourcesTim Blechmann10 days3-34/+9
| | | | | | | | | | | | | | * When the test resources are referenced via `QFINDTESTDATA`, they should be added via `TESTDATA` * When the test resources are referenced from the qrc resources, they need to be bundled with the executable. This patch aligns the behavior among all qtmm unit tests depending on their implementation. Pick-to: 6.5 6.7 6.8 Change-Id: I74c55ea297b651c628170e1582a1fc86de9fd272 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: remove legacy cmake definesTim Blechmann11 days2-17/+0
| | | | | | Pick-to: 6.5 6.7 6.8 Change-Id: I4d5625cda5a99962be2a4cdf1159a126bdc80434 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* CMake: cleanup - remove SKIP_OGV_TEST relicTim Blechmann12 days1-8/+0
| | | | | | | | `SKIP_OGV_TEST` seems to be a relic from 254b6d379f692e46e8204a Pick-to: 6.5 6.7 6.8 Change-Id: Ia02b14925694427177455f76ffaba4477c817426 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: skip tests broken on the GStreamer backendTim Blechmann12 days5-8/+57
| | | | | | | Pick-to: 6.5 6.7 Change-Id: I282f26e92b72b1106c16a4f8cfa6fb4bc4dac149 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* Tests: QMediaPlayer - fix spurious failuresTim Blechmann12 days1-6/+12
| | | | | | | | | | After `play()` the QMediaPlayer tests may end up at `QMediaPlayer::EndOfMedia`. This can cause spurious test failures on CI. Pick-to: 6.5 6.7 Change-Id: I0461215bbb0c310f33da08b5ffe2063ab47fb63d Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* Tests: MediaFileSelector - Accept `BufferingMedia` as "finished" stateTim Blechmann12 days1-4/+13
| | | | | | | | | | | | We don't need to fill the full buffer. Most notably this seems to cause suprious unit test failures with the gstreamer backend on CI. However when the media player is `BufferingMedia` we know that the media is supported. Pick-to: 6.5 6.7 Change-Id: I8880d5ba3121e2e8154e5c15e3cdc4fbaa4b5014 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* tst_qmediaplayerbackend: Add test for playing RTP stream using .sdp fileMikko Hallamaa2024-05-311-17/+99
| | | | | | | | | | | | | | | | | | | Previous tests for stream playback only accounted for RTSP sessions. RTP streams described with a .sdp file were untested. This patch adjusts the stream creation logic to allow for .sdp file generation, and renames the now more generic functions from rtsp... to rtp... New tests are added that create an RTP stream and generate an .sdp file. QMediaPlayer loads the .sdp file, which should bring up a ResouceError if an environment variable allowing it has not been set. If the environment variable is set, the .sdp file should be played OK. Task-number: QTBUG-125006 Pick-to: 6.7 6.5 Change-Id: I2d518979c33167aa377251af5eabb7827c978593 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Add the property QMediaRecorder::autoStopArtem Dyomin2024-05-301-0/+95
| | | | | | | | | | | | | | | | | The property is supposed to help users to write a well-structured code. It means that users could just take care of pushing media frames to inputs and handling the end of the source streams. Thus, the user code that controls media inputs will only send frames there, and don't call QMediaRecorder::stop after all streams has been finished. The same qml property will allow users to follow a good declarative style instead of calling calling MediaRecorder::stop. [ChangeLog] Added the property QMediaRecorder::autoStop making the media recorder to stop at the and of input streams. Change-Id: Ifa136f6e125f039bf8b0667bf205f8686a201a89 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Implement support of different input audio buffer size in the recorderArtem Dyomin2024-05-301-0/+88
| | | | | | | | | | | | Many of FFmpeg codecs support only fixed buffer size, that is defined in the codec variables. The patch applies writing of AVFrames of fixed sizes if FFmpeg requires it. The fix is need for correct working of QAudioBufferInput Change-Id: I40681e7c4b8781577f98fbc49f8ee609307d7f16 Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Add QtVideo::MapMode, deprecate QVideoFrame::MapModeArtem Dyomin2024-05-272-16/+16
| | | | | | | | | | | | | | | QAbstractVideoBuffer is going to be exposed in the public API, and it will use MapMode, so the enum should be in a common namespace. The only drawback of the deprecation is that QVideoFrame::mapMode() still returns QVideoFrame::MapMode. However, calling the method will not cause deprecation warnings, because enum values are deprecated, not the enum as is. [ChangeLog] Added the namespace QtVideo::MapMode, deprecated QVideoFrame::MapMode. Change-Id: I5248c76c01f07a33f0f5a67e7db2d5072af5383d Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Implement the first test for video frame inputArtem Dyomin2024-05-243-0/+165
| | | | | | | | | | | Some issues have to be fixed later on. E.g. the FFmpeg recorder skips the first frame for some reason, the test has been commented. The tests are to be extended. Change-Id: I79f6cab02a17d82e3ce4746988c497cf17b700e9 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Add mediacapturesession tests with media frame inputsArtem Dyomin2024-05-241-0/+95
| | | | | | | | The added tests are typical from existing audio/video inputs/outputs, they check correctness of assignment inputs/outputs to the session. Change-Id: I3651ba2f43949c8b8a1e76b83b89217c86db7c38 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Initial version of media player video format support testsJøger Hansegård2024-05-2430-0/+190
| | | | | | | | | | | | | This test is intended verify format support for the media player. This initial test covers some container formats and pixel formats, but is not complete in any way. Only FFmpeg backend is tested. Next step is to expand test for more container formats, pixel formats, and also extend testing for other encoding formats. Pick-to: 6.7 6.5 Change-Id: I1fc4a62070f7582695ceb0c51ef13e1c142c9e08 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: improve tests for gstreamerTim Blechmann2024-05-231-13/+40
| | | | | | | | | | | * skip some tests * use video file for `processEOS`, as wav files don't emit buffer progress Pick-to: 6.5 6.7 Change-Id: Ic670cd04404dbf4f670f5cf630284e7ad3afd4ac Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* Tests: increase allowed position deviationTim Blechmann2024-05-231-1/+1
| | | | | | | | | | | | Timing measurements below the order of hundreds of milliseconds is pretty unreliable on VMs. 150ms is apparently too little, since we have spurious failures on CI. Pick-to: 6.5 6.7 Change-Id: I473e66295369d71ae876fe72518ab3ce29f93ece Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* GStreamer: pipeline - use std::chrono for position/durationTim Blechmann2024-05-221-1/+8
| | | | | | | | | The units are rather unsafe and a bit difficult to use reliably. So we completely convert the APIs to use std::chrono types. Pick-to: 6.5 6.7 Change-Id: Iab33af72baefadd97411dec35ad36641920afa8f Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: fix race in setSource_loadsNewMedia_whenPreviousMediaWasFullyLoadedTim Blechmann2024-05-211-1/+2
| | | | | | | | | We may reach `EndOfMedia` before `BufferedMedia` is returned. Classic failure of validating states rather than state changes. Pick-to: 6.5 6.7 Change-Id: I3c1818a0c2dbeb601b8a3605f1bd03abb1d487b1 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Tests: relax setSource_entersStoppedState_whenPlayerWasPlayingTim Blechmann2024-05-151-2/+8
| | | | | | | | | | | | GStreamer's scaling semantics is hardcoded in videoconvertscale.c, and tries to keep the input height "because of interlacing". For now let's document the behavior, our future selves may want to align the backends, though. Pick-to: 6.5 6.7 Change-Id: I37800713d1844c06c446f69fe5fa7bde00683996 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Tests: QMediaPlayer - relax finiteLoops testTim Blechmann2024-05-151-3/+5
| | | | | | | | | | | | `tst_QMediaPlayerBackend::finiteLoops` validates that an expected number of `position` updates is sent. This seems to be imprecise for the GStreamer backend, where position updates are driven by a timer querying the underlying GstPipeline. So it's better to only validate it for the FFMPEG backend. Pick-to: 6.5 6.7 Change-Id: Id998afd5ac98fad31ad38d8797d994e6445ab59a Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* Fix ↵Timur Pocheptsov2024-05-141-1/+5
| | | | | | | | | | | | | | play_createsFramesWithExpectedContentAndIncreasingFrameTime_whenPlayingRtspMediaStream When starting vlc in an external process we have to wait more on macOS for a server to accept connections. Otherwise we get 'Connection refused' error (and since the vlc stays running in the system subsequent test re-runs pass the test with already running vlc). Pick-to: 6.7 6.5 Fixes: QTBUG-124615 Change-Id: I75e52ebf0187bfccb56c0d85bc751ddaf19e2ba5 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* Add HasHdrContent to QMediaMetaData::Key enumerationJøger Hansegård2024-05-143-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | The HasHdrContent metadata key can be used to determine if a video track potentially contains HDR video. QMediaMetaData::value(QMediaMetaData::HasHdrContent) will return true when the decoder reports that the video uses ColorTransfer_ST2084 or ColorTransfer_STD_B67. These are color transfers used with Dolby Vision videos, for example HDR video recorded with an iPhone. Note that even if HasHdrContent is true, the video may still not utilize the extended dynamic range. This simplified approach is chosen because it is fast, and does not require decoding video frames to determine the actual range being used. Qt Multimedia still does not support proper display of HDR content, but the new metadata key can be used to determine if the video is a SDR video that will be presented correctly. Supported on FFmpeg media backend only. Fixes: QTBUG-114427 Change-Id: I7361d8c61838a66a61d18a2b9e6c8d75a6bdbdb8 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Tim Blechmann <tim@klingt.org>
* tests: fix suprious failure in tst_QMediaPlayerBackendTim Blechmann2024-05-141-1/+4
| | | | | | | | | | | We only monitor a side effect of the `mediaStatus` when waiting that playback started. However we need to wait for all possible side effects, including `EndOfMedia` Pick-to: 6.5 6.7 Change-Id: I67c8ff28658c6a5fc11445572a4407638a1dbdc6 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
* Tests: tst_QAudioDecoderBackend - fix reference dataTim Blechmann2024-05-121-25/+32
| | | | | | | | | | | | | * use constant instead of magic numbers * fix end-of-loop condition This fixes a spurious failure where small buffers are delivered, causing the unit test to exit too early Pick-to: 6.5 6.7 Change-Id: Ib53d8e6ef6d2f636adde5e63946250656a7ac4fd Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: fix seekable detectionTim Blechmann2024-05-111-0/+1
| | | | | | | | | | | | | | There seems to be cases where the seekable query to determine if the stream is seekable will fail. We move the detection from the state change to the ASYNC_DONE handler, which seems to work better. Fixes a unit test failure in tst_QMediaPlayerBackend::multipleMediaPlayback Pick-to: 6.5 6.7 Change-Id: I8d94cf0682db366fead62197f4a9660092b446b3 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* QAudioDecoderBackend: relax unit testTim Blechmann2024-05-081-3/+0
| | | | | | | | | When reaching the end of a stream, the decoder can provide a buffer, but the decoder will report that it is not decoding anymore. Pick-to: 6.5 6.7 Change-Id: I286debfda8eee5cfc999ac462373c9e43bc2d92b Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* GStreamer: don't skip play_startsPlayback_withAndWithoutOutputsConnectedTim Blechmann2024-05-081-2/+0
| | | | | | | | | | Seems that we can play without any outputs connected. Possibly fixed by a recent change. Task-number: QTBUG-124501 Pick-to: 6.5 6.7 Change-Id: I873c10f3cfba78639e75d1929f5b8a2005251cfc Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
* GStreamer: QGstreamerImageCapture - set metadata immediatelyTim Blechmann2024-05-061-1/+0
| | | | | | | | | | | | | Originally the metadata was populated with "Resolution" / "Date" from the `probeBuffer` handler. However according to imagemagick's `identify` these metadata do not seem to affect the generated images, probably they are generated from the timestamps/buffer image resolution Pick-to: 6.5 6.7 Change-Id: I81491e51c5b7a50c9aec23e1d7cf549382246b7d Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>