mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
Merge branch 'mr/feat-network-byte-stream' into 'master'
Mfplat HTTP byte stream implementation See merge request wine/wine!6733
This commit is contained in:
commit
c3aa8cb654
13 changed files with 2801 additions and 47 deletions
|
@ -549,6 +549,7 @@ static const IClassFactoryVtbl class_factory_vtbl =
|
|||
};
|
||||
|
||||
static struct class_factory file_scheme_handler_factory = { { &class_factory_vtbl }, file_scheme_handler_construct };
|
||||
static struct class_factory http_scheme_handler_factory = { { &class_factory_vtbl }, http_scheme_handler_construct };
|
||||
static struct class_factory urlmon_scheme_handler_factory = { { &class_factory_vtbl }, urlmon_scheme_handler_construct };
|
||||
|
||||
static const struct class_object
|
||||
|
@ -559,6 +560,7 @@ static const struct class_object
|
|||
class_objects[] =
|
||||
{
|
||||
{ &CLSID_FileSchemePlugin, &file_scheme_handler_factory.IClassFactory_iface },
|
||||
{ &CLSID_HttpSchemePlugin, &http_scheme_handler_factory.IClassFactory_iface },
|
||||
{ &CLSID_UrlmonSchemePlugin, &urlmon_scheme_handler_factory.IClassFactory_iface },
|
||||
};
|
||||
|
||||
|
|
|
@ -25,6 +25,12 @@
|
|||
]
|
||||
coclass FileSchemePlugin { }
|
||||
|
||||
[
|
||||
threading(both),
|
||||
uuid(44cb442b-9da9-49df-b3fd-023777b16e50)
|
||||
]
|
||||
coclass HttpSchemePlugin {}
|
||||
|
||||
[
|
||||
threading(both),
|
||||
uuid(9ec4b4f9-3029-45ad-947b-344de2a249e2)
|
||||
|
|
|
@ -14,11 +14,23 @@ HKLM
|
|||
}
|
||||
'http:'
|
||||
{
|
||||
val '{9ec4b4f9-3029-45ad-947b-344de2a249e2}' = s 'Urlmon Scheme Handler'
|
||||
val '{44cb442b-9da9-49df-b3fd-023777b16e50}' = s 'Http Scheme Handler'
|
||||
}
|
||||
'https:'
|
||||
{
|
||||
val '{9ec4b4f9-3029-45ad-947b-344de2a249e2}' = s 'Urlmon Scheme Handler'
|
||||
val '{44cb442b-9da9-49df-b3fd-023777b16e50}' = s 'Http Scheme Handler'
|
||||
}
|
||||
'httpd:'
|
||||
{
|
||||
val '{44cb442b-9da9-49df-b3fd-023777b16e50}' = s 'Http Scheme Handler'
|
||||
}
|
||||
'httpsd:'
|
||||
{
|
||||
val '{44cb442b-9da9-49df-b3fd-023777b16e50}' = s 'Http Scheme Handler'
|
||||
}
|
||||
'mms:'
|
||||
{
|
||||
val '{44cb442b-9da9-49df-b3fd-023777b16e50}' = s 'Http Scheme Handler'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,6 +114,7 @@ static inline const char *debugstr_propvar(const PROPVARIANT *v)
|
|||
}
|
||||
|
||||
extern HRESULT file_scheme_handler_construct(REFIID riid, void **obj);
|
||||
extern HRESULT http_scheme_handler_construct(REFIID riid, void **obj);
|
||||
extern HRESULT urlmon_scheme_handler_construct(REFIID riid, void **obj);
|
||||
|
||||
extern BOOL mf_is_sample_copier_transform(IMFTransform *transform);
|
||||
|
|
|
@ -483,6 +483,39 @@ HRESULT file_scheme_handler_construct(REFIID riid, void **obj)
|
|||
return hr;
|
||||
}
|
||||
|
||||
WINAPI HRESULT __wine_create_http_bytestream(const WCHAR *url, void **out);
|
||||
|
||||
static HRESULT http_stream_create(const WCHAR *url, DWORD flags, IMFByteStream **out)
|
||||
{
|
||||
if (flags & MF_RESOLUTION_WRITE)
|
||||
return E_INVALIDARG;
|
||||
|
||||
return __wine_create_http_bytestream(url, (void **)out);
|
||||
}
|
||||
|
||||
HRESULT http_scheme_handler_construct(REFIID riid, void **obj)
|
||||
{
|
||||
struct scheme_handler *handler;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%s, %p.\n", debugstr_guid(riid), obj);
|
||||
|
||||
if (!(handler = calloc(1, sizeof(*handler))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
handler->IMFSchemeHandler_iface.lpVtbl = &scheme_handler_vtbl;
|
||||
handler->IMFAsyncCallback_iface.lpVtbl = &scheme_handler_callback_vtbl;
|
||||
handler->refcount = 1;
|
||||
list_init(&handler->results);
|
||||
InitializeCriticalSection(&handler->cs);
|
||||
handler->create_stream = http_stream_create;
|
||||
|
||||
hr = IMFSchemeHandler_QueryInterface(&handler->IMFSchemeHandler_iface, riid, obj);
|
||||
IMFSchemeHandler_Release(&handler->IMFSchemeHandler_iface);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT urlmon_stream_create(const WCHAR *url, DWORD flags, IMFByteStream **out)
|
||||
{
|
||||
IMFAttributes *attributes;
|
||||
|
|
|
@ -4722,6 +4722,7 @@ static void test_evr(void)
|
|||
|
||||
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
if (!sink) return;
|
||||
|
||||
check_interface(sink, &IID_IMFMediaSinkPreroll, TRUE);
|
||||
check_interface(sink, &IID_IMFVideoRenderer, TRUE);
|
||||
|
@ -5379,7 +5380,6 @@ static void test_scheme_resolvers(void)
|
|||
for (i = 0; i < ARRAY_SIZE(urls); i++)
|
||||
{
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, urls[i], MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine_if(i >= 2)
|
||||
ok(hr == S_OK, "got hr %#lx\n", hr);
|
||||
if (hr != S_OK)
|
||||
continue;
|
||||
|
@ -5403,7 +5403,6 @@ static void test_scheme_resolvers(void)
|
|||
hr = IMFAttributes_GetItem(attributes, &MF_BYTESTREAM_CONTENT_TYPE, NULL);
|
||||
ok(hr == S_OK, "got hr %#lx\n", hr);
|
||||
hr = IMFAttributes_GetItem(attributes, &MF_BYTESTREAM_LAST_MODIFIED_TIME, NULL);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "got hr %#lx\n", hr);
|
||||
IMFAttributes_Release(attributes);
|
||||
|
||||
|
@ -5411,8 +5410,7 @@ static void test_scheme_resolvers(void)
|
|||
ok(hr == S_OK, "got hr %#lx\n", hr);
|
||||
hr = IMFByteStream_GetCapabilities(byte_stream, &caps);
|
||||
ok(hr == S_OK, "got hr %#lx\n", hr);
|
||||
todo_wine
|
||||
ok(caps == (expect_caps | MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED)
|
||||
ok(caps == expect_caps || caps == (expect_caps | MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED)
|
||||
|| caps == (expect_caps | MFBYTESTREAM_DOES_NOT_USE_NETWORK),
|
||||
"got caps %#lx\n", caps);
|
||||
hr = IMFByteStream_GetLength(byte_stream, &length);
|
||||
|
@ -5431,35 +5429,25 @@ static void test_scheme_resolvers(void)
|
|||
ok(hr == MF_E_UNSUPPORTED_BYTESTREAM_TYPE, "got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://test.winehq.bla/tests/test.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == NS_E_SERVER_NOT_FOUND, "got hr %#lx\n", hr);
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"https://test.winehq.bla/tests/test.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == WININET_E_NAME_NOT_RESOLVED, "got hr %#lx\n", hr);
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"httpd://test.winehq.bla/tests/test.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == WININET_E_NAME_NOT_RESOLVED, "got hr %#lx\n", hr);
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"httpsd://test.winehq.bla/tests/test.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == WININET_E_NAME_NOT_RESOLVED, "got hr %#lx\n", hr);
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"mms://test.winehq.bla/tests/test.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == WININET_E_NAME_NOT_RESOLVED, "got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == NS_E_FILE_NOT_FOUND, "got hr %#lx\n", hr);
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"https://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == NS_E_FILE_NOT_FOUND, "got hr %#lx\n", hr);
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"httpd://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == NS_E_FILE_NOT_FOUND, "got hr %#lx\n", hr);
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"httpsd://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == NS_E_FILE_NOT_FOUND, "got hr %#lx\n", hr);
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"mms://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &type, &object);
|
||||
todo_wine
|
||||
ok(hr == MF_E_UNSUPPORTED_BYTESTREAM_TYPE, "got hr %#lx\n", hr);
|
||||
|
||||
IMFSourceResolver_Release(resolver);
|
||||
|
@ -6623,6 +6611,334 @@ static void test_media_session_Close(void)
|
|||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
}
|
||||
|
||||
static void test_network_bytestream(void)
|
||||
{
|
||||
static const WCHAR *URL = L"http://test.winehq.org/tests/test.mp3";
|
||||
static const WCHAR *EFFECTIVE_URL = L"http://test.winehq.org:80/tests/test.mp3";
|
||||
static const WCHAR *CONTENT_TYPE = L"audio/mpeg";
|
||||
static const BYTE LAST_MODIFIED_TIME[] = { 0x00, 0x3b, 0x4b, 0xbf, 0x05, 0x80, 0xd8, 0x01 };
|
||||
|
||||
IMFSourceResolver *resolver;
|
||||
IUnknown *object = NULL, *bs = NULL;
|
||||
MF_OBJECT_TYPE obj_type;
|
||||
HRESULT hr;
|
||||
void *ptr;
|
||||
|
||||
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL);
|
||||
ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
|
||||
|
||||
hr = MFCreateSourceResolver(&resolver);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
|
||||
if (object) IUnknown_Release(object);
|
||||
|
||||
obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
|
||||
object = NULL;
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://nonexistent.url/file.mp4", MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
|
||||
ok(hr == NS_E_SERVER_NOT_FOUND, "Got hr %#lx.\n", hr);
|
||||
ok(obj_type == MF_OBJECT_INVALID, "Unexpected obj_type %#x.\n", obj_type);
|
||||
if (object) IUnknown_Release(object);
|
||||
|
||||
obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
|
||||
object = NULL;
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"http://test.winehq.org/tests/invalid.mp3", MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
|
||||
ok(hr == NS_E_FILE_NOT_FOUND, "Got hr %#lx.\n", hr);
|
||||
ok(obj_type == MF_OBJECT_INVALID, "Unexpected obj_type %#x.\n", obj_type);
|
||||
if (object) IUnknown_Release(object);
|
||||
|
||||
obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
|
||||
object = NULL;
|
||||
hr = IMFSourceResolver_CreateObjectFromURL(resolver, URL, MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(obj_type == MF_OBJECT_BYTESTREAM, "Unexpected obj_type %#x.\n", obj_type);
|
||||
|
||||
ptr = NULL;
|
||||
hr = IUnknown_QueryInterface(object, &IID_IMFAttributes, &ptr);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
if (SUCCEEDED(hr) && ptr)
|
||||
{
|
||||
IMFAttributes *attr = ptr;
|
||||
UINT32 count = 0;
|
||||
PROPVARIANT var;
|
||||
GUID key = {0};
|
||||
|
||||
hr = IMFAttributes_GetCount(attr, &count);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
ok(count == 3, "count = %u\n", count);
|
||||
|
||||
PropVariantInit(&var);
|
||||
|
||||
hr = IMFAttributes_GetItemByIndex(attr, 0, &key, &var);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
ok(IsEqualGUID(&key, &MF_BYTESTREAM_EFFECTIVE_URL), "Got key %s\n", debugstr_guid(&key));
|
||||
ok(var.vt == VT_LPWSTR, "Got type %d\n", var.vt);
|
||||
ok(!lstrcmpW(var.pwszVal, EFFECTIVE_URL), "Got value %s\n", var.pszVal);
|
||||
memset(&key, 0, sizeof(key));
|
||||
PropVariantClear(&var);
|
||||
|
||||
hr = IMFAttributes_GetItemByIndex(attr, 1, &key, &var);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
ok(IsEqualGUID(&key, &MF_BYTESTREAM_CONTENT_TYPE), "Got key %s\n", debugstr_guid(&key));
|
||||
ok(var.vt == VT_LPWSTR, "Got type %d\n", var.vt);
|
||||
ok(!lstrcmpW(var.pwszVal, CONTENT_TYPE), "Got value %s\n", var.pszVal);
|
||||
memset(&key, 0, sizeof(key));
|
||||
PropVariantClear(&var);
|
||||
|
||||
hr = IMFAttributes_GetItemByIndex(attr, 2, &key, &var);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
ok(IsEqualGUID(&key, &MF_BYTESTREAM_LAST_MODIFIED_TIME), "Got key %s\n", debugstr_guid(&key));
|
||||
ok(var.vt == (VT_VECTOR | VT_I1 | VT_NULL), "Got type %d\n", var.vt);
|
||||
ok(var.blob.cbSize == sizeof(LAST_MODIFIED_TIME), "Got size %lu\n", var.blob.cbSize);
|
||||
ok(var.blob.pBlobData != NULL, "Got NULL value\n");
|
||||
if (var.blob.cbSize == sizeof(LAST_MODIFIED_TIME) && var.blob.pBlobData)
|
||||
ok(!memcmp(var.blob.pBlobData, LAST_MODIFIED_TIME, sizeof(LAST_MODIFIED_TIME)), "Got wrong value\n");
|
||||
memset(&key, 0, sizeof(key));
|
||||
PropVariantClear(&var);
|
||||
|
||||
hr = IMFAttributes_GetItemByIndex(attr, 3, &key, &var);
|
||||
ok(hr == E_INVALIDARG, "Got hr %#lx\n", hr);
|
||||
ok(IsEqualGUID(&key, &GUID_NULL), "Got key %s\n", debugstr_guid(&key));
|
||||
ok(var.vt == VT_EMPTY, "Got type %d\n", var.vt);
|
||||
memset(&key, 0, sizeof(key));
|
||||
PropVariantClear(&var);
|
||||
|
||||
IUnknown_Release((IUnknown *)ptr);
|
||||
}
|
||||
|
||||
ptr = NULL;
|
||||
hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamCacheControl, &ptr);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
if (SUCCEEDED(hr) && ptr)
|
||||
{
|
||||
IMFByteStreamCacheControl *ctrl = ptr;
|
||||
HRESULT hr;
|
||||
|
||||
hr = IMFByteStreamCacheControl_StopBackgroundTransfer(ctrl);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
|
||||
IMFByteStreamCacheControl_Release(ctrl);
|
||||
}
|
||||
|
||||
ptr = NULL;
|
||||
hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamBuffering, &ptr);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
if (SUCCEEDED(hr) && ptr)
|
||||
{
|
||||
MFBYTESTREAM_BUFFERING_PARAMS params = {0};
|
||||
IMFByteStreamBuffering *buffering = ptr;
|
||||
MF_LEAKY_BUCKET_PAIR bucket = {0};
|
||||
HRESULT hr;
|
||||
|
||||
hr = IMFByteStreamBuffering_StopBuffering(buffering);
|
||||
ok(hr == S_FALSE, "Got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFByteStreamBuffering_EnableBuffering(buffering, FALSE);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFByteStreamBuffering_EnableBuffering(buffering, TRUE);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFByteStreamBuffering_StopBuffering(buffering);
|
||||
ok(hr == S_OK || hr == S_FALSE, "Got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFByteStreamBuffering_SetBufferingParams(buffering, NULL);
|
||||
ok(hr == E_INVALIDARG, "Got hr %#lx\n", hr);
|
||||
|
||||
params.cbTotalFileSize = -1;
|
||||
params.cbPlayableDataSize = -1;
|
||||
params.prgBuckets = NULL;
|
||||
params.cBuckets = 0;
|
||||
params.qwNetBufferingTime = 0;
|
||||
params.qwExtraBufferingTimeDuringSeek = 0;
|
||||
params.qwPlayDuration = 0;
|
||||
params.dRate = 1.0f;
|
||||
hr = IMFByteStreamBuffering_SetBufferingParams(buffering, ¶ms);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
|
||||
params.cBuckets = 1;
|
||||
hr = IMFByteStreamBuffering_SetBufferingParams(buffering, ¶ms);
|
||||
ok(hr == E_INVALIDARG, "Got hr %#lx\n", hr);
|
||||
|
||||
params.prgBuckets = &bucket;
|
||||
bucket.dwBitrate = 0;
|
||||
bucket.msBufferWindow = 0;
|
||||
hr = IMFByteStreamBuffering_SetBufferingParams(buffering, ¶ms);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
|
||||
params.cbTotalFileSize = 0xdeadbeef;
|
||||
params.cbPlayableDataSize = 0xdeadbeef;
|
||||
bucket.dwBitrate = 0xdeadbeef;
|
||||
bucket.msBufferWindow = 0xdeadbeef;
|
||||
params.qwNetBufferingTime = 0xdeadbeef;
|
||||
params.qwExtraBufferingTimeDuringSeek = 0xdeadbeef;
|
||||
params.qwPlayDuration = 0xdeadbeef;
|
||||
params.dRate = 12345.0f;
|
||||
hr = IMFByteStreamBuffering_SetBufferingParams(buffering, ¶ms);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFByteStreamBuffering_EnableBuffering(buffering, TRUE);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
|
||||
IMFByteStreamBuffering_Release(buffering);
|
||||
}
|
||||
|
||||
ptr = NULL;
|
||||
hr = IUnknown_QueryInterface(object, &IID_IMFByteStreamTimeSeek, &ptr);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
if (SUCCEEDED(hr) && ptr)
|
||||
{
|
||||
QWORD start_time = 0xdeadbeef, stop_time = 0xdeadbef0, duration = 0xdeadbef1;
|
||||
IMFByteStreamTimeSeek *seek = ptr;
|
||||
BOOL b = 0xdeadbeef;
|
||||
HRESULT hr;
|
||||
|
||||
hr = IMFByteStreamTimeSeek_GetTimeSeekResult(seek, NULL, NULL, NULL);
|
||||
ok(hr == E_INVALIDARG, "Got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFByteStreamTimeSeek_GetTimeSeekResult(seek, &start_time, &stop_time, &duration);
|
||||
ok(hr == MF_E_INVALIDREQUEST, "Got hr %#lx\n", hr);
|
||||
ok(start_time == 0, "start_time = %I64u\n", start_time);
|
||||
ok(stop_time == 0, "stop_time = %I64u\n", stop_time);
|
||||
ok(duration == 0, "duration = %I64u\n", duration);
|
||||
|
||||
hr = IMFByteStreamTimeSeek_IsTimeSeekSupported(seek, NULL);
|
||||
ok(hr == S_FALSE, "Got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFByteStreamTimeSeek_IsTimeSeekSupported(seek, &b);
|
||||
ok(hr == S_FALSE, "Got hr %#lx\n", hr);
|
||||
ok(!b, "supported = %x\n", b);
|
||||
|
||||
hr = IMFByteStreamTimeSeek_TimeSeek(seek, 0);
|
||||
ok(hr == MF_E_INVALIDREQUEST, "Got hr %#lx\n", hr);
|
||||
|
||||
hr = IMFByteStreamTimeSeek_GetTimeSeekResult(seek, &start_time, &stop_time, &duration);
|
||||
ok(hr == MF_E_INVALIDREQUEST, "Got hr %#lx\n", hr);
|
||||
ok(start_time == 0, "start_time = %I64u\n", start_time);
|
||||
ok(stop_time == 0, "stop_time = %I64u\n", stop_time);
|
||||
ok(duration == 0, "duration = %I64u\n", duration);
|
||||
|
||||
IMFByteStreamTimeSeek_Release(seek);
|
||||
}
|
||||
|
||||
{
|
||||
BYTE *tmp = malloc(8192);
|
||||
ULONG read = 0, written = 0;
|
||||
QWORD len = 0;
|
||||
|
||||
hr = IMFByteStream_SetLength((IMFByteStream*)object, 1000);
|
||||
ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
|
||||
|
||||
hr = IMFByteStream_SetCurrentPosition((IMFByteStream*)object, 1000);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
|
||||
hr = IMFByteStream_Read((IMFByteStream*)object, tmp, 8192, &read);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(read == 3365, "read = %lu\n", read);
|
||||
|
||||
hr = IMFByteStream_SetCurrentPosition((IMFByteStream*)object, 1000);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
|
||||
hr = IMFByteStream_Write((IMFByteStream*)object, tmp, 1000, &written);
|
||||
ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
|
||||
ok(written == 0, "written = %lu\n", written);
|
||||
|
||||
hr = IMFByteStream_BeginWrite((IMFByteStream*)object, tmp, 1000, (void *)(DWORD_PTR)0xdeadbeef, NULL);
|
||||
ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
|
||||
|
||||
free(tmp);
|
||||
|
||||
hr = IMFByteStream_GetLength((IMFByteStream*)object, &len);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
ok(len != 0, "len = %I64u\n", len);
|
||||
|
||||
hr = IMFByteStream_Flush((IMFByteStream*)object);
|
||||
ok(hr == S_OK, "Got hr %#lx\n", hr);
|
||||
}
|
||||
|
||||
ptr = NULL;
|
||||
hr = MFGetService(object, &MFNETSOURCE_STATISTICS_SERVICE, &IID_IPropertyStore, &ptr);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
if (SUCCEEDED(hr) && ptr)
|
||||
{
|
||||
IPropertyStore *pstore = ptr;
|
||||
DWORD count = 0;
|
||||
|
||||
ptr = NULL;
|
||||
hr = IUnknown_QueryInterface(object, &IID_IPropertyStore, &ptr);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(ptr == (void *)pstore, "Got different IPropertyStore: %p != %p.\n", ptr, pstore);
|
||||
IPropertyStore_Release((IPropertyStore *)ptr);
|
||||
|
||||
hr = IPropertyStore_GetCount(pstore, &count);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(count == 0, "Got count %lu.\n", count);
|
||||
|
||||
IPropertyStore_Release(pstore);
|
||||
}
|
||||
|
||||
ptr = NULL;
|
||||
hr = IUnknown_QueryInterface(object, &IID_IMFMediaEventGenerator, &ptr);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(ptr != NULL, "Got NULL ptr.\n");
|
||||
if (SUCCEEDED(hr) && ptr)
|
||||
{
|
||||
IMFMediaEvent *evt = (void *)(DWORD_PTR)0xdeadbeef;
|
||||
BOOL seen_caps_changed = FALSE, buffering = FALSE;
|
||||
IMFMediaEventGenerator *gen = ptr;
|
||||
MediaEventType type;
|
||||
HRESULT hr;
|
||||
|
||||
while (SUCCEEDED(hr = IMFMediaEventGenerator_GetEvent(gen, MF_EVENT_FLAG_NO_WAIT, &evt)))
|
||||
{
|
||||
type = (MediaEventType)0xdeadbeef;
|
||||
hr = IMFMediaEvent_GetType(evt, &type);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
|
||||
if (type == MEByteStreamCharacteristicsChanged)
|
||||
{
|
||||
ok(!seen_caps_changed, "got multiple MEByteStreamCharacteristicsChanged events\n");
|
||||
seen_caps_changed = TRUE;
|
||||
}
|
||||
else if (type == MEBufferingStarted)
|
||||
{
|
||||
ok(!buffering, "got MEBufferingStopped without MEBufferingStarted\n");
|
||||
buffering = TRUE;
|
||||
}
|
||||
else if (type == MEBufferingStopped)
|
||||
buffering = FALSE;
|
||||
else
|
||||
ok(0, "Unexpected event type %#lx\n", type);
|
||||
|
||||
IMFMediaEvent_Release(evt);
|
||||
}
|
||||
ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Got hr %#lx.\n", hr);
|
||||
|
||||
IMFMediaEventGenerator_Release(gen);
|
||||
}
|
||||
|
||||
obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
|
||||
bs = NULL;
|
||||
hr = IMFSourceResolver_CreateObjectFromByteStream(resolver, (void *)object, NULL, MF_RESOLUTION_MEDIASOURCE, NULL, &obj_type, &bs);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(obj_type == MF_OBJECT_MEDIASOURCE, "Unexpected obj_type %#x.\n", obj_type);
|
||||
|
||||
if (bs) IUnknown_Release(bs);
|
||||
if (object) IUnknown_Release(object);
|
||||
|
||||
IMFSourceResolver_Release(resolver);
|
||||
|
||||
hr = MFShutdown();
|
||||
ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr);
|
||||
}
|
||||
|
||||
START_TEST(mf)
|
||||
{
|
||||
init_functions();
|
||||
|
@ -6658,4 +6974,5 @@ START_TEST(mf)
|
|||
test_media_session_Start();
|
||||
test_MFEnumDeviceSources();
|
||||
test_media_session_Close();
|
||||
test_network_bytestream();
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
MODULE = mfplat.dll
|
||||
IMPORTLIB = mfplat
|
||||
IMPORTS = advapi32 ole32 dmoguids mfuuid propsys rtworkq kernelbase
|
||||
IMPORTS = advapi32 ole32 dmoguids mfuuid propsys rtworkq kernelbase winhttp
|
||||
DELAYIMPORTS = bcrypt
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
SOURCES = \
|
||||
buffer.c \
|
||||
http_error.c \
|
||||
main.c \
|
||||
mediatype.c \
|
||||
network.c \
|
||||
queue.c \
|
||||
sample.c
|
||||
|
|
356
dlls/mfplat/http_error.c
Normal file
356
dlls/mfplat/http_error.c
Normal file
|
@ -0,0 +1,356 @@
|
|||
/*
|
||||
* HTTP error to HRESULT mapping
|
||||
*
|
||||
* Copyright 2024 Torge Matthies 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 <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winhttp.h"
|
||||
#include "nserror.h"
|
||||
|
||||
#include "mfplat_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
|
||||
|
||||
HRESULT map_http_error(DWORD http_error)
|
||||
{
|
||||
TRACE("%lu.\n", http_error);
|
||||
|
||||
switch (http_error)
|
||||
{
|
||||
case 401:
|
||||
case 403:
|
||||
case 407:
|
||||
return E_ACCESSDENIED;
|
||||
case 404:
|
||||
return NS_E_FILE_NOT_FOUND;
|
||||
case 410:
|
||||
return NS_E_RESOURCE_GONE;
|
||||
|
||||
case 500:
|
||||
return NS_E_INTERNAL_SERVER_ERROR;
|
||||
case 502:
|
||||
return NS_E_ERROR_FROM_PROXY;
|
||||
case 503:
|
||||
return NS_E_SERVER_UNAVAILABLE;
|
||||
case 504:
|
||||
return NS_E_PROXY_TIMEOUT;
|
||||
|
||||
case 100:
|
||||
case 102:
|
||||
case 103:
|
||||
case 104:
|
||||
case 105:
|
||||
case 106:
|
||||
case 107:
|
||||
case 108:
|
||||
case 109:
|
||||
case 110:
|
||||
case 111:
|
||||
case 112:
|
||||
case 113:
|
||||
case 114:
|
||||
case 115:
|
||||
case 116:
|
||||
case 117:
|
||||
case 118:
|
||||
case 119:
|
||||
case 120:
|
||||
case 121:
|
||||
case 122:
|
||||
case 123:
|
||||
case 124:
|
||||
case 125:
|
||||
case 126:
|
||||
case 127:
|
||||
case 128:
|
||||
case 129:
|
||||
case 130:
|
||||
case 131:
|
||||
case 132:
|
||||
case 133:
|
||||
case 134:
|
||||
case 135:
|
||||
case 136:
|
||||
case 137:
|
||||
case 138:
|
||||
case 139:
|
||||
case 140:
|
||||
case 141:
|
||||
case 142:
|
||||
case 143:
|
||||
case 144:
|
||||
case 145:
|
||||
case 146:
|
||||
case 147:
|
||||
case 148:
|
||||
case 149:
|
||||
case 150:
|
||||
case 151:
|
||||
case 152:
|
||||
case 153:
|
||||
case 154:
|
||||
case 155:
|
||||
case 156:
|
||||
case 157:
|
||||
case 158:
|
||||
case 159:
|
||||
case 160:
|
||||
case 161:
|
||||
case 162:
|
||||
case 163:
|
||||
case 164:
|
||||
case 165:
|
||||
case 166:
|
||||
case 167:
|
||||
case 168:
|
||||
case 169:
|
||||
case 170:
|
||||
case 171:
|
||||
case 172:
|
||||
case 173:
|
||||
case 174:
|
||||
case 175:
|
||||
case 176:
|
||||
case 177:
|
||||
case 178:
|
||||
case 179:
|
||||
case 180:
|
||||
case 181:
|
||||
case 182:
|
||||
case 183:
|
||||
case 184:
|
||||
case 185:
|
||||
case 186:
|
||||
case 187:
|
||||
case 188:
|
||||
case 189:
|
||||
case 190:
|
||||
case 191:
|
||||
case 192:
|
||||
case 193:
|
||||
case 194:
|
||||
case 195:
|
||||
case 196:
|
||||
case 197:
|
||||
case 198:
|
||||
case 199:
|
||||
case 301:
|
||||
case 302:
|
||||
case 303:
|
||||
case 307:
|
||||
return NS_E_CONNECTION_FAILURE;
|
||||
|
||||
case 400:
|
||||
case 402:
|
||||
case 405:
|
||||
case 406:
|
||||
case 408:
|
||||
case 409:
|
||||
case 411:
|
||||
case 412:
|
||||
case 413:
|
||||
case 414:
|
||||
case 415:
|
||||
case 416:
|
||||
case 417:
|
||||
case 418:
|
||||
case 419:
|
||||
case 420:
|
||||
case 421:
|
||||
case 422:
|
||||
case 423:
|
||||
case 424:
|
||||
case 425:
|
||||
case 426:
|
||||
case 427:
|
||||
case 428:
|
||||
case 429:
|
||||
case 430:
|
||||
case 431:
|
||||
case 432:
|
||||
case 433:
|
||||
case 434:
|
||||
case 435:
|
||||
case 436:
|
||||
case 437:
|
||||
case 438:
|
||||
case 439:
|
||||
case 440:
|
||||
case 441:
|
||||
case 442:
|
||||
case 443:
|
||||
case 444:
|
||||
case 445:
|
||||
case 446:
|
||||
case 447:
|
||||
case 448:
|
||||
case 449:
|
||||
case 450:
|
||||
case 451:
|
||||
case 452:
|
||||
case 453:
|
||||
case 454:
|
||||
case 455:
|
||||
case 456:
|
||||
case 457:
|
||||
case 458:
|
||||
case 459:
|
||||
case 460:
|
||||
case 461:
|
||||
case 462:
|
||||
case 463:
|
||||
case 464:
|
||||
case 465:
|
||||
case 466:
|
||||
case 467:
|
||||
case 468:
|
||||
case 469:
|
||||
case 470:
|
||||
case 471:
|
||||
case 472:
|
||||
case 473:
|
||||
case 474:
|
||||
case 475:
|
||||
case 476:
|
||||
case 477:
|
||||
case 478:
|
||||
case 479:
|
||||
case 480:
|
||||
case 481:
|
||||
case 482:
|
||||
case 483:
|
||||
case 484:
|
||||
case 485:
|
||||
case 486:
|
||||
case 487:
|
||||
case 488:
|
||||
case 489:
|
||||
case 490:
|
||||
case 491:
|
||||
case 492:
|
||||
case 493:
|
||||
case 494:
|
||||
case 495:
|
||||
case 496:
|
||||
case 497:
|
||||
case 498:
|
||||
case 499:
|
||||
case 501:
|
||||
case 506:
|
||||
case 507:
|
||||
case 508:
|
||||
case 509:
|
||||
case 510:
|
||||
case 511:
|
||||
case 512:
|
||||
case 513:
|
||||
case 514:
|
||||
case 515:
|
||||
case 516:
|
||||
case 517:
|
||||
case 518:
|
||||
case 519:
|
||||
case 520:
|
||||
case 521:
|
||||
case 522:
|
||||
case 523:
|
||||
case 524:
|
||||
case 525:
|
||||
case 526:
|
||||
case 527:
|
||||
case 528:
|
||||
case 529:
|
||||
case 530:
|
||||
case 531:
|
||||
case 532:
|
||||
case 533:
|
||||
case 534:
|
||||
case 535:
|
||||
case 536:
|
||||
case 537:
|
||||
case 538:
|
||||
case 539:
|
||||
case 540:
|
||||
case 541:
|
||||
case 542:
|
||||
case 543:
|
||||
case 544:
|
||||
case 545:
|
||||
case 546:
|
||||
case 547:
|
||||
case 548:
|
||||
case 549:
|
||||
case 550:
|
||||
case 551:
|
||||
case 552:
|
||||
case 553:
|
||||
case 554:
|
||||
case 555:
|
||||
case 556:
|
||||
case 557:
|
||||
case 558:
|
||||
case 559:
|
||||
case 560:
|
||||
case 561:
|
||||
case 562:
|
||||
case 563:
|
||||
case 564:
|
||||
case 565:
|
||||
case 566:
|
||||
case 567:
|
||||
case 568:
|
||||
case 569:
|
||||
case 570:
|
||||
case 571:
|
||||
case 572:
|
||||
case 573:
|
||||
case 574:
|
||||
case 575:
|
||||
case 576:
|
||||
case 577:
|
||||
case 578:
|
||||
case 579:
|
||||
case 580:
|
||||
case 581:
|
||||
case 582:
|
||||
case 583:
|
||||
case 584:
|
||||
case 585:
|
||||
case 586:
|
||||
case 587:
|
||||
case 588:
|
||||
case 589:
|
||||
case 590:
|
||||
case 591:
|
||||
case 592:
|
||||
case 593:
|
||||
case 594:
|
||||
case 595:
|
||||
case 596:
|
||||
case 597:
|
||||
case 598:
|
||||
case 599:
|
||||
return NS_E_BAD_REQUEST;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -3007,7 +3007,7 @@ HRESULT attributes_CopyAllItems(struct attributes *attributes, IMFAttributes *de
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetItem(IMFAttributes *iface, REFGUID key, PROPVARIANT *value)
|
||||
HRESULT WINAPI mfattributes_GetItem(IMFAttributes *iface, REFGUID key, PROPVARIANT *value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3016,7 +3016,7 @@ static HRESULT WINAPI mfattributes_GetItem(IMFAttributes *iface, REFGUID key, PR
|
|||
return attributes_GetItem(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetItemType(IMFAttributes *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
|
||||
HRESULT WINAPI mfattributes_GetItemType(IMFAttributes *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3025,7 +3025,7 @@ static HRESULT WINAPI mfattributes_GetItemType(IMFAttributes *iface, REFGUID key
|
|||
return attributes_GetItemType(attributes, key, type);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
|
||||
HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3034,7 +3034,7 @@ static HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key
|
|||
return attributes_CompareItem(attributes, key, value, result);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *theirs,
|
||||
HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *theirs,
|
||||
MF_ATTRIBUTES_MATCH_TYPE match_type, BOOL *ret)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
@ -3044,7 +3044,7 @@ static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *
|
|||
return attributes_Compare(attributes, theirs, match_type, ret);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
|
||||
HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3053,7 +3053,7 @@ static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_GetUINT32(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetUINT64(IMFAttributes *iface, REFGUID key, UINT64 *value)
|
||||
HRESULT WINAPI mfattributes_GetUINT64(IMFAttributes *iface, REFGUID key, UINT64 *value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3062,7 +3062,7 @@ static HRESULT WINAPI mfattributes_GetUINT64(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_GetUINT64(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetDouble(IMFAttributes *iface, REFGUID key, double *value)
|
||||
HRESULT WINAPI mfattributes_GetDouble(IMFAttributes *iface, REFGUID key, double *value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3071,7 +3071,7 @@ static HRESULT WINAPI mfattributes_GetDouble(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_GetDouble(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetGUID(IMFAttributes *iface, REFGUID key, GUID *value)
|
||||
HRESULT WINAPI mfattributes_GetGUID(IMFAttributes *iface, REFGUID key, GUID *value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3080,7 +3080,7 @@ static HRESULT WINAPI mfattributes_GetGUID(IMFAttributes *iface, REFGUID key, GU
|
|||
return attributes_GetGUID(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetStringLength(IMFAttributes *iface, REFGUID key, UINT32 *length)
|
||||
HRESULT WINAPI mfattributes_GetStringLength(IMFAttributes *iface, REFGUID key, UINT32 *length)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3089,7 +3089,7 @@ static HRESULT WINAPI mfattributes_GetStringLength(IMFAttributes *iface, REFGUID
|
|||
return attributes_GetStringLength(attributes, key, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetString(IMFAttributes *iface, REFGUID key, WCHAR *value,
|
||||
HRESULT WINAPI mfattributes_GetString(IMFAttributes *iface, REFGUID key, WCHAR *value,
|
||||
UINT32 size, UINT32 *length)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
@ -3099,7 +3099,7 @@ static HRESULT WINAPI mfattributes_GetString(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_GetString(attributes, key, value, size, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetAllocatedString(IMFAttributes *iface, REFGUID key, WCHAR **value, UINT32 *length)
|
||||
HRESULT WINAPI mfattributes_GetAllocatedString(IMFAttributes *iface, REFGUID key, WCHAR **value, UINT32 *length)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3108,7 +3108,7 @@ static HRESULT WINAPI mfattributes_GetAllocatedString(IMFAttributes *iface, REFG
|
|||
return attributes_GetAllocatedString(attributes, key, value, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetBlobSize(IMFAttributes *iface, REFGUID key, UINT32 *size)
|
||||
HRESULT WINAPI mfattributes_GetBlobSize(IMFAttributes *iface, REFGUID key, UINT32 *size)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3117,7 +3117,7 @@ static HRESULT WINAPI mfattributes_GetBlobSize(IMFAttributes *iface, REFGUID key
|
|||
return attributes_GetBlobSize(attributes, key, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetBlob(IMFAttributes *iface, REFGUID key, UINT8 *buf,
|
||||
HRESULT WINAPI mfattributes_GetBlob(IMFAttributes *iface, REFGUID key, UINT8 *buf,
|
||||
UINT32 bufsize, UINT32 *blobsize)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
@ -3127,7 +3127,7 @@ static HRESULT WINAPI mfattributes_GetBlob(IMFAttributes *iface, REFGUID key, UI
|
|||
return attributes_GetBlob(attributes, key, buf, bufsize, blobsize);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetAllocatedBlob(IMFAttributes *iface, REFGUID key, UINT8 **buf, UINT32 *size)
|
||||
HRESULT WINAPI mfattributes_GetAllocatedBlob(IMFAttributes *iface, REFGUID key, UINT8 **buf, UINT32 *size)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3136,7 +3136,7 @@ static HRESULT WINAPI mfattributes_GetAllocatedBlob(IMFAttributes *iface, REFGUI
|
|||
return attributes_GetAllocatedBlob(attributes, key, buf, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetUnknown(IMFAttributes *iface, REFGUID key, REFIID riid, void **out)
|
||||
HRESULT WINAPI mfattributes_GetUnknown(IMFAttributes *iface, REFGUID key, REFIID riid, void **out)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3145,7 +3145,7 @@ static HRESULT WINAPI mfattributes_GetUnknown(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_GetUnknown(attributes, key, riid, out);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_SetItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value)
|
||||
HRESULT WINAPI mfattributes_SetItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3154,7 +3154,7 @@ static HRESULT WINAPI mfattributes_SetItem(IMFAttributes *iface, REFGUID key, RE
|
|||
return attributes_SetItem(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_DeleteItem(IMFAttributes *iface, REFGUID key)
|
||||
HRESULT WINAPI mfattributes_DeleteItem(IMFAttributes *iface, REFGUID key)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3163,7 +3163,7 @@ static HRESULT WINAPI mfattributes_DeleteItem(IMFAttributes *iface, REFGUID key)
|
|||
return attributes_DeleteItem(attributes, key);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_DeleteAllItems(IMFAttributes *iface)
|
||||
HRESULT WINAPI mfattributes_DeleteAllItems(IMFAttributes *iface)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3172,7 +3172,7 @@ static HRESULT WINAPI mfattributes_DeleteAllItems(IMFAttributes *iface)
|
|||
return attributes_DeleteAllItems(attributes);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_SetUINT32(IMFAttributes *iface, REFGUID key, UINT32 value)
|
||||
HRESULT WINAPI mfattributes_SetUINT32(IMFAttributes *iface, REFGUID key, UINT32 value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3181,7 +3181,7 @@ static HRESULT WINAPI mfattributes_SetUINT32(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_SetUINT32(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_SetUINT64(IMFAttributes *iface, REFGUID key, UINT64 value)
|
||||
HRESULT WINAPI mfattributes_SetUINT64(IMFAttributes *iface, REFGUID key, UINT64 value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3190,7 +3190,7 @@ static HRESULT WINAPI mfattributes_SetUINT64(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_SetUINT64(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_SetDouble(IMFAttributes *iface, REFGUID key, double value)
|
||||
HRESULT WINAPI mfattributes_SetDouble(IMFAttributes *iface, REFGUID key, double value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3199,7 +3199,7 @@ static HRESULT WINAPI mfattributes_SetDouble(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_SetDouble(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_SetGUID(IMFAttributes *iface, REFGUID key, REFGUID value)
|
||||
HRESULT WINAPI mfattributes_SetGUID(IMFAttributes *iface, REFGUID key, REFGUID value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3208,7 +3208,7 @@ static HRESULT WINAPI mfattributes_SetGUID(IMFAttributes *iface, REFGUID key, RE
|
|||
return attributes_SetGUID(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_SetString(IMFAttributes *iface, REFGUID key, const WCHAR *value)
|
||||
HRESULT WINAPI mfattributes_SetString(IMFAttributes *iface, REFGUID key, const WCHAR *value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3217,7 +3217,7 @@ static HRESULT WINAPI mfattributes_SetString(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_SetString(attributes, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_SetBlob(IMFAttributes *iface, REFGUID key, const UINT8 *buf, UINT32 size)
|
||||
HRESULT WINAPI mfattributes_SetBlob(IMFAttributes *iface, REFGUID key, const UINT8 *buf, UINT32 size)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3226,7 +3226,7 @@ static HRESULT WINAPI mfattributes_SetBlob(IMFAttributes *iface, REFGUID key, co
|
|||
return attributes_SetBlob(attributes, key, buf, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_SetUnknown(IMFAttributes *iface, REFGUID key, IUnknown *unknown)
|
||||
HRESULT WINAPI mfattributes_SetUnknown(IMFAttributes *iface, REFGUID key, IUnknown *unknown)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3235,7 +3235,7 @@ static HRESULT WINAPI mfattributes_SetUnknown(IMFAttributes *iface, REFGUID key,
|
|||
return attributes_SetUnknown(attributes, key, unknown);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_LockStore(IMFAttributes *iface)
|
||||
HRESULT WINAPI mfattributes_LockStore(IMFAttributes *iface)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3244,7 +3244,7 @@ static HRESULT WINAPI mfattributes_LockStore(IMFAttributes *iface)
|
|||
return attributes_LockStore(attributes);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_UnlockStore(IMFAttributes *iface)
|
||||
HRESULT WINAPI mfattributes_UnlockStore(IMFAttributes *iface)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3253,7 +3253,7 @@ static HRESULT WINAPI mfattributes_UnlockStore(IMFAttributes *iface)
|
|||
return attributes_UnlockStore(attributes);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetCount(IMFAttributes *iface, UINT32 *count)
|
||||
HRESULT WINAPI mfattributes_GetCount(IMFAttributes *iface, UINT32 *count)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3262,7 +3262,7 @@ static HRESULT WINAPI mfattributes_GetCount(IMFAttributes *iface, UINT32 *count)
|
|||
return attributes_GetCount(attributes, count);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_GetItemByIndex(IMFAttributes *iface, UINT32 index, GUID *key, PROPVARIANT *value)
|
||||
HRESULT WINAPI mfattributes_GetItemByIndex(IMFAttributes *iface, UINT32 index, GUID *key, PROPVARIANT *value)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
@ -3271,7 +3271,7 @@ static HRESULT WINAPI mfattributes_GetItemByIndex(IMFAttributes *iface, UINT32 i
|
|||
return attributes_GetItemByIndex(attributes, index, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfattributes_CopyAllItems(IMFAttributes *iface, IMFAttributes *dest)
|
||||
HRESULT WINAPI mfattributes_CopyAllItems(IMFAttributes *iface, IMFAttributes *dest)
|
||||
{
|
||||
struct attributes *attributes = impl_from_IMFAttributes(iface);
|
||||
|
||||
|
|
|
@ -181,3 +181,6 @@
|
|||
@ stdcall -ret64 MFllMulDiv(int64 int64 int64 int64)
|
||||
@ stub PropVariantFromStream
|
||||
@ stub PropVariantToStream
|
||||
|
||||
# Wine extension
|
||||
@ stdcall __wine_create_http_bytestream(wstr ptr)
|
||||
|
|
|
@ -85,6 +85,8 @@ extern HRESULT attributes_GetItemByIndex(struct attributes *object, UINT32 index
|
|||
PROPVARIANT *value);
|
||||
extern HRESULT attributes_CopyAllItems(struct attributes *object, IMFAttributes *dest);
|
||||
|
||||
extern HRESULT map_http_error(DWORD http_error);
|
||||
|
||||
static inline BOOL mf_array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
|
||||
{
|
||||
size_t new_capacity, max_capacity;
|
||||
|
|
2019
dlls/mfplat/network.c
Normal file
2019
dlls/mfplat/network.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1626,6 +1626,7 @@ cpp_quote("EXTERN_GUID(MR_STREAM_VOLUME_SERVICE, 0xf8b5fa2f, 0x32ef, 0x46f5, 0xb
|
|||
cpp_quote("EXTERN_GUID(MR_AUDIO_POLICY_SERVICE, 0x911fd737, 0x6775, 0x4ab0, 0xa6, 0x14, 0x29, 0x78, 0x62, 0xfd, 0xac, 0x88);")
|
||||
cpp_quote("EXTERN_GUID(MF_PROPERTY_HANDLER_SERVICE, 0xa3face02, 0x32b8, 0x41dd, 0x90, 0xe7, 0x5f, 0xef, 0x7c, 0x89, 0x91, 0xb5);")
|
||||
cpp_quote("EXTERN_GUID(MF_WORKQUEUE_SERVICES, 0x8e37d489, 0x41e0, 0x413a, 0x90, 0x68, 0x28, 0x7c, 0x88, 0x6d, 0x8d, 0xda);")
|
||||
cpp_quote("EXTERN_GUID(MFNETSOURCE_STATISTICS_SERVICE, 0x3cb1f275, 0x0505, 0x4c5d, 0xae, 0x71, 0x0a, 0x55, 0x63, 0x44, 0xef, 0xa1);")
|
||||
|
||||
cpp_quote("EXTERN_GUID(MF_PROGRESSIVE_CODING_CONTENT, 0x8f020eea, 0x1508, 0x471f, 0x9d, 0xa6, 0x50, 0x7d, 0x7c, 0xfa, 0x40, 0xdb);")
|
||||
cpp_quote("EXTERN_GUID(MF_NALU_LENGTH_SET, 0xa7911d53, 0x12a4, 0x4965, 0xae, 0x70, 0x6e, 0xad, 0xd6, 0xff, 0x05, 0x51);")
|
||||
|
|
Loading…
Reference in a new issue