https://git.reactos.org/?p=reactos.git;a=commitdiff;h=10517de5e670f621a09a15c074dc5c6337f6540f

commit 10517de5e670f621a09a15c074dc5c6337f6540f
Author:     Amine Khaldi <[email protected]>
AuthorDate: Sun Apr 1 13:15:06 2018 +0100
Commit:     Amine Khaldi <[email protected]>
CommitDate: Sun Apr 1 13:15:06 2018 +0100

    [STRMBASE] Sync with Wine Staging 3.3. CORE-14434
---
 media/doc/README.WINE                        |  2 +-
 sdk/lib/3rdparty/strmbase/CMakeLists.txt     |  4 ++--
 sdk/lib/3rdparty/strmbase/audio.c            | 10 +++++++++-
 sdk/lib/3rdparty/strmbase/dispatch.c         |  9 +++++++--
 sdk/lib/3rdparty/strmbase/dllfunc.c          | 27 +++++++++++++++++++------
 sdk/lib/3rdparty/strmbase/enumpins.c         |  8 +++++++-
 sdk/lib/3rdparty/strmbase/filter.c           | 11 +++++++++-
 sdk/lib/3rdparty/strmbase/mediatype.c        |  9 ++++++++-
 sdk/lib/3rdparty/strmbase/outputqueue.c      | 15 +++++++++++---
 sdk/lib/3rdparty/strmbase/pin.c              | 12 ++++++++++-
 sdk/lib/3rdparty/strmbase/pospass.c          | 18 ++++++++++++++---
 sdk/lib/3rdparty/strmbase/precomp.h          | 20 +++++++++++++++++++
 sdk/lib/3rdparty/strmbase/qualitycontrol.c   | 11 ++++++++++
 sdk/lib/3rdparty/strmbase/renderer.c         | 10 ++++++++++
 sdk/lib/3rdparty/strmbase/seeking.c          | 12 ++++++++++-
 sdk/lib/3rdparty/strmbase/strmbase_private.h | 30 +---------------------------
 sdk/lib/3rdparty/strmbase/transform.c        | 18 +++++++++++++++++
 sdk/lib/3rdparty/strmbase/video.c            | 12 ++++++++++-
 sdk/lib/3rdparty/strmbase/window.c           | 12 ++++++++++-
 19 files changed, 196 insertions(+), 54 deletions(-)

diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index b138db4425..b0022d0190 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -250,7 +250,7 @@ In addition the following libs, dlls and source files are 
mostly based on code p
 from Winehq CVS. If you are looking to update something in these files
 check Wine current sources first as it may already be fixed.
 
-reactos/sdk/lib/3rdparty/strmbase           # Synced to Wine-3.0
+reactos/sdk/lib/3rdparty/strmbase           # Synced to WineStaging-3.3
 
 reactos/sdk/lib/rtl/actctx.c                # Partly synced with 
WineStaging-1.9.16
 reactos/sdk/lib/rtl/timerqueue.c            # Partly synced with 
WineStaging-1.7.55
diff --git a/sdk/lib/3rdparty/strmbase/CMakeLists.txt 
b/sdk/lib/3rdparty/strmbase/CMakeLists.txt
index 2580b39e29..efc95b8ba9 100644
--- a/sdk/lib/3rdparty/strmbase/CMakeLists.txt
+++ b/sdk/lib/3rdparty/strmbase/CMakeLists.txt
@@ -21,8 +21,8 @@ list(APPEND SOURCE
     transform.c
     video.c
     window.c
-    strmbase_private.h)
+    precomp.h)
 
 add_library(strmbase ${SOURCE})
-add_pch(strmbase strmbase_private.h SOURCE)
+add_pch(strmbase precomp.h SOURCE)
 add_dependencies(strmbase psdk dxsdk)
diff --git a/sdk/lib/3rdparty/strmbase/audio.c 
b/sdk/lib/3rdparty/strmbase/audio.c
index 6ad64610f0..1b79ec5a90 100644
--- a/sdk/lib/3rdparty/strmbase/audio.c
+++ b/sdk/lib/3rdparty/strmbase/audio.c
@@ -18,7 +18,15 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "strmbase_private.h"
+#define COBJMACROS
+
+#include <assert.h>
+#include "dshow.h"
+#include "uuids.h"
+#include "vfwmsgs.h"
+#include "wine/unicode.h"
+#include "wine/strmbase.h"
+
 
 static inline BasicAudio *impl_from_IBasicAudio(IBasicAudio *iface)
 {
diff --git a/sdk/lib/3rdparty/strmbase/dispatch.c 
b/sdk/lib/3rdparty/strmbase/dispatch.c
index cd0287c94d..62bc397dcd 100644
--- a/sdk/lib/3rdparty/strmbase/dispatch.c
+++ b/sdk/lib/3rdparty/strmbase/dispatch.c
@@ -18,9 +18,14 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "strmbase_private.h"
+#define COBJMACROS
 
-#include <oleauto.h>
+#include "dshow.h"
+#include "wine/unicode.h"
+#include "wine/strmbase.h"
+#include "uuids.h"
+#include "vfwmsgs.h"
+#include <assert.h>
 
 HRESULT WINAPI BaseDispatch_Init(BaseDispatch *This, REFIID riid)
 {
diff --git a/sdk/lib/3rdparty/strmbase/dllfunc.c 
b/sdk/lib/3rdparty/strmbase/dllfunc.c
index 5d52173000..195a4097ee 100644
--- a/sdk/lib/3rdparty/strmbase/dllfunc.c
+++ b/sdk/lib/3rdparty/strmbase/dllfunc.c
@@ -18,14 +18,29 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+#include "config.h"
 
-#include "strmbase_private.h"
+#include <stdarg.h>
+#include <assert.h>
 
-#define NO_SHLWAPI_PATH
-#define NO_SHLWAPI_STRFCNS
-#define NO_SHLWAPI_GDI
-#define NO_SHLWAPI_STREAM
-#include <shlwapi.h>
+#define COBJMACROS
+#define NONAMELESSSTRUCT
+#define NONAMELESSUNION
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winerror.h"
+#include "winreg.h"
+#include "objbase.h"
+#include "uuids.h"
+#include "strmif.h"
+
+#include "wine/unicode.h"
+#include "wine/debug.h"
+#include "wine/strmbase.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 extern const int g_cTemplates;
 extern const FactoryTemplate g_Templates[];
diff --git a/sdk/lib/3rdparty/strmbase/enumpins.c 
b/sdk/lib/3rdparty/strmbase/enumpins.c
index c6ed4469e6..55fa7ece62 100644
--- a/sdk/lib/3rdparty/strmbase/enumpins.c
+++ b/sdk/lib/3rdparty/strmbase/enumpins.c
@@ -19,7 +19,13 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "strmbase_private.h"
+#define COBJMACROS
+
+#include "dshow.h"
+#include "wine/strmbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 typedef struct IEnumPinsImpl
 {
diff --git a/sdk/lib/3rdparty/strmbase/filter.c 
b/sdk/lib/3rdparty/strmbase/filter.c
index 3ef67b5b0c..f1b2d49864 100644
--- a/sdk/lib/3rdparty/strmbase/filter.c
+++ b/sdk/lib/3rdparty/strmbase/filter.c
@@ -18,7 +18,16 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "strmbase_private.h"
+#define COBJMACROS
+
+#include "dshow.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/strmbase.h"
+#include "uuids.h"
+#include <assert.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 static inline BaseFilter *impl_from_IBaseFilter(IBaseFilter *iface)
 {
diff --git a/sdk/lib/3rdparty/strmbase/mediatype.c 
b/sdk/lib/3rdparty/strmbase/mediatype.c
index 71e29b9430..91c0ddc60a 100644
--- a/sdk/lib/3rdparty/strmbase/mediatype.c
+++ b/sdk/lib/3rdparty/strmbase/mediatype.c
@@ -18,8 +18,15 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+#include <stdarg.h>
 
-#include "strmbase_private.h"
+#define COBJMACROS
+#include "dshow.h"
+
+#include "wine/strmbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *dest, const AM_MEDIA_TYPE *src)
 {
diff --git a/sdk/lib/3rdparty/strmbase/outputqueue.c 
b/sdk/lib/3rdparty/strmbase/outputqueue.c
index c071599b45..5513193989 100644
--- a/sdk/lib/3rdparty/strmbase/outputqueue.c
+++ b/sdk/lib/3rdparty/strmbase/outputqueue.c
@@ -18,9 +18,18 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "strmbase_private.h"
-
-#include <wine/list.h>
+#define COBJMACROS
+
+#include "dshow.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/list.h"
+#include "wine/strmbase.h"
+#include "uuids.h"
+#include "vfwmsgs.h"
+#include <assert.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 enum {SAMPLE_PACKET, EOS_PACKET};
 
diff --git a/sdk/lib/3rdparty/strmbase/pin.c b/sdk/lib/3rdparty/strmbase/pin.c
index 447d6f7467..48f24973d6 100644
--- a/sdk/lib/3rdparty/strmbase/pin.c
+++ b/sdk/lib/3rdparty/strmbase/pin.c
@@ -19,7 +19,17 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "strmbase_private.h"
+#define COBJMACROS
+
+#include "dshow.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/strmbase.h"
+#include "uuids.h"
+#include "vfwmsgs.h"
+#include <assert.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 static const IMemInputPinVtbl MemInputPin_Vtbl;
 
diff --git a/sdk/lib/3rdparty/strmbase/pospass.c 
b/sdk/lib/3rdparty/strmbase/pospass.c
index 9e33d7639b..37c9827df3 100644
--- a/sdk/lib/3rdparty/strmbase/pospass.c
+++ b/sdk/lib/3rdparty/strmbase/pospass.c
@@ -20,7 +20,17 @@
  */
 /* FIXME: critical sections */
 
-#include "strmbase_private.h"
+#define COBJMACROS
+
+#include "dshow.h"
+#include "uuids.h"
+
+#include "wine/debug.h"
+#include "wine/strmbase.h"
+
+#include <assert.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 static const IMediaSeekingVtbl IMediaSeekingPassThru_Vtbl;
 static const IMediaPositionVtbl IMediaPositionPassThru_Vtbl;
@@ -516,9 +526,11 @@ static HRESULT WINAPI 
MediaSeekingPassThru_GetPositions(IMediaSeeking * iface, L
     if (SUCCEEDED(hr)) {
         hr = IMediaSeeking_GetPositions(seek, pCurrent, pStop);
         IMediaSeeking_Release(seek);
+    } else if (hr == VFW_E_NOT_CONNECTED) {
+        *pCurrent = 0;
+        *pStop = 0;
+        hr = S_OK;
     }
-    else
-        return E_NOTIMPL;
     return hr;
 }
 
diff --git a/sdk/lib/3rdparty/strmbase/precomp.h 
b/sdk/lib/3rdparty/strmbase/precomp.h
new file mode 100644
index 0000000000..489541e540
--- /dev/null
+++ b/sdk/lib/3rdparty/strmbase/precomp.h
@@ -0,0 +1,20 @@
+
+#ifndef _STRMBASE_PCH_
+#define _STRMBASE_PCH_
+
+#include <wine/config.h>
+
+#include <assert.h>
+
+#define COBJMACROS
+#define NONAMELESSSTRUCT
+#define NONAMELESSUNION
+
+#include <dshow.h>
+#include <wine/debug.h>
+#include <wine/strmbase.h>
+#include <wine/unicode.h>
+
+#include "strmbase_private.h"
+
+#endif /* !_STRMBASE_PCH_ */
diff --git a/sdk/lib/3rdparty/strmbase/qualitycontrol.c 
b/sdk/lib/3rdparty/strmbase/qualitycontrol.c
index 1905dbcc85..970164e0eb 100644
--- a/sdk/lib/3rdparty/strmbase/qualitycontrol.c
+++ b/sdk/lib/3rdparty/strmbase/qualitycontrol.c
@@ -23,8 +23,19 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#define COBJMACROS
+
+#include "dshow.h"
+#include "wine/strmbase.h"
 #include "strmbase_private.h"
 
+#include "uuids.h"
+#include "wine/debug.h"
+
+#include <assert.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase_qc);
+
 #define XTIME_FMT "%u.%03u"
 #define XTIME(u) (int)(u/10000000), (int)((u / 10000)%1000)
 
diff --git a/sdk/lib/3rdparty/strmbase/renderer.c 
b/sdk/lib/3rdparty/strmbase/renderer.c
index 2da801ce43..366e6d6116 100644
--- a/sdk/lib/3rdparty/strmbase/renderer.c
+++ b/sdk/lib/3rdparty/strmbase/renderer.c
@@ -18,8 +18,18 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#define COBJMACROS
+
+#include "dshow.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/strmbase.h"
+#include "uuids.h"
+#include "vfwmsgs.h"
 #include "strmbase_private.h"
 
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
+
 static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
 static const WCHAR wcsAltInputPinName[] = {'I','n',0};
 
diff --git a/sdk/lib/3rdparty/strmbase/seeking.c 
b/sdk/lib/3rdparty/strmbase/seeking.c
index a9f760d31f..c31699c209 100644
--- a/sdk/lib/3rdparty/strmbase/seeking.c
+++ b/sdk/lib/3rdparty/strmbase/seeking.c
@@ -20,7 +20,17 @@
  */
 /* FIXME: critical sections */
 
-#include "strmbase_private.h"
+#define COBJMACROS
+
+#include "dshow.h"
+#include "wine/strmbase.h"
+
+#include "uuids.h"
+#include "wine/debug.h"
+
+#include <assert.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 static inline SourceSeeking *impl_from_IMediaSeeking(IMediaSeeking *iface)
 {
diff --git a/sdk/lib/3rdparty/strmbase/strmbase_private.h 
b/sdk/lib/3rdparty/strmbase/strmbase_private.h
index 2438877dae..7adf7bbad6 100644
--- a/sdk/lib/3rdparty/strmbase/strmbase_private.h
+++ b/sdk/lib/3rdparty/strmbase/strmbase_private.h
@@ -18,33 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#ifndef _STRMBASE_PCH_
-#define _STRMBASE_PCH_
-
-#include <wine/config.h>
-
-#include <assert.h>
-#include <stdarg.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#define WIN32_LEAN_AND_MEAN
-
-#define COBJMACROS
-#define NONAMELESSSTRUCT
-#define NONAMELESSUNION
-
-#include <windef.h>
-#include <winbase.h>
-#include <objbase.h>
-#include <dshow.h>
-
-#include <wine/debug.h>
-#include <wine/strmbase.h>
-#include <wine/unicode.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
+#pragma once
 
 /* Quality Control */
 typedef struct QualityControlImpl {
@@ -76,5 +50,3 @@ HRESULT QualityControlRender_WaitFor(QualityControlImpl 
*This, IMediaSample *sam
 void QualityControlRender_DoQOS(QualityControlImpl *priv);
 void QualityControlRender_BeginRender(QualityControlImpl *This);
 void QualityControlRender_EndRender(QualityControlImpl *This);
-
-#endif /* _STRMBASE_PCH_ */
diff --git a/sdk/lib/3rdparty/strmbase/transform.c 
b/sdk/lib/3rdparty/strmbase/transform.c
index fd7534b4af..accb4f1702 100644
--- a/sdk/lib/3rdparty/strmbase/transform.c
+++ b/sdk/lib/3rdparty/strmbase/transform.c
@@ -18,9 +18,27 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
+#include "config.h"
+#include <stdarg.h>
 
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "dshow.h"
+#include "amvideo.h"
+#include "strmif.h"
+#include "vfw.h"
+
+#include <assert.h>
+
+#include "wine/unicode.h"
+#include "wine/debug.h"
+#include "wine/strmbase.h"
 #include "strmbase_private.h"
 
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
+
 static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
 static const WCHAR wcsOutputPinName[] = {'o','u','t','p','u','t',' 
','p','i','n',0};
 
diff --git a/sdk/lib/3rdparty/strmbase/video.c 
b/sdk/lib/3rdparty/strmbase/video.c
index dd6426d11e..a03ba55a89 100644
--- a/sdk/lib/3rdparty/strmbase/video.c
+++ b/sdk/lib/3rdparty/strmbase/video.c
@@ -18,7 +18,17 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "strmbase_private.h"
+#define COBJMACROS
+
+#include <assert.h>
+#include "dshow.h"
+#include "uuids.h"
+#include "vfwmsgs.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/strmbase.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 static inline BaseControlVideo *impl_from_IBasicVideo(IBasicVideo *iface)
 {
diff --git a/sdk/lib/3rdparty/strmbase/window.c 
b/sdk/lib/3rdparty/strmbase/window.c
index e35dc138fc..b08608e65d 100644
--- a/sdk/lib/3rdparty/strmbase/window.c
+++ b/sdk/lib/3rdparty/strmbase/window.c
@@ -18,7 +18,17 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "strmbase_private.h"
+#define COBJMACROS
+
+#include "dshow.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/strmbase.h"
+#include "uuids.h"
+#include "vfwmsgs.h"
+#include <assert.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
 
 static inline BaseControlWindow *impl_from_IVideoWindow( IVideoWindow *iface)
 {

Reply via email to