Skip to content

Commit b8ed22d

Browse files
committed
Try dissabling the associated camera sources.
1 parent 430f8fc commit b8ed22d

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

windows/mf/MediaSource/src/activate.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ AkVCam::Activate::Activate(const CLSID &clsid)
4343
{
4444
this->d = new ActivatePrivate;
4545
this->d->m_clsid = clsid;
46-
this->SetUINT32(AKVCAM_MF_VIRTUALCAMERA_PROVIDE_ASSOCIATED_CAMERA_SOURCES, 1);
46+
this->SetUINT32(AKVCAM_MF_VIRTUALCAMERA_PROVIDE_ASSOCIATED_CAMERA_SOURCES, 0);
4747
this->SetGUID(MFT_TRANSFORM_CLSID_Attribute, clsid);
4848
this->d->m_mediaSource = new MediaSource(this->d->m_clsid, this);
4949

@@ -118,19 +118,28 @@ HRESULT AkVCam::Activate::ActivateObject(REFIID riid, void **ppv)
118118
AkLogFunction();
119119
AkLogInfo("Activating for IID: %s", stringFromClsidMF(riid).c_str());
120120

121-
if (!ppv)
121+
if (!ppv) {
122+
AkLogError("Invalid ponter");
123+
122124
return E_POINTER;
125+
}
123126

124127
*ppv = nullptr;
125128

126-
if (this->d->m_shutdown)
129+
if (this->d->m_shutdown) {
130+
AkLogError("The object is shutdown");
131+
127132
return MF_E_SHUTDOWN;
133+
}
128134

129135
if (!this->d->m_mediaSource) {
130136
this->d->m_mediaSource = new MediaSource(this->d->m_clsid, this);
131137

132-
if (!this->d->m_mediaSource)
138+
if (!this->d->m_mediaSource) {
139+
AkLogError("The program is out of memory");
140+
133141
return E_OUTOFMEMORY;
142+
}
134143
}
135144

136145
return this->d->m_mediaSource->QueryInterface(riid, ppv);

0 commit comments

Comments
 (0)