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
qcgcapturablewindows.mm
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include <QtFFmpegMediaPluginImpl/private/qcgcapturablewindows_p.h>
5
6#include <QtCore/private/qcore_mac_p.h>
7
8#include <QtGui/qwindow.h>
9
10#include <QtMultimedia/private/qcapturablewindow_p.h>
11
12#include <QtFFmpegMediaPluginImpl/private/qffmpegdarwinintegrationfactory_p.h>
13
14#import <AppKit/NSWindow.h>
15
16QT_BEGIN_NAMESPACE
17
18namespace QFFmpeg {
19
49
56
58{
59 auto* nsView = reinterpret_cast<NSView*>(window->winId());
60
62 if (nsWindow == nullptr)
63 return q23::unexpected{ QStringLiteral("NSView had no associated NSWindow") };
64
67 return q23::unexpected{ QStringLiteral("NSWindow has no CGWindowID") };
68
71 window->title());
72}
73
75{
76 return std::make_unique<QCGCapturableWindows>();
77}
78
79} // namespace QFFmpeg
80
81QT_END_NAMESPACE
std::unique_ptr< QPlatformCapturableWindows > makeQCgCapturableWindows()
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType