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
platform-notes-windows.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2024 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtmultimedia-windows.html
6
\title Qt Multimedia on Windows
7
\brief Platform notes for Windows
8
9
This page discusses considerations for using Qt Multimedia on Windows.
10
11
\section1 Notes on COM
12
13
Qt Multimedia uses COM APIs from the Windows platform. This requires COM
14
to be initialized on the threads that access Qt Multimedia APIs.
15
Although Qt Multimedia APIs will automatically initialize COM as needed,
16
we recommend initializing the QGuiApplication instance from the main
17
thread during application startup before making any calls to Qt
18
Multimedia APIs. This ensures that the main single threaded apartment
19
(main STA) is initialized before Qt Multimedia APIs are called from any
20
thread. This also guarantees that the main STA is not uninitialized
21
until all other apartments have shut down.
22
23
Qt Multimedia APIs that require COM will initialize the thread as a
24
single-threaded apartment by calling \c{CoInitializeEx(nullptr,
25
COINIT_APARTMENT_THREADED)}, and \c{CoUninitialize} will not be called
26
until the thread exits. This applies to the main application thread as
27
well, where \c{CoUninitialize} is called during the destruction of
28
static variables.
29
*/
qtmultimedia
src
multimedia
doc
src
platform-notes-windows.qdoc
Generated on
for Qt by
1.14.0