Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qffmpegwindowcapture_uwp.cpp File Reference
#include "qffmpegwindowcapture_uwp_p.h"
#include "qffmpegsurfacecapturethread_p.h"
#include <private/qabstractvideobuffer_p.h>
#include <unknwn.h>
#include <winrt/base.h>
#include <QtCore/private/qfactorycacheregistration_p.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.Graphics.Capture.h>
#include <winrt/Windows.Graphics.DirectX.h>
#include <winrt/Windows.Graphics.DirectX.Direct3D11.h>
#include <Windows.Graphics.Capture.h>
#include <Windows.Graphics.Capture.Interop.h>
#include <windows.graphics.directx.direct3d11.interop.h>
#include <D3d11.h>
#include <dxgi1_2.h>
#include <dwmapi.h>
#include <lowlevelmonitorconfigurationapi.h>
#include <physicalmonitorenumerationapi.h>
#include "qvideoframe.h"
#include <qwindow.h>
#include <qloggingcategory.h>
#include <qguiapplication.h>
#include <private/qmultimediautils_p.h>
#include <private/qwindowsmultimediautils_p.h>
#include <private/qcapturablewindow_p.h>
#include <qpa/qplatformscreen_p.h>
#include <memory>
#include <system_error>
#include <variant>
#include "qffmpegwindowcapture_uwp.moc"
+ Include dependency graph for qffmpegwindowcapture_uwp.cpp:

Go to the source code of this file.

Classes

struct  DeviceFramePool
 
class  QUwpTextureVideoBuffer
 
class  QFFmpegWindowCaptureUwp::Grabber
 
struct  Monitor
 

Namespaces

namespace  winrt
 
namespace  winrt::impl
 

Functions

template<typename Async >
auto winrt::impl::wait_for (Async const &async, Windows::Foundation::TimeSpan const &timeout)
 
static Q_LOGGING_CATEGORY (qLcWindowCaptureUwp, "qt.multimedia.ffmpeg.windowcapture.uwp")
 
static QMaybe< DeviceFramePoolcreateCaptureFramePool (IDXGIAdapter1 *adapter, const winrt::GraphicsCaptureItem &item)
 
static QMaybe< MonitorfindScreen (const QScreen *screen)
 
static QMaybe< MonitorfindScreenForWindow (HWND wh)
 
static QMaybe< winrt::GraphicsCaptureItem > createScreenCaptureItem (HMONITOR handle)
 
static QMaybe< winrt::GraphicsCaptureItem > createWindowCaptureItem (HWND handle)
 
static QString isCapturableWindow (HWND hwnd)
 
static qreal getMonitorRefreshRateHz (HMONITOR handle)
 

Function Documentation

◆ createCaptureFramePool()

static QMaybe< DeviceFramePool > createCaptureFramePool ( IDXGIAdapter1 *  adapter,
const winrt::GraphicsCaptureItem &  item 
)
static

Definition at line 237 of file qffmpegwindowcapture_uwp.cpp.

References QWindowsMultimediaUtils::errorString(), item, and pool.

Referenced by QFFmpegWindowCaptureUwp::setActiveInternal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createScreenCaptureItem()

static QMaybe< winrt::GraphicsCaptureItem > createScreenCaptureItem ( HMONITOR  handle)
static

Definition at line 325 of file qffmpegwindowcapture_uwp.cpp.

References QWindowsMultimediaUtils::errorString(), factory, and item.

+ Here is the call graph for this function:

◆ createWindowCaptureItem()

static QMaybe< winrt::GraphicsCaptureItem > createWindowCaptureItem ( HWND  handle)
static

Definition at line 338 of file qffmpegwindowcapture_uwp.cpp.

References QWindowsMultimediaUtils::errorString(), factory, and item.

Referenced by QFFmpegWindowCaptureUwp::setActiveInternal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findScreen()

static QMaybe< Monitor > findScreen ( const QScreen screen)
static

Definition at line 270 of file qffmpegwindowcapture_uwp.cpp.

References desc, QWindowsMultimediaUtils::errorString(), factory, QString::fromWCharArray(), i, j, match(), QScreen::name, output, qCDebug, and screen.

+ Here is the call graph for this function:

◆ findScreenForWindow()

static QMaybe< Monitor > findScreenForWindow ( HWND  wh)
static

Definition at line 299 of file qffmpegwindowcapture_uwp.cpp.

References desc, QWindowsMultimediaUtils::errorString(), factory, QString::fromWCharArray(), i, j, output, and qCDebug.

Referenced by QFFmpegWindowCaptureUwp::setActiveInternal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMonitorRefreshRateHz()

static qreal getMonitorRefreshRateHz ( HMONITOR  handle)
static

Definition at line 383 of file qffmpegwindowcapture_uwp.cpp.

Referenced by QFFmpegWindowCaptureUwp::setActiveInternal().

+ Here is the caller graph for this function:

◆ isCapturableWindow()

static QString isCapturableWindow ( HWND  hwnd)
static

Definition at line 351 of file qffmpegwindowcapture_uwp.cpp.

References className, QString::fromWCharArray(), and MAX_PATH.

Referenced by QFFmpegWindowCaptureUwp::setActiveInternal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Q_LOGGING_CATEGORY()

static Q_LOGGING_CATEGORY ( qLcWindowCaptureUwp  ,
"qt.multimedia.ffmpeg.windowcapture.uwp"   
)
static