From: Conor McCarthy cmccarthy@codeweavers.com
--- dlls/mf/tests/mf.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 5c909ae3870..3b66662e5e2 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -1391,12 +1391,14 @@ static IMFMediaSource *create_media_source(const WCHAR *name, const WCHAR *mime)
hr = MFCreateSourceResolver(&resolver); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + trace("1\n"); hr = IMFSourceResolver_CreateObjectFromByteStream(resolver, stream, NULL, MF_RESOLUTION_MEDIASOURCE, NULL, &obj_type, (IUnknown **)&source); todo_wine_if(hr == MF_E_UNEXPECTED) /* Gitlab CI Debian runner */ ok(hr == S_OK || broken(hr == MF_E_UNSUPPORTED_BYTESTREAM_TYPE), "Unexpected hr %#lx.\n", hr); IMFSourceResolver_Release(resolver); IMFByteStream_Release(stream); + trace("2\n");
if (FAILED(hr)) return NULL; @@ -8151,8 +8153,10 @@ static void test_h264_output_alignment(void) UINT32 status; HRESULT hr;
+ trace("0\n"); hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); ok(hr == S_OK, "Failed to start up, hr %#lx.\n", hr); + trace("0a\n");
if (!(source = create_media_source(L"test-unaligned.mp4", L"video/mp4"))) { @@ -8165,6 +8169,7 @@ static void test_h264_output_alignment(void) grabber_callback = impl_from_IMFSampleGrabberSinkCallback(create_test_grabber_callback()); grabber_callback->ready_event = CreateEventW(NULL, FALSE, FALSE, NULL); ok(!!grabber_callback->ready_event, "CreateEventW failed, error %lu\n", GetLastError()); + trace("1\n");
hr = MFCreateMediaType(&output_type); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -8172,6 +8177,7 @@ static void test_h264_output_alignment(void) hr = MFCreateSampleGrabberSinkActivate(output_type, &grabber_callback->IMFSampleGrabberSinkCallback_iface, &sink_activate); ok(hr == S_OK, "Failed to create grabber sink, hr %#lx.\n", hr); IMFMediaType_Release(output_type); + trace("2\n");
IMFActivate_ActivateObject(sink_activate, &IID_IMFMediaSink, (void **)&media_sink); hr = IMFMediaSink_GetStreamSinkByIndex(media_sink, 0, &stream_sink); @@ -8184,6 +8190,7 @@ static void test_h264_output_alignment(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFTopology_Release(topology); IMFTopoLoader_Release(topo_loader); + trace("3\n");
hr = IMFStreamSink_GetMediaTypeHandler(stream_sink, &handler); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -8192,6 +8199,7 @@ static void test_h264_output_alignment(void) hr = IMFMediaType_GetUINT64(output_type, &MF_MT_FRAME_SIZE, &frame_size); ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr); IMFMediaType_Release(output_type); + trace("4\n");
hr = MFCreateMediaSession(NULL, &session); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -8199,6 +8207,7 @@ static void test_h264_output_alignment(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); transform = topology_get_transform(resolved_topology); IMFTopology_Release(resolved_topology); + trace("5\n");
callback = create_test_callback(TRUE); hr = wait_media_event(session, callback, MESessionTopologySet, 1000, &propvar); @@ -8210,12 +8219,14 @@ static void test_h264_output_alignment(void) hr = IMFMediaEvent_GetUINT32(test_callback->media_event, &MF_EVENT_TOPOLOGY_STATUS, &status); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(status == MF_TOPOSTATUS_READY, "Unexpected status %d.\n", status); + trace("6\n");
frame_size = get_current_media_type_frame_size(transform); todo_wine ok(frame_size == (((UINT64)64 << 32) | 72), "Unexpected frame size %#llx\n", frame_size); frame_size = get_current_media_type_frame_size(handler); ok(frame_size == (((UINT64)64 << 32) | 72), "Unexpected frame size %#llx\n", frame_size); + trace("7\n");
propvar.vt = VT_EMPTY; hr = IMFMediaSession_Start(session, &GUID_NULL, &propvar); @@ -8231,6 +8242,7 @@ static void test_h264_output_alignment(void) ok(frame_size == (((UINT64)64 << 32) | 72), "Unexpected frame size %#llx\n", frame_size); frame_size = get_current_media_type_frame_size(handler); ok(frame_size == (((UINT64)64 << 32) | 72), "Unexpected frame size %#llx\n", frame_size); + trace("8\n");
/* frame size change occurs before MESessionStarted */ hr = wait_media_event(session, callback, MESessionStarted, 5000, &propvar); @@ -8241,6 +8253,7 @@ static void test_h264_output_alignment(void) frame_size = get_current_media_type_frame_size(handler); todo_wine ok(frame_size == (((UINT64)64 << 32) | 80), "Unexpected frame size %#llx\n", frame_size); + trace("9\n");
hr = IMFMediaSession_Stop(session); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -8248,11 +8261,13 @@ static void test_h264_output_alignment(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = wait_media_event(session, callback, MESessionClosed, 1000, &propvar); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + trace("10\n");
hr = IMFMediaSource_Shutdown(source); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaSession_Shutdown(session); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + trace("11\n");
IMFMediaTypeHandler_Release(handler); if (transform) @@ -8263,6 +8278,7 @@ static void test_h264_output_alignment(void) IMFMediaSink_Release(media_sink); IMFSampleGrabberSinkCallback_Release(&grabber_callback->IMFSampleGrabberSinkCallback_iface); IMFMediaSource_Release(source); + trace("12\n");
hr = MFShutdown(); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -8270,6 +8286,7 @@ static void test_h264_output_alignment(void)
START_TEST(mf) { + winetest_mute_threshold = 100; init_functions();
if (is_vista()) @@ -8306,5 +8323,7 @@ START_TEST(mf) test_media_session_source_shutdown(); test_media_session_thinning(); test_media_session_seek(); + trace("test_h264_output_alignment\n"); test_h264_output_alignment(); + trace("done\n"); }