Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwindowscamera.cpp File Reference

(0dafe69a5371e856eb1b3f4539dbd79f62b0f60e)

#include "qwindowscamera_p.h"
#include "qsemaphore.h"
#include "qmutex.h"
#include <private/qmemoryvideobuffer_p.h>
#include <private/qwindowsmfdefs_p.h>
#include <private/qwindowsmultimediautils_p.h>
#include <private/qcomobject_p.h>
#include <mfapi.h>
#include <mfidl.h>
#include <mferror.h>
#include <mfreadwrite.h>
#include <system_error>
+ Include dependency graph for qwindowscamera.cpp:

Go to the source code of this file.

Classes

class  CameraReaderCallback
 
class  ActiveCamera
 

Functions

static ComPtr< IMFSourceReader > createCameraReader (IMFMediaSource *mediaSource, const ComPtr< CameraReaderCallback > &callback)
 
static ComPtr< IMFMediaSource > createCameraSource (const QString &deviceId)
 
static int calculateVideoFrameStride (IMFMediaType *videoType, int width)
 
static bool setCameraReaderFormat (IMFSourceReader *sourceReader, IMFMediaType *videoType)
 
static ComPtr< IMFMediaType > findVideoType (IMFSourceReader *reader, const QCameraFormat &format)
 

Function Documentation

◆ calculateVideoFrameStride()

static int calculateVideoFrameStride ( IMFMediaType * videoType,
int width )
static

Definition at line 86 of file qwindowscamera.cpp.

References QWindowsMultimediaUtils::errorString(), Q_ASSERT, qAbs(), and qWarning.

Referenced by ActiveCamera::setFormat().

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

◆ createCameraReader()

static ComPtr< IMFSourceReader > createCameraReader ( IMFMediaSource * mediaSource,
const ComPtr< CameraReaderCallback > & callback )
static

Definition at line 45 of file qwindowscamera.cpp.

References qWarning.

Referenced by ActiveCamera::create().

+ Here is the caller graph for this function:

◆ createCameraSource()

static ComPtr< IMFMediaSource > createCameraSource ( const QString & deviceId)
static

Definition at line 65 of file qwindowscamera.cpp.

References MFCreateDeviceSource(), QMM_MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID, qWarning, and QString::utf16().

Referenced by ActiveCamera::create().

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

◆ findVideoType()

static ComPtr< IMFMediaType > findVideoType ( IMFSourceReader * reader,
const QCameraFormat & format )
static

Definition at line 116 of file qwindowscamera.cpp.

References i, and QWindowsMultimediaUtils::pixelFormatFromMediaSubtype().

Referenced by ActiveCamera::setFormat().

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

◆ setCameraReaderFormat()

static bool setCameraReaderFormat ( IMFSourceReader * sourceReader,
IMFMediaType * videoType )
static

Definition at line 103 of file qwindowscamera.cpp.

References QWindowsMultimediaUtils::errorString(), Q_ASSERT, and qWarning.

Referenced by ActiveCamera::setFormat().

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