mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
colorcnv: Register the Color Converter DMO class.
This commit is contained in:
parent
091f9753fb
commit
ef4cd564a9
Notes:
Alexandre Julliard
2024-09-03 23:30:11 +02:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6430
10 changed files with 262 additions and 103 deletions
2
configure
vendored
2
configure
vendored
|
@ -1015,6 +1015,7 @@ enable_cdosys
|
|||
enable_cfgmgr32
|
||||
enable_clusapi
|
||||
enable_cng_sys
|
||||
enable_colorcnv
|
||||
enable_combase
|
||||
enable_comcat
|
||||
enable_comctl32
|
||||
|
@ -22000,6 +22001,7 @@ wine_fn_config_makefile dlls/cfgmgr32 enable_cfgmgr32
|
|||
wine_fn_config_makefile dlls/cfgmgr32/tests enable_tests
|
||||
wine_fn_config_makefile dlls/clusapi enable_clusapi
|
||||
wine_fn_config_makefile dlls/cng.sys enable_cng_sys
|
||||
wine_fn_config_makefile dlls/colorcnv enable_colorcnv
|
||||
wine_fn_config_makefile dlls/combase enable_combase
|
||||
wine_fn_config_makefile dlls/combase/tests enable_tests
|
||||
wine_fn_config_makefile dlls/comcat enable_comcat
|
||||
|
|
|
@ -2480,6 +2480,7 @@ WINE_CONFIG_MAKEFILE(dlls/cfgmgr32)
|
|||
WINE_CONFIG_MAKEFILE(dlls/cfgmgr32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/clusapi)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cng.sys)
|
||||
WINE_CONFIG_MAKEFILE(dlls/colorcnv)
|
||||
WINE_CONFIG_MAKEFILE(dlls/combase)
|
||||
WINE_CONFIG_MAKEFILE(dlls/combase/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/comcat)
|
||||
|
|
6
dlls/colorcnv/Makefile.in
Normal file
6
dlls/colorcnv/Makefile.in
Normal file
|
@ -0,0 +1,6 @@
|
|||
MODULE = colorcnv.dll
|
||||
IMPORTS = combase mfplat msdmo mfuuid dmoguids strmiids wmcodecdspuuid uuid
|
||||
|
||||
SOURCES = \
|
||||
colorcnv.c \
|
||||
colorcnv.idl
|
220
dlls/colorcnv/colorcnv.c
Normal file
220
dlls/colorcnv/colorcnv.c
Normal file
|
@ -0,0 +1,220 @@
|
|||
/*
|
||||
* Copyright 2024 Rémi Bernon 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 <stddef.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#define COBJMACROS
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
||||
#include "d3d9.h"
|
||||
#include "dmoreg.h"
|
||||
#include "dshow.h"
|
||||
#include "mfapi.h"
|
||||
#include "rpcproxy.h"
|
||||
#include "wmcodecdsp.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(dmo);
|
||||
|
||||
#include "initguid.h"
|
||||
|
||||
DEFINE_MEDIATYPE_GUID(MFVideoFormat_ABGR32, D3DFMT_A8B8G8R8);
|
||||
DEFINE_GUID(DMOVideoFormat_RGB32,D3DFMT_X8R8G8B8,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
|
||||
DEFINE_GUID(DMOVideoFormat_RGB24,D3DFMT_R8G8B8,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
|
||||
DEFINE_GUID(DMOVideoFormat_RGB565,D3DFMT_R5G6B5,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
|
||||
DEFINE_GUID(DMOVideoFormat_RGB555,D3DFMT_X1R5G5B5,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
|
||||
DEFINE_GUID(DMOVideoFormat_RGB8,D3DFMT_P8,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
|
||||
|
||||
static HRESULT WINAPI color_converter_factory_CreateInstance(IClassFactory *iface, IUnknown *outer,
|
||||
REFIID riid, void **out)
|
||||
{
|
||||
static const GUID CLSID_wg_color_converter = {0xf47e2da5,0xe370,0x47b7,{0x90,0x3a,0x07,0x8d,0xdd,0x45,0xa5,0xcc}};
|
||||
return CoCreateInstance(&CLSID_wg_color_converter, outer, CLSCTX_INPROC_SERVER, riid, out);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI class_factory_QueryInterface(IClassFactory *iface, REFIID riid, void **out)
|
||||
{
|
||||
*out = IsEqualGUID(riid, &IID_IClassFactory) || IsEqualGUID(riid, &IID_IUnknown) ? iface : NULL;
|
||||
return *out ? S_OK : E_NOINTERFACE;
|
||||
}
|
||||
static ULONG WINAPI class_factory_AddRef(IClassFactory *iface)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
static ULONG WINAPI class_factory_Release(IClassFactory *iface)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
static HRESULT WINAPI class_factory_LockServer(IClassFactory *iface, BOOL dolock)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IClassFactoryVtbl color_converter_factory_vtbl =
|
||||
{
|
||||
class_factory_QueryInterface,
|
||||
class_factory_AddRef,
|
||||
class_factory_Release,
|
||||
color_converter_factory_CreateInstance,
|
||||
class_factory_LockServer,
|
||||
};
|
||||
|
||||
static IClassFactory color_converter_factory = {&color_converter_factory_vtbl};
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (colorcnv.@)
|
||||
*/
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out)
|
||||
{
|
||||
if (IsEqualGUID(clsid, &CLSID_CColorConvertDMO))
|
||||
return IClassFactory_QueryInterface(&color_converter_factory, riid, out);
|
||||
|
||||
*out = NULL;
|
||||
FIXME("Unknown clsid %s.\n", debugstr_guid(clsid));
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (colorcnv.@)
|
||||
*/
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
{
|
||||
MFT_REGISTER_TYPE_INFO color_converter_mft_inputs[] =
|
||||
{
|
||||
{MFMediaType_Video, MFVideoFormat_YV12},
|
||||
{MFMediaType_Video, MFVideoFormat_YUY2},
|
||||
{MFMediaType_Video, MFVideoFormat_UYVY},
|
||||
{MFMediaType_Video, MFVideoFormat_AYUV},
|
||||
{MFMediaType_Video, MFVideoFormat_NV12},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB32},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB565},
|
||||
{MFMediaType_Video, MFVideoFormat_I420},
|
||||
{MFMediaType_Video, MFVideoFormat_IYUV},
|
||||
{MFMediaType_Video, MFVideoFormat_YVYU},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB24},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB555},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB8},
|
||||
{MFMediaType_Video, MEDIASUBTYPE_V216},
|
||||
{MFMediaType_Video, MEDIASUBTYPE_V410},
|
||||
{MFMediaType_Video, MFVideoFormat_NV11},
|
||||
{MFMediaType_Video, MFVideoFormat_Y41P},
|
||||
{MFMediaType_Video, MFVideoFormat_Y41T},
|
||||
{MFMediaType_Video, MFVideoFormat_Y42T},
|
||||
{MFMediaType_Video, MFVideoFormat_YVU9},
|
||||
};
|
||||
MFT_REGISTER_TYPE_INFO color_converter_mft_outputs[] =
|
||||
{
|
||||
{MFMediaType_Video, MFVideoFormat_YV12},
|
||||
{MFMediaType_Video, MFVideoFormat_YUY2},
|
||||
{MFMediaType_Video, MFVideoFormat_UYVY},
|
||||
{MFMediaType_Video, MFVideoFormat_AYUV},
|
||||
{MFMediaType_Video, MFVideoFormat_NV12},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB32},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB565},
|
||||
{MFMediaType_Video, MFVideoFormat_I420},
|
||||
{MFMediaType_Video, MFVideoFormat_IYUV},
|
||||
{MFMediaType_Video, MFVideoFormat_YVYU},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB24},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB555},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB8},
|
||||
{MFMediaType_Video, MEDIASUBTYPE_V216},
|
||||
{MFMediaType_Video, MEDIASUBTYPE_V410},
|
||||
{MFMediaType_Video, MFVideoFormat_NV11},
|
||||
};
|
||||
DMO_PARTIAL_MEDIATYPE color_converter_dmo_inputs[] =
|
||||
{
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YV12},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YUY2},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_UYVY},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_AYUV},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_NV12},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB32},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB565},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_I420},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_IYUV},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YVYU},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB24},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB555},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB8},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_V216},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_V410},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_NV11},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_Y41P},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_Y41T},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_Y42T},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YVU9},
|
||||
};
|
||||
DMO_PARTIAL_MEDIATYPE color_converter_dmo_outputs[] =
|
||||
{
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YV12},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YUY2},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_UYVY},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_AYUV},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_NV12},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB32},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB565},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_I420},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_IYUV},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YVYU},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB24},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB555},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB8},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_V216},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_V410},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_NV11},
|
||||
};
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
if (FAILED(hr = __wine_register_resources()))
|
||||
return hr;
|
||||
if (FAILED(hr = MFTRegister(CLSID_CColorConvertDMO, MFT_CATEGORY_VIDEO_EFFECT,
|
||||
(WCHAR *)L"Color Converter MFT", MFT_ENUM_FLAG_SYNCMFT,
|
||||
ARRAY_SIZE(color_converter_mft_inputs), color_converter_mft_inputs,
|
||||
ARRAY_SIZE(color_converter_mft_outputs), color_converter_mft_outputs, NULL)))
|
||||
return hr;
|
||||
if (FAILED(hr = DMORegister(L"Color Converter DMO", &CLSID_CColorConvertDMO, &DMOCATEGORY_VIDEO_EFFECT, 0,
|
||||
ARRAY_SIZE(color_converter_dmo_inputs), color_converter_dmo_inputs,
|
||||
ARRAY_SIZE(color_converter_dmo_outputs), color_converter_dmo_outputs)))
|
||||
return hr;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (colorcnv.@)
|
||||
*/
|
||||
HRESULT WINAPI DllUnregisterServer(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
if (FAILED(hr = __wine_unregister_resources()))
|
||||
return hr;
|
||||
if (FAILED(hr = MFTUnregister(CLSID_CColorConvertDMO)))
|
||||
return hr;
|
||||
if (FAILED(hr = DMOUnregister(&CLSID_CColorConvertDMO, &DMOCATEGORY_VIDEO_EFFECT)))
|
||||
return hr;
|
||||
|
||||
return S_OK;
|
||||
}
|
25
dlls/colorcnv/colorcnv.idl
Normal file
25
dlls/colorcnv/colorcnv.idl
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2024 Rémi Bernon 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
|
||||
*/
|
||||
|
||||
#pragma makedep register
|
||||
|
||||
[
|
||||
threading(both),
|
||||
uuid(98230571-0087-4204-b020-3282538e57d3)
|
||||
]
|
||||
coclass CColorConvertDMO {}
|
3
dlls/colorcnv/colorcnv.spec
Normal file
3
dlls/colorcnv/colorcnv.spec
Normal file
|
@ -0,0 +1,3 @@
|
|||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllUnregisterServer()
|
|
@ -991,6 +991,7 @@ static struct class_factory mpeg4_sink_class_factory_cf = {{&class_factory_vtbl}
|
|||
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
|
||||
{
|
||||
static const GUID CLSID_wg_color_converter = {0xf47e2da5,0xe370,0x47b7,{0x90,0x3a,0x07,0x8d,0xdd,0x45,0xa5,0xcc}};
|
||||
static const GUID CLSID_wg_mp3_sink_factory = {0x1f302877,0xaaab,0x40a3,{0xb9,0xe0,0x9f,0x48,0xda,0xf3,0x5b,0xc8}};
|
||||
static const GUID CLSID_wg_mpeg4_sink_factory = {0x5d5407d9,0xc6ca,0x4770,{0xa7,0xcc,0x27,0xc0,0xcb,0x8a,0x76,0x27}};
|
||||
struct class_factory *factory;
|
||||
|
@ -1024,7 +1025,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
|
|||
factory = &wmv_decoder_cf;
|
||||
else if (IsEqualGUID(clsid, &CLSID_CResamplerMediaObject))
|
||||
factory = &resampler_cf;
|
||||
else if (IsEqualGUID(clsid, &CLSID_CColorConvertDMO))
|
||||
else if (IsEqualGUID(clsid, &CLSID_wg_color_converter))
|
||||
factory = &color_convert_cf;
|
||||
else if (IsEqualGUID(clsid, &CLSID_wg_mp3_sink_factory))
|
||||
factory = &mp3_sink_class_factory_cf;
|
||||
|
@ -1338,48 +1339,6 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_WVP2},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_VC1S},
|
||||
};
|
||||
DMO_PARTIAL_MEDIATYPE color_convert_input[20] =
|
||||
{
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YV12},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YUY2},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_UYVY},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_AYUV},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_NV12},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB32},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB565},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_I420},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_IYUV},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YVYU},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB24},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB555},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB8},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_V216},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_V410},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_NV11},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_Y41P},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_Y41T},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_Y42T},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YVU9},
|
||||
};
|
||||
DMO_PARTIAL_MEDIATYPE color_convert_output[16] =
|
||||
{
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YV12},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YUY2},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_UYVY},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_AYUV},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_NV12},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB32},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB565},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_I420},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_IYUV},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_YVYU},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB24},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB555},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_RGB8},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_V216},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_V410},
|
||||
{.type = MEDIATYPE_Video, .subtype = MEDIASUBTYPE_NV11},
|
||||
};
|
||||
|
||||
IFilterMapper2 *mapper;
|
||||
HRESULT hr;
|
||||
|
@ -1417,9 +1376,6 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
if (FAILED(hr = DMORegister(L"Resampler DMO", &CLSID_CResamplerMediaObject, &DMOCATEGORY_AUDIO_EFFECT,
|
||||
0, ARRAY_SIZE(audio_convert_types), audio_convert_types, ARRAY_SIZE(audio_convert_types), audio_convert_types)))
|
||||
return hr;
|
||||
if (FAILED(hr = DMORegister(L"Color Converter DMO", &CLSID_CColorConvertDMO, &DMOCATEGORY_VIDEO_EFFECT,
|
||||
0, ARRAY_SIZE(color_convert_input), color_convert_input, ARRAY_SIZE(color_convert_output), color_convert_output)))
|
||||
return hr;
|
||||
|
||||
return mfplat_DllRegisterServer();
|
||||
}
|
||||
|
@ -1448,8 +1404,6 @@ HRESULT WINAPI DllUnregisterServer(void)
|
|||
|
||||
IFilterMapper2_Release(mapper);
|
||||
|
||||
if (FAILED(hr = DMOUnregister(&CLSID_CColorConvertDMO, &DMOCATEGORY_VIDEO_EFFECT)))
|
||||
return hr;
|
||||
if (FAILED(hr = DMOUnregister(&CLSID_CResamplerMediaObject, &DMOCATEGORY_AUDIO_EFFECT)))
|
||||
return hr;
|
||||
if (FAILED(hr = DMOUnregister(&CLSID_WMADecMediaObject, &DMOCATEGORY_AUDIO_DECODER)))
|
||||
|
|
|
@ -298,49 +298,6 @@ HRESULT mfplat_DllRegisterServer(void)
|
|||
{MFMediaType_Video, DMOVideoFormat_RGB8},
|
||||
};
|
||||
|
||||
MFT_REGISTER_TYPE_INFO color_convert_input_types[] =
|
||||
{
|
||||
{MFMediaType_Video, MFVideoFormat_YV12},
|
||||
{MFMediaType_Video, MFVideoFormat_YUY2},
|
||||
{MFMediaType_Video, MFVideoFormat_UYVY},
|
||||
{MFMediaType_Video, MFVideoFormat_AYUV},
|
||||
{MFMediaType_Video, MFVideoFormat_NV12},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB32},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB565},
|
||||
{MFMediaType_Video, MFVideoFormat_I420},
|
||||
{MFMediaType_Video, MFVideoFormat_IYUV},
|
||||
{MFMediaType_Video, MFVideoFormat_YVYU},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB24},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB555},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB8},
|
||||
{MFMediaType_Video, MEDIASUBTYPE_V216},
|
||||
{MFMediaType_Video, MEDIASUBTYPE_V410},
|
||||
{MFMediaType_Video, MFVideoFormat_NV11},
|
||||
{MFMediaType_Video, MFVideoFormat_Y41P},
|
||||
{MFMediaType_Video, MFVideoFormat_Y41T},
|
||||
{MFMediaType_Video, MFVideoFormat_Y42T},
|
||||
{MFMediaType_Video, MFVideoFormat_YVU9},
|
||||
};
|
||||
MFT_REGISTER_TYPE_INFO color_convert_output_types[] =
|
||||
{
|
||||
{MFMediaType_Video, MFVideoFormat_YV12},
|
||||
{MFMediaType_Video, MFVideoFormat_YUY2},
|
||||
{MFMediaType_Video, MFVideoFormat_UYVY},
|
||||
{MFMediaType_Video, MFVideoFormat_AYUV},
|
||||
{MFMediaType_Video, MFVideoFormat_NV12},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB32},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB565},
|
||||
{MFMediaType_Video, MFVideoFormat_I420},
|
||||
{MFMediaType_Video, MFVideoFormat_IYUV},
|
||||
{MFMediaType_Video, MFVideoFormat_YVYU},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB24},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB555},
|
||||
{MFMediaType_Video, DMOVideoFormat_RGB8},
|
||||
{MFMediaType_Video, MEDIASUBTYPE_V216},
|
||||
{MFMediaType_Video, MEDIASUBTYPE_V410},
|
||||
{MFMediaType_Video, MFVideoFormat_NV11},
|
||||
};
|
||||
|
||||
struct mft
|
||||
{
|
||||
GUID clsid;
|
||||
|
@ -424,16 +381,6 @@ HRESULT mfplat_DllRegisterServer(void)
|
|||
ARRAY_SIZE(resampler_types),
|
||||
resampler_types,
|
||||
},
|
||||
{
|
||||
CLSID_CColorConvertDMO,
|
||||
MFT_CATEGORY_VIDEO_EFFECT,
|
||||
L"Color Converter MFT",
|
||||
MFT_ENUM_FLAG_SYNCMFT,
|
||||
ARRAY_SIZE(color_convert_input_types),
|
||||
color_convert_input_types,
|
||||
ARRAY_SIZE(color_convert_output_types),
|
||||
color_convert_output_types,
|
||||
},
|
||||
};
|
||||
|
||||
unsigned int i;
|
||||
|
|
|
@ -121,9 +121,9 @@ coclass CResamplerMediaObject {}
|
|||
|
||||
[
|
||||
threading(both),
|
||||
uuid(98230571-0087-4204-b020-3282538e57d3)
|
||||
uuid(f47e2da5-e370-47b7-903a-078ddd45a5cc)
|
||||
]
|
||||
coclass CColorConvertDMO {}
|
||||
coclass wg_color_converter {}
|
||||
|
||||
[
|
||||
threading(both),
|
||||
|
|
|
@ -2103,6 +2103,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
|
|||
11,,shell32.dll,1
|
||||
11,,quartz.dll,1
|
||||
|
||||
11,,colorcnv.dll,1
|
||||
11,,cryptdlg.dll,1
|
||||
11,,cryptnet.dll,1
|
||||
11,,devenum.dll,1
|
||||
|
|
Loading…
Reference in a new issue