Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qt6-changes.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtmultimedia-changes-qt6.html
6
\title Changes to Qt Multimedia
7
\ingroup changes-qt-5-to-6
8
\brief Migrate Qt Multimedia to Qt 6.
9
10
Qt 6 is a result of the conscious effort to make the framework more
11
efficient and easy to use.
12
13
We try to maintain binary and source compatibility for all the public
14
APIs in each release. But some changes were inevitable in an effort to
15
make Qt a better framework.
16
17
The module has been refactored significantly and has changed classification,
18
from essential to add-on. The Qt Multimedia module in Qt 6 replaces the
19
Qt Multimedia module from Qt 5.x. Existing code that uses Qt Multimedia from
20
Qt 5 can be ported with limited effort.
21
22
23
\section1 New features in Qt 6
24
25
There are a number of new features in Qt Multimedia:
26
\list
27
\li QMediaCaptureSession class is the central object for media capture.
28
\li QMediaRecorder class is now a class limited to recording audio and video.
29
It handles encoding of data produced in a capture session.
30
\li Using QMediaFormat and QMediaRecorder, setting up the desired encoding
31
when recording has changed significantly.
32
\li You can now also monitor the audio recorded by a capture session.
33
\li Support for selection of audio, video and subtitle tracks when playing
34
back media files has been added.
35
\li QAudioDecoder is now supported on all platforms.
36
\endlist
37
38
39
\section1 Removed features
40
41
\table 70%
42
\header
43
\li Removed feature
44
\li Notes or suggested alternative
45
\row
46
\li Playlist in QMediaPlayer
47
\li QMediaPlayer does not do any playlist handling anymore in Qt 6.
48
\row
49
\li QMediaPlayList
50
\li This class has been removed from the API. It does however still exist
51
as part of the \l{Media Player Example}.
52
\row
53
\li QAudioProbe and QVideoProbe
54
\li The audio and video probing API has been removed.
55
\row
56
\li QAudioRecorder
57
\li Use the QMediaCaptureSession or CaptureSession QML type.
58
\row
59
\li \l{Audio QML type}
60
\li Use MediaPlayer QML type.
61
\row
62
\li QMediaObject and QMediaBindableInterface
63
\li These classes have been removed in favor of a more direct API for
64
setting up connections between objects using, for example, setVideoOutput
65
and QMediaCaptureSession.
66
\row
67
\li QCameraViewFinderSettings
68
\li This class has been removed. Use QCameraFormat to define the
69
resolution and frame rate the camera should be using.
70
\row
71
\li QMediaContent
72
\li The class has been removed. Use QUrl for individual media files instead.
73
\row
74
\li QSound
75
\li Use QSoundEffect instead.
76
\row
77
\li QVideoFilterRunnable
78
\li Use \l{shader effects} in QML instead or access the QVideoFrame's
79
content in C++.
80
\row
81
\li Public back-end API
82
\li The back-end API of Qt Multimedia is private in Qt 6. This improves
83
response time for supporting new multimedia use cases. Any classes that
84
contain the words "Control" or "Abstract" in the class name in Qt 5 are
85
now private in Qt 6.
86
\row
87
\li Support for ALSA audio on Linux is experimental
88
\li Audio on Linux requires PulseAudio. Experimental ALSA support will be
89
deprecated in future Qt versions. See
90
\l{Qt Multimedia on Linux}{Linux platform notes} for details.
91
\endtable
92
93
\section1 Changed features
94
95
A number of classes previously offered in Qt Multimedia have
96
changed in ways that may affect previously written code. The following table
97
highlights these changes.
98
99
\table 70%
100
\header
101
\li Changed feature
102
\li Notes
103
\row
104
\li Handling of Camera resolutions and frame rates
105
\li Handling of these has been simplified and a new QCameraFormat class
106
helps with selecting the correct resolution and frame rate for the camera.
107
\row
108
\li Video output handling on the C++ side has changed significantly.
109
\li QAbstractVideoSurface has been replaced by the QVideoSink class, and
110
generic rendering support has been enhanced to cover all \l{pixel format}s
111
supported by Qt Multimedia.
112
\row
113
\li Metadata types
114
\li QMediaMetaData has changed significantly: mainly moving from string
115
based to enum based keys, and reducing the set of supported keys to the
116
ones that can be supported on most platforms.
117
\row
118
\li QMediaFormat
119
\li Handling of formats for encoded media and the settings for the media
120
recorder have changed significantly. Qt 5 provides a string-based
121
API, a separated file format, and audio and video codecs into three classes.
122
However, Qt 6 unifies the formats in the QMediaFormat class. Additional
123
settings are directly specified in QMediaRecorder. Setting up file formats
124
and codecs is now implemented with enums and no longer uses strings. This
125
puts some limitations on the set of codecs that can be used, but helps
126
provide a consistent cross-platform API.
127
\row
128
\li QCameraImageCapture renamed QImageCapture
129
\li None
130
\row
131
\li Audio inputs and outputs
132
\li QMediaPlayer and QMediaCaptureSession (and the corresponding QML types MediaPlayer and
133
CaptureSession) are not connected to any audio devices by default. Explicitly connect them
134
to a QAudioInput/AudioInput or QAudioOutput/AudioOutput to capture or play back audio.
135
\row
136
\li Capturing video
137
\li A capture session is by default not connected to a Camera. Connect it to a QCamera object
138
(Camera item) to be able to capture video or still images.
139
\endtable
140
141
*/
qtmultimedia
src
multimedia
doc
src
qt6-changes.qdoc
Generated on
for Qt by
1.14.0