"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/mf/tests/mf.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

mf.c  (wine-5.12.tar.xz):mf.c  (wine-5.13.tar.xz)
skipping to change at line 44 skipping to change at line 44
DEFINE_GUID(MFVideoFormat_ABGR32, 0x00000020, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); DEFINE_GUID(MFVideoFormat_ABGR32, 0x00000020, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
#undef INITGUID #undef INITGUID
#include <guiddef.h> #include <guiddef.h>
#include "mfapi.h" #include "mfapi.h"
#include "mferror.h" #include "mferror.h"
#include "mfidl.h" #include "mfidl.h"
#include "initguid.h" #include "initguid.h"
#include "mmdeviceapi.h" #include "mmdeviceapi.h"
#include "audioclient.h" #include "audioclient.h"
#include "evr.h"
#include "wine/test.h" #include "wine/test.h"
#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__) #define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
static void _expect_ref(IUnknown* obj, ULONG expected_refcount, int line) static void _expect_ref(IUnknown* obj, ULONG expected_refcount, int line)
{ {
ULONG refcount; ULONG refcount;
IUnknown_AddRef(obj); IUnknown_AddRef(obj);
refcount = IUnknown_Release(obj); refcount = IUnknown_Release(obj);
ok_(__FILE__, line)(refcount == expected_refcount, "Unexpected refcount %d, expected %d.\n", refcount, ok_(__FILE__, line)(refcount == expected_refcount, "Unexpected refcount %d, expected %d.\n", refcount,
skipping to change at line 1402 skipping to change at line 1403
}; };
static void test_topology_loader(void) static void test_topology_loader(void)
{ {
IMFSampleGrabberSinkCallback test_grabber_callback = { &test_grabber_callbac k_vtbl }; IMFSampleGrabberSinkCallback test_grabber_callback = { &test_grabber_callbac k_vtbl };
IMFTopology *topology, *topology2, *full_topology; IMFTopology *topology, *topology2, *full_topology;
IMFTopologyNode *src_node, *sink_node; IMFTopologyNode *src_node, *sink_node;
IMFPresentationDescriptor *pd; IMFPresentationDescriptor *pd;
IMFSourceResolver *resolver; IMFSourceResolver *resolver;
IMFActivate *sink_activate; IMFActivate *sink_activate;
IMFStreamSink *stream_sink;
unsigned int count, value; unsigned int count, value;
IMFMediaType *media_type; IMFMediaType *media_type;
IMFStreamDescriptor *sd; IMFStreamDescriptor *sd;
MF_OBJECT_TYPE obj_type; MF_OBJECT_TYPE obj_type;
IMFMediaSource *source; IMFMediaSource *source;
IMFTopoLoader *loader; IMFTopoLoader *loader;
IMFByteStream *stream; IMFByteStream *stream;
IMFAttributes *attr; IMFAttributes *attr;
IMFMediaSink *sink; IMFMediaSink *sink;
WCHAR *filename; WCHAR *filename;
skipping to change at line 1514 skipping to change at line 1516
hr = IMFTopologyNode_ConnectOutput(src_node, 0, sink_node, 0); hr = IMFTopologyNode_ConnectOutput(src_node, 0, sink_node, 0);
ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr);
/* Sink was not resolved. */ /* Sink was not resolved. */
hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL);
ok(hr == MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED, "Unexpected hr %#x.\n", hr); ok(hr == MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED, "Unexpected hr %#x.\n", hr);
hr = IMFActivate_ActivateObject(sink_activate, &IID_IMFMediaSink, (void **)& sink); hr = IMFActivate_ActivateObject(sink_activate, &IID_IMFMediaSink, (void **)& sink);
ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr);
hr = IMFTopologyNode_SetObject(sink_node, (IUnknown *)sink); hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream_sink);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFTopologyNode_SetObject(sink_node, (IUnknown *)stream_sink);
ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr); ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr);
IMFStreamSink_Release(stream_sink);
hr = IMFTopology_GetCount(topology, &count); hr = IMFTopology_GetCount(topology, &count);
ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
ok(count == 0, "Unexpected count %u.\n", count); ok(count == 0, "Unexpected count %u.\n", count);
hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL);
todo_wine
ok(hr == S_OK, "Failed to resolve topology, hr %#x.\n", hr); ok(hr == S_OK, "Failed to resolve topology, hr %#x.\n", hr);
ok(full_topology != topology, "Unexpected instance.\n"); ok(full_topology != topology, "Unexpected instance.\n");
hr = IMFTopology_GetCount(topology, &count); hr = IMFTopology_GetCount(topology, &count);
ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
ok(count == 0, "Unexpected count %u.\n", count); ok(count == 0, "Unexpected count %u.\n", count);
hr = IMFTopology_GetCount(full_topology, &count); hr = IMFTopology_GetCount(full_topology, &count);
ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
todo_wine todo_wine
skipping to change at line 3229 skipping to change at line 3235
ok(hr == S_OK, "Failed to remove attribute, hr %#x.\n", hr); ok(hr == S_OK, "Failed to remove attribute, hr %#x.\n", hr);
hr = MFCreateAudioRenderer(attributes, &sink); hr = MFCreateAudioRenderer(attributes, &sink);
ok(hr == MF_E_NO_AUDIO_PLAYBACK_DEVICE, "Failed to create a sink, hr %#x.\n" , hr); ok(hr == MF_E_NO_AUDIO_PLAYBACK_DEVICE, "Failed to create a sink, hr %#x.\n" , hr);
CoUninitialize(); CoUninitialize();
} }
static void test_evr(void) static void test_evr(void)
{ {
IMFMediaEventGenerator *ev_generator;
IMFVideoRenderer *video_renderer;
IMFClockStateSink *clock_sink;
IMFMediaSinkPreroll *preroll;
IMFMediaSink *sink, *sink2; IMFMediaSink *sink, *sink2;
IMFActivate *activate; IMFActivate *activate;
DWORD flags, count; DWORD flags, count;
IMFGetService *gs;
IUnknown *unk;
UINT64 value; UINT64 value;
HRESULT hr; HRESULT hr;
hr = CoInitialize(NULL); hr = CoInitialize(NULL);
ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr); ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr);
hr = MFCreateVideoRendererActivate(NULL, NULL); hr = MFCreateVideoRendererActivate(NULL, NULL);
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
hr = MFCreateVideoRendererActivate(NULL, &activate); hr = MFCreateVideoRendererActivate(NULL, &activate);
skipping to change at line 3253 skipping to change at line 3265
hr = IMFActivate_GetCount(activate, &count); hr = IMFActivate_GetCount(activate, &count);
ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr);
ok(count == 1, "Unexpected count %u.\n", count); ok(count == 1, "Unexpected count %u.\n", count);
hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &value); hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &value);
ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr);
ok(!value, "Unexpected value.\n"); ok(!value, "Unexpected value.\n");
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink) ; hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink) ;
todo_wine
ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr);
if (hr == S_OK)
{
hr = IMFMediaSink_GetCharacteristics(sink, &flags); hr = IMFMediaSink_GetCharacteristics(sink, &flags);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(flags == (MEDIASINK_CAN_PREROLL | MEDIASINK_CLOCK_REQUIRED), "Unexpected
flags %#x.\n", flags);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFMediaSinkPreroll, (void **)&p
reroll);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IMFMediaSinkPreroll_Release(preroll);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFVideoRenderer, (void **)&vide
o_renderer);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IMFVideoRenderer_Release(video_renderer);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFMediaEventGenerator, (void **
)&ev_generator);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IMFMediaEventGenerator_Release(ev_generator);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFClockStateSink, (void **)&clo
ck_sink);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IMFClockStateSink_Release(clock_sink);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFGetService, (void **)&gs);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoMixe
rControl, (void **)&unk);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IUnknown_Release(unk);
IMFGetService_Release(gs);
hr = IMFActivate_ShutdownObject(activate); hr = IMFActivate_ShutdownObject(activate);
ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); hr = IMFMediaSink_GetCharacteristics(sink, &flags);
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
/* Activate again. */ /* Activate again. */
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink2 ); hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink2 );
ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr);
todo_wine
ok(sink == sink2, "Unexpected instance.\n"); ok(sink == sink2, "Unexpected instance.\n");
IMFMediaSink_Release(sink2); IMFMediaSink_Release(sink2);
hr = IMFActivate_DetachObject(activate); hr = IMFActivate_DetachObject(activate);
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); hr = IMFMediaSink_GetCharacteristics(sink, &flags);
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink2 ); hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink2 );
ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr);
hr = IMFActivate_ShutdownObject(activate); hr = IMFActivate_ShutdownObject(activate);
ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
IMFMediaSink_Release(sink2); IMFMediaSink_Release(sink2);
IMFMediaSink_Release(sink); IMFMediaSink_Release(sink);
}
IMFActivate_Release(activate); IMFActivate_Release(activate);
CoUninitialize(); CoUninitialize();
} }
static void test_MFCreateSimpleTypeHandler(void) static void test_MFCreateSimpleTypeHandler(void)
{ {
IMFMediaType *media_type, *media_type2, *media_type3; IMFMediaType *media_type, *media_type2, *media_type3;
IMFMediaTypeHandler *handler; IMFMediaTypeHandler *handler;
DWORD count; DWORD count;
 End of changes. 12 change blocks. 
6 lines changed or deleted 48 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)