Erich Hoover : quartz: Return IMediaSeeking interface for Parser PullPin.

Alexandre Julliard julliard at winehq.org
Tue May 17 12:52:59 CDT 2011


Module: wine
Branch: master
Commit: 819643ada87a4b033bfd93f84894d5a15b35eb70
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=819643ada87a4b033bfd93f84894d5a15b35eb70

Author: Erich Hoover <ehoover at mines.edu>
Date:   Sat May 14 11:14:45 2011 -0600

quartz: Return IMediaSeeking interface for Parser PullPin.

---

 dlls/quartz/parser.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c
index b5a305c..784c528 100644
--- a/dlls/quartz/parser.c
+++ b/dlls/quartz/parser.c
@@ -702,6 +702,31 @@ static const IPinVtbl Parser_OutputPin_Vtbl =
     BasePinImpl_NewSegment
 };
 
+static HRESULT WINAPI Parser_PullPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv)
+{
+    PullPin *This = (PullPin *)iface;
+
+    TRACE("(%p/%p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv);
+
+    *ppv = NULL;
+
+    /*
+     * It is important to capture the request for the IMediaSeeking interface before it is passed
+     * on to PullPin_QueryInterface, this is necessary since the Parser filter does not support
+     * querying IMediaSeeking
+     */
+    if (IsEqualIID(riid, &IID_IMediaSeeking))
+        *ppv = &((ParserImpl*)This->pin.pinInfo.pFilter)->sourceSeeking;
+
+    if (*ppv)
+    {
+        IUnknown_AddRef((IUnknown *)(*ppv));
+        return S_OK;
+    }
+
+    return PullPin_QueryInterface(iface, riid, ppv);
+}
+
 static HRESULT WINAPI Parser_PullPin_Disconnect(IPin * iface)
 {
     HRESULT hr;
@@ -770,7 +795,7 @@ static HRESULT WINAPI Parser_PullPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes
 
 static const IPinVtbl Parser_InputPin_Vtbl =
 {
-    PullPin_QueryInterface,
+    Parser_PullPin_QueryInterface,
     BasePinImpl_AddRef,
     PullPin_Release,
     BaseInputPinImpl_Connect,




More information about the wine-cvs mailing list