Commit 1fa96246 authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Stubbed some interfaces for the FilterGraph CLSID.

parent 4cbc69a2
...@@ -3,11 +3,14 @@ TOPOBJDIR = ../.. ...@@ -3,11 +3,14 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = quartz.dll MODULE = quartz.dll
IMPORTS = kernel32
EXTRALIBS = $(LIBUUID)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
filtergraph.c \
main.c main.c
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
......
/* DirectShow Base Functions (QUARTZ.DLL)
*
* Copyright 2002 Lionel Ulmer
*
* This file contains the (internal) driver registration functions,
* driver enumeration APIs and DirectDraw creation functions.
*
* 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
*/
#include "config.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "winerror.h"
#include "quartz_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz); WINE_DEFAULT_DEBUG_CHANNEL(quartz);
DWORD dll_ref = 0; static DWORD dll_ref = 0;
/*********************************************************************** /* For the moment, do nothing here. */
* DllRegisterServer (QUARTZ.@) BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
/******************************************************************************
* DirectShow ClassFactory
*/ */
HRESULT WINAPI QUARTZ_DllRegisterServer() typedef struct {
IClassFactory ITF_IClassFactory;
DWORD ref;
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
} IClassFactoryImpl;
struct object_creation_info
{ {
FIXME("(): stub\n"); const CLSID *clsid;
return 0; HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
};
static const struct object_creation_info object_creation[] =
{
{ &CLSID_FilterGraph, FILTERGRAPH_create },
};
static HRESULT WINAPI
DSCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS(IClassFactoryImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory))
{
IClassFactory_AddRef(iface);
*ppobj = This;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
return E_NOINTERFACE;
} }
/*********************************************************************** static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface) {
* DllGetClassObject (QUARTZ.@) ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
ULONG ref = --This->ref;
if (ref == 0)
HeapFree(GetProcessHeap(), 0, This);
return ref;
}
static HRESULT WINAPI DSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter,
REFIID riid, LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
HRESULT hres;
LPUNKNOWN punk;
TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk);
if (FAILED(hres)) {
*ppobj = NULL;
return hres;
}
hres = IUnknown_QueryInterface(punk, riid, ppobj);
if (FAILED(hres)) {
*ppobj = NULL;
return hres;
}
IUnknown_Release(punk);
return hres;
}
static HRESULT WINAPI DSCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n",This,dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DSCF_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
DSCF_QueryInterface,
DSCF_AddRef,
DSCF_Release,
DSCF_CreateInstance,
DSCF_LockServer
};
/*******************************************************************************
* DllGetClassObject [QUARTZ.@]
* Retrieves class object from a DLL object
*
* NOTES
* Docs say returns STDAPI
*
* PARAMS
* rclsid [I] CLSID for the class object
* riid [I] Reference to identifier of interface for class object
* ppv [O] Address of variable to receive interface pointer for riid
*
* RETURNS
* Success: S_OK
* Failure: CLASS_E_CLASSNOTAVAILABLE, E_OUTOFMEMORY, E_INVALIDARG,
* E_UNEXPECTED
*/ */
HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) DWORD WINAPI QUARTZ_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{ {
FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid)); int i;
IClassFactoryImpl *factory;
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if ( !IsEqualGUID( &IID_IClassFactory, riid )
&& ! IsEqualGUID( &IID_IUnknown, riid) )
return E_NOINTERFACE;
for (i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++)
{
if (IsEqualGUID(object_creation[i].clsid, rclsid))
break;
}
if (i == sizeof(object_creation)/sizeof(object_creation[0]))
{
FIXME("%s: no class found.\n", debugstr_guid(rclsid));
return CLASS_E_CLASSNOTAVAILABLE; return CLASS_E_CLASSNOTAVAILABLE;
}
factory = HeapAlloc(GetProcessHeap(), 0, sizeof(*factory));
if (factory == NULL) return E_OUTOFMEMORY;
factory->ITF_IClassFactory.lpVtbl = &DSCF_Vtbl;
factory->ref = 1;
factory->pfnCreateInstance = object_creation[i].pfnCreateInstance;
*ppv = &(factory->ITF_IClassFactory);
return S_OK;
}
/***********************************************************************
* DllRegisterServer (QUARTZ.@)
*/
HRESULT WINAPI QUARTZ_DllRegisterServer()
{
FIXME("(): stub\n");
return 0;
} }
/*********************************************************************** /***********************************************************************
......
/* DirectShow private interfaces (QUARTZ.DLL)
*
* Copyright 2002 Lionel Ulmer
*
* This file contains the (internal) driver registration functions,
* driver enumeration APIs and DirectDraw creation functions.
*
* 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
*/
#ifndef __QUARTZ_PRIVATE_INCLUDED__
#define __QUARTZ_PRIVATE_INCLUDED__
#include "winbase.h"
#include "wtypes.h"
#include "wingdi.h"
#include "winuser.h"
#include "dshow.h"
typedef struct _IFilterGraphImpl {
ICOM_VTABLE(IGraphBuilder) *IGraphBuilder_vtbl;
ICOM_VTABLE(IMediaControl) *IMediaControl_vtbl;
ICOM_VTABLE(IMediaSeeking) *IMediaSeeking_vtbl;
ICOM_VTABLE(IBasicAudio) *IBasicAudio_vtbl;
ICOM_VTABLE(IBasicVideo) *IBasicVideo_vtbl;
ICOM_VTABLE(IVideoWindow) *IVideoWindow_vtbl;
ICOM_VTABLE(IMediaEventEx) *IMediaEventEx_vtbl;
ULONG ref;
} IFilterGraphImpl;
HRESULT FILTERGRAPH_create(IUnknown *pUnkOuter, LPVOID *ppObj) ;
#endif /* __QUARTZ_PRIVATE_INCLUDED__ */
...@@ -20,6 +20,7 @@ WINDOWS_INCLUDES = \ ...@@ -20,6 +20,7 @@ WINDOWS_INCLUDES = \
commctrl.h \ commctrl.h \
commdlg.h \ commdlg.h \
compobj.h \ compobj.h \
control.h \
cpl.h \ cpl.h \
custcntl.h \ custcntl.h \
d3d.h \ d3d.h \
...@@ -140,6 +141,7 @@ WINDOWS_INCLUDES = \ ...@@ -140,6 +141,7 @@ WINDOWS_INCLUDES = \
sqlext.h \ sqlext.h \
sqltypes.h \ sqltypes.h \
storage.h \ storage.h \
strmif.h \
tapi.h \ tapi.h \
tchar.h \ tchar.h \
tlhelp32.h \ tlhelp32.h \
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
#define AM_NOVTABLE #define AM_NOVTABLE
#include "windows.h" #include "windef.h"
#include "windowsx.h" #include "wingdi.h"
#include "olectl.h" #include "objbase.h"
#include "ddraw.h" #include "ddraw.h"
#include "mmsystem.h" #include "mmsystem.h"
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
#define NUMELMS(array) (sizeof(array)/sizeof((array)[0])) #define NUMELMS(array) (sizeof(array)/sizeof((array)[0]))
#endif #endif
/*#include "strmif.h"*/ #include "strmif.h"
/*#include "amvideo.h"*/ /*#include "amvideo.h"*/
/*#include "amaudio.h"*/ /*#include "amaudio.h"*/
/*#include "control.h"*/ #include "control.h"
/*#include "evcode.h"*/ /*#include "evcode.h"*/
#include "uuids.h" #include "uuids.h"
/*#include "errors.h"*/ /*#include "errors.h"*/
......
...@@ -270,5 +270,13 @@ OUR_GUID_ENTRY(CLSID_VideoProcAmpPropertyPage, 0x71f96464, 0x78f3, 0x11d0, ...@@ -270,5 +270,13 @@ OUR_GUID_ENTRY(CLSID_VideoProcAmpPropertyPage, 0x71f96464, 0x78f3, 0x11d0,
OUR_GUID_ENTRY(CLSID_CameraControlPropertyPage, 0x71f96465, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56) OUR_GUID_ENTRY(CLSID_CameraControlPropertyPage, 0x71f96465, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56)
OUR_GUID_ENTRY(CLSID_AnalogVideoDecoderPropertyPage, 0x71f96466, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56) OUR_GUID_ENTRY(CLSID_AnalogVideoDecoderPropertyPage, 0x71f96466, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56)
OUR_GUID_ENTRY(CLSID_VideoStreamConfigPropertyPage, 0x71f96467, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56) OUR_GUID_ENTRY(CLSID_VideoStreamConfigPropertyPage, 0x71f96467, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56)
OUR_GUID_ENTRY(IID_IGraphBuilder, 0x56a868a9, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
OUR_GUID_ENTRY(IID_IMediaControl, 0x56a868b1, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
OUR_GUID_ENTRY(IID_IMediaSeeking, 0x36b73880, 0xc2c8, 0x11cf, 0x8b, 0x46, 0x00, 0x80, 0x5f, 0x6c, 0xef, 0x60)
OUR_GUID_ENTRY(IID_IBasicVideo, 0x56a868b5, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
OUR_GUID_ENTRY(IID_IVideoWindow, 0x56a868b4, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
OUR_GUID_ENTRY(IID_IMediaEvent, 0x56a868b6, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
OUR_GUID_ENTRY(IID_IMediaEventEx, 0x56a868c0, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
OUR_GUID_ENTRY(IID_IBasicAudio, 0x56a868b3, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
#undef OUR_GUID_ENTRY #undef OUR_GUID_ENTRY
...@@ -4004,3 +4004,14 @@ ...@@ -4004,3 +4004,14 @@
[HKEY_CLASSES_ROOT\txtfile\shell\print\command] [HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@="C:\\WINDOWS\\NOTEPAD.EXE /p %1" @="C:\\WINDOWS\\NOTEPAD.EXE /p %1"
#
# Entries for DirectShow
#
[Software\\CLASSES\\CLSID\\{E436EBB3-524F-11CE-9F53-0020AF0BA770}] 1032641842
@="Filter Graph"
[Software\\CLASSES\\CLSID\\{E436EBB3-524F-11CE-9F53-0020AF0BA770}\\InprocServer32] 1032641842
@="C:\\windows\\system\\quartz.dll"
"ThreadingModel"="Both"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment