Re: [MSDMO] Some methods implement and stubs added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Dmitry Timoshkov" <dmitry@baikal.ru> writes:

> "Michael "Günnewig"" <MichaelGuennewig@gmx.de> wrote:
>
>> Adapted it and also added "rsrc.res" to ".cvsignore". So here is the
>> new resulting patch.
>
> I don't see rsrc.rc in the patch. Also, please send the patch to
> wine-patches, since Alexandre doesn't apply patches sent to wine-devel.

Oops, forgotten to append it, but now.

>> Changelog:
>>   - Implemented Mo* methods in msdmo.dll
>>   - Added stubs for DMORegister, DMOUnregister, DMOEnum, DMOGetTypes,
>>     DMOGetName.
>>   - Added version resources.

  Michael Günnewig

Index: dlls/msdmo/.cvsignore
===================================================================
RCS file: /home/wine/wine/dlls/msdmo/.cvsignore,v
retrieving revision 1.3
diff -d -u -r1.3 .cvsignore
--- dlls/msdmo/.cvsignore	12 Dec 2002 22:04:06 -0000	1.3
+++ dlls/msdmo/.cvsignore	20 Jul 2003 17:47:38 -0000
@@ -2,3 +2,4 @@
 msdmo.dll.dbg.c
 msdmo.spec.c
 msdmo.spec.def
+rsrc.res
\ No newline at end of file
Index: dlls/msdmo/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/msdmo/Makefile.in,v
retrieving revision 1.6
diff -d -u -r1.6 Makefile.in
--- dlls/msdmo/Makefile.in	17 May 2002 03:37:13 -0000	1.6
+++ dlls/msdmo/Makefile.in	20 Jul 2003 17:47:38 -0000
@@ -3,6 +3,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = msdmo.dll
+IMPORTS   = ole32 kernel32
 
 LDDLLFLAGS = @LDDLLFLAGS@
 SYMBOLFILE = $(MODULE).tmp.o
@@ -11,6 +12,9 @@
 	dmoreg.c \
 	dmort.c \
 	msdmo_main.c
+
+RC_SRCS = \
+	rsrc.rc
 
 @MAKE_DLL_RULES@
 
Index: dlls/msdmo/dmoreg.c
===================================================================
RCS file: /home/wine/wine/dlls/msdmo/dmoreg.c,v
retrieving revision 1.2
diff -d -u -r1.2 dmoreg.c
--- dlls/msdmo/dmoreg.c	22 Mar 2002 19:19:23 -0000	1.2
+++ dlls/msdmo/dmoreg.c	20 Jul 2003 17:47:39 -0000
@@ -1 +1,83 @@
-/* Code removed because of Microsoft EULA concerns. */
+/*
+ * Copyright (C) 2003 Michael Günnewig
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#define COM_NO_WINDOWS_H
+#include "winbase.h"
+#include "objbase.h"
+#include "mediaobj.h"
+#include "dmoreg.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msdmo);
+
+/***********************************************************************/
+
+HRESULT WINAPI DMORegister(LPCWSTR a, REFCLSID b, REFGUID c, DWORD d, DWORD e,
+			   const DMO_PARTIAL_MEDIATYPE* f,
+                           DWORD g, const DMO_PARTIAL_MEDIATYPE* h)
+{
+  FIXME("(%p,%p,%p,%lu,%lu,%p,%lu,%p),stub!\n",a,b,c,d,e,f,g,h);
+
+  return E_NOTIMPL;
+}
+
+HRESULT WINAPI DMOUnregister(REFCLSID a,REFGUID b)
+{
+  FIXME("(%p,%p),stub!\n",a,b);
+
+  return E_NOTIMPL;
+}
+
+HRESULT WINAPI DMOEnum(REFGUID guidCategory, DWORD dwFlags, DWORD cInTypes,
+		       const DMO_PARTIAL_MEDIATYPE*pInTypes, DWORD cOutTypes,
+		       const DMO_PARTIAL_MEDIATYPE*pOutTypes,IEnumDMO**ppEnum)
+{
+  FIXME("(%s,0x%lX,%lu,%p,%lu,%p,%p),stub!\n",debugstr_guid(guidCategory),
+	dwFlags,cInTypes,pInTypes,cOutTypes,pOutTypes,ppEnum);
+
+  if (guidCategory == NULL || ppEnum == NULL)
+    return E_FAIL;
+  if (dwFlags != 0 && dwFlags != DMO_ENUMF_INCLUDE_KEYED)
+    return E_FAIL;
+
+  *ppEnum = NULL;
+
+  return E_NOTIMPL;
+}
+
+HRESULT WINAPI DMOGetTypes(REFCLSID a, unsigned long b, unsigned long* c,
+			   DMO_PARTIAL_MEDIATYPE* d, unsigned long e,
+			   unsigned long* f, DMO_PARTIAL_MEDIATYPE* g)
+{
+  FIXME("(%p,%lu,%p,%p,%lu,%p,%p),stub!\n",a,b,c,d,e,f,g);
+
+  return E_NOTIMPL;
+}
+
+HRESULT WINAPI DMOGetName(REFCLSID pclsid, WCHAR* pstr)
+{
+  FIXME("(%s,%p),stub!\n", debugstr_guid(pclsid), pstr);
+
+  if (pclsid == NULL || pstr == NULL)
+    return E_FAIL;
+
+  pstr[0] = '\0';
+
+  return E_NOTIMPL;
+}
Index: dlls/msdmo/dmort.c
===================================================================
RCS file: /home/wine/wine/dlls/msdmo/dmort.c,v
retrieving revision 1.2
diff -d -u -r1.2 dmort.c
--- dlls/msdmo/dmort.c	22 Mar 2002 19:19:23 -0000	1.2
+++ dlls/msdmo/dmort.c	20 Jul 2003 17:47:40 -0000
@@ -1 +1,178 @@
-/* Code removed because of Microsoft EULA concerns. */
+/*
+ * Copyright (C) 2003 Michael Günnewig
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#define COM_NO_WINDOWS_H
+#include "winbase.h"
+#include "objbase.h"
+#include "mediaobj.h"
+#include "dmort.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msdmo);
+
+/***********************************************************************
+ *		MoCreateMediaType	(MSDMO.@)
+ */
+HRESULT WINAPI MoCreateMediaType(DMO_MEDIA_TYPE** ppmedia, DWORD cbFormat)
+{
+  HRESULT hr;
+
+  TRACE("(%p,%lu)\n", ppmedia, cbFormat);
+
+  if (ppmedia == NULL)
+    return E_POINTER;
+
+  *ppmedia = CoTaskMemAlloc(sizeof(DMO_MEDIA_TYPE));
+  if (*ppmedia == NULL)
+    return E_OUTOFMEMORY;
+
+  hr = MoInitMediaType(*ppmedia, cbFormat);
+  if (FAILED(hr)) {
+    CoTaskMemFree(*ppmedia);
+    *ppmedia = NULL;
+  }
+
+  return hr;
+}
+
+/***********************************************************************
+ *		MoInitMediaType		(MSDMO.@)
+ */
+HRESULT WINAPI MoInitMediaType(DMO_MEDIA_TYPE* pmedia, DWORD cbFormat)
+{
+  TRACE("(%p,%lu)\n", pmedia,cbFormat);
+
+  if (pmedia == NULL)
+    return E_POINTER;
+
+  memset(pmedia, 0, sizeof(DMO_MEDIA_TYPE));
+
+  if (cbFormat > 0) {
+    pmedia->pbFormat = CoTaskMemAlloc(cbFormat);
+    if (pmedia->pbFormat == NULL)
+      return E_OUTOFMEMORY;
+
+    pmedia->cbFormat = cbFormat;
+  }
+
+  return S_OK;
+}
+
+/***********************************************************************
+ *		MoDeleteMediaType	(MSDMO.@)
+ */
+HRESULT WINAPI MoDeleteMediaType(DMO_MEDIA_TYPE* pmedia)
+{
+  TRACE("(%p)\n", pmedia);
+
+  if (pmedia == NULL)
+    return E_POINTER;
+
+  MoFreeMediaType(pmedia);
+  CoTaskMemFree(pmedia);
+
+  return S_OK;
+}
+
+/***********************************************************************
+ *		MoFreeMediaType		(MSDMO.@)
+ */
+HRESULT WINAPI MoFreeMediaType(DMO_MEDIA_TYPE* pmedia)
+{
+  TRACE("(%p)\n", pmedia);
+
+  if (pmedia == NULL)
+    return E_POINTER;
+
+  if (pmedia->pUnk != NULL) {
+    IUnknown_Release(pmedia->pUnk);
+    pmedia->pUnk = NULL;
+  }
+
+  if (pmedia->pbFormat != NULL) {
+    CoTaskMemFree(pmedia->pbFormat);
+    pmedia->pbFormat = NULL;
+  }
+
+  return S_OK;
+}
+
+/***********************************************************************
+ *		MoDuplicateMediaType	(MSDMO.@)
+ */
+HRESULT WINAPI MoDuplicateMediaType(DMO_MEDIA_TYPE** ppdst,
+				    const DMO_MEDIA_TYPE* psrc)
+{
+  HRESULT hr;
+
+  TRACE("(%p,%p)\n", ppdst, psrc);
+
+  if (ppdst == NULL || psrc == NULL)
+    return E_POINTER;
+
+  *ppdst = CoTaskMemAlloc(sizeof(DMO_MEDIA_TYPE));
+  if (*ppdst == NULL)
+    return E_OUTOFMEMORY;
+
+  hr = MoCopyMediaType(*ppdst, psrc);
+  if (FAILED(hr)) {
+    MoFreeMediaType(*ppdst);
+    *ppdst = NULL;
+  }
+
+  return hr;
+}
+
+/***********************************************************************
+ *		MoCopyMediaType		(MSDMO.@)
+ */
+HRESULT WINAPI MoCopyMediaType(DMO_MEDIA_TYPE* pdst,
+			       const DMO_MEDIA_TYPE* psrc)
+{
+  TRACE("(%p,%p)\n", pdst, psrc);
+
+  if (pdst == NULL || psrc == NULL)
+    return E_POINTER;
+
+  memcpy(&pdst->majortype,  &psrc->majortype,  sizeof(psrc->majortype));
+  memcpy(&pdst->subtype,    &psrc->subtype,    sizeof(psrc->subtype));
+  memcpy(&pdst->formattype, &psrc->formattype, sizeof(psrc->formattype));
+
+  pdst->bFixedSizeSamples    = psrc->bFixedSizeSamples;
+  pdst->bTemporalCompression = psrc->bTemporalCompression;
+  pdst->lSampleSize          = psrc->lSampleSize;
+  pdst->cbFormat             = psrc->cbFormat;
+
+  if (psrc->pbFormat != NULL && psrc->cbFormat > 0) {
+    pdst->pbFormat = CoTaskMemAlloc(psrc->cbFormat);
+    if (pdst->pbFormat == NULL)
+      return E_OUTOFMEMORY;
+
+    memcpy(pdst->pbFormat, psrc->pbFormat, psrc->cbFormat);
+  } else
+    pdst->pbFormat = NULL;
+
+  if (psrc->pUnk != NULL) {
+    pdst->pUnk = psrc->pUnk;
+    IUnknown_AddRef(pdst->pUnk);
+  } else
+    pdst->pUnk = NULL;
+
+  return S_OK;
+}
Index: dlls/msdmo/msdmo.spec
===================================================================
RCS file: /home/wine/wine/dlls/msdmo/msdmo.spec,v
retrieving revision 1.6
diff -d -u -r1.6 msdmo.spec
--- dlls/msdmo/msdmo.spec	21 Jun 2002 19:15:47 -0000	1.6
+++ dlls/msdmo/msdmo.spec	20 Jul 2003 17:47:40 -0000
@@ -1,15 +1,15 @@
-@ stub DMOEnum
-@ stub DMOGetName
-@ stub DMOGetTypes
-@ stub DMOGuidToStrA
-@ stub DMOGuidToStrW
-@ stub DMORegister
-@ stub DMOStrToGuidA
-@ stub DMOStrToGuidW
-@ stub DMOUnregister
-@ stub MoCopyMediaType
-@ stub MoCreateMediaType
-@ stub MoDeleteMediaType
-@ stub MoDuplicateMediaType
-@ stub MoFreeMediaType
-@ stub MoInitMediaType
+@ stdcall DMOEnum(ptr long long ptr long ptr ptr)
+@ stdcall DMOGetName(ptr wstr)
+@ stdcall DMOGetTypes(ptr long ptr ptr long ptr ptr)
+@ stub    DMOGuidToStrA
+@ stub    DMOGuidToStrW
+@ stdcall DMORegister(wstr ptr ptr long long ptr long ptr)
+@ stub    DMOStrToGuidA
+@ stub    DMOStrToGuidW
+@ stdcall DMOUnregister(ptr ptr)
+@ stdcall MoCopyMediaType(ptr ptr)
+@ stdcall MoCreateMediaType(ptr long)
+@ stdcall MoDeleteMediaType(ptr)
+@ stdcall MoDuplicateMediaType(ptr ptr)
+@ stdcall MoFreeMediaType(ptr)
+@ stdcall MoInitMediaType(ptr long)
--- /dev/null	2002-09-09 22:24:09.000000000 +0200
+++ dlls/msdmo/rsrc.rc	2003-07-20 19:43:38.000000000 +0200
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2003 Michael Günnewig
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#define WINE_FILEDESCRIPTION_STR "DMO Runtime"
+#define WINE_FILENAME_STR	 "msdmo.dll"
+#define WINE_FILEVERSION	 6,3,1,400
+#define WINE_FILEVERSION_STR	 "6.3.1.400"
+#define WINE_PRODUCTVERSION	 6,3,1,400
+#define WINE_PRODUCTVERSION_STR	 "6.3.1.400"
+#define WINE_PRODUCTNAME_STR	 "DirectShow"
+
+#include "wine/wine_common_ver.rc"

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux