Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
December 2019
- 73 participants
- 1394 messages
[PATCH tools] winegecko.php: Update for new file name scheme.
by Jacek Caban
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
winegecko.php | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
Dec. 12, 2019
[PATCH] ntoskrnl.exe/tests: Fix typos in ok() messages.
by Andrey Gusev
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com>
---
dlls/ntoskrnl.exe/tests/driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index 6827b74a3c..10f3865515 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -800,7 +800,7 @@ static void test_call_driver(DEVICE_OBJECT *device)
ok(irpsp->MajorFunction == IRP_MJ_FLUSH_BUFFERS, "MajorFunction = %u\n", irpsp->MajorFunction);
ok(!irpsp->DeviceObject, "DeviceObject = %u\n", irpsp->DeviceObject);
ok(!irpsp->FileObject, "FileObject = %u\n", irpsp->FileObject);
- ok(!irpsp->CompletionRoutine, "CompletionRouptine = %p\n", irpsp->CompletionRoutine);
+ ok(!irpsp->CompletionRoutine, "CompletionRoutine = %p\n", irpsp->CompletionRoutine);
status = IoCallDriver(device, irp);
ok(status == STATUS_PENDING, "IoCallDriver returned %#x\n", status);
@@ -824,7 +824,7 @@ static void test_call_driver(DEVICE_OBJECT *device)
ok(irpsp->MajorFunction == IRP_MJ_FLUSH_BUFFERS, "MajorFunction = %u\n", irpsp->MajorFunction);
ok(!irpsp->DeviceObject, "DeviceObject = %u\n", irpsp->DeviceObject);
ok(!irpsp->FileObject, "FileObject = %u\n", irpsp->FileObject);
- ok(!irpsp->CompletionRoutine, "CompletionRouptine = %p\n", irpsp->CompletionRoutine);
+ ok(!irpsp->CompletionRoutine, "CompletionRoutine = %p\n", irpsp->CompletionRoutine);
status = wait_single(&event, 0);
ok(status == STATUS_TIMEOUT, "got %#x\n", status);
--
2.23.0
Dec. 12, 2019
[PATCH 2/2] msado15: Add _Command stub interface.
by Hans Leidekker
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msado15/Makefile.in | 1 +
dlls/msado15/command.c | 313 +++++++++++++++++++++++++++++++
dlls/msado15/main.c | 5 +
dlls/msado15/msado15_classes.idl | 8 +
dlls/msado15/msado15_private.h | 1 +
dlls/msado15/tests/msado15.c | 27 +++
6 files changed, 355 insertions(+)
create mode 100644 dlls/msado15/command.c
diff --git a/dlls/msado15/Makefile.in b/dlls/msado15/Makefile.in
index 604f9ff018..9852e0863d 100644
--- a/dlls/msado15/Makefile.in
+++ b/dlls/msado15/Makefile.in
@@ -4,6 +4,7 @@ IMPORTS = oleaut32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
+ command.c \
connection.c \
main.c \
recordset.c \
diff --git a/dlls/msado15/command.c b/dlls/msado15/command.c
new file mode 100644
index 0000000000..a96fd73990
--- /dev/null
+++ b/dlls/msado15/command.c
@@ -0,0 +1,313 @@
+/*
+ * Copyright 2019 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * 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 "windef.h"
+#include "winbase.h"
+#define COBJMACROS
+#include "objbase.h"
+#include "msado15_backcompat.h"
+
+#include "wine/debug.h"
+#include "wine/heap.h"
+
+#include "msado15_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msado15);
+
+struct command
+{
+ _Command Command_iface;
+ LONG ref;
+};
+
+static inline struct command *impl_from_Command( _Command *iface )
+{
+ return CONTAINING_RECORD( iface, struct command, Command_iface );
+}
+
+static HRESULT WINAPI command_QueryInterface( _Command *iface, REFIID riid, void **obj )
+{
+ TRACE( "%p, %s, %p\n", iface, debugstr_guid(riid), obj );
+
+ *obj = NULL;
+
+ if (IsEqualIID(riid, &IID_IUnknown) ||
+ IsEqualIID(riid, &IID_IDispatch) ||
+ IsEqualIID(riid, &IID__ADO) ||
+ IsEqualIID(riid, &IID_Command15) ||
+ IsEqualIID(riid, &IID_Command25) ||
+ IsEqualIID(riid, &IID__Command))
+ {
+ *obj = iface;
+ }
+ else
+ {
+ FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
+ return E_NOINTERFACE;
+ }
+
+ _Command_AddRef( iface );
+ return S_OK;
+}
+
+static ULONG WINAPI command_AddRef( _Command *iface )
+{
+ struct command *command = impl_from_Command( iface );
+ return InterlockedIncrement( &command->ref );
+}
+
+static ULONG WINAPI command_Release( _Command *iface )
+{
+ struct command *command = impl_from_Command( iface );
+ LONG ref = InterlockedDecrement( &command->ref );
+ if (!ref)
+ {
+ TRACE( "destroying %p\n", command );
+ heap_free( command );
+ }
+ return ref;
+}
+
+static HRESULT WINAPI command_GetTypeInfoCount( _Command *iface, UINT *count )
+{
+ FIXME( "%p, %p\n", iface, count );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_GetTypeInfo( _Command *iface, UINT index, LCID lcid, ITypeInfo **info )
+{
+ FIXME( "%p, %u, %u, %p\n", iface, index, lcid, info );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_GetIDsOfNames( _Command *iface, REFIID riid, LPOLESTR *names, UINT count,
+ LCID lcid, DISPID *dispid )
+{
+ FIXME( "%p, %s, %p, %u, %u, %p\n", iface, debugstr_guid(riid), names, count, lcid, dispid );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_Invoke( _Command *iface, DISPID member, REFIID riid, LCID lcid, WORD flags,
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err )
+{
+ FIXME( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", iface, member, debugstr_guid(riid), lcid, flags, params,
+ result, excep_info, arg_err );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_Properties( _Command *iface, Properties **props )
+{
+ FIXME( "%p, %p\n", iface, props );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_ActiveConnection( _Command *iface, _Connection **connection )
+{
+ FIXME( "%p, %p\n", iface, connection );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_putref_ActiveConnection( _Command *iface, _Connection *connection )
+{
+ FIXME( "%p, %p\n", iface, connection );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_put_ActiveConnection( _Command *iface, VARIANT connection )
+{
+ FIXME( "%p, %s\n", iface, debugstr_variant(&connection) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_CommandText( _Command *iface, BSTR *text )
+{
+ FIXME( "%p, %p\n", iface, text );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_put_CommandText( _Command *iface, BSTR text )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(text) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_CommandTimeout( _Command *iface, LONG *timeout )
+{
+ FIXME( "%p, %p\n", iface, timeout );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_put_CommandTimeout( _Command *iface, LONG timeout )
+{
+ FIXME( "%p, %d\n", iface, timeout );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_Prepared( _Command *iface, VARIANT_BOOL *prepared )
+{
+ FIXME( "%p, %p\n", iface, prepared );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_put_Prepared( _Command *iface, VARIANT_BOOL prepared )
+{
+ FIXME( "%p, %d\n", iface, prepared );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_Execute( _Command *iface, VARIANT *affected, VARIANT *parameters,
+ LONG options, _Recordset **recordset )
+{
+ FIXME( "%p, %p, %p, %d, %p\n", iface, affected, parameters, options, recordset );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_CreateParameter( _Command *iface, BSTR name, DataTypeEnum type,
+ ParameterDirectionEnum direction, LONG size, VARIANT value,
+ _Parameter **parameter )
+{
+ FIXME( "%p, %s, %d, %d, %d, %p\n", iface, debugstr_w(name), type, direction, size, parameter );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_Parameters( _Command *iface, Parameters **parameters )
+{
+ FIXME( "%p, %p\n", iface, parameters );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_put_CommandType( _Command *iface, CommandTypeEnum type )
+{
+ FIXME( "%p, %d\n", iface, type );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_CommandType( _Command *iface, CommandTypeEnum *type )
+{
+ FIXME( "%p, %p\n", iface, type );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_Name(_Command *iface, BSTR *name)
+{
+ FIXME( "%p, %p\n", iface, name );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_put_Name( _Command *iface, BSTR name )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(name) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_State( _Command *iface, LONG *state )
+{
+ FIXME( "%p, %p\n", iface, state );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_Cancel( _Command *iface )
+{
+ FIXME( "%p\n", iface );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_putref_CommandStream( _Command *iface, IUnknown *stream )
+{
+ FIXME( "%p, %p\n", iface, stream );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_CommandStream( _Command *iface, VARIANT *stream )
+{
+ FIXME( "%p, %p\n", iface, stream );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_put_Dialect( _Command *iface, BSTR dialect )
+{
+ FIXME( "%p, %s\n", iface, debugstr_w(dialect) );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_Dialect( _Command *iface, BSTR *dialect )
+{
+ FIXME( "%p, %p\n", iface, dialect );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_put_NamedParameters( _Command *iface, VARIANT_BOOL parameters )
+{
+ FIXME( "%p, %d\n", iface, parameters );
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI command_get_NamedParameters( _Command *iface, VARIANT_BOOL *parameters )
+{
+ FIXME( "%p, %p\n", iface, parameters );
+ return E_NOTIMPL;
+}
+
+static const struct _CommandVtbl command_vtbl =
+{
+ command_QueryInterface,
+ command_AddRef,
+ command_Release,
+ command_GetTypeInfoCount,
+ command_GetTypeInfo,
+ command_GetIDsOfNames,
+ command_Invoke,
+ command_get_Properties,
+ command_get_ActiveConnection,
+ command_putref_ActiveConnection,
+ command_put_ActiveConnection,
+ command_get_CommandText,
+ command_put_CommandText,
+ command_get_CommandTimeout,
+ command_put_CommandTimeout,
+ command_get_Prepared,
+ command_put_Prepared,
+ command_Execute,
+ command_CreateParameter,
+ command_get_Parameters,
+ command_put_CommandType,
+ command_get_CommandType,
+ command_get_Name,
+ command_put_Name,
+ command_get_State,
+ command_Cancel,
+ command_putref_CommandStream,
+ command_get_CommandStream,
+ command_put_Dialect,
+ command_get_Dialect,
+ command_put_NamedParameters,
+ command_get_NamedParameters
+};
+
+HRESULT Command_create( void **obj )
+{
+ struct command *command;
+
+ if (!(command = heap_alloc( sizeof(*command) ))) return E_OUTOFMEMORY;
+ command->Command_iface.lpVtbl = &command_vtbl;
+ command->ref = 1;
+
+ *obj = &command->Command_iface;
+ TRACE( "returning iface %p\n", *obj );
+ return S_OK;
+}
diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c
index 32ae252337..3115474b84 100644
--- a/dlls/msado15/main.c
+++ b/dlls/msado15/main.c
@@ -117,6 +117,7 @@ static const struct IClassFactoryVtbl msadocf_vtbl =
msadocf_LockServer
};
+static struct msadocf command_cf = { { &msadocf_vtbl }, Command_create };
static struct msadocf connection_cf = { { &msadocf_vtbl }, Connection_create };
static struct msadocf recordset_cf = { { &msadocf_vtbl }, Recordset_create };
static struct msadocf stream_cf = { { &msadocf_vtbl }, Stream_create };
@@ -142,6 +143,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )
{
cf = &stream_cf.IClassFactory_iface;
}
+ else if (IsEqualGUID( clsid, &CLSID_Command ))
+ {
+ cf = &command_cf.IClassFactory_iface;
+ }
if (!cf) return CLASS_E_CLASSNOTAVAILABLE;
return IClassFactory_QueryInterface( cf, iid, obj );
}
diff --git a/dlls/msado15/msado15_classes.idl b/dlls/msado15/msado15_classes.idl
index 5ede180240..51f8bd77db 100644
--- a/dlls/msado15/msado15_classes.idl
+++ b/dlls/msado15/msado15_classes.idl
@@ -18,6 +18,14 @@
#pragma makedep register
+[
+ threading(apartment),
+ progid("ADODB.Command.6.0"),
+ vi_progid("ADODB.Command"),
+ uuid(00000507-0000-0010-8000-00aa006d2ea4)
+]
+coclass Command { interface _Command; }
+
[
threading(apartment),
progid("ADODB.Connection.6.0"),
diff --git a/dlls/msado15/msado15_private.h b/dlls/msado15/msado15_private.h
index 7239e48b53..f6c60f0304 100644
--- a/dlls/msado15/msado15_private.h
+++ b/dlls/msado15/msado15_private.h
@@ -21,6 +21,7 @@
#define MAKE_ADO_HRESULT( err ) MAKE_HRESULT( SEVERITY_ERROR, FACILITY_CONTROL, err )
+HRESULT Command_create( void ** ) DECLSPEC_HIDDEN;
HRESULT Connection_create( void ** ) DECLSPEC_HIDDEN;
HRESULT Recordset_create( void ** ) DECLSPEC_HIDDEN;
HRESULT Stream_create( void ** ) DECLSPEC_HIDDEN;
diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c
index 5a1813694b..03b2828d9f 100644
--- a/dlls/msado15/tests/msado15.c
+++ b/dlls/msado15/tests/msado15.c
@@ -444,6 +444,32 @@ if (0) /* Crashes on windows */
_Connection_Release(connection);
}
+static void test_Command(void)
+{
+ HRESULT hr;
+ _Command *command;
+ _ADO *ado;
+ Command15 *command15;
+ Command25 *command25;
+
+ hr = CoCreateInstance( &CLSID_Command, NULL, CLSCTX_INPROC_SERVER, &IID__Command, (void **)&command );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ hr = _Command_QueryInterface( command, &IID__ADO, (void **)&ado );
+ ok( hr == S_OK, "got %08x\n", hr );
+ _ADO_Release( ado );
+
+ hr = _Command_QueryInterface( command, &IID_Command15, (void **)&command15 );
+ ok( hr == S_OK, "got %08x\n", hr );
+ Command15_Release( command15 );
+
+ hr = _Command_QueryInterface( command, &IID_Command25, (void **)&command25 );
+ ok( hr == S_OK, "got %08x\n", hr );
+ Command25_Release( command25 );
+
+ _Command_Release( command );
+}
+
START_TEST(msado15)
{
CoInitialize( NULL );
@@ -451,5 +477,6 @@ START_TEST(msado15)
test_Fields();
test_Recordset();
test_Stream();
+ test_Command();
CoUninitialize();
}
--
2.20.1
Dec. 12, 2019
[PATCH 1/2] msado15: Add ISupportErrorInfo support to _Connection.
by Hans Leidekker
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/msado15/connection.c | 56 ++++++++++++++++++++++++++++++++----
dlls/msado15/tests/msado15.c | 5 ++--
2 files changed, 52 insertions(+), 9 deletions(-)
diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c
index 037ab52199..73b225628c 100644
--- a/dlls/msado15/connection.c
+++ b/dlls/msado15/connection.c
@@ -32,11 +32,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(msado15);
struct connection
{
- _Connection Connection_iface;
- LONG refs;
-
- ObjectStateEnum state;
- LONG timeout;
+ _Connection Connection_iface;
+ ISupportErrorInfo ISupportErrorInfo_iface;
+ LONG refs;
+ ObjectStateEnum state;
+ LONG timeout;
};
static inline struct connection *impl_from_Connection( _Connection *iface )
@@ -44,6 +44,11 @@ static inline struct connection *impl_from_Connection( _Connection *iface )
return CONTAINING_RECORD( iface, struct connection, Connection_iface );
}
+static inline struct connection *impl_from_ISupportErrorInfo( ISupportErrorInfo *iface )
+{
+ return CONTAINING_RECORD( iface, struct connection, ISupportErrorInfo_iface );
+}
+
static ULONG WINAPI connection_AddRef( _Connection *iface )
{
struct connection *connection = impl_from_Connection( iface );
@@ -64,13 +69,18 @@ static ULONG WINAPI connection_Release( _Connection *iface )
static HRESULT WINAPI connection_QueryInterface( _Connection *iface, REFIID riid, void **obj )
{
- TRACE( "%p, %s, %p\n", iface, debugstr_guid(riid), obj );
+ struct connection *connection = impl_from_Connection( iface );
+ TRACE( "%p, %s, %p\n", connection, debugstr_guid(riid), obj );
if (IsEqualGUID( riid, &IID__Connection ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ))
{
*obj = iface;
}
+ else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
+ {
+ *obj = &connection->ISupportErrorInfo_iface;
+ }
else
{
FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
@@ -339,12 +349,46 @@ static const struct _ConnectionVtbl connection_vtbl =
connection_Cancel
};
+static HRESULT WINAPI supporterror_QueryInterface( ISupportErrorInfo *iface, REFIID riid, void **obj )
+{
+ struct connection *connection = impl_from_ISupportErrorInfo( iface );
+ return connection_QueryInterface( &connection->Connection_iface, riid, obj );
+}
+
+static ULONG WINAPI supporterror_AddRef( ISupportErrorInfo *iface )
+{
+ struct connection *connection = impl_from_ISupportErrorInfo( iface );
+ return connection_AddRef( &connection->Connection_iface );
+}
+
+static ULONG WINAPI supporterror_Release( ISupportErrorInfo *iface )
+{
+ struct connection *connection = impl_from_ISupportErrorInfo( iface );
+ return connection_Release( &connection->Connection_iface );
+}
+
+static HRESULT WINAPI supporterror_InterfaceSupportsErrorInfo( ISupportErrorInfo *iface, REFIID riid )
+{
+ struct connection *connection = impl_from_ISupportErrorInfo( iface );
+ FIXME( "%p, %s\n", connection, debugstr_guid(riid) );
+ return S_FALSE;
+}
+
+static const struct ISupportErrorInfoVtbl support_error_vtbl =
+{
+ supporterror_QueryInterface,
+ supporterror_AddRef,
+ supporterror_Release,
+ supporterror_InterfaceSupportsErrorInfo
+};
+
HRESULT Connection_create( void **obj )
{
struct connection *connection;
if (!(connection = heap_alloc( sizeof(*connection) ))) return E_OUTOFMEMORY;
connection->Connection_iface.lpVtbl = &connection_vtbl;
+ connection->ISupportErrorInfo_iface.lpVtbl = &support_error_vtbl;
connection->refs = 1;
connection->state = adStateClosed;
connection->timeout = 30;
diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c
index 4ef4762ac6..5a1813694b 100644
--- a/dlls/msado15/tests/msado15.c
+++ b/dlls/msado15/tests/msado15.c
@@ -414,9 +414,8 @@ static void test_Connection(void)
ok(hr == E_NOINTERFACE, "Unexpected IRunnableObject interface\n");
hr = _Connection_QueryInterface(connection, &IID_ISupportErrorInfo, (void**)&errorinfo);
- todo_wine ok(hr == S_OK, "Failed to get ISupportErrorInfo interface\n");
- if (hr == S_OK)
- ISupportErrorInfo_Release(errorinfo);
+ ok(hr == S_OK, "Failed to get ISupportErrorInfo interface\n");
+ ISupportErrorInfo_Release(errorinfo);
if (0) /* Crashes on windows */
{
--
2.20.1
Dec. 12, 2019
[PATCH v2 8/8] strmbase: Get rid of the "vtbl" parameter to strmbase_sink_init().
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/qcap/avico.c | 24 +-------
dlls/qcap/avimux.c | 23 +-------
dlls/qcap/smartteefilter.c | 23 +-------
dlls/qedit/samplegrabber.c | 24 +-------
dlls/strmbase/pin.c | 101 +++++++++++++++++++-------------
dlls/strmbase/renderer.c | 25 +-------
dlls/strmbase/transform.c | 27 +--------
dlls/winegstreamer/gstdemux.c | 34 ++---------
dlls/wineqtdecoder/qtsplitter.c | 25 +-------
include/wine/strmbase.h | 25 +-------
10 files changed, 73 insertions(+), 258 deletions(-)
diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c
index ecda162be86..53b8526f449 100644
--- a/dlls/qcap/avico.c
+++ b/dlls/qcap/avico.c
@@ -272,27 +272,6 @@ static const IPersistPropertyBagVtbl PersistPropertyBagVtbl = {
AVICompressorPropertyBag_Save
};
-static const IPinVtbl AVICompressorInputPinVtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseInputPinImpl_Connect,
- BaseInputPinImpl_ReceiveConnection,
- BaseInputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseInputPinImpl_EndOfStream,
- BaseInputPinImpl_BeginFlush,
- BaseInputPinImpl_EndFlush,
- BaseInputPinImpl_NewSegment
-};
-
static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt)
{
AVICompressor *This = impl_from_strmbase_pin(base);
@@ -517,8 +496,7 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
compressor->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl;
- strmbase_sink_init(&compressor->sink, &AVICompressorInputPinVtbl,
- &compressor->filter, sink_name, &sink_ops, NULL);
+ strmbase_sink_init(&compressor->sink, &compressor->filter, sink_name, &sink_ops, NULL);
strmbase_source_init(&compressor->source, &compressor->filter, source_name, &source_ops);
*phr = S_OK;
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index c17d91322bf..e402479fb17 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1500,27 +1500,6 @@ static inline AviMux* impl_from_in_IPin(IPin *iface)
return impl_from_strmbase_filter(pin->filter);
}
-static const IPinVtbl AviMuxIn_PinVtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseInputPinImpl_Connect,
- BaseInputPinImpl_ReceiveConnection,
- BaseInputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseInputPinImpl_EndOfStream,
- BaseInputPinImpl_BeginFlush,
- BaseInputPinImpl_EndFlush,
- BasePinImpl_NewSegment
-};
-
static inline AviMuxIn* AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface)
{
return CONTAINING_RECORD(iface, AviMuxIn, IAMStreamControl_iface);
@@ -1825,7 +1804,7 @@ static HRESULT create_input_pin(AviMux *avimux)
if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
- strmbase_sink_init(&object->pin, &AviMuxIn_PinVtbl, &avimux->filter, name, &sink_ops, NULL);
+ strmbase_sink_init(&object->pin, &avimux->filter, name, &sink_ops, NULL);
object->pin.IMemInputPin_iface.lpVtbl = &AviMuxIn_MemInputPinVtbl;
object->IAMStreamControl_iface.lpVtbl = &AviMuxIn_AMStreamControlVtbl;
object->IPropertyBag_iface.lpVtbl = &AviMuxIn_PropertyBagVtbl;
diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c
index e1fcea55f91..5339cb5134f 100644
--- a/dlls/qcap/smartteefilter.c
+++ b/dlls/qcap/smartteefilter.c
@@ -81,27 +81,6 @@ static const struct strmbase_filter_ops filter_ops =
.filter_destroy = smart_tee_destroy,
};
-static const IPinVtbl SmartTeeFilterInputVtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseInputPinImpl_Connect,
- BaseInputPinImpl_ReceiveConnection,
- BaseInputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseInputPinImpl_EndOfStream,
- BaseInputPinImpl_BeginFlush,
- BaseInputPinImpl_EndFlush,
- BaseInputPinImpl_NewSegment
-};
-
static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt)
{
SmartTeeFilter *This = impl_from_strmbase_pin(base);
@@ -358,7 +337,7 @@ IUnknown* WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr)
memset(object, 0, sizeof(*object));
strmbase_filter_init(&object->filter, outer, &CLSID_SmartTee, &filter_ops);
- strmbase_sink_init(&object->sink, &SmartTeeFilterInputVtbl, &object->filter, inputW, &sink_ops, NULL);
+ strmbase_sink_init(&object->sink, &object->filter, inputW, &sink_ops, NULL);
hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER,
&IID_IMemAllocator, (void **)&object->sink.pAllocator);
if (FAILED(hr))
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c
index 91b8d9dce64..bbd43e79bfd 100644
--- a/dlls/qedit/samplegrabber.c
+++ b/dlls/qedit/samplegrabber.c
@@ -473,28 +473,6 @@ static const IMemInputPinVtbl IMemInputPin_VTable =
SampleGrabber_IMemInputPin_ReceiveCanBlock,
};
-static const IPinVtbl sink_vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseInputPinImpl_Connect,
- BaseInputPinImpl_ReceiveConnection,
- BaseInputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseInputPinImpl_EndOfStream,
- BaseInputPinImpl_BeginFlush,
- BaseInputPinImpl_EndFlush,
- BaseInputPinImpl_NewSegment
-};
-
static inline SG_Impl *impl_from_sink_pin(struct strmbase_pin *iface)
{
return CONTAINING_RECORD(iface, SG_Impl, sink.pin);
@@ -663,7 +641,7 @@ HRESULT SampleGrabber_create(IUnknown *outer, void **out)
obj->ISampleGrabber_iface.lpVtbl = &ISampleGrabber_VTable;
obj->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable;
- strmbase_sink_init(&obj->sink, &sink_vtbl, &obj->filter, L"In", &sink_ops, NULL);
+ strmbase_sink_init(&obj->sink, &obj->filter, L"In", &sink_ops, NULL);
strmbase_source_init(&obj->source, &obj->filter, L"Out", &source_ops);
obj->mtype.majortype = GUID_NULL;
diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c
index f36e147b849..42d86eae170 100644
--- a/dlls/strmbase/pin.c
+++ b/dlls/strmbase/pin.c
@@ -82,7 +82,7 @@ HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, unsigned int ind
return VFW_S_NO_MORE_ITEMS;
}
-HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface, REFIID iid, void **out)
+static HRESULT WINAPI pin_QueryInterface(IPin *iface, REFIID iid, void **out)
{
struct strmbase_pin *pin = impl_from_IPin(iface);
HRESULT hr;
@@ -107,19 +107,19 @@ HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface, REFIID iid, void **out)
return S_OK;
}
-ULONG WINAPI BasePinImpl_AddRef(IPin *iface)
+static ULONG WINAPI pin_AddRef(IPin *iface)
{
struct strmbase_pin *pin = impl_from_IPin(iface);
return IBaseFilter_AddRef(&pin->filter->IBaseFilter_iface);
}
-ULONG WINAPI BasePinImpl_Release(IPin *iface)
+static ULONG WINAPI pin_Release(IPin *iface)
{
struct strmbase_pin *pin = impl_from_IPin(iface);
return IBaseFilter_Release(&pin->filter->IBaseFilter_iface);
}
-HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin)
+static HRESULT WINAPI pin_ConnectedTo(IPin * iface, IPin ** ppPin)
{
struct strmbase_pin *This = impl_from_IPin(iface);
HRESULT hr;
@@ -145,7 +145,7 @@ HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin)
return hr;
}
-HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt)
+static HRESULT WINAPI pin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
{
struct strmbase_pin *This = impl_from_IPin(iface);
HRESULT hr;
@@ -171,7 +171,7 @@ HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt
return hr;
}
-HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *info)
+static HRESULT WINAPI pin_QueryPinInfo(IPin *iface, PIN_INFO *info)
{
struct strmbase_pin *pin = impl_from_IPin(iface);
@@ -184,7 +184,7 @@ HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *info)
return S_OK;
}
-HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *dir)
+static HRESULT WINAPI pin_QueryDirection(IPin *iface, PIN_DIRECTION *dir)
{
struct strmbase_pin *pin = impl_from_IPin(iface);
@@ -195,7 +195,7 @@ HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *dir)
return S_OK;
}
-HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, WCHAR **id)
+static HRESULT WINAPI pin_QueryId(IPin *iface, WCHAR **id)
{
struct strmbase_pin *pin = impl_from_IPin(iface);
@@ -209,7 +209,7 @@ HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, WCHAR **id)
return S_OK;
}
-HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt)
+static HRESULT WINAPI pin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
{
struct strmbase_pin *This = impl_from_IPin(iface);
@@ -219,7 +219,7 @@ HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt)
return (This->pFuncsTable->pin_query_accept(This, pmt) == S_OK ? S_OK : S_FALSE);
}
-HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types)
+static HRESULT WINAPI pin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types)
{
struct strmbase_pin *pin = impl_from_IPin(iface);
AM_MEDIA_TYPE mt;
@@ -235,7 +235,7 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_me
return enum_media_types_create(pin, enum_media_types);
}
-HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin)
+static HRESULT WINAPI pin_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
{
struct strmbase_pin *This = impl_from_IPin(iface);
@@ -244,14 +244,6 @@ HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin,
return E_NOTIMPL; /* to tell caller that all input pins connected to all output pins */
}
-HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
-{
- TRACE("iface %p, start %s, stop %s, rate %.16e.\n",
- iface, debugstr_time(start), debugstr_time(stop), rate);
-
- return S_OK;
-}
-
/*** OutputPin implementation ***/
static inline struct strmbase_source *impl_source_from_IPin( IPin *iface )
@@ -420,26 +412,33 @@ static HRESULT WINAPI source_EndFlush(IPin *iface)
return E_UNEXPECTED;
}
+static HRESULT WINAPI source_NewSegment(IPin * iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
+{
+ TRACE("iface %p, start %s, stop %s, rate %.16e.\n",
+ iface, debugstr_time(start), debugstr_time(stop), rate);
+ return S_OK;
+}
+
static const IPinVtbl source_vtbl =
{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
+ pin_QueryInterface,
+ pin_AddRef,
+ pin_Release,
source_Connect,
source_ReceiveConnection,
source_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
+ pin_ConnectedTo,
+ pin_ConnectionMediaType,
+ pin_QueryPinInfo,
+ pin_QueryDirection,
+ pin_QueryId,
+ pin_QueryAccept,
+ pin_EnumMediaTypes,
+ pin_QueryInternalConnections,
source_EndOfStream,
source_BeginFlush,
source_EndFlush,
- BasePinImpl_NewSegment,
+ source_NewSegment,
};
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *This,
@@ -617,14 +616,14 @@ static struct strmbase_sink *impl_sink_from_IPin(IPin *iface)
return CONTAINING_RECORD(iface, struct strmbase_sink, pin.IPin_iface);
}
-HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt)
+static HRESULT WINAPI sink_Connect(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt)
{
ERR("(%p)->(%p, %p) outgoing connection on an input pin!\n", iface, pin, pmt);
return E_UNEXPECTED;
}
-HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt)
+static HRESULT WINAPI sink_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{
struct strmbase_sink *This = impl_sink_from_IPin(iface);
PIN_DIRECTION pindirReceive;
@@ -678,7 +677,7 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
return hr;
}
-HRESULT WINAPI BaseInputPinImpl_Disconnect(IPin *iface)
+static HRESULT WINAPI sink_Disconnect(IPin *iface)
{
struct strmbase_sink *pin = impl_sink_from_IPin(iface);
HRESULT hr;
@@ -711,7 +710,7 @@ static HRESULT deliver_endofstream(IPin* pin, LPVOID unused)
return IPin_EndOfStream( pin );
}
-HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface)
+static HRESULT WINAPI sink_EndOfStream(IPin *iface)
{
struct strmbase_sink *This = impl_sink_from_IPin(iface);
HRESULT hr = S_OK;
@@ -736,7 +735,7 @@ static HRESULT deliver_beginflush(IPin* pin, LPVOID unused)
return IPin_BeginFlush( pin );
}
-HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface)
+static HRESULT WINAPI sink_BeginFlush(IPin *iface)
{
struct strmbase_sink *This = impl_sink_from_IPin(iface);
HRESULT hr;
@@ -759,7 +758,7 @@ static HRESULT deliver_endflush(IPin* pin, LPVOID unused)
return IPin_EndFlush( pin );
}
-HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface)
+static HRESULT WINAPI sink_EndFlush(IPin * iface)
{
struct strmbase_sink *This = impl_sink_from_IPin(iface);
HRESULT hr;
@@ -789,7 +788,7 @@ static HRESULT deliver_newsegment(IPin *pin, LPVOID data)
return IPin_NewSegment(pin, args->tStart, args->tStop, args->rate);
}
-HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
+static HRESULT WINAPI sink_NewSegment(IPin *iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
{
struct strmbase_sink *pin = impl_sink_from_IPin(iface);
newsegmentargs args;
@@ -807,6 +806,28 @@ HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, R
return SendFurther(pin, deliver_newsegment, &args);
}
+static const IPinVtbl sink_vtbl =
+{
+ pin_QueryInterface,
+ pin_AddRef,
+ pin_Release,
+ sink_Connect,
+ sink_ReceiveConnection,
+ sink_Disconnect,
+ pin_ConnectedTo,
+ pin_ConnectionMediaType,
+ pin_QueryPinInfo,
+ pin_QueryDirection,
+ pin_QueryId,
+ pin_QueryAccept,
+ pin_EnumMediaTypes,
+ pin_QueryInternalConnections,
+ sink_EndOfStream,
+ sink_BeginFlush,
+ sink_EndFlush,
+ sink_NewSegment,
+};
+
/*** IMemInputPin implementation ***/
static inline struct strmbase_sink *impl_from_IMemInputPin(IMemInputPin *iface)
@@ -938,11 +959,11 @@ static const IMemInputPinVtbl MemInputPin_Vtbl =
MemInputPin_ReceiveCanBlock
};
-void strmbase_sink_init(struct strmbase_sink *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
+void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filter,
const WCHAR *name, const struct strmbase_sink_ops *func_table, IMemAllocator *allocator)
{
memset(pin, 0, sizeof(*pin));
- pin->pin.IPin_iface.lpVtbl = vtbl;
+ pin->pin.IPin_iface.lpVtbl = &sink_vtbl;
pin->pin.filter = filter;
pin->pin.dir = PINDIR_INPUT;
lstrcpyW(pin->pin.name, name);
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c
index 3c9692029dd..3fd8af2c1c2 100644
--- a/dlls/strmbase/renderer.c
+++ b/dlls/strmbase/renderer.c
@@ -40,28 +40,6 @@ static inline struct strmbase_renderer *impl_from_IPin(IPin *iface)
return CONTAINING_RECORD(iface, struct strmbase_renderer, sink.pin.IPin_iface);
}
-static const IPinVtbl BaseRenderer_InputPin_Vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseInputPinImpl_Connect,
- BaseInputPinImpl_ReceiveConnection,
- BaseInputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseInputPinImpl_EndOfStream,
- BaseInputPinImpl_BeginFlush,
- BaseInputPinImpl_EndFlush,
- BaseInputPinImpl_NewSegment
-};
-
static struct strmbase_pin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index)
{
struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
@@ -441,8 +419,7 @@ HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown
filter->pFuncsTable = ops;
- strmbase_sink_init(&filter->sink, &BaseRenderer_InputPin_Vtbl, &filter->filter,
- sink_name, &sink_ops, NULL);
+ strmbase_sink_init(&filter->sink, &filter->filter, sink_name, &sink_ops, NULL);
hr = CreatePosPassThru(outer ? outer : (IUnknown *)&filter->filter.IBaseFilter_iface,
TRUE, &filter->sink.pin.IPin_iface, &filter->pPosition);
diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c
index 13e7be21789..6082a142dc9 100644
--- a/dlls/strmbase/transform.c
+++ b/dlls/strmbase/transform.c
@@ -26,8 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
static const WCHAR wcsInputPinName[] = {'I','n',0};
static const WCHAR wcsOutputPinName[] = {'O','u','t',0};
-static const IPinVtbl TransformFilter_InputPin_Vtbl;
-
static inline TransformFilter *impl_from_strmbase_filter(struct strmbase_filter *iface)
{
return CONTAINING_RECORD(iface, TransformFilter, filter);
@@ -407,8 +405,7 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid,
filter->pFuncsTable = func_table;
ZeroMemory(&filter->pmt, sizeof(filter->pmt));
- strmbase_sink_init(&filter->sink, &TransformFilter_InputPin_Vtbl, &filter->filter,
- wcsInputPinName, &sink_ops, NULL);
+ strmbase_sink_init(&filter->sink, &filter->filter, wcsInputPinName, &sink_ops, NULL);
strmbase_source_init(&filter->source, &filter->filter, wcsOutputPinName, &source_ops);
filter->source_IQualityControl_iface.lpVtbl = &source_qc_vtbl;
@@ -458,25 +455,3 @@ HRESULT strmbase_transform_create(LONG filter_size, IUnknown *outer, const CLSID
CoTaskMemFree(pTf);
return E_FAIL;
}
-
-static const IPinVtbl TransformFilter_InputPin_Vtbl =
-{
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseInputPinImpl_Connect,
- BaseInputPinImpl_ReceiveConnection,
- BaseInputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseInputPinImpl_EndOfStream,
- BaseInputPinImpl_BeginFlush,
- BaseInputPinImpl_EndFlush,
- BaseInputPinImpl_NewSegment
-};
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 1eae0dae9af..3945d9da8fa 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -97,7 +97,6 @@ const char* media_quark_string = "media-sample";
static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
static const IMediaSeekingVtbl GST_Seeking_Vtbl;
-static const IPinVtbl GST_InputPin_Vtbl;
static const IQualityControlVtbl GSTOutPin_QualityControl_Vtbl;
static struct gstdemux_source *create_pin(struct gstdemux *filter, const WCHAR *name);
@@ -1502,8 +1501,7 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *outer, HRESULT *phr)
}
strmbase_filter_init(&object->filter, outer, &CLSID_Gstreamer_Splitter, &filter_ops);
- strmbase_sink_init(&object->sink, &GST_InputPin_Vtbl, &object->filter,
- wcsInputPinName, &sink_ops, NULL);
+ strmbase_sink_init(&object->sink, &object->filter, wcsInputPinName, &sink_ops, NULL);
object->no_more_pads_event = CreateEventW(NULL, FALSE, FALSE, NULL);
object->init_gst = gstdecoder_init_gst;
@@ -1967,27 +1965,6 @@ static HRESULT GST_RemoveOutputPins(struct gstdemux *This)
return S_OK;
}
-static const IPinVtbl GST_InputPin_Vtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseInputPinImpl_Connect,
- BaseInputPinImpl_ReceiveConnection,
- BaseInputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseInputPinImpl_EndOfStream,
- BaseInputPinImpl_BeginFlush,
- BaseInputPinImpl_EndFlush,
- BaseInputPinImpl_NewSegment
-};
-
pthread_mutex_t cb_list_lock = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cb_list_cond = PTHREAD_COND_INITIALIZER;
struct list cb_list = LIST_INIT(cb_list);
@@ -2235,8 +2212,7 @@ IUnknown * CALLBACK wave_parser_create(IUnknown *outer, HRESULT *phr)
}
strmbase_filter_init(&object->filter, outer, &CLSID_WAVEParser, &filter_ops);
- strmbase_sink_init(&object->sink, &GST_InputPin_Vtbl, &object->filter,
- sink_name, &wave_parser_sink_ops, NULL);
+ strmbase_sink_init(&object->sink, &object->filter, sink_name, &wave_parser_sink_ops, NULL);
object->init_gst = wave_parser_init_gst;
*phr = S_OK;
@@ -2339,8 +2315,7 @@ IUnknown * CALLBACK avi_splitter_create(IUnknown *outer, HRESULT *phr)
}
strmbase_filter_init(&object->filter, outer, &CLSID_AviSplitter, &filter_ops);
- strmbase_sink_init(&object->sink, &GST_InputPin_Vtbl, &object->filter,
- sink_name, &avi_splitter_sink_ops, NULL);
+ strmbase_sink_init(&object->sink, &object->filter, sink_name, &avi_splitter_sink_ops, NULL);
object->no_more_pads_event = CreateEventW(NULL, FALSE, FALSE, NULL);
object->init_gst = avi_splitter_init_gst;
*phr = S_OK;
@@ -2475,8 +2450,7 @@ IUnknown * CALLBACK mpeg_splitter_create(IUnknown *outer, HRESULT *phr)
}
strmbase_filter_init(&object->filter, outer, &CLSID_MPEG1Splitter, &mpeg_splitter_ops);
- strmbase_sink_init(&object->sink, &GST_InputPin_Vtbl, &object->filter,
- sink_name, &mpeg_splitter_sink_ops, NULL);
+ strmbase_sink_init(&object->sink, &object->filter, sink_name, &mpeg_splitter_sink_ops, NULL);
object->IAMStreamSelect_iface.lpVtbl = &stream_select_vtbl;
object->duration_event = CreateEventW(NULL, FALSE, FALSE, NULL);
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index df6e8ea5d24..1421e0bf53c 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -171,7 +171,6 @@ typedef struct QTSplitter {
HANDLE splitterThread;
} QTSplitter;
-static const IPinVtbl QT_InputPin_Vtbl;
static const IBaseFilterVtbl QT_Vtbl;
static const IMediaSeekingVtbl QT_Seeking_Vtbl;
@@ -421,8 +420,7 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr)
ZeroMemory(This,sizeof(*This));
strmbase_filter_init(&This->filter, outer, &CLSID_QTSplitter, &filter_ops);
- strmbase_sink_init(&This->pInputPin.pin, &QT_InputPin_Vtbl, &This->filter,
- wcsInputPinName, &sink_ops, NULL);
+ strmbase_sink_init(&This->pInputPin.pin, &This->filter, wcsInputPinName, &sink_ops, NULL);
InitializeCriticalSection(&This->csReceive);
This->csReceive.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": QTSplitter.csReceive");
@@ -1030,27 +1028,6 @@ static HRESULT QT_Process_Movie(QTSplitter* filter)
return hr;
}
-static const IPinVtbl QT_InputPin_Vtbl = {
- BasePinImpl_QueryInterface,
- BasePinImpl_AddRef,
- BasePinImpl_Release,
- BaseInputPinImpl_Connect,
- BaseInputPinImpl_ReceiveConnection,
- BaseInputPinImpl_Disconnect,
- BasePinImpl_ConnectedTo,
- BasePinImpl_ConnectionMediaType,
- BasePinImpl_QueryPinInfo,
- BasePinImpl_QueryDirection,
- BasePinImpl_QueryId,
- BasePinImpl_QueryAccept,
- BasePinImpl_EnumMediaTypes,
- BasePinImpl_QueryInternalConnections,
- BaseInputPinImpl_EndOfStream,
- BaseInputPinImpl_BeginFlush,
- BaseInputPinImpl_EndFlush,
- BaseInputPinImpl_NewSegment
-};
-
static inline QTOutPin *impl_source_from_strmbase_pin(struct strmbase_pin *iface)
{
return CONTAINING_RECORD(iface, QTOutPin, pin.pin);
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h
index c01ef6133f4..48d7638ae16 100644
--- a/include/wine/strmbase.h
+++ b/include/wine/strmbase.h
@@ -103,20 +103,6 @@ struct strmbase_sink_ops
/* Base Pin */
HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt);
-LONG WINAPI BasePinImpl_GetMediaTypeVersion(struct strmbase_pin *pin);
-HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface, REFIID iid, void **out);
-ULONG WINAPI BasePinImpl_AddRef(IPin *iface);
-ULONG WINAPI BasePinImpl_Release(IPin *iface);
-HRESULT WINAPI BaseInputPinImpl_Disconnect(IPin * iface);
-HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin);
-HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt);
-HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin * iface, PIN_INFO * pInfo);
-HRESULT WINAPI BasePinImpl_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir);
-HRESULT WINAPI BasePinImpl_QueryId(IPin * iface, LPWSTR * Id);
-HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
-HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum);
-HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin);
-HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *pin,
IMediaSample **sample, REFERENCE_TIME *start, REFERENCE_TIME *stop, DWORD flags);
@@ -130,16 +116,7 @@ void strmbase_source_cleanup(struct strmbase_source *pin);
void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter,
const WCHAR *name, const struct strmbase_source_ops *func_table);
-/* Base Input Pin */
-HRESULT WINAPI BaseInputPinImpl_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt);
-HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
-HRESULT WINAPI BaseInputPinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
-HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface);
-HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface);
-HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface);
-HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
-
-void strmbase_sink_init(struct strmbase_sink *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
+void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filter,
const WCHAR *name, const struct strmbase_sink_ops *ops, IMemAllocator *allocator);
void strmbase_sink_cleanup(struct strmbase_sink *pin);
--
2.24.0
Dec. 12, 2019
[PATCH v2 7/8] wineqtdecoder: Use base sink streaming methods.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/wineqtdecoder/qtsplitter.c | 33 ++++-----------------------------
1 file changed, 4 insertions(+), 29 deletions(-)
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index 01ec4c2cede..df6e8ea5d24 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -1030,31 +1030,6 @@ static HRESULT QT_Process_Movie(QTSplitter* filter)
return hr;
}
-static HRESULT WINAPI QTInPin_EndOfStream(IPin *iface)
-{
- FIXME("iface %p, stub!\n", iface);
- return S_OK;
-}
-
-static HRESULT WINAPI QTInPin_BeginFlush(IPin *iface)
-{
- FIXME("iface %p, stub!\n", iface);
- return S_OK;
-}
-
-static HRESULT WINAPI QTInPin_EndFlush(IPin *iface)
-{
- FIXME("iface %p, stub!\n", iface);
- return S_OK;
-}
-
-static HRESULT WINAPI QTInPin_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
-{
- BasePinImpl_NewSegment(iface, tStart, tStop, dRate);
- FIXME("iface %p, stub!\n", iface);
- return S_OK;
-}
-
static const IPinVtbl QT_InputPin_Vtbl = {
BasePinImpl_QueryInterface,
BasePinImpl_AddRef,
@@ -1070,10 +1045,10 @@ static const IPinVtbl QT_InputPin_Vtbl = {
BasePinImpl_QueryAccept,
BasePinImpl_EnumMediaTypes,
BasePinImpl_QueryInternalConnections,
- QTInPin_EndOfStream,
- QTInPin_BeginFlush,
- QTInPin_EndFlush,
- QTInPin_NewSegment
+ BaseInputPinImpl_EndOfStream,
+ BaseInputPinImpl_BeginFlush,
+ BaseInputPinImpl_EndFlush,
+ BaseInputPinImpl_NewSegment
};
static inline QTOutPin *impl_source_from_strmbase_pin(struct strmbase_pin *iface)
--
2.24.0
Dec. 12, 2019
[PATCH v2 6/8] winegstreamer: Use base sink streaming methods.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/winegstreamer/gstdemux.c | 36 ++++-------------------------------
1 file changed, 4 insertions(+), 32 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index fb60d69e2ac..1eae0dae9af 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1967,34 +1967,6 @@ static HRESULT GST_RemoveOutputPins(struct gstdemux *This)
return S_OK;
}
-static HRESULT WINAPI GSTInPin_EndOfStream(IPin *iface)
-{
- FIXME("iface %p, stub!\n", iface);
- return S_OK;
-}
-
-static HRESULT WINAPI GSTInPin_BeginFlush(IPin *iface)
-{
- FIXME("iface %p, stub!\n", iface);
- return S_OK;
-}
-
-static HRESULT WINAPI GSTInPin_EndFlush(IPin *iface)
-{
- FIXME("iface %p, stub!\n", iface);
- return S_OK;
-}
-
-static HRESULT WINAPI GSTInPin_NewSegment(IPin *iface, REFERENCE_TIME start,
- REFERENCE_TIME stop, double rate)
-{
- FIXME("iface %p, start %s, stop %s, rate %.16e, stub!\n",
- iface, wine_dbgstr_longlong(start), wine_dbgstr_longlong(stop), rate);
-
- BasePinImpl_NewSegment(iface, start, stop, rate);
- return S_OK;
-}
-
static const IPinVtbl GST_InputPin_Vtbl = {
BasePinImpl_QueryInterface,
BasePinImpl_AddRef,
@@ -2010,10 +1982,10 @@ static const IPinVtbl GST_InputPin_Vtbl = {
BasePinImpl_QueryAccept,
BasePinImpl_EnumMediaTypes,
BasePinImpl_QueryInternalConnections,
- GSTInPin_EndOfStream,
- GSTInPin_BeginFlush,
- GSTInPin_EndFlush,
- GSTInPin_NewSegment
+ BaseInputPinImpl_EndOfStream,
+ BaseInputPinImpl_BeginFlush,
+ BaseInputPinImpl_EndFlush,
+ BaseInputPinImpl_NewSegment
};
pthread_mutex_t cb_list_lock = PTHREAD_MUTEX_INITIALIZER;
--
2.24.0
Dec. 12, 2019
[PATCH v2 5/8] strmbase/renderer: Use base sink streaming methods.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/strmbase/renderer.c | 142 +++++++++++++++++++--------------------
1 file changed, 68 insertions(+), 74 deletions(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c
index 7b9736ccfb2..3c9692029dd 100644
--- a/dlls/strmbase/renderer.c
+++ b/dlls/strmbase/renderer.c
@@ -40,77 +40,6 @@ static inline struct strmbase_renderer *impl_from_IPin(IPin *iface)
return CONTAINING_RECORD(iface, struct strmbase_renderer, sink.pin.IPin_iface);
}
-static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
-{
- struct strmbase_renderer *filter = impl_from_IPin(iface);
- IFilterGraph *graph = filter->filter.filterInfo.pGraph;
- IMediaEventSink *event_sink;
- HRESULT hr = S_OK;
-
- TRACE("iface %p.\n", iface);
-
- EnterCriticalSection(&filter->csRenderLock);
- filter->eos = TRUE;
-
- if (graph && SUCCEEDED(IFilterGraph_QueryInterface(graph,
- &IID_IMediaEventSink, (void **)&event_sink)))
- {
- IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK,
- (LONG_PTR)&filter->filter.IBaseFilter_iface);
- IMediaEventSink_Release(event_sink);
- }
- RendererPosPassThru_EOS(filter->pPosition);
- SetEvent(filter->state_event);
-
- if (filter->pFuncsTable->pfnEndOfStream)
- hr = filter->pFuncsTable->pfnEndOfStream(filter);
- LeaveCriticalSection(&filter->csRenderLock);
- return hr;
-}
-
-static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface)
-{
- struct strmbase_renderer *pFilter = impl_from_IPin(iface);
- HRESULT hr;
-
- TRACE("iface %p.\n", iface);
-
- EnterCriticalSection(&pFilter->filter.csFilter);
- hr = BaseInputPinImpl_BeginFlush(iface);
- if (SUCCEEDED(hr))
- {
- BaseRendererImpl_ClearPendingSample(pFilter);
- SetEvent(pFilter->flush_event);
- }
- LeaveCriticalSection(&pFilter->filter.csFilter);
- return hr;
-}
-
-static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
-{
- struct strmbase_renderer *pFilter = impl_from_IPin(iface);
- HRESULT hr;
-
- TRACE("iface %p.\n", iface);
-
- EnterCriticalSection(&pFilter->filter.csFilter);
- EnterCriticalSection(&pFilter->csRenderLock);
- pFilter->eos = FALSE;
- hr = BaseInputPinImpl_EndFlush(iface);
- if (SUCCEEDED(hr))
- {
- QualityControlRender_Start(pFilter->qcimpl, pFilter->stream_start);
- RendererPosPassThru_ResetMediaTime(pFilter->pPosition);
- ResetEvent(pFilter->flush_event);
-
- if (pFilter->pFuncsTable->pfnEndFlush)
- hr = pFilter->pFuncsTable->pfnEndFlush(pFilter);
- }
- LeaveCriticalSection(&pFilter->csRenderLock);
- LeaveCriticalSection(&pFilter->filter.csFilter);
- return hr;
-}
-
static const IPinVtbl BaseRenderer_InputPin_Vtbl =
{
BasePinImpl_QueryInterface,
@@ -127,9 +56,9 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl =
BasePinImpl_QueryAccept,
BasePinImpl_EnumMediaTypes,
BasePinImpl_QueryInternalConnections,
- BaseRenderer_InputPin_EndOfStream,
- BaseRenderer_InputPin_BeginFlush,
- BaseRenderer_InputPin_EndFlush,
+ BaseInputPinImpl_EndOfStream,
+ BaseInputPinImpl_BeginFlush,
+ BaseInputPinImpl_EndFlush,
BaseInputPinImpl_NewSegment
};
@@ -289,6 +218,68 @@ static void sink_disconnect(struct strmbase_sink *iface)
filter->pFuncsTable->pfnBreakConnect(filter);
}
+static HRESULT sink_eos(struct strmbase_sink *iface)
+{
+ struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
+ IFilterGraph *graph = filter->filter.filterInfo.pGraph;
+ IMediaEventSink *event_sink;
+ HRESULT hr;
+
+ EnterCriticalSection(&filter->csRenderLock);
+
+ filter->eos = TRUE;
+
+ if (graph && SUCCEEDED(IFilterGraph_QueryInterface(graph,
+ &IID_IMediaEventSink, (void **)&event_sink)))
+ {
+ IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK,
+ (LONG_PTR)&filter->filter.IBaseFilter_iface);
+ IMediaEventSink_Release(event_sink);
+ }
+ RendererPosPassThru_EOS(filter->pPosition);
+ SetEvent(filter->state_event);
+
+ if (filter->pFuncsTable->pfnEndOfStream)
+ hr = filter->pFuncsTable->pfnEndOfStream(filter);
+
+ LeaveCriticalSection(&filter->csRenderLock);
+ return hr;
+}
+
+static HRESULT sink_begin_flush(struct strmbase_sink *iface)
+{
+ struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
+
+ EnterCriticalSection(&filter->filter.csFilter);
+
+ BaseRendererImpl_ClearPendingSample(filter);
+ SetEvent(filter->flush_event);
+
+ LeaveCriticalSection(&filter->filter.csFilter);
+ return S_OK;
+}
+
+static HRESULT sink_end_flush(struct strmbase_sink *iface)
+{
+ struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
+ HRESULT hr = S_OK;
+
+ EnterCriticalSection(&filter->filter.csFilter);
+ EnterCriticalSection(&filter->csRenderLock);
+
+ filter->eos = FALSE;
+ QualityControlRender_Start(filter->qcimpl, filter->stream_start);
+ RendererPosPassThru_ResetMediaTime(filter->pPosition);
+ ResetEvent(filter->flush_event);
+
+ if (filter->pFuncsTable->pfnEndFlush)
+ hr = filter->pFuncsTable->pfnEndFlush(filter);
+
+ LeaveCriticalSection(&filter->csRenderLock);
+ LeaveCriticalSection(&filter->filter.csFilter);
+ return hr;
+}
+
static const struct strmbase_sink_ops sink_ops =
{
.base.pin_query_accept = sink_query_accept,
@@ -297,6 +288,9 @@ static const struct strmbase_sink_ops sink_ops =
.pfnReceive = BaseRenderer_Receive,
.sink_connect = sink_connect,
.sink_disconnect = sink_disconnect,
+ .sink_eos = sink_eos,
+ .sink_begin_flush = sink_begin_flush,
+ .sink_end_flush = sink_end_flush,
};
void strmbase_renderer_cleanup(struct strmbase_renderer *filter)
--
2.24.0
Dec. 12, 2019
[PATCH v2 4/8] strmbase/transform: Use base sink streaming methods.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/strmbase/transform.c | 120 ++++++++++++++++++--------------------
1 file changed, 58 insertions(+), 62 deletions(-)
diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c
index 993e30202bc..13e7be21789 100644
--- a/dlls/strmbase/transform.c
+++ b/dlls/strmbase/transform.c
@@ -229,6 +229,56 @@ static void sink_disconnect(struct strmbase_sink *iface)
filter->pFuncsTable->pfnBreakConnect(filter, PINDIR_INPUT);
}
+static HRESULT sink_eos(struct strmbase_sink *iface)
+{
+ TransformFilter *filter = impl_from_sink_IPin(&iface->pin.IPin_iface);
+
+ if (filter->source.pin.peer)
+ return IPin_EndOfStream(filter->source.pin.peer);
+ return VFW_E_NOT_CONNECTED;
+}
+
+static HRESULT sink_begin_flush(struct strmbase_sink *iface)
+{
+ TransformFilter *filter = impl_from_sink_IPin(&iface->pin.IPin_iface);
+ HRESULT hr = S_OK;
+
+ EnterCriticalSection(&filter->filter.csFilter);
+ if (filter->pFuncsTable->pfnBeginFlush)
+ hr = filter->pFuncsTable->pfnBeginFlush(filter);
+ if (SUCCEEDED(hr) && filter->source.pin.peer)
+ hr = IPin_BeginFlush(filter->source.pin.peer);
+ LeaveCriticalSection(&filter->filter.csFilter);
+ return hr;
+}
+
+static HRESULT sink_end_flush(struct strmbase_sink *iface)
+{
+ TransformFilter *filter = impl_from_sink_IPin(&iface->pin.IPin_iface);
+ HRESULT hr = S_OK;
+
+ EnterCriticalSection(&filter->filter.csFilter);
+ if (filter->pFuncsTable->pfnEndFlush)
+ hr = filter->pFuncsTable->pfnEndFlush(filter);
+ if (SUCCEEDED(hr) && filter->source.pin.peer)
+ hr = IPin_EndFlush(filter->source.pin.peer);
+ LeaveCriticalSection(&filter->filter.csFilter);
+ return hr;
+}
+
+static HRESULT sink_new_segment(struct strmbase_sink *iface,
+ REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
+{
+ TransformFilter *filter = impl_from_sink_IPin(&iface->pin.IPin_iface);
+ HRESULT hr = S_OK;
+
+ if (filter->pFuncsTable->pfnNewSegment)
+ hr = filter->pFuncsTable->pfnNewSegment(filter, start, stop, rate);
+ if (SUCCEEDED(hr) && filter->source.pin.peer)
+ hr = IPin_NewSegment(filter->source.pin.peer, start, stop, rate);
+ return hr;
+}
+
static const struct strmbase_sink_ops sink_ops =
{
.base.pin_query_accept = sink_query_accept,
@@ -237,6 +287,10 @@ static const struct strmbase_sink_ops sink_ops =
.pfnReceive = TransformFilter_Input_Receive,
.sink_connect = sink_connect,
.sink_disconnect = sink_disconnect,
+ .sink_eos = sink_eos,
+ .sink_begin_flush = sink_begin_flush,
+ .sink_end_flush = sink_end_flush,
+ .sink_new_segment = sink_new_segment,
};
static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
@@ -405,64 +459,6 @@ HRESULT strmbase_transform_create(LONG filter_size, IUnknown *outer, const CLSID
return E_FAIL;
}
-static HRESULT WINAPI TransformFilter_InputPin_EndOfStream(IPin * iface)
-{
- TransformFilter *filter = impl_from_sink_IPin(iface);
-
- TRACE("iface %p.\n", iface);
-
- if (filter->source.pin.peer)
- return IPin_EndOfStream(filter->source.pin.peer);
- return VFW_E_NOT_CONNECTED;
-}
-
-static HRESULT WINAPI TransformFilter_InputPin_BeginFlush(IPin * iface)
-{
- TransformFilter *pTransform = impl_from_sink_IPin(iface);
- HRESULT hr = S_OK;
-
- TRACE("(%p)->()\n", iface);
-
- EnterCriticalSection(&pTransform->filter.csFilter);
- if (pTransform->pFuncsTable->pfnBeginFlush)
- hr = pTransform->pFuncsTable->pfnBeginFlush(pTransform);
- if (SUCCEEDED(hr))
- hr = BaseInputPinImpl_BeginFlush(iface);
- LeaveCriticalSection(&pTransform->filter.csFilter);
- return hr;
-}
-
-static HRESULT WINAPI TransformFilter_InputPin_EndFlush(IPin * iface)
-{
- TransformFilter *pTransform = impl_from_sink_IPin(iface);
- HRESULT hr = S_OK;
-
- TRACE("(%p)->()\n", iface);
-
- EnterCriticalSection(&pTransform->filter.csFilter);
- if (pTransform->pFuncsTable->pfnEndFlush)
- hr = pTransform->pFuncsTable->pfnEndFlush(pTransform);
- if (SUCCEEDED(hr))
- hr = BaseInputPinImpl_EndFlush(iface);
- LeaveCriticalSection(&pTransform->filter.csFilter);
- return hr;
-}
-
-static HRESULT WINAPI TransformFilter_InputPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
-{
- TransformFilter *pTransform = impl_from_sink_IPin(iface);
- HRESULT hr = S_OK;
-
- TRACE("iface %p, start %s, stop %s, rate %.16e.\n",
- iface, debugstr_time(tStart), debugstr_time(tStop), dRate);
-
- if (pTransform->pFuncsTable->pfnNewSegment)
- hr = pTransform->pFuncsTable->pfnNewSegment(pTransform, tStart, tStop, dRate);
- if (SUCCEEDED(hr))
- hr = BaseInputPinImpl_NewSegment(iface, tStart, tStop, dRate);
- return hr;
-}
-
static const IPinVtbl TransformFilter_InputPin_Vtbl =
{
BasePinImpl_QueryInterface,
@@ -479,8 +475,8 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl =
BasePinImpl_QueryAccept,
BasePinImpl_EnumMediaTypes,
BasePinImpl_QueryInternalConnections,
- TransformFilter_InputPin_EndOfStream,
- TransformFilter_InputPin_BeginFlush,
- TransformFilter_InputPin_EndFlush,
- TransformFilter_InputPin_NewSegment
+ BaseInputPinImpl_EndOfStream,
+ BaseInputPinImpl_BeginFlush,
+ BaseInputPinImpl_EndFlush,
+ BaseInputPinImpl_NewSegment
};
--
2.24.0
Dec. 12, 2019
[PATCH v2 3/8] strmbase: Introduce callbacks for streaming events.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/strmbase/pin.c | 12 ++++++++++++
include/wine/strmbase.h | 4 ++++
2 files changed, 16 insertions(+)
diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c
index 3dd00b27ccc..f36e147b849 100644
--- a/dlls/strmbase/pin.c
+++ b/dlls/strmbase/pin.c
@@ -718,6 +718,9 @@ HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface)
TRACE("(%p)->()\n", This);
+ if (This->pFuncsTable->sink_eos)
+ return This->pFuncsTable->sink_eos(This);
+
EnterCriticalSection(&This->pin.filter->csFilter);
if (This->flushing)
hr = S_FALSE;
@@ -739,6 +742,9 @@ HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface)
HRESULT hr;
TRACE("(%p) semi-stub\n", This);
+ if (This->pFuncsTable->sink_begin_flush)
+ return This->pFuncsTable->sink_begin_flush(This);
+
EnterCriticalSection(&This->pin.filter->csFilter);
This->flushing = TRUE;
@@ -759,6 +765,9 @@ HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface)
HRESULT hr;
TRACE("(%p)->()\n", This);
+ if (This->pFuncsTable->sink_begin_flush)
+ return This->pFuncsTable->sink_end_flush(This);
+
EnterCriticalSection(&This->pin.filter->csFilter);
This->flushing = FALSE;
@@ -788,6 +797,9 @@ HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, R
TRACE("iface %p, start %s, stop %s, rate %.16e.\n",
iface, debugstr_time(start), debugstr_time(stop), rate);
+ if (pin->pFuncsTable->sink_new_segment)
+ return pin->pFuncsTable->sink_new_segment(pin, start, stop, rate);
+
args.tStart = start;
args.tStop = stop;
args.rate = rate;
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h
index 83ad2e0bd6e..c01ef6133f4 100644
--- a/include/wine/strmbase.h
+++ b/include/wine/strmbase.h
@@ -95,6 +95,10 @@ struct strmbase_sink_ops
BaseInputPin_Receive pfnReceive;
HRESULT (*sink_connect)(struct strmbase_sink *pin, IPin *peer, const AM_MEDIA_TYPE *mt);
void (*sink_disconnect)(struct strmbase_sink *pin);
+ HRESULT (*sink_eos)(struct strmbase_sink *pin);
+ HRESULT (*sink_begin_flush)(struct strmbase_sink *pin);
+ HRESULT (*sink_end_flush)(struct strmbase_sink *pin);
+ HRESULT (*sink_new_segment)(struct strmbase_sink *pin, REFERENCE_TIME start, REFERENCE_TIME stop, double rate);
};
/* Base Pin */
--
2.24.0
Dec. 12, 2019
[PATCH v2 2/8] wineqtdecoder: Use base sink connection methods.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
v2: fix numerous compilation errors, thanks Alistair.
dlls/wineqtdecoder/qtsplitter.c | 206 ++++++++++++--------------------
1 file changed, 75 insertions(+), 131 deletions(-)
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index c8a34cbf95e..01ec4c2cede 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -228,7 +228,6 @@ static struct strmbase_pin *qt_splitter_get_pin(struct strmbase_filter *base, un
static void qt_splitter_destroy(struct strmbase_filter *iface)
{
QTSplitter *filter = impl_from_strmbase_filter(iface);
- IPin *peer = NULL;
EnterCriticalSection(&filter->csReceive);
/* Don't need to clean up output pins, disconnecting input pin will do that */
@@ -285,13 +284,15 @@ static HRESULT qt_splitter_start_stream(struct strmbase_filter *iface, REFERENCE
EnterCriticalSection(&filter->csReceive);
if (filter->pVideo_Pin)
- pin_hr = BaseOutputPinImpl_Active(&filter->pVideo_Pin->pin);
- if (SUCCEEDED(pin_hr))
- hr = pin_hr;
+ {
+ if (SUCCEEDED(pin_hr = BaseOutputPinImpl_Active(&filter->pVideo_Pin->pin)))
+ hr = pin_hr;
+ }
if (filter->pAudio_Pin)
- pin_hr = BaseOutputPinImpl_Active(&filter->pAudio_Pin->pin);
- if (SUCCEEDED(pin_hr))
- hr = pin_hr;
+ {
+ if (SUCCEEDED(pin_hr = BaseOutputPinImpl_Active(&filter->pAudio_Pin->pin)))
+ hr = pin_hr;
+ }
SetEvent(filter->runEvent);
LeaveCriticalSection(&filter->csReceive);
@@ -331,10 +332,75 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE
return S_FALSE;
}
+static HRESULT QT_Process_Movie(QTSplitter *filter);
+
+static HRESULT qt_splitter_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt)
+{
+ QTSplitter *filter = impl_from_strmbase_filter(iface->pin.filter);
+ ALLOCATOR_PROPERTIES props;
+ IMemAllocator *allocator;
+ HRESULT hr = S_OK;
+
+ filter->pInputPin.pReader = NULL;
+
+ if (FAILED(hr = IPin_QueryInterface(peer, &IID_IAsyncReader, (void **)&filter->pInputPin.pReader)))
+ return hr;
+
+ if (FAILED(hr = QT_Process_Movie(filter)))
+ {
+ IAsyncReader_Release(filter->pInputPin.pReader);
+ filter->pInputPin.pReader = NULL;
+ return hr;
+ }
+
+ filter->pInputPin.pAlloc = NULL;
+ props.cBuffers = 8;
+ props.cbAlign = 1;
+ props.cbBuffer = filter->outputSize + props.cbAlign;
+ props.cbPrefix = 0;
+
+ /* Some applications depend on IAsyncReader::RequestAllocator() passing a
+ * non-NULL preferred allocator. */
+ hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC,
+ &IID_IMemAllocator, (void **)&allocator);
+ if (FAILED(hr))
+ goto err;
+
+ hr = IAsyncReader_RequestAllocator(filter->pInputPin.pReader, allocator, &props, &filter->pInputPin.pAlloc);
+ IMemAllocator_Release(allocator);
+ if (FAILED(hr))
+ {
+ WARN("Failed to get allocator, hr %#x.\n", hr);
+ goto err;
+ }
+
+ if (FAILED(hr = IMemAllocator_Commit(filter->pInputPin.pAlloc)))
+ {
+ WARN("Failed to commit allocator, hr %#x.\n", hr);
+ goto err;
+ }
+
+ return S_OK;
+err:
+ QT_RemoveOutputPins(filter);
+ IAsyncReader_Release(filter->pInputPin.pReader);
+ return hr;
+}
+
+static void qt_splitter_sink_disconnect(struct strmbase_sink *iface)
+{
+ QTSplitter *filter = impl_from_strmbase_filter(iface->pin.filter);
+
+ IMemAllocator_Decommit(filter->pInputPin.pAlloc);
+ QT_RemoveOutputPins(filter);
+}
+
static const struct strmbase_sink_ops sink_ops =
{
.base.pin_query_accept = sink_query_accept,
.base.pin_get_media_type = strmbase_pin_get_media_type,
+ .sink_connect = qt_splitter_sink_connect,
+ .sink_disconnect = qt_splitter_sink_disconnect,
};
IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr)
@@ -964,128 +1030,6 @@ static HRESULT QT_Process_Movie(QTSplitter* filter)
return hr;
}
-static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
-{
- HRESULT hr = S_OK;
- ALLOCATOR_PROPERTIES props;
- QTInPin *This = impl_from_IPin(iface);
- QTSplitter *filter = impl_from_strmbase_filter(This->pin.filter);
- IMemAllocator *pAlloc;
-
- TRACE("(%p/%p)->(%p, %p)\n", This, iface, pReceivePin, pmt);
-
- EnterCriticalSection(&filter->filter.csFilter);
- This->pReader = NULL;
-
- if (This->pin.pin.peer)
- hr = VFW_E_ALREADY_CONNECTED;
- else if (IPin_QueryAccept(iface, pmt) != S_OK)
- hr = VFW_E_TYPE_NOT_ACCEPTED;
- else
- {
- PIN_DIRECTION pindirReceive;
- IPin_QueryDirection(pReceivePin, &pindirReceive);
- if (pindirReceive != PINDIR_OUTPUT)
- hr = VFW_E_INVALID_DIRECTION;
- }
-
- if (FAILED(hr))
- {
- LeaveCriticalSection(&filter->filter.csFilter);
- return hr;
- }
-
- hr = IPin_QueryInterface(pReceivePin, &IID_IAsyncReader, (LPVOID *)&This->pReader);
- if (FAILED(hr))
- {
- LeaveCriticalSection(&filter->filter.csFilter);
- TRACE("Input source is not an AsyncReader\n");
- return hr;
- }
-
- LeaveCriticalSection(&filter->filter.csFilter);
- EnterCriticalSection(&filter->filter.csFilter);
- hr = QT_Process_Movie(filter);
- if (FAILED(hr))
- {
- IAsyncReader_Release(This->pReader);
- This->pReader = NULL;
- LeaveCriticalSection(&filter->filter.csFilter);
- TRACE("Unable to process movie\n");
- return hr;
- }
-
- This->pAlloc = NULL;
- props.cBuffers = 8;
- props.cbAlign = 1;
- props.cbBuffer = filter->outputSize + props.cbAlign;
- props.cbPrefix = 0;
- hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC,
- &IID_IMemAllocator, (LPVOID *)&pAlloc);
- if (SUCCEEDED(hr))
- {
- /* A certain IAsyncReader::RequestAllocator expects to be passed
- non-NULL preferred allocator */
- hr = IAsyncReader_RequestAllocator(This->pReader, pAlloc, &props, &This->pAlloc);
- if (FAILED(hr))
- WARN("Can't get an allocator, got %08x\n", hr);
- IMemAllocator_Release(pAlloc);
- }
-
- if (SUCCEEDED(hr))
- {
- CopyMediaType(&This->pin.mt, pmt);
- This->pin.peer = pReceivePin;
- IPin_AddRef(pReceivePin);
- hr = IMemAllocator_Commit(This->pAlloc);
- }
- else
- {
- QT_RemoveOutputPins(filter);
- if (This->pReader)
- IAsyncReader_Release(This->pReader);
- This->pReader = NULL;
- if (This->pAlloc)
- IMemAllocator_Release(This->pAlloc);
- This->pAlloc = NULL;
- }
- TRACE("Size: %i\n", props.cbBuffer);
- LeaveCriticalSection(&filter->filter.csFilter);
-
- return hr;
-}
-
-static HRESULT WINAPI QTInPin_Disconnect(IPin *iface)
-{
- HRESULT hr;
- QTInPin *This = impl_from_IPin(iface);
- QTSplitter *filter = impl_from_strmbase_filter(This->pin.pin.filter);
- FILTER_STATE state;
- TRACE("()\n");
-
- hr = IBaseFilter_GetState(&filter->filter.IBaseFilter_iface, INFINITE, &state);
- EnterCriticalSection(&filter->filter.csFilter);
- if (This->pin.pin.peer)
- {
- QTSplitter *Parser = impl_from_strmbase_filter(This->pin.pin.filter);
-
- if (SUCCEEDED(hr) && state == State_Stopped)
- {
- IMemAllocator_Decommit(This->pAlloc);
- IPin_Disconnect(This->pin.pin.peer);
- IPin_Release(This->pin.pin.peer);
- This->pin.pin.peer = NULL;
- hr = QT_RemoveOutputPins(Parser);
- }
- else
- hr = VFW_E_NOT_STOPPED;
- }
- else
- hr = S_FALSE;
- LeaveCriticalSection(&filter->filter.csFilter);
- return hr;
-}
-
static HRESULT WINAPI QTInPin_EndOfStream(IPin *iface)
{
FIXME("iface %p, stub!\n", iface);
@@ -1116,8 +1060,8 @@ static const IPinVtbl QT_InputPin_Vtbl = {
BasePinImpl_AddRef,
BasePinImpl_Release,
BaseInputPinImpl_Connect,
- QTInPin_ReceiveConnection,
- QTInPin_Disconnect,
+ BaseInputPinImpl_ReceiveConnection,
+ BaseInputPinImpl_Disconnect,
BasePinImpl_ConnectedTo,
BasePinImpl_ConnectionMediaType,
BasePinImpl_QueryPinInfo,
--
2.24.0
Dec. 12, 2019
[PATCH v2 1/8] wineqtdecoder: Store the sink as a strmbase_sink structure.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/wineqtdecoder/qtsplitter.c | 43 ++++++++++++++-------------------
1 file changed, 18 insertions(+), 25 deletions(-)
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index d861110f5f1..c8a34cbf95e 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -138,7 +138,7 @@ typedef struct QTOutPin {
} QTOutPin;
typedef struct QTInPin {
- struct strmbase_pin pin;
+ struct strmbase_sink pin;
GUID subType;
IAsyncReader *pReader;
@@ -199,7 +199,7 @@ static inline QTSplitter *impl_from_IBaseFilter( IBaseFilter *iface )
static inline QTInPin *impl_from_IPin(IPin *iface)
{
- return CONTAINING_RECORD(iface, QTInPin, pin.IPin_iface);
+ return CONTAINING_RECORD(iface, QTInPin, pin.pin.IPin_iface);
}
/*
@@ -211,7 +211,7 @@ static struct strmbase_pin *qt_splitter_get_pin(struct strmbase_filter *base, un
QTSplitter *filter = impl_from_strmbase_filter(base);
if (index == 0)
- return &filter->pInputPin.pin;
+ return &filter->pInputPin.pin.pin;
else if (index == 1)
{
if (filter->pVideo_Pin)
@@ -232,18 +232,15 @@ static void qt_splitter_destroy(struct strmbase_filter *iface)
EnterCriticalSection(&filter->csReceive);
/* Don't need to clean up output pins, disconnecting input pin will do that */
+ if (filter->pInputPin.pin.pin.peer)
+ IPin_Disconnect(filter->pInputPin.pin.pin.peer);
- if (filter->pInputPin.pin.peer)
- IPin_Disconnect(filter->pInputPin.pin.peer);
-
- FreeMediaType(&filter->pInputPin.pin.mt);
if (filter->pInputPin.pAlloc)
IMemAllocator_Release(filter->pInputPin.pAlloc);
filter->pInputPin.pAlloc = NULL;
if (filter->pInputPin.pReader)
IAsyncReader_Release(filter->pInputPin.pReader);
filter->pInputPin.pReader = NULL;
- filter->pInputPin.pin.IPin_iface.lpVtbl = NULL;
if (filter->pQTMovie)
{
@@ -274,6 +271,7 @@ static void qt_splitter_destroy(struct strmbase_filter *iface)
filter->csReceive.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->csReceive);
+ strmbase_sink_cleanup(&filter->pInputPin.pin);
strmbase_filter_cleanup(&filter->filter);
CoTaskMemFree(filter);
@@ -333,10 +331,10 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE
return S_FALSE;
}
-static const BasePinFuncTable sink_ops =
+static const struct strmbase_sink_ops sink_ops =
{
- .pin_query_accept = sink_query_accept,
- .pin_get_media_type = strmbase_pin_get_media_type,
+ .base.pin_query_accept = sink_query_accept,
+ .base.pin_get_media_type = strmbase_pin_get_media_type,
};
IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr)
@@ -357,6 +355,8 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr)
ZeroMemory(This,sizeof(*This));
strmbase_filter_init(&This->filter, outer, &CLSID_QTSplitter, &filter_ops);
+ strmbase_sink_init(&This->pInputPin.pin, &QT_InputPin_Vtbl, &This->filter,
+ wcsInputPinName, &sink_ops, NULL);
InitializeCriticalSection(&This->csReceive);
This->csReceive.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": QTSplitter.csReceive");
@@ -366,13 +366,6 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr)
This->aSession = NULL;
This->runEvent = CreateEventW(NULL, 0, 0, NULL);
- This->pInputPin.pin.dir = PINDIR_INPUT;
- This->pInputPin.pin.filter = &This->filter;
- lstrcpynW(This->pInputPin.pin.name, wcsInputPinName, ARRAY_SIZE(This->pInputPin.pin.name));
- This->pInputPin.pin.IPin_iface.lpVtbl = &QT_InputPin_Vtbl;
- This->pInputPin.pin.peer = NULL;
- This->pInputPin.pin.pFuncsTable = &sink_ops;
-
*phr = S_OK;
return &This->filter.IUnknown_inner;
}
@@ -984,7 +977,7 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
EnterCriticalSection(&filter->filter.csFilter);
This->pReader = NULL;
- if (This->pin.peer)
+ if (This->pin.pin.peer)
hr = VFW_E_ALREADY_CONNECTED;
else if (IPin_QueryAccept(iface, pmt) != S_OK)
hr = VFW_E_TYPE_NOT_ACCEPTED;
@@ -1066,22 +1059,22 @@ static HRESULT WINAPI QTInPin_Disconnect(IPin *iface)
{
HRESULT hr;
QTInPin *This = impl_from_IPin(iface);
- QTSplitter *filter = impl_from_strmbase_filter(This->pin.filter);
+ QTSplitter *filter = impl_from_strmbase_filter(This->pin.pin.filter);
FILTER_STATE state;
TRACE("()\n");
hr = IBaseFilter_GetState(&filter->filter.IBaseFilter_iface, INFINITE, &state);
EnterCriticalSection(&filter->filter.csFilter);
- if (This->pin.peer)
+ if (This->pin.pin.peer)
{
- QTSplitter *Parser = impl_from_strmbase_filter(This->pin.filter);
+ QTSplitter *Parser = impl_from_strmbase_filter(This->pin.pin.filter);
if (SUCCEEDED(hr) && state == State_Stopped)
{
IMemAllocator_Decommit(This->pAlloc);
- IPin_Disconnect(This->pin.peer);
- IPin_Release(This->pin.peer);
- This->pin.peer = NULL;
+ IPin_Disconnect(This->pin.pin.peer);
+ IPin_Release(This->pin.pin.peer);
+ This->pin.pin.peer = NULL;
hr = QT_RemoveOutputPins(Parser);
}
else
--
2.24.0
Dec. 12, 2019
Re: [PATCH v4 1/9] jscript: Store the necessary function and variable info in the TypeInfo.
by Francois Gouget
On Thu, 12 Dec 2019, Francois Gouget wrote:
> On Thu, 12 Dec 2019, Gabriel Ivăncescu wrote:
>
> > Was the testbot not synced with wine master? The bytecode field patch should
> > have been committed yesterday, AFAIK.
>
> Yes. The change in the wine-gecko package name broke the update.
> I sent a patch to fix this and I'm going to manually update the debian
> VM shortly.
Done.
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 12, 2019
Re: [PATCH v2 3/5] d3d9: Handle multisample depth resolve in d3d9_device_SetRenderState().
by Henri Verbeet
On Wed, 11 Dec 2019 at 07:16, Zebediah Figura <z.figura12(a)gmail.com> wrote:
> @@ -289,8 +289,18 @@ static HRESULT WINAPI d3d9_CheckDeviceFormat(IDirect3D9Ex *iface, UINT adapter,
> }
>
> wined3d_mutex_lock();
> - hr = wined3d_check_device_format(d3d9->wined3d, adapter, device_type, wined3dformat_from_d3dformat(adapter_format),
> - usage, bind_flags, wined3d_rtype, wined3dformat_from_d3dformat(format));
> + if ((enum wined3d_format_id)format == WINED3DFMT_RESZ)
> + {
> + DWORD levels;
> + hr = wined3d_check_device_multisample_type(d3d9->wined3d, adapter, device_type,
> + WINED3DFMT_D24_UNORM_S8_UINT, FALSE, WINED3D_MULTISAMPLE_NONE, &levels);
Did you intend to use WINED3D_MULTISAMPLE_NON_MASKABLE here?
It seems a little superfluous to export
wined3d_device_resolve_depth_buffer(); the implementation on top of
wined3d_device_resolve_sub_resource() wasn't that complicated.
Dec. 12, 2019
[PATCH 4/4] msvcrt: Implement sequential and random mode flags.
by Akihiro Sagawa
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
dlls/msvcrt/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Dec. 12, 2019
[PATCH 3/4] msvcrt: Implement _O_RANDOM and _O_SEQUENTIAL flags.
by Akihiro Sagawa
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
dlls/msvcrt/file.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Dec. 12, 2019
[PATCH 2/4] kernelbase: Implement FILE_FLAG_SEQUENTIAL_SCAN.
by Akihiro Sagawa
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
dlls/kernel32/tests/file.c | 16 ++++++++++++++++
dlls/kernelbase/file.c | 2 ++
2 files changed, 18 insertions(+)
Dec. 12, 2019
[PATCH 1/4] server: Implement access pattern hints for file data.
by Akihiro Sagawa
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com>
---
configure | 1 +
configure.ac | 1 +
dlls/ntdll/tests/file.c | 2 ++
include/config.h.in | 3 +++
server/fd.c | 19 +++++++++++++++++++
5 files changed, 26 insertions(+)
Dec. 12, 2019
Re: [PATCH v4 1/9] jscript: Store the necessary function and variable info in the TypeInfo.
by Francois Gouget
On Thu, 12 Dec 2019, Gabriel Ivăncescu wrote:
> Was the testbot not synced with wine master? The bytecode field patch should
> have been committed yesterday, AFAIK.
Yes. The change in the wine-gecko package name broke the update.
I sent a patch to fix this and I'm going to manually update the debian
VM shortly.
--
Francois Gouget <fgouget(a)codeweavers.com>
Dec. 12, 2019
Re: [PATCH v4 9/9] jscript/tests: Add initial tests for the script TypeInfo.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=62031
Your paranoid android.
=== debian10 (build log) ===
../../../wine/dlls/jscript/dispex.c:679:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
../../../wine/dlls/jscript/dispex.c:1241:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
Task: The win32 build failed
=== debian10 (build log) ===
../../../wine/dlls/jscript/dispex.c:679:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
../../../wine/dlls/jscript/dispex.c:1241:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
Task: The wow64 build failed
Dec. 12, 2019
Re: [PATCH v4 8/9] jscript: Implement ScriptTypeComp_BindType.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=62030
Your paranoid android.
=== debian10 (build log) ===
../../../wine/dlls/jscript/dispex.c:679:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
../../../wine/dlls/jscript/dispex.c:1241:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
Task: The win32 build failed
=== debian10 (build log) ===
../../../wine/dlls/jscript/dispex.c:679:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
../../../wine/dlls/jscript/dispex.c:1241:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
Task: The wow64 build failed
Dec. 12, 2019
Re: [PATCH v2 1/5] wined3d: Introduce wined3d_device_apply_stateblock().
by Henri Verbeet
On Wed, 11 Dec 2019 at 07:16, Zebediah Figura <z.figura12(a)gmail.com> wrote:
> + wined3d_device_set_vs_consts_f(device, 0, d3d_info->limits.vs_uniform_count, state->vs_consts_f);
> + wined3d_device_set_vs_consts_b(device, 0, WINED3D_MAX_CONSTS_B, state->vs_consts_b);
> + wined3d_device_set_vs_consts_i(device, 0, WINED3D_MAX_CONSTS_I, state->vs_consts_i);
> + wined3d_device_set_ps_consts_f(device, 0, d3d_info->limits.ps_uniform_count, state->ps_consts_f);
> + wined3d_device_set_ps_consts_b(device, 0, WINED3D_MAX_CONSTS_B, state->ps_consts_b);
> + wined3d_device_set_ps_consts_i(device, 0, WINED3D_MAX_CONSTS_I, state->ps_consts_i);
> +
That's going to invalidate every constant on every draw, even if none
of them changed, which seems undesirable. It shouldn't be too hard to
extract ranges from the "changed" info, although ideally changed float
constants would be stored in a proper bitmap first.
Dec. 12, 2019
Re: [PATCH v4 7/9] jscript: Implement ScriptTypeComp_Bind.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=62029
Your paranoid android.
=== debian10 (build log) ===
../../../wine/dlls/jscript/dispex.c:679:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
../../../wine/dlls/jscript/dispex.c:1226:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
Task: The win32 build failed
=== debian10 (build log) ===
../../../wine/dlls/jscript/dispex.c:679:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
../../../wine/dlls/jscript/dispex.c:1226:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
Task: The wow64 build failed
Dec. 12, 2019
Re: [PATCH v4 6/9] jscript: Implement ScriptTypeInfo_GetTypeComp.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=62028
Your paranoid android.
=== debian10 (build log) ===
../../../wine/dlls/jscript/dispex.c:679:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
../../../wine/dlls/jscript/dispex.c:1181:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
Task: The win32 build failed
=== debian10 (build log) ===
../../../wine/dlls/jscript/dispex.c:679:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
../../../wine/dlls/jscript/dispex.c:1181:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
Task: The wow64 build failed
Dec. 12, 2019
Re: [PATCH v4 1/9] jscript: Store the necessary function and variable info in the TypeInfo.
by Gabriel Ivăncescu
Was the testbot not synced with wine master? The bytecode field patch
should have been committed yesterday, AFAIK.
On 12/12/19 3:01 PM, Marvin wrote:
> Hi,
>
> While running your changed tests, I think I found new failures.
> Being a bot and all I'm not very good at pattern recognition, so I might be
> wrong, but could you please double-check?
>
> Full results can be found at:
> https://testbot.winehq.org/JobDetails.pl?Key=62023
>
> Your paranoid android.
>
>
> === debian10 (build log) ===
>
> ../../../wine/dlls/jscript/dispex.c:669:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
> ../../../wine/dlls/jscript/dispex.c:1013:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
> Task: The win32 build failed
>
> === debian10 (build log) ===
>
> ../../../wine/dlls/jscript/dispex.c:669:49: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
> ../../../wine/dlls/jscript/dispex.c:1013:38: error: ‘function_code_t’ {aka ‘struct _function_code_t’} has no member named ‘bytecode’
> Task: The wow64 build failed
>
Dec. 12, 2019