Doc: Polish the description of changes to the Qt Multimedia module

- Fix errors
    - QtMultimediaKit is renamed to QMultimedia, not QtMultimedia
    - It's not necessary to explicitly convert metadata keys into
      strings -- Q_DECLARE_METADATA takes care of that
    - The introduction of MediaPlayer and VideoOutput does not affect
      existing code
- Follow module naming guidelines at
  http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation
- Shorten descriptions, improve flow
- Remove trivia

Change-Id: I3ab9bb2f8f33cbea52b5993f3060d929a7e39ef1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Sze Howe Koh
2012-11-08 19:04:48 +08:00
committed by The Qt Project
parent 748684b357
commit 294fa9c5df

View File

@@ -32,32 +32,32 @@
\brief A description of changes in this version of Qt Multimedia \brief A description of changes in this version of Qt Multimedia
The Qt Multimedia module in Qt 5 is a combination of the Qt Multimedia module The Qt Multimedia module in Qt 5 combines (and replaces) two older modules, namely the
in Qt 4.x and the Qt Multimedia Kit module of Qt Mobility. It replaces both Qt Multimedia module from Qt 4.x, and Qt Multimedia Kit module from Qt Mobility.
of these modules by combining the code. If you've previously used Qt Multimedia Existing code that uses Qt Multimedia from Qt 4 can be ported with minimal effort, but
there are not too many changes required for existing code, but there are some porting code that uses Qt Multimedia Kit may be a more involved process. The
larger changes required for porting code that used Qt Multimedia Kit (most notably \l {changed features} section highlights changes relevant to porting.
the namespace and header file prefix has changed, and the qmake pro file changes
needed to enable Qt Multimedia).
One other change of note is that widget related classes (like \l QVideoWidget) Also, note that widget-based classes, such as \l QVideoWidget, are now in a separate
are now in a new library (Qt Multimedia Widgets). module called Qt Multimedia Widgets.
\section1 New features in 5.0 \section1 New features in Qt 5.0
There are a number of new features in Qt Multimedia 5.0: There are a number of new features in Qt Multimedia:
\list \list
\li Expanded QML API \li Expanded QML API
\li In addition to the \l Video QML type, there is now the option of using \l MediaPlayer and \l VideoOutput together
\li QML \l Torch class
\li New \l QAudioRecorder class \li New \l QAudioRecorder class
\li Volume support for QAudioOutput and QAudioInput \li Volume support for QAudioOutput and QAudioInput
\li More examples and documentation \li More examples and documentation
\li QML \l Torch class \li QSound moved from Qt GUI to Qt Multimedia
\li QSound moved from QtGui to QtMultimedia
\li QSoundEffect available to C++ now, as well as QML \li QSoundEffect available to C++ now, as well as QML
\li FM Radio Data System classes and types now available (\l QRadioData, \l RadioData) \li FM Radio Data System classes and types now available (\l QRadioData, \l RadioData)
\li Various other API improvements and bugfixes \li Various other API improvements and bugfixes
\endlist \endlist
\section1 Removed features \section1 Removed features
A number of classes or features previously offered in Qt Multimedia or Qt Multimedia Kit have A number of classes or features previously offered in Qt Multimedia or Qt Multimedia Kit have
@@ -76,81 +76,65 @@ been removed.
\section1 Changed features \section1 Changed features
A number of classes previously offered in Qt Multimedia or Qt Multimedia Kit have A number of classes previously offered in Qt Multimedia or Qt Multimedia Kit have
changed in ways that may affect previously written code. There may be other changed in ways that may affect previously written code. This table highlights such changes.
changes (like new features) that will not affect previously written code, and
they are documented elsewhere.
\table 70% \table 70%
\header \header
\li Changed feature \li Changed feature
\li Notes \li Notes
\row \row
\li qmake .pro file changes \li \c qmake project file changes
\li If you've used QtMultimediaKit in the past, you needed to put \li Previously, to use Qt Multimedia Kit, the \c qmake project file must contain
\code \code
CONFIG += mobility CONFIG += mobility
MOBILITY += multimedia MOBILITY += multimedia
\endcode \endcode
in your .pro file. Now you need to use: Now, you only need to write
\code \code
QT += multimedia QT += multimedia
\endcode \endcode
or Or, if you want to use the widget classes,
\code \code
QT += multimedia multimediawidgets QT += multimedia multimediawidgets
\endcode \endcode
if you need to use the widget classes.
\row \row
\li Namespace changes \li Namespaces
\li For Qt Multimedia Kit the majority of the classes were in the \li The \c QtMultimediaKit namespace has been renamed to QMultimedia. This
normal Qt namespace (usually nothing, unless built specially). There affects a few enumerations, namely \c SupportEstimate, \c EncodingQuality,
was a Qt Multimedia Kit namespace for several enumerations. This namespace \c EncodingMode and \c AvailabilityStatus. Searching and replacing
has now changed to Qt Multimedia, so if you've used one of the \c QtMultimediaKit with \c QMultimedia will greatly aid porting efforts. Metadata
\c SupportEstimate, \c EncodingQuality, \c EncodingMode or \c AvailabilityStatus have been split off into their own namespace, QMediaMetaData.
enumerations you'll need to change your code. In fact, running a global
search and replace on \c QtMultimediaKit (to replace it with \c QtMultimedia) will
go a long way with porting your code.
\row \row
\li Meta-data enumeration changes \li Metadata types
\li In Qt Multimedia Kit the available meta-data keys were in an enumeration \li In Qt Multimedia Kit, pre-defined metadata keys were enumerations in the
in the \c QtMultimediaKit namespace. These meta-data keys have been changed \c QtMultimediaKit namespace. These pre-defined keys have been changed to
to string literals in the \c {QMediaMetaData} namespace - generally your string literals in the \c QMediaMetaData namespace, for consistency with
source code will mostly be compatible unless you have created variables or extended keys.
parameters with the \c {QMediaMetaData} type - you should replace these
with \c QString.
\row \row
\li Meta-data method changes \li Metadata accessor methods
\li In Qt Multimedia Kit the available meta-data was split between methods to \li In Qt Multimedia Kit, there were two different families of methods to access
access standard, pre-defined keys, and methods to access extensible free metadata. Functions such as \c QMediaObject::metaData() operated on pre-defined
form key meta-data. These have been combined into a single method to metadata using enumerated keys, while functions such as
access meta-data given a string key, and a list of pre-defined keys. If \c QMediaObject::extendedMetaData() operated on extended metadata using
you've used the \c extendedMetaData method of any class, you will need string keys. Qt 5 combines both families into one (e.g. QMediaObject::metaData()),
to change your code to combine the standard and extended metadata methods. which can operate on both pre-defined and extended metadata, using string keys.
\row \row
\li Qt Metatype registration \li Qt Metatype registration
\li In Qt Multimedia 5.0 we've tried to make sure that we register any classes \li Qt 5 registers many more classes and types with the meta-object system than before.
or types that would be useful to use in cross process signals or in If you have previously applied Q_DECLARE_METATYPE macros to any Qt Multimedia class,
QVariants. If you've previously added Q_DECLARE_METATYPE macros for any you will probably need to remove them.
Qt Multimedia class you will probably need to remove them.
\row \row
\li Video QML type \li QSoundEffect availability
\li If you've previously used \l Video you may be excited \li The SoundEffect QML type was publically accessible in Qt Multimeda Kit,
to learn that it should still work as expected, but you also have and now the C++ version is officially public too. If your code contains the
the choice of using \l MediaPlayer and \l VideoOutput previously undocumented QSoundEffect, you may need to update it.
together for more flexible and advanced use cases.
\row
\li QSoundEffect
\li The SoundEffect QML type was public and accessible in Qt Multimeda Kit,
and now the C++ version is also available. If you managed to use the
private class previously, you'll need to update your code.
\row \row
\li Camera controls \li Camera controls
\li A large number of the camera controls (QCameraImageProcessingControl, \li A large number of the camera controls (QCameraImageProcessingControl,
QCameraFocusControl etc) have been updated to address a number of QCameraFocusControl, etc.) have been updated to address a number of
design flaws. If you have previously been using these classes, you design flaws. In particular, a number of discrete
should check the new design. In particular, a number of discrete
accessor methods have been collapsed into parametrized methods, and accessor methods have been collapsed into parametrized methods, and
the range or data type of some parameters has been adjusted. the ranges or data types of some parameters have been adjusted.
\endtable \endtable