Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qwindowsvideodevices.cpp File Reference
#include "qwindowsvideodevices_p.h"
#include <private/qcameradevice_p.h>
#include <private/qwindowsmfdefs_p.h>
#include <private/qwindowsmultimediautils_p.h>
#include <private/qcomptr_p.h>
#include <private/qcomtaskresource_p.h>
#include <dbt.h>
#include <mfapi.h>
#include <mfreadwrite.h>
#include <mferror.h>
+ Include dependency graph for qwindowsvideodevices.cpp:

Go to the source code of this file.

Functions

QT_BEGIN_NAMESPACE LRESULT QT_WIN_CALLBACK deviceNotificationWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
static HWND createMessageOnlyWindow ()
 
static std::optional< QCameraFormatcreateCameraFormat (IMFMediaType *mediaFormat)
 
static QString getString (IMFActivate *device, const IID &id)
 
static std::optional< QCameraDevicecreateCameraDevice (IMFActivate *device)
 
static QList< QCameraDevicereadCameraDevices (IMFAttributes *attr)
 

Variables

static const auto windowClassName = TEXT("QWindowsMediaDevicesMessageWindow")
 

Function Documentation

◆ createCameraDevice()

static std::optional< QCameraDevice > createCameraDevice ( IMFActivate *  device)
static

Definition at line 146 of file qwindowsvideodevices.cpp.

References createCameraFormat(), device, getString(), i, info, and QString::toUtf8().

Referenced by readCameraDevices().

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

◆ createCameraFormat()

static std::optional< QCameraFormat > createCameraFormat ( IMFMediaType *  mediaFormat)
static

Definition at line 103 of file qwindowsvideodevices.cpp.

References QVideoFrameFormat::Format_Invalid, and QWindowsMultimediaUtils::pixelFormatFromMediaSubtype().

Referenced by createCameraDevice().

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

◆ createMessageOnlyWindow()

static HWND createMessageOnlyWindow ( )
static

Definition at line 39 of file qwindowsvideodevices.cpp.

References deviceNotificationWndProc(), and windowClassName.

Referenced by QWindowsVideoDevices::QWindowsVideoDevices().

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

◆ deviceNotificationWndProc()

QT_BEGIN_NAMESPACE LRESULT QT_WIN_CALLBACK deviceNotificationWndProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 20 of file qwindowsvideodevices.cpp.

Referenced by createMessageOnlyWindow().

+ Here is the caller graph for this function:

◆ getString()

static QString getString ( IMFActivate *  device,
const IID id 
)
static

Definition at line 134 of file qwindowsvideodevices.cpp.

References device, QString::fromWCharArray(), and str.

Referenced by createCameraDevice(), and QLocaleData::numericData().

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

◆ readCameraDevices()

static QList< QCameraDevice > readCameraDevices ( IMFAttributes *  attr)
static

Definition at line 184 of file qwindowsvideodevices.cpp.

References createCameraDevice(), device, and i.

Referenced by QWindowsVideoDevices::videoDevices().

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

Variable Documentation

◆ windowClassName

const auto windowClassName = TEXT("QWindowsMediaDevicesMessageWindow")
static