Commit 76b7787b authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

Add amstream dll (MultiMedia Streams), part of Direct Show.

parent 954c570a
......@@ -20075,7 +20075,7 @@ MAKE_LIB_RULES=libs/Makelib.rules
MAKE_PROG_RULES=programs/Makeprog.rules
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3dx8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/secur32/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/version/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/amstream/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3dx8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/secur32/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/version/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
cat >confcache <<\_ACEOF
......@@ -20615,6 +20615,7 @@ do
"dlls/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/Makefile" ;;
"dlls/advapi32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/advapi32/Makefile" ;;
"dlls/advapi32/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/advapi32/tests/Makefile" ;;
"dlls/amstream/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/amstream/Makefile" ;;
"dlls/avicap32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/avicap32/Makefile" ;;
"dlls/avifil32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/avifil32/Makefile" ;;
"dlls/cabinet/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/cabinet/Makefile" ;;
......
......@@ -1492,6 +1492,7 @@ Makefile
dlls/Makefile
dlls/advapi32/Makefile
dlls/advapi32/tests/Makefile
dlls/amstream/Makefile
dlls/avicap32/Makefile
dlls/avifil32/Makefile
dlls/cabinet/Makefile
......
......@@ -17,6 +17,7 @@ EXTRADIRS = @GLU32FILES@ @GLUT32FILES@ @OPENGLFILES@ @XFILES@
BASEDIRS = \
advapi32 \
amstream \
avicap32 \
avifil32 \
cabinet \
......@@ -225,6 +226,7 @@ SYMLINKS = \
$(EXTRADIRS:%=%.dll$(DLLEXT)) \
@WIN16_FILES@ \
advapi32.dll$(DLLEXT) \
amstream.dll$(DLLEXT) \
avicap32.dll$(DLLEXT) \
avifil32.dll$(DLLEXT) \
cabinet.dll$(DLLEXT) \
......@@ -368,6 +370,9 @@ all: $(SYMLINKS)
advapi32.dll$(DLLEXT): advapi32/advapi32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) advapi32/advapi32.dll$(DLLEXT) $@
amstream.dll$(DLLEXT): amstream/amstream.dll$(DLLEXT)
$(RM) $@ && $(LN_S) amstream/amstream.dll$(DLLEXT) $@
avicap32.dll$(DLLEXT): avicap32/avicap32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) avicap32/avicap32.dll$(DLLEXT) $@
......@@ -882,6 +887,7 @@ libuuid.a: uuid/libuuid.a
IMPORT_LIBS = \
libadvapi32 \
libamstream \
libavicap32 \
libavifil32 \
libcabinet \
......@@ -1005,6 +1011,11 @@ libadvapi32.def: advapi32/advapi32.spec.def
libadvapi32.a: advapi32/advapi32.spec.def
$(DLLTOOL) -k -l $@ -d advapi32/advapi32.spec.def
libamstream.def: amstream/amstream.spec.def
$(RM) $@ && $(LN_S) amstream/amstream.spec.def $@
libamstream.a: amstream/amstream.spec.def
$(DLLTOOL) -k -l $@ -d amstream/amstream.spec.def
libavicap32.def: avicap32/avicap32.spec.def
$(RM) $@ && $(LN_S) avicap32/avicap32.spec.def $@
libavicap32.a: avicap32/avicap32.spec.def
......@@ -1566,6 +1577,7 @@ libx11drv.a: x11drv/x11drv.spec.def
$(DLLTOOL) -k -l $@ -d x11drv/x11drv.spec.def
advapi32/advapi32.spec.def: $(WINEBUILD)
amstream/amstream.spec.def: $(WINEBUILD)
avicap32/avicap32.spec.def: $(WINEBUILD)
avifil32/avifil32.spec.def: $(WINEBUILD)
cabinet/cabinet.spec.def: $(WINEBUILD)
......@@ -1685,6 +1697,7 @@ $(INSTALLSUBDIRS:%=%/__install__): $(ALL_IMPORT_LIBS)
# Map library name to the corresponding directory
advapi32/advapi32.dll$(DLLEXT): advapi32
amstream/amstream.dll$(DLLEXT): amstream
avicap32/avicap32.dll$(DLLEXT): avicap32
avifil32/avifil32.dll$(DLLEXT): avifil32
cabinet/cabinet.dll$(DLLEXT): cabinet
......
Makefile
amstream.dll.dbg.c
amstream.spec.c
amstream.spec.def
version.res
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = amstream.dll
IMPORTS = ole32 user32 advapi32 kernel32
EXTRALIBS = -luuid
C_SRCS = \
amstream.c \
main.c \
regsvr.c
RC_SRCS = version.rc
@MAKE_DLL_RULES@
### Dependencies:
/*
* Implementation of IAMMultiMediaStream Interface
*
* Copyright 2004 Christian Costa
*
* 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 "winbase.h"
#include "wingdi.h"
#include "amstream_private.h"
#include "amstream.h"
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
typedef struct {
IAMMultiMediaStream lpVtbl;
int ref;
} IAMMultiMediaStreamImpl;
static struct ICOM_VTABLE(IAMMultiMediaStream) AM_Vtbl;
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
{
IAMMultiMediaStreamImpl* object;
FIXME("(%p,%p)\n", pUnkOuter, ppObj);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAMMultiMediaStreamImpl));
object->lpVtbl.lpVtbl = &AM_Vtbl;
object->ref = 1;
*ppObj = object;
return S_OK;
}
/*** IUnknown methods ***/
static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream* iface, REFIID riid, void** ppvObject)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IAMMultiMediaStream))
{
IClassFactory_AddRef(iface);
*ppvObject = This;
return S_OK;
}
ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
return E_NOINTERFACE;
}
static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream* iface)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)\n", iface, This);
This->ref++;
return S_OK;
}
static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)\n", iface, This);
if (!--This->ref)
HeapFree(GetProcessHeap(), 0, This);
return S_OK;
}
/*** IMultiMediaStream methods ***/
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream* iface, char* pdwFlags, STREAM_TYPE* pStreamType)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pdwFlags, pStreamType);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream* iface, REFMSPID idPurpose, IMediaStream** ppMediaStream)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, idPurpose, ppMediaStream);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStream* iface, long Index, IMediaStream** ppMediaStream)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%ld,%p) stub!\n", This, iface, Index, ppMediaStream);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* iface, STREAM_STATE* pCurrentState)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentState);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE NewState)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->() stub!\n", This, iface);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface, STREAM_TIME* pCurrentTime)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentTime);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* iface, STREAM_TIME* pDuration)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDuration);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME SeekTime)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->() stub!\n", This, iface);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream* iface, HANDLE* phEOS)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, phEOS);
return S_FALSE;
}
/*** IAMMultiMediaStream methods ***/
static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder* pFilterGraph)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%lx,%lx,%p) stub!\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream* iface, IGraphBuilder** ppGraphBuilder)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppGraphBuilder);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream* iface, IMediaStreamFilter** ppFilter)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppFilter);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface, IUnknown* pStreamObject, const MSPID* PurposeId,
DWORD dwFlags, IMediaStream** ppNewStream)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p,%p,%lx,%p) stub!\n", This, iface, pStreamObject, PurposeId, dwFlags, ppNewStream);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR pszFileName, DWORD dwFlags)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p,%lx) stub!\n", This, iface, pszFileName, dwFlags);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream* iface, IBindCtx* pCtx, IMoniker* pMoniker, DWORD dwFlags)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%p,%p,%lx) stub!\n", This, iface, pCtx, pMoniker, dwFlags);
return S_FALSE;
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream* iface, DWORD dwFlags)
{
ICOM_THIS(IAMMultiMediaStreamImpl, iface);
FIXME("(%p/%p)->(%lx) stub!\n", This, iface, dwFlags);
return S_FALSE;
}
static ICOM_VTABLE(IAMMultiMediaStream) AM_Vtbl =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
IAMMultiMediaStreamImpl_QueryInterface,
IAMMultiMediaStreamImpl_AddRef,
IAMMultiMediaStreamImpl_Release,
IAMMultiMediaStreamImpl_GetInformation,
IAMMultiMediaStreamImpl_GetMediaStream,
IAMMultiMediaStreamImpl_EnumMediaStreams,
IAMMultiMediaStreamImpl_GetState,
IAMMultiMediaStreamImpl_SetState,
IAMMultiMediaStreamImpl_GetTime,
IAMMultiMediaStreamImpl_GetDuration,
IAMMultiMediaStreamImpl_Seek,
IAMMultiMediaStreamImpl_GetEndOfStream,
IAMMultiMediaStreamImpl_Initialize,
IAMMultiMediaStreamImpl_GetFilterGraph,
IAMMultiMediaStreamImpl_GetFilter,
IAMMultiMediaStreamImpl_AddMediaStream,
IAMMultiMediaStreamImpl_OpenFile,
IAMMultiMediaStreamImpl_OpenMoniker,
IAMMultiMediaStreamImpl_Render
};
@ stdcall -private DllCanUnloadNow() AMSTREAM_DllCanUnloadNow
@ stdcall -private DllGetClassObject(ptr ptr ptr) AMSTREAM_DllGetClassObject
@ stdcall -private DllRegisterServer() AMSTREAM_DllRegisterServer
@ stdcall -private DllUnregisterServer() AMSTREAM_DllUnregisterServer
/*
* MultiMedia Streams private interfaces (AMSTREAM.DLL)
*
* Copyright 2004 Christian Costa
*
* 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 __AMSTREAM_PRIVATE_INCLUDED__
#define __AMSTREAM_PRIVATE_INCLUDED__
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
#include "wingdi.h"
#include "winuser.h"
#include "dshow.h"
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj);
#endif /* __AMSTREAM_PRIVATE_INCLUDED__ */
/*
* MultiMedia Streams Base Functions (AMSTREAM.DLL)
*
* Copyright 2004 Christian Costa
*
* 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
*/
#define COM_NO_WINDOWS_H
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "ole2.h"
#include "uuids.h"
#include "amstream_private.h"
#include "amstream.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
static DWORD dll_ref = 0;
/* For the moment, do nothing here. */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
/******************************************************************************
* Multimedia Streams ClassFactory
*/
typedef struct {
IClassFactory ITF_IClassFactory;
DWORD ref;
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
} IClassFactoryImpl;
struct object_creation_info
{
const CLSID *clsid;
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
};
static const struct object_creation_info object_creation[] =
{
{ &CLSID_AMMultiMediaStream, AM_create },
};
static HRESULT WINAPI
AMCF_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 AMCF_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI AMCF_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
ULONG ref = --This->ref;
if (ref == 0)
HeapFree(GetProcessHeap(), 0, This);
return ref;
}
static HRESULT WINAPI AMCF_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 AMCF_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
AMCF_QueryInterface,
AMCF_AddRef,
AMCF_Release,
AMCF_CreateInstance,
AMCF_LockServer
};
/*******************************************************************************
* DllGetClassObject [AMSTREAM.@]
* 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
*/
DWORD WINAPI AMSTREAM_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
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;
}
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;
}
/***********************************************************************
* DllCanUnloadNow (AMSTREAM.@)
*/
HRESULT WINAPI AMSTREAM_DllCanUnloadNow()
{
return dll_ref != 0 ? S_FALSE : S_OK;
}
/*
* self-registerable dll functions for amstream.dll
*
* Copyright (C) 2003 John K. Hohm
*
* 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 <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "winreg.h"
#include "winerror.h"
#include "ole2.h"
#include "uuids.h"
#include "amstream.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
/*
* Near the bottom of this file are the exported DllRegisterServer and
* DllUnregisterServer, which make all this worthwhile.
*/
/***********************************************************************
* interface for self-registering
*/
struct regsvr_interface
{
IID const *iid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
IID const *base_iid; /* can be NULL to omit */
int num_methods; /* can be <0 to omit */
CLSID const *ps_clsid; /* can be NULL to omit */
CLSID const *ps_clsid32; /* can be NULL to omit */
};
static HRESULT register_interfaces(struct regsvr_interface const *list);
static HRESULT unregister_interfaces(struct regsvr_interface const *list);
struct regsvr_coclass
{
CLSID const *clsid; /* NULL for end of list */
LPCSTR name; /* can be NULL to omit */
LPCSTR ips; /* can be NULL to omit */
LPCSTR ips32; /* can be NULL to omit */
LPCSTR ips32_tmodel; /* can be NULL to omit */
LPCSTR progid; /* can be NULL to omit */
LPCSTR viprogid; /* can be NULL to omit */
LPCSTR progid_extra; /* can be NULL to omit */
};
static HRESULT register_coclasses(struct regsvr_coclass const *list);
static HRESULT unregister_coclasses(struct regsvr_coclass const *list);
/***********************************************************************
* static string constants
*/
static WCHAR const interface_keyname[10] = {
'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 };
static WCHAR const base_ifa_keyname[14] = {
'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c',
'e', 0 };
static WCHAR const num_methods_keyname[11] = {
'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 };
static WCHAR const ps_clsid_keyname[15] = {
'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
'i', 'd', 0 };
static WCHAR const ps_clsid32_keyname[17] = {
'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's',
'i', 'd', '3', '2', 0 };
static WCHAR const clsid_keyname[6] = {
'C', 'L', 'S', 'I', 'D', 0 };
static WCHAR const curver_keyname[7] = {
'C', 'u', 'r', 'V', 'e', 'r', 0 };
static WCHAR const ips_keyname[13] = {
'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
0 };
static WCHAR const ips32_keyname[15] = {
'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r',
'3', '2', 0 };
static WCHAR const progid_keyname[7] = {
'P', 'r', 'o', 'g', 'I', 'D', 0 };
static WCHAR const viprogid_keyname[25] = {
'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p',
'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D',
0 };
static char const tmodel_valuename[] = "ThreadingModel";
/***********************************************************************
* static helper functions
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid);
static LONG register_key_defvalueW(HKEY base, WCHAR const *name,
WCHAR const *value);
static LONG register_key_defvalueA(HKEY base, WCHAR const *name,
char const *value);
static LONG register_progid(WCHAR const *clsid,
char const *progid, char const *curver_progid,
char const *name, char const *extra);
static LONG recursive_delete_key(HKEY key);
static LONG recursive_delete_keyA(HKEY base, char const *name);
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name);
/***********************************************************************
* register_interfaces
*/
static HRESULT register_interfaces(struct regsvr_interface const *list)
{
LONG res = ERROR_SUCCESS;
HKEY interface_key;
res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &interface_key, NULL);
if (res != ERROR_SUCCESS) goto error_return;
for (; res == ERROR_SUCCESS && list->iid; ++list) {
WCHAR buf[39];
HKEY iid_key;
StringFromGUID2(list->iid, buf, 39);
res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &iid_key, NULL);
if (res != ERROR_SUCCESS) goto error_close_interface_key;
if (list->name) {
res = RegSetValueExA(iid_key, NULL, 0, REG_SZ,
(CONST BYTE*)(list->name),
strlen(list->name) + 1);
if (res != ERROR_SUCCESS) goto error_close_iid_key;
}
if (list->base_iid) {
register_key_guid(iid_key, base_ifa_keyname, list->base_iid);
if (res != ERROR_SUCCESS) goto error_close_iid_key;
}
if (0 <= list->num_methods) {
static WCHAR const fmt[3] = { '%', 'd', 0 };
HKEY key;
res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &key, NULL);
if (res != ERROR_SUCCESS) goto error_close_iid_key;
wsprintfW(buf, fmt, list->num_methods);
res = RegSetValueExW(key, NULL, 0, REG_SZ,
(CONST BYTE*)buf,
(lstrlenW(buf) + 1) * sizeof(WCHAR));
RegCloseKey(key);
if (res != ERROR_SUCCESS) goto error_close_iid_key;
}
if (list->ps_clsid) {
register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid);
if (res != ERROR_SUCCESS) goto error_close_iid_key;
}
if (list->ps_clsid32) {
register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32);
if (res != ERROR_SUCCESS) goto error_close_iid_key;
}
error_close_iid_key:
RegCloseKey(iid_key);
}
error_close_interface_key:
RegCloseKey(interface_key);
error_return:
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
}
/***********************************************************************
* unregister_interfaces
*/
static HRESULT unregister_interfaces(struct regsvr_interface const *list)
{
LONG res = ERROR_SUCCESS;
HKEY interface_key;
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0,
KEY_READ | KEY_WRITE, &interface_key);
if (res == ERROR_FILE_NOT_FOUND) return S_OK;
if (res != ERROR_SUCCESS) goto error_return;
for (; res == ERROR_SUCCESS && list->iid; ++list) {
WCHAR buf[39];
StringFromGUID2(list->iid, buf, 39);
res = recursive_delete_keyW(interface_key, buf);
}
RegCloseKey(interface_key);
error_return:
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
}
/***********************************************************************
* register_coclasses
*/
static HRESULT register_coclasses(struct regsvr_coclass const *list)
{
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
if (res != ERROR_SUCCESS) goto error_return;
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
WCHAR buf[39];
HKEY clsid_key;
StringFromGUID2(list->clsid, buf, 39);
res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
if (list->name) {
res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ,
(CONST BYTE*)(list->name),
strlen(list->name) + 1);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->ips) {
res = register_key_defvalueA(clsid_key, ips_keyname, list->ips);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->ips32) {
HKEY ips32_key;
res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL,
&ips32_key, NULL);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ,
(CONST BYTE*)list->ips32,
lstrlenA(list->ips32) + 1);
if (res == ERROR_SUCCESS && list->ips32_tmodel)
res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ,
(CONST BYTE*)list->ips32_tmodel,
strlen(list->ips32_tmodel) + 1);
RegCloseKey(ips32_key);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->progid) {
res = register_key_defvalueA(clsid_key, progid_keyname,
list->progid);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = register_progid(buf, list->progid, NULL,
list->name, list->progid_extra);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
if (list->viprogid) {
res = register_key_defvalueA(clsid_key, viprogid_keyname,
list->viprogid);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
res = register_progid(buf, list->viprogid, list->progid,
list->name, list->progid_extra);
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
}
error_close_clsid_key:
RegCloseKey(clsid_key);
}
error_close_coclass_key:
RegCloseKey(coclass_key);
error_return:
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
}
/***********************************************************************
* unregister_coclasses
*/
static HRESULT unregister_coclasses(struct regsvr_coclass const *list)
{
LONG res = ERROR_SUCCESS;
HKEY coclass_key;
res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0,
KEY_READ | KEY_WRITE, &coclass_key);
if (res == ERROR_FILE_NOT_FOUND) return S_OK;
if (res != ERROR_SUCCESS) goto error_return;
for (; res == ERROR_SUCCESS && list->clsid; ++list) {
WCHAR buf[39];
StringFromGUID2(list->clsid, buf, 39);
res = recursive_delete_keyW(coclass_key, buf);
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
if (list->progid) {
res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid);
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
if (list->viprogid) {
res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid);
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
}
}
error_close_coclass_key:
RegCloseKey(coclass_key);
error_return:
return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK;
}
/***********************************************************************
* regsvr_key_guid
*/
static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid)
{
WCHAR buf[39];
StringFromGUID2(guid, buf, 39);
return register_key_defvalueW(base, name, buf);
}
/***********************************************************************
* regsvr_key_defvalueW
*/
static LONG register_key_defvalueW(
HKEY base,
WCHAR const *name,
WCHAR const *value)
{
LONG res;
HKEY key;
res = RegCreateKeyExW(base, name, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &key, NULL);
if (res != ERROR_SUCCESS) return res;
res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
(lstrlenW(value) + 1) * sizeof(WCHAR));
RegCloseKey(key);
return res;
}
/***********************************************************************
* regsvr_key_defvalueA
*/
static LONG register_key_defvalueA(
HKEY base,
WCHAR const *name,
char const *value)
{
LONG res;
HKEY key;
res = RegCreateKeyExW(base, name, 0, NULL, 0,
KEY_READ | KEY_WRITE, NULL, &key, NULL);
if (res != ERROR_SUCCESS) return res;
res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
lstrlenA(value) + 1);
RegCloseKey(key);
return res;
}
/***********************************************************************
* regsvr_progid
*/
static LONG register_progid(
WCHAR const *clsid,
char const *progid,
char const *curver_progid,
char const *name,
char const *extra)
{
LONG res;
HKEY progid_key;
res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0,
NULL, 0, KEY_READ | KEY_WRITE, NULL,
&progid_key, NULL);
if (res != ERROR_SUCCESS) return res;
if (name) {
res = RegSetValueExA(progid_key, NULL, 0, REG_SZ,
(CONST BYTE*)name, strlen(name) + 1);
if (res != ERROR_SUCCESS) goto error_close_progid_key;
}
if (clsid) {
res = register_key_defvalueW(progid_key, clsid_keyname, clsid);
if (res != ERROR_SUCCESS) goto error_close_progid_key;
}
if (curver_progid) {
res = register_key_defvalueA(progid_key, curver_keyname,
curver_progid);
if (res != ERROR_SUCCESS) goto error_close_progid_key;
}
if (extra) {
HKEY extra_key;
res = RegCreateKeyExA(progid_key, extra, 0,
NULL, 0, KEY_READ | KEY_WRITE, NULL,
&extra_key, NULL);
if (res == ERROR_SUCCESS)
RegCloseKey(extra_key);
}
error_close_progid_key:
RegCloseKey(progid_key);
return res;
}
/***********************************************************************
* recursive_delete_key
*/
static LONG recursive_delete_key(HKEY key)
{
LONG res;
WCHAR subkey_name[MAX_PATH];
DWORD cName;
HKEY subkey;
for (;;) {
cName = sizeof(subkey_name) / sizeof(WCHAR);
res = RegEnumKeyExW(key, 0, subkey_name, &cName,
NULL, NULL, NULL, NULL);
if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) {
res = ERROR_SUCCESS; /* presumably we're done enumerating */
break;
}
res = RegOpenKeyExW(key, subkey_name, 0,
KEY_READ | KEY_WRITE, &subkey);
if (res == ERROR_FILE_NOT_FOUND) continue;
if (res != ERROR_SUCCESS) break;
res = recursive_delete_key(subkey);
RegCloseKey(subkey);
if (res != ERROR_SUCCESS) break;
}
if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0);
return res;
}
/***********************************************************************
* recursive_delete_keyA
*/
static LONG recursive_delete_keyA(HKEY base, char const *name)
{
LONG res;
HKEY key;
res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key);
if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
if (res != ERROR_SUCCESS) return res;
res = recursive_delete_key(key);
RegCloseKey(key);
return res;
}
/***********************************************************************
* recursive_delete_keyW
*/
static LONG recursive_delete_keyW(HKEY base, WCHAR const *name)
{
LONG res;
HKEY key;
res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key);
if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
if (res != ERROR_SUCCESS) return res;
res = recursive_delete_key(key);
RegCloseKey(key);
return res;
}
/***********************************************************************
* coclass list
*/
static struct regsvr_coclass const coclass_list[] = {
{ &CLSID_AMMultiMediaStream,
"ActiveMovie MultiMedia Stream",
NULL,
"amstream.dll",
"Both"
},
{ NULL } /* list terminator */
};
/***********************************************************************
* interface list
*/
static struct regsvr_interface const interface_list[] = {
{ NULL } /* list terminator */
};
/***********************************************************************
* DllRegisterServer (AMSTREAM.@)
*/
HRESULT WINAPI AMSTREAM_DllRegisterServer(void)
{
HRESULT hr;
TRACE("\n");
hr = register_coclasses(coclass_list);
if (SUCCEEDED(hr))
hr = register_interfaces(interface_list);
return hr;
}
/***********************************************************************
* DllUnregisterServer (AMSTREAM.@)
*/
HRESULT WINAPI AMSTREAM_DllUnregisterServer(void)
{
HRESULT hr;
TRACE("\n");
hr = unregister_coclasses(coclass_list);
if (SUCCEEDED(hr))
hr = unregister_interfaces(interface_list);
return hr;
}
/*
* Copyright (c) 2004 Christian Costa
*
* 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 "Wine AMStream dll"
#define WINE_FILENAME_STR "amstream.dll"
#define WINE_FILEVERSION 6,3,1,881
#define WINE_FILEVERSION_STR "6.3.1.881"
#define WINE_PRODUCTVERSION 6,3,1,881
#define WINE_PRODUCTVERSION_STR "6.3"
#define WINE_PRODUCTNAME_STR "DirectShow"
#include "wine/wine_common_ver.rc"
......@@ -64,6 +64,8 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
#define __IKsPropertySet_INTERFACE_DEFINED__
#include "strmif.h"
#include "control.h"
#define __DDRAW_GUID_DEFINED__
#include "amstream.h"
/* GUIDs not declared in an exported header file */
DEFINE_GUID(IID_IDirectPlaySP,0xc9f6360,0xcc61,0x11cf,0xac,0xec,0x00,0xaa,0x00,0x68,0x86,0xe3);
......
......@@ -5,10 +5,14 @@ VPATH = @srcdir@
MODULE = none
IDL_SRCS = \
amstream.idl \
amvideo.idl \
austream.idl \
comcat.idl \
ddstream.idl \
docobj.idl \
exdisp.idl \
mmstream.idl \
oaidl.idl \
objidl.idl \
ocidl.idl \
......
/*** Autogenerated by WIDL 0.1 from amstream.idl - Do not edit ***/
#include <rpc.h>
#include <rpcndr.h>
#ifndef __WIDL_AMSTREAM_H
#define __WIDL_AMSTREAM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <unknwn.h>
#include <mmstream.h>
#include <strmif.h>
#include <ddraw.h>
#include <mmsystem.h>
#include <mmstream.h>
#include <ddstream.h>
#include <austream.h>
#if 0
#ifndef __IDirectDraw_FWD_DEFINED__
#define __IDirectDraw_FWD_DEFINED__
typedef struct IDirectDraw IDirectDraw;
#endif
#ifndef __IDirectDrawSurface_FWD_DEFINED__
#define __IDirectDrawSurface_FWD_DEFINED__
typedef struct IDirectDrawSurface IDirectDrawSurface;
#endif
#endif
#ifndef __IAMMultiMediaStream_FWD_DEFINED__
#define __IAMMultiMediaStream_FWD_DEFINED__
typedef struct IAMMultiMediaStream IAMMultiMediaStream;
#endif
#ifndef __IAMMediaStream_FWD_DEFINED__
#define __IAMMediaStream_FWD_DEFINED__
typedef struct IAMMediaStream IAMMediaStream;
#endif
#ifndef __IMediaStreamFilter_FWD_DEFINED__
#define __IMediaStreamFilter_FWD_DEFINED__
typedef struct IMediaStreamFilter IMediaStreamFilter;
#endif
#ifndef __IAMMediaTypeStream_FWD_DEFINED__
#define __IAMMediaTypeStream_FWD_DEFINED__
typedef struct IAMMediaTypeStream IAMMediaTypeStream;
#endif
#ifndef __IAMMediaTypeSample_FWD_DEFINED__
#define __IAMMediaTypeSample_FWD_DEFINED__
typedef struct IAMMediaTypeSample IAMMediaTypeSample;
#endif
enum {
AMMSF_NOGRAPHTHREAD = 0x1
};
enum {
AMMSF_ADDDEFAULTRENDERER = 0x1,
AMMSF_CREATEPEER = 0x2
};
enum {
AMMSF_RENDERTYPEMASK = 0x3,
AMMSF_RENDERTOEXISTING = 0x0,
AMMSF_RENDERALLSTREAMS = 0x1,
AMMSF_NORENDER = 0x2,
AMMSF_NOCLOCK = 0x4,
AMMSF_RUN = 0x8
};
typedef enum {
Disabled = 0,
ReadData = 1,
RenderData = 2
} OUTPUT_STATE;
/*****************************************************************************
* IAMMultiMediaStream interface
*/
#ifndef __IAMMultiMediaStream_INTERFACE_DEFINED__
#define __IAMMultiMediaStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IAMMultiMediaStream, 0xbebe595c, 0x9a6f, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IAMMultiMediaStream : public IMultiMediaStream
{
virtual HRESULT STDMETHODCALLTYPE Initialize(
STREAM_TYPE StreamType,
DWORD dwFlags,
IGraphBuilder* pFilterGraph) = 0;
virtual HRESULT STDMETHODCALLTYPE GetFilterGraph(
IGraphBuilder** ppGraphBuilder) = 0;
virtual HRESULT STDMETHODCALLTYPE GetFilter(
IMediaStreamFilter** ppFilter) = 0;
virtual HRESULT STDMETHODCALLTYPE AddMediaStream(
IUnknown* pStreamObject,
const MSPID* PurposeId,
DWORD dwFlags,
IMediaStream** ppNewStream) = 0;
virtual HRESULT STDMETHODCALLTYPE OpenFile(
LPCWSTR pszFileName,
DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE OpenMoniker(
IBindCtx* pCtx,
IMoniker* pMoniker,
DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE Render(
DWORD dwFlags) = 0;
};
#else
typedef struct IAMMultiMediaStreamVtbl IAMMultiMediaStreamVtbl;
struct IAMMultiMediaStream {
const IAMMultiMediaStreamVtbl* lpVtbl;
};
struct IAMMultiMediaStreamVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IAMMultiMediaStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IAMMultiMediaStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IAMMultiMediaStream* This);
/*** IMultiMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IAMMultiMediaStream* This,
char* pdwFlags,
STREAM_TYPE* pStreamType);
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IAMMultiMediaStream* This,
REFMSPID idPurpose,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *EnumMediaStreams)(
IAMMultiMediaStream* This,
long Index,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *GetState)(
IAMMultiMediaStream* This,
STREAM_STATE* pCurrentState);
HRESULT (STDMETHODCALLTYPE *SetState)(
IAMMultiMediaStream* This,
STREAM_STATE NewState);
HRESULT (STDMETHODCALLTYPE *GetTime)(
IAMMultiMediaStream* This,
STREAM_TIME* pCurrentTime);
HRESULT (STDMETHODCALLTYPE *GetDuration)(
IAMMultiMediaStream* This,
STREAM_TIME* pDuration);
HRESULT (STDMETHODCALLTYPE *Seek)(
IAMMultiMediaStream* This,
STREAM_TIME SeekTime);
HRESULT (STDMETHODCALLTYPE *GetEndOfStreamEventHandle)(
IAMMultiMediaStream* This,
HANDLE* phEOS);
/*** IAMMultiMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *Initialize)(
IAMMultiMediaStream* This,
STREAM_TYPE StreamType,
DWORD dwFlags,
IGraphBuilder* pFilterGraph);
HRESULT (STDMETHODCALLTYPE *GetFilterGraph)(
IAMMultiMediaStream* This,
IGraphBuilder** ppGraphBuilder);
HRESULT (STDMETHODCALLTYPE *GetFilter)(
IAMMultiMediaStream* This,
IMediaStreamFilter** ppFilter);
HRESULT (STDMETHODCALLTYPE *AddMediaStream)(
IAMMultiMediaStream* This,
IUnknown* pStreamObject,
const MSPID* PurposeId,
DWORD dwFlags,
IMediaStream** ppNewStream);
HRESULT (STDMETHODCALLTYPE *OpenFile)(
IAMMultiMediaStream* This,
LPCWSTR pszFileName,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *OpenMoniker)(
IAMMultiMediaStream* This,
IBindCtx* pCtx,
IMoniker* pMoniker,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *Render)(
IAMMultiMediaStream* This,
DWORD dwFlags);
};
/*** IUnknown methods ***/
#define IAMMultiMediaStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IAMMultiMediaStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IAMMultiMediaStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMultiMediaStream methods ***/
#define IAMMultiMediaStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IAMMultiMediaStream_GetMediaStream(p,a,b) (p)->lpVtbl->GetMediaStream(p,a,b)
#define IAMMultiMediaStream_EnumMediaStreams(p,a,b) (p)->lpVtbl->EnumMediaStreams(p,a,b)
#define IAMMultiMediaStream_GetState(p,a) (p)->lpVtbl->GetState(p,a)
#define IAMMultiMediaStream_SetState(p,a) (p)->lpVtbl->SetState(p,a)
#define IAMMultiMediaStream_GetTime(p,a) (p)->lpVtbl->GetTime(p,a)
#define IAMMultiMediaStream_GetDuration(p,a) (p)->lpVtbl->GetDuration(p,a)
#define IAMMultiMediaStream_Seek(p,a) (p)->lpVtbl->Seek(p,a)
#define IAMMultiMediaStream_GetEndOfStreamEventHandle(p,a) (p)->lpVtbl->GetEndOfStreamEventHandle(p,a)
/*** IAMMultiMediaStream methods ***/
#define IAMMultiMediaStream_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#define IAMMultiMediaStream_GetFilterGraph(p,a) (p)->lpVtbl->GetFilterGraph(p,a)
#define IAMMultiMediaStream_GetFilter(p,a) (p)->lpVtbl->GetFilter(p,a)
#define IAMMultiMediaStream_AddMediaStream(p,a,b,c,d) (p)->lpVtbl->AddMediaStream(p,a,b,c,d)
#define IAMMultiMediaStream_OpenFile(p,a,b) (p)->lpVtbl->OpenFile(p,a,b)
#define IAMMultiMediaStream_OpenMoniker(p,a,b,c) (p)->lpVtbl->OpenMoniker(p,a,b,c)
#define IAMMultiMediaStream_Render(p,a) (p)->lpVtbl->Render(p,a)
#endif
#define IAMMultiMediaStream_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMultiMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetInformation)(THIS_ char* pdwFlags, STREAM_TYPE* pStreamType) PURE; \
STDMETHOD_(HRESULT,GetMediaStream)(THIS_ REFMSPID idPurpose, IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,EnumMediaStreams)(THIS_ long Index, IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,GetState)(THIS_ STREAM_STATE* pCurrentState) PURE; \
STDMETHOD_(HRESULT,SetState)(THIS_ STREAM_STATE NewState) PURE; \
STDMETHOD_(HRESULT,GetTime)(THIS_ STREAM_TIME* pCurrentTime) PURE; \
STDMETHOD_(HRESULT,GetDuration)(THIS_ STREAM_TIME* pDuration) PURE; \
STDMETHOD_(HRESULT,Seek)(THIS_ STREAM_TIME SeekTime) PURE; \
STDMETHOD_(HRESULT,GetEndOfStreamEventHandle)(THIS_ HANDLE* phEOS) PURE; \
/*** IAMMultiMediaStream methods ***/ \
STDMETHOD_(HRESULT,Initialize)(THIS_ STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder* pFilterGraph) PURE; \
STDMETHOD_(HRESULT,GetFilterGraph)(THIS_ IGraphBuilder** ppGraphBuilder) PURE; \
STDMETHOD_(HRESULT,GetFilter)(THIS_ IMediaStreamFilter** ppFilter) PURE; \
STDMETHOD_(HRESULT,AddMediaStream)(THIS_ IUnknown* pStreamObject, const MSPID* PurposeId, DWORD dwFlags, IMediaStream** ppNewStream) PURE; \
STDMETHOD_(HRESULT,OpenFile)(THIS_ LPCWSTR pszFileName, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,OpenMoniker)(THIS_ IBindCtx* pCtx, IMoniker* pMoniker, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,Render)(THIS_ DWORD dwFlags) PURE;
HRESULT CALLBACK IAMMultiMediaStream_Initialize_Proxy(
IAMMultiMediaStream* This,
STREAM_TYPE StreamType,
DWORD dwFlags,
IGraphBuilder* pFilterGraph);
void __RPC_STUB IAMMultiMediaStream_Initialize_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMultiMediaStream_GetFilterGraph_Proxy(
IAMMultiMediaStream* This,
IGraphBuilder** ppGraphBuilder);
void __RPC_STUB IAMMultiMediaStream_GetFilterGraph_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMultiMediaStream_GetFilter_Proxy(
IAMMultiMediaStream* This,
IMediaStreamFilter** ppFilter);
void __RPC_STUB IAMMultiMediaStream_GetFilter_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMultiMediaStream_AddMediaStream_Proxy(
IAMMultiMediaStream* This,
IUnknown* pStreamObject,
const MSPID* PurposeId,
DWORD dwFlags,
IMediaStream** ppNewStream);
void __RPC_STUB IAMMultiMediaStream_AddMediaStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMultiMediaStream_OpenFile_Proxy(
IAMMultiMediaStream* This,
LPCWSTR pszFileName,
DWORD dwFlags);
void __RPC_STUB IAMMultiMediaStream_OpenFile_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMultiMediaStream_OpenMoniker_Proxy(
IAMMultiMediaStream* This,
IBindCtx* pCtx,
IMoniker* pMoniker,
DWORD dwFlags);
void __RPC_STUB IAMMultiMediaStream_OpenMoniker_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMultiMediaStream_Render_Proxy(
IAMMultiMediaStream* This,
DWORD dwFlags);
void __RPC_STUB IAMMultiMediaStream_Render_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IAMMultiMediaStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IAMMediaStream interface
*/
#ifndef __IAMMediaStream_INTERFACE_DEFINED__
#define __IAMMediaStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IAMMediaStream, 0xbebe595d, 0x9a6f, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IAMMediaStream : public IMediaStream
{
virtual HRESULT STDMETHODCALLTYPE Initialize(
IUnknown* pSourceObject,
DWORD dwFlags,
REFMSPID PurposeId,
const STREAM_TYPE StreamType) = 0;
virtual HRESULT STDMETHODCALLTYPE SetState(
FILTER_STATE State) = 0;
virtual HRESULT STDMETHODCALLTYPE JoinAMMultiMediaStream(
IAMMultiMediaStream* pAMMultiMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE JoinFilter(
IMediaStreamFilter* pMediaStreamFilter) = 0;
virtual HRESULT STDMETHODCALLTYPE JoinFilterGraph(
IFilterGraph* pFilterGraph) = 0;
};
#else
typedef struct IAMMediaStreamVtbl IAMMediaStreamVtbl;
struct IAMMediaStream {
const IAMMediaStreamVtbl* lpVtbl;
};
struct IAMMediaStreamVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IAMMediaStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IAMMediaStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IAMMediaStream* This);
/*** IMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetMultiMediaStream)(
IAMMediaStream* This,
IMultiMediaStream** ppMultiMediaStream);
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IAMMediaStream* This,
MSPID* pPurposeId,
STREAM_TYPE* pType);
HRESULT (STDMETHODCALLTYPE *SetSameFormat)(
IAMMediaStream* This,
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *AllocateSample)(
IAMMediaStream* This,
DWORD dwFlags,
IStreamSample** ppSample);
HRESULT (STDMETHODCALLTYPE *CreateSharedSample)(
IAMMediaStream* This,
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample);
HRESULT (STDMETHODCALLTYPE *SendEndOfStream)(
IAMMediaStream* This,
DWORD dwFlags);
/*** IAMMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *Initialize)(
IAMMediaStream* This,
IUnknown* pSourceObject,
DWORD dwFlags,
REFMSPID PurposeId,
const STREAM_TYPE StreamType);
HRESULT (STDMETHODCALLTYPE *SetState)(
IAMMediaStream* This,
FILTER_STATE State);
HRESULT (STDMETHODCALLTYPE *JoinAMMultiMediaStream)(
IAMMediaStream* This,
IAMMultiMediaStream* pAMMultiMediaStream);
HRESULT (STDMETHODCALLTYPE *JoinFilter)(
IAMMediaStream* This,
IMediaStreamFilter* pMediaStreamFilter);
HRESULT (STDMETHODCALLTYPE *JoinFilterGraph)(
IAMMediaStream* This,
IFilterGraph* pFilterGraph);
};
/*** IUnknown methods ***/
#define IAMMediaStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IAMMediaStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IAMMediaStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMediaStream methods ***/
#define IAMMediaStream_GetMultiMediaStream(p,a) (p)->lpVtbl->GetMultiMediaStream(p,a)
#define IAMMediaStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IAMMediaStream_SetSameFormat(p,a,b) (p)->lpVtbl->SetSameFormat(p,a,b)
#define IAMMediaStream_AllocateSample(p,a,b) (p)->lpVtbl->AllocateSample(p,a,b)
#define IAMMediaStream_CreateSharedSample(p,a,b,c) (p)->lpVtbl->CreateSharedSample(p,a,b,c)
#define IAMMediaStream_SendEndOfStream(p,a) (p)->lpVtbl->SendEndOfStream(p,a)
/*** IAMMediaStream methods ***/
#define IAMMediaStream_Initialize(p,a,b,c,d) (p)->lpVtbl->Initialize(p,a,b,c,d)
#define IAMMediaStream_SetState(p,a) (p)->lpVtbl->SetState(p,a)
#define IAMMediaStream_JoinAMMultiMediaStream(p,a) (p)->lpVtbl->JoinAMMultiMediaStream(p,a)
#define IAMMediaStream_JoinFilter(p,a) (p)->lpVtbl->JoinFilter(p,a)
#define IAMMediaStream_JoinFilterGraph(p,a) (p)->lpVtbl->JoinFilterGraph(p,a)
#endif
#define IAMMediaStream_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetMultiMediaStream)(THIS_ IMultiMediaStream** ppMultiMediaStream) PURE; \
STDMETHOD_(HRESULT,GetInformation)(THIS_ MSPID* pPurposeId, STREAM_TYPE* pType) PURE; \
STDMETHOD_(HRESULT,SetSameFormat)(THIS_ IMediaStream* pStreamThatHasDesiredFormat, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,AllocateSample)(THIS_ DWORD dwFlags, IStreamSample** ppSample) PURE; \
STDMETHOD_(HRESULT,CreateSharedSample)(THIS_ IStreamSample* pExistingSample, DWORD dwFlags, IStreamSample** ppNewSample) PURE; \
STDMETHOD_(HRESULT,SendEndOfStream)(THIS_ DWORD dwFlags) PURE; \
/*** IAMMediaStream methods ***/ \
STDMETHOD_(HRESULT,Initialize)(THIS_ IUnknown* pSourceObject, DWORD dwFlags, REFMSPID PurposeId, const STREAM_TYPE StreamType) PURE; \
STDMETHOD_(HRESULT,SetState)(THIS_ FILTER_STATE State) PURE; \
STDMETHOD_(HRESULT,JoinAMMultiMediaStream)(THIS_ IAMMultiMediaStream* pAMMultiMediaStream) PURE; \
STDMETHOD_(HRESULT,JoinFilter)(THIS_ IMediaStreamFilter* pMediaStreamFilter) PURE; \
STDMETHOD_(HRESULT,JoinFilterGraph)(THIS_ IFilterGraph* pFilterGraph) PURE;
HRESULT CALLBACK IAMMediaStream_Initialize_Proxy(
IAMMediaStream* This,
IUnknown* pSourceObject,
DWORD dwFlags,
REFMSPID PurposeId,
const STREAM_TYPE StreamType);
void __RPC_STUB IAMMediaStream_Initialize_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaStream_SetState_Proxy(
IAMMediaStream* This,
FILTER_STATE State);
void __RPC_STUB IAMMediaStream_SetState_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaStream_JoinAMMultiMediaStream_Proxy(
IAMMediaStream* This,
IAMMultiMediaStream* pAMMultiMediaStream);
void __RPC_STUB IAMMediaStream_JoinAMMultiMediaStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaStream_JoinFilter_Proxy(
IAMMediaStream* This,
IMediaStreamFilter* pMediaStreamFilter);
void __RPC_STUB IAMMediaStream_JoinFilter_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaStream_JoinFilterGraph_Proxy(
IAMMediaStream* This,
IFilterGraph* pFilterGraph);
void __RPC_STUB IAMMediaStream_JoinFilterGraph_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IAMMediaStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IMediaStreamFilter interface
*/
#ifndef __IMediaStreamFilter_INTERFACE_DEFINED__
#define __IMediaStreamFilter_INTERFACE_DEFINED__
DEFINE_GUID(IID_IMediaStreamFilter, 0xbebe595e, 0x9a6f, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMediaStreamFilter : public IBaseFilter
{
virtual HRESULT STDMETHODCALLTYPE AddMediaStream(
IAMMediaStream* pAMMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMediaStream(
REFMSPID idPurpose,
IMediaStream** ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumMediaStreams(
long Index,
IMediaStream** ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE SupportSeeking(
BOOL bRenderer) = 0;
virtual HRESULT STDMETHODCALLTYPE ReferenceTimeToStreamTime(
REFERENCE_TIME* pTime) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentStreamTime(
REFERENCE_TIME* pCurrentStreamTime) = 0;
virtual HRESULT STDMETHODCALLTYPE WaitUntil(
REFERENCE_TIME WaitStreamTime) = 0;
virtual HRESULT STDMETHODCALLTYPE Flush(
BOOL bCancelEOS) = 0;
virtual HRESULT STDMETHODCALLTYPE EndOfStream(
) = 0;
};
#else
typedef struct IMediaStreamFilterVtbl IMediaStreamFilterVtbl;
struct IMediaStreamFilter {
const IMediaStreamFilterVtbl* lpVtbl;
};
struct IMediaStreamFilterVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IMediaStreamFilter* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IMediaStreamFilter* This);
ULONG (STDMETHODCALLTYPE *Release)(
IMediaStreamFilter* This);
/*** IPersist methods ***/
HRESULT (STDMETHODCALLTYPE *GetClassID)(
IMediaStreamFilter* This,
CLSID* pClassID);
/*** IMediaFilter methods ***/
HRESULT (STDMETHODCALLTYPE *Stop)(
IMediaStreamFilter* This);
HRESULT (STDMETHODCALLTYPE *Pause)(
IMediaStreamFilter* This);
HRESULT (STDMETHODCALLTYPE *Run)(
IMediaStreamFilter* This,
REFERENCE_TIME tStart);
HRESULT (STDMETHODCALLTYPE *GetState)(
IMediaStreamFilter* This,
DWORD dwMilliSecsTimeout,
FILTER_STATE* State);
HRESULT (STDMETHODCALLTYPE *SetSyncSource)(
IMediaStreamFilter* This,
IReferenceClock* pClock);
HRESULT (STDMETHODCALLTYPE *GetSyncSource)(
IMediaStreamFilter* This,
IReferenceClock** pClock);
/*** IBaseFilter methods ***/
HRESULT (STDMETHODCALLTYPE *EnumPins)(
IMediaStreamFilter* This,
IEnumPins** ppEnum);
HRESULT (STDMETHODCALLTYPE *FindPin)(
IMediaStreamFilter* This,
LPCWSTR Id,
IPin** ppPin);
HRESULT (STDMETHODCALLTYPE *QueryFilterInfo)(
IMediaStreamFilter* This,
FILTER_INFO* pInfo);
HRESULT (STDMETHODCALLTYPE *JoinFilterGraph)(
IMediaStreamFilter* This,
IFilterGraph* pGraph,
LPCWSTR pName);
HRESULT (STDMETHODCALLTYPE *QueryVendorInfo)(
IMediaStreamFilter* This,
LPWSTR* pVendorInfo);
/*** IMediaStreamFilter methods ***/
HRESULT (STDMETHODCALLTYPE *AddMediaStream)(
IMediaStreamFilter* This,
IAMMediaStream* pAMMediaStream);
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IMediaStreamFilter* This,
REFMSPID idPurpose,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *EnumMediaStreams)(
IMediaStreamFilter* This,
long Index,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *SupportSeeking)(
IMediaStreamFilter* This,
BOOL bRenderer);
HRESULT (STDMETHODCALLTYPE *ReferenceTimeToStreamTime)(
IMediaStreamFilter* This,
REFERENCE_TIME* pTime);
HRESULT (STDMETHODCALLTYPE *GetCurrentStreamTime)(
IMediaStreamFilter* This,
REFERENCE_TIME* pCurrentStreamTime);
HRESULT (STDMETHODCALLTYPE *WaitUntil)(
IMediaStreamFilter* This,
REFERENCE_TIME WaitStreamTime);
HRESULT (STDMETHODCALLTYPE *Flush)(
IMediaStreamFilter* This,
BOOL bCancelEOS);
HRESULT (STDMETHODCALLTYPE *EndOfStream)(
IMediaStreamFilter* This);
};
/*** IUnknown methods ***/
#define IMediaStreamFilter_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IMediaStreamFilter_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IMediaStreamFilter_Release(p) (p)->lpVtbl->Release(p)
/*** IPersist methods ***/
#define IMediaStreamFilter_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
/*** IMediaFilter methods ***/
#define IMediaStreamFilter_Stop(p) (p)->lpVtbl->Stop(p)
#define IMediaStreamFilter_Pause(p) (p)->lpVtbl->Pause(p)
#define IMediaStreamFilter_Run(p,a) (p)->lpVtbl->Run(p,a)
#define IMediaStreamFilter_GetState(p,a,b) (p)->lpVtbl->GetState(p,a,b)
#define IMediaStreamFilter_SetSyncSource(p,a) (p)->lpVtbl->SetSyncSource(p,a)
#define IMediaStreamFilter_GetSyncSource(p,a) (p)->lpVtbl->GetSyncSource(p,a)
/*** IBaseFilter methods ***/
#define IMediaStreamFilter_EnumPins(p,a) (p)->lpVtbl->EnumPins(p,a)
#define IMediaStreamFilter_FindPin(p,a,b) (p)->lpVtbl->FindPin(p,a,b)
#define IMediaStreamFilter_QueryFilterInfo(p,a) (p)->lpVtbl->QueryFilterInfo(p,a)
#define IMediaStreamFilter_JoinFilterGraph(p,a,b) (p)->lpVtbl->JoinFilterGraph(p,a,b)
#define IMediaStreamFilter_QueryVendorInfo(p,a) (p)->lpVtbl->QueryVendorInfo(p,a)
/*** IMediaStreamFilter methods ***/
#define IMediaStreamFilter_AddMediaStream(p,a) (p)->lpVtbl->AddMediaStream(p,a)
#define IMediaStreamFilter_GetMediaStream(p,a,b) (p)->lpVtbl->GetMediaStream(p,a,b)
#define IMediaStreamFilter_EnumMediaStreams(p,a,b) (p)->lpVtbl->EnumMediaStreams(p,a,b)
#define IMediaStreamFilter_SupportSeeking(p,a) (p)->lpVtbl->SupportSeeking(p,a)
#define IMediaStreamFilter_ReferenceTimeToStreamTime(p,a) (p)->lpVtbl->ReferenceTimeToStreamTime(p,a)
#define IMediaStreamFilter_GetCurrentStreamTime(p,a) (p)->lpVtbl->GetCurrentStreamTime(p,a)
#define IMediaStreamFilter_WaitUntil(p,a) (p)->lpVtbl->WaitUntil(p,a)
#define IMediaStreamFilter_Flush(p,a) (p)->lpVtbl->Flush(p,a)
#define IMediaStreamFilter_EndOfStream(p) (p)->lpVtbl->EndOfStream(p)
#endif
#define IMediaStreamFilter_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IPersist methods ***/ \
STDMETHOD_(HRESULT,GetClassID)(THIS_ CLSID* pClassID) PURE; \
/*** IMediaFilter methods ***/ \
STDMETHOD_(HRESULT,Stop)(THIS) PURE; \
STDMETHOD_(HRESULT,Pause)(THIS) PURE; \
STDMETHOD_(HRESULT,Run)(THIS_ REFERENCE_TIME tStart) PURE; \
STDMETHOD_(HRESULT,GetState)(THIS_ DWORD dwMilliSecsTimeout, FILTER_STATE* State) PURE; \
STDMETHOD_(HRESULT,SetSyncSource)(THIS_ IReferenceClock* pClock) PURE; \
STDMETHOD_(HRESULT,GetSyncSource)(THIS_ IReferenceClock** pClock) PURE; \
/*** IBaseFilter methods ***/ \
STDMETHOD_(HRESULT,EnumPins)(THIS_ IEnumPins** ppEnum) PURE; \
STDMETHOD_(HRESULT,FindPin)(THIS_ LPCWSTR Id, IPin** ppPin) PURE; \
STDMETHOD_(HRESULT,QueryFilterInfo)(THIS_ FILTER_INFO* pInfo) PURE; \
STDMETHOD_(HRESULT,JoinFilterGraph)(THIS_ IFilterGraph* pGraph, LPCWSTR pName) PURE; \
STDMETHOD_(HRESULT,QueryVendorInfo)(THIS_ LPWSTR* pVendorInfo) PURE; \
/*** IMediaStreamFilter methods ***/ \
STDMETHOD_(HRESULT,AddMediaStream)(THIS_ IAMMediaStream* pAMMediaStream) PURE; \
STDMETHOD_(HRESULT,GetMediaStream)(THIS_ REFMSPID idPurpose, IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,EnumMediaStreams)(THIS_ long Index, IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,SupportSeeking)(THIS_ BOOL bRenderer) PURE; \
STDMETHOD_(HRESULT,ReferenceTimeToStreamTime)(THIS_ REFERENCE_TIME* pTime) PURE; \
STDMETHOD_(HRESULT,GetCurrentStreamTime)(THIS_ REFERENCE_TIME* pCurrentStreamTime) PURE; \
STDMETHOD_(HRESULT,WaitUntil)(THIS_ REFERENCE_TIME WaitStreamTime) PURE; \
STDMETHOD_(HRESULT,Flush)(THIS_ BOOL bCancelEOS) PURE; \
STDMETHOD_(HRESULT,EndOfStream)(THIS) PURE;
HRESULT CALLBACK IMediaStreamFilter_AddMediaStream_Proxy(
IMediaStreamFilter* This,
IAMMediaStream* pAMMediaStream);
void __RPC_STUB IMediaStreamFilter_AddMediaStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStreamFilter_GetMediaStream_Proxy(
IMediaStreamFilter* This,
REFMSPID idPurpose,
IMediaStream** ppMediaStream);
void __RPC_STUB IMediaStreamFilter_GetMediaStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStreamFilter_EnumMediaStreams_Proxy(
IMediaStreamFilter* This,
long Index,
IMediaStream** ppMediaStream);
void __RPC_STUB IMediaStreamFilter_EnumMediaStreams_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStreamFilter_SupportSeeking_Proxy(
IMediaStreamFilter* This,
BOOL bRenderer);
void __RPC_STUB IMediaStreamFilter_SupportSeeking_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStreamFilter_ReferenceTimeToStreamTime_Proxy(
IMediaStreamFilter* This,
REFERENCE_TIME* pTime);
void __RPC_STUB IMediaStreamFilter_ReferenceTimeToStreamTime_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStreamFilter_GetCurrentStreamTime_Proxy(
IMediaStreamFilter* This,
REFERENCE_TIME* pCurrentStreamTime);
void __RPC_STUB IMediaStreamFilter_GetCurrentStreamTime_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStreamFilter_WaitUntil_Proxy(
IMediaStreamFilter* This,
REFERENCE_TIME WaitStreamTime);
void __RPC_STUB IMediaStreamFilter_WaitUntil_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStreamFilter_Flush_Proxy(
IMediaStreamFilter* This,
BOOL bCancelEOS);
void __RPC_STUB IMediaStreamFilter_Flush_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStreamFilter_EndOfStream_Proxy(
IMediaStreamFilter* This);
void __RPC_STUB IMediaStreamFilter_EndOfStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IMediaStreamFilter_INTERFACE_DEFINED__ */
#ifndef __IDirectDrawMediaSampleAllocator_FWD_DEFINED__
#define __IDirectDrawMediaSampleAllocator_FWD_DEFINED__
typedef struct IDirectDrawMediaSampleAllocator IDirectDrawMediaSampleAllocator;
#endif
/*****************************************************************************
* IDirectDrawMediaSampleAllocator interface
*/
#ifndef __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__
#define __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__
DEFINE_GUID(IID_IDirectDrawMediaSampleAllocator, 0xab6b4afc, 0xf6e4, 0x11d0, 0x90,0x0d, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IDirectDrawMediaSampleAllocator : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetDirectDraw(
IDirectDraw** ppDirectDraw) = 0;
};
#else
typedef struct IDirectDrawMediaSampleAllocatorVtbl IDirectDrawMediaSampleAllocatorVtbl;
struct IDirectDrawMediaSampleAllocator {
const IDirectDrawMediaSampleAllocatorVtbl* lpVtbl;
};
struct IDirectDrawMediaSampleAllocatorVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IDirectDrawMediaSampleAllocator* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IDirectDrawMediaSampleAllocator* This);
ULONG (STDMETHODCALLTYPE *Release)(
IDirectDrawMediaSampleAllocator* This);
/*** IDirectDrawMediaSampleAllocator methods ***/
HRESULT (STDMETHODCALLTYPE *GetDirectDraw)(
IDirectDrawMediaSampleAllocator* This,
IDirectDraw** ppDirectDraw);
};
/*** IUnknown methods ***/
#define IDirectDrawMediaSampleAllocator_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawMediaSampleAllocator_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawMediaSampleAllocator_Release(p) (p)->lpVtbl->Release(p)
/*** IDirectDrawMediaSampleAllocator methods ***/
#define IDirectDrawMediaSampleAllocator_GetDirectDraw(p,a) (p)->lpVtbl->GetDirectDraw(p,a)
#endif
#define IDirectDrawMediaSampleAllocator_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IDirectDrawMediaSampleAllocator methods ***/ \
STDMETHOD_(HRESULT,GetDirectDraw)(THIS_ IDirectDraw** ppDirectDraw) PURE;
HRESULT CALLBACK IDirectDrawMediaSampleAllocator_GetDirectDraw_Proxy(
IDirectDrawMediaSampleAllocator* This,
IDirectDraw** ppDirectDraw);
void __RPC_STUB IDirectDrawMediaSampleAllocator_GetDirectDraw_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__ */
#ifndef __IDirectDrawMediaSample_FWD_DEFINED__
#define __IDirectDrawMediaSample_FWD_DEFINED__
typedef struct IDirectDrawMediaSample IDirectDrawMediaSample;
#endif
/*****************************************************************************
* IDirectDrawMediaSample interface
*/
#ifndef __IDirectDrawMediaSample_INTERFACE_DEFINED__
#define __IDirectDrawMediaSample_INTERFACE_DEFINED__
DEFINE_GUID(IID_IDirectDrawMediaSample, 0xab6b4afe, 0xf6e4, 0x11d0, 0x90,0x0d, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IDirectDrawMediaSample : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetSurfaceAndReleaseLock(
IDirectDrawSurface** ppDirectDrawSurface,
RECT* pRect) = 0;
virtual HRESULT STDMETHODCALLTYPE LockMediaSamplePointer(
) = 0;
};
#else
typedef struct IDirectDrawMediaSampleVtbl IDirectDrawMediaSampleVtbl;
struct IDirectDrawMediaSample {
const IDirectDrawMediaSampleVtbl* lpVtbl;
};
struct IDirectDrawMediaSampleVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IDirectDrawMediaSample* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IDirectDrawMediaSample* This);
ULONG (STDMETHODCALLTYPE *Release)(
IDirectDrawMediaSample* This);
/*** IDirectDrawMediaSample methods ***/
HRESULT (STDMETHODCALLTYPE *GetSurfaceAndReleaseLock)(
IDirectDrawMediaSample* This,
IDirectDrawSurface** ppDirectDrawSurface,
RECT* pRect);
HRESULT (STDMETHODCALLTYPE *LockMediaSamplePointer)(
IDirectDrawMediaSample* This);
};
/*** IUnknown methods ***/
#define IDirectDrawMediaSample_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawMediaSample_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawMediaSample_Release(p) (p)->lpVtbl->Release(p)
/*** IDirectDrawMediaSample methods ***/
#define IDirectDrawMediaSample_GetSurfaceAndReleaseLock(p,a,b) (p)->lpVtbl->GetSurfaceAndReleaseLock(p,a,b)
#define IDirectDrawMediaSample_LockMediaSamplePointer(p) (p)->lpVtbl->LockMediaSamplePointer(p)
#endif
#define IDirectDrawMediaSample_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IDirectDrawMediaSample methods ***/ \
STDMETHOD_(HRESULT,GetSurfaceAndReleaseLock)(THIS_ IDirectDrawSurface** ppDirectDrawSurface, RECT* pRect) PURE; \
STDMETHOD_(HRESULT,LockMediaSamplePointer)(THIS) PURE;
HRESULT CALLBACK IDirectDrawMediaSample_GetSurfaceAndReleaseLock_Proxy(
IDirectDrawMediaSample* This,
IDirectDrawSurface** ppDirectDrawSurface,
RECT* pRect);
void __RPC_STUB IDirectDrawMediaSample_GetSurfaceAndReleaseLock_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IDirectDrawMediaSample_LockMediaSamplePointer_Proxy(
IDirectDrawMediaSample* This);
void __RPC_STUB IDirectDrawMediaSample_LockMediaSamplePointer_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IDirectDrawMediaSample_INTERFACE_DEFINED__ */
/*****************************************************************************
* IAMMediaTypeStream interface
*/
#ifndef __IAMMediaTypeStream_INTERFACE_DEFINED__
#define __IAMMediaTypeStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IAMMediaTypeStream, 0xab6b4afa, 0xf6e4, 0x11d0, 0x90,0x0d, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IAMMediaTypeStream : public IMediaStream
{
virtual HRESULT STDMETHODCALLTYPE GetFormat(
AM_MEDIA_TYPE* pMediaType,
DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE SetFormat(
AM_MEDIA_TYPE* pMediaType,
DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateSample(
long lSampleSize,
BYTE* pbBuffer,
DWORD dwFlags,
IUnknown* pUnkOuter,
IAMMediaTypeSample** ppAMMediaTypeSample) = 0;
virtual HRESULT STDMETHODCALLTYPE GetStreamAllocatorRequirements(
ALLOCATOR_PROPERTIES* pProps) = 0;
virtual HRESULT STDMETHODCALLTYPE SetStreamAllocatorRequirements(
ALLOCATOR_PROPERTIES* pProps) = 0;
};
#else
typedef struct IAMMediaTypeStreamVtbl IAMMediaTypeStreamVtbl;
struct IAMMediaTypeStream {
const IAMMediaTypeStreamVtbl* lpVtbl;
};
struct IAMMediaTypeStreamVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IAMMediaTypeStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IAMMediaTypeStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IAMMediaTypeStream* This);
/*** IMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetMultiMediaStream)(
IAMMediaTypeStream* This,
IMultiMediaStream** ppMultiMediaStream);
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IAMMediaTypeStream* This,
MSPID* pPurposeId,
STREAM_TYPE* pType);
HRESULT (STDMETHODCALLTYPE *SetSameFormat)(
IAMMediaTypeStream* This,
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *AllocateSample)(
IAMMediaTypeStream* This,
DWORD dwFlags,
IStreamSample** ppSample);
HRESULT (STDMETHODCALLTYPE *CreateSharedSample)(
IAMMediaTypeStream* This,
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample);
HRESULT (STDMETHODCALLTYPE *SendEndOfStream)(
IAMMediaTypeStream* This,
DWORD dwFlags);
/*** IAMMediaTypeStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetFormat)(
IAMMediaTypeStream* This,
AM_MEDIA_TYPE* pMediaType,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *SetFormat)(
IAMMediaTypeStream* This,
AM_MEDIA_TYPE* pMediaType,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *CreateSample)(
IAMMediaTypeStream* This,
long lSampleSize,
BYTE* pbBuffer,
DWORD dwFlags,
IUnknown* pUnkOuter,
IAMMediaTypeSample** ppAMMediaTypeSample);
HRESULT (STDMETHODCALLTYPE *GetStreamAllocatorRequirements)(
IAMMediaTypeStream* This,
ALLOCATOR_PROPERTIES* pProps);
HRESULT (STDMETHODCALLTYPE *SetStreamAllocatorRequirements)(
IAMMediaTypeStream* This,
ALLOCATOR_PROPERTIES* pProps);
};
/*** IUnknown methods ***/
#define IAMMediaTypeStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IAMMediaTypeStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IAMMediaTypeStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMediaStream methods ***/
#define IAMMediaTypeStream_GetMultiMediaStream(p,a) (p)->lpVtbl->GetMultiMediaStream(p,a)
#define IAMMediaTypeStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IAMMediaTypeStream_SetSameFormat(p,a,b) (p)->lpVtbl->SetSameFormat(p,a,b)
#define IAMMediaTypeStream_AllocateSample(p,a,b) (p)->lpVtbl->AllocateSample(p,a,b)
#define IAMMediaTypeStream_CreateSharedSample(p,a,b,c) (p)->lpVtbl->CreateSharedSample(p,a,b,c)
#define IAMMediaTypeStream_SendEndOfStream(p,a) (p)->lpVtbl->SendEndOfStream(p,a)
/*** IAMMediaTypeStream methods ***/
#define IAMMediaTypeStream_GetFormat(p,a,b) (p)->lpVtbl->GetFormat(p,a,b)
#define IAMMediaTypeStream_SetFormat(p,a,b) (p)->lpVtbl->SetFormat(p,a,b)
#define IAMMediaTypeStream_CreateSample(p,a,b,c,d,e) (p)->lpVtbl->CreateSample(p,a,b,c,d,e)
#define IAMMediaTypeStream_GetStreamAllocatorRequirements(p,a) (p)->lpVtbl->GetStreamAllocatorRequirements(p,a)
#define IAMMediaTypeStream_SetStreamAllocatorRequirements(p,a) (p)->lpVtbl->SetStreamAllocatorRequirements(p,a)
#endif
#define IAMMediaTypeStream_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetMultiMediaStream)(THIS_ IMultiMediaStream** ppMultiMediaStream) PURE; \
STDMETHOD_(HRESULT,GetInformation)(THIS_ MSPID* pPurposeId, STREAM_TYPE* pType) PURE; \
STDMETHOD_(HRESULT,SetSameFormat)(THIS_ IMediaStream* pStreamThatHasDesiredFormat, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,AllocateSample)(THIS_ DWORD dwFlags, IStreamSample** ppSample) PURE; \
STDMETHOD_(HRESULT,CreateSharedSample)(THIS_ IStreamSample* pExistingSample, DWORD dwFlags, IStreamSample** ppNewSample) PURE; \
STDMETHOD_(HRESULT,SendEndOfStream)(THIS_ DWORD dwFlags) PURE; \
/*** IAMMediaTypeStream methods ***/ \
STDMETHOD_(HRESULT,GetFormat)(THIS_ AM_MEDIA_TYPE* pMediaType, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,SetFormat)(THIS_ AM_MEDIA_TYPE* pMediaType, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,CreateSample)(THIS_ long lSampleSize, BYTE* pbBuffer, DWORD dwFlags, IUnknown* pUnkOuter, IAMMediaTypeSample** ppAMMediaTypeSample) PURE; \
STDMETHOD_(HRESULT,GetStreamAllocatorRequirements)(THIS_ ALLOCATOR_PROPERTIES* pProps) PURE; \
STDMETHOD_(HRESULT,SetStreamAllocatorRequirements)(THIS_ ALLOCATOR_PROPERTIES* pProps) PURE;
HRESULT CALLBACK IAMMediaTypeStream_GetFormat_Proxy(
IAMMediaTypeStream* This,
AM_MEDIA_TYPE* pMediaType,
DWORD dwFlags);
void __RPC_STUB IAMMediaTypeStream_GetFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeStream_SetFormat_Proxy(
IAMMediaTypeStream* This,
AM_MEDIA_TYPE* pMediaType,
DWORD dwFlags);
void __RPC_STUB IAMMediaTypeStream_SetFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeStream_CreateSample_Proxy(
IAMMediaTypeStream* This,
long lSampleSize,
BYTE* pbBuffer,
DWORD dwFlags,
IUnknown* pUnkOuter,
IAMMediaTypeSample** ppAMMediaTypeSample);
void __RPC_STUB IAMMediaTypeStream_CreateSample_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeStream_GetStreamAllocatorRequirements_Proxy(
IAMMediaTypeStream* This,
ALLOCATOR_PROPERTIES* pProps);
void __RPC_STUB IAMMediaTypeStream_GetStreamAllocatorRequirements_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeStream_SetStreamAllocatorRequirements_Proxy(
IAMMediaTypeStream* This,
ALLOCATOR_PROPERTIES* pProps);
void __RPC_STUB IAMMediaTypeStream_SetStreamAllocatorRequirements_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IAMMediaTypeStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IAMMediaTypeSample interface
*/
#ifndef __IAMMediaTypeSample_INTERFACE_DEFINED__
#define __IAMMediaTypeSample_INTERFACE_DEFINED__
DEFINE_GUID(IID_IAMMediaTypeSample, 0xab6b4afb, 0xf6e4, 0x11d0, 0x90,0x0d, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IAMMediaTypeSample : public IStreamSample
{
virtual HRESULT STDMETHODCALLTYPE SetPointer(
BYTE* pBuffer,
long lSize) = 0;
virtual HRESULT STDMETHODCALLTYPE GetPointer(
BYTE** ppBuffer) = 0;
virtual long STDMETHODCALLTYPE GetSize(
) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTime(
REFERENCE_TIME* pTimeStart,
REFERENCE_TIME* pTimeEnd) = 0;
virtual HRESULT STDMETHODCALLTYPE SetTime(
REFERENCE_TIME* pTimeStart,
REFERENCE_TIME* pTimeEnd) = 0;
virtual HRESULT STDMETHODCALLTYPE IsSyncPoint(
) = 0;
virtual HRESULT STDMETHODCALLTYPE SetSyncPoint(
BOOL bIsSyncPoint) = 0;
virtual HRESULT STDMETHODCALLTYPE IsPreroll(
) = 0;
virtual HRESULT STDMETHODCALLTYPE SetPreroll(
BOOL bIsPreroll) = 0;
virtual long STDMETHODCALLTYPE GetActualDataLength(
) = 0;
virtual HRESULT STDMETHODCALLTYPE SetActualDataLength(
long Len) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMediaType(
AM_MEDIA_TYPE** ppMediaType) = 0;
virtual HRESULT STDMETHODCALLTYPE SetMediaType(
AM_MEDIA_TYPE* pMediaType) = 0;
virtual HRESULT STDMETHODCALLTYPE IsDiscontinuity(
) = 0;
virtual HRESULT STDMETHODCALLTYPE SetDiscontinuity(
BOOL bDiscontinuity) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMediaTime(
LONGLONG* pTimeStart,
LONGLONG* pTimeEnd) = 0;
virtual HRESULT STDMETHODCALLTYPE SetMediaTime(
LONGLONG* pTimeStart,
LONGLONG* pTimeEnd) = 0;
};
#else
typedef struct IAMMediaTypeSampleVtbl IAMMediaTypeSampleVtbl;
struct IAMMediaTypeSample {
const IAMMediaTypeSampleVtbl* lpVtbl;
};
struct IAMMediaTypeSampleVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IAMMediaTypeSample* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IAMMediaTypeSample* This);
ULONG (STDMETHODCALLTYPE *Release)(
IAMMediaTypeSample* This);
/*** IStreamSample methods ***/
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IAMMediaTypeSample* This,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *GetSampleTimes)(
IAMMediaTypeSample* This,
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime);
HRESULT (STDMETHODCALLTYPE *SetSampleTimes)(
IAMMediaTypeSample* This,
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime);
HRESULT (STDMETHODCALLTYPE *Update)(
IAMMediaTypeSample* This,
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData);
HRESULT (STDMETHODCALLTYPE *CompletionStatus)(
IAMMediaTypeSample* This,
DWORD dwFlags,
DWORD dwMilliseconds);
/*** IAMMediaTypeSample methods ***/
HRESULT (STDMETHODCALLTYPE *SetPointer)(
IAMMediaTypeSample* This,
BYTE* pBuffer,
long lSize);
HRESULT (STDMETHODCALLTYPE *GetPointer)(
IAMMediaTypeSample* This,
BYTE** ppBuffer);
long (STDMETHODCALLTYPE *GetSize)(
IAMMediaTypeSample* This);
HRESULT (STDMETHODCALLTYPE *GetTime)(
IAMMediaTypeSample* This,
REFERENCE_TIME* pTimeStart,
REFERENCE_TIME* pTimeEnd);
HRESULT (STDMETHODCALLTYPE *SetTime)(
IAMMediaTypeSample* This,
REFERENCE_TIME* pTimeStart,
REFERENCE_TIME* pTimeEnd);
HRESULT (STDMETHODCALLTYPE *IsSyncPoint)(
IAMMediaTypeSample* This);
HRESULT (STDMETHODCALLTYPE *SetSyncPoint)(
IAMMediaTypeSample* This,
BOOL bIsSyncPoint);
HRESULT (STDMETHODCALLTYPE *IsPreroll)(
IAMMediaTypeSample* This);
HRESULT (STDMETHODCALLTYPE *SetPreroll)(
IAMMediaTypeSample* This,
BOOL bIsPreroll);
long (STDMETHODCALLTYPE *GetActualDataLength)(
IAMMediaTypeSample* This);
HRESULT (STDMETHODCALLTYPE *SetActualDataLength)(
IAMMediaTypeSample* This,
long Len);
HRESULT (STDMETHODCALLTYPE *GetMediaType)(
IAMMediaTypeSample* This,
AM_MEDIA_TYPE** ppMediaType);
HRESULT (STDMETHODCALLTYPE *SetMediaType)(
IAMMediaTypeSample* This,
AM_MEDIA_TYPE* pMediaType);
HRESULT (STDMETHODCALLTYPE *IsDiscontinuity)(
IAMMediaTypeSample* This);
HRESULT (STDMETHODCALLTYPE *SetDiscontinuity)(
IAMMediaTypeSample* This,
BOOL bDiscontinuity);
HRESULT (STDMETHODCALLTYPE *GetMediaTime)(
IAMMediaTypeSample* This,
LONGLONG* pTimeStart,
LONGLONG* pTimeEnd);
HRESULT (STDMETHODCALLTYPE *SetMediaTime)(
IAMMediaTypeSample* This,
LONGLONG* pTimeStart,
LONGLONG* pTimeEnd);
};
/*** IUnknown methods ***/
#define IAMMediaTypeSample_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IAMMediaTypeSample_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IAMMediaTypeSample_Release(p) (p)->lpVtbl->Release(p)
/*** IStreamSample methods ***/
#define IAMMediaTypeSample_GetMediaStream(p,a) (p)->lpVtbl->GetMediaStream(p,a)
#define IAMMediaTypeSample_GetSampleTimes(p,a,b,c) (p)->lpVtbl->GetSampleTimes(p,a,b,c)
#define IAMMediaTypeSample_SetSampleTimes(p,a,b) (p)->lpVtbl->SetSampleTimes(p,a,b)
#define IAMMediaTypeSample_Update(p,a,b,c,d) (p)->lpVtbl->Update(p,a,b,c,d)
#define IAMMediaTypeSample_CompletionStatus(p,a,b) (p)->lpVtbl->CompletionStatus(p,a,b)
/*** IAMMediaTypeSample methods ***/
#define IAMMediaTypeSample_SetPointer(p,a,b) (p)->lpVtbl->SetPointer(p,a,b)
#define IAMMediaTypeSample_GetPointer(p,a) (p)->lpVtbl->GetPointer(p,a)
#define IAMMediaTypeSample_GetSize(p) (p)->lpVtbl->GetSize(p)
#define IAMMediaTypeSample_GetTime(p,a,b) (p)->lpVtbl->GetTime(p,a,b)
#define IAMMediaTypeSample_SetTime(p,a,b) (p)->lpVtbl->SetTime(p,a,b)
#define IAMMediaTypeSample_IsSyncPoint(p) (p)->lpVtbl->IsSyncPoint(p)
#define IAMMediaTypeSample_SetSyncPoint(p,a) (p)->lpVtbl->SetSyncPoint(p,a)
#define IAMMediaTypeSample_IsPreroll(p) (p)->lpVtbl->IsPreroll(p)
#define IAMMediaTypeSample_SetPreroll(p,a) (p)->lpVtbl->SetPreroll(p,a)
#define IAMMediaTypeSample_GetActualDataLength(p) (p)->lpVtbl->GetActualDataLength(p)
#define IAMMediaTypeSample_SetActualDataLength(p,a) (p)->lpVtbl->SetActualDataLength(p,a)
#define IAMMediaTypeSample_GetMediaType(p,a) (p)->lpVtbl->GetMediaType(p,a)
#define IAMMediaTypeSample_SetMediaType(p,a) (p)->lpVtbl->SetMediaType(p,a)
#define IAMMediaTypeSample_IsDiscontinuity(p) (p)->lpVtbl->IsDiscontinuity(p)
#define IAMMediaTypeSample_SetDiscontinuity(p,a) (p)->lpVtbl->SetDiscontinuity(p,a)
#define IAMMediaTypeSample_GetMediaTime(p,a,b) (p)->lpVtbl->GetMediaTime(p,a,b)
#define IAMMediaTypeSample_SetMediaTime(p,a,b) (p)->lpVtbl->SetMediaTime(p,a,b)
#endif
#define IAMMediaTypeSample_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IStreamSample methods ***/ \
STDMETHOD_(HRESULT,GetMediaStream)(THIS_ IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,GetSampleTimes)(THIS_ STREAM_TIME* pStartTime, STREAM_TIME* pEndTime, STREAM_TIME* pCurrentTime) PURE; \
STDMETHOD_(HRESULT,SetSampleTimes)(THIS_ const STREAM_TIME* pStartTime, const STREAM_TIME* pEndTime) PURE; \
STDMETHOD_(HRESULT,Update)(THIS_ DWORD dwFlags, HANDLE hEvent, PAPCFUNC pfnAPC, DWORD dwAPCData) PURE; \
STDMETHOD_(HRESULT,CompletionStatus)(THIS_ DWORD dwFlags, DWORD dwMilliseconds) PURE; \
/*** IAMMediaTypeSample methods ***/ \
STDMETHOD_(HRESULT,SetPointer)(THIS_ BYTE* pBuffer, long lSize) PURE; \
STDMETHOD_(HRESULT,GetPointer)(THIS_ BYTE** ppBuffer) PURE; \
STDMETHOD_(long,GetSize)(THIS) PURE; \
STDMETHOD_(HRESULT,GetTime)(THIS_ REFERENCE_TIME* pTimeStart, REFERENCE_TIME* pTimeEnd) PURE; \
STDMETHOD_(HRESULT,SetTime)(THIS_ REFERENCE_TIME* pTimeStart, REFERENCE_TIME* pTimeEnd) PURE; \
STDMETHOD_(HRESULT,IsSyncPoint)(THIS) PURE; \
STDMETHOD_(HRESULT,SetSyncPoint)(THIS_ BOOL bIsSyncPoint) PURE; \
STDMETHOD_(HRESULT,IsPreroll)(THIS) PURE; \
STDMETHOD_(HRESULT,SetPreroll)(THIS_ BOOL bIsPreroll) PURE; \
STDMETHOD_(long,GetActualDataLength)(THIS) PURE; \
STDMETHOD_(HRESULT,SetActualDataLength)(THIS_ long Len) PURE; \
STDMETHOD_(HRESULT,GetMediaType)(THIS_ AM_MEDIA_TYPE** ppMediaType) PURE; \
STDMETHOD_(HRESULT,SetMediaType)(THIS_ AM_MEDIA_TYPE* pMediaType) PURE; \
STDMETHOD_(HRESULT,IsDiscontinuity)(THIS) PURE; \
STDMETHOD_(HRESULT,SetDiscontinuity)(THIS_ BOOL bDiscontinuity) PURE; \
STDMETHOD_(HRESULT,GetMediaTime)(THIS_ LONGLONG* pTimeStart, LONGLONG* pTimeEnd) PURE; \
STDMETHOD_(HRESULT,SetMediaTime)(THIS_ LONGLONG* pTimeStart, LONGLONG* pTimeEnd) PURE;
HRESULT CALLBACK IAMMediaTypeSample_SetPointer_Proxy(
IAMMediaTypeSample* This,
BYTE* pBuffer,
long lSize);
void __RPC_STUB IAMMediaTypeSample_SetPointer_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_GetPointer_Proxy(
IAMMediaTypeSample* This,
BYTE** ppBuffer);
void __RPC_STUB IAMMediaTypeSample_GetPointer_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
long CALLBACK IAMMediaTypeSample_GetSize_Proxy(
IAMMediaTypeSample* This);
void __RPC_STUB IAMMediaTypeSample_GetSize_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_GetTime_Proxy(
IAMMediaTypeSample* This,
REFERENCE_TIME* pTimeStart,
REFERENCE_TIME* pTimeEnd);
void __RPC_STUB IAMMediaTypeSample_GetTime_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_SetTime_Proxy(
IAMMediaTypeSample* This,
REFERENCE_TIME* pTimeStart,
REFERENCE_TIME* pTimeEnd);
void __RPC_STUB IAMMediaTypeSample_SetTime_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_IsSyncPoint_Proxy(
IAMMediaTypeSample* This);
void __RPC_STUB IAMMediaTypeSample_IsSyncPoint_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_SetSyncPoint_Proxy(
IAMMediaTypeSample* This,
BOOL bIsSyncPoint);
void __RPC_STUB IAMMediaTypeSample_SetSyncPoint_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_IsPreroll_Proxy(
IAMMediaTypeSample* This);
void __RPC_STUB IAMMediaTypeSample_IsPreroll_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_SetPreroll_Proxy(
IAMMediaTypeSample* This,
BOOL bIsPreroll);
void __RPC_STUB IAMMediaTypeSample_SetPreroll_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
long CALLBACK IAMMediaTypeSample_GetActualDataLength_Proxy(
IAMMediaTypeSample* This);
void __RPC_STUB IAMMediaTypeSample_GetActualDataLength_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_SetActualDataLength_Proxy(
IAMMediaTypeSample* This,
long Len);
void __RPC_STUB IAMMediaTypeSample_SetActualDataLength_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_GetMediaType_Proxy(
IAMMediaTypeSample* This,
AM_MEDIA_TYPE** ppMediaType);
void __RPC_STUB IAMMediaTypeSample_GetMediaType_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_SetMediaType_Proxy(
IAMMediaTypeSample* This,
AM_MEDIA_TYPE* pMediaType);
void __RPC_STUB IAMMediaTypeSample_SetMediaType_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_IsDiscontinuity_Proxy(
IAMMediaTypeSample* This);
void __RPC_STUB IAMMediaTypeSample_IsDiscontinuity_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_SetDiscontinuity_Proxy(
IAMMediaTypeSample* This,
BOOL bDiscontinuity);
void __RPC_STUB IAMMediaTypeSample_SetDiscontinuity_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_GetMediaTime_Proxy(
IAMMediaTypeSample* This,
LONGLONG* pTimeStart,
LONGLONG* pTimeEnd);
void __RPC_STUB IAMMediaTypeSample_GetMediaTime_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAMMediaTypeSample_SetMediaTime_Proxy(
IAMMediaTypeSample* This,
LONGLONG* pTimeStart,
LONGLONG* pTimeEnd);
void __RPC_STUB IAMMediaTypeSample_SetMediaTime_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IAMMediaTypeSample_INTERFACE_DEFINED__ */
DEFINE_GUID(CLSID_AMMultiMediaStream, 0x49c47ce5, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
DEFINE_GUID(CLSID_AMAudioStream, 0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
DEFINE_GUID(CLSID_AMAudioData, 0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);
DEFINE_GUID(CLSID_AMMediaTypeStream, 0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0x0d, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
#ifdef __cplusplus
}
#endif
#endif /* __WIDL_AMSTREAM_H */
/*
* Copyright 2004 Christian Costa
*
* 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
*/
import "unknwn.idl";
import "mmstream.idl";
import "strmif.idl";
cpp_quote("#include <ddraw.h>")
cpp_quote("#include <mmsystem.h>")
cpp_quote("#include <mmstream.h>")
cpp_quote("#include <ddstream.h>")
cpp_quote("#include <austream.h>")
cpp_quote("#if 0")
interface IDirectDraw;
interface IDirectDrawSurface;
cpp_quote("#endif")
interface IAMMultiMediaStream;
interface IAMMediaStream;
interface IMediaStreamFilter;
interface IAMMediaTypeStream;
interface IAMMediaTypeSample;
enum {
AMMSF_NOGRAPHTHREAD = 0x00000001
};
enum {
AMMSF_ADDDEFAULTRENDERER = 0x00000001,
AMMSF_CREATEPEER = 0x00000002
};
enum {
AMMSF_RENDERTYPEMASK = 0x00000003,
AMMSF_RENDERTOEXISTING = 0x00000000,
AMMSF_RENDERALLSTREAMS = 0x00000001,
AMMSF_NORENDER = 0x00000002,
AMMSF_NOCLOCK = 0x00000004,
AMMSF_RUN = 0x00000008
};
typedef [v1_enum] enum {
Disabled = 0,
ReadData = 1,
RenderData = 2
} OUTPUT_STATE;
/*
[
object,
uuid(7DB01C96-C0C3-11d0-8FF1-00C04FD9189D),
dual,
helpstring("IDirectShowStream Interface"),
pointer_default(unique)
]
interface IDirectShowStream : IDispatch
{
[propget, id(1), helpstring("property FileName")] HRESULT FileName([out, retval] BSTR *pVal);
[propput, id(1), helpstring("property FileName")] HRESULT FileName([in] BSTR newVal);
[propget, id(2), helpstring("property Video")] HRESULT Video([out, retval] OUTPUT_STATE *pVal);
[propput, id(2), helpstring("propetry Video")] HRESULT Video([in] OUTPUT_STATE newVal);
[propget, id(3), helpstring("property Audio")] HRESULT Audio([out, retval] OUTPUT_STATE *pVal);
[propput, id(3), helpstring("propetry Audio")] HRESULT Audio([in] OUTPUT_STATE newVal);
};
*/
[
object,
uuid(BEBE595C-9A6F-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IAMMultiMediaStream : IMultiMediaStream
{
HRESULT Initialize(
[in] STREAM_TYPE StreamType,
[in] DWORD dwFlags,
[in] /*[optional]*/ IGraphBuilder *pFilterGraph);
HRESULT GetFilterGraph(
[out] IGraphBuilder **ppGraphBuilder);
HRESULT GetFilter(
[out] IMediaStreamFilter **ppFilter);
HRESULT AddMediaStream(
[in] /*[optional]*/ IUnknown *pStreamObject,
[in] /*[optional]*/ const MSPID *PurposeId,
[in] DWORD dwFlags,
[out] /*[optional]*/ IMediaStream **ppNewStream);
HRESULT OpenFile(
[in] LPCWSTR pszFileName,
[in] DWORD dwFlags);
HRESULT OpenMoniker(
[in] IBindCtx *pCtx,
[in] IMoniker *pMoniker,
[in] DWORD dwFlags);
HRESULT Render(
[in] DWORD dwFlags);
}
[
object,
uuid(BEBE595D-9A6F-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IAMMediaStream : IMediaStream
{
HRESULT Initialize(
[in] /*[optional]*/ IUnknown *pSourceObject,
[in] DWORD dwFlags,
[in] REFMSPID PurposeId,
[in] const STREAM_TYPE StreamType);
HRESULT SetState(
[in] FILTER_STATE State);
HRESULT JoinAMMultiMediaStream(
[in] IAMMultiMediaStream *pAMMultiMediaStream);
HRESULT JoinFilter(
[in] IMediaStreamFilter *pMediaStreamFilter);
HRESULT JoinFilterGraph(
[in] IFilterGraph *pFilterGraph);
};
[
object,
local,
uuid(BEBE595E-9A6F-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IMediaStreamFilter : IBaseFilter
{
HRESULT AddMediaStream(
[in] IAMMediaStream *pAMMediaStream);
HRESULT GetMediaStream(
[in] REFMSPID idPurpose,
[out] IMediaStream **ppMediaStream);
HRESULT EnumMediaStreams(
[in] long Index,
[out] IMediaStream **ppMediaStream);
HRESULT SupportSeeking(
[in] BOOL bRenderer);
HRESULT ReferenceTimeToStreamTime(
[in] [out] REFERENCE_TIME *pTime);
HRESULT GetCurrentStreamTime(
[out] REFERENCE_TIME *pCurrentStreamTime);
HRESULT WaitUntil(
[in] REFERENCE_TIME WaitStreamTime);
HRESULT Flush(
[in] BOOL bCancelEOS);
HRESULT EndOfStream();
};
[
object,
local,
uuid(AB6B4AFC-F6E4-11d0-900D-00C04FD9189D),
pointer_default(unique)
]
interface IDirectDrawMediaSampleAllocator : IUnknown
{
HRESULT GetDirectDraw(IDirectDraw **ppDirectDraw);
};
[
object,
local,
uuid(AB6B4AFE-F6E4-11d0-900D-00C04FD9189D),
pointer_default(unique)
]
interface IDirectDrawMediaSample : IUnknown
{
HRESULT GetSurfaceAndReleaseLock(
[out] IDirectDrawSurface **ppDirectDrawSurface,
[out] RECT * pRect);
HRESULT LockMediaSamplePointer(void);
};
[
object,
local,
uuid(AB6B4AFA-F6E4-11d0-900D-00C04FD9189D),
pointer_default(unique)
]
interface IAMMediaTypeStream : IMediaStream
{
HRESULT GetFormat(
[out] AM_MEDIA_TYPE * pMediaType,
[in] DWORD dwFlags);
HRESULT SetFormat(
[in] AM_MEDIA_TYPE * pMediaType,
[in] DWORD dwFlags);
HRESULT CreateSample(
[in] long lSampleSize,
[in] /*[optional]*/ BYTE * pbBuffer,
[in] DWORD dwFlags,
[in] /*[optional]*/ IUnknown *pUnkOuter,
[out] IAMMediaTypeSample ** ppAMMediaTypeSample);
HRESULT GetStreamAllocatorRequirements(
[out] ALLOCATOR_PROPERTIES *pProps);
HRESULT SetStreamAllocatorRequirements(
[in] ALLOCATOR_PROPERTIES *pProps);
};
[
object,
local,
uuid(AB6B4AFB-F6E4-11d0-900D-00C04FD9189D),
pointer_default(unique)
]
interface IAMMediaTypeSample : IStreamSample
{
HRESULT SetPointer(
[in] BYTE *pBuffer,
[in] long lSize);
HRESULT GetPointer(
[out] BYTE ** ppBuffer);
long GetSize(void);
HRESULT GetTime(
[out] REFERENCE_TIME * pTimeStart,
[out] REFERENCE_TIME * pTimeEnd);
HRESULT SetTime(
[in] REFERENCE_TIME * pTimeStart,
[in] REFERENCE_TIME * pTimeEnd);
HRESULT IsSyncPoint(void);
HRESULT SetSyncPoint(
BOOL bIsSyncPoint);
HRESULT IsPreroll(void);
HRESULT SetPreroll(
BOOL bIsPreroll);
long GetActualDataLength(void);
HRESULT SetActualDataLength(long Len);
HRESULT GetMediaType(
AM_MEDIA_TYPE **ppMediaType);
HRESULT SetMediaType(
AM_MEDIA_TYPE *pMediaType);
HRESULT IsDiscontinuity(void);
HRESULT SetDiscontinuity(
BOOL bDiscontinuity);
HRESULT GetMediaTime(
[out] LONGLONG * pTimeStart,
[out] LONGLONG * pTimeEnd);
HRESULT SetMediaTime(
[in] LONGLONG * pTimeStart,
[in] LONGLONG * pTimeEnd);
};
cpp_quote("DEFINE_GUID(CLSID_AMMultiMediaStream, 0x49c47ce5, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, 0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
cpp_quote("DEFINE_GUID(CLSID_AMAudioStream, 0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
cpp_quote("DEFINE_GUID(CLSID_AMAudioData, 0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
cpp_quote("DEFINE_GUID(CLSID_AMMediaTypeStream, 0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0x0d, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
/*** Autogenerated by WIDL 0.1 from austream.idl - Do not edit ***/
#include <rpc.h>
#include <rpcndr.h>
#ifndef __WIDL_AUSTREAM_H
#define __WIDL_AUSTREAM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <unknwn.h>
#include <mmstream.h>
#if 0
typedef struct tWAVEFORMATEX WAVEFORMATEX;
#endif
#ifndef __IAudioMediaStream_FWD_DEFINED__
#define __IAudioMediaStream_FWD_DEFINED__
typedef struct IAudioMediaStream IAudioMediaStream;
#endif
#ifndef __IAudioStreamSample_FWD_DEFINED__
#define __IAudioStreamSample_FWD_DEFINED__
typedef struct IAudioStreamSample IAudioStreamSample;
#endif
#ifndef __IMemoryData_FWD_DEFINED__
#define __IMemoryData_FWD_DEFINED__
typedef struct IMemoryData IMemoryData;
#endif
#ifndef __IAudioData_FWD_DEFINED__
#define __IAudioData_FWD_DEFINED__
typedef struct IAudioData IAudioData;
#endif
/*****************************************************************************
* IAudioMediaStream interface
*/
#ifndef __IAudioMediaStream_INTERFACE_DEFINED__
#define __IAudioMediaStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IAudioMediaStream, 0xf7537560, 0xa3be, 0x11d0, 0x82,0x12, 0x00,0xc0,0x4f,0xc3,0x2c,0x45);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IAudioMediaStream : public IMediaStream
{
virtual HRESULT STDMETHODCALLTYPE GetFormat(
WAVEFORMATEX* pWaveFormatCurrent) = 0;
virtual HRESULT STDMETHODCALLTYPE SetFormat(
const WAVEFORMATEX* lpWaveFormat) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateSample(
IAudioData* pAudioData,
DWORD dwFlags,
IAudioStreamSample** ppSample) = 0;
};
#else
typedef struct IAudioMediaStreamVtbl IAudioMediaStreamVtbl;
struct IAudioMediaStream {
const IAudioMediaStreamVtbl* lpVtbl;
};
struct IAudioMediaStreamVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IAudioMediaStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IAudioMediaStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IAudioMediaStream* This);
/*** IMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetMultiMediaStream)(
IAudioMediaStream* This,
IMultiMediaStream** ppMultiMediaStream);
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IAudioMediaStream* This,
MSPID* pPurposeId,
STREAM_TYPE* pType);
HRESULT (STDMETHODCALLTYPE *SetSameFormat)(
IAudioMediaStream* This,
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *AllocateSample)(
IAudioMediaStream* This,
DWORD dwFlags,
IStreamSample** ppSample);
HRESULT (STDMETHODCALLTYPE *CreateSharedSample)(
IAudioMediaStream* This,
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample);
HRESULT (STDMETHODCALLTYPE *SendEndOfStream)(
IAudioMediaStream* This,
DWORD dwFlags);
/*** IAudioMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetFormat)(
IAudioMediaStream* This,
WAVEFORMATEX* pWaveFormatCurrent);
HRESULT (STDMETHODCALLTYPE *SetFormat)(
IAudioMediaStream* This,
const WAVEFORMATEX* lpWaveFormat);
HRESULT (STDMETHODCALLTYPE *CreateSample)(
IAudioMediaStream* This,
IAudioData* pAudioData,
DWORD dwFlags,
IAudioStreamSample** ppSample);
};
/*** IUnknown methods ***/
#define IAudioMediaStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IAudioMediaStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IAudioMediaStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMediaStream methods ***/
#define IAudioMediaStream_GetMultiMediaStream(p,a) (p)->lpVtbl->GetMultiMediaStream(p,a)
#define IAudioMediaStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IAudioMediaStream_SetSameFormat(p,a,b) (p)->lpVtbl->SetSameFormat(p,a,b)
#define IAudioMediaStream_AllocateSample(p,a,b) (p)->lpVtbl->AllocateSample(p,a,b)
#define IAudioMediaStream_CreateSharedSample(p,a,b,c) (p)->lpVtbl->CreateSharedSample(p,a,b,c)
#define IAudioMediaStream_SendEndOfStream(p,a) (p)->lpVtbl->SendEndOfStream(p,a)
/*** IAudioMediaStream methods ***/
#define IAudioMediaStream_GetFormat(p,a) (p)->lpVtbl->GetFormat(p,a)
#define IAudioMediaStream_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
#define IAudioMediaStream_CreateSample(p,a,b,c) (p)->lpVtbl->CreateSample(p,a,b,c)
#endif
#define IAudioMediaStream_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetMultiMediaStream)(THIS_ IMultiMediaStream** ppMultiMediaStream) PURE; \
STDMETHOD_(HRESULT,GetInformation)(THIS_ MSPID* pPurposeId, STREAM_TYPE* pType) PURE; \
STDMETHOD_(HRESULT,SetSameFormat)(THIS_ IMediaStream* pStreamThatHasDesiredFormat, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,AllocateSample)(THIS_ DWORD dwFlags, IStreamSample** ppSample) PURE; \
STDMETHOD_(HRESULT,CreateSharedSample)(THIS_ IStreamSample* pExistingSample, DWORD dwFlags, IStreamSample** ppNewSample) PURE; \
STDMETHOD_(HRESULT,SendEndOfStream)(THIS_ DWORD dwFlags) PURE; \
/*** IAudioMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetFormat)(THIS_ WAVEFORMATEX* pWaveFormatCurrent) PURE; \
STDMETHOD_(HRESULT,SetFormat)(THIS_ const WAVEFORMATEX* lpWaveFormat) PURE; \
STDMETHOD_(HRESULT,CreateSample)(THIS_ IAudioData* pAudioData, DWORD dwFlags, IAudioStreamSample** ppSample) PURE;
HRESULT CALLBACK IAudioMediaStream_GetFormat_Proxy(
IAudioMediaStream* This,
WAVEFORMATEX* pWaveFormatCurrent);
void __RPC_STUB IAudioMediaStream_GetFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAudioMediaStream_SetFormat_Proxy(
IAudioMediaStream* This,
const WAVEFORMATEX* lpWaveFormat);
void __RPC_STUB IAudioMediaStream_SetFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAudioMediaStream_CreateSample_Proxy(
IAudioMediaStream* This,
IAudioData* pAudioData,
DWORD dwFlags,
IAudioStreamSample** ppSample);
void __RPC_STUB IAudioMediaStream_CreateSample_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IAudioMediaStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IAudioStreamSample interface
*/
#ifndef __IAudioStreamSample_INTERFACE_DEFINED__
#define __IAudioStreamSample_INTERFACE_DEFINED__
DEFINE_GUID(IID_IAudioStreamSample, 0x345fee00, 0xaba5, 0x11d0, 0x82,0x12, 0x00,0xc0,0x4f,0xc3,0x2c,0x45);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IAudioStreamSample : public IStreamSample
{
virtual HRESULT STDMETHODCALLTYPE GetAudioData(
IAudioData** ppAudio) = 0;
};
#else
typedef struct IAudioStreamSampleVtbl IAudioStreamSampleVtbl;
struct IAudioStreamSample {
const IAudioStreamSampleVtbl* lpVtbl;
};
struct IAudioStreamSampleVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IAudioStreamSample* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IAudioStreamSample* This);
ULONG (STDMETHODCALLTYPE *Release)(
IAudioStreamSample* This);
/*** IStreamSample methods ***/
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IAudioStreamSample* This,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *GetSampleTimes)(
IAudioStreamSample* This,
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime);
HRESULT (STDMETHODCALLTYPE *SetSampleTimes)(
IAudioStreamSample* This,
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime);
HRESULT (STDMETHODCALLTYPE *Update)(
IAudioStreamSample* This,
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData);
HRESULT (STDMETHODCALLTYPE *CompletionStatus)(
IAudioStreamSample* This,
DWORD dwFlags,
DWORD dwMilliseconds);
/*** IAudioStreamSample methods ***/
HRESULT (STDMETHODCALLTYPE *GetAudioData)(
IAudioStreamSample* This,
IAudioData** ppAudio);
};
/*** IUnknown methods ***/
#define IAudioStreamSample_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IAudioStreamSample_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IAudioStreamSample_Release(p) (p)->lpVtbl->Release(p)
/*** IStreamSample methods ***/
#define IAudioStreamSample_GetMediaStream(p,a) (p)->lpVtbl->GetMediaStream(p,a)
#define IAudioStreamSample_GetSampleTimes(p,a,b,c) (p)->lpVtbl->GetSampleTimes(p,a,b,c)
#define IAudioStreamSample_SetSampleTimes(p,a,b) (p)->lpVtbl->SetSampleTimes(p,a,b)
#define IAudioStreamSample_Update(p,a,b,c,d) (p)->lpVtbl->Update(p,a,b,c,d)
#define IAudioStreamSample_CompletionStatus(p,a,b) (p)->lpVtbl->CompletionStatus(p,a,b)
/*** IAudioStreamSample methods ***/
#define IAudioStreamSample_GetAudioData(p,a) (p)->lpVtbl->GetAudioData(p,a)
#endif
#define IAudioStreamSample_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IStreamSample methods ***/ \
STDMETHOD_(HRESULT,GetMediaStream)(THIS_ IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,GetSampleTimes)(THIS_ STREAM_TIME* pStartTime, STREAM_TIME* pEndTime, STREAM_TIME* pCurrentTime) PURE; \
STDMETHOD_(HRESULT,SetSampleTimes)(THIS_ const STREAM_TIME* pStartTime, const STREAM_TIME* pEndTime) PURE; \
STDMETHOD_(HRESULT,Update)(THIS_ DWORD dwFlags, HANDLE hEvent, PAPCFUNC pfnAPC, DWORD dwAPCData) PURE; \
STDMETHOD_(HRESULT,CompletionStatus)(THIS_ DWORD dwFlags, DWORD dwMilliseconds) PURE; \
/*** IAudioStreamSample methods ***/ \
STDMETHOD_(HRESULT,GetAudioData)(THIS_ IAudioData** ppAudio) PURE;
HRESULT CALLBACK IAudioStreamSample_GetAudioData_Proxy(
IAudioStreamSample* This,
IAudioData** ppAudio);
void __RPC_STUB IAudioStreamSample_GetAudioData_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IAudioStreamSample_INTERFACE_DEFINED__ */
/*****************************************************************************
* IMemoryData interface
*/
#ifndef __IMemoryData_INTERFACE_DEFINED__
#define __IMemoryData_INTERFACE_DEFINED__
DEFINE_GUID(IID_IMemoryData, 0x327fc560, 0xaf60, 0x11d0, 0x82,0x12, 0x00,0xc0,0x4f,0xc3,0x2c,0x45);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMemoryData : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE SetBuffer(
DWORD cbSize,
BYTE* pbData,
DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInfo(
DWORD* pdwLength,
BYTE** ppbData,
DWORD* pcbActualData) = 0;
virtual HRESULT STDMETHODCALLTYPE SetActual(
DWORD cbDataValid) = 0;
};
#else
typedef struct IMemoryDataVtbl IMemoryDataVtbl;
struct IMemoryData {
const IMemoryDataVtbl* lpVtbl;
};
struct IMemoryDataVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IMemoryData* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IMemoryData* This);
ULONG (STDMETHODCALLTYPE *Release)(
IMemoryData* This);
/*** IMemoryData methods ***/
HRESULT (STDMETHODCALLTYPE *SetBuffer)(
IMemoryData* This,
DWORD cbSize,
BYTE* pbData,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *GetInfo)(
IMemoryData* This,
DWORD* pdwLength,
BYTE** ppbData,
DWORD* pcbActualData);
HRESULT (STDMETHODCALLTYPE *SetActual)(
IMemoryData* This,
DWORD cbDataValid);
};
/*** IUnknown methods ***/
#define IMemoryData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IMemoryData_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IMemoryData_Release(p) (p)->lpVtbl->Release(p)
/*** IMemoryData methods ***/
#define IMemoryData_SetBuffer(p,a,b,c) (p)->lpVtbl->SetBuffer(p,a,b,c)
#define IMemoryData_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c)
#define IMemoryData_SetActual(p,a) (p)->lpVtbl->SetActual(p,a)
#endif
#define IMemoryData_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMemoryData methods ***/ \
STDMETHOD_(HRESULT,SetBuffer)(THIS_ DWORD cbSize, BYTE* pbData, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,GetInfo)(THIS_ DWORD* pdwLength, BYTE** ppbData, DWORD* pcbActualData) PURE; \
STDMETHOD_(HRESULT,SetActual)(THIS_ DWORD cbDataValid) PURE;
HRESULT CALLBACK IMemoryData_SetBuffer_Proxy(
IMemoryData* This,
DWORD cbSize,
BYTE* pbData,
DWORD dwFlags);
void __RPC_STUB IMemoryData_SetBuffer_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMemoryData_GetInfo_Proxy(
IMemoryData* This,
DWORD* pdwLength,
BYTE** ppbData,
DWORD* pcbActualData);
void __RPC_STUB IMemoryData_GetInfo_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMemoryData_SetActual_Proxy(
IMemoryData* This,
DWORD cbDataValid);
void __RPC_STUB IMemoryData_SetActual_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IMemoryData_INTERFACE_DEFINED__ */
/*****************************************************************************
* IAudioData interface
*/
#ifndef __IAudioData_INTERFACE_DEFINED__
#define __IAudioData_INTERFACE_DEFINED__
DEFINE_GUID(IID_IAudioData, 0x54c719c0, 0xaf60, 0x11d0, 0x82,0x12, 0x00,0xc0,0x4f,0xc3,0x2c,0x45);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IAudioData : public IMemoryData
{
virtual HRESULT STDMETHODCALLTYPE GetFormat(
WAVEFORMATEX* pWaveFormatCurrent) = 0;
virtual HRESULT STDMETHODCALLTYPE SetFormat(
const WAVEFORMATEX* lpWaveFormat) = 0;
};
#else
typedef struct IAudioDataVtbl IAudioDataVtbl;
struct IAudioData {
const IAudioDataVtbl* lpVtbl;
};
struct IAudioDataVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IAudioData* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IAudioData* This);
ULONG (STDMETHODCALLTYPE *Release)(
IAudioData* This);
/*** IMemoryData methods ***/
HRESULT (STDMETHODCALLTYPE *SetBuffer)(
IAudioData* This,
DWORD cbSize,
BYTE* pbData,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *GetInfo)(
IAudioData* This,
DWORD* pdwLength,
BYTE** ppbData,
DWORD* pcbActualData);
HRESULT (STDMETHODCALLTYPE *SetActual)(
IAudioData* This,
DWORD cbDataValid);
/*** IAudioData methods ***/
HRESULT (STDMETHODCALLTYPE *GetFormat)(
IAudioData* This,
WAVEFORMATEX* pWaveFormatCurrent);
HRESULT (STDMETHODCALLTYPE *SetFormat)(
IAudioData* This,
const WAVEFORMATEX* lpWaveFormat);
};
/*** IUnknown methods ***/
#define IAudioData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IAudioData_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IAudioData_Release(p) (p)->lpVtbl->Release(p)
/*** IMemoryData methods ***/
#define IAudioData_SetBuffer(p,a,b,c) (p)->lpVtbl->SetBuffer(p,a,b,c)
#define IAudioData_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c)
#define IAudioData_SetActual(p,a) (p)->lpVtbl->SetActual(p,a)
/*** IAudioData methods ***/
#define IAudioData_GetFormat(p,a) (p)->lpVtbl->GetFormat(p,a)
#define IAudioData_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
#endif
#define IAudioData_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMemoryData methods ***/ \
STDMETHOD_(HRESULT,SetBuffer)(THIS_ DWORD cbSize, BYTE* pbData, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,GetInfo)(THIS_ DWORD* pdwLength, BYTE** ppbData, DWORD* pcbActualData) PURE; \
STDMETHOD_(HRESULT,SetActual)(THIS_ DWORD cbDataValid) PURE; \
/*** IAudioData methods ***/ \
STDMETHOD_(HRESULT,GetFormat)(THIS_ WAVEFORMATEX* pWaveFormatCurrent) PURE; \
STDMETHOD_(HRESULT,SetFormat)(THIS_ const WAVEFORMATEX* lpWaveFormat) PURE;
HRESULT CALLBACK IAudioData_GetFormat_Proxy(
IAudioData* This,
WAVEFORMATEX* pWaveFormatCurrent);
void __RPC_STUB IAudioData_GetFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IAudioData_SetFormat_Proxy(
IAudioData* This,
const WAVEFORMATEX* lpWaveFormat);
void __RPC_STUB IAudioData_SetFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IAudioData_INTERFACE_DEFINED__ */
#ifdef __cplusplus
}
#endif
#endif /* __WIDL_AUSTREAM_H */
/*
* Copyright 2004 Christian Costa
*
* 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
*/
import "unknwn.idl";
import "mmstream.idl";
cpp_quote("#if 0")
typedef struct tWAVEFORMATEX WAVEFORMATEX;
cpp_quote ("#endif")
interface IAudioMediaStream;
interface IAudioStreamSample;
interface IMemoryData;
interface IAudioData;
[
object,
local,
uuid(f7537560-a3be-11d0-8212-00c04fc32c45),
pointer_default(unique)
]
interface IAudioMediaStream : IMediaStream
{
HRESULT GetFormat(
[out] /*[optional]*/ WAVEFORMATEX *pWaveFormatCurrent
);
HRESULT SetFormat(
[in] const WAVEFORMATEX *lpWaveFormat);
HRESULT CreateSample(
[in] IAudioData *pAudioData,
[in] DWORD dwFlags,
[out] IAudioStreamSample **ppSample
);
}
[
object,
local,
uuid(345fee00-aba5-11d0-8212-00c04fc32c45),
pointer_default(unique)
]
interface IAudioStreamSample : IStreamSample
{
HRESULT GetAudioData(
[out] IAudioData **ppAudio
);
}
[
object,
local,
uuid(327fc560-af60-11d0-8212-00c04fc32c45),
pointer_default(unique)
]
interface IMemoryData : IUnknown
{
HRESULT SetBuffer(
[in] DWORD cbSize,
[in] BYTE *pbData,
[in] DWORD dwFlags
);
HRESULT GetInfo(
[out] DWORD *pdwLength,
[out] BYTE **ppbData,
[out] DWORD *pcbActualData
);
HRESULT SetActual(
[in] DWORD cbDataValid
);
}
[
object,
local,
uuid(54c719c0-af60-11d0-8212-00c04fc32c45),
pointer_default(unique)
]
interface IAudioData : IMemoryData
{
HRESULT GetFormat(
[out] /*[optional]*/ WAVEFORMATEX *pWaveFormatCurrent
);
HRESULT SetFormat(
[in] const WAVEFORMATEX *lpWaveFormat
);
}
......@@ -32,6 +32,7 @@ extern "C" {
/*****************************************************************************
* Predeclare the interfaces
*/
#ifndef __DDRAW_GUID_DEFINED__
DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
DEFINE_GUID( CLSID_DirectDraw7, 0x3C305196,0x50DB,0x11D3,0x9C,0xFE,0x00,0xC0,0x4F,0xD9,0x30,0xC5 );
DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
......@@ -48,6 +49,7 @@ DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x2
DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawColorControl,0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
DEFINE_GUID( IID_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
#endif
typedef struct IDirectDraw IDirectDraw,*LPDIRECTDRAW;
typedef struct IDirectDraw2 IDirectDraw2,*LPDIRECTDRAW2;
......
/*** Autogenerated by WIDL 0.1 from ddstream.idl - Do not edit ***/
#include <rpc.h>
#include <rpcndr.h>
#ifndef __WIDL_DDSTREAM_H
#define __WIDL_DDSTREAM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <unknwn.h>
#include <mmstream.h>
#ifndef __WINE_DDRAW_H
typedef void *LPDDSURFACEDESC;
typedef struct tDDSURFACEDESC DDSURFACEDESC;
#ifndef __IDirectDraw_FWD_DEFINED__
#define __IDirectDraw_FWD_DEFINED__
typedef struct IDirectDraw IDirectDraw;
#endif
#ifndef __IDirectDrawSurface_FWD_DEFINED__
#define __IDirectDrawSurface_FWD_DEFINED__
typedef struct IDirectDrawSurface IDirectDrawSurface;
#endif
#ifndef __IDirectDrawPalette_FWD_DEFINED__
#define __IDirectDrawPalette_FWD_DEFINED__
typedef struct IDirectDrawPalette IDirectDrawPalette;
#endif
#endif
#include <ddraw.h>
enum {
DDSFF_PROGRESSIVERENDER = 0x1
};
#ifndef __IDirectDrawMediaStream_FWD_DEFINED__
#define __IDirectDrawMediaStream_FWD_DEFINED__
typedef struct IDirectDrawMediaStream IDirectDrawMediaStream;
#endif
#ifndef __IDirectDrawStreamSample_FWD_DEFINED__
#define __IDirectDrawStreamSample_FWD_DEFINED__
typedef struct IDirectDrawStreamSample IDirectDrawStreamSample;
#endif
/*****************************************************************************
* IDirectDrawMediaStream interface
*/
#ifndef __IDirectDrawMediaStream_INTERFACE_DEFINED__
#define __IDirectDrawMediaStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IDirectDrawMediaStream, 0xf4104fce, 0x9a70, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IDirectDrawMediaStream : public IMediaStream
{
virtual HRESULT STDMETHODCALLTYPE GetFormat(
DDSURFACEDESC* pDDSDCurrent,
IDirectDrawPalette** ppDirectDrawPalette,
DDSURFACEDESC* pDDSDDesired,
DWORD* pdwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE SetFormat(
const DDSURFACEDESC* pDDSurfaceDesc,
IDirectDrawPalette* pDirectDrawPalette) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDirectDraw(
IDirectDraw** ppDirectDraw) = 0;
virtual HRESULT STDMETHODCALLTYPE SetDirectDraw(
IDirectDraw* pDirectDraw) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateSample(
IDirectDrawSurface* pSurface,
const RECT* pRect,
DWORD dwFlags,
IDirectDrawStreamSample** ppSample) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTimePerFrame(
STREAM_TIME* pFrameTime) = 0;
};
#else
typedef struct IDirectDrawMediaStreamVtbl IDirectDrawMediaStreamVtbl;
struct IDirectDrawMediaStream {
const IDirectDrawMediaStreamVtbl* lpVtbl;
};
struct IDirectDrawMediaStreamVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IDirectDrawMediaStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IDirectDrawMediaStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IDirectDrawMediaStream* This);
/*** IMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetMultiMediaStream)(
IDirectDrawMediaStream* This,
IMultiMediaStream** ppMultiMediaStream);
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IDirectDrawMediaStream* This,
MSPID* pPurposeId,
STREAM_TYPE* pType);
HRESULT (STDMETHODCALLTYPE *SetSameFormat)(
IDirectDrawMediaStream* This,
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *AllocateSample)(
IDirectDrawMediaStream* This,
DWORD dwFlags,
IStreamSample** ppSample);
HRESULT (STDMETHODCALLTYPE *CreateSharedSample)(
IDirectDrawMediaStream* This,
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample);
HRESULT (STDMETHODCALLTYPE *SendEndOfStream)(
IDirectDrawMediaStream* This,
DWORD dwFlags);
/*** IDirectDrawMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetFormat)(
IDirectDrawMediaStream* This,
DDSURFACEDESC* pDDSDCurrent,
IDirectDrawPalette** ppDirectDrawPalette,
DDSURFACEDESC* pDDSDDesired,
DWORD* pdwFlags);
HRESULT (STDMETHODCALLTYPE *SetFormat)(
IDirectDrawMediaStream* This,
const DDSURFACEDESC* pDDSurfaceDesc,
IDirectDrawPalette* pDirectDrawPalette);
HRESULT (STDMETHODCALLTYPE *GetDirectDraw)(
IDirectDrawMediaStream* This,
IDirectDraw** ppDirectDraw);
HRESULT (STDMETHODCALLTYPE *SetDirectDraw)(
IDirectDrawMediaStream* This,
IDirectDraw* pDirectDraw);
HRESULT (STDMETHODCALLTYPE *CreateSample)(
IDirectDrawMediaStream* This,
IDirectDrawSurface* pSurface,
const RECT* pRect,
DWORD dwFlags,
IDirectDrawStreamSample** ppSample);
HRESULT (STDMETHODCALLTYPE *GetTimePerFrame)(
IDirectDrawMediaStream* This,
STREAM_TIME* pFrameTime);
};
/*** IUnknown methods ***/
#define IDirectDrawMediaStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawMediaStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawMediaStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMediaStream methods ***/
#define IDirectDrawMediaStream_GetMultiMediaStream(p,a) (p)->lpVtbl->GetMultiMediaStream(p,a)
#define IDirectDrawMediaStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IDirectDrawMediaStream_SetSameFormat(p,a,b) (p)->lpVtbl->SetSameFormat(p,a,b)
#define IDirectDrawMediaStream_AllocateSample(p,a,b) (p)->lpVtbl->AllocateSample(p,a,b)
#define IDirectDrawMediaStream_CreateSharedSample(p,a,b,c) (p)->lpVtbl->CreateSharedSample(p,a,b,c)
#define IDirectDrawMediaStream_SendEndOfStream(p,a) (p)->lpVtbl->SendEndOfStream(p,a)
/*** IDirectDrawMediaStream methods ***/
#define IDirectDrawMediaStream_GetFormat(p,a,b,c,d) (p)->lpVtbl->GetFormat(p,a,b,c,d)
#define IDirectDrawMediaStream_SetFormat(p,a,b) (p)->lpVtbl->SetFormat(p,a,b)
#define IDirectDrawMediaStream_GetDirectDraw(p,a) (p)->lpVtbl->GetDirectDraw(p,a)
#define IDirectDrawMediaStream_SetDirectDraw(p,a) (p)->lpVtbl->SetDirectDraw(p,a)
#define IDirectDrawMediaStream_CreateSample(p,a,b,c,d) (p)->lpVtbl->CreateSample(p,a,b,c,d)
#define IDirectDrawMediaStream_GetTimePerFrame(p,a) (p)->lpVtbl->GetTimePerFrame(p,a)
#endif
#define IDirectDrawMediaStream_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetMultiMediaStream)(THIS_ IMultiMediaStream** ppMultiMediaStream) PURE; \
STDMETHOD_(HRESULT,GetInformation)(THIS_ MSPID* pPurposeId, STREAM_TYPE* pType) PURE; \
STDMETHOD_(HRESULT,SetSameFormat)(THIS_ IMediaStream* pStreamThatHasDesiredFormat, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,AllocateSample)(THIS_ DWORD dwFlags, IStreamSample** ppSample) PURE; \
STDMETHOD_(HRESULT,CreateSharedSample)(THIS_ IStreamSample* pExistingSample, DWORD dwFlags, IStreamSample** ppNewSample) PURE; \
STDMETHOD_(HRESULT,SendEndOfStream)(THIS_ DWORD dwFlags) PURE; \
/*** IDirectDrawMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetFormat)(THIS_ DDSURFACEDESC* pDDSDCurrent, IDirectDrawPalette** ppDirectDrawPalette, DDSURFACEDESC* pDDSDDesired, DWORD* pdwFlags) PURE; \
STDMETHOD_(HRESULT,SetFormat)(THIS_ const DDSURFACEDESC* pDDSurfaceDesc, IDirectDrawPalette* pDirectDrawPalette) PURE; \
STDMETHOD_(HRESULT,GetDirectDraw)(THIS_ IDirectDraw** ppDirectDraw) PURE; \
STDMETHOD_(HRESULT,SetDirectDraw)(THIS_ IDirectDraw* pDirectDraw) PURE; \
STDMETHOD_(HRESULT,CreateSample)(THIS_ IDirectDrawSurface* pSurface, const RECT* pRect, DWORD dwFlags, IDirectDrawStreamSample** ppSample) PURE; \
STDMETHOD_(HRESULT,GetTimePerFrame)(THIS_ STREAM_TIME* pFrameTime) PURE;
HRESULT CALLBACK IDirectDrawMediaStream_GetFormat_Proxy(
IDirectDrawMediaStream* This,
DDSURFACEDESC* pDDSDCurrent,
IDirectDrawPalette** ppDirectDrawPalette,
DDSURFACEDESC* pDDSDDesired,
DWORD* pdwFlags);
void __RPC_STUB IDirectDrawMediaStream_GetFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IDirectDrawMediaStream_SetFormat_Proxy(
IDirectDrawMediaStream* This,
const DDSURFACEDESC* pDDSurfaceDesc,
IDirectDrawPalette* pDirectDrawPalette);
void __RPC_STUB IDirectDrawMediaStream_SetFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IDirectDrawMediaStream_GetDirectDraw_Proxy(
IDirectDrawMediaStream* This,
IDirectDraw** ppDirectDraw);
void __RPC_STUB IDirectDrawMediaStream_GetDirectDraw_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IDirectDrawMediaStream_SetDirectDraw_Proxy(
IDirectDrawMediaStream* This,
IDirectDraw* pDirectDraw);
void __RPC_STUB IDirectDrawMediaStream_SetDirectDraw_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IDirectDrawMediaStream_CreateSample_Proxy(
IDirectDrawMediaStream* This,
IDirectDrawSurface* pSurface,
const RECT* pRect,
DWORD dwFlags,
IDirectDrawStreamSample** ppSample);
void __RPC_STUB IDirectDrawMediaStream_CreateSample_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IDirectDrawMediaStream_GetTimePerFrame_Proxy(
IDirectDrawMediaStream* This,
STREAM_TIME* pFrameTime);
void __RPC_STUB IDirectDrawMediaStream_GetTimePerFrame_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IDirectDrawMediaStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IDirectDrawStreamSample interface
*/
#ifndef __IDirectDrawStreamSample_INTERFACE_DEFINED__
#define __IDirectDrawStreamSample_INTERFACE_DEFINED__
DEFINE_GUID(IID_IDirectDrawStreamSample, 0xf4104fcf, 0x9a70, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IDirectDrawStreamSample : public IStreamSample
{
virtual HRESULT STDMETHODCALLTYPE GetSurface(
IDirectDrawSurface** ppDirectDrawSurface,
RECT* pRect) = 0;
virtual HRESULT STDMETHODCALLTYPE SetRect(
const RECT* pRect) = 0;
};
#else
typedef struct IDirectDrawStreamSampleVtbl IDirectDrawStreamSampleVtbl;
struct IDirectDrawStreamSample {
const IDirectDrawStreamSampleVtbl* lpVtbl;
};
struct IDirectDrawStreamSampleVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IDirectDrawStreamSample* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IDirectDrawStreamSample* This);
ULONG (STDMETHODCALLTYPE *Release)(
IDirectDrawStreamSample* This);
/*** IStreamSample methods ***/
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IDirectDrawStreamSample* This,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *GetSampleTimes)(
IDirectDrawStreamSample* This,
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime);
HRESULT (STDMETHODCALLTYPE *SetSampleTimes)(
IDirectDrawStreamSample* This,
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime);
HRESULT (STDMETHODCALLTYPE *Update)(
IDirectDrawStreamSample* This,
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData);
HRESULT (STDMETHODCALLTYPE *CompletionStatus)(
IDirectDrawStreamSample* This,
DWORD dwFlags,
DWORD dwMilliseconds);
/*** IDirectDrawStreamSample methods ***/
HRESULT (STDMETHODCALLTYPE *GetSurface)(
IDirectDrawStreamSample* This,
IDirectDrawSurface** ppDirectDrawSurface,
RECT* pRect);
HRESULT (STDMETHODCALLTYPE *SetRect)(
IDirectDrawStreamSample* This,
const RECT* pRect);
};
/*** IUnknown methods ***/
#define IDirectDrawStreamSample_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawStreamSample_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawStreamSample_Release(p) (p)->lpVtbl->Release(p)
/*** IStreamSample methods ***/
#define IDirectDrawStreamSample_GetMediaStream(p,a) (p)->lpVtbl->GetMediaStream(p,a)
#define IDirectDrawStreamSample_GetSampleTimes(p,a,b,c) (p)->lpVtbl->GetSampleTimes(p,a,b,c)
#define IDirectDrawStreamSample_SetSampleTimes(p,a,b) (p)->lpVtbl->SetSampleTimes(p,a,b)
#define IDirectDrawStreamSample_Update(p,a,b,c,d) (p)->lpVtbl->Update(p,a,b,c,d)
#define IDirectDrawStreamSample_CompletionStatus(p,a,b) (p)->lpVtbl->CompletionStatus(p,a,b)
/*** IDirectDrawStreamSample methods ***/
#define IDirectDrawStreamSample_GetSurface(p,a,b) (p)->lpVtbl->GetSurface(p,a,b)
#define IDirectDrawStreamSample_SetRect(p,a) (p)->lpVtbl->SetRect(p,a)
#endif
#define IDirectDrawStreamSample_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IStreamSample methods ***/ \
STDMETHOD_(HRESULT,GetMediaStream)(THIS_ IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,GetSampleTimes)(THIS_ STREAM_TIME* pStartTime, STREAM_TIME* pEndTime, STREAM_TIME* pCurrentTime) PURE; \
STDMETHOD_(HRESULT,SetSampleTimes)(THIS_ const STREAM_TIME* pStartTime, const STREAM_TIME* pEndTime) PURE; \
STDMETHOD_(HRESULT,Update)(THIS_ DWORD dwFlags, HANDLE hEvent, PAPCFUNC pfnAPC, DWORD dwAPCData) PURE; \
STDMETHOD_(HRESULT,CompletionStatus)(THIS_ DWORD dwFlags, DWORD dwMilliseconds) PURE; \
/*** IDirectDrawStreamSample methods ***/ \
STDMETHOD_(HRESULT,GetSurface)(THIS_ IDirectDrawSurface** ppDirectDrawSurface, RECT* pRect) PURE; \
STDMETHOD_(HRESULT,SetRect)(THIS_ const RECT* pRect) PURE;
HRESULT CALLBACK IDirectDrawStreamSample_GetSurface_Proxy(
IDirectDrawStreamSample* This,
IDirectDrawSurface** ppDirectDrawSurface,
RECT* pRect);
void __RPC_STUB IDirectDrawStreamSample_GetSurface_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IDirectDrawStreamSample_SetRect_Proxy(
IDirectDrawStreamSample* This,
const RECT* pRect);
void __RPC_STUB IDirectDrawStreamSample_SetRect_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IDirectDrawStreamSample_INTERFACE_DEFINED__ */
#ifdef __cplusplus
}
#endif
#endif /* __WIDL_DDSTREAM_H */
/*
* Copyright 2004 Christian Costa
*
* 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
*/
import "unknwn.idl";
import "mmstream.idl";
cpp_quote("#ifndef __WINE_DDRAW_H")
typedef void * LPDDSURFACEDESC;
typedef struct tDDSURFACEDESC DDSURFACEDESC;
interface IDirectDraw;
interface IDirectDrawSurface;
interface IDirectDrawPalette;
cpp_quote("#endif")
cpp_quote("#include <ddraw.h>")
enum {
DDSFF_PROGRESSIVERENDER = 0x00000001
};
interface IDirectDrawMediaStream;
interface IDirectDrawStreamSample;
[
object,
local,
uuid(F4104FCE-9A70-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IDirectDrawMediaStream : IMediaStream
{
HRESULT GetFormat(
[out] /*[optional]*/ DDSURFACEDESC *pDDSDCurrent,
[out] /*[optional]*/ IDirectDrawPalette **ppDirectDrawPalette,
[out] /*[optional]*/ DDSURFACEDESC *pDDSDDesired,
[out] /*[optional]*/ DWORD *pdwFlags);
HRESULT SetFormat(
[in] const DDSURFACEDESC *pDDSurfaceDesc,
[in] /*[optional]*/ IDirectDrawPalette *pDirectDrawPalette);
HRESULT GetDirectDraw(
[out] IDirectDraw **ppDirectDraw);
HRESULT SetDirectDraw(
[in] IDirectDraw *pDirectDraw);
HRESULT CreateSample(
[in] /*[optional]*/ IDirectDrawSurface *pSurface,
[in] /*[optional]*/ const RECT *pRect,
[in] DWORD dwFlags,
[out] IDirectDrawStreamSample **ppSample);
HRESULT GetTimePerFrame(
[out] STREAM_TIME *pFrameTime);
};
[
object,
local,
uuid(F4104FCF-9A70-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IDirectDrawStreamSample : IStreamSample
{
HRESULT GetSurface(
[out] /*[optional]*/ IDirectDrawSurface ** ppDirectDrawSurface,
[out] /*[optional]*/ RECT * pRect);
HRESULT SetRect(
[in] const RECT * pRect);
};
/*** Autogenerated by WIDL 0.1 from mmstream.idl - Do not edit ***/
#include <rpc.h>
#include <rpcndr.h>
#ifndef __WIDL_MMSTREAM_H
#define __WIDL_MMSTREAM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <unknwn.h>
#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)
#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)
#define MS_S_PENDING MS_SUCCESS_CODE(1)
#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)
#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)
#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)
#define MS_E_PURPOSEID MS_ERROR_CODE(2)
#define MS_E_NOSTREAM MS_ERROR_CODE(3)
#define MS_E_NOSEEKING MS_ERROR_CODE(4)
#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)
#define MS_E_BUSY MS_ERROR_CODE(6)
#define MS_E_NOTINIT MS_ERROR_CODE(7)
#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)
#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)
#define MS_E_NOTRUNNING MS_ERROR_CODE(10)
DEFINE_GUID(MSPID_PrimaryVideo, 0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
DEFINE_GUID(MSPID_PrimaryAudio, 0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
#if 0
typedef void *PAPCFUNC;
#endif
typedef LONGLONG STREAM_TIME;
typedef GUID MSPID;
typedef REFGUID REFMSPID;
typedef enum {
STREAMTYPE_READ = 0,
STREAMTYPE_WRITE = 1,
STREAMTYPE_TRANSFORM = 2
} STREAM_TYPE;
typedef enum {
STREAMSTATE_STOP = 0,
STREAMSTATE_RUN = 1
} STREAM_STATE;
typedef enum {
COMPSTAT_NOUPDATEOK = 0x1,
COMPSTAT_WAIT = 0x2,
COMPSTAT_ABORT = 0x4
} COMPLETION_STATUS_FLAGS;
enum {
MMSSF_HASCLOCK = 0x1,
MMSSF_SUPPORTSEEK = 0x2,
MMSSF_ASYNCHRONOUS = 0x4
};
enum {
SSUPDATE_ASYNC = 0x1,
SSUPDATE_CONTINUOUS = 0x2
};
#ifndef __IMultiMediaStream_FWD_DEFINED__
#define __IMultiMediaStream_FWD_DEFINED__
typedef struct IMultiMediaStream IMultiMediaStream;
#endif
#ifndef __IMediaStream_FWD_DEFINED__
#define __IMediaStream_FWD_DEFINED__
typedef struct IMediaStream IMediaStream;
#endif
#ifndef __IStreamSample_FWD_DEFINED__
#define __IStreamSample_FWD_DEFINED__
typedef struct IStreamSample IStreamSample;
#endif
/*****************************************************************************
* IMultiMediaStream interface
*/
#ifndef __IMultiMediaStream_INTERFACE_DEFINED__
#define __IMultiMediaStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IMultiMediaStream, 0xb502d1bc, 0x9a57, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMultiMediaStream : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetInformation(
char* pdwFlags,
STREAM_TYPE* pStreamType) = 0;
virtual HRESULT STDMETHODCALLTYPE GetMediaStream(
REFMSPID idPurpose,
IMediaStream** ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE EnumMediaStreams(
long Index,
IMediaStream** ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetState(
STREAM_STATE* pCurrentState) = 0;
virtual HRESULT STDMETHODCALLTYPE SetState(
STREAM_STATE NewState) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTime(
STREAM_TIME* pCurrentTime) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDuration(
STREAM_TIME* pDuration) = 0;
virtual HRESULT STDMETHODCALLTYPE Seek(
STREAM_TIME SeekTime) = 0;
virtual HRESULT STDMETHODCALLTYPE GetEndOfStreamEventHandle(
HANDLE* phEOS) = 0;
};
#else
typedef struct IMultiMediaStreamVtbl IMultiMediaStreamVtbl;
struct IMultiMediaStream {
const IMultiMediaStreamVtbl* lpVtbl;
};
struct IMultiMediaStreamVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IMultiMediaStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IMultiMediaStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IMultiMediaStream* This);
/*** IMultiMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IMultiMediaStream* This,
char* pdwFlags,
STREAM_TYPE* pStreamType);
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IMultiMediaStream* This,
REFMSPID idPurpose,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *EnumMediaStreams)(
IMultiMediaStream* This,
long Index,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *GetState)(
IMultiMediaStream* This,
STREAM_STATE* pCurrentState);
HRESULT (STDMETHODCALLTYPE *SetState)(
IMultiMediaStream* This,
STREAM_STATE NewState);
HRESULT (STDMETHODCALLTYPE *GetTime)(
IMultiMediaStream* This,
STREAM_TIME* pCurrentTime);
HRESULT (STDMETHODCALLTYPE *GetDuration)(
IMultiMediaStream* This,
STREAM_TIME* pDuration);
HRESULT (STDMETHODCALLTYPE *Seek)(
IMultiMediaStream* This,
STREAM_TIME SeekTime);
HRESULT (STDMETHODCALLTYPE *GetEndOfStreamEventHandle)(
IMultiMediaStream* This,
HANDLE* phEOS);
};
/*** IUnknown methods ***/
#define IMultiMediaStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IMultiMediaStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IMultiMediaStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMultiMediaStream methods ***/
#define IMultiMediaStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IMultiMediaStream_GetMediaStream(p,a,b) (p)->lpVtbl->GetMediaStream(p,a,b)
#define IMultiMediaStream_EnumMediaStreams(p,a,b) (p)->lpVtbl->EnumMediaStreams(p,a,b)
#define IMultiMediaStream_GetState(p,a) (p)->lpVtbl->GetState(p,a)
#define IMultiMediaStream_SetState(p,a) (p)->lpVtbl->SetState(p,a)
#define IMultiMediaStream_GetTime(p,a) (p)->lpVtbl->GetTime(p,a)
#define IMultiMediaStream_GetDuration(p,a) (p)->lpVtbl->GetDuration(p,a)
#define IMultiMediaStream_Seek(p,a) (p)->lpVtbl->Seek(p,a)
#define IMultiMediaStream_GetEndOfStreamEventHandle(p,a) (p)->lpVtbl->GetEndOfStreamEventHandle(p,a)
#endif
#define IMultiMediaStream_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMultiMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetInformation)(THIS_ char* pdwFlags, STREAM_TYPE* pStreamType) PURE; \
STDMETHOD_(HRESULT,GetMediaStream)(THIS_ REFMSPID idPurpose, IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,EnumMediaStreams)(THIS_ long Index, IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,GetState)(THIS_ STREAM_STATE* pCurrentState) PURE; \
STDMETHOD_(HRESULT,SetState)(THIS_ STREAM_STATE NewState) PURE; \
STDMETHOD_(HRESULT,GetTime)(THIS_ STREAM_TIME* pCurrentTime) PURE; \
STDMETHOD_(HRESULT,GetDuration)(THIS_ STREAM_TIME* pDuration) PURE; \
STDMETHOD_(HRESULT,Seek)(THIS_ STREAM_TIME SeekTime) PURE; \
STDMETHOD_(HRESULT,GetEndOfStreamEventHandle)(THIS_ HANDLE* phEOS) PURE;
HRESULT CALLBACK IMultiMediaStream_GetInformation_Proxy(
IMultiMediaStream* This,
char* pdwFlags,
STREAM_TYPE* pStreamType);
void __RPC_STUB IMultiMediaStream_GetInformation_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetMediaStream_Proxy(
IMultiMediaStream* This,
REFMSPID idPurpose,
IMediaStream** ppMediaStream);
void __RPC_STUB IMultiMediaStream_GetMediaStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_EnumMediaStreams_Proxy(
IMultiMediaStream* This,
long Index,
IMediaStream** ppMediaStream);
void __RPC_STUB IMultiMediaStream_EnumMediaStreams_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetState_Proxy(
IMultiMediaStream* This,
STREAM_STATE* pCurrentState);
void __RPC_STUB IMultiMediaStream_GetState_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_SetState_Proxy(
IMultiMediaStream* This,
STREAM_STATE NewState);
void __RPC_STUB IMultiMediaStream_SetState_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetTime_Proxy(
IMultiMediaStream* This,
STREAM_TIME* pCurrentTime);
void __RPC_STUB IMultiMediaStream_GetTime_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetDuration_Proxy(
IMultiMediaStream* This,
STREAM_TIME* pDuration);
void __RPC_STUB IMultiMediaStream_GetDuration_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_Seek_Proxy(
IMultiMediaStream* This,
STREAM_TIME SeekTime);
void __RPC_STUB IMultiMediaStream_Seek_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMultiMediaStream_GetEndOfStreamEventHandle_Proxy(
IMultiMediaStream* This,
HANDLE* phEOS);
void __RPC_STUB IMultiMediaStream_GetEndOfStreamEventHandle_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IMultiMediaStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IMediaStream interface
*/
#ifndef __IMediaStream_INTERFACE_DEFINED__
#define __IMediaStream_INTERFACE_DEFINED__
DEFINE_GUID(IID_IMediaStream, 0xb502d1bd, 0x9a57, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMediaStream : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetMultiMediaStream(
IMultiMediaStream** ppMultiMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInformation(
MSPID* pPurposeId,
STREAM_TYPE* pType) = 0;
virtual HRESULT STDMETHODCALLTYPE SetSameFormat(
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE AllocateSample(
DWORD dwFlags,
IStreamSample** ppSample) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateSharedSample(
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample) = 0;
virtual HRESULT STDMETHODCALLTYPE SendEndOfStream(
DWORD dwFlags) = 0;
};
#else
typedef struct IMediaStreamVtbl IMediaStreamVtbl;
struct IMediaStream {
const IMediaStreamVtbl* lpVtbl;
};
struct IMediaStreamVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IMediaStream* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IMediaStream* This);
ULONG (STDMETHODCALLTYPE *Release)(
IMediaStream* This);
/*** IMediaStream methods ***/
HRESULT (STDMETHODCALLTYPE *GetMultiMediaStream)(
IMediaStream* This,
IMultiMediaStream** ppMultiMediaStream);
HRESULT (STDMETHODCALLTYPE *GetInformation)(
IMediaStream* This,
MSPID* pPurposeId,
STREAM_TYPE* pType);
HRESULT (STDMETHODCALLTYPE *SetSameFormat)(
IMediaStream* This,
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags);
HRESULT (STDMETHODCALLTYPE *AllocateSample)(
IMediaStream* This,
DWORD dwFlags,
IStreamSample** ppSample);
HRESULT (STDMETHODCALLTYPE *CreateSharedSample)(
IMediaStream* This,
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample);
HRESULT (STDMETHODCALLTYPE *SendEndOfStream)(
IMediaStream* This,
DWORD dwFlags);
};
/*** IUnknown methods ***/
#define IMediaStream_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IMediaStream_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IMediaStream_Release(p) (p)->lpVtbl->Release(p)
/*** IMediaStream methods ***/
#define IMediaStream_GetMultiMediaStream(p,a) (p)->lpVtbl->GetMultiMediaStream(p,a)
#define IMediaStream_GetInformation(p,a,b) (p)->lpVtbl->GetInformation(p,a,b)
#define IMediaStream_SetSameFormat(p,a,b) (p)->lpVtbl->SetSameFormat(p,a,b)
#define IMediaStream_AllocateSample(p,a,b) (p)->lpVtbl->AllocateSample(p,a,b)
#define IMediaStream_CreateSharedSample(p,a,b,c) (p)->lpVtbl->CreateSharedSample(p,a,b,c)
#define IMediaStream_SendEndOfStream(p,a) (p)->lpVtbl->SendEndOfStream(p,a)
#endif
#define IMediaStream_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IMediaStream methods ***/ \
STDMETHOD_(HRESULT,GetMultiMediaStream)(THIS_ IMultiMediaStream** ppMultiMediaStream) PURE; \
STDMETHOD_(HRESULT,GetInformation)(THIS_ MSPID* pPurposeId, STREAM_TYPE* pType) PURE; \
STDMETHOD_(HRESULT,SetSameFormat)(THIS_ IMediaStream* pStreamThatHasDesiredFormat, DWORD dwFlags) PURE; \
STDMETHOD_(HRESULT,AllocateSample)(THIS_ DWORD dwFlags, IStreamSample** ppSample) PURE; \
STDMETHOD_(HRESULT,CreateSharedSample)(THIS_ IStreamSample* pExistingSample, DWORD dwFlags, IStreamSample** ppNewSample) PURE; \
STDMETHOD_(HRESULT,SendEndOfStream)(THIS_ DWORD dwFlags) PURE;
HRESULT CALLBACK IMediaStream_GetMultiMediaStream_Proxy(
IMediaStream* This,
IMultiMediaStream** ppMultiMediaStream);
void __RPC_STUB IMediaStream_GetMultiMediaStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_GetInformation_Proxy(
IMediaStream* This,
MSPID* pPurposeId,
STREAM_TYPE* pType);
void __RPC_STUB IMediaStream_GetInformation_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_SetSameFormat_Proxy(
IMediaStream* This,
IMediaStream* pStreamThatHasDesiredFormat,
DWORD dwFlags);
void __RPC_STUB IMediaStream_SetSameFormat_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_AllocateSample_Proxy(
IMediaStream* This,
DWORD dwFlags,
IStreamSample** ppSample);
void __RPC_STUB IMediaStream_AllocateSample_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_CreateSharedSample_Proxy(
IMediaStream* This,
IStreamSample* pExistingSample,
DWORD dwFlags,
IStreamSample** ppNewSample);
void __RPC_STUB IMediaStream_CreateSharedSample_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IMediaStream_SendEndOfStream_Proxy(
IMediaStream* This,
DWORD dwFlags);
void __RPC_STUB IMediaStream_SendEndOfStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IMediaStream_INTERFACE_DEFINED__ */
/*****************************************************************************
* IStreamSample interface
*/
#ifndef __IStreamSample_INTERFACE_DEFINED__
#define __IStreamSample_INTERFACE_DEFINED__
DEFINE_GUID(IID_IStreamSample, 0xb502d1be, 0x9a57, 0x11d0, 0x8f,0xde, 0x00,0xc0,0x4f,0xd9,0x18,0x9d);
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IStreamSample : public IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetMediaStream(
IMediaStream** ppMediaStream) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSampleTimes(
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime) = 0;
virtual HRESULT STDMETHODCALLTYPE SetSampleTimes(
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime) = 0;
virtual HRESULT STDMETHODCALLTYPE Update(
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData) = 0;
virtual HRESULT STDMETHODCALLTYPE CompletionStatus(
DWORD dwFlags,
DWORD dwMilliseconds) = 0;
};
#else
typedef struct IStreamSampleVtbl IStreamSampleVtbl;
struct IStreamSample {
const IStreamSampleVtbl* lpVtbl;
};
struct IStreamSampleVtbl {
ICOM_MSVTABLE_COMPAT_FIELDS
/*** IUnknown methods ***/
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
IStreamSample* This,
REFIID riid,
void** ppvObject);
ULONG (STDMETHODCALLTYPE *AddRef)(
IStreamSample* This);
ULONG (STDMETHODCALLTYPE *Release)(
IStreamSample* This);
/*** IStreamSample methods ***/
HRESULT (STDMETHODCALLTYPE *GetMediaStream)(
IStreamSample* This,
IMediaStream** ppMediaStream);
HRESULT (STDMETHODCALLTYPE *GetSampleTimes)(
IStreamSample* This,
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime);
HRESULT (STDMETHODCALLTYPE *SetSampleTimes)(
IStreamSample* This,
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime);
HRESULT (STDMETHODCALLTYPE *Update)(
IStreamSample* This,
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData);
HRESULT (STDMETHODCALLTYPE *CompletionStatus)(
IStreamSample* This,
DWORD dwFlags,
DWORD dwMilliseconds);
};
/*** IUnknown methods ***/
#define IStreamSample_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IStreamSample_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IStreamSample_Release(p) (p)->lpVtbl->Release(p)
/*** IStreamSample methods ***/
#define IStreamSample_GetMediaStream(p,a) (p)->lpVtbl->GetMediaStream(p,a)
#define IStreamSample_GetSampleTimes(p,a,b,c) (p)->lpVtbl->GetSampleTimes(p,a,b,c)
#define IStreamSample_SetSampleTimes(p,a,b) (p)->lpVtbl->SetSampleTimes(p,a,b)
#define IStreamSample_Update(p,a,b,c,d) (p)->lpVtbl->Update(p,a,b,c,d)
#define IStreamSample_CompletionStatus(p,a,b) (p)->lpVtbl->CompletionStatus(p,a,b)
#endif
#define IStreamSample_METHODS \
ICOM_MSVTABLE_COMPAT_FIELDS \
/*** IUnknown methods ***/ \
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
STDMETHOD_(ULONG,Release)(THIS) PURE; \
/*** IStreamSample methods ***/ \
STDMETHOD_(HRESULT,GetMediaStream)(THIS_ IMediaStream** ppMediaStream) PURE; \
STDMETHOD_(HRESULT,GetSampleTimes)(THIS_ STREAM_TIME* pStartTime, STREAM_TIME* pEndTime, STREAM_TIME* pCurrentTime) PURE; \
STDMETHOD_(HRESULT,SetSampleTimes)(THIS_ const STREAM_TIME* pStartTime, const STREAM_TIME* pEndTime) PURE; \
STDMETHOD_(HRESULT,Update)(THIS_ DWORD dwFlags, HANDLE hEvent, PAPCFUNC pfnAPC, DWORD dwAPCData) PURE; \
STDMETHOD_(HRESULT,CompletionStatus)(THIS_ DWORD dwFlags, DWORD dwMilliseconds) PURE;
HRESULT CALLBACK IStreamSample_GetMediaStream_Proxy(
IStreamSample* This,
IMediaStream** ppMediaStream);
void __RPC_STUB IStreamSample_GetMediaStream_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IStreamSample_GetSampleTimes_Proxy(
IStreamSample* This,
STREAM_TIME* pStartTime,
STREAM_TIME* pEndTime,
STREAM_TIME* pCurrentTime);
void __RPC_STUB IStreamSample_GetSampleTimes_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IStreamSample_SetSampleTimes_Proxy(
IStreamSample* This,
const STREAM_TIME* pStartTime,
const STREAM_TIME* pEndTime);
void __RPC_STUB IStreamSample_SetSampleTimes_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IStreamSample_Update_Proxy(
IStreamSample* This,
DWORD dwFlags,
HANDLE hEvent,
PAPCFUNC pfnAPC,
DWORD dwAPCData);
void __RPC_STUB IStreamSample_Update_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
HRESULT CALLBACK IStreamSample_CompletionStatus_Proxy(
IStreamSample* This,
DWORD dwFlags,
DWORD dwMilliseconds);
void __RPC_STUB IStreamSample_CompletionStatus_Stub(
struct IRpcStubBuffer* This,
struct IRpcChannelBuffer* pRpcChannelBuffer,
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
#endif /* __IStreamSample_INTERFACE_DEFINED__ */
#ifdef __cplusplus
}
#endif
#endif /* __WIDL_MMSTREAM_H */
/*
* Copyright 2004 Christian Costa
*
* 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
*/
import "unknwn.idl";
cpp_quote("#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)")
cpp_quote("#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)")
cpp_quote("#define MS_S_PENDING MS_SUCCESS_CODE(1)")
cpp_quote("#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)")
cpp_quote("#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)")
cpp_quote("#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)")
cpp_quote("#define MS_E_PURPOSEID MS_ERROR_CODE(2)")
cpp_quote("#define MS_E_NOSTREAM MS_ERROR_CODE(3)")
cpp_quote("#define MS_E_NOSEEKING MS_ERROR_CODE(4)")
cpp_quote("#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)")
cpp_quote("#define MS_E_BUSY MS_ERROR_CODE(6)")
cpp_quote("#define MS_E_NOTINIT MS_ERROR_CODE(7)")
cpp_quote("#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)")
cpp_quote("#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)")
cpp_quote("#define MS_E_NOTRUNNING MS_ERROR_CODE(10)")
cpp_quote("DEFINE_GUID(MSPID_PrimaryVideo, 0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
cpp_quote("DEFINE_GUID(MSPID_PrimaryAudio, 0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
cpp_quote("#if 0")
typedef void* PAPCFUNC;
cpp_quote("#endif")
typedef LONGLONG STREAM_TIME;
typedef GUID MSPID;
typedef REFGUID REFMSPID;
typedef enum {
STREAMTYPE_READ = 0,
STREAMTYPE_WRITE = 1,
STREAMTYPE_TRANSFORM = 2
} STREAM_TYPE;
typedef enum {
STREAMSTATE_STOP = 0,
STREAMSTATE_RUN = 1
} STREAM_STATE;
typedef enum {
COMPSTAT_NOUPDATEOK = 0x00000001,
COMPSTAT_WAIT = 0x00000002,
COMPSTAT_ABORT = 0x00000004
} COMPLETION_STATUS_FLAGS;
enum {
MMSSF_HASCLOCK = 0x00000001,
MMSSF_SUPPORTSEEK = 0x00000002,
MMSSF_ASYNCHRONOUS = 0x00000004
};
enum {
SSUPDATE_ASYNC = 0x00000001,
SSUPDATE_CONTINUOUS = 0x00000002
};
interface IMultiMediaStream;
interface IMediaStream;
interface IStreamSample;
[
object,
local,
uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IMultiMediaStream : IUnknown {
HRESULT GetInformation(
[out] /*[optional]*/ char *pdwFlags,
[out] /*[optional]*/ STREAM_TYPE *pStreamType);
HRESULT GetMediaStream(
[in] REFMSPID idPurpose,
[out] IMediaStream **ppMediaStream);
HRESULT EnumMediaStreams(
[in] long Index,
[out] IMediaStream **ppMediaStream);
HRESULT GetState(
[out] STREAM_STATE *pCurrentState);
HRESULT SetState(
[in] STREAM_STATE NewState);
HRESULT GetTime(
[out] STREAM_TIME *pCurrentTime);
HRESULT GetDuration(
[out] STREAM_TIME *pDuration);
HRESULT Seek(
[in] STREAM_TIME SeekTime);
HRESULT GetEndOfStreamEventHandle(
[out] HANDLE *phEOS);
};
[
object,
uuid(B502D1BD-9A57-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IMediaStream : IUnknown {
HRESULT GetMultiMediaStream(
[out] IMultiMediaStream **ppMultiMediaStream);
HRESULT GetInformation(
[out] /*[optional]*/ MSPID *pPurposeId,
[out] /*[optional]*/ STREAM_TYPE *pType);
HRESULT SetSameFormat(
[in] IMediaStream *pStreamThatHasDesiredFormat,
[in] DWORD dwFlags);
HRESULT AllocateSample(
[in] DWORD dwFlags,
[out] IStreamSample **ppSample);
HRESULT CreateSharedSample(
[in] IStreamSample *pExistingSample,
[in] DWORD dwFlags,
[out] IStreamSample **ppNewSample);
HRESULT SendEndOfStream(DWORD dwFlags);
};
[
object,
local,
uuid(B502D1BE-9A57-11d0-8FDE-00C04FD9189D),
pointer_default(unique)
]
interface IStreamSample : IUnknown {
HRESULT GetMediaStream(
[in] IMediaStream **ppMediaStream);
HRESULT GetSampleTimes(
[out] /*[optional]*/ STREAM_TIME * pStartTime,
[out] /*[optional]*/ STREAM_TIME * pEndTime,
[out] /*[optional]*/ STREAM_TIME * pCurrentTime);
HRESULT SetSampleTimes(
[in] /*[optional]*/ const STREAM_TIME *pStartTime,
[in] /*[optional]*/ const STREAM_TIME *pEndTime);
HRESULT Update(
[in] DWORD dwFlags,
[in] /*[optional]*/ HANDLE hEvent,
[in] /*[optional]*/ PAPCFUNC pfnAPC,
[in] /*[optional]*/ DWORD dwAPCData);
HRESULT CompletionStatus(
[in] DWORD dwFlags,
[in] /*[optional]*/ DWORD dwMilliseconds);
};
......@@ -1969,6 +1969,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
[RegisterDllsSection]
11,,avifil32.dll,1
11,,amstream.dll,1
11,,comcat.dll,1
11,,ddraw.dll,1
11,,devenum.dll,1
......
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