summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* More changes for QMediaFormat handling on the backendLars Knoll2021-02-0925-1071/+700
| | | | | | | | | | The codecs supported by a certain muxer/demuxer are actually something we need to determine from the backend. So a static mapping in QMediaFormat will not really work. Change-Id: I848c607ed222eba160a7c9c1c7b216b991e5ceba Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Unify support for .wav files into one public classDoris Verria2021-02-0930-1171/+300
| | | | | | | | | | There are several implementations for reading/writing of .wav files across tests and examples. Remove them and use the implementations in the QWaveDecoder class instead. Add writing support for .wav files in this class and make it public for now. Change-Id: I81ad984f30b3b668f92a5a0a56e33289c70fad45 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for retrieving a mimetype for a QMediaFormatLars Knoll2021-02-094-35/+59
| | | | | | | | | And remove WMA from the list of supported codecs, add ALAC instead as it's more widely used. Change-Id: I3c08f2d1871783dc1e15c948e2ec9a7a033cb917 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix gstreamer codec detection for the decoding/demuxing caseLars Knoll2021-02-091-3/+7
| | | | | | Change-Id: Ib3ac46c3156509e7e205c5fe7549bb388f884592 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use the new QMediaEncoderSettings in QMediaRecorderLars Knoll2021-02-0997-6204/+1946
| | | | | | | | | | | | | Switch the backends for Android (compiles but untested), AFFoundation and GStreamer over to use the new QMediaEncoderSettings. Get rid of the old *EncoderControl classes and associated infrastructure. Change-Id: Ic75ff43eab55aeb0ab53d7248f7f5ff70b14c05f Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* New API for handling media formats and codecsLars Knoll2021-02-0930-9/+1567
| | | | | | | | | | | | | | | | Implement a new API for handling media formats and codecs. The API gives better control to discover supported file formats and codecs for encoding and decoding. QMediaRecorder will be moved over to use the new API in a subsequent commit. Android only has stubs implemented currently, as I can't test anything beyond simple compilation. Change-Id: Iff5f044f87c97f83d9151b10d7a78709822e077a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't list image encoders when we're asking for video codecsLars Knoll2021-02-091-1/+2
| | | | | | Change-Id: Ib41bc762b04762e645383b891de91be94df88bac Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Unify the encoding controls for gstreamerLars Knoll2021-02-0924-1197/+635
| | | | | | | | | | | | | | | Use the same encoding controls for mediacapture and camerabin. This brings us a step closer to unifying those two capture engines. There are some issues with recording currently, but the whole pipeline handling in the mediacapture engine is rather messy anyway and will need a rewrite. Change-Id: I8e6b2871fb0fb2a7dd28f0e5adaa2395a71e57aa Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the gstreamer encoding profile testLars Knoll2021-02-0914-158/+0
| | | | | | | | | | | We now require the gstreamer base libs, and the base utils library always contains encoding profile support. So get rid of the feature check for this one, we can safely assume it's supported. Change-Id: I4d9d44aaed07bbc49d46c5bd03cae2662b6935e0 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Skip codecs/container formats that don't really make senseLars Knoll2021-02-091-0/+3
| | | | | | | | | | | | If the mimetype is "application/..." it's probably not a codec or container format you want to use. This removes lots of clutter from the codec/container formats presented as supported to the user. Change-Id: I686812bc6a86ada502a07c98672cddc8bc88dbcc Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup QAudioFormat and friendsLars Knoll2021-02-0961-2228/+946
| | | | | | | | | | | | Reduce the amount of available formats, and always use host endianness. Return both sample rate and channel count as a range, not a list of values. Change-Id: I88389b49ace077764fb647f50834236448e55c0e Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2021-02-041-1/+1
| | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtMultimedia. As the two are synonymous, this patch should have no impact on users. Task-number: QTBUG-86829 Change-Id: I5b9ee466dfe5dafcff20bdddf3ad0ce2a812d98d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Define some wrapper classes for Gstreamer structuresLars Knoll2021-01-293-34/+114
| | | | | | | | | | Define some wrapper classes for GstCaps, GstStructure and GValue with a decent C++ API to use them. This will help simplify our code within the gstreamer plugin. Change-Id: Ifcae40f04030e89b2ae3fd73bf7ea2eb1db49d16 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove some unused codeLars Knoll2021-01-292-93/+0
| | | | | | | | | This has been moved into QGStreamerDeviceManager and is handled there. Change-Id: I2874082e8d6c2b390e4b566fba9dd02ac7374496 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove codec property from QAudioFormat and relatedLars Knoll2021-01-2943-471/+197
| | | | | | | | | | We only ever supported audio/x-raw (ie. unencoded PCM). Remove the codec properties from QAudioBuffer and QAudioDeviceInfo. Those deal with raw unencoded data and nothing else. Change-Id: I772d1bf624c8515b1d2f696da3f8e5bd5f0cc2f1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QCameraViewFinderSettingsLars Knoll2021-01-2940-2569/+59
| | | | | | | | | | The outputs should control the camera settings that are required. Before one could define resolutions and framerates in several places, not it's the requested outputs that define it. Change-Id: Iab76abac84480e6200b9fc5b058fc2a02b0a8ce0 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup resolution and frameRate handlingLars Knoll2021-01-2930-578/+69
| | | | | | | | | | | The Camera determines the available resolutions and framerates. There's no point routing requests around that through the backend again, if we can get it from QCameraInfo in the first place. Change-Id: Ie00285811202bf93799155736de149c37561fd31 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QAudioProbe and QVideoProbeLars Knoll2021-01-2985-3191/+74
| | | | | | | | | | | | | | They worked very inconsistently between platforms (or not at all) and made the implementation quite a bit more complex. Longer term they will get replaced by adding the possibility to have multiple audio/video outputs and implementing monitoring output classes that can deliver QAudioBuffers and QVideoFrames to the app. Change-Id: Ic5b4506e7392d352d33b51f01ff0d5169d7b5129 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup some of the objc codeLars Knoll2021-01-299-18/+28
| | | | | | | | | Avoid casts to and from void * and instead forward declare the objc classes. Change-Id: Icd1d2e388fee3c05f5cfc8ab186f1d99194fe7c1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup QCameraInfoLars Knoll2021-01-2926-177/+322
| | | | | | | | | | | | | | | | | | | Various API changes to QCameraInfo: * Remove the camera orientation from our API This is an implementation detail that should never be exposed to the user. For fixed cameras it's uninteresting and for mobile cameras, we can use the physical orientation of the device to create a stream that is oriented the correct way. * Add a QVideoFormat class describing a video format * Add a QList<QVideoFormat> videoFormats() * Add a QList<QSize> photoResolutions() * Implement the API for gstreamer and macOS. Change-Id: I9ffd9caeb6d07a6f267608a6bd794d99699fffbb Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for notification when audio devices change on macOSLars Knoll2021-01-296-18/+65
| | | | | | | | | This required some deep digging, as apparently the AVAudioSession doesn't exist on macOS. Change-Id: Ic47c6bacbfc1b0eb1f9f451fc63f7e910ac2953d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Implement notifications when the available cameras change for macOSLars Knoll2021-01-294-22/+51
| | | | | | | | | Listen to AVCaptureDeviceWas(Dis)ConnectedNotification notifications and refresh our video device list if we get one of them. Change-Id: Idf79e88e06422d74ab61cb82676c4b82fd1fb387 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make camera switching in the camera example workLars Knoll2021-01-295-15/+14
| | | | | | | | | Tested on macOS: If you have more than one camera installed, you can now switch between them in the example. Change-Id: I6d24c91e1e6c4d51eccc468ec9d5aefa46d9a99c Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Provide an Info.plist file for the camera example on macOSLars Knoll2021-01-292-0/+50
| | | | | | | | This required, so that the app can actually run. Change-Id: I967a0b5c23464cfa258f920f83d3a6775e106212 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix some compiler warningsLars Knoll2021-01-299-34/+27
| | | | | | Change-Id: Ia25756c626ac2734e33b7a4d537925d302ac2cc3 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QVideoDeviceSelectorControlLars Knoll2021-01-2964-1614/+272
| | | | | | | | | | | Move the camera selection into QCameraControl directly and give it a more decent API using QCameraInfo. Remove the QCamer(name) constructor, as it could lead to invalid cameras being constructed. Change-Id: Ieb26f62684080eaf9a10770ec7df2cde2996bcff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Completely remove the old plugin infrastructureLars Knoll2021-01-2963-1413/+106
| | | | | | | | | Now that nothing relies on QMediaServiceProvider* anymore, get rid of those classes. Change-Id: I30d4e878598b7af63f9a5b8cc3cf7cf3daa37f6a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of all uses of QMediaServiceProviderLars Knoll2021-01-2921-1105/+320
| | | | | | | | | | | In addition, clean up the multitude of mock services and unify them. We'll probably still fail tons of auto tests, but this does start making more sense nevertheless. Change-Id: I4bf7f19db98e02566b4285e4ab8c850ee0e4a0c7 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Refactor the mocking code for the recorder/capture serviceLars Knoll2021-01-299-168/+116
| | | | | | | | Use the new device integration infrastructure here as well. Change-Id: I46d338eb36650640d1ed83125ea0dbb61e119d21 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QAudioDecoder over to use the new platform infrastructureLars Knoll2021-01-2911-92/+55
| | | | | | | | | | | And remove the hasSupport() method for now as with QMediaPlayer and QMediaRecorder. Also adjust the auto test to use the new mock infrastructure. Change-Id: I84a8587f273525d1ee1ed26ded6822bb92448e01 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port tst_qmediaplayer to use the new mock infrastructureLars Knoll2021-01-296-38/+48
| | | | | | | | | Some tests are failing, but those failures might actually be real. Change-Id: Ifb4a88ff4baf3227d09805eb8f93cd0ac442077d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the mediaChanged() signal from the media player controlLars Knoll2021-01-2910-16/+0
| | | | | | | | | The front end has full control over this and handles the signal emission there. Change-Id: Icf1b164ce67d1f2036c106461302d53924c03ea1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Start refactoring the mock backend codeLars Knoll2021-01-299-6/+330
| | | | | | | | | Refactor the mock backend code so that it can work in the new infrastructure as a way to test our frontend APIs. Change-Id: Ica1bd9665b9121197f95861173171f9da8cccc58 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use the CaptureInterface to request the capture serviceLars Knoll2021-01-298-10/+14
| | | | | | | | | One more step towards getting rid of the service provider infrastructure. Change-Id: Iea40c4c209bf00ed2e748ad2345d14571ec046c4 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't use QMediaServiceProvider(plugin) for capture anymoreLars Knoll2021-01-2913-33/+47
| | | | | | Change-Id: I25e134ebe559d9e68e87cfa7ce112a7b524a9516 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup mock backend and tests using it.Lars Knoll2021-01-29218-1060/+533
| | | | | | Change-Id: I2a77c06ba544c918785fb1d60a54f36a320250f9 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Enable camera in gstreamerLars Knoll2021-01-291-2/+2
| | | | | | Change-Id: I59875718068a1b6130c7cadf3a1a2c87ae548b99 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Avoid configuration errors when building examplesLars Knoll2021-01-292-3/+0
| | | | | | | | The XML module is not required for the player in any case. Change-Id: Id6572f87403d837f87395496030dea5d5a591dd5 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup some of the now unused plugin interface codeLars Knoll2021-01-2914-533/+7
| | | | | | | | | Those code paths are unused and the whole plugin infrastructure needs to go anyway. Change-Id: I826085a5ea5d61822486e2634a58c2bd38c14079 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Blind fixes to the QNX backendLars Knoll2021-01-2923-57/+370
| | | | | | | | | | | | Can't build QNX right now, so simply do blind adjustments to the changes that have happened to the other backends. At the minimum it should make it easier to get the backend going again once we start fixing it. Change-Id: I1afc4f3c385efcad0f5a5f2c615d66c2fe28b905 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build on AndroidLars Knoll2021-01-2939-166/+426
| | | | | | | | | | Can't really test as I don't have an Android device, but this should cover the architectural changes so far and at least it does all compile now. Change-Id: Id9705094d2f5560ee9ad665240189c2d3a88aeed Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Start using the new QMediaPlatformPlayerInterfaceLars Knoll2021-01-2928-645/+376
| | | | | | | | And get rid of the corresponding service plugins. Change-Id: I4b5b694e0cae93ba116a2dd58efd5ad8a2eb0743 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't define QT_DISABLE_DEPRECATED_BEFORE to 0Lars Knoll2021-01-294-7/+0
| | | | | | | | | | Remove those defines, they cause the cmake build to break as we get the define set from the global Qt configuration code in qtbase. Change-Id: I09b5848a0023c96bbf46a9208b14149bd3d4602a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the supportedMimeTypes() API in QMediaPlayerLars Knoll2021-01-296-55/+0
| | | | | | | | | | | We might want to re-add a "supportedContainerFormats()" method later on, but then implement something that actually works. For now it's probably better if the method is simply gone (it was only working on AVFoundation anyway). Change-Id: I3a19529b35c9d7916df7385b406fcccf19d7f484 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add stubs for the new backend architecture for capture and playerLars Knoll2021-01-299-7/+270
| | | | | | | | | Just some stubs now, they'll replace the QMediaService implementations for player and capture. Change-Id: Ie1a1d9b8448181aad55024d1610d04903813404a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of the qmediaserviceprovider autotestLars Knoll2021-01-2928-1086/+0
| | | | | | | | This class is scheduled to die soon anyway. Change-Id: I888547252dcd9a1f07d10c121b3d5afd07f15076 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QVideoWidgetControlLars Knoll2021-01-2919-1907/+26
| | | | | | | | | | | | | QVideoWindowControl offers more or less the same functionality, as both require a native surface to use for an overlay. This should in the longer term be re-architected towards a "native surface" interface for rendering. And the only platforms that did try to implement this were gstreamer and AVFoundation. Change-Id: I3adcc38dde9ccd20273c7a7fb1712ce97bbdad48 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the QCameraInfo(name) constructorLars Knoll2021-01-293-30/+4
| | | | | | | | | Better to get/enumerate all cameras through the device manager and then select one of them. Change-Id: I31f9db4e1ed623d73547cbfc65c2245e98661fee Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove some dead codeLars Knoll2021-01-292-2/+0
| | | | | | Change-Id: I9871d37bb9c1963026bd9e8e05c7222f7e6a21fc Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add module_config.ymlDoris Verria2021-01-281-0/+12
| | | | | Change-Id: Ib6bcd17bd1f719effb3338cb869f4997f961a0e6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>