Wine-Devel
Threads by month
- ----- 2026 -----
- 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
February 2022
- 87 participants
- 926 discussions
[PATCH 1/5] shell32: Move SHWaitForFileToOpen() flags to shellord.c.
by Zebediah Figura Feb. 3, 2022
by Zebediah Figura Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/shell32/shellord.c | 5 +++++
dlls/shell32/undocshell.h | 10 ----------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 2c73ce18940..a138f381a92 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -50,6 +50,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(shell);
WINE_DECLARE_DEBUG_CHANNEL(pidl);
+/* SHWaitForFileToOpen flags */
+#define SHWFF_ADD 0x01
+#define SHWFF_REMOVE 0x02
+#define SHWFF_WAIT 0x04
+
/* FIXME: !!! move CREATEMRULIST and flags to header file !!! */
/* !!! it is in both here and comctl32undoc.c !!! */
typedef struct tagCREATEMRULIST
diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h
index 5ed8d25f234..459c51c8454 100644
--- a/dlls/shell32/undocshell.h
+++ b/dlls/shell32/undocshell.h
@@ -208,16 +208,6 @@ BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs);
* Misc Stuff
*/
-/* SHWaitForFileToOpen flags */
-#define SHWFF_ADD 0x01
-#define SHWFF_REMOVE 0x02
-#define SHWFF_WAIT 0x04
-
-BOOL WINAPI SHWaitForFileToOpen(
- LPCITEMIDLIST pidl,
- DWORD dwFlags,
- DWORD dwTimeout);
-
WORD WINAPI ArrangeWindows(HWND hwndParent, DWORD dwReserved, const RECT *lpRect,
WORD cKids, const HWND *lpKids);
--
2.34.1
2
6
[PATCH 1/4] quartz/tests: Test more interfaces exposed by the filter graph.
by Zebediah Figura Feb. 3, 2022
by Zebediah Figura Feb. 3, 2022
Feb. 3, 2022
From: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/quartz/tests/filtergraph.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index bd086445a3b..98f7b30717d 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -98,23 +98,30 @@ static void test_interfaces(void)
IFilterGraph2 *graph = create_graph();
check_interface(graph, &IID_IBasicAudio, TRUE);
+ check_interface(graph, &IID_IBasicVideo, TRUE);
check_interface(graph, &IID_IBasicVideo2, TRUE);
+ check_interface(graph, &IID_IFilterGraph, TRUE);
check_interface(graph, &IID_IFilterGraph2, TRUE);
check_interface(graph, &IID_IFilterMapper, TRUE);
+ check_interface(graph, &IID_IFilterMapper2, TRUE);
check_interface(graph, &IID_IFilterMapper3, TRUE);
+ check_interface(graph, &IID_IGraphBuilder, TRUE);
check_interface(graph, &IID_IGraphConfig, TRUE);
check_interface(graph, &IID_IGraphVersion, TRUE);
check_interface(graph, &IID_IMediaControl, TRUE);
check_interface(graph, &IID_IMediaEvent, TRUE);
- check_interface(graph, &IID_IMediaFilter, TRUE);
+ check_interface(graph, &IID_IMediaEventEx, TRUE);
check_interface(graph, &IID_IMediaEventSink, TRUE);
+ check_interface(graph, &IID_IMediaFilter, TRUE);
check_interface(graph, &IID_IMediaPosition, TRUE);
check_interface(graph, &IID_IMediaSeeking, TRUE);
check_interface(graph, &IID_IObjectWithSite, TRUE);
check_interface(graph, &IID_IVideoFrameStep, TRUE);
check_interface(graph, &IID_IVideoWindow, TRUE);
+ check_interface(graph, &IID_IUnknown, TRUE);
check_interface(graph, &IID_IBaseFilter, FALSE);
+ check_interface(graph, &IID_IDispatch, FALSE);
IFilterGraph2_Release(graph);
}
--
2.34.1
2
4
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/sane.ds/ui.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/sane.ds/ui.c b/dlls/sane.ds/ui.c
index 8be7ed42b70..e66526a088e 100644
--- a/dlls/sane.ds/ui.c
+++ b/dlls/sane.ds/ui.c
@@ -318,6 +318,7 @@ static int create_item(HDC hdc, const struct option_descriptor *opt,
if (trail_edit)
*count+=1;
+ free(trail_edit);
return leading_len + local_len + padding + padding2 + trail_len;
}
--
2.35.1
2
3
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/mf/copier.c | 4 ++--
dlls/mf/evr.c | 4 ++--
dlls/mf/main.c | 3 ++-
dlls/mf/sar.c | 7 ++++---
dlls/mf/session.c | 31 +++++++++++++++++--------------
dlls/mf/topology.c | 11 ++++++-----
6 files changed, 33 insertions(+), 27 deletions(-)
diff --git a/dlls/mf/copier.c b/dlls/mf/copier.c
index b05ae3383ab..fe5664ee4c7 100644
--- a/dlls/mf/copier.c
+++ b/dlls/mf/copier.c
@@ -247,7 +247,7 @@ static HRESULT WINAPI sample_copier_transform_GetOutputAvailableType(IMFTransfor
return hr;
}
-static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, DWORD *size)
+static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, UINT32 *size)
{
GUID major, subtype;
UINT64 frame_size;
@@ -281,7 +281,7 @@ static HRESULT sample_copier_get_buffer_size(IMFMediaType *type, DWORD *size)
static HRESULT sample_copier_set_media_type(struct sample_copier *transform, BOOL input, DWORD id, IMFMediaType *type,
DWORD flags)
{
- DWORD buffer_size;
+ UINT32 buffer_size;
HRESULT hr = S_OK;
if (id)
diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c
index 9552990006d..5e8b559af04 100644
--- a/dlls/mf/evr.c
+++ b/dlls/mf/evr.c
@@ -1633,8 +1633,8 @@ static HRESULT video_renderer_configure_mixer(struct video_renderer *renderer)
if (SUCCEEDED(hr))
{
- unsigned int input_count, output_count;
- unsigned int *ids, *oids;
+ DWORD input_count, output_count;
+ DWORD *ids, *oids;
size_t i;
/* Create stream sinks for inputs that mixer already has by default. */
diff --git a/dlls/mf/main.c b/dlls/mf/main.c
index acbb8377e52..50451170275 100644
--- a/dlls/mf/main.c
+++ b/dlls/mf/main.c
@@ -1072,10 +1072,11 @@ static int __cdecl qsort_string_compare(const void *a, const void *b)
static HRESULT mf_get_handler_strings(const WCHAR *path, WCHAR filter, unsigned int maxlen, PROPVARIANT *dst)
{
static const HKEY hkey_roots[2] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };
- unsigned int capacity = 0, count, size;
+ unsigned int capacity = 0, count;
HRESULT hr = S_OK;
int i, index;
WCHAR *buffW;
+ DWORD size;
if (!(buffW = calloc(maxlen, sizeof(*buffW))))
return E_OUTOFMEMORY;
diff --git a/dlls/mf/sar.c b/dlls/mf/sar.c
index f6f2b32dd2d..3c9bac90c9f 100644
--- a/dlls/mf/sar.c
+++ b/dlls/mf/sar.c
@@ -1493,7 +1493,7 @@ static HRESULT WINAPI audio_renderer_stream_type_handler_IsMediaTypeSupported(IM
IMFMediaType *in_type, IMFMediaType **out_type)
{
struct audio_renderer *renderer = impl_from_IMFMediaTypeHandler(iface);
- unsigned int flags;
+ DWORD flags;
HRESULT hr;
TRACE("%p, %p, %p.\n", iface, in_type, out_type);
@@ -1618,8 +1618,8 @@ static HRESULT WINAPI audio_renderer_stream_type_handler_SetCurrentMediaType(IMF
struct audio_renderer *renderer = impl_from_IMFMediaTypeHandler(iface);
const unsigned int test_flags = MF_MEDIATYPE_EQUAL_MAJOR_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_TYPES;
BOOL compare_result;
- unsigned int flags;
HRESULT hr = S_OK;
+ DWORD flags;
TRACE("%p, %p.\n", iface, media_type);
@@ -1777,11 +1777,12 @@ static HRESULT WINAPI audio_renderer_render_callback_GetParameters(IMFAsyncCallb
static void audio_renderer_render(struct audio_renderer *renderer, IMFAsyncResult *result)
{
- unsigned int src_frames, dst_frames, max_frames, pad_frames, src_len;
+ unsigned int src_frames, dst_frames, max_frames, pad_frames;
struct queued_object *obj, *obj2;
BOOL keep_sample = FALSE;
IMFMediaBuffer *buffer;
BYTE *dst, *src;
+ DWORD src_len;
HRESULT hr;
LIST_FOR_EACH_ENTRY_SAFE(obj, obj2, &renderer->queue, struct queued_object, entry)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 66009b1fff2..756ef381373 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -185,7 +185,7 @@ struct topo_node
struct
{
IMFMediaSource *source;
- unsigned int stream_id;
+ DWORD stream_id;
} source;
struct
{
@@ -197,11 +197,11 @@ struct topo_node
struct
{
struct transform_stream *inputs;
- unsigned int *input_map;
+ DWORD *input_map;
unsigned int input_count;
struct transform_stream *outputs;
- unsigned int *output_map;
+ DWORD *output_map;
unsigned int output_count;
} transform;
} u;
@@ -867,8 +867,9 @@ static void session_start(struct media_session *session, const GUID *time_format
static void session_set_started(struct media_session *session)
{
struct media_source *source;
- unsigned int caps, flags;
IMFMediaEvent *event;
+ unsigned int caps;
+ DWORD flags;
session->state = SESSION_STATE_STARTED;
@@ -1181,17 +1182,18 @@ static HRESULT session_add_media_sink(struct media_session *session, IMFTopology
return S_OK;
}
-static unsigned int transform_node_get_stream_id(struct topo_node *node, BOOL output, unsigned int index)
+static DWORD transform_node_get_stream_id(struct topo_node *node, BOOL output, unsigned int index)
{
- unsigned int *map = output ? node->u.transform.output_map : node->u.transform.input_map;
+ DWORD *map = output ? node->u.transform.output_map : node->u.transform.input_map;
return map ? map[index] : index;
}
static HRESULT session_set_transform_stream_info(struct topo_node *node)
{
- unsigned int *input_map = NULL, *output_map = NULL;
- unsigned int i, input_count, output_count, block_alignment;
+ DWORD *input_map = NULL, *output_map = NULL;
+ DWORD i, input_count, output_count;
struct transform_stream *streams;
+ unsigned int block_alignment;
IMFMediaType *media_type;
GUID major = { 0 };
HRESULT hr;
@@ -2132,7 +2134,7 @@ static HRESULT WINAPI session_commands_callback_Invoke(IMFAsyncCallback *iface,
struct media_session *session = impl_from_commands_callback_IMFAsyncCallback(iface);
struct topo_node *topo_node;
IMFTopologyNode *upstream_node;
- unsigned int upstream_output;
+ DWORD upstream_output;
EnterCriticalSection(&session->cs);
@@ -2462,8 +2464,8 @@ static void session_set_source_object_state(struct media_session *session, IUnkn
struct media_sink *sink;
enum object_state state;
struct topo_node *node;
- unsigned int i, count;
BOOL changed = FALSE;
+ DWORD i, count;
HRESULT hr;
if ((state = session_get_object_state_for_event(event_type)) == OBJ_STATE_INVALID)
@@ -2668,10 +2670,11 @@ static struct sample *transform_create_sample(IMFSample *sample)
static HRESULT transform_get_external_output_sample(const struct media_session *session, struct topo_node *transform,
unsigned int output_index, const MFT_OUTPUT_STREAM_INFO *stream_info, IMFSample **sample)
{
- unsigned int buffer_size, downstream_input;
IMFTopologyNode *downstream_node;
IMFMediaBuffer *buffer = NULL;
struct topo_node *topo_node;
+ unsigned int buffer_size;
+ DWORD downstream_input;
TOPOID node_id;
HRESULT hr;
@@ -2713,9 +2716,9 @@ static HRESULT transform_node_pull_samples(const struct media_session *session,
MFT_OUTPUT_STREAM_INFO stream_info;
MFT_OUTPUT_DATA_BUFFER *buffers;
struct sample *queued_sample;
+ HRESULT hr = E_UNEXPECTED;
DWORD status = 0;
unsigned int i;
- HRESULT hr = E_UNEXPECTED;
if (!(buffers = calloc(node->u.transform.output_count, sizeof(*buffers))))
return E_OUTOFMEMORY;
@@ -2888,7 +2891,7 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
static HRESULT session_request_sample_from_node(struct media_session *session, IMFTopologyNode *node, DWORD output)
{
IMFTopologyNode *downstream_node, *upstream_node;
- unsigned int downstream_input, upstream_output;
+ DWORD downstream_input, upstream_output;
struct topo_node *topo_node;
MF_TOPOLOGY_TYPE node_type;
struct sample *sample;
@@ -3537,8 +3540,8 @@ static HRESULT session_is_presentation_rate_supported(struct media_session *sess
struct media_source *source;
struct media_sink *sink;
float value = 0.0f, tmp;
- unsigned int flags;
HRESULT hr = S_OK;
+ DWORD flags;
if (!nearest_rate) nearest_rate = &tmp;
diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c
index f97c0cc75d3..8eb1b763e64 100644
--- a/dlls/mf/topology.c
+++ b/dlls/mf/topology.c
@@ -2381,8 +2381,9 @@ static HRESULT topology_loader_resolve_branch(struct topoloader_context *context
static HRESULT topology_loader_resolve_nodes(struct topoloader_context *context, unsigned int *layer_size)
{
IMFTopologyNode *downstream_node, *node, *orig_node;
- unsigned int input_index, size = 0;
MF_TOPOLOGY_TYPE node_type;
+ unsigned int size = 0;
+ DWORD input_index;
HRESULT hr = S_OK;
TOPOID id;
@@ -2444,7 +2445,7 @@ static BOOL topology_loader_is_node_d3d_aware(IMFTopologyNode *node)
return !!d3d_aware;
}
-static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, unsigned int upstream_output,
+static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, DWORD upstream_output,
IMFTopologyNode *downstream_node, unsigned int downstream_input, IMFTransform **copier)
{
IMFMediaType *input_type = NULL, *output_type = NULL;
@@ -2483,7 +2484,7 @@ static HRESULT topology_loader_create_copier(IMFTopologyNode *upstream_node, uns
}
static HRESULT topology_loader_connect_copier(struct topoloader_context *context, IMFTopologyNode *upstream_node,
- unsigned int upstream_output, IMFTopologyNode *downstream_node, unsigned int downstream_input, IMFTransform *copier)
+ DWORD upstream_output, IMFTopologyNode *downstream_node, DWORD downstream_input, IMFTransform *copier)
{
IMFTopologyNode *copier_node;
HRESULT hr;
@@ -2506,9 +2507,9 @@ static HRESULT topology_loader_connect_d3d_aware_input(struct topoloader_context
IMFTopologyNode *node)
{
IMFTopologyNode *upstream_node;
- unsigned int upstream_output;
- IMFStreamSink *stream_sink;
IMFTransform *copier = NULL;
+ IMFStreamSink *stream_sink;
+ DWORD upstream_output;
HRESULT hr;
if (FAILED(hr = topology_node_get_object(node, &IID_IMFStreamSink, (void **)&stream_sink)))
--
2.34.1
1
0
Feb. 3, 2022
A wine installation should not be divided across multiple prefixes,
and one shouldn't mix components from multiple installations.
winegcc should therefore select a single viable get_inc_dir
(as was with get_lib_dir) and add (only) its
${includedir}/wine/msvcrt and ${includedir}/wine/windows,
not offer gcc multiple (potentially nonexistent or unrelated)
paths to search for wine headers
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
--
e.g. for a wine built with --prefix /opt/wine-6
it's potentially the case that /usr/include/wine/* may also exist
(perhaps from a distro package), but we don't really want
winegcc adding both -I/opt/wine-6/include/windows -I/usr/include/wine/windows
get_inc_dir is identical in all winegcc/widl/wrc tools, and thus seems
like a good candidate to move into tools.h. However, its interactions
with init_argv0_dir (includedir global variable, INCLUDDIR macro, etc)
made that not really work out.
---
tools/widl/widl.c | 39 ++++++++++++++++++++++------------
tools/winegcc/winegcc.c | 47 ++++++++++++++++++++++++-----------------
tools/wrc/wrc.c | 39 ++++++++++++++++++++++------------
3 files changed, 80 insertions(+), 45 deletions(-)
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index 7686594b7d3..8150d6158e4 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -256,6 +256,29 @@ static void add_widl_version_define(void)
wpp_add_cmdline_define(version_str);
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
/* clean things up when aborting on a signal */
static void exit_on_signal( int sig )
{
@@ -733,19 +756,9 @@ int main(int argc,char *argv[])
if (stdinc)
{
- static const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
-
- if (includedir)
- {
- wpp_add_include_path( strmake( "%s/wine/msvcrt", includedir ));
- wpp_add_include_path( strmake( "%s/wine/windows", includedir ));
- }
- for (i = 0; i < ARRAY_SIZE(incl_dirs); i++)
- {
- if (i && !strcmp( incl_dirs[i], incl_dirs[0] )) continue;
- wpp_add_include_path( strmake( "%s%s/wine/msvcrt", sysroot, incl_dirs[i] ));
- wpp_add_include_path( strmake( "%s%s/wine/windows", sysroot, incl_dirs[i] ));
- }
+ const char *inc_dir = get_inc_dir(sysroot);
+ wpp_add_include_path( strmake( "%s/wine/msvcrt", inc_dir));
+ wpp_add_include_path( strmake( "%s/wine/windows", inc_dir));
}
if (pointer_size)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 8644afe7535..6e701a5c08b 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -647,6 +647,29 @@ static char *get_lib_dir( struct options *opts )
return strmake( "%s%s", root, LIBDIR );
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
static void init_argv0_dir( const char *argv0 )
{
#ifndef _WIN32
@@ -813,32 +836,18 @@ no_compat_defines:
/* standard includes come last in the include search path */
if (!opts->wine_objdir && !opts->nostdinc)
{
- const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
- const char *root = opts->isysroot ? opts->isysroot : opts->sysroot ? opts->sysroot : "";
+ const char *inc_sysroot = opts->isysroot ? opts->isysroot : opts->sysroot;
+ const char *inc_dir = get_inc_dir(inc_sysroot);
const char *isystem = gcc_defs ? "-isystem" : "-I";
const char *idirafter = gcc_defs ? "-idirafter" : "-I";
if (opts->use_msvcrt)
{
- if (includedir) strarray_add( &comp_args, strmake( "%s%s/wine/msvcrt", isystem, includedir ));
- for (j = 0; j < ARRAY_SIZE(incl_dirs); j++)
- {
- if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue;
- strarray_add(&comp_args, strmake( "%s%s%s/wine/msvcrt", isystem, root, incl_dirs[j] ));
- }
+ strarray_add(&comp_args, strmake( "%s%s/wine/msvcrt", isystem, inc_dir ));
strarray_add(&comp_args, "-D__MSVCRT__");
}
- if (includedir)
- {
- strarray_add( &comp_args, strmake( "%s%s/wine/windows", isystem, includedir ));
- strarray_add( &comp_args, strmake( "%s%s", idirafter, includedir ));
- }
- for (j = 0; j < ARRAY_SIZE(incl_dirs); j++)
- {
- if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue;
- strarray_add(&comp_args, strmake( "%s%s%s/wine/windows", isystem, root, incl_dirs[j] ));
- strarray_add(&comp_args, strmake( "%s%s%s", idirafter, root, incl_dirs[j] ));
- }
+ strarray_add(&comp_args, strmake( "%s%s/wine/windows", isystem, inc_dir ));
+ strarray_add(&comp_args, strmake( "%s%s", idirafter, inc_dir));
}
else if (opts->wine_objdir)
strarray_add(&comp_args, strmake("-I%s/include", opts->wine_objdir) );
diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c
index 41207120237..3b38629c71b 100644
--- a/tools/wrc/wrc.c
+++ b/tools/wrc/wrc.c
@@ -225,6 +225,29 @@ static void set_version_defines(void)
free( version );
}
+static const char *get_inc_dir(const char *sysroot)
+{
+ const char *stdincpath[] = { includedir, INCLUDEDIR, "/usr/include", "/usr/local/include" };
+ const char *root = sysroot ? sysroot : "";
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(stdincpath); i++)
+ {
+ const char *root = (sysroot && i) ? sysroot : "";
+ char *path;
+ struct stat statbuf;
+
+ if (!stdincpath[i]) continue;
+ path = strmake( "%s%s/%s",root, stdincpath[i], "wine");
+ if (!stat(path,&statbuf) && S_ISDIR(statbuf.st_mode))
+ {
+ return strmake( "%s%s",root,stdincpath[i]);
+ }
+ }
+
+ return strmake( "%s%s", root, INCLUDEDIR );
+}
+
/* clean things up when aborting on a signal */
static void exit_on_signal( int sig )
{
@@ -453,19 +476,9 @@ int main(int argc,char *argv[])
/* If we do need to search standard includes, add them to the path */
if (stdinc)
{
- static const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
-
- if (includedir)
- {
- wpp_add_include_path( strmake( "%s/wine/msvcrt", includedir ));
- wpp_add_include_path( strmake( "%s/wine/windows", includedir ));
- }
- for (i = 0; i < ARRAY_SIZE(incl_dirs); i++)
- {
- if (i && !strcmp( incl_dirs[i], incl_dirs[0] )) continue;
- wpp_add_include_path( strmake( "%s%s/wine/msvcrt", sysroot, incl_dirs[i] ));
- wpp_add_include_path( strmake( "%s%s/wine/windows", sysroot, incl_dirs[i] ));
- }
+ const char *inc_dir = get_inc_dir(sysroot);
+ wpp_add_include_path( strmake( "%s/wine/msvcrt", inc_dir));
+ wpp_add_include_path( strmake( "%s/wine/windows", inc_dir));
}
/* Kill io buffering when some kind of debuglevel is enabled */
--
2.34.1
2
2
Feb. 3, 2022
this breaks here
<<<< config.log
configure:13562: result: /lib/cpp
configure:13576: /lib/cpp conftest.c
In file included from /usr/include/features.h:392,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/limits.h:26,
from
/usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h:203,
from
/usr/lib/gcc/x86_64-redhat-linux/11/include/syslimits.h:7,
from
/usr/lib/gcc/x86_64-redhat-linux/11/include/limits.h:34,
from conftest.c:97:
/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is
allowed only with _FILE_OFFSET_BITS=64"
26 | # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
| ^~~~~
Module: wine
Branch: master
Commit: 2211ca9fa57640b4c19c0a6aa57fda94328c53c5
URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2211ca9fa57640b4c19c0a6a…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Wed Feb 2 13:23:21 2022 +0100
configure: Enable 64-bit time_t on Linux.
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
1
0
Revision 24b26f8bd6a49c855eec417a6585d44c9458e3ec changed FreeBSD
(and DragonFly) not to use /proc any longer. Hence we also do not
need the exe_link variable on those two platforms, either. Avoid
declaring it there.
(Spotted by GCC 12.)
Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com>
---
libs/wine/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/wine/config.c b/libs/wine/config.c
index 23c76fda128..69a783967df 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -60,7 +60,7 @@ static void fatal_error( const char *err, ... ) __attribute__((noreturn,format(
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
static const char exe_link[] = "/proc/self/exe";
-#else
+#elseif ! defined (__FreeBSD__) && ! defined(__DragonFly__)
static const char exe_link[] = "";
#endif
--
2.34.1
2
1
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/xactengine2_0/Makefile.in | 2 +-
dlls/xactengine2_4/Makefile.in | 2 +-
dlls/xactengine2_7/Makefile.in | 2 +-
dlls/xactengine2_9/Makefile.in | 2 +-
dlls/xactengine3_0/Makefile.in | 2 +-
dlls/xactengine3_1/Makefile.in | 2 +-
dlls/xactengine3_2/Makefile.in | 2 +-
dlls/xactengine3_3/Makefile.in | 2 +-
dlls/xactengine3_4/Makefile.in | 2 +-
dlls/xactengine3_5/Makefile.in | 2 +-
dlls/xactengine3_6/Makefile.in | 2 +-
dlls/xactengine3_7/Makefile.in | 2 +-
dlls/xactengine3_7/xact_dll.c | 44 +++++++++++++++++-----------------
13 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/dlls/xactengine2_0/Makefile.in b/dlls/xactengine2_0/Makefile.in
index 1fe077c95a3..5c4b635b060 100644
--- a/dlls/xactengine2_0/Makefile.in
+++ b/dlls/xactengine2_0/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine2_0.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0200
+EXTRADEFS = -DXACT3_VER=0x0200
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine2_4/Makefile.in b/dlls/xactengine2_4/Makefile.in
index 78e78146311..2b5fd547b61 100644
--- a/dlls/xactengine2_4/Makefile.in
+++ b/dlls/xactengine2_4/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine2_4.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0204
+EXTRADEFS = -DXACT3_VER=0x0204
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine2_7/Makefile.in b/dlls/xactengine2_7/Makefile.in
index 445ba17f6ae..6861555b23b 100644
--- a/dlls/xactengine2_7/Makefile.in
+++ b/dlls/xactengine2_7/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine2_7.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0207
+EXTRADEFS = -DXACT3_VER=0x0207
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine2_9/Makefile.in b/dlls/xactengine2_9/Makefile.in
index 0f8e137ffba..e5f8c83e962 100644
--- a/dlls/xactengine2_9/Makefile.in
+++ b/dlls/xactengine2_9/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine2_9.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0209
+EXTRADEFS = -DXACT3_VER=0x0209
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_0/Makefile.in b/dlls/xactengine3_0/Makefile.in
index 60673ff8101..10259e44ee0 100644
--- a/dlls/xactengine3_0/Makefile.in
+++ b/dlls/xactengine3_0/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_0.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0300
+EXTRADEFS = -DXACT3_VER=0x0300
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_1/Makefile.in b/dlls/xactengine3_1/Makefile.in
index f812bea5c9b..3105c3443bd 100644
--- a/dlls/xactengine3_1/Makefile.in
+++ b/dlls/xactengine3_1/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_1.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0301
+EXTRADEFS = -DXACT3_VER=0x0301
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_2/Makefile.in b/dlls/xactengine3_2/Makefile.in
index bde069efe30..92481ba1e26 100644
--- a/dlls/xactengine3_2/Makefile.in
+++ b/dlls/xactengine3_2/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_2.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0302
+EXTRADEFS = -DXACT3_VER=0x0302
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_3/Makefile.in b/dlls/xactengine3_3/Makefile.in
index 1bdfc72b1b7..1963f033557 100644
--- a/dlls/xactengine3_3/Makefile.in
+++ b/dlls/xactengine3_3/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_3.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0303
+EXTRADEFS = -DXACT3_VER=0x0303
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_4/Makefile.in b/dlls/xactengine3_4/Makefile.in
index 5987dc0df78..5d639c4e7ad 100644
--- a/dlls/xactengine3_4/Makefile.in
+++ b/dlls/xactengine3_4/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_4.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0304
+EXTRADEFS = -DXACT3_VER=0x0304
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_5/Makefile.in b/dlls/xactengine3_5/Makefile.in
index 5a95ceb9e30..47731dd7017 100644
--- a/dlls/xactengine3_5/Makefile.in
+++ b/dlls/xactengine3_5/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_5.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0305
+EXTRADEFS = -DXACT3_VER=0x0305
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_6/Makefile.in b/dlls/xactengine3_6/Makefile.in
index dfca6ac31d4..b0e235ecd08 100644
--- a/dlls/xactengine3_6/Makefile.in
+++ b/dlls/xactengine3_6/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_6.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0306
+EXTRADEFS = -DXACT3_VER=0x0306
PARENTSRC = ../xactengine3_7
C_SRCS = \
diff --git a/dlls/xactengine3_7/Makefile.in b/dlls/xactengine3_7/Makefile.in
index 18ef2a683e8..128a41cf59a 100644
--- a/dlls/xactengine3_7/Makefile.in
+++ b/dlls/xactengine3_7/Makefile.in
@@ -1,7 +1,7 @@
MODULE = xactengine3_7.dll
IMPORTS = $(FAUDIO_PE_LIBS) ole32 uuid
EXTRAINCL = $(FAUDIO_PE_CFLAGS)
-EXTRADEFS = -DWINE_NO_LONG_TYPES -DXACT3_VER=0x0307
+EXTRADEFS = -DXACT3_VER=0x0307
C_SRCS = \
xact_dll.c
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index 18608037ffb..98c3cf8f076 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -75,7 +75,7 @@ static HRESULT WINAPI IXACT3CueImpl_Stop(IXACT3Cue *iface, DWORD dwFlags)
{
XACT3CueImpl *This = impl_from_IXACT3Cue(iface);
- TRACE("(%p)->(%u)\n", iface, dwFlags);
+ TRACE("(%p)->(%lu)\n", iface, dwFlags);
return FACTCue_Stop(This->fact_cue, dwFlags);
}
@@ -86,7 +86,7 @@ static HRESULT WINAPI IXACT3CueImpl_GetState(IXACT3Cue *iface, DWORD *pdwState)
TRACE("(%p)->(%p)\n", iface, pdwState);
- return FACTCue_GetState(This->fact_cue, pdwState);
+ return FACTCue_GetState(This->fact_cue, (uint32_t *)pdwState);
}
static HRESULT WINAPI IXACT3CueImpl_Destroy(IXACT3Cue *iface)
@@ -108,7 +108,7 @@ static HRESULT WINAPI IXACT3CueImpl_Destroy(IXACT3Cue *iface)
static HRESULT WINAPI IXACT3CueImpl_GetChannelMap(IXACT3Cue *iface,
XACTCHANNELMAP *map, DWORD size, DWORD *needed_size)
{
- FIXME("(%p)->(%p, %u, %p)\n", iface, map, size, needed_size);
+ FIXME("(%p)->(%p, %lu, %p)\n", iface, map, size, needed_size);
return E_NOTIMPL;
}
@@ -306,7 +306,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Prepare(IXACT3SoundBank *iface,
FACTCue *fcue;
UINT ret;
- TRACE("(%p)->(%u, 0x%x, %u, %p)\n", This, nCueIndex, dwFlags, timeOffset,
+ TRACE("(%p)->(%u, 0x%lx, %lu, %p)\n", This, nCueIndex, dwFlags, timeOffset,
ppCue);
ret = FACTSoundBank_Prepare(This->fact_soundbank, nCueIndex, dwFlags,
@@ -343,7 +343,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Play(IXACT3SoundBank *iface,
FACTCue *fcue;
HRESULT hr;
- TRACE("(%p)->(%u, 0x%x, %u, %p)\n", This, nCueIndex, dwFlags, timeOffset,
+ TRACE("(%p)->(%u, 0x%lx, %lu, %p)\n", This, nCueIndex, dwFlags, timeOffset,
ppCue);
/* If the application doesn't want a handle, don't generate one at all.
@@ -380,7 +380,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_Stop(IXACT3SoundBank *iface,
{
XACT3SoundBankImpl *This = impl_from_IXACT3SoundBank(iface);
- TRACE("(%p)->(%u)\n", This, dwFlags);
+ TRACE("(%p)->(%lu)\n", This, dwFlags);
return FACTSoundBank_Stop(This->fact_soundbank, nCueIndex, dwFlags);
}
@@ -404,7 +404,7 @@ static HRESULT WINAPI IXACT3SoundBankImpl_GetState(IXACT3SoundBank *iface,
TRACE("(%p)->(%p)\n", This, pdwState);
- return FACTSoundBank_GetState(This->fact_soundbank, pdwState);
+ return FACTSoundBank_GetState(This->fact_soundbank, (uint32_t *)pdwState);
}
static const IXACT3SoundBankVtbl XACT3SoundBank_Vtbl =
@@ -459,7 +459,7 @@ static HRESULT WINAPI IXACT3WaveImpl_Stop(IXACT3Wave *iface, DWORD dwFlags)
{
XACT3WaveImpl *This = impl_from_IXACT3Wave(iface);
- TRACE("(%p)->(0x%x)\n", This, dwFlags);
+ TRACE("(%p)->(0x%lx)\n", This, dwFlags);
return FACTWave_Stop(This->fact_wave, dwFlags);
}
@@ -479,7 +479,7 @@ static HRESULT WINAPI IXACT3WaveImpl_GetState(IXACT3Wave *iface, DWORD *pdwState
TRACE("(%p)->(%p)\n", This, pdwState);
- return FACTWave_GetState(This->fact_wave, pdwState);
+ return FACTWave_GetState(This->fact_wave, (uint32_t *)pdwState);
}
static HRESULT WINAPI IXACT3WaveImpl_SetPitch(IXACT3Wave *iface, XACTPITCH pitch)
@@ -604,7 +604,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Prepare(IXACT3WaveBank *iface,
FACTWave *fwave;
UINT ret;
- TRACE("(%p)->(0x%x, %u, 0x%x, %u, %p)\n", This, nWaveIndex, dwFlags,
+ TRACE("(%p)->(0x%x, %lu, 0x%lx, %u, %p)\n", This, nWaveIndex, dwFlags,
dwPlayOffset, nLoopCount, ppWave);
ret = FACTWaveBank_Prepare(This->fact_wavebank, nWaveIndex, dwFlags,
@@ -641,7 +641,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Play(IXACT3WaveBank *iface,
FACTWave *fwave;
HRESULT hr;
- TRACE("(%p)->(0x%x, %u, 0x%x, %u, %p)\n", This, nWaveIndex, dwFlags, dwPlayOffset,
+ TRACE("(%p)->(0x%x, %lu, 0x%lx, %u, %p)\n", This, nWaveIndex, dwFlags, dwPlayOffset,
nLoopCount, ppWave);
/* If the application doesn't want a handle, don't generate one at all.
@@ -678,7 +678,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_Stop(IXACT3WaveBank *iface,
{
XACT3WaveBankImpl *This = impl_from_IXACT3WaveBank(iface);
- TRACE("(%p)->(%u, %u)\n", This, nWaveIndex, dwFlags);
+ TRACE("(%p)->(%u, %lu)\n", This, nWaveIndex, dwFlags);
return FACTWaveBank_Stop(This->fact_wavebank, nWaveIndex, dwFlags);
}
@@ -692,7 +692,7 @@ static HRESULT WINAPI IXACT3WaveBankImpl_GetState(IXACT3WaveBank *iface,
TRACE("(%p)->(%p)\n", This, pdwState);
- return FACTWaveBank_GetState(This->fact_wavebank, pdwState);
+ return FACTWaveBank_GetState(This->fact_wavebank, (uint32_t *)pdwState);
}
static const IXACT3WaveBankVtbl XACT3WaveBank_Vtbl =
@@ -733,7 +733,7 @@ static int32_t FACTCALL wrap_readfile(
{
wrap_readfile_struct *wrap = (wrap_readfile_struct*) hFile;
return wrap->engine->pReadFile(wrap->file, lpBuffer, nNumberOfBytesRead,
- lpNumberOfBytesRead, (LPOVERLAPPED)lpOverlapped);
+ (DWORD *)lpNumberOfBytesRead, (LPOVERLAPPED)lpOverlapped);
}
static int32_t FACTCALL wrap_getoverlappedresult(
@@ -744,7 +744,7 @@ static int32_t FACTCALL wrap_getoverlappedresult(
{
wrap_readfile_struct *wrap = (wrap_readfile_struct*) hFile;
return wrap->engine->pGetOverlappedResult(wrap->file, (LPOVERLAPPED)lpOverlapped,
- lpNumberOfBytesTransferred, bWait);
+ (DWORD *)lpNumberOfBytesTransferred, bWait);
}
static inline XACT3EngineImpl *impl_from_IXACT3Engine(IXACT3Engine *iface)
@@ -780,7 +780,7 @@ static ULONG WINAPI IXACT3EngineImpl_AddRef(IXACT3Engine *iface)
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
ULONG ref = FACTAudioEngine_AddRef(This->fact_engine);
- TRACE("(%p)->(): Refcount now %u\n", This, ref);
+ TRACE("(%p)->(): Refcount now %lu\n", This, ref);
return ref;
}
@@ -789,7 +789,7 @@ static ULONG WINAPI IXACT3EngineImpl_Release(IXACT3Engine *iface)
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
ULONG ref = FACTAudioEngine_Release(This->fact_engine);
- TRACE("(%p)->(): Refcount now %u\n", This, ref);
+ TRACE("(%p)->(): Refcount now %lu\n", This, ref);
if (!ref)
HeapFree(GetProcessHeap(), 0, This);
@@ -936,7 +936,7 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateSoundBank(IXACT3Engine *iface,
FACTSoundBank *fsb;
UINT ret;
- TRACE("(%p)->(%p, %u, 0x%x, 0x%x, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
+ TRACE("(%p)->(%p, %lu, 0x%lx, 0x%lx, %p): stub!\n", This, pvBuffer, dwSize, dwFlags,
dwAllocAttributes, ppSoundBank);
ret = FACTAudioEngine_CreateSoundBank(This->fact_engine, pvBuffer, dwSize,
@@ -973,7 +973,7 @@ static HRESULT WINAPI IXACT3EngineImpl_CreateInMemoryWaveBank(IXACT3Engine *ifac
FACTWaveBank *fwb;
UINT ret;
- TRACE("(%p)->(%p, %u, 0x%x, 0x%x, %p)\n", This, pvBuffer, dwSize, dwFlags,
+ TRACE("(%p)->(%p, %lu, 0x%lx, 0x%lx, %p)\n", This, pvBuffer, dwSize, dwFlags,
dwAllocAttributes, ppWaveBank);
ret = FACTAudioEngine_CreateInMemoryWaveBank(This->fact_engine, pvBuffer,
@@ -1082,7 +1082,7 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareWave(IXACT3Engine *iface,
FACTWave *fwave = NULL;
UINT ret;
- TRACE("(%p)->(0x%08x, %s, %d, %d, %d, %d, %p)\n", This, dwFlags, debugstr_a(szWavePath),
+ TRACE("(%p)->(0x%08lx, %s, %d, %ld, %ld, %d, %p)\n", This, dwFlags, debugstr_a(szWavePath),
wStreamingPacketSize, dwAlignment, dwPlayOffset, nLoopCount, ppWave);
ret = FACTAudioEngine_PrepareWave(This->fact_engine, dwFlags, szWavePath, wStreamingPacketSize,
@@ -1278,7 +1278,7 @@ static HRESULT WINAPI IXACT3EngineImpl_Stop(IXACT3Engine *iface,
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
- TRACE("(%p)->(%u, 0x%x)\n", This, nCategory, dwFlags);
+ TRACE("(%p)->(%u, 0x%lx)\n", This, nCategory, dwFlags);
return FACTAudioEngine_Stop(This->fact_engine, nCategory, dwFlags);
}
@@ -1460,7 +1460,7 @@ static IClassFactory XACTFactory = { &XACT3CF_Vtbl };
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved)
{
- TRACE("(%p, %d, %p)\n", hinstDLL, reason, pReserved);
+ TRACE("(%p, %ld, %p)\n", hinstDLL, reason, pReserved);
switch (reason)
{
--
2.34.1
2
1
[PATCH 1/6] winegstreamer: Stub implement WMA decoder DMO / MF transform.
by Rémi Bernon Feb. 2, 2022
by Rémi Bernon Feb. 2, 2022
Feb. 2, 2022
Final Fantasy XIV intro videos require media_object_GetStreamCount and
property_bag_Write to return S_OK in order to not get stuck. This could
be done in a separate commit but would cause a temporary regression.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51931
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52391
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/mf/tests/mf.c | 1 -
dlls/winegstreamer/Makefile.in | 5 +-
dlls/winegstreamer/gst_private.h | 1 +
dlls/winegstreamer/main.c | 26 +
dlls/winegstreamer/mfplat.c | 28 +-
dlls/winegstreamer/quartz_parser.c | 2 +-
dlls/winegstreamer/winegstreamer_classes.idl | 6 +
dlls/winegstreamer/wma_decoder.c | 553 +++++++++++++++++++
dlls/wmadmod/tests/wmadmod.c | 5 -
9 files changed, 617 insertions(+), 10 deletions(-)
create mode 100644 dlls/winegstreamer/wma_decoder.c
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 8ba93656a7d..0bf81e0c878 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -5743,7 +5743,6 @@ static void test_wma_decoder(void)
&transform, &class_id))
goto failed;
- todo_wine
check_interface(transform, &IID_IMediaObject, TRUE);
/* check default media types */
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
index 062fe57bdbb..1706effbd20 100644
--- a/dlls/winegstreamer/Makefile.in
+++ b/dlls/winegstreamer/Makefile.in
@@ -2,7 +2,7 @@ EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = winegstreamer.dll
UNIXLIB = winegstreamer.so
IMPORTLIB = winegstreamer
-IMPORTS = strmbase ole32
+IMPORTS = strmbase ole32 msdmo
DELAYIMPORTS = mfplat
EXTRAINCL = $(GSTREAMER_CFLAGS)
EXTRALIBS = $(GSTREAMER_LIBS) $(PTHREAD_LIBS)
@@ -16,7 +16,8 @@ C_SRCS = \
wg_parser.c \
wm_asyncreader.c \
wm_reader.c \
- wm_syncreader.c
+ wm_syncreader.c \
+ wma_decoder.c
IDL_SRCS = \
winegstreamer_classes.idl
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
index 9e1d67417d4..222bce3b2c7 100644
--- a/dlls/winegstreamer/gst_private.h
+++ b/dlls/winegstreamer/gst_private.h
@@ -102,6 +102,7 @@ HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT wave_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
+HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool wm);
bool amt_to_wg_format(const AM_MEDIA_TYPE *mt, struct wg_format *format);
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
index ac9a3201792..260dd208e2f 100644
--- a/dlls/winegstreamer/main.c
+++ b/dlls/winegstreamer/main.c
@@ -25,7 +25,9 @@
#include "gst_private.h"
#include "winternl.h"
#include "rpcproxy.h"
+#include "dmoreg.h"
#include "gst_guids.h"
+#include "wmcodecdsp.h"
static unixlib_handle_t unix_handle;
@@ -339,6 +341,7 @@ static struct class_factory avi_splitter_cf = {{&class_factory_vtbl}, avi_splitt
static struct class_factory decodebin_parser_cf = {{&class_factory_vtbl}, decodebin_parser_create};
static struct class_factory mpeg_splitter_cf = {{&class_factory_vtbl}, mpeg_splitter_create};
static struct class_factory wave_parser_cf = {{&class_factory_vtbl}, wave_parser_create};
+static struct class_factory wma_decoder_cf = {{&class_factory_vtbl}, wma_decoder_create};
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
{
@@ -361,6 +364,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
factory = &mpeg_splitter_cf;
else if (IsEqualGUID(clsid, &CLSID_WAVEParser))
factory = &wave_parser_cf;
+ else if (IsEqualGUID(clsid, &CLSID_WMADecMediaObject))
+ factory = &wma_decoder_cf;
else
{
FIXME("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(clsid));
@@ -522,6 +527,19 @@ static const REGFILTER2 reg_decodebin_parser =
HRESULT WINAPI DllRegisterServer(void)
{
+ DMO_PARTIAL_MEDIATYPE wma_decoder_output[2] =
+ {
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_PCM},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_IEEE_FLOAT},
+ };
+ DMO_PARTIAL_MEDIATYPE wma_decoder_input[4] =
+ {
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_MSAUDIO1},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO2},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO3},
+ {.type = MEDIATYPE_Audio, .subtype = MEDIASUBTYPE_WMAUDIO_LOSSLESS},
+ };
+
IFilterMapper2 *mapper;
HRESULT hr;
@@ -543,6 +561,10 @@ HRESULT WINAPI DllRegisterServer(void)
IFilterMapper2_Release(mapper);
+ if (FAILED(hr = DMORegister(L"WMA Decoder DMO", &CLSID_WMADecMediaObject, &DMOCATEGORY_AUDIO_DECODER,
+ 0, ARRAY_SIZE(wma_decoder_input), wma_decoder_input, ARRAY_SIZE(wma_decoder_output), wma_decoder_output)))
+ return hr;
+
return mfplat_DllRegisterServer();
}
@@ -566,5 +588,9 @@ HRESULT WINAPI DllUnregisterServer(void)
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser);
IFilterMapper2_Release(mapper);
+
+ if (FAILED(hr = DMOUnregister(&CLSID_WMADecMediaObject, &DMOCATEGORY_AUDIO_DECODER)))
+ return hr;
+
return S_OK;
}
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
index 5404728ba83..6a58f444204 100644
--- a/dlls/winegstreamer/mfplat.c
+++ b/dlls/winegstreamer/mfplat.c
@@ -21,6 +21,7 @@
#include "ks.h"
#include "ksmedia.h"
+#include "wmcodecdsp.h"
#include "initguid.h"
#include "mfapi.h"
@@ -442,6 +443,20 @@ static const GUID *audio_converter_supported_types[] =
&MFAudioFormat_Float,
};
+static WCHAR wma_decoderW[] = L"WMAudio Decoder MFT";
+static const GUID *wma_decoder_input_types[] =
+{
+ &MEDIASUBTYPE_MSAUDIO1,
+ &MFAudioFormat_WMAudioV8,
+ &MFAudioFormat_WMAudioV9,
+ &MFAudioFormat_WMAudio_Lossless,
+};
+static const GUID *wma_decoder_output_types[] =
+{
+ &MFAudioFormat_PCM,
+ &MFAudioFormat_Float,
+};
+
static const struct mft
{
const GUID *clsid;
@@ -467,13 +482,24 @@ mfts[] =
ARRAY_SIZE(audio_converter_supported_types),
audio_converter_supported_types,
},
+ {
+ &CLSID_WMADecMediaObject,
+ &MFT_CATEGORY_AUDIO_DECODER,
+ wma_decoderW,
+ MFT_ENUM_FLAG_SYNCMFT,
+ &MFMediaType_Audio,
+ ARRAY_SIZE(wma_decoder_input_types),
+ wma_decoder_input_types,
+ ARRAY_SIZE(wma_decoder_output_types),
+ wma_decoder_output_types,
+ },
};
HRESULT mfplat_DllRegisterServer(void)
{
unsigned int i, j;
HRESULT hr;
- MFT_REGISTER_TYPE_INFO input_types[2], output_types[2];
+ MFT_REGISTER_TYPE_INFO input_types[4], output_types[2];
for (i = 0; i < ARRAY_SIZE(mfts); i++)
{
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
index 8532fc1af8b..e8d56d54785 100644
--- a/dlls/winegstreamer/quartz_parser.c
+++ b/dlls/winegstreamer/quartz_parser.c
@@ -29,8 +29,8 @@
#include "dvdmedia.h"
#include "mmreg.h"
#include "ks.h"
-#include "initguid.h"
#include "wmcodecdsp.h"
+#include "initguid.h"
#include "ksmedia.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl
index 072ec90eea4..90dc1dc839b 100644
--- a/dlls/winegstreamer/winegstreamer_classes.idl
+++ b/dlls/winegstreamer/winegstreamer_classes.idl
@@ -67,3 +67,9 @@ coclass GStreamerByteStreamHandler {}
uuid(6a170414-aad9-4693-b806-3a0c47c570d6)
]
coclass WINEAudioConverter { }
+
+[
+ threading(both),
+ uuid(2eeb4adf-4578-4d10-bca7-bb955f56320a)
+]
+coclass CWMADecMediaObject {};
diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c
new file mode 100644
index 00000000000..f034c34395e
--- /dev/null
+++ b/dlls/winegstreamer/wma_decoder.c
@@ -0,0 +1,553 @@
+/* WMA Decoder DMO / MF Transform
+ *
+ * Copyright 2022 Rémi Bernon for CodeWeavers
+ *
+ * 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 "gst_private.h"
+
+#include "mfapi.h"
+#include "mferror.h"
+#include "mfobjects.h"
+#include "mftransform.h"
+#include "wmcodecdsp.h"
+
+#include "wine/debug.h"
+#include "wine/heap.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wmadec);
+
+struct wma_decoder
+{
+ IUnknown IUnknown_inner;
+ IMFTransform IMFTransform_iface;
+ IMediaObject IMediaObject_iface;
+ IPropertyBag IPropertyBag_iface;
+ IUnknown *outer;
+ LONG refcount;
+};
+
+static inline struct wma_decoder *impl_from_IUnknown(IUnknown *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IUnknown_inner);
+}
+
+static HRESULT WINAPI unknown_QueryInterface(IUnknown *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *decoder = impl_from_IUnknown(iface);
+
+ TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
+
+ if (IsEqualGUID(iid, &IID_IUnknown))
+ *out = &decoder->IUnknown_inner;
+ else if (IsEqualGUID(iid, &IID_IMFTransform))
+ *out = &decoder->IMFTransform_iface;
+ else if (IsEqualGUID(iid, &IID_IMediaObject))
+ *out = &decoder->IMediaObject_iface;
+ else if (IsEqualIID(iid, &IID_IPropertyBag))
+ *out = &decoder->IPropertyBag_iface;
+ else
+ {
+ *out = NULL;
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ return E_NOINTERFACE;
+ }
+
+ IUnknown_AddRef((IUnknown *)*out);
+ return S_OK;
+}
+
+static ULONG WINAPI unknown_AddRef(IUnknown *iface)
+{
+ struct wma_decoder *decoder = impl_from_IUnknown(iface);
+ ULONG refcount = InterlockedIncrement(&decoder->refcount);
+
+ TRACE("iface %p increasing refcount to %u.\n", decoder, refcount);
+
+ return refcount;
+}
+
+static ULONG WINAPI unknown_Release(IUnknown *iface)
+{
+ struct wma_decoder *decoder = impl_from_IUnknown(iface);
+ ULONG refcount = InterlockedDecrement(&decoder->refcount);
+
+ TRACE("iface %p decreasing refcount to %u.\n", decoder, refcount);
+
+ if (!refcount)
+ free(decoder);
+
+ return refcount;
+}
+
+static const IUnknownVtbl unknown_vtbl =
+{
+ unknown_QueryInterface,
+ unknown_AddRef,
+ unknown_Release,
+};
+
+static struct wma_decoder *impl_from_IMFTransform(IMFTransform *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IMFTransform_iface);
+}
+
+static HRESULT WINAPI transform_QueryInterface(IMFTransform *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_QueryInterface(decoder->outer, iid, out);
+}
+
+static ULONG WINAPI transform_AddRef(IMFTransform *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_AddRef(decoder->outer);
+}
+
+static ULONG WINAPI transform_Release(IMFTransform *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMFTransform(iface);
+ return IUnknown_Release(decoder->outer);
+}
+
+static HRESULT WINAPI transform_GetStreamLimits(IMFTransform *iface, DWORD *input_minimum,
+ DWORD *input_maximum, DWORD *output_minimum, DWORD *output_maximum)
+{
+ FIXME("iface %p, input_minimum %p, input_maximum %p, output_minimum %p, output_maximum %p stub!\n",
+ iface, input_minimum, input_maximum, output_minimum, output_maximum);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetStreamCount(IMFTransform *iface, DWORD *inputs, DWORD *outputs)
+{
+ FIXME("iface %p, inputs %p, outputs %p stub!\n", iface, inputs, outputs);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs,
+ DWORD output_size, DWORD *outputs)
+{
+ FIXME("iface %p, input_size %u, inputs %p, output_size %u, outputs %p stub!\n", iface,
+ input_size, inputs, output_size, outputs);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
+{
+ FIXME("iface %p, id %u, info %p stub!\n", iface, id, info);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)
+{
+ FIXME("iface %p, id %u, info %p stub!\n", iface, id, info);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetAttributes(IMFTransform *iface, IMFAttributes **attributes)
+{
+ FIXME("iface %p, attributes %p stub!\n", iface, attributes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
+{
+ FIXME("iface %p, id %u, attributes %p stub!\n", iface, id, attributes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes)
+{
+ FIXME("iface %p, id %u, attributes %p stub!\n", iface, id, attributes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_DeleteInputStream(IMFTransform *iface, DWORD id)
+{
+ FIXME("iface %p, id %u stub!\n", iface, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids)
+{
+ FIXME("iface %p, streams %u, ids %p stub!\n", iface, streams, ids);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
+ IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, index %u, type %p stub!\n", iface, id, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index,
+ IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, index %u, type %p stub!\n", iface, id, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
+{
+ FIXME("iface %p, id %u, type %p, flags %#x stub!\n", iface, id, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags)
+{
+ FIXME("iface %p, id %u, type %p, flags %#x stub!\n", iface, id, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, type %p stub!\n", iface, id, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
+{
+ FIXME("iface %p, id %u, type %p stub!\n", iface, id, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
+{
+ FIXME("iface %p, id %u, flags %p stub!\n", iface, id, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_GetOutputStatus(IMFTransform *iface, DWORD *flags)
+{
+ FIXME("iface %p, flags %p stub!\n", iface, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper)
+{
+ FIXME("iface %p, lower %s, upper %s stub!\n", iface, wine_dbgstr_longlong(lower),
+ wine_dbgstr_longlong(upper));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event)
+{
+ FIXME("iface %p, id %u, event %p stub!\n", iface, id, event);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param)
+{
+ FIXME("iface %p, message %#x, param %p stub!\n", iface, message, (void *)param);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags)
+{
+ FIXME("iface %p, id %u, sample %p, flags %#x stub!\n", iface, id, sample, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count,
+ MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status)
+{
+ FIXME("iface %p, flags %#x, count %u, samples %p, status %p stub!\n", iface, flags, count, samples, status);
+ return E_NOTIMPL;
+}
+
+static const IMFTransformVtbl transform_vtbl =
+{
+ transform_QueryInterface,
+ transform_AddRef,
+ transform_Release,
+ transform_GetStreamLimits,
+ transform_GetStreamCount,
+ transform_GetStreamIDs,
+ transform_GetInputStreamInfo,
+ transform_GetOutputStreamInfo,
+ transform_GetAttributes,
+ transform_GetInputStreamAttributes,
+ transform_GetOutputStreamAttributes,
+ transform_DeleteInputStream,
+ transform_AddInputStreams,
+ transform_GetInputAvailableType,
+ transform_GetOutputAvailableType,
+ transform_SetInputType,
+ transform_SetOutputType,
+ transform_GetInputCurrentType,
+ transform_GetOutputCurrentType,
+ transform_GetInputStatus,
+ transform_GetOutputStatus,
+ transform_SetOutputBounds,
+ transform_ProcessEvent,
+ transform_ProcessMessage,
+ transform_ProcessInput,
+ transform_ProcessOutput,
+};
+
+static inline struct wma_decoder *impl_from_IMediaObject(IMediaObject *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IMediaObject_iface);
+}
+
+static HRESULT WINAPI media_object_QueryInterface(IMediaObject *iface, REFIID iid, void **obj)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_QueryInterface(decoder->outer, iid, obj);
+}
+
+static ULONG WINAPI media_object_AddRef(IMediaObject *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_AddRef(decoder->outer);
+}
+
+static ULONG WINAPI media_object_Release(IMediaObject *iface)
+{
+ struct wma_decoder *decoder = impl_from_IMediaObject(iface);
+ return IUnknown_Release(decoder->outer);
+}
+
+static HRESULT WINAPI media_object_GetStreamCount(IMediaObject *iface, DWORD *input, DWORD *output)
+{
+ FIXME("iface %p, input %p, output %p semi-stub!\n", iface, input, output);
+ *input = *output = 1;
+ return S_OK;
+}
+
+static HRESULT WINAPI media_object_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
+{
+ FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
+{
+ FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputType(IMediaObject *iface, DWORD index, DWORD type_index,
+ DMO_MEDIA_TYPE *type)
+{
+ FIXME("iface %p, index %u, type_index %u, type %p stub!\n", iface, index, type_index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetOutputType(IMediaObject *iface, DWORD index, DWORD type_index,
+ DMO_MEDIA_TYPE *type)
+{
+ FIXME("iface %p, index %u, type_index %u, type %p stub!\n", iface, index, type_index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_SetInputType(IMediaObject *iface, DWORD index,
+ const DMO_MEDIA_TYPE *type, DWORD flags)
+{
+ FIXME("iface %p, index %u, type %p, flags %#x stub!\n", iface, index, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_SetOutputType(IMediaObject *iface, DWORD index,
+ const DMO_MEDIA_TYPE *type, DWORD flags)
+{
+ FIXME("iface %p, index %u, type %p, flags %#x stub!\n", iface, index, type, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type)
+{
+ FIXME("iface %p, index %u, type %p stub!\n", iface, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *type)
+{
+ FIXME("iface %p, index %u, type %p stub!\n", iface, index, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size,
+ DWORD *lookahead, DWORD *alignment)
+{
+ FIXME("iface %p, index %u, size %p, lookahead %p, alignment %p stub!\n", iface, index, size,
+ lookahead, alignment);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
+{
+ FIXME("iface %p, index %u, size %p, alignment %p stub!\n", iface, index, size, alignment);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
+{
+ FIXME("iface %p, index %u, latency %p stub!\n", iface, index, latency);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
+{
+ FIXME("iface %p, index %u, latency %s stub!\n", iface, index, wine_dbgstr_longlong(latency));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Flush(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Discontinuity(IMediaObject *iface, DWORD index)
+{
+ FIXME("iface %p, index %u stub!\n", iface, index);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_AllocateStreamingResources(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_FreeStreamingResources(IMediaObject *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
+{
+ FIXME("iface %p, index %u, flags %p stub!\n", iface, index, flags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_ProcessInput(IMediaObject *iface, DWORD index,
+ IMediaBuffer *buffer, DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME timelength)
+{
+ FIXME("iface %p, index %u, buffer %p, flags %#x, timestamp %s, timelength %s stub!\n", iface,
+ index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(timelength));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
+ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
+{
+ FIXME("iface %p, flags %#x, count %u, buffers %p, status %p stub!\n", iface, flags, count, buffers, status);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI media_object_Lock(IMediaObject *iface, LONG lock)
+{
+ FIXME("iface %p, lock %d stub!\n", iface, lock);
+ return E_NOTIMPL;
+}
+
+static const IMediaObjectVtbl media_object_vtbl =
+{
+ media_object_QueryInterface,
+ media_object_AddRef,
+ media_object_Release,
+ media_object_GetStreamCount,
+ media_object_GetInputStreamInfo,
+ media_object_GetOutputStreamInfo,
+ media_object_GetInputType,
+ media_object_GetOutputType,
+ media_object_SetInputType,
+ media_object_SetOutputType,
+ media_object_GetInputCurrentType,
+ media_object_GetOutputCurrentType,
+ media_object_GetInputSizeInfo,
+ media_object_GetOutputSizeInfo,
+ media_object_GetInputMaxLatency,
+ media_object_SetInputMaxLatency,
+ media_object_Flush,
+ media_object_Discontinuity,
+ media_object_AllocateStreamingResources,
+ media_object_FreeStreamingResources,
+ media_object_GetInputStatus,
+ media_object_ProcessInput,
+ media_object_ProcessOutput,
+ media_object_Lock,
+};
+
+static inline struct wma_decoder *impl_from_IPropertyBag(IPropertyBag *iface)
+{
+ return CONTAINING_RECORD(iface, struct wma_decoder, IPropertyBag_iface);
+}
+
+static HRESULT WINAPI property_bag_QueryInterface(IPropertyBag *iface, REFIID iid, void **out)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_QueryInterface(filter->outer, iid, out);
+}
+
+static ULONG WINAPI property_bag_AddRef(IPropertyBag *iface)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_AddRef(filter->outer);
+}
+
+static ULONG WINAPI property_bag_Release(IPropertyBag *iface)
+{
+ struct wma_decoder *filter = impl_from_IPropertyBag(iface);
+ return IUnknown_Release(filter->outer);
+}
+
+static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, const WCHAR *prop_name, VARIANT *value,
+ IErrorLog *error_log)
+{
+ FIXME("iface %p, prop_name %s, value %p, error_log %p stub!\n", iface, debugstr_w(prop_name), value, error_log);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI property_bag_Write(IPropertyBag *iface, const WCHAR *prop_name, VARIANT *value)
+{
+ FIXME("iface %p, prop_name %s, value %p stub!\n", iface, debugstr_w(prop_name), value);
+ return S_OK;
+}
+
+static const IPropertyBagVtbl property_bag_vtbl =
+{
+ property_bag_QueryInterface,
+ property_bag_AddRef,
+ property_bag_Release,
+ property_bag_Read,
+ property_bag_Write,
+};
+
+HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out)
+{
+ struct wma_decoder *decoder;
+
+ TRACE("outer %p, out %p.\n", outer, out);
+
+ if (!(decoder = calloc(1, sizeof(*decoder))))
+ return E_OUTOFMEMORY;
+
+ decoder->IUnknown_inner.lpVtbl = &unknown_vtbl;
+ decoder->IMFTransform_iface.lpVtbl = &transform_vtbl;
+ decoder->IMediaObject_iface.lpVtbl = &media_object_vtbl;
+ decoder->IPropertyBag_iface.lpVtbl = &property_bag_vtbl;
+ decoder->refcount = 1;
+ decoder->outer = outer ? outer : &decoder->IUnknown_inner;
+
+ *out = &decoder->IUnknown_inner;
+ TRACE("Created decoder %p\n", *out);
+ return S_OK;
+}
diff --git a/dlls/wmadmod/tests/wmadmod.c b/dlls/wmadmod/tests/wmadmod.c
index e95e297eaca..b49b609dac3 100644
--- a/dlls/wmadmod/tests/wmadmod.c
+++ b/dlls/wmadmod/tests/wmadmod.c
@@ -52,11 +52,8 @@ static void test_DMOGetTypes(void)
hr = DMOGetTypes( &CLSID_CWMADecMediaObject, ARRAY_SIZE(input), &input_count, input,
ARRAY_SIZE(output), &output_count, output );
- todo_wine
ok( hr == S_OK, "DMOGetTypes returned %#lx\n", hr );
- todo_wine
ok( input_count == ARRAY_SIZE(expect_input), "got input_count %lu\n", input_count );
- todo_wine
ok( output_count == ARRAY_SIZE(expect_output), "got output_count %lu\n", output_count );
for (i = 0; i < input_count; ++i)
@@ -135,9 +132,7 @@ static void test_interfaces(void)
hr = CoCreateInstance( &CLSID_CWMADecMediaObject, &outer, CLSCTX_INPROC_SERVER, &IID_IUnknown,
(void **)&unknown );
- todo_wine
ok( hr == S_OK, "CoCreateInstance returned %#lx\n", hr );
- if (FAILED(hr)) return;
hr = IUnknown_QueryInterface( unknown, &IID_IMFTransform, (void **)&transform );
ok( hr == S_OK, "QueryInterface returned %#lx\n", hr );
hr = IUnknown_QueryInterface( unknown, &IID_IMediaObject, (void **)&media_object );
--
2.34.1
2
13
Feb. 2, 2022
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmsynth/tests/Makefile.in | 1 -
dlls/dmsynth/tests/dmsynth.c | 104 ++++++++++++++++-----------------
2 files changed, 52 insertions(+), 53 deletions(-)
diff --git a/dlls/dmsynth/tests/Makefile.in b/dlls/dmsynth/tests/Makefile.in
index b082aa5dcc5..5f2fce7b8b1 100644
--- a/dlls/dmsynth/tests/Makefile.in
+++ b/dlls/dmsynth/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmsynth.dll
IMPORTS = oleaut32 ole32 uuid
diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c
index 59ced1f0f21..5f2e9e95364 100644
--- a/dlls/dmsynth/tests/dmsynth.c
+++ b/dlls/dmsynth/tests/dmsynth.c
@@ -67,81 +67,81 @@ static void test_dmsynth(void)
DMUS_PORTCAPS caps;
hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth, (LPVOID*)&dmsynth);
- ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance returned: %#lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink,
(void **)&dmsynth_sink);
- ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance returned: %#lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink,
(void **)&dmsynth_sink2);
- ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance returned: %#lx\n", hr);
hr = IDirectMusicSynth_QueryInterface(dmsynth, &IID_IKsControl, (LPVOID*)&control_synth);
- ok(hr == S_OK, "IDirectMusicSynth_QueryInterface returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_QueryInterface returned: %#lx\n", hr);
S(U(property)).Id = 0;
S(U(property)).Flags = KSPROPERTY_TYPE_GET;
S(U(property)).Set = GUID_DMUS_PROP_INSTRUMENT2;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == TRUE, "Return value: %u, should be 1\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == TRUE, "Return value: %lu, should be 1\n", value);
S(U(property)).Set = GUID_DMUS_PROP_DLS2;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == TRUE, "Return value: %u, should be 1\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == TRUE, "Return value: %lu, should be 1\n", value);
S(U(property)).Set = GUID_DMUS_PROP_GM_Hardware;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == FALSE, "Return value: %u, should be 0\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == FALSE, "Return value: %lu, should be 0\n", value);
S(U(property)).Set = GUID_DMUS_PROP_GS_Hardware;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == FALSE, "Return value: %u, should be 0\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == FALSE, "Return value: %lu, should be 0\n", value);
S(U(property)).Set = GUID_DMUS_PROP_XG_Hardware;
hr = IKsControl_KsProperty(control_synth, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == FALSE, "Return value: %u, should be 0\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == FALSE, "Return value: %lu, should be 0\n", value);
hr = IDirectMusicSynthSink_QueryInterface(dmsynth_sink, &IID_IKsControl, (LPVOID*)&control_sink);
- ok(hr == S_OK, "IDirectMusicSynthSink_QueryInterface returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynthSink_QueryInterface returned: %#lx\n", hr);
S(U(property)).Set = GUID_DMUS_PROP_SinkUsesDSound;
hr = IKsControl_KsProperty(control_sink, &property, sizeof(property), &value, sizeof(value), &bytes);
- ok(hr == S_OK, "IKsControl_KsProperty returned: %x\n", hr);
- ok(bytes == sizeof(DWORD), "Returned bytes: %u, should be 4\n", bytes);
- ok(value == TRUE, "Return value: %u, should be 1\n", value);
+ ok(hr == S_OK, "IKsControl_KsProperty returned: %#lx\n", hr);
+ ok(bytes == sizeof(DWORD), "Returned bytes: %lu, should be 4\n", bytes);
+ ok(value == TRUE, "Return value: %lu, should be 1\n", value);
/* Synth isn't fully initialized yet */
hr = IDirectMusicSynth_Activate(dmsynth, TRUE);
- ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_Activate returned: %x\n", hr);
+ ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_Activate returned: %#lx\n", hr);
/* Synth has no default clock */
hr = IDirectMusicSynth_GetLatencyClock(dmsynth, &clock_synth);
- ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_GetLatencyClock returned: %x\n", hr);
+ ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_GetLatencyClock returned: %#lx\n", hr);
/* SynthSink has a default clock */
hr = IDirectMusicSynthSink_GetLatencyClock(dmsynth_sink, &clock_sink);
- ok(hr == S_OK, "IDirectMusicSynth_GetLatencyClock returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_GetLatencyClock returned: %#lx\n", hr);
ok(clock_sink != NULL, "No clock returned\n");
ref_clock_sink = get_refcount(clock_sink);
/* This will Init() the SynthSink and finish initializing the Synth */
hr = IDirectMusicSynthSink_Init(dmsynth_sink2, NULL);
- ok(hr == S_OK, "IDirectMusicSynthSink_Init returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynthSink_Init returned: %#lx\n", hr);
hr = IDirectMusicSynth_SetSynthSink(dmsynth, dmsynth_sink2);
- ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %#lx\n", hr);
hr = IDirectMusicSynth_SetSynthSink(dmsynth, dmsynth_sink);
- ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_SetSynthSink returned: %#lx\n", hr);
/* Check clocks are the same */
hr = IDirectMusicSynth_GetLatencyClock(dmsynth, &clock_synth);
- ok(hr == S_OK, "IDirectMusicSynth_GetLatencyClock returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicSynth_GetLatencyClock returned: %#lx\n", hr);
ok(clock_synth != NULL, "No clock returned\n");
ok(clock_synth == clock_sink, "Synth and SynthSink clocks are not the same\n");
ref_clock_synth = get_refcount(clock_synth);
@@ -149,13 +149,13 @@ static void test_dmsynth(void)
/* GetPortCaps */
hr = IDirectMusicSynth_GetPortCaps(dmsynth, NULL);
- ok(hr == E_INVALIDARG, "GetPortCaps failed: %#x\n", hr);
+ ok(hr == E_INVALIDARG, "GetPortCaps failed: %#lx\n", hr);
memset(&caps, 0, sizeof(caps));
hr = IDirectMusicSynth_GetPortCaps(dmsynth, &caps);
- ok(hr == E_INVALIDARG, "GetPortCaps failed: %#x\n", hr);
+ ok(hr == E_INVALIDARG, "GetPortCaps failed: %#lx\n", hr);
caps.dwSize = sizeof(caps) + 1;
hr = IDirectMusicSynth_GetPortCaps(dmsynth, &caps);
- ok(hr == S_OK, "GetPortCaps failed: %#x\n", hr);
+ ok(hr == S_OK, "GetPortCaps failed: %#lx\n", hr);
if (control_synth)
IDirectMusicSynth_Release(control_synth);
@@ -184,38 +184,38 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusicSynth, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dms8);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicSynth create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicSynth create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dms8, "dms8 = %p\n", dms8);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dms8);
- ok(hr == E_NOINTERFACE, "DirectMusicSynth create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicSynth create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicSynth interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicSynth8, (void**)&dms8);
- ok(hr == S_OK, "DirectMusicSynth create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicSynth create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicSynth8_AddRef(dms8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IKsControl, (void**)&iksc);
- ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %#lx\n", hr);
refcount = IKsControl_AddRef(iksc);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IKsControl_Release(iksc);
hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
IUnknown_Release(unk);
/* Unsupported interfaces */
hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IDirectMusicSynthSink, (void**)&unk);
- ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicSynthSink failed: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicSynthSink failed: %#lx\n", hr);
hr = IDirectMusicSynth8_QueryInterface(dms8, &IID_IReferenceClock, (void**)&unk);
- ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %#lx\n", hr);
while (IDirectMusicSynth8_Release(dms8));
}
@@ -232,36 +232,36 @@ static void test_COM_synthsink(void)
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmss);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicSynthSink create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicSynthSink create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmss, "dmss = %p\n", dmss);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmss);
- ok(hr == E_NOINTERFACE, "DirectMusicSynthSink create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicSynthSink create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicSynthSink interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicSynthSink, (void**)&dmss);
- ok(hr == S_OK, "DirectMusicSynthSink create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicSynthSink create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicSynthSink_AddRef(dmss);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IKsControl, (void**)&iksc);
- ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %#lx\n", hr);
refcount = IKsControl_AddRef(iksc);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IKsControl_Release(iksc);
hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
IUnknown_Release(unk);
/* Unsupported interfaces */
hr = IDirectMusicSynthSink_QueryInterface(dmss, &IID_IReferenceClock, (void**)&unk);
- ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %#lx\n", hr);
while (IDirectMusicSynthSink_Release(dmss));
}
--
2.34.1
1
0