summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-07-23 11:05:11 +0200
committerLiang Qi <liang.qi@qt.io>2019-07-23 11:06:12 +0200
commitdbdcc1b099dc25ffb707a2441191463de33c51f3 (patch)
tree252495f053b0084da47894ce1daee460abe40718 /src/plugins/directshow/camera/dsvideodevicecontrol.cpp
parent5825dd2773755cea236d9816cc7541bc20f9cb80 (diff)
parent32e49d634c5892ed98074cb3dd76a323357dfe54 (diff)
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"
Diffstat (limited to 'src/plugins/directshow/camera/dsvideodevicecontrol.cpp')
-rw-r--r--src/plugins/directshow/camera/dsvideodevicecontrol.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
index 2c1fab764..7285d0fb3 100644
--- a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
+++ b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
@@ -129,10 +129,10 @@ void DSVideoDeviceControl::updateDevices()
deviceList->clear();
- ICreateDevEnum* pDevEnum = NULL;
- IEnumMoniker* pEnum = NULL;
+ ICreateDevEnum* pDevEnum = nullptr;
+ IEnumMoniker* pEnum = nullptr;
// Create the System device enumerator
- HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL,
+ HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, nullptr,
CLSCTX_INPROC_SERVER, IID_ICreateDevEnum,
reinterpret_cast<void**>(&pDevEnum));
if (SUCCEEDED(hr)) {
@@ -142,12 +142,12 @@ void DSVideoDeviceControl::updateDevices()
if (S_OK == hr) {
pEnum->Reset();
// go through and find all video capture devices
- IMoniker* pMoniker = NULL;
+ IMoniker* pMoniker = nullptr;
IMalloc *mallocInterface = 0;
CoGetMalloc(1, (LPMALLOC*)&mallocInterface);
- while (pEnum->Next(1, &pMoniker, NULL) == S_OK) {
+ while (pEnum->Next(1, &pMoniker, nullptr) == S_OK) {
BSTR strName = 0;
- hr = pMoniker->GetDisplayName(NULL, NULL, &strName);
+ hr = pMoniker->GetDisplayName(nullptr, nullptr, &strName);
if (SUCCEEDED(hr)) {
QString output(QString::fromWCharArray(strName));
mallocInterface->Free(strName);