이 페이지에서

Qt Multimedia Windows에서

이 페이지에서는 Windows에서 Qt Multimedia 를 사용할 때 고려해야 할 사항에 대해 설명합니다.

COM 관련 참고 사항

Qt Multimedia Qt Multimedia 는 Windows 플랫폼의 COM API를 사용합니다. 따라서 API에 액세스하는 스레드에서 COM을 초기화해야 합니다. API는 필요에 따라 COM을 자동으로 초기화하지만, API를 호출하기 전에 애플리케이션 시작 시 메인 스레드에서 인스턴스를 초기화하는 것이 좋습니다. 이렇게 하면 어떤 스레드에서든 API를 호출하기 전에 메인 단일 스레드 아파트(main STA)가 초기화되도록 보장됩니다. 또한 다른 모든 아파트가 종료될 때까지 메인 STA가 초기화 해제되지 않도록 보장합니다. Qt Multimedia Qt Multimedia QGuiApplication Qt Multimedia

Qt Multimedia COM을 필요로 하는 API는 ` CoInitializeEx(nullptr, COINIT_APARTMENT_THREADED)`를 호출하여 스레드를 단일 스레드 아파트로 초기화하며, ` CoUninitialize `는 스레드가 종료될 때까지 호출되지 않습니다. 이는 메인 애플리케이션 스레드에도 적용되며, 이 경우 정적 변수의 소멸 중에 ` CoUninitialize `가 호출됩니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.