mfplat: Added IMFPluginControl stub implementation.

This commit is contained in:
Jacek Caban 2015-08-07 12:31:03 +02:00 committed by Alexandre Julliard
parent 86f5c27976
commit b33d7b8690

View File

@ -16,12 +16,15 @@
* 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 "config.h"
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "initguid.h"
#include "mfapi.h"
#include "mferror.h"
@ -60,3 +63,97 @@ HRESULT WINAPI MFShutdown(void)
FIXME("(): stub\n");
return S_OK;
}
static HRESULT WINAPI MFPluginControl_QueryInterface(IMFPluginControl *iface, REFIID riid, void **ppv)
{
if(IsEqualGUID(riid, &IID_IUnknown)) {
TRACE("(IID_IUnknown %p)\n", ppv);
*ppv = iface;
}else if(IsEqualGUID(riid, &IID_IMFPluginControl)) {
TRACE("(IID_IMFPluginControl %p)\n", ppv);
*ppv = iface;
}else {
FIXME("(%s %p)\n", debugstr_guid(riid), ppv);
*ppv = NULL;
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
static ULONG WINAPI MFPluginControl_AddRef(IMFPluginControl *iface)
{
TRACE("\n");
return 2;
}
static ULONG WINAPI MFPluginControl_Release(IMFPluginControl *iface)
{
TRACE("\n");
return 1;
}
static HRESULT WINAPI MFPluginControl_GetPreferredClsid(IMFPluginControl *iface, DWORD plugin_type,
const WCHAR *selector, CLSID *clsid)
{
FIXME("(%d %s %p)\n", plugin_type, debugstr_w(selector), clsid);
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_GetPreferredClsidByIndex(IMFPluginControl *iface, DWORD plugin_type,
DWORD index, WCHAR **selector, CLSID *clsid)
{
FIXME("(%d %d %p %p)\n", plugin_type, index, selector, clsid);
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_SetPreferredClsid(IMFPluginControl *iface, DWORD plugin_type,
const WCHAR *selector, const CLSID *clsid)
{
FIXME("(%d %s %s)\n", plugin_type, debugstr_w(selector), debugstr_guid(clsid));
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_IsDisabled(IMFPluginControl *iface, DWORD plugin_type, REFCLSID clsid)
{
FIXME("(%d %s)\n", plugin_type, debugstr_guid(clsid));
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_GetDisabledByIndex(IMFPluginControl *iface, DWORD plugin_type, DWORD index, CLSID *clsid)
{
FIXME("(%d %d %p)\n", plugin_type, index, clsid);
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_SetDisabled(IMFPluginControl *iface, DWORD plugin_type, REFCLSID clsid, BOOL disabled)
{
FIXME("(%d %s %x)\n", plugin_type, debugstr_guid(clsid), disabled);
return E_NOTIMPL;
}
static const IMFPluginControlVtbl MFPluginControlVtbl = {
MFPluginControl_QueryInterface,
MFPluginControl_AddRef,
MFPluginControl_Release,
MFPluginControl_GetPreferredClsid,
MFPluginControl_GetPreferredClsidByIndex,
MFPluginControl_SetPreferredClsid,
MFPluginControl_IsDisabled,
MFPluginControl_GetDisabledByIndex,
MFPluginControl_SetDisabled
};
static IMFPluginControl plugin_control = { &MFPluginControlVtbl };
/***********************************************************************
* MFGetPluginControl (mfplat.@)
*/
HRESULT WINAPI MFGetPluginControl(IMFPluginControl **ret)
{
TRACE("(%p)\n", ret);
*ret = &plugin_control;
return S_OK;
}