[MSDMO]
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 11 Oct 2013 13:11:30 +0000 (13:11 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 11 Oct 2013 13:11:30 +0000 (13:11 +0000)
* Sync with Wine 1.7.1.
CORE-7469

svn path=/trunk/; revision=60604

reactos/dll/directx/wine/msdmo/CMakeLists.txt
reactos/dll/directx/wine/msdmo/dmoreg.c
reactos/media/doc/README.WINE

index 346b5df..a5ddd53 100644 (file)
@@ -1,29 +1,16 @@
 
-
 add_definitions(-D__WINESRC__)
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-
 spec2def(msdmo.dll msdmo.spec)
 
-add_library(msdmo SHARED
+list(APPEND SOURCE
     dmoreg.c
     dmort.c
     stubs.c
-    rsrc.rc
     ${CMAKE_CURRENT_BINARY_DIR}/msdmo.def)
 
-set_module_type(msdmo win32dll UNICODE)
-
+add_library(msdmo SHARED ${SOURCE} rsrc.rc)
+set_module_type(msdmo win32dll)
 target_link_libraries(msdmo uuid wine mediaobj_guid)
-
-add_importlibs(msdmo
-    msvcrt
-    user32
-    advapi32
-    ole32
-    kernel32
-    ntdll)
-
-add_dependencies(msdmo dxsdk psdk)
-
+add_importlibs(msdmo user32 advapi32 ole32 msvcrt kernel32 ntdll)
 add_cd_file(TARGET msdmo DESTINATION reactos/system32 FOR all)
index 2a63452..967acd0 100644 (file)
@@ -89,7 +89,7 @@ static const WCHAR szToGuidFmt[] =
 
 typedef struct
 {
-    const IEnumDMOVtbl         *lpVtbl;
+    IEnumDMO                    IEnumDMO_iface;
     LONG                       ref;
     DWORD                      index;
     const GUID*                 guidCategory;
@@ -101,6 +101,11 @@ typedef struct
     HKEY                        hkey;
 } IEnumDMOImpl;
 
+static inline IEnumDMOImpl *impl_from_IEnumDMO(IEnumDMO *iface)
+{
+    return CONTAINING_RECORD(iface, IEnumDMOImpl, IEnumDMO_iface);
+}
+
 static HRESULT read_types(HKEY root, LPCWSTR key, ULONG *supplied, ULONG requested, DMO_PARTIAL_MEDIATYPE* types);
 
 static const IEnumDMOVtbl edmovt;
@@ -332,12 +337,10 @@ lend:
 
 
 /**************************************************************************
-*   IEnumDMO_Destructor
+*   IEnumDMOImpl_Destructor
 */
-static BOOL IEnumDMO_Destructor(IEnumDMO* iface)
+static BOOL IEnumDMOImpl_Destructor(IEnumDMOImpl* This)
 {
-    IEnumDMOImpl *This = (IEnumDMOImpl *)iface;
-
     TRACE("%p\n", This);
 
     if (This->hkey)
@@ -370,7 +373,7 @@ static IEnumDMO * IEnumDMO_Constructor(
     if (lpedmo)
     {
         lpedmo->ref = 1;
-        lpedmo->lpVtbl = &edmovt;
+        lpedmo->IEnumDMO_iface.lpVtbl = &edmovt;
         lpedmo->index = -1;
        lpedmo->guidCategory = guidCategory;
        lpedmo->dwFlags = dwFlags;
@@ -417,7 +420,7 @@ static IEnumDMO * IEnumDMO_Constructor(
 lerr:
         if(!ret)
         {
-            IEnumDMO_Destructor((IEnumDMO*)lpedmo);
+            IEnumDMOImpl_Destructor(lpedmo);
             HeapFree(GetProcessHeap(),0,lpedmo);
             lpedmo = NULL;
         }
@@ -434,7 +437,7 @@ lerr:
  */
 static ULONG WINAPI IEnumDMO_fnAddRef(IEnumDMO * iface)
 {
-    IEnumDMOImpl *This = (IEnumDMOImpl *)iface;
+    IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
     return InterlockedIncrement(&This->ref);
 }
 
@@ -447,7 +450,7 @@ static HRESULT WINAPI IEnumDMO_fnQueryInterface(
     REFIID riid,
     LPVOID *ppvObj)
 {
-    IEnumDMOImpl *This = (IEnumDMOImpl *)iface;
+    IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
 
     *ppvObj = NULL;
 
@@ -471,12 +474,12 @@ static HRESULT WINAPI IEnumDMO_fnQueryInterface(
  */
 static ULONG WINAPI IEnumDMO_fnRelease(IEnumDMO * iface)
 {
-    IEnumDMOImpl *This = (IEnumDMOImpl *)iface;
+    IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
     ULONG refCount = InterlockedDecrement(&This->ref);
 
     if (!refCount)
     {
-        IEnumDMO_Destructor((IEnumDMO*)This);
+        IEnumDMOImpl_Destructor(This);
         HeapFree(GetProcessHeap(),0,This);
     }
     return refCount;
@@ -503,7 +506,7 @@ static HRESULT WINAPI IEnumDMO_fnNext(
     UINT count = 0;
     HRESULT hres = S_OK;
 
-    IEnumDMOImpl *This = (IEnumDMOImpl *)iface;
+    IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
 
     TRACE("--> (%p) %d %p %p %p\n", iface, cItemsToFetch, pCLSID, Names, pcItemsFetched);
 
@@ -642,7 +645,7 @@ static HRESULT WINAPI IEnumDMO_fnNext(
  */
 static HRESULT WINAPI IEnumDMO_fnSkip(IEnumDMO * iface, DWORD cItemsToSkip)
 {
-    IEnumDMOImpl *This = (IEnumDMOImpl *)iface;
+    IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
 
     This->index += cItemsToSkip;
 
@@ -655,7 +658,7 @@ static HRESULT WINAPI IEnumDMO_fnSkip(IEnumDMO * iface, DWORD cItemsToSkip)
  */
 static HRESULT WINAPI IEnumDMO_fnReset(IEnumDMO * iface)
 {
-    IEnumDMOImpl *This = (IEnumDMOImpl *)iface;
+    IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
 
     This->index = -1;
 
@@ -668,7 +671,7 @@ static HRESULT WINAPI IEnumDMO_fnReset(IEnumDMO * iface)
  */
 static HRESULT WINAPI IEnumDMO_fnClone(IEnumDMO * iface, IEnumDMO **ppEnum)
 {
-    IEnumDMOImpl *This = (IEnumDMOImpl *)iface;
+    IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
 
     FIXME("(%p)->() to (%p)->() E_NOTIMPL\n", This, ppEnum);
 
@@ -802,9 +805,9 @@ HRESULT WINAPI DMOGetTypes(REFCLSID clsidDMO,
   HRESULT ret = S_OK;
   WCHAR szguid[64];
 
-  TRACE ("(%s,%u,%p,%p,%u,%p,%p),stub!\n", debugstr_guid(clsidDMO),
-        ulInputTypesRequested, pulInputTypesSupplied, pInputTypes,
-        ulOutputTypesRequested, pulOutputTypesSupplied, pOutputTypes);
+  TRACE ("(%s,%u,%p,%p,%u,%p,%p)\n", debugstr_guid(clsidDMO), ulInputTypesRequested,
+        pulInputTypesSupplied, pInputTypes, ulOutputTypesRequested, pulOutputTypesSupplied,
+        pOutputTypes);
 
   if (ERROR_SUCCESS != RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0,
                                      KEY_READ, &root))
index 248373e..20c31cd 100644 (file)
@@ -43,7 +43,7 @@ reactos/dll/directx/wine/dplayx         # Synced to Wine-1.7.1
 reactos/dll/directx/wine/dsound         # Synced to Wine-1.7.1
 reactos/dll/directx/wine/dxdiagn        # Synced to Wine-1.7.1
 reactos/dll/directx/wine/dxgi           # Synced to Wine-1.7.1
-reactos/dll/directx/wine/msdmo          # Autosync
+reactos/dll/directx/wine/msdmo          # Synced to Wine-1.7.1
 reactos/dll/directx/wine/qedit          # Autosync
 reactos/dll/directx/wine/quartz         # Synced to Wine-1.5.26
 reactos/dll/directx/wine/wined3d        # Synced to Wine-1.7.1