Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/main.c | 74 ++-------------------------- dlls/winegstreamer/rsrc.rc | 4 +- dlls/winegstreamer/winegstreamer.inf | 12 ----- dlls/winegstreamer/winegstreamer.rgs | 14 ++++++ 4 files changed, 21 insertions(+), 83 deletions(-) delete mode 100644 dlls/winegstreamer/winegstreamer.inf create mode 100644 dlls/winegstreamer/winegstreamer.rgs
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index 2a5dbd1455..fa0b7e6bd8 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -24,16 +24,11 @@
#include <gst/gst.h>
-#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winreg.h" -#include "winerror.h" -#include "advpub.h" +#include "gst_private.h" +#include "rpcproxy.h" #include "wine/debug.h" - #include "wine/unicode.h" -#include "gst_private.h" + #include "initguid.h" #include "gst_guids.h"
@@ -308,65 +303,6 @@ BOOL init_gstreamer(void) return status; }
-#define INF_SET_ID(id) \ - do \ - { \ - static CHAR name[] = #id; \ - \ - pse[i].pszName = name; \ - clsids[i++] = &id; \ - } while (0) - -#define INF_SET_CLSID(clsid) INF_SET_ID(CLSID_ ## clsid) - -static HRESULT register_server(BOOL do_register) -{ - HRESULT hres; - HMODULE hAdvpack; - HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable); - STRTABLEA strtable; - STRENTRYA pse[3]; - static CLSID const *clsids[3]; - unsigned int i = 0; - - static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; - - TRACE("(%x)\n", do_register); - - INF_SET_CLSID(AsyncReader); - INF_SET_ID(MEDIATYPE_Stream); - INF_SET_ID(WINESUBTYPE_Gstreamer); - - for(i = 0; i < ARRAY_SIZE(pse); i++) { - pse[i].pszValue = HeapAlloc(GetProcessHeap(),0,39); - sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0], - clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4], - clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]); - } - - strtable.cEntries = ARRAY_SIZE(pse); - strtable.pse = pse; - - hAdvpack = LoadLibraryW(wszAdvpack); - pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall"); - - hres = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable); - - for(i = 0; i < ARRAY_SIZE(pse); i++) - HeapFree(GetProcessHeap(),0,pse[i].pszValue); - - if(FAILED(hres)) { - ERR("RegInstall failed: %08x\n", hres); - return hres; - } - - return hres; -} - -#undef INF_SET_CLSID -#undef INF_SET_ID - /*********************************************************************** * DllRegisterServer */ @@ -378,7 +314,7 @@ HRESULT WINAPI DllRegisterServer(void)
hr = AMovieDllRegisterServer2(TRUE); if (SUCCEEDED(hr)) - hr = register_server(TRUE); + hr = __wine_register_resources(hInst); return hr; }
@@ -393,6 +329,6 @@ HRESULT WINAPI DllUnregisterServer(void)
hr = AMovieDllRegisterServer2(FALSE); if (SUCCEEDED(hr)) - hr = register_server(FALSE); + hr = __wine_unregister_resources(hInst); return hr; } diff --git a/dlls/winegstreamer/rsrc.rc b/dlls/winegstreamer/rsrc.rc index e12ba77bf8..592bcb0113 100644 --- a/dlls/winegstreamer/rsrc.rc +++ b/dlls/winegstreamer/rsrc.rc @@ -24,5 +24,5 @@
#include "wine/wine_common_ver.rc"
-/* @makedep: winegstreamer.inf */ -REGINST REGINST winegstreamer.inf +/* @makedep: winegstreamer.rgs */ +1 WINE_REGISTRY winegstreamer.rgs diff --git a/dlls/winegstreamer/winegstreamer.inf b/dlls/winegstreamer/winegstreamer.inf deleted file mode 100644 index 64777553b7..0000000000 --- a/dlls/winegstreamer/winegstreamer.inf +++ /dev/null @@ -1,12 +0,0 @@ -[version] -Signature="$CHICAGO$" - -[RegisterDll] -AddReg=MediaParsing.Reg - -[UnregisterDll] -DelReg=MediaParsing.Reg - -[MediaParsing.Reg] -HKCR,"Media Type%MEDIATYPE_Stream%%WINESUBTYPE_Gstreamer%","0",,"0,1,00,0" -HKCR,"Media Type%MEDIATYPE_Stream%%WINESUBTYPE_Gstreamer%","Source Filter",,"%CLSID_AsyncReader%" diff --git a/dlls/winegstreamer/winegstreamer.rgs b/dlls/winegstreamer/winegstreamer.rgs new file mode 100644 index 0000000000..923ba673f8 --- /dev/null +++ b/dlls/winegstreamer/winegstreamer.rgs @@ -0,0 +1,14 @@ +HKCR +{ + NoRemove 'Media Type' + { + '{e436eb83-524f-11ce-9f53-0020af0ba770}' + { + ForceRemove '{ffffffff-128f-4dd1-ad22-becfa66ce7aa}' + { + val '0' = s '0,1,00,0' + val 'Source Filter' = s '{e436ebb5-524f-11ce-9f53-0020af0ba770}' + } + } + } +}