Module: wine Branch: master Commit: f810d14149c7ca83fecb587e405e4ca5fd8defe7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f810d14149c7ca83fecb587e40...
Author: Piotr Caban piotr@codeweavers.com Date: Wed Nov 20 12:01:59 2013 +0100
qcap: Warn if additional filters should be used in ICaptureGraphBuilder2::RenderStream.
---
dlls/qcap/capturegraph.c | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/qcap/capturegraph.c b/dlls/qcap/capturegraph.c index 5af4f3b..f5973c8 100644 --- a/dlls/qcap/capturegraph.c +++ b/dlls/qcap/capturegraph.c @@ -42,6 +42,7 @@ *#include "dshow.h" *#include "ddraw.h" */ +#include "uuids.h" #include "qcap_main.h"
#include "wine/unicode.h" @@ -259,8 +260,7 @@ fnCaptureGraphBuilder2_RenderStream(ICaptureGraphBuilder2 * iface, IBaseFilter *pfRenderer) { CaptureGraphImpl *This = impl_from_ICaptureGraphBuilder2(iface); - IPin *source_out; - IPin *renderer_in; + IPin *source_out, *renderer_in, *capture, *preview; HRESULT hr;
FIXME("(%p/%p)->(%s, %s, %p, %p, %p) semi-stub!\n", This, iface, @@ -281,14 +281,30 @@ fnCaptureGraphBuilder2_RenderStream(ICaptureGraphBuilder2 * iface, hr = ICaptureGraphBuilder2_FindPin(iface, pSource, PINDIR_OUTPUT, pCategory, pType, TRUE, 0, &source_out); if (FAILED(hr)) return E_INVALIDARG; - hr = ICaptureGraphBuilder2_FindPin(iface, (IUnknown*)pfRenderer, PINDIR_INPUT, pCategory, pType, TRUE, 0, &renderer_in); + + if (pCategory && IsEqualIID(pCategory, &PIN_CATEGORY_VBI)) { + FIXME("Tee/Sink-to-Sink filter not supported\n"); + IPin_Release(source_out); + return E_NOTIMPL; + } + + hr = ICaptureGraphBuilder2_FindPin(iface, pSource, PINDIR_OUTPUT, &PIN_CATEGORY_CAPTURE, NULL, TRUE, 0, &capture); + if (SUCCEEDED(hr)) { + hr = ICaptureGraphBuilder2_FindPin(iface, pSource, PINDIR_OUTPUT, &PIN_CATEGORY_PREVIEW, NULL, TRUE, 0, &preview); + if (FAILED(hr)) + FIXME("Smart Tee filter not supported - not creating preview pin\n"); + else + IPin_Release(preview); + IPin_Release(capture); + } + + hr = ICaptureGraphBuilder2_FindPin(iface, (IUnknown*)pfRenderer, PINDIR_INPUT, NULL, NULL, TRUE, 0, &renderer_in); if (FAILED(hr)) { IPin_Release(source_out); return hr; }
- /* Uses 'Intelligent Connect', so Connect, not ConnectDirect here */ if (!pfCompressor) hr = IGraphBuilder_Connect(This->mygraph, source_out, renderer_in); else