diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/DSUtil/DSUtil.cpp | 20 | ||||
-rw-r--r-- | src/SubPic/DX9SubPic.cpp | 2 | ||||
-rw-r--r-- | src/filters/muxer/WavDest/WavDest.cpp | 2 | ||||
-rw-r--r-- | src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp | 2 | ||||
-rw-r--r-- | src/filters/renderer/VideoRenderers/SyncRenderer.cpp | 2 | ||||
-rw-r--r-- | src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp | 2 | ||||
-rw-r--r-- | src/mpc-hc/FGFilter.cpp | 4 | ||||
-rw-r--r-- | src/mpc-hc/FGManager.cpp | 8 | ||||
-rw-r--r-- | src/mpc-hc/FGManagerBDA.cpp | 10 | ||||
-rw-r--r-- | src/mpc-hc/FileAssoc.cpp | 6 | ||||
-rw-r--r-- | src/mpc-hc/MainFrm.cpp | 34 | ||||
-rw-r--r-- | src/mpc-hc/PPageCapture.cpp | 10 | ||||
-rw-r--r-- | src/mpc-hc/PPageOutput.cpp | 2 | ||||
-rw-r--r-- | src/mpc-hc/PlayerCaptureDialog.cpp | 8 | ||||
-rw-r--r-- | src/mpc-hc/RegFilterChooserDlg.cpp | 2 |
15 files changed, 56 insertions, 58 deletions
diff --git a/src/DSUtil/DSUtil.cpp b/src/DSUtil/DSUtil.cpp index ea30efc3e..10223f827 100644 --- a/src/DSUtil/DSUtil.cpp +++ b/src/DSUtil/DSUtil.cpp @@ -341,12 +341,12 @@ IPin* AppendFilter(IPin* pPin, CString DisplayName, IGraphBuilder* pGB) }
CComPtr<IBaseFilter> pBF;
- if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_IBaseFilter, (void**)&pBF)) || !pBF) {
+ if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_PPV_ARGS(&pBF))) || !pBF) {
break;
}
CComPtr<IPropertyBag> pPB;
- if (FAILED(pMoniker->BindToStorage(pBindCtx, 0, IID_IPropertyBag, (void**)&pPB))) {
+ if (FAILED(pMoniker->BindToStorage(pBindCtx, 0, IID_PPV_ARGS(&pPB)))) {
break;
}
@@ -436,12 +436,12 @@ IPin* InsertFilter(IPin* pPin, CString DisplayName, IGraphBuilder* pGB) }
CComPtr<IBaseFilter> pBF;
- if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_IBaseFilter, (void**)&pBF)) || !pBF) {
+ if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_PPV_ARGS(&pBF))) || !pBF) {
break;
}
CComPtr<IPropertyBag> pPB;
- if (FAILED(pMoniker->BindToStorage(pBindCtx, 0, IID_IPropertyBag, (void**)&pPB))) {
+ if (FAILED(pMoniker->BindToStorage(pBindCtx, 0, IID_PPV_ARGS(&pPB)))) {
break;
}
@@ -565,7 +565,7 @@ void ShowPPage(CString DisplayName, HWND hParentWnd) }
CComPtr<IBaseFilter> pBF;
- if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_IBaseFilter, (void**)&pBF)) || !pBF) {
+ if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_PPV_ARGS(&pBF))) || !pBF) {
return;
}
@@ -1106,13 +1106,13 @@ bool CreateFilter(CStringW DisplayName, IBaseFilter** ppBF, CStringW& FriendlyNa return false;
}
- if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_IBaseFilter, (void**)ppBF)) || !*ppBF) {
+ if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_PPV_ARGS(ppBF))) || !*ppBF) {
return false;
}
CComPtr<IPropertyBag> pPB;
CComVariant var;
- if (SUCCEEDED(pMoniker->BindToStorage(pBindCtx, 0, IID_IPropertyBag, (void**)&pPB))
+ if (SUCCEEDED(pMoniker->BindToStorage(pBindCtx, 0, IID_PPV_ARGS(&pPB)))
&& SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
FriendlyName = var.bstrVal;
}
@@ -1137,7 +1137,7 @@ IBaseFilter* AppendFilter(IPin* pPin, IMoniker* pMoniker, IGraphBuilder* pGB) CreateBindCtx(0, &pBindCtx);
CComPtr<IPropertyBag> pPB;
- if (FAILED(pMoniker->BindToStorage(pBindCtx, 0, IID_IPropertyBag, (void**)&pPB))) {
+ if (FAILED(pMoniker->BindToStorage(pBindCtx, 0, IID_PPV_ARGS(&pPB)))) {
break;
}
@@ -1147,7 +1147,7 @@ IBaseFilter* AppendFilter(IPin* pPin, IMoniker* pMoniker, IGraphBuilder* pGB) }
CComPtr<IBaseFilter> pBF;
- if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_IBaseFilter, (void**)&pBF)) || !pBF) {
+ if (FAILED(pMoniker->BindToObject(pBindCtx, 0, IID_PPV_ARGS(&pBF))) || !pBF) {
break;
}
@@ -1185,7 +1185,7 @@ CStringW GetFriendlyName(CStringW displayName) if (S_OK == MkParseDisplayName(pBindCtx, CComBSTR(displayName), &chEaten, &pMoniker)) {
CComPtr<IPropertyBag> pPB;
CComVariant var;
- if (SUCCEEDED(pMoniker->BindToStorage(pBindCtx, 0, IID_IPropertyBag, (void**)&pPB))
+ if (SUCCEEDED(pMoniker->BindToStorage(pBindCtx, 0, IID_PPV_ARGS(&pPB)))
&& SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
friendlyName = var.bstrVal;
}
diff --git a/src/SubPic/DX9SubPic.cpp b/src/SubPic/DX9SubPic.cpp index 596dcad23..8c9d5e994 100644 --- a/src/SubPic/DX9SubPic.cpp +++ b/src/SubPic/DX9SubPic.cpp @@ -65,7 +65,7 @@ CDX9SubPic::~CDX9SubPic() STDMETHODIMP_(void*) CDX9SubPic::GetObject()
{
CComPtr<IDirect3DTexture9> pTexture;
- if (SUCCEEDED(m_pSurface->GetContainer(IID_IDirect3DTexture9, (void**)&pTexture))) {
+ if (SUCCEEDED(m_pSurface->GetContainer(IID_PPV_ARGS(&pTexture)))) {
return (void*)(IDirect3DTexture9*)pTexture;
}
diff --git a/src/filters/muxer/WavDest/WavDest.cpp b/src/filters/muxer/WavDest/WavDest.cpp index b8e067cb3..fb6a9ce9b 100644 --- a/src/filters/muxer/WavDest/WavDest.cpp +++ b/src/filters/muxer/WavDest/WavDest.cpp @@ -281,7 +281,7 @@ HRESULT CWavDestFilter::StopStreaming() return E_FAIL;
}
- HRESULT hr = ((IMemInputPin*) pDwnstrmInputPin)->QueryInterface(IID_IStream, (void**)&pStream);
+ HRESULT hr = ((IMemInputPin*) pDwnstrmInputPin)->QueryInterface(IID_PPV_ARGS(&pStream));
if (SUCCEEDED(hr)) {
BYTE* pb = (BYTE*)_alloca(m_cbHeader);
diff --git a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp index 8f67a2b03..d3000a530 100644 --- a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp @@ -324,7 +324,7 @@ STDMETHODIMP CEVRAllocatorPresenter::CreateRenderer(IUnknown** ppRenderer) }
}
- hr = pMFGS->GetService(MR_VIDEO_RENDER_SERVICE, IID_IMFVideoRenderer, (void**)&pMFVR);
+ hr = pMFGS->GetService(MR_VIDEO_RENDER_SERVICE, IID_PPV_ARGS(&pMFVR));
if (SUCCEEDED(hr)) {
hr = QueryInterface(__uuidof(IMFVideoPresenter), (void**)&pVP);
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp index 1e5363220..f2f90995d 100644 --- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp +++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp @@ -2635,7 +2635,7 @@ STDMETHODIMP CSyncAP::CreateRenderer(IUnknown** ppRenderer) }
}
- hr = pMFGS->GetService(MR_VIDEO_RENDER_SERVICE, IID_IMFVideoRenderer, (void**)&pMFVR);
+ hr = pMFGS->GetService(MR_VIDEO_RENDER_SERVICE, IID_PPV_ARGS(&pMFVR));
if (SUCCEEDED(hr)) {
hr = QueryInterface(__uuidof(IMFVideoPresenter), (void**)&pVP);
diff --git a/src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp index 5deca105a..0d0c6a75a 100644 --- a/src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp @@ -434,7 +434,7 @@ STDMETHODIMP CVMR9AllocatorPresenter::PresentImage(DWORD_PTR dwUserID, VMR9Prese if (!m_bPendingResetDevice) {
CComPtr<IDirect3DTexture9> pTexture;
- lpPresInfo->lpSurf->GetContainer(IID_IDirect3DTexture9, (void**)&pTexture);
+ lpPresInfo->lpSurf->GetContainer(IID_PPV_ARGS(&pTexture));
if (pTexture) {
m_pVideoSurface[m_nCurSurface] = lpPresInfo->lpSurf;
diff --git a/src/mpc-hc/FGFilter.cpp b/src/mpc-hc/FGFilter.cpp index 5c3fb3996..05e2c2a89 100644 --- a/src/mpc-hc/FGFilter.cpp +++ b/src/mpc-hc/FGFilter.cpp @@ -144,7 +144,7 @@ void CFGFilterRegistry::QueryProperties() {
ASSERT(m_pMoniker);
CComPtr<IPropertyBag> pPB;
- if (SUCCEEDED(m_pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB))) {
+ if (SUCCEEDED(m_pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB)))) {
CComVariant var;
if (SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
m_name = var.bstrVal;
@@ -248,7 +248,7 @@ HRESULT CFGFilterRegistry::Create(IBaseFilter** ppBF, CInterfaceList<IUnknown, & HRESULT hr = E_FAIL;
if (m_pMoniker) {
- if (SUCCEEDED(hr = m_pMoniker->BindToObject(0, 0, IID_IBaseFilter, (void**)ppBF))) {
+ if (SUCCEEDED(hr = m_pMoniker->BindToObject(0, 0, IID_PPV_ARGS(ppBF)))) {
m_clsid = ::GetCLSID(*ppBF);
}
} else if (m_clsid != GUID_NULL) {
diff --git a/src/mpc-hc/FGManager.cpp b/src/mpc-hc/FGManager.cpp index 1e6ddd72c..faf620b62 100644 --- a/src/mpc-hc/FGManager.cpp +++ b/src/mpc-hc/FGManager.cpp @@ -822,20 +822,20 @@ HRESULT CFGManager::Connect(IPin* pPinOut, IPin* pPinIn, bool bContinueRender) CComPtr<IMFVideoMixerBitmap> pMFMB;
CComPtr<IMFVideoProcessor> pMFVP;
- if (SUCCEEDED(pMFGS->GetService(MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl, (void**)&pMFVDC))) {
+ if (SUCCEEDED(pMFGS->GetService(MR_VIDEO_RENDER_SERVICE, IID_PPV_ARGS(&pMFVDC)))) {
m_pUnks.AddTail(pMFVDC);
}
- if (SUCCEEDED(pMFGS->GetService(MR_VIDEO_MIXER_SERVICE, IID_IMFVideoMixerBitmap, (void**)&pMFMB))) {
+ if (SUCCEEDED(pMFGS->GetService(MR_VIDEO_MIXER_SERVICE, IID_PPV_ARGS(&pMFMB)))) {
m_pUnks.AddTail(pMFMB);
}
- if (SUCCEEDED(pMFGS->GetService(MR_VIDEO_MIXER_SERVICE, IID_IMFVideoProcessor, (void**)&pMFVP))) {
+ if (SUCCEEDED(pMFGS->GetService(MR_VIDEO_MIXER_SERVICE, IID_PPV_ARGS(&pMFVP)))) {
m_pUnks.AddTail(pMFVP);
}
//CComPtr<IMFWorkQueueServices> pMFWQS;
- //pMFGS->GetService (MF_WORKQUEUE_SERVICES, IID_IMFWorkQueueServices, (void**)&pMFWQS);
+ //pMFGS->GetService (MF_WORKQUEUE_SERVICES, IID_PPV_ARGS(&pMFWQS));
//pMFWQS->BeginRegisterPlatformWorkQueueWithMMCSS(
if (pMadVRAllocatorPresenter) {
diff --git a/src/mpc-hc/FGManagerBDA.cpp b/src/mpc-hc/FGManagerBDA.cpp index fae87f219..59e1ebb71 100644 --- a/src/mpc-hc/FGManagerBDA.cpp +++ b/src/mpc-hc/FGManagerBDA.cpp @@ -325,7 +325,7 @@ HRESULT CFGManagerBDA::CreateKSFilter(IBaseFilter** ppBF, CLSID KSCategory, cons CComPtr<IPropertyBag> pPB;
CComVariant var;
LPOLESTR strName = nullptr;
- if (SUCCEEDED(pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB)) &&
+ if (SUCCEEDED(pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB))) &&
SUCCEEDED(pMoniker->GetDisplayName(nullptr, nullptr, &strName)) &&
SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
CStringW Name = CStringW(strName);
@@ -333,7 +333,7 @@ HRESULT CFGManagerBDA::CreateKSFilter(IBaseFilter** ppBF, CLSID KSCategory, cons continue;
}
- hr = pMoniker->BindToObject(nullptr, nullptr, IID_IBaseFilter, (void**)ppBF);
+ hr = pMoniker->BindToObject(nullptr, nullptr, IID_PPV_ARGS(ppBF));
if (SUCCEEDED(hr)) {
hr = AddFilter(*ppBF, CStringW(var.bstrVal));
}
@@ -884,7 +884,7 @@ HRESULT CFGManagerBDA::CreateMicrosoftDemux(CComPtr<IBaseFilter>& pMpeg2Demux) bool bAudioEAC3 = false;
bool bAudioLATM = false;
- CheckNoLog(pMpeg2Demux->QueryInterface(IID_IMpeg2Demultiplexer, (void**)&pDemux));
+ CheckNoLog(pMpeg2Demux->QueryInterface(IID_PPV_ARGS(&pDemux)));
LOG(_T("Receiver -> Demux connected."));
CAppSettings& s = AfxGetAppSettings();
@@ -1008,7 +1008,7 @@ HRESULT CFGManagerBDA::SetChannelInternal(CDVBChannel* pChannel) if (pChannel->GetVideoPID() != 0) {
CComPtr<IMpeg2Demultiplexer> pDemux;
- m_pDemux->QueryInterface(IID_IMpeg2Demultiplexer, (void**)&pDemux);
+ m_pDemux->QueryInterface(IID_PPV_ARGS(&pDemux));
if (pChannel->GetVideoType() == DVB_H264) {
UpdateMediaType(&vih2_H264, pChannel);
@@ -1118,7 +1118,7 @@ HRESULT CFGManagerBDA::SwitchStream(DVB_STREAM_TYPE nOldType, DVB_STREAM_TYPE nN if ((nNewType != DVB_H264) && (nNewType != DVB_MPV) && GetState() != State_Stopped) {
CComPtr<IMpeg2Demultiplexer> pDemux;
- m_pDemux->QueryInterface(IID_IMpeg2Demultiplexer, (void**)&pDemux);
+ m_pDemux->QueryInterface(IID_PPV_ARGS(&pDemux));
switch (nNewType) {
case DVB_MPA:
diff --git a/src/mpc-hc/FileAssoc.cpp b/src/mpc-hc/FileAssoc.cpp index 6861760d0..9694c1e96 100644 --- a/src/mpc-hc/FileAssoc.cpp +++ b/src/mpc-hc/FileAssoc.cpp @@ -70,8 +70,7 @@ IApplicationAssociationRegistration* CFileAssoc::CreateRegistrationManager() HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
nullptr,
CLSCTX_INPROC,
- IID_IApplicationAssociationRegistration,
- (LPVOID*)&pAAR);
+ IID_PPV_ARGS(&pAAR));
UNREFERENCED_PARAMETER(hr);
return pAAR;
@@ -878,8 +877,7 @@ bool CFileAssoc::ShowWindowsAssocDialog() HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistrationUI,
nullptr,
CLSCTX_INPROC,
- IID_IApplicationAssociationRegistrationUI,
- (LPVOID*)&pAARUI);
+ IID_PPV_ARGS(&pAARUI));
bool success = (SUCCEEDED(hr) && pAARUI != nullptr);
diff --git a/src/mpc-hc/MainFrm.cpp b/src/mpc-hc/MainFrm.cpp index 189c27e10..2d39e7011 100644 --- a/src/mpc-hc/MainFrm.cpp +++ b/src/mpc-hc/MainFrm.cpp @@ -9173,7 +9173,7 @@ void CMainFrame::PlayFavoriteDVD(CString fav) SendMessage(WM_COMMAND, ID_FILE_CLOSEMEDIA);
CComPtr<IDvdState> pDvdState;
- HRESULT hr = OleLoadFromStream((IStream*)&stream, IID_IDvdState, (void**)&pDvdState);
+ HRESULT hr = OleLoadFromStream((IStream*)&stream, IID_PPV_ARGS(&pDvdState));
UNREFERENCED_PARAMETER(hr);
CAutoPtr<OpenDVDData> p(DEBUG_NEW OpenDVDData());
@@ -10996,37 +10996,37 @@ void CMainFrame::OpenCapture(OpenDeviceData* pODD) m_pVidCap = pVidCapTmp;
if (!pAudCapTmp) {
- if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Interleaved, m_pVidCap, IID_IAMStreamConfig, (void**)&m_pAMVSCCap))
- && FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVidCap, IID_IAMStreamConfig, (void**)&m_pAMVSCCap))) {
+ if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Interleaved, m_pVidCap, IID_PPV_ARGS(&m_pAMVSCCap)))
+ && FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVidCap, IID_PPV_ARGS(&m_pAMVSCCap)))) {
TRACE(_T("Warning: No IAMStreamConfig interface for vidcap capture"));
}
- if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Interleaved, m_pVidCap, IID_IAMStreamConfig, (void**)&m_pAMVSCPrev))
- && FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, m_pVidCap, IID_IAMStreamConfig, (void**)&m_pAMVSCPrev))) {
+ if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Interleaved, m_pVidCap, IID_PPV_ARGS(&m_pAMVSCPrev)))
+ && FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, m_pVidCap, IID_PPV_ARGS(&m_pAMVSCPrev)))) {
TRACE(_T("Warning: No IAMStreamConfig interface for vidcap capture"));
}
- if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Audio, m_pVidCap, IID_IAMStreamConfig, (void**)&m_pAMASC))
- && FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Audio, m_pVidCap, IID_IAMStreamConfig, (void**)&m_pAMASC))) {
+ if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Audio, m_pVidCap, IID_PPV_ARGS(&m_pAMASC)))
+ && FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Audio, m_pVidCap, IID_PPV_ARGS(&m_pAMASC)))) {
TRACE(_T("Warning: No IAMStreamConfig interface for vidcap"));
} else {
m_pAudCap = m_pVidCap;
}
} else {
- if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVidCap, IID_IAMStreamConfig, (void**)&m_pAMVSCCap))) {
+ if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVidCap, IID_PPV_ARGS(&m_pAMVSCCap)))) {
TRACE(_T("Warning: No IAMStreamConfig interface for vidcap capture"));
}
- if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVidCap, IID_IAMStreamConfig, (void**)&m_pAMVSCPrev))) {
+ if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVidCap, IID_PPV_ARGS(&m_pAMVSCPrev)))) {
TRACE(_T("Warning: No IAMStreamConfig interface for vidcap capture"));
}
}
- if (FAILED(m_pCGB->FindInterface(&LOOK_UPSTREAM_ONLY, nullptr, m_pVidCap, IID_IAMCrossbar, (void**)&m_pAMXBar))) {
+ if (FAILED(m_pCGB->FindInterface(&LOOK_UPSTREAM_ONLY, nullptr, m_pVidCap, IID_PPV_ARGS(&m_pAMXBar)))) {
TRACE(_T("Warning: No IAMCrossbar interface was found\n"));
}
- if (FAILED(m_pCGB->FindInterface(&LOOK_UPSTREAM_ONLY, nullptr, m_pVidCap, IID_IAMTVTuner, (void**)&m_pAMTuner))) {
+ if (FAILED(m_pCGB->FindInterface(&LOOK_UPSTREAM_ONLY, nullptr, m_pVidCap, IID_PPV_ARGS(&m_pAMTuner)))) {
TRACE(_T("Warning: No IAMTVTuner interface was found\n"));
}
// TODO: init m_pAMXBar
@@ -11059,8 +11059,8 @@ void CMainFrame::OpenCapture(OpenDeviceData* pODD) m_pAudCap = pAudCapTmp;
- if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Audio, m_pAudCap, IID_IAMStreamConfig, (void**)&m_pAMASC))
- && FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Audio, m_pAudCap, IID_IAMStreamConfig, (void**)&m_pAMASC))) {
+ if (FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Audio, m_pAudCap, IID_PPV_ARGS(&m_pAMASC)))
+ && FAILED(m_pCGB->FindInterface(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Audio, m_pAudCap, IID_PPV_ARGS(&m_pAMASC)))) {
TRACE(_T("Warning: No IAMStreamConfig interface for vidcap"));
}
/*
@@ -11117,14 +11117,14 @@ void CMainFrame::OpenCustomizeGraph() m_pGB->AddFilter(m_pRefClock, name);
CComPtr<IReferenceClock> refClock;
- m_pRefClock->QueryInterface(IID_IReferenceClock, reinterpret_cast<void**>(&refClock));
+ m_pRefClock->QueryInterface(IID_PPV_ARGS(&refClock));
CComPtr<IMediaFilter> mediaFilter;
- m_pGB->QueryInterface(IID_IMediaFilter, reinterpret_cast<void**>(&mediaFilter));
+ m_pGB->QueryInterface(IID_PPV_ARGS(&mediaFilter));
mediaFilter->SetSyncSource(refClock);
mediaFilter = nullptr;
refClock = nullptr;
- m_pRefClock->QueryInterface(IID_ISyncClock, reinterpret_cast<void**>(&m_pSyncClock));
+ m_pRefClock->QueryInterface(IID_PPV_ARGS(&m_pSyncClock));
CComQIPtr<ISyncClockAdviser> pAdviser = m_pCAP;
if (pAdviser) {
@@ -14459,7 +14459,7 @@ bool CMainFrame::BuildGraphVideoAudio(int fVPreview, bool fVCapture, int fAPrevi }
m_pAMDF = nullptr;
- m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVidCap, IID_IAMDroppedFrames, (void**)&m_pAMDF);
+ m_pCGB->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, m_pVidCap, IID_PPV_ARGS(&m_pAMDF));
}
//if (m_pAudCap)
diff --git a/src/mpc-hc/PPageCapture.cpp b/src/mpc-hc/PPageCapture.cpp index 4bbcc09fe..771cc264e 100644 --- a/src/mpc-hc/PPageCapture.cpp +++ b/src/mpc-hc/PPageCapture.cpp @@ -433,7 +433,7 @@ void CPPageCapture::FindAnalogDevices() // List video devices
BeginEnumSysDev(CLSID_VideoInputDeviceCategory, pMoniker) {
CComPtr<IPropertyBag> pPB;
- pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB);
+ pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB));
CComVariant var;
if (SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
@@ -468,7 +468,7 @@ void CPPageCapture::FindAnalogDevices() BeginEnumSysDev(CLSID_AudioInputDeviceCategory, pMoniker) {
CComPtr<IPropertyBag> pPB;
- pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB);
+ pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB));
CComVariant var;
if (SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
@@ -579,7 +579,7 @@ void CPPageCapture::FindDigitalDevices() BeginEnumSysDev(KSCATEGORY_BDA_NETWORK_PROVIDER, pMoniker) {
CComPtr<IPropertyBag> pPB;
- pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB);
+ pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB));
CComVariant var;
if (SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
@@ -610,7 +610,7 @@ void CPPageCapture::FindDigitalDevices() iSel = 0;
BeginEnumSysDev(KSCATEGORY_BDA_NETWORK_TUNER, pMoniker) {
CComPtr<IPropertyBag> pPB;
- pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB);
+ pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB));
CComVariant var;
if (SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
@@ -636,7 +636,7 @@ void CPPageCapture::FindDigitalDevices() iSel = 0;
BeginEnumSysDev(KSCATEGORY_BDA_RECEIVER_COMPONENT, pMoniker) {
CComPtr<IPropertyBag> pPB;
- pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB);
+ pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB));
CComVariant var;
if (SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
diff --git a/src/mpc-hc/PPageOutput.cpp b/src/mpc-hc/PPageOutput.cpp index 54772714e..8d6909e0a 100644 --- a/src/mpc-hc/PPageOutput.cpp +++ b/src/mpc-hc/PPageOutput.cpp @@ -165,7 +165,7 @@ BOOL CPPageOutput::OnInitDialog() m_AudioRendererDisplayNames.Add(CString(str));
CComPtr<IPropertyBag> pPB;
- if (SUCCEEDED(pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB))) {
+ if (SUCCEEDED(pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB)))) {
CComVariant var;
pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr);
diff --git a/src/mpc-hc/PlayerCaptureDialog.cpp b/src/mpc-hc/PlayerCaptureDialog.cpp index 39c62a787..8e0bfed75 100644 --- a/src/mpc-hc/PlayerCaptureDialog.cpp +++ b/src/mpc-hc/PlayerCaptureDialog.cpp @@ -429,7 +429,7 @@ static void InitCodecList(CAtlArray<Codec>& codecs, CComboBox& box, const GUID& c.pMoniker = pMoniker;
/*
CComPtr<IBaseFilter> pBF;
- if (FAILED(pMoniker->BindToObject(0, 0, IID_IBaseFilter, (void**)&pBF)) || !pBF)
+ if (FAILED(pMoniker->BindToObject(0, 0, IID_PPV_ARGS(&pBF))) || !pBF)
continue;
c.pBF = pBF;
@@ -443,7 +443,7 @@ static void InitCodecList(CAtlArray<Codec>& codecs, CComboBox& box, const GUID& CoTaskMemFree(strName);
CComPtr<IPropertyBag> pPB;
- pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB);
+ pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB));
CComVariant var;
if (FAILED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
@@ -1509,7 +1509,7 @@ void CPlayerCaptureDialog::OnVideoCodecDimension() // we have to recreate the encoder, otherwise it will accept the new media type for only the first time
m_pVidEnc = nullptr;
- m_pVidEncMoniker->BindToObject(0, 0, IID_IBaseFilter, (void**)&m_pVidEnc);
+ m_pVidEncMoniker->BindToObject(0, 0, IID_PPV_ARGS(&m_pVidEnc));
}
}
@@ -1539,7 +1539,7 @@ void CPlayerCaptureDialog::OnAudioCodecDimension() // we have to recreate the encoder, otherwise it will accept the new media type for only the first time
m_pAudEnc = nullptr;
- m_pAudEncMoniker->BindToObject(0, 0, IID_IBaseFilter, (void**)&m_pAudEnc);
+ m_pAudEncMoniker->BindToObject(0, 0, IID_PPV_ARGS(&m_pAudEnc));
/*
SaveMediaType(
CString(m_pAudEncArray[m_audcodec.GetItemData(m_audcodec.GetCurSel())].DisplayName.m_str),
diff --git a/src/mpc-hc/RegFilterChooserDlg.cpp b/src/mpc-hc/RegFilterChooserDlg.cpp index 762002a74..4b2cc8a70 100644 --- a/src/mpc-hc/RegFilterChooserDlg.cpp +++ b/src/mpc-hc/RegFilterChooserDlg.cpp @@ -52,7 +52,7 @@ void CRegFilterChooserDlg::DoDataExchange(CDataExchange* pDX) void CRegFilterChooserDlg::AddToList(IMoniker* pMoniker)
{
CComPtr<IPropertyBag> pPB;
- if (SUCCEEDED(pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)&pPB))) {
+ if (SUCCEEDED(pMoniker->BindToStorage(0, 0, IID_PPV_ARGS(&pPB)))) {
CComVariant var;
if (SUCCEEDED(pPB->Read(CComBSTR(_T("FriendlyName")), &var, nullptr))) {
m_list.SetItemData(
|