quartz: Clarify debug strings.
[wine.git] / dlls / mfplat / main.c
blob698c681e38eae7a5f32dc52bc7768df3d15e875b
1 /*
3 * Copyright 2014 Austin English
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <stdarg.h>
22 #define COBJMACROS
24 #include "windef.h"
25 #include "winbase.h"
27 #include "initguid.h"
28 #include "mfapi.h"
29 #include "mferror.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
35 BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
37 switch (reason)
39 case DLL_WINE_PREATTACH:
40 return FALSE; /* prefer native version */
41 case DLL_PROCESS_ATTACH:
42 DisableThreadLibraryCalls(instance);
43 break;
46 return TRUE;
49 /***********************************************************************
50 * MFStartup (mfplat.@)
52 HRESULT WINAPI MFStartup(ULONG version, DWORD flags)
54 FIXME("(%u, %u): stub\n", version, flags);
55 return MF_E_BAD_STARTUP_VERSION;
58 /***********************************************************************
59 * MFShutdown (mfplat.@)
61 HRESULT WINAPI MFShutdown(void)
63 FIXME("(): stub\n");
64 return S_OK;
67 static HRESULT WINAPI MFPluginControl_QueryInterface(IMFPluginControl *iface, REFIID riid, void **ppv)
69 if(IsEqualGUID(riid, &IID_IUnknown)) {
70 TRACE("(IID_IUnknown %p)\n", ppv);
71 *ppv = iface;
72 }else if(IsEqualGUID(riid, &IID_IMFPluginControl)) {
73 TRACE("(IID_IMFPluginControl %p)\n", ppv);
74 *ppv = iface;
75 }else {
76 FIXME("(%s %p)\n", debugstr_guid(riid), ppv);
77 *ppv = NULL;
78 return E_NOINTERFACE;
81 IUnknown_AddRef((IUnknown*)*ppv);
82 return S_OK;
85 static ULONG WINAPI MFPluginControl_AddRef(IMFPluginControl *iface)
87 TRACE("\n");
88 return 2;
91 static ULONG WINAPI MFPluginControl_Release(IMFPluginControl *iface)
93 TRACE("\n");
94 return 1;
97 static HRESULT WINAPI MFPluginControl_GetPreferredClsid(IMFPluginControl *iface, DWORD plugin_type,
98 const WCHAR *selector, CLSID *clsid)
100 FIXME("(%d %s %p)\n", plugin_type, debugstr_w(selector), clsid);
101 return E_NOTIMPL;
104 static HRESULT WINAPI MFPluginControl_GetPreferredClsidByIndex(IMFPluginControl *iface, DWORD plugin_type,
105 DWORD index, WCHAR **selector, CLSID *clsid)
107 FIXME("(%d %d %p %p)\n", plugin_type, index, selector, clsid);
108 return E_NOTIMPL;
111 static HRESULT WINAPI MFPluginControl_SetPreferredClsid(IMFPluginControl *iface, DWORD plugin_type,
112 const WCHAR *selector, const CLSID *clsid)
114 FIXME("(%d %s %s)\n", plugin_type, debugstr_w(selector), debugstr_guid(clsid));
115 return E_NOTIMPL;
118 static HRESULT WINAPI MFPluginControl_IsDisabled(IMFPluginControl *iface, DWORD plugin_type, REFCLSID clsid)
120 FIXME("(%d %s)\n", plugin_type, debugstr_guid(clsid));
121 return E_NOTIMPL;
124 static HRESULT WINAPI MFPluginControl_GetDisabledByIndex(IMFPluginControl *iface, DWORD plugin_type, DWORD index, CLSID *clsid)
126 FIXME("(%d %d %p)\n", plugin_type, index, clsid);
127 return E_NOTIMPL;
130 static HRESULT WINAPI MFPluginControl_SetDisabled(IMFPluginControl *iface, DWORD plugin_type, REFCLSID clsid, BOOL disabled)
132 FIXME("(%d %s %x)\n", plugin_type, debugstr_guid(clsid), disabled);
133 return E_NOTIMPL;
136 static const IMFPluginControlVtbl MFPluginControlVtbl = {
137 MFPluginControl_QueryInterface,
138 MFPluginControl_AddRef,
139 MFPluginControl_Release,
140 MFPluginControl_GetPreferredClsid,
141 MFPluginControl_GetPreferredClsidByIndex,
142 MFPluginControl_SetPreferredClsid,
143 MFPluginControl_IsDisabled,
144 MFPluginControl_GetDisabledByIndex,
145 MFPluginControl_SetDisabled
148 static IMFPluginControl plugin_control = { &MFPluginControlVtbl };
150 /***********************************************************************
151 * MFGetPluginControl (mfplat.@)
153 HRESULT WINAPI MFGetPluginControl(IMFPluginControl **ret)
155 TRACE("(%p)\n", ret);
157 *ret = &plugin_control;
158 return S_OK;