Rebase against 2ad09b01673381261815bfc804a2f69ce4d85f86.

This commit is contained in:
Alistair Leslie-Hughes 2020-12-01 09:52:39 +11:00
parent 47fea9ffa2
commit d3b70d6278
12 changed files with 141 additions and 1240 deletions

View File

@ -1,4 +1,4 @@
From 7529755fcc41fda650aac6b27f34438354435d34 Mon Sep 17 00:00:00 2001
From b51fdc7e211f676d169c937209bf689e57252c5d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 21:58:40 +0100
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
@ -9,10 +9,10 @@ Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 9280b5d32..2f0974a4c 100644
index aa51c744297..7cad015480f 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -1887,7 +1887,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
@@ -2130,7 +2130,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
@ -21,7 +21,7 @@ index 9280b5d32..2f0974a4c 100644
}
struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -1895,7 +1895,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
@@ -2138,7 +2138,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
if (!iface)
return NULL;
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
@ -31,10 +31,10 @@ index 9280b5d32..2f0974a4c 100644
static struct dwrite_fontfacereference *unsafe_impl_from_IDWriteFontFaceReference(IDWriteFontFaceReference *iface)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index b9321157a..76ea23ba6 100644
index 1f6201a6a93..35791d5c22e 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -5895,7 +5895,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
@@ -5886,7 +5886,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
{
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
@ -42,7 +42,7 @@ index b9321157a..76ea23ba6 100644
+ CONTAINING_RECORD((IDWriteTextFormat3 *)iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
}
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight,
--
2.24.0
2.29.2

View File

@ -1,8 +1,7 @@
From 25b5e818272cf6fc52a8707c80b9ade3a5ca5df5 Mon Sep 17 00:00:00 2001
From a207d7f2c77296798e047ed03d88d8a060139aff Mon Sep 17 00:00:00 2001
From: Jason Edmeades <us@edmeades.me.uk>
Date: Tue, 16 Jul 2019 13:49:18 +1000
Subject: [PATCH 1/2] cmd: Support for launching programs based on file
association
Subject: [PATCH] cmd: Support for launching programs based on file association
cmd already handles exe, cmd, bat etc but if you run a file with another extension,
then use the associations set in the registry (for example via ftype / assoc) to
@ -12,14 +11,14 @@ fred.msi for msiexec to be launched.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18154
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36646
---
programs/cmd/wcmdmain.c | 140 +++++++++++++++++++++++++++++-----------
1 file changed, 104 insertions(+), 36 deletions(-)
programs/cmd/wcmdmain.c | 138 +++++++++++++++++++++++++++++-----------
1 file changed, 102 insertions(+), 36 deletions(-)
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 29e498a48d..2a9e4c75ee 100644
index cacb7ea7751..19a807c1624 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1142,8 +1142,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
@@ -1135,8 +1135,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
/* 1. If extension supplied, see if that file exists */
if (extensionsupplied) {
@ -31,7 +30,7 @@ index 29e498a48d..2a9e4c75ee 100644
}
}
@@ -1174,6 +1176,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
@@ -1166,6 +1168,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
}
if (GetFileAttributesW(thisDir) != INVALID_FILE_ATTRIBUTES) {
@ -39,17 +38,9 @@ index 29e498a48d..2a9e4c75ee 100644
found = TRUE;
thisExt = NULL;
}
@@ -1191,58 +1194,123 @@ void WCMD_run_program (WCHAR *command, BOOL called)
WCHAR *ext = wcsrchr( thisDir, '.' );
static const WCHAR batExt[] = {'.','b','a','t','\0'};
static const WCHAR cmdExt[] = {'.','c','m','d','\0'};
+ static const WCHAR exeExt[] = {'.','e','x','e','\0'};
+ static const WCHAR comExt[] = {'.','c','o','m','\0'};
WINE_TRACE("Found as %s\n", wine_dbgstr_w(thisDir));
@@ -1187,52 +1190,115 @@ void WCMD_run_program (WCHAR *command, BOOL called)
/* Special case BAT and CMD */
if (ext && (!wcsicmp(ext, batExt) || !wcsicmp(ext, cmdExt))) {
if (ext && (!wcsicmp(ext, L".bat") || !wcsicmp(ext, L".cmd"))) {
BOOL oldinteractive = interactive;
+ WINE_TRACE("Calling batch program\n");
interactive = FALSE;
@ -95,7 +86,7 @@ index 29e498a48d..2a9e4c75ee 100644
+
+ /* If it is not a .com or .exe, try to launch through ShellExecuteExW
+ which takes into account the association for the extension. */
+ if (ext && (wcsicmp(ext, exeExt) && wcsicmp(ext, comExt))) {
+ if (ext && (wcsicmp(ext, L".exe") && wcsicmp(ext, L".com"))) {
+
+ SHELLEXECUTEINFOW shexw;
+ BOOL rc;
@ -199,5 +190,5 @@ index 29e498a48d..2a9e4c75ee 100644
}
--
2.17.1
2.29.2

View File

@ -1,749 +0,0 @@
From 546e1369ea175aac841ff621cb441e6d1d87e1f2 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Tue, 24 Nov 2020 15:23:18 -0500
Subject: [PATCH] mf/topoloader: Add partial topology resolution tests.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/mf/tests/Makefile.in | 2 -
dlls/mf/tests/mf.c | 601 +++++++++++++++++++++++++++++++-------
dlls/mf/tests/resource.rc | 22 --
3 files changed, 499 insertions(+), 126 deletions(-)
delete mode 100644 dlls/mf/tests/resource.rc
diff --git a/dlls/mf/tests/Makefile.in b/dlls/mf/tests/Makefile.in
index 5eb9ee4d4e3..614eb4fbc9e 100644
--- a/dlls/mf/tests/Makefile.in
+++ b/dlls/mf/tests/Makefile.in
@@ -3,5 +3,3 @@ IMPORTS = mf mfplat mfuuid ole32 user32
C_SRCS = \
mf.c
-
-RC_SRCS = resource.rc
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index fda80974724..092735466be 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -44,6 +44,7 @@ DEFINE_GUID(MFVideoFormat_ABGR32, 0x00000020, 0x0000, 0x0010, 0x80, 0x00, 0x00,
#include "mmdeviceapi.h"
#include "audioclient.h"
#include "evr.h"
+#include "propvarutil.h"
#include "wine/test.h"
@@ -97,34 +98,6 @@ static HWND create_window(void)
0, 0, r.right - r.left, r.bottom - r.top, NULL, NULL, NULL, NULL);
}
-static WCHAR *load_resource(const WCHAR *name)
-{
- static WCHAR pathW[MAX_PATH];
- DWORD written;
- HANDLE file;
- HRSRC res;
- void *ptr;
-
- GetTempPathW(ARRAY_SIZE(pathW), pathW);
- lstrcatW(pathW, name);
-
- file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0,
- NULL, CREATE_ALWAYS, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n",
- wine_dbgstr_w(pathW), GetLastError());
-
- res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA);
- ok(res != 0, "couldn't find resource\n");
- ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res));
- WriteFile(file, ptr, SizeofResource(GetModuleHandleA(NULL), res),
- &written, NULL);
- ok(written == SizeofResource(GetModuleHandleA(NULL), res),
- "couldn't write resource\n" );
- CloseHandle(file);
-
- return pathW;
-}
-
static HRESULT WINAPI test_unk_QueryInterface(IUnknown *iface, REFIID riid, void **obj)
{
if (IsEqualIID(riid, &IID_IUnknown))
@@ -1447,26 +1420,316 @@ static const IMFSampleGrabberSinkCallbackVtbl test_grabber_callback_vtbl =
test_grabber_callback_OnShutdown,
};
+struct test_source
+{
+ IMFMediaSource IMFMediaSource_iface;
+ LONG refcount;
+};
+
+static struct test_source *impl_from_IMFMediaSource(IMFMediaSource *iface)
+{
+ return CONTAINING_RECORD(iface, struct test_source, IMFMediaSource_iface);
+}
+
+static HRESULT WINAPI test_source_QueryInterface(IMFMediaSource *iface, REFIID riid, void **out)
+{
+ if (IsEqualIID(riid, &IID_IMFMediaSource)
+ || IsEqualIID(riid, &IID_IMFMediaEventGenerator)
+ || IsEqualIID(riid, &IID_IUnknown))
+ {
+ *out = iface;
+ }
+ else
+ {
+ *out = NULL;
+ return E_NOINTERFACE;
+ }
+
+ IMFMediaSource_AddRef(iface);
+ return S_OK;
+}
+
+static ULONG WINAPI test_source_AddRef(IMFMediaSource *iface)
+{
+ struct test_source *source = impl_from_IMFMediaSource(iface);
+ return InterlockedIncrement(&source->refcount);
+}
+
+static ULONG WINAPI test_source_Release(IMFMediaSource *iface)
+{
+ struct test_source *source = impl_from_IMFMediaSource(iface);
+ ULONG refcount = InterlockedDecrement(&source->refcount);
+
+ if (!refcount)
+ HeapFree(GetProcessHeap(), 0, source);
+
+ return refcount;
+}
+
+static HRESULT WINAPI test_source_GetEvent(IMFMediaSource *iface, DWORD flags, IMFMediaEvent **event)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_BeginGetEvent(IMFMediaSource *iface, IMFAsyncCallback *callback, IUnknown *state)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_EndGetEvent(IMFMediaSource *iface, IMFAsyncResult *result, IMFMediaEvent **event)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_QueueEvent(IMFMediaSource *iface, MediaEventType event_type, REFGUID ext_type,
+ HRESULT hr, const PROPVARIANT *value)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_GetCharacteristics(IMFMediaSource *iface, DWORD *flags)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_CreatePresentationDescriptor(IMFMediaSource *iface, IMFPresentationDescriptor **pd)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_Start(IMFMediaSource *iface, IMFPresentationDescriptor *pd, const GUID *time_format,
+ const PROPVARIANT *start_position)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_Stop(IMFMediaSource *iface)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_Pause(IMFMediaSource *iface)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI test_source_Shutdown(IMFMediaSource *iface)
+{
+ ok(0, "Unexpected call.\n");
+ return E_NOTIMPL;
+}
+
+static const IMFMediaSourceVtbl test_source_vtbl =
+{
+ test_source_QueryInterface,
+ test_source_AddRef,
+ test_source_Release,
+ test_source_GetEvent,
+ test_source_BeginGetEvent,
+ test_source_EndGetEvent,
+ test_source_QueueEvent,
+ test_source_GetCharacteristics,
+ test_source_CreatePresentationDescriptor,
+ test_source_Start,
+ test_source_Stop,
+ test_source_Pause,
+ test_source_Shutdown,
+};
+
+static IMFMediaSource *create_test_source(void)
+{
+ struct test_source *source;
+
+ source = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*source));
+ source->IMFMediaSource_iface.lpVtbl = &test_source_vtbl;
+ source->refcount = 1;
+
+ return &source->IMFMediaSource_iface;
+}
+
static void test_topology_loader(void)
{
+ static const struct resolution_test
+ {
+ union
+ {
+ WAVEFORMATEX input_type;
+ MPEGLAYER3WAVEFORMAT mp3_input_type;
+ };
+ WAVEFORMATEX output_type;
+ MF_CONNECT_METHOD method;
+ HRESULT expected_result;
+ BOOL expect_decoder, expect_converter, wine_todo;
+ }
+ resolution_tests[] =
+ {
+ {
+ .input_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 1, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 44100, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .output_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 1, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 44100, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .method = MF_CONNECT_DIRECT,
+ .expected_result = S_OK,
+ .expect_decoder = FALSE,
+ .expect_converter = FALSE,
+ .wine_todo = FALSE,
+ },
+ {
+ .input_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 1, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 44100, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .output_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 1, .nSamplesPerSec = 48000,
+ .nAvgBytesPerSec = 48000, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .method = MF_CONNECT_DIRECT,
+ .expected_result = MF_E_INVALIDMEDIATYPE,
+ .expect_decoder = FALSE,
+ .expect_converter = FALSE,
+ .wine_todo = FALSE,
+ },
+ {
+ .input_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 1, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 44100, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .output_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 1, .nSamplesPerSec = 48000,
+ .nAvgBytesPerSec = 48000, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .method = MF_CONNECT_ALLOW_CONVERTER,
+ .expected_result = S_OK,
+ .expect_decoder = FALSE,
+ .expect_converter = TRUE,
+ .wine_todo = TRUE,
+ },
+ /* Test MF_TOPONODE_CONNECT_METHOD:
+ - 0x1 (MF_CONNECT_ALLOW_CONVERTER) allows converters
+ - 0x3 (MF_CONNECT_ALLOW_DECODER) allows converters and decoders
+ - 0x2 allows neither */
+ {
+ .mp3_input_type = {
+ {
+ .wFormatTag = WAVE_FORMAT_MPEGLAYER3, .nChannels = 2, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 16000, .nBlockAlign = 1, .wBitsPerSample = 0, .cbSize = MPEGLAYER3_WFX_EXTRA_BYTES,
+ },
+ .wID = MPEGLAYER3_ID_MPEG,
+ .fdwFlags = 0,
+ .nBlockSize = 417,
+ .nFramesPerBlock = 0,
+ .nCodecDelay = 0,
+ },
+ .output_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 1, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 44100, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .method = MF_CONNECT_DIRECT,
+ .expected_result = MF_E_INVALIDMEDIATYPE,
+ .expect_decoder = FALSE,
+ .expect_converter = FALSE,
+ .wine_todo = TRUE,
+ },
+ {
+ .mp3_input_type = {
+ {
+ .wFormatTag = WAVE_FORMAT_MPEGLAYER3, .nChannels = 2, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 16000, .nBlockAlign = 1, .wBitsPerSample = 0, .cbSize = MPEGLAYER3_WFX_EXTRA_BYTES,
+ },
+ .wID = MPEGLAYER3_ID_MPEG,
+ .fdwFlags = 0,
+ .nBlockSize = 417,
+ .nFramesPerBlock = 0,
+ .nCodecDelay = 0,
+ },
+ .output_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 2, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 44100, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .method = MF_CONNECT_ALLOW_CONVERTER,
+ .expected_result = MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_MEDIATYPE_COMBINATION,
+ .expect_decoder = FALSE,
+ .expect_converter = FALSE,
+ .wine_todo = TRUE,
+ },
+ {
+ .mp3_input_type = {
+ {
+ .wFormatTag = WAVE_FORMAT_MPEGLAYER3, .nChannels = 2, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 16000, .nBlockAlign = 1, .wBitsPerSample = 0, .cbSize = MPEGLAYER3_WFX_EXTRA_BYTES,
+ },
+ .wID = MPEGLAYER3_ID_MPEG,
+ .fdwFlags = 0,
+ .nBlockSize = 417,
+ .nFramesPerBlock = 0,
+ .nCodecDelay = 0,
+ },
+ .output_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 2, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 44100, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .method = 2,
+ .expected_result = MF_E_INVALIDMEDIATYPE,
+ .expect_decoder = FALSE,
+ .expect_converter = FALSE,
+ .wine_todo = TRUE,
+ },
+ {
+ .mp3_input_type = {
+ {
+ .wFormatTag = WAVE_FORMAT_MPEGLAYER3, .nChannels = 2, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 16000, .nBlockAlign = 1, .wBitsPerSample = 0, .cbSize = MPEGLAYER3_WFX_EXTRA_BYTES,
+ },
+ .wID = MPEGLAYER3_ID_MPEG,
+ .fdwFlags = 0,
+ .nBlockSize = 417,
+ .nFramesPerBlock = 0,
+ .nCodecDelay = 0,
+ },
+ .output_type = {
+ .wFormatTag = WAVE_FORMAT_PCM, .nChannels = 1, .nSamplesPerSec = 44100,
+ .nAvgBytesPerSec = 44100, .nBlockAlign = 1, .wBitsPerSample = 8, .cbSize = 0,
+ },
+ .method = MF_CONNECT_ALLOW_DECODER,
+ .expected_result = S_OK,
+ .expect_decoder = TRUE,
+ .expect_converter = FALSE,
+ .wine_todo = TRUE,
+ },
+ };
+
IMFSampleGrabberSinkCallback test_grabber_callback = { &test_grabber_callback_vtbl };
+ IMFTopologyNode *src_node, *sink_node, *src_node2, *sink_node2, *mft_node;
IMFTopology *topology, *topology2, *full_topology;
- IMFTopologyNode *src_node, *sink_node;
+ unsigned int count, value, index;
IMFPresentationDescriptor *pd;
- IMFSourceResolver *resolver;
IMFActivate *sink_activate;
IMFStreamSink *stream_sink;
- unsigned int count, value;
+ MF_TOPOLOGY_TYPE node_type;
IMFMediaType *media_type;
IMFStreamDescriptor *sd;
- MF_OBJECT_TYPE obj_type;
+ IMFTransform *transform;
IMFMediaSource *source;
IMFTopoLoader *loader;
- IMFByteStream *stream;
- IMFAttributes *attr;
+ IUnknown *node_object;
+ BOOL compare_result;
IMFMediaSink *sink;
- WCHAR *filename;
- BOOL selected;
+ WORD node_count;
+ unsigned int i;
+ TOPOID node_id;
HRESULT hr;
GUID guid;
@@ -1487,44 +1750,41 @@ static void test_topology_loader(void)
todo_wine
ok(hr == MF_E_TOPO_UNSUPPORTED, "Unexpected hr %#x.\n", hr);
- hr = MFCreateSourceResolver(&resolver);
- ok(hr == S_OK, "Failed to create source resolver, hr %#x.\n", hr);
+ /* Add source node. */
+ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &src_node);
+ ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr);
- filename = load_resource(L"test.wav");
+ /* when a decoder is involved, windows requires this attribute to be present */
+ source = create_test_source();
- hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &stream);
- ok(hr == S_OK, "Failed to create file stream, hr %#x.\n", hr);
+ hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_SOURCE, (IUnknown *)source);
+ ok(hr == S_OK, "Failed to set node source, hr %#x.\n", hr);
- IMFByteStream_QueryInterface(stream, &IID_IMFAttributes, (void **)&attr);
- IMFAttributes_SetString(attr, &MF_BYTESTREAM_CONTENT_TYPE, L"audio/wav");
- IMFAttributes_Release(attr);
+ IMFMediaSource_Release(source);
- hr = IMFSourceResolver_CreateObjectFromByteStream(resolver, stream, NULL, MF_RESOLUTION_MEDIASOURCE, NULL,
- &obj_type, (IUnknown **)&source);
- ok(hr == S_OK || broken(FAILED(hr)) /* Vista */, "Failed to create source, hr %#x.\n", hr);
- if (FAILED(hr))
- return;
+ hr = MFCreateMediaType(&media_type);
+ ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr);
- hr = IMFMediaSource_CreatePresentationDescriptor(source, &pd);
- ok(hr == S_OK, "Failed to create descriptor, hr %#x.\n", hr);
- if (FAILED(hr))
- return;
+ hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio);
+ ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
+ hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM);
+ ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr);
- hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(pd, 0, &selected, &sd);
- ok(hr == S_OK, "Failed to get stream descriptor, hr %#x.\n", hr);
+ hr = MFCreateStreamDescriptor(0, 1, &media_type, &sd);
+ ok(hr == S_OK, "Failed to create stream descriptor, hr %#x.\n");
- /* Add source node. */
- hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &src_node);
- ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr);
+ hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_STREAM_DESCRIPTOR, (IUnknown *)sd);
+ ok(hr == S_OK, "Failed to set node sd, hr %#x.\n", hr);
- hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_SOURCE, (IUnknown *)source);
- ok(hr == S_OK, "Failed to set node source, hr %#x.\n", hr);
+ hr = MFCreatePresentationDescriptor(1, &sd, &pd);
+ ok(hr == S_OK, "Failed to create presentation descriptor, hr %#x.\n");
hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_PRESENTATION_DESCRIPTOR, (IUnknown *)pd);
ok(hr == S_OK, "Failed to set node pd, hr %#x.\n", hr);
- hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_STREAM_DESCRIPTOR, (IUnknown *)sd);
- ok(hr == S_OK, "Failed to set node sd, hr %#x.\n", hr);
+ IMFPresentationDescriptor_Release(pd);
+ IMFStreamDescriptor_Release(sd);
+ IMFMediaType_Release(media_type);
hr = IMFTopology_AddNode(topology, src_node);
ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr);
@@ -1534,7 +1794,9 @@ todo_wine
todo_wine
ok(hr == MF_E_TOPO_UNSUPPORTED, "Unexpected hr %#x.\n", hr);
- /* Add grabber sink. */
+ hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &sink_node);
+ ok(hr == S_OK, "Failed to create output node, hr %#x.\n", hr);
+
hr = MFCreateMediaType(&media_type);
ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr);
@@ -1546,13 +1808,11 @@ todo_wine
hr = MFCreateSampleGrabberSinkActivate(media_type, &test_grabber_callback, &sink_activate);
ok(hr == S_OK, "Failed to create grabber sink, hr %#x.\n", hr);
- IMFMediaType_Release(media_type);
-
- hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &sink_node);
- ok(hr == S_OK, "Failed to create output node, hr %#x.\n", hr);
-
hr = IMFTopologyNode_SetObject(sink_node, (IUnknown *)sink_activate);
ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr);
+
+ IMFMediaType_Release(media_type);
+
hr = IMFTopology_AddNode(topology, sink_node);
ok(hr == S_OK, "Failed to add sink node, hr %#x.\n", hr);
@@ -1567,55 +1827,192 @@ todo_wine
hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL);
ok(hr == MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED, "Unexpected hr %#x.\n", hr);
- hr = IMFActivate_ActivateObject(sink_activate, &IID_IMFMediaSink, (void **)&sink);
- ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr);
+ for (i = 0; i < ARRAY_SIZE(resolution_tests); i++)
+ {
+ IMFMediaType *input_type, *output_type;
+ IMFMediaTypeHandler *mth;
- hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream_sink);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ /* TODO: remove once MFInitMediaTypeFromWaveFormatEx gains support for non-zero cbSize */
+ if(resolution_tests[i].wine_todo && !strcmp(winetest_platform, "wine"))
+ {
+ todo_wine ok(0, "Skipping test %u on wine.\n", i);
+ continue;
+ }
- hr = IMFTopologyNode_SetObject(sink_node, (IUnknown *)stream_sink);
- ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr);
+ hr = MFCreateMediaType(&input_type);
+ ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr);
- IMFStreamSink_Release(stream_sink);
+ hr = MFInitMediaTypeFromWaveFormatEx(input_type, &resolution_tests[i].input_type, sizeof(WAVEFORMATEX) + resolution_tests[i].input_type.cbSize);
+ ok(hr == S_OK, "MFInitMediaTypeFromWaveFormatEx failed, hr %#x.\n", hr);
- hr = IMFTopology_GetCount(topology, &count);
- ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
- ok(count == 0, "Unexpected count %u.\n", count);
+ hr = MFCreateMediaType(&output_type);
+ ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr);
- hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL);
- ok(hr == S_OK, "Failed to resolve topology, hr %#x.\n", hr);
- ok(full_topology != topology, "Unexpected instance.\n");
+ hr = MFInitMediaTypeFromWaveFormatEx(output_type, &resolution_tests[i].output_type, sizeof(WAVEFORMATEX) + resolution_tests[i].output_type.cbSize);
+ ok(hr == S_OK, "MFInitMediaTypeFromWaveFormatEx failed, hr %#x.\n", hr);
- hr = IMFTopology_GetCount(topology, &count);
- ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
- ok(count == 0, "Unexpected count %u.\n", count);
+ hr = MFCreateStreamDescriptor(0, 1, &input_type, &sd);
+ ok(hr == S_OK, "Failed to create stream descriptor, hr %#x.\n", hr);
- hr = IMFTopology_GetCount(full_topology, &count);
- ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
+ hr = IMFStreamDescriptor_GetMediaTypeHandler(sd, &mth);
+ ok(hr == S_OK, "Failed to get media type handler, hr %#x.\n", hr);
+
+ hr = IMFMediaTypeHandler_SetCurrentMediaType(mth, input_type);
+ ok(hr == S_OK, "Failed to set current media type, hr %#x.\n", hr);
+
+ IMFMediaTypeHandler_Release(mth);
+
+ hr = MFCreatePresentationDescriptor(1, &sd, &pd);
+ ok(hr == S_OK, "Failed to create presentation descriptor, hr %#x.\n", hr);
+
+ hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_PRESENTATION_DESCRIPTOR, (IUnknown *)pd);
+ ok(hr == S_OK, "Failed to set node pd, hr %#x.\n", hr);
+
+ IMFPresentationDescriptor_Release(pd);
+
+ hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_STREAM_DESCRIPTOR, (IUnknown *)sd);
+ ok(hr == S_OK, "Failed to set node sd, hr %#x.\n", hr);
+
+ IMFStreamDescriptor_Release(sd);
+
+ hr = MFCreateSampleGrabberSinkActivate(output_type, &test_grabber_callback, &sink_activate);
+ ok(hr == S_OK, "Failed to create grabber sink, hr %#x.\n", hr);
+
+ hr = IMFActivate_ActivateObject(sink_activate, &IID_IMFMediaSink, (void **)&sink);
+ ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr);
+
+ hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream_sink);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
+ IMFMediaSink_Release(sink);
+
+ hr = IMFTopologyNode_SetObject(sink_node, (IUnknown *)stream_sink);
+ ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr);
+
+ IMFStreamSink_Release(stream_sink);
+
+ hr = IMFTopologyNode_SetUINT32(sink_node, &MF_TOPONODE_CONNECT_METHOD, resolution_tests[i].method);
+ ok(hr == S_OK, "Failed to set connect method, hr %#x.\n", hr);
+
+ hr = IMFTopology_GetCount(topology, &count);
+ ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
+ ok(count == 0, "Unexpected count %u.\n", count);
+
+ hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL);
+todo_wine_if(resolution_tests[i].wine_todo)
+ ok(hr == resolution_tests[i].expected_result, "Unexpected hr %#x on test %u.\n", hr, i);
+ ok(full_topology != topology, "Unexpected instance.\n");
+
+ if (resolution_tests[i].expected_result == S_OK && hr == S_OK)
+ {
+ hr = IMFTopology_GetCount(full_topology, &count);
+ ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
todo_wine
- ok(count == 1, "Unexpected count %u.\n", count);
+ ok(count == 1, "Unexpected count %u.\n", count);
- hr = IMFTopology_GetItemByIndex(full_topology, 0, &guid, NULL);
+ hr = IMFTopology_GetItemByIndex(full_topology, 0, &guid, NULL);
todo_wine {
- ok(hr == S_OK, "Failed to get attribute key, hr %#x.\n", hr);
- ok(IsEqualGUID(&guid, &MF_TOPOLOGY_RESOLUTION_STATUS), "Unexpected key %s.\n", wine_dbgstr_guid(&guid));
+ ok(hr == S_OK, "Failed to get attribute key, hr %#x.\n", hr);
+ ok(IsEqualGUID(&guid, &MF_TOPOLOGY_RESOLUTION_STATUS), "Unexpected key %s.\n", wine_dbgstr_guid(&guid));
}
- value = 0xdeadbeef;
- hr = IMFTopology_GetUINT32(full_topology, &MF_TOPOLOGY_RESOLUTION_STATUS, &value);
+ value = 0xdeadbeef;
+ hr = IMFTopology_GetUINT32(full_topology, &MF_TOPOLOGY_RESOLUTION_STATUS, &value);
todo_wine {
- ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr);
- ok(value == MF_TOPOLOGY_RESOLUTION_SUCCEEDED, "Unexpected value %#x.\n", value);
+ ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr);
+ ok(value == MF_TOPOLOGY_RESOLUTION_SUCCEEDED, "Unexpected value %#x.\n", value);
}
- hr = IMFTopoLoader_Load(loader, full_topology, &topology2, NULL);
- ok(hr == S_OK, "Failed to resolve topology, hr %#x.\n", hr);
- ok(full_topology != topology2, "Unexpected instance.\n");
- IMFTopology_Release(topology2);
- IMFTopology_Release(full_topology);
+ hr = IMFTopology_GetNodeCount(full_topology, &node_count);
+ ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr);
+ ok(node_count == 2 + resolution_tests[i].expect_decoder + resolution_tests[i].expect_converter, "Unexpected node count %u.\n", node_count);
+
+ hr = IMFTopologyNode_GetTopoNodeID(src_node, &node_id);
+ ok(hr == S_OK, "Failed to get source node id, hr %#x.\n", hr);
+
+ hr = IMFTopology_GetNodeByID(full_topology, node_id, &src_node2);
+ ok(hr == S_OK, "Failed to get source in resolved topology, hr %#x.\n", hr);
+
+ hr = IMFTopologyNode_GetTopoNodeID(sink_node, &node_id);
+ ok(hr == S_OK, "Failed to get sink node id, hr %#x.\n", hr);
+
+ hr = IMFTopology_GetNodeByID(full_topology, node_id, &sink_node2);
+ ok(hr == S_OK, "Failed to get sink in resolved topology, hr %#x.\n", hr);
+
+ if (resolution_tests[i].expect_decoder || resolution_tests[i].expect_converter)
+ {
+ hr = IMFTopologyNode_GetOutput(src_node2, 0, &mft_node, &index);
+ ok(hr == S_OK, "Failed to get transform node in resolved topology, hr %#x.\n", hr);
+ ok(index == 0, "Unexpected stream index %u.\n", index);
+
+ hr = IMFTopologyNode_GetNodeType(mft_node, &node_type);
+ ok(hr == S_OK, "Failed to get transform node type in resolved topology, hr %#x.\n", hr);
+ ok(node_type == MF_TOPOLOGY_TRANSFORM_NODE, "Unexpected node type %u, expected MF_TOPOLOGY_TRANSFORM_NODE.\n", node_type);
+
+ hr = IMFTopologyNode_GetObject(mft_node, &node_object);
+ ok(hr == S_OK, "Failed to get object of transform node, hr %#x.\n", hr);
+
+ hr = IUnknown_QueryInterface(node_object, &IID_IMFTransform, (void**) &transform);
+ ok(hr == S_OK, "Failed to get IMFTransform from transform node's object, hr %#x.\n", hr);
+ IUnknown_Release(node_object);
+
+ hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
+ ok(hr == S_OK, "Failed to get transform input type, hr %#x.\n", hr);
+
+ hr = IMFMediaType_Compare(media_type, (IMFAttributes *)input_type, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &compare_result);
+ ok(hr == S_OK, "Failed to compare media types, hr %#x.\n", hr);
+ ok(compare_result, "Input type of first transform doesn't match source node type.\n");
+
+ IMFTopologyNode_Release(mft_node);
+ IMFMediaType_Release(media_type);
+ IMFTransform_Release(transform);
+
+ hr = IMFTopologyNode_GetInput(sink_node2, 0, &mft_node, &index);
+ ok(hr == S_OK, "Failed to get transform node in resolved topology, hr %#x.\n", hr);
+ ok(index == 0, "Unexpected stream index %u.\n", index);
+
+ hr = IMFTopologyNode_GetNodeType(mft_node, &node_type);
+ ok(hr == S_OK, "Failed to get transform node type in resolved topology, hr %#x.\n", hr);
+ ok(node_type == MF_TOPOLOGY_TRANSFORM_NODE, "Unexpected node type %u, expected MF_TOPOLOGY_TRANSFORM_NODE.\n", node_type);
+
+ hr = IMFTopologyNode_GetObject(mft_node, &node_object);
+ ok(hr == S_OK, "Failed to get object of transform node, hr %#x.\n", hr);
+
+ hr = IUnknown_QueryInterface(node_object, &IID_IMFTransform, (void**) &transform);
+ ok(hr == S_OK, "Failed to get IMFTransform from transform node's object, hr %#x.\n", hr);
+ IUnknown_Release(node_object);
+
+ hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type);
+ ok(hr == S_OK, "Failed to get transform output type, hr %#x.\n", hr);
+
+ hr = IMFMediaType_Compare(media_type, (IMFAttributes *)output_type, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &compare_result);
+ ok(hr == S_OK, "Failed to compare media types, hr %#x.\n", hr);
+ ok(compare_result, "Output type of last transform doesn't match sink node type.\n");
+
+ IMFTopologyNode_Release(mft_node);
+ IMFMediaType_Release(media_type);
+ IMFTransform_Release(transform);
+ }
+
+ IMFTopologyNode_Release(sink_node2);
+
+ hr = IMFTopoLoader_Load(loader, full_topology, &topology2, NULL);
+ ok(hr == S_OK, "Failed to resolve topology, hr %#x.\n", hr);
+ ok(full_topology != topology2, "Unexpected instance.\n");
+
+ IMFTopology_Release(topology2);
+ IMFTopology_Release(full_topology);
+ }
+
+ hr = IMFTopology_GetCount(topology, &count);
+ ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
+ ok(count == 0, "Unexpected count %u.\n", count);
+
+ IMFActivate_ShutdownObject(sink_activate);
+ IMFActivate_Release(sink_activate);
+ IMFMediaType_Release(input_type);
+ IMFMediaType_Release(output_type);
+ }
- IMFMediaSource_Release(source);
- IMFSourceResolver_Release(resolver);
- IMFByteStream_Release(stream);
IMFTopoLoader_Release(loader);
hr = MFShutdown();
diff --git a/dlls/mf/tests/resource.rc b/dlls/mf/tests/resource.rc
deleted file mode 100644
index f54212a8c8f..00000000000
--- a/dlls/mf/tests/resource.rc
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2019 Nikolay Sivov 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 "windef.h"
-
-/* @makedep: test.wav */
-test.wav RCDATA test.wav
--
2.29.2

View File

@ -1,36 +0,0 @@
From 485aa86f6b509c71e657c726df99c770ca2146bc Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 20 Nov 2020 12:50:16 -0600
Subject: [PATCH] mf/topoloader: Move node connection responsibility to
connection function.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/mf/topology.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c
index 8032e438b73..a09f6ef0ef4 100644
--- a/dlls/mf/topology.c
+++ b/dlls/mf/topology.c
@@ -2022,8 +2022,6 @@ static HRESULT topology_loader_resolve_branch(struct topoloader_context *context
if (FAILED(IMFTopology_GetNodeByID(context->output_topology, id, &node)))
topology_loader_clone_node(context, downstream_node, &node, context->marker + 1);
- IMFTopologyNode_ConnectOutput(upstream_node, output_index, node, input_index);
-
IMFTopologyNode_GetNodeType(upstream_node, &u_type);
IMFTopologyNode_GetNodeType(downstream_node, &d_type);
@@ -2033,7 +2031,7 @@ static HRESULT topology_loader_resolve_branch(struct topoloader_context *context
return E_FAIL;
}
- return connectors[u_type][d_type](context, upstream_node, output_index, downstream_node, input_index);
+ return connectors[u_type][d_type](context, upstream_node, output_index, node, input_index);
}
static HRESULT topology_loader_resolve_nodes(struct topoloader_context *context, unsigned int *layer_size)
--
2.29.2

View File

@ -1,300 +0,0 @@
From c57374bb3b8a81524fff529b33e272234b03bb4c Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 20 Nov 2020 12:52:31 -0600
Subject: [PATCH] mf/topoloader: Implement source node to sink node branch
resolver.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/mf/topology.c | 268 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 266 insertions(+), 2 deletions(-)
diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c
index a09f6ef0ef4..4756a30895b 100644
--- a/dlls/mf/topology.c
+++ b/dlls/mf/topology.c
@@ -1992,15 +1992,279 @@ static HRESULT topology_loader_clone_node(struct topoloader_context *context, IM
return hr;
}
+struct available_output_type
+{
+ IMFMediaType *type;
+ IMFTransform *transform;
+};
+
+static HRESULT topology_loader_enumerate_output_types(GUID *category, IMFMediaType *input_type, HRESULT (*new_type)(struct available_output_type *, void *), void *context)
+{
+ MFT_REGISTER_TYPE_INFO mft_typeinfo;
+ GUID major_type, subtype;
+ IMFActivate **activates;
+ UINT32 num_activates;
+ HRESULT hr;
+
+ if (FAILED(hr = IMFMediaType_GetMajorType(input_type, &major_type)))
+ return hr;
+
+ if (FAILED(hr = IMFMediaType_GetGUID(input_type, &MF_MT_SUBTYPE, &subtype)))
+ return hr;
+
+ mft_typeinfo.guidMajorType = major_type;
+ mft_typeinfo.guidSubtype = subtype;
+
+ if (FAILED(hr = MFTEnumEx(*category, MFT_ENUM_FLAG_ALL, &mft_typeinfo, NULL, &activates, &num_activates)))
+ return hr;
+
+ hr = E_FAIL;
+
+ for (unsigned int i = 0; i < num_activates; i++)
+ {
+ IMFTransform *mft;
+
+ if (FAILED(IMFActivate_ActivateObject(activates[i], &IID_IMFTransform, (void**) &mft)))
+ {
+ IMFActivate_Release(activates[i]);
+ continue;
+ }
+
+ if (SUCCEEDED(hr = IMFTransform_SetInputType(mft, 0, input_type, 0)))
+ {
+ struct available_output_type avail = {.transform = mft};
+ unsigned int output_count = 0;
+
+ while (SUCCEEDED(IMFTransform_GetOutputAvailableType(mft, 0, output_count++, &avail.type)))
+ {
+ if (SUCCEEDED(hr = new_type(&avail, context)))
+ {
+ IMFActivate_Release(activates[i]);
+ return hr;
+ }
+ }
+ }
+
+ IMFActivate_ShutdownObject(activates[i]);
+ IMFActivate_Release(activates[i]);
+ }
+
+ return hr;
+}
+
+struct connect_to_sink_context
+{
+ struct topoloader_context *context;
+ IMFTopologyNode *src, *sink;
+ IMFMediaTypeHandler *sink_mth;
+};
+
+HRESULT connect_to_sink(struct available_output_type *type, void *context)
+{
+ IMFTopologyNode *node;
+ struct connect_to_sink_context *ctx = context;
+
+ if (SUCCEEDED(IMFMediaTypeHandler_IsMediaTypeSupported(ctx->sink_mth, type->type, NULL)))
+ {
+ MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &node);
+ IMFTopologyNode_SetObject(node, (IUnknown *) type->transform);
+ IMFTopologyNode_ConnectOutput(ctx->src, 0, node, 0);
+ IMFTopologyNode_ConnectOutput(node, 0, ctx->sink, 0);
+
+ IMFTopology_AddNode(ctx->context->output_topology, node);
+ IMFTopologyNode_Release(node);
+
+ IMFMediaTypeHandler_SetCurrentMediaType(ctx->sink_mth, type->type);
+ IMFTransform_SetOutputType(type->transform, 0, type->type, 0);
+
+ return S_OK;
+ }
+ return MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_MEDIATYPE_COMBINATION;
+}
+
+struct connect_to_converter_context
+{
+ struct connect_to_sink_context sink_ctx;
+ GUID *converter_category;
+};
+
+HRESULT connect_to_converter(struct available_output_type *type, void *context)
+{
+ struct connect_to_converter_context *ctx = context;
+ struct connect_to_sink_context sink_ctx;
+ IMFTopologyNode *node;
+ HRESULT hr;
+
+ if (SUCCEEDED(connect_to_sink(type, &ctx->sink_ctx)))
+ return S_OK;
+
+ MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &node);
+ IMFTopologyNode_SetObject(node, (IUnknown *) type->transform);
+
+ sink_ctx = ctx->sink_ctx;
+ sink_ctx.src = node;
+ if (SUCCEEDED(hr = topology_loader_enumerate_output_types(ctx->converter_category, type->type, connect_to_sink, &sink_ctx)))
+ {
+ IMFTopologyNode_ConnectOutput(ctx->sink_ctx.src, 0, node, 0);
+
+ IMFTopology_AddNode(ctx->sink_ctx.context->output_topology, node);
+
+ IMFTransform_SetOutputType(type->transform, 0, type->type, 0);
+
+ return S_OK;
+ }
+ IMFTopologyNode_Release(node);
+ return hr;
+}
+
typedef HRESULT (*p_topology_loader_connect_func)(struct topoloader_context *context, IMFTopologyNode *upstream_node,
unsigned int output_index, IMFTopologyNode *downstream_node, unsigned int input_index);
static HRESULT topology_loader_connect_source_node(struct topoloader_context *context, IMFTopologyNode *upstream_node,
unsigned int output_index, IMFTopologyNode *downstream_node, unsigned int input_index)
{
- FIXME("Unimplemented.\n");
+ UINT32 enum_src_types, src_method = 0, sink_method = MF_CONNECT_ALLOW_DECODER;
+ IMFMediaTypeHandler *src_mth = NULL, *sink_mth = NULL;
+ struct connect_to_converter_context convert_ctx;
+ unsigned int i, k, i_, k_, src_type_count;
+ GUID major_type, decode_cat, convert_cat;
+ struct connect_to_sink_context sink_ctx;
+ IMFStreamDescriptor *desc = NULL;
+ IMFStreamSink *stream_sink;
+ IMFMediaType *media_type;
+ HRESULT hr;
- return E_NOTIMPL;
+ TRACE("attempting to connect %p:%u to %p:%u\n", upstream_node, output_index, downstream_node, input_index);
+
+ IMFTopologyNode_GetUnknown(upstream_node, &MF_TOPONODE_STREAM_DESCRIPTOR, &IID_IMFStreamDescriptor, (void **)&desc);
+
+ if (FAILED(hr = IMFStreamDescriptor_GetMediaTypeHandler(desc, &src_mth)))
+ goto done;
+
+ if (FAILED(hr = IMFMediaTypeHandler_GetMediaTypeCount(src_mth, &src_type_count)))
+ goto done;
+
+ IMFTopologyNode_GetObject(downstream_node, (IUnknown **)&stream_sink);
+
+ if (FAILED(hr = IMFStreamSink_GetMediaTypeHandler(stream_sink, &sink_mth)))
+ {
+ IMFStreamSink_Release(stream_sink);
+ goto done;
+ }
+ IMFStreamSink_Release(stream_sink);
+
+ IMFTopologyNode_GetUINT32(upstream_node, &MF_TOPONODE_CONNECT_METHOD, &src_method);
+ IMFTopologyNode_GetUINT32(downstream_node, &MF_TOPONODE_CONNECT_METHOD, &sink_method);
+ IMFTopology_GetUINT32(context->input_topology, &MF_TOPOLOGY_ENUMERATE_SOURCE_TYPES, &enum_src_types);
+
+ if (FAILED(hr = IMFMediaTypeHandler_GetMajorType(src_mth, &major_type)))
+ goto done;
+
+ if (IsEqualGUID(&major_type, &MFMediaType_Audio))
+ {
+ decode_cat = MFT_CATEGORY_AUDIO_DECODER;
+ convert_cat = MFT_CATEGORY_AUDIO_EFFECT;
+ }
+ else if (IsEqualGUID(&major_type, &MFMediaType_Video))
+ {
+ decode_cat = MFT_CATEGORY_VIDEO_DECODER;
+ convert_cat = MFT_CATEGORY_VIDEO_EFFECT;
+ }
+ else
+ {
+ hr = MF_E_INVALIDTYPE;
+ goto done;
+ }
+
+ sink_ctx.context = context;
+ sink_ctx.src = upstream_node;
+ sink_ctx.sink = downstream_node;
+ sink_ctx.sink_mth = sink_mth;
+
+ convert_ctx.sink_ctx = sink_ctx;
+ convert_ctx.converter_category = &convert_cat;
+
+ i_ = (enum_src_types && src_method & MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES) ? src_type_count : 1;
+ k_ = (enum_src_types && !(src_method & MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES)) ? src_type_count : 1;
+ for(i = 0; i < i_; i++)
+ {
+ /* MF_CONNECT_DIRECT */
+ for (k = 0; k < k_; k++)
+ {
+ if (enum_src_types)
+ {
+ if (FAILED(hr = IMFMediaTypeHandler_GetMediaTypeByIndex(src_mth, i * k, &media_type))) goto done;
+ }
+ else
+ if (FAILED(hr = IMFMediaTypeHandler_GetCurrentMediaType(src_mth, &media_type))) goto done;
+
+ if (SUCCEEDED(hr = IMFMediaTypeHandler_IsMediaTypeSupported(sink_mth, media_type, NULL)))
+ {
+ IMFMediaTypeHandler_SetCurrentMediaType(src_mth, media_type);
+ IMFMediaTypeHandler_SetCurrentMediaType(sink_mth, media_type);
+ IMFTopologyNode_ConnectOutput(upstream_node, output_index, downstream_node, input_index);
+ IMFMediaType_Release(media_type);
+ goto done;
+ }
+
+ IMFMediaType_Release(media_type);
+ }
+
+ for (k = 0; k < k_; k++)
+ {
+ if (enum_src_types)
+ {
+ if (FAILED(hr = IMFMediaTypeHandler_GetMediaTypeByIndex(src_mth, i * k, &media_type))) goto done;
+ }
+ else
+ if (FAILED(hr = IMFMediaTypeHandler_GetCurrentMediaType(src_mth, &media_type))) goto done;
+
+ if (sink_method & MF_CONNECT_ALLOW_CONVERTER)
+ {
+ if (SUCCEEDED(hr = topology_loader_enumerate_output_types(&convert_cat, media_type, connect_to_sink, &sink_ctx)))
+ {
+ IMFMediaTypeHandler_SetCurrentMediaType(src_mth, media_type);
+ IMFMediaType_Release(media_type);
+ goto done;
+ }
+ }
+
+ IMFMediaType_Release(media_type);
+ }
+
+ for (k = 0; k < k_; k++)
+ {
+ if (enum_src_types)
+ {
+ if (FAILED(hr = IMFMediaTypeHandler_GetMediaTypeByIndex(src_mth, i * k, &media_type))) goto done;
+ }
+ else
+ if (FAILED(hr = IMFMediaTypeHandler_GetCurrentMediaType(src_mth, &media_type))) goto done;
+
+ if (sink_method & MF_CONNECT_ALLOW_DECODER)
+ {
+ if (SUCCEEDED(hr = topology_loader_enumerate_output_types(&decode_cat, media_type, connect_to_converter, &convert_ctx)))
+ {
+ IMFMediaTypeHandler_SetCurrentMediaType(src_mth, media_type);
+ IMFMediaType_Release(media_type);
+ goto done;
+ }
+ }
+
+ IMFMediaType_Release(media_type);
+ }
+ }
+ hr = MF_E_INVALIDMEDIATYPE;
+
+ done:
+ if (desc)
+ IMFStreamDescriptor_Release(desc);
+ if (src_mth)
+ IMFMediaTypeHandler_Release(src_mth);
+ if (sink_mth)
+ IMFMediaTypeHandler_Release(sink_mth);
+
+ return hr;
}
static HRESULT topology_loader_resolve_branch(struct topoloader_context *context, IMFTopologyNode *upstream_node,
--
2.29.2

View File

@ -1,30 +0,0 @@
From d60f2f4d4e5e4eb790e5d065afb554a008506d4f Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 20 Nov 2020 12:53:20 -0600
Subject: [PATCH] mf/topoloader: Unstub IMFTopologyLoader::Load.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/mf/topology.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c
index 4756a30895b..99f3c12f190 100644
--- a/dlls/mf/topology.c
+++ b/dlls/mf/topology.c
@@ -2430,11 +2430,9 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
break;
}
- /* For now return original topology. */
-
*ret_topology = output_topology;
- return IMFTopology_CloneFrom(output_topology, input_topology);
+ return hr;
}
static const IMFTopoLoaderVtbl topologyloadervtbl =
--
2.29.2

View File

@ -1,8 +1,8 @@
From 4de8fc9d34056aeb3307fa104bec6ca2c7748d2e Mon Sep 17 00:00:00 2001
From f3eb2b6b5484dbcc56717263e28d8eff529b8386 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 13 Mar 2019 16:02:05 -0600
Subject: kernel32: Implement CreateSymbolicLink[A|W] with ntdll reparse
points.
Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll
reparse points.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
@ -161,7 +161,7 @@ index f49af6d5bfe..bc2cd84a65d 100644
+ test_CreateSymbolicLink();
}
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index b265866ac54..caec31ce602 100644
index 7d0c4d63aa8..c9781c17d2b 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -38,6 +38,7 @@
@ -282,10 +282,10 @@ index b265866ac54..caec31ce602 100644
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
index ed632a27df2..bd2e8550d05 100644
index 54d959b694c..38f5a960521 100644
--- a/dlls/msvcp120/tests/msvcp120.c
+++ b/dlls/msvcp120/tests/msvcp120.c
@@ -1615,15 +1615,14 @@ static void test_tr2_sys__Stat(void)
@@ -1596,15 +1596,14 @@ static void test_tr2_sys__Stat(void)
char const *path;
enum file_type ret;
int err_code;
@ -306,9 +306,9 @@ index ed632a27df2..bd2e8550d05 100644
+ { "tr2_test_dir\\f1_link" , regular_file, ERROR_SUCCESS },
+ { "tr2_test_dir\\dir_link", directory_file, ERROR_SUCCESS },
};
WCHAR testW[] = {'t','r','2','_','t','e','s','t','_','d','i','r',0};
WCHAR testW2[] = {'t','r','2','_','t','e','s','t','_','d','i','r','/','f','1',0};
@@ -1668,16 +1667,14 @@ static void test_tr2_sys__Stat(void)
CreateDirectoryA("tr2_test_dir", NULL);
@@ -1647,16 +1646,14 @@ static void test_tr2_sys__Stat(void)
for(i=0; i<ARRAY_SIZE(tests); i++) {
err_code = 0xdeadbeef;
val = p_tr2_sys__Stat(tests[i].path, &err_code);
@ -327,7 +327,7 @@ index ed632a27df2..bd2e8550d05 100644
ok(tests[i].err_code == err_code, "tr2_sys__Lstat(): test %d err_code expect: %d, got %d\n",
i+1, tests[i].err_code, err_code);
}
@@ -1692,8 +1689,8 @@ static void test_tr2_sys__Stat(void)
@@ -1671,8 +1668,8 @@ static void test_tr2_sys__Stat(void)
ok(ERROR_SUCCESS == err_code, "tr2_sys__Lstat_wchar(): err_code expect ERROR_SUCCESS, got %d\n", err_code);
if(ret) {
@ -338,7 +338,7 @@ index ed632a27df2..bd2e8550d05 100644
}
ok(DeleteFileA("tr2_test_dir/f1"), "expect tr2_test_dir/f1 to exist\n");
ok(RemoveDirectoryA("tr2_test_dir"), "expect tr2_test_dir to exist\n");
@@ -1923,16 +1920,15 @@ static void test_tr2_sys__Symlink(void)
@@ -1901,16 +1898,15 @@ static void test_tr2_sys__Symlink(void)
char const *existing_path;
char const *new_path;
int last_error;
@ -363,7 +363,7 @@ index ed632a27df2..bd2e8550d05 100644
};
ret = p_tr2_sys__Make_dir("tr2_test_dir");
@@ -1957,18 +1953,17 @@ static void test_tr2_sys__Symlink(void)
@@ -1935,18 +1931,17 @@ static void test_tr2_sys__Symlink(void)
}
ok(errno == 0xdeadbeef, "tr2_sys__Symlink(): test %d errno expect 0xdeadbeef, got %d\n", i+1, errno);
@ -388,7 +388,7 @@ index ed632a27df2..bd2e8550d05 100644
ret = p_tr2_sys__Remove_dir("tr2_test_dir");
ok(ret == 1, "tr2_sys__Remove_dir(): expect 1 got %d\n", ret);
}
@@ -1982,15 +1977,14 @@ static void test_tr2_sys__Unlink(void)
@@ -1960,15 +1955,14 @@ static void test_tr2_sys__Unlink(void)
struct {
char const *path;
int last_error;
@ -411,7 +411,7 @@ index ed632a27df2..bd2e8550d05 100644
};
GetCurrentDirectoryA(MAX_PATH, current_path);
@@ -2019,9 +2013,8 @@ static void test_tr2_sys__Unlink(void)
@@ -1997,9 +1991,8 @@ static void test_tr2_sys__Unlink(void)
for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
ret = p_tr2_sys__Unlink(tests[i].path);
@ -424,35 +424,35 @@ index ed632a27df2..bd2e8550d05 100644
}
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
index 751b1beed86..382f5732c29 100644
index ae21feaf9e4..c10e925f8b3 100644
--- a/dlls/msvcp140/tests/msvcp140.c
+++ b/dlls/msvcp140/tests/msvcp140.c
@@ -803,16 +803,15 @@ static void test_Stat(void)
@@ -784,16 +784,15 @@ static void test_Stat(void)
WCHAR const *path;
enum file_type ret;
int perms;
- int is_todo;
} tests[] = {
- { NULL, file_not_found, 0xdeadbeef, FALSE },
- { test_dirW, directory_file, 0777, FALSE },
- { test_f1W, regular_file, 0777, FALSE },
- { test_f2W, regular_file, 0555, FALSE },
- { test_neW, file_not_found, 0xdeadbeef, FALSE },
- { test_invW, file_not_found, 0xdeadbeef, FALSE },
- { test_f1_linkW, regular_file, 0777, TRUE },
- { test_dir_linkW, directory_file, 0777, TRUE },
- { L"wine_test_dir", directory_file, 0777, FALSE },
- { L"wine_test_dir/f1", regular_file, 0777, FALSE },
- { L"wine_test_dir/f2", regular_file, 0555, FALSE },
- { L"wine_test_dir/ne", file_not_found, 0xdeadbeef, FALSE },
- { L"wine_test_dir\\??invalid_name>>", file_not_found, 0xdeadbeef, FALSE },
- { L"wine_test_dir\\f1_link", regular_file, 0777, TRUE },
- { L"wine_test_dir\\dir_link", directory_file, 0777, TRUE },
+ { NULL, file_not_found, 0xdeadbeef },
+ { test_dirW, directory_file, 0777 },
+ { test_f1W, regular_file, 0777 },
+ { test_f2W, regular_file, 0555 },
+ { test_neW, file_not_found, 0xdeadbeef },
+ { test_invW, file_not_found, 0xdeadbeef },
+ { test_f1_linkW, regular_file, 0777 },
+ { test_dir_linkW, directory_file, 0777 },
+ { L"wine_test_dir", directory_file, 0777 },
+ { L"wine_test_dir/f1", regular_file, 0777 },
+ { L"wine_test_dir/f2", regular_file, 0555 },
+ { L"wine_test_dir/ne", file_not_found, 0xdeadbeef },
+ { L"wine_test_dir\\??invalid_name>>", file_not_found, 0xdeadbeef },
+ { L"wine_test_dir\\f1_link", regular_file, 0777 },
+ { L"wine_test_dir\\dir_link", directory_file, 0777 },
};
GetCurrentDirectoryW(MAX_PATH, origin_path);
@@ -867,26 +866,20 @@ static void test_Stat(void)
@@ -851,26 +850,20 @@ static void test_Stat(void)
for(i=0; i<ARRAY_SIZE(tests); i++) {
perms = 0xdeadbeef;
val = p_Stat(tests[i].path, &perms);
@ -487,41 +487,42 @@ index 751b1beed86..382f5732c29 100644
}
GetSystemDirectoryW(sys_path, MAX_PATH);
@@ -898,8 +891,8 @@ static void test_Stat(void)
@@ -882,9 +875,9 @@ static void test_Stat(void)
ok(perms == expected_perms, "_Stat(): perms expect: 0%o, got 0%o\n", expected_perms, perms);
if(ret) {
- todo_wine ok(DeleteFileW(test_f1_linkW), "expect wine_test_dir/f1_link to exist\n");
- todo_wine ok(RemoveDirectoryW(test_dir_linkW), "expect wine_test_dir/dir_link to exist\n");
+ ok(DeleteFileW(test_f1_linkW), "expect wine_test_dir/f1_link to exist\n");
+ ok(RemoveDirectoryW(test_dir_linkW), "expect wine_test_dir/dir_link to exist\n");
- todo_wine ok(DeleteFileW(L"wine_test_dir\\f1_link"),
+ ok(DeleteFileW(L"wine_test_dir\\f1_link"),
"expect wine_test_dir/f1_link to exist\n");
- todo_wine ok(RemoveDirectoryW(L"wine_test_dir\\dir_link"),
+ ok(RemoveDirectoryW(L"wine_test_dir\\dir_link"),
"expect wine_test_dir/dir_link to exist\n");
}
ok(DeleteFileW(test_f1W), "expect wine_test_dir/f1 to exist\n");
SetFileAttributesW(test_f2W, FILE_ATTRIBUTE_NORMAL);
@@ -1044,15 +1037,14 @@ static void test_Unlink(void)
ok(DeleteFileW(L"wine_test_dir/f1"), "expect wine_test_dir/f1 to exist\n");
@@ -1003,15 +996,14 @@ static void test_Unlink(void)
struct {
WCHAR const *path;
int last_error;
- MSVCP_bool is_todo;
} tests[] = {
- { f1_symlinkW, ERROR_SUCCESS, TRUE },
- { f1_linkW, ERROR_SUCCESS, FALSE },
- { f1W, ERROR_SUCCESS, FALSE },
- { wine_test_dirW, ERROR_ACCESS_DENIED, FALSE },
- { not_existW, ERROR_FILE_NOT_FOUND, FALSE },
- { not_exist_fileW, ERROR_PATH_NOT_FOUND, FALSE },
- { L"wine_test_dir\\f1_symlink", ERROR_SUCCESS, TRUE },
- { L"wine_test_dir\\f1_link", ERROR_SUCCESS, FALSE },
- { L"wine_test_dir\\f1", ERROR_SUCCESS, FALSE },
- { L"wine_test_dir", ERROR_ACCESS_DENIED, FALSE },
- { L"not_exist", ERROR_FILE_NOT_FOUND, FALSE },
- { L"not_exist_dir\\not_exist_file", ERROR_PATH_NOT_FOUND, FALSE },
- { NULL, ERROR_PATH_NOT_FOUND, FALSE }
+ { f1_symlinkW, ERROR_SUCCESS },
+ { f1_linkW, ERROR_SUCCESS },
+ { f1W, ERROR_SUCCESS },
+ { wine_test_dirW, ERROR_ACCESS_DENIED },
+ { not_existW, ERROR_FILE_NOT_FOUND },
+ { not_exist_fileW, ERROR_PATH_NOT_FOUND },
+ { L"wine_test_dir\\f1_symlink", ERROR_SUCCESS },
+ { L"wine_test_dir\\f1_link", ERROR_SUCCESS },
+ { L"wine_test_dir\\f1", ERROR_SUCCESS },
+ { L"wine_test_dir", ERROR_ACCESS_DENIED },
+ { L"not_exist", ERROR_FILE_NOT_FOUND },
+ { L"not_exist_dir\\not_exist_file", ERROR_PATH_NOT_FOUND },
+ { NULL, ERROR_PATH_NOT_FOUND }
};
GetCurrentDirectoryW(MAX_PATH, current_path);
@@ -1081,9 +1073,8 @@ static void test_Unlink(void)
@@ -1040,9 +1032,8 @@ static void test_Unlink(void)
for(i=0; i<ARRAY_SIZE(tests); i++) {
errno = 0xdeadbeef;
ret = p_Unlink(tests[i].path);
@ -534,5 +535,5 @@ index 751b1beed86..382f5732c29 100644
}
--
2.17.1
2.29.2

View File

@ -1,7 +1,7 @@
From 6eed7c952dbb0e7151723881dc26e955b9d9595d Mon Sep 17 00:00:00 2001
From 4878d1414a8fa7c87d59625488a7ad0bb64e5e62 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 29 May 2019 15:18:50 -0600
Subject: wcmd: Display reparse point type in directory listings.
Subject: [PATCH] wcmd: Display reparse point type in directory listings.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
@ -9,11 +9,11 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
1 file changed, 26 insertions(+)
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c
index 2d35f8eb1d1..5b7416ce72a 100644
index 24b18bfa81b..523139d5fe0 100644
--- a/programs/cmd/directory.c
+++ b/programs/cmd/directory.c
@@ -400,6 +400,32 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
WCMD_output(L"%1!*s!", cur_width - tmp_width, nullW);
@@ -395,6 +395,32 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
WCMD_output(L"%1!*s!", cur_width - tmp_width, L"");
}
+ } else if (fd[i].dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
@ -30,13 +30,13 @@ index 2d35f8eb1d1..5b7416ce72a 100644
+ break;
+ }
+ WCMD_output (L"%1!10s! %2!8s! %3!-14s!", datestring, timestring, type);
+ if (shortname) WCMD_output (fmt2, fd[i].cAlternateFileName);
+ if (usernames) WCMD_output (fmt3, username);
+ WCMD_output(fmt4,fd[i].cFileName);
+ if (shortname) WCMD_output (L"%1!-13s!", fd[i].cAlternateFileName);
+ if (usernames) WCMD_output (L"%1!-23s!", username);
+ WCMD_output(L"%1",fd[i].cFileName);
+ } else {
+ if (!((lstrcmpW(fd[i].cFileName, dotW) == 0) ||
+ (lstrcmpW(fd[i].cFileName, dotdotW) == 0))) {
+ WCMD_output (fmt5, recurse?inputparms->dirName:nullW, fd[i].cFileName);
+ if (!((lstrcmpW(fd[i].cFileName, L".") == 0) ||
+ (lstrcmpW(fd[i].cFileName, L"..") == 0))) {
+ WCMD_output (L"%1%2", recurse?inputparms->dirName : L"", fd[i].cFileName);
+ } else {
+ addNewLine = FALSE;
+ }
@ -46,5 +46,5 @@ index 2d35f8eb1d1..5b7416ce72a 100644
dir_count++;
--
2.17.1
2.29.2

View File

@ -1,15 +1,15 @@
From 73ac626fc54665899c44bbfa11f22e4877480796 Mon Sep 17 00:00:00 2001
From 99e0d91c314c2463e7e44599173ba383423fc1b9 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 29 May 2019 15:38:30 -0600
Subject: wcmd: Show reparse point target in directory listing.
Subject: [PATCH] wcmd: Show reparse point target in directory listing.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
programs/cmd/directory.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
programs/cmd/directory.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c
index 5b7416ce72a..6769491b888 100644
index 658eb93e5b4..1b548d56a48 100644
--- a/programs/cmd/directory.c
+++ b/programs/cmd/directory.c
@@ -23,6 +23,8 @@
@ -21,18 +21,10 @@ index 5b7416ce72a..6769491b888 100644
WINE_DEFAULT_DEBUG_CHANNEL(cmd);
@@ -256,6 +258,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
static const WCHAR fmt3[] = {'%','1','!','-','2','3','s','!','\0'};
static const WCHAR fmt4[] = {'%','1','\0'};
static const WCHAR fmt5[] = {'%','1','%','2','\0'};
+ static const WCHAR fmt6[] = {' ','[','%','1',']','\0'};
dir_count = 0;
file_count = 0;
@@ -417,6 +420,39 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
if (shortname) WCMD_output (fmt2, fd[i].cAlternateFileName);
if (usernames) WCMD_output (fmt3, username);
WCMD_output(fmt4,fd[i].cFileName);
@@ -412,6 +414,39 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
if (shortname) WCMD_output (L"%1!-13s!", fd[i].cAlternateFileName);
if (usernames) WCMD_output (L"%1!-23s!", username);
WCMD_output(L"%1",fd[i].cFileName);
+ if (fd[i].dwReserved0) {
+ REPARSE_DATA_BUFFER *buffer = NULL;
+ WCHAR *target = NULL;
@ -63,12 +55,12 @@ index 5b7416ce72a..6769491b888 100644
+ }
+ }
+ CloseHandle(hlink);
+ if (target) WCMD_output(fmt6, target);
+ if (target) WCMD_output(L" [%1]", target);
+ HeapFree(GetProcessHeap(), 0, buffer);
+ }
} else {
if (!((lstrcmpW(fd[i].cFileName, dotW) == 0) ||
(lstrcmpW(fd[i].cFileName, dotdotW) == 0))) {
if (!((lstrcmpW(fd[i].cFileName, L".") == 0) ||
(lstrcmpW(fd[i].cFileName, L"..") == 0))) {
--
2.17.1
2.29.2

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "cbca9f847f60773b4e7e5408f6a079f4896c5c1e"
echo "2ad09b01673381261815bfc804a2f69ce4d85f86"
}
# Show version information
@ -2752,9 +2752,8 @@ fi
# | * [#49692] Multiple applications need a Media Foundation media source implementation
# |
# | Modified files:
# | * dlls/mf/Makefile.in, dlls/mf/handler.c, dlls/mf/handler.h, dlls/mf/main.c, dlls/mf/session.c, dlls/mf/tests/Makefile.in,
# | dlls/mf/tests/mf.c, dlls/mf/tests/resource.rc, dlls/mf/topology.c, dlls/mfplat/tests/mfplat.c,
# | dlls/mfplat/tests/test.mp4, dlls/mfreadwrite/reader.c, dlls/mfreadwrite/tests/mfplat.c,
# | * dlls/mf/Makefile.in, dlls/mf/handler.c, dlls/mf/handler.h, dlls/mf/main.c, dlls/mf/session.c,
# | dlls/mfplat/tests/mfplat.c, dlls/mfplat/tests/test.mp4, dlls/mfreadwrite/reader.c, dlls/mfreadwrite/tests/mfplat.c,
# | dlls/mfreadwrite/tests/resource.rc, dlls/mfreadwrite/tests/test.mp4, dlls/winegstreamer/Makefile.in,
# | dlls/winegstreamer/audioconvert.c, dlls/winegstreamer/colorconvert.c, dlls/winegstreamer/gst_cbs.c,
# | dlls/winegstreamer/gst_cbs.h, dlls/winegstreamer/gst_private.h, dlls/winegstreamer/main.c,
@ -2762,10 +2761,6 @@ fi
# | dlls/winegstreamer/winegstreamer_classes.idl, include/mfidl.idl, tools/make_makefiles, tools/makedep.c
# |
if test "$enable_mfplat_streaming_support" -eq 1; then
patch_apply mfplat-streaming-support/0001-mf-topoloader-Add-partial-topology-resolution-tests.patch
patch_apply mfplat-streaming-support/0002-mf-topoloader-Move-node-connection-responsibility-to.patch
patch_apply mfplat-streaming-support/0003-mf-topoloader-Implement-source-node-to-sink-node-bra.patch
patch_apply mfplat-streaming-support/0004-mf-topoloader-Unstub-IMFTopologyLoader-Load.patch
patch_apply mfplat-streaming-support/0005-winegstreamer-Introduce-audio-conversion-transform.patch
patch_apply mfplat-streaming-support/0006-winegstreamer-Implement-Set-Input-Output-Type-for-au.patch
patch_apply mfplat-streaming-support/0007-winegstreamer-Implement-Process-Input-Output-for-aud.patch
@ -4118,8 +4113,8 @@ fi
# | Modified files:
# | * dlls/user32/input.c, dlls/user32/user32.spec, dlls/wineandroid.drv/keyboard.c, dlls/wineandroid.drv/window.c,
# | dlls/winemac.drv/ime.c, dlls/winemac.drv/keyboard.c, dlls/winemac.drv/mouse.c, dlls/winex11.drv/event.c,
# | dlls/winex11.drv/keyboard.c, dlls/winex11.drv/mouse.c, dlls/winex11.drv/x11drv.h, dlls/winex11.drv/x11drv_main.c,
# | include/winuser.h, server/protocol.def, server/queue.c
# | dlls/winex11.drv/keyboard.c, dlls/winex11.drv/mouse.c, dlls/winex11.drv/window.c, dlls/winex11.drv/x11drv.h,
# | dlls/winex11.drv/x11drv_main.c, include/winuser.h, server/protocol.def, server/queue.c
# |
if test "$enable_user32_rawinput_mouse" -eq 1; then
patch_apply user32-rawinput-mouse/0006-server-Add-send_hardware_message-flags-for-rawinput-.patch
@ -4127,6 +4122,7 @@ if test "$enable_user32_rawinput_mouse" -eq 1; then
patch_apply user32-rawinput-mouse/0008-winex11.drv-Advertise-XInput2-version-2.1-support.patch
patch_apply user32-rawinput-mouse/0009-winex11.drv-Keep-track-of-pointer-and-device-button-.patch
patch_apply user32-rawinput-mouse/0010-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch
patch_apply user32-rawinput-mouse/0011-winex11.drv-Move-header-order.patch
fi
# Patchset user32-rawinput-hid

View File

@ -0,0 +1,36 @@
From b8cfcfa8e3b7694102462b6d3d59ee7919897a00 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 1 Dec 2020 10:19:00 +1100
Subject: [PATCH] winex11.drv: Move header order
The HAVE_X11_EXTENSIONS_XINPUT2_H needs to be moved into each of the files
to avoid a compile error with Status being undefined.
---
dlls/winex11.drv/window.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 1e9d63ae808..22a330b3f88 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -37,6 +37,8 @@
#include <X11/extensions/shape.h>
#endif /* HAVE_LIBXSHAPE */
+#include "x11drv.h"
+
/* avoid conflict with field names in included win32 headers */
#undef Status
#include "windef.h"
@@ -45,7 +47,7 @@
#include "winuser.h"
#include "wine/unicode.h"
-#include "x11drv.h"
+
#include "wine/debug.h"
#include "wine/server.h"
#include "mwm.h"
--
2.29.2

View File

@ -1 +1 @@
cbca9f847f60773b4e7e5408f6a079f4896c5c1e
2ad09b01673381261815bfc804a2f69ce4d85f86