[QUARTZ] Sync with Wine Staging 1.9.4. CORE-10912
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 1 Mar 2016 18:25:44 +0000 (18:25 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 1 Mar 2016 18:25:44 +0000 (18:25 +0000)
svn path=/trunk/; revision=70840

reactos/dll/directx/wine/quartz/enumfilters.c
reactos/dll/directx/wine/quartz/filesource.c
reactos/dll/directx/wine/quartz/filtergraph.c
reactos/dll/directx/wine/quartz/parser.c
reactos/dll/directx/wine/quartz/pin.c
reactos/dll/directx/wine/quartz/regsvr.c
reactos/media/doc/README.WINE

index 5d13fa0..ea19f4e 100644 (file)
@@ -181,7 +181,7 @@ static HRESULT WINAPI IEnumFiltersImpl_Reset(IEnumFilters * iface)
 
     This->uIndex = 0;
     hr = IGraphVersion_QueryVersion(This->pVersionSource, &currentVersion);
-    if (!hr)
+    if (hr == S_OK)
         This->Version = currentVersion;
     return S_OK;
 }
index 3615555..745aa7a 100644 (file)
@@ -637,8 +637,9 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
             hr = GetClassMediaFile(pReader, pszFileName, &This->pmt->majortype, &This->pmt->subtype, NULL);
             if (FAILED(hr))
             {
-                CoTaskMemFree(This->pmt);
-                This->pmt = NULL;
+                memcpy(&This->pmt->majortype, &MEDIATYPE_Stream, sizeof(GUID));
+                memcpy(&This->pmt->subtype,   &MEDIASUBTYPE_NULL, sizeof(GUID));
+                hr = S_OK;
             }
         }
         else
index 9121a21..305388b 100644 (file)
@@ -1596,7 +1596,7 @@ static HRESULT GetFileSourceFilter(LPCOLESTR pszFileName, IBaseFilter **filter)
     /* Try to find a match without reading the file first */
     hr = GetClassMediaFile(NULL, pszFileName, NULL, NULL, &clsid);
 
-    if (!hr)
+    if (hr == S_OK)
         return CreateFilterInstanceAndLoadFile(&clsid, pszFileName, filter);
 
     /* Now create a AyncReader instance, to check for signature bytes in the file */
@@ -1638,7 +1638,7 @@ static HRESULT GetFileSourceFilter(LPCOLESTR pszFileName, IBaseFilter **filter)
     hr = GetClassMediaFile(pReader, pszFileName, NULL, NULL, &clsid);
     IAsyncReader_Release(pReader);
 
-    if (!hr)
+    if (hr == S_OK)
     {
         /* Release the AsyncReader filter and create the matching one */
         IBaseFilter_Release(*filter);
@@ -2462,6 +2462,9 @@ static HRESULT WINAPI MediaSeeking_ConvertTimeFormat(IMediaSeeking *iface, LONGL
     if (!pSourceFormat)
         pSourceFormat = &This->timeformatseek;
 
+    if (!pTargetFormat)
+        pTargetFormat = &This->timeformatseek;
+
     if (IsEqualGUID(pTargetFormat, pSourceFormat))
         *pTarget = Source;
     else
@@ -2608,6 +2611,11 @@ static HRESULT WINAPI MediaSeeking_GetRate(IMediaSeeking *iface, double *pdRate)
 
     FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pdRate);
 
+    if (!pdRate)
+        return E_POINTER;
+
+    *pdRate = 1.0;
+
     return S_OK;
 }
 
index ee048a9..c1959d7 100644 (file)
@@ -141,8 +141,12 @@ HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID *
         return S_OK;
     }
 
-    if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow))
+    if (!IsEqualIID(riid, &IID_IPin) &&
+        !IsEqualIID(riid, &IID_IVideoWindow) &&
+        !IsEqualIID(riid, &IID_IAMFilterMiscFlags))
+    {
         FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
+    }
 
     return E_NOINTERFACE;
 }
index 9b703dc..8482776 100644 (file)
@@ -835,25 +835,3 @@ HRESULT WINAPI PullPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE
 
     return SendFurther( iface, deliver_newsegment, &args, NULL );
 }
-
-static const IPinVtbl PullPin_Vtbl = 
-{
-    PullPin_QueryInterface,
-    BasePinImpl_AddRef,
-    PullPin_Release,
-    BaseInputPinImpl_Connect,
-    PullPin_ReceiveConnection,
-    PullPin_Disconnect,
-    BasePinImpl_ConnectedTo,
-    BasePinImpl_ConnectionMediaType,
-    BasePinImpl_QueryPinInfo,
-    BasePinImpl_QueryDirection,
-    BasePinImpl_QueryId,
-    PullPin_QueryAccept,
-    BasePinImpl_EnumMediaTypes,
-    BasePinImpl_QueryInternalConnections,
-    PullPin_EndOfStream,
-    PullPin_BeginFlush,
-    PullPin_EndFlush,
-    PullPin_NewSegment
-};
index 3da2c73..e5b7abc 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "quartz_private.h"
 
+#include <uuids.h>
+
 /*
  * Near the bottom of this file are the exported DllRegisterServer and
  * DllUnregisterServer, which make all this worthwhile.
@@ -798,6 +800,11 @@ static struct regsvr_mediatype_parsing const mediatype_parsing_list[] = {
             "0, 10, FFFFFF00000080808080, 494433000000000000",
            NULL }
     },
+    {   &MEDIATYPE_Stream,
+        &MEDIASUBTYPE_MPEG2_PROGRAM,
+        {   "0, 5, FFFFFFFFC0, 000001BA40",
+            NULL }
+    },
     {  &MEDIATYPE_Stream,
        &MEDIASUBTYPE_QTMovie,
        {   "4, 4, , 6d646174",
index de0739c..18429fe 100644 (file)
@@ -39,7 +39,7 @@ reactos/dll/directx/wine/dsound         # Synced to Wine-1.3.29
 reactos/dll/directx/wine/dxdiagn        # Synced to WineStaging-1.9.4
 reactos/dll/directx/wine/msdmo          # Synced to WineStaging-1.7.55
 reactos/dll/directx/wine/qedit          # Synced to WineStaging-1.7.55
-reactos/dll/directx/wine/quartz         # Synced to WineStaging-1.7.55
+reactos/dll/directx/wine/quartz         # Synced to WineStaging-1.9.4
 reactos/dll/directx/wine/wined3d        # Synced to WineStaging-1.9.4
 
 reactos/dll/win32/activeds            # Synced to WineStaging-1.7.55