summaryrefslogtreecommitdiffstats
path: root/src/multimedia
Commit message (Collapse)AuthorAgeFilesLines
* Move the player session into the player controlLars Knoll2021-02-174-6/+4
| | | | | | | | | Now the player control owns all the backend classes required for playback. Change-Id: I6f0356897e15fffeb5d993ca24ddf849c78650c1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move the streams interface into QMediaPlayerControlLars Knoll2021-02-175-9/+18
| | | | | | Change-Id: Ib3ce50ed15e96d4edc5d64c9b0f514f591d75c64 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Smaller cleanupsLars Knoll2021-02-1712-47/+30
| | | | | | Change-Id: I298a4e6c41b0a6f130eec1e23863d62fd0986b85 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* And finally kill QMediaServiceLars Knoll2021-02-1739-528/+20
| | | | | | | | | This removes the past piece of the old service architecture from Qt Multimedia. Change-Id: I607f82a546b2a2e29024b987fed3ba6e3645ae48 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QMediaService for the capture interfaceLars Knoll2021-02-1732-251/+67
| | | | | | Change-Id: I69a3d379bd2f1adbc4d583fd8eadcd3eb624a3af Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Kill QMediaSource and QMediaSinkLars Knoll2021-02-1729-624/+53
| | | | | | | | Those aren't used anymore, get rid of them. Change-Id: I5a17f18a3c87c2c13a9009b1f99ef9e708f7636a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QMediaSource inheritance from QCameraLars Knoll2021-02-176-43/+36
| | | | | | | | | With this, QMediaSource and QMediaSink are now obsolete and unused. Change-Id: I5356739fc58e2c79d741a19229c6bbd205ba0a73 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the QMediaSink inheritance from QMediaRecorderLars Knoll2021-02-173-143/+56
| | | | | | Change-Id: Ifd504569c3e50d76bfd8c8b5ea6decc53a032464 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the QMediaSource inheritance from QMediaPlayerLars Knoll2021-02-172-10/+19
| | | | | | Change-Id: I564aecdbb11df268b40fba6f53c6e2624b056a13 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QMediaSource dependency from QAudioDecoderLars Knoll2021-02-172-5/+9
| | | | | | | | Nothing needs this here. Change-Id: I66d5a7f22495dd24d2fdebd780f1c0ad574b55de Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove now unused QVideoSurfaceOutput classLars Knoll2021-02-175-197/+0
| | | | | | | | | It's not needed anymore now that we pass the QAbstractVideoSurface to the backend. Change-Id: Iea198323193d13c85428d0f2205d1db92fc6931b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QCamera::CaptureModeLars Knoll2021-02-1727-352/+61
| | | | | | | | | | | Whether we capture still images or Video should only depend on the outputs we have attached to the camera (QMediaRecoder and QCameraImageCapture). There's no need for a separate enum here. Change-Id: I852f5c752abd1184680ca868cb90e995d6d68b27 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rework how to set a video output surfaceLars Knoll2021-02-1749-375/+182
| | | | | | | | | | | | | | | | | | | | Setting a video output should not require QMediaService anymore. Reverse the logic, by making QAbstractVideoSurface the primary interface. Use runtime method lookup to get a pointer to the video surface from QVideoWidget/QGraphicsVideoItem. QAbstractVideoSurface is now the primary interface for setting up a video output. We will need to add some API there to allow for windows/fullscreen rendering. With this change, QVideoRendererControl/QVideoWindowControl can also be retired as an abstraction layer in the longer term. Change-Id: Iedff18c6b95fedc7cb914075a8c84081080deab1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Kill QGstreamerVideoInputLars Knoll2021-02-179-190/+12
| | | | | | | | The class didn't really serve any purpose anymore. Change-Id: Ib4dbdef9e6bcaa22303ccb77dea1120d44e418de Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QGstreamerElementFactoryLars Knoll2021-02-174-37/+13
| | | | | | | | It's not used right now, and doesn't provide us with anything. Change-Id: I362285bac5d7fa18cca4498536a6c30db5c919e5 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the notifyInterval functionality from QMediaSourceDoris Verria2021-02-178-122/+170
| | | | | | | | | As a step towards removing QMediaSource from the hierarchy, remove its notifyInterval functionality and implement it in the child classes QMediaPlayer and QMediaRecorder instead. Change-Id: I17aa778fc306881f9e08ab4decbc2d2f3928c686 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QMediaService dependency from QMediaPlatformPlayerInterfaceDoris Verria2021-02-1713-212/+55
| | | | | Change-Id: I33e6ba9de3fa00617657d85b4558d39af400280d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rework the metadata handlingLars Knoll2021-02-1282-2814/+943
| | | | | | | | | | | Get rid of metadata reader and writer controls. Instead use a simple cross platform value class to store meta data. The backend can then convert to and from whatever the native API expects. Change-Id: I7cf84bfbe8eef2a88615a52ba5afeec50a0652c8 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove camera locking APILars Knoll2021-02-1216-1149/+1
| | | | | | | | | | | | | QCamera::lock()/unlock() is something that's not needed these days anymore. cameras will automatically focus anyway, there's no real reason to lock the focus (or other properties) to some specific value in 99% of the cases. Plus it wasn't supported on Linux or macOS/iOS anyway. Change-Id: I437d29cbb768da3ece42eea8d753eeafa0c534ae Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a couple of smaller compile issuesLars Knoll2021-02-121-0/+2
| | | | | | | | Noted after doing a completely clean build. Change-Id: Ie89ad1dbd86d3ac44ef65bcd22383bf1fcffabe2 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compilation on WindowsLars Knoll2021-02-1215-309/+318
| | | | | | Change-Id: I470d5ac39ca66bfe613e82370cd5ea6f6cffa171 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove unused filesLars Knoll2021-02-124-266/+0
| | | | | | Change-Id: I127875f36c5e08dfe23071ac111247c566e405ac Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of QImageEncoderControlLars Knoll2021-02-1238-976/+205
| | | | | | | | Fold the settings into QImageCaptureControl. Change-Id: I9cf981dfa956b769167791bc830bbe1569004367 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup QImageEncoderSettingsLars Knoll2021-02-1217-113/+141
| | | | | | | | | | | Define a list of supported file formats, as with QMediaEncoderSettings. Implement support for detecting those on gstreamer. Remove the old interface in QCameraImageEncoderControl. Change-Id: Ic3d67dd19fe13336ba2017dc8055014274619ce6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't use QMediaService anymore to get the camera controlsLars Knoll2021-02-0918-184/+208
| | | | | | | | Instead retrieve them from the camera control. Change-Id: Ic996a672f102f7dc3fc5e3b73f977d3864e9a129 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove some code that not needed anymoreLars Knoll2021-02-096-619/+0
| | | | | | | | | | | | | | qgstreamerimagecapture/encoder provides the same functionality. And we won't be going with camerabin anyway as the API is still unstable and doesn't give us the flexibility we need. Some of the remaining code in here can be brought over to give better camera support, although gst-photography seems to be mostly unused. Change-Id: Iae7e8c20545f108a53a1efd0d83fd917c520e9d8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Don't use the service to get the metadatawritercontrolLars Knoll2021-02-0917-363/+68
| | | | | | | | Instead, ask the media recorder control for it. Change-Id: I1cf47af00dc29a282bce7767ce15ef203c44c585 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove some unused codeLars Knoll2021-02-091-11/+0
| | | | | | Change-Id: If0e8ddaed2ca6c1ac327a94241d9ff32cda05806 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Get rid of QCameraImageCapture::DriveModeLars Knoll2021-02-0915-120/+21
| | | | | | | | | Nothing but single image capture was ever implemented, so the whole API was unused. Change-Id: I429040d3e2d74bddd6b76649ca6680acc9db126e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Clean up zooming APILars Knoll2021-02-099-211/+77
| | | | | | | | | | | There is very little point these days in having properties for both optical and digital zoom. Most mobile cameras don't have a real optical zoom, but instead combine different cameras with different focal lengths. Change-Id: Icac48d949e767d7f3105c4d330e15273fe715fbe Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove direct dependency on v4l2Lars Knoll2021-02-0912-73/+52
| | | | | | | | | | | Using GstDevice, there is no need to directly depend on Video4Linux, at least not for device discovery. We'll probably continue to have a dependency on it for setting properties on the video device. Change-Id: Idcea9f257cf5a6fa6e54819fcdc278c7c94bfa03 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove some old/unused code in the gstreamer pluginLars Knoll2021-02-098-275/+12
| | | | | | | | | Remove some wrapper APIs that were only there to help support old gstreamer versions and some unused methods. Change-Id: I6c7a3e09c2ef7a29c4e89799d227d509bfce4dcd Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Disable x265enc on gstreamer-1.16Lars Knoll2021-02-091-0/+2
| | | | | | | | | | At least on that version, the plugin seems to be broken. At least it doesn't like cooperating with the muxers and encodebin. Change-Id: I007932202e2c40c1a923181d9afd7375fd3ec0ae Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* More changes for QMediaFormat handling on the backendLars Knoll2021-02-0922-1060/+689
| | | | | | | | | | 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-096-58/+213
| | | | | | | | | | 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-0968-4620/+955
| | | | | | | | | | | | | 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-0927-8/+1550
| | | | | | | | | | | | | | | | 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-0911-97/+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-0935-1307/+579
| | | | | | | | | | | | 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-2922-194/+49
| | | | | | | | | | 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-2931-1634/+22
| | | | | | | | | | 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-2924-501/+60
| | | | | | | | | | | 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>