Commit 168ca6ee authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

avifil32: Register proxy interfaces.

Based on a patch by Dmitry Timoshkov. Signed-off-by: 's avatarAlistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 57a8a33a
MODULE = avifil32.dll
IMPORTLIB = avifil32
IMPORTS = uuid msacm32 msvfw32 winmm ole32 user32 advapi32
IMPORTS = uuid msacm32 msvfw32 winmm ole32 user32 advapi32 rpcrt4
C_SRCS = \
acmstream.c \
......@@ -17,3 +17,5 @@ C_SRCS = \
IDL_SRCS = avifil32.idl
RC_SRCS = avifil32.rc
dlldata_EXTRADEFS = -DENTRY_PREFIX=avifil32_
......@@ -18,8 +18,84 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep proxy
#pragma makedep register
import "wtypes.idl";
import "unknwn.idl";
typedef struct _AVISTREAMINFOW
{
DWORD fccType;
DWORD fccHandler;
DWORD dwFlags;
DWORD dwCaps;
WORD wPriority;
WORD wLanguage;
DWORD dwScale;
DWORD dwRate;
DWORD dwStart;
DWORD dwLength;
DWORD dwInitialFrames;
DWORD dwSuggestedBufferSize;
DWORD dwQuality;
DWORD dwSampleSize;
RECT rcFrame;
DWORD dwEditCount;
DWORD dwFormatChangeCount;
WCHAR szName[64];
} AVISTREAMINFOW;
[
object,
uuid(00020021-0000-0000-c000-000000000046)
]
interface IAVIStream : IUnknown
{
HRESULT Create(LPARAM lParam1, LPARAM lParam2);
HRESULT Info(AVISTREAMINFOW *psi, LONG lSize);
LONG FindSample(LONG lPos, LONG lFlags);
HRESULT ReadFormat(LONG lPos, [out,size_is(*lpcbFormat)] char *lpFormat, [in,out] LONG *lpcbFormat);
HRESULT SetFormat(LONG lPos, [in,size_is(cbFormat)] char *lpFormat, LONG cbFormat);
HRESULT Read(LONG lStart, LONG lSamples, [out,size_is(cbBuffer)] char *lpBuffer, LONG cbBuffer, LONG *plBytes, LONG *plSamples);
HRESULT Write(LONG lStart, LONG lSamples, [in,size_is(cbBuffer)] char *lpBuffer, LONG cbBuffer, DWORD dwFlags, LONG *plSampWritten, LONG *plBytesWritten);
HRESULT Delete(LONG lStart, LONG lSamples);
HRESULT ReadData(DWORD fcc, [out,size_is(*lpcbBuffer)] char *lpBuffer, [in,out] LONG *lpcbBuffer);
HRESULT WriteData(DWORD fcc, [in,size_is(cbBuffer)] char *lpBuffer, LONG cbBuffer);
HRESULT SetInfo(AVISTREAMINFOW *plInfo, LONG cbInfo);
};
typedef struct _AVIFILEINFOW
{
DWORD dwMaxBytesPerSec;
DWORD dwFlags;
DWORD dwCaps;
DWORD dwStreams;
DWORD dwSuggestedBufferSize;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwScale;
DWORD dwRate;
DWORD dwLength;
DWORD dwEditCount;
WCHAR szFileType[64];
} AVIFILEINFOW;
[
object,
uuid(00020020-0000-0000-c000-000000000046)
]
interface IAVIFile : IUnknown
{
HRESULT Info(AVIFILEINFOW *pfi, LONG lSize);
HRESULT GetStream(IAVIStream **ppStream, DWORD fccType, LONG lParam);
HRESULT CreateStream(IAVIStream **ppStream, AVISTREAMINFOW *psi);
HRESULT WriteData(DWORD fcc, [in,size_is(cbBuffer)] char *lpBuffer, LONG cbBuffer);
HRESULT ReadData(DWORD fcc, [out,size_is(*lpcbBuffer)] char *lpBuffer, [in,out] LONG *lpcbBuffer);
HRESULT EndRecord(void);
HRESULT DeleteStream(DWORD fccType, LONG lParam);
};
[
helpstring("Microsoft AVI Files"),
threading(both),
......@@ -46,7 +122,7 @@ coclass WAVFile { interface IAVIFile; }
threading(both),
uuid(0002000d-0000-0000-c000-000000000046)
]
coclass AVIProxy { }
coclass PSFactoryBuffer { interface IFactoryBuffer; }
[
helpstring("ACM Compressed Audio Stream"),
......
......@@ -66,5 +66,6 @@ extern PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pstream) DECLSPEC_HIDDEN;
extern PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, const PAVISTREAM *ppStreams) DECLSPEC_HIDDEN;
extern LPCWSTR AVIFILE_BasenameW(LPCWSTR szFileName) DECLSPEC_HIDDEN;
extern HRESULT WINAPI avifil32_DllGetClassObject(REFCLSID pclsid, REFIID piid, LPVOID *ppv) DECLSPEC_HIDDEN;
#endif
......@@ -182,12 +182,18 @@ LPCWSTR AVIFILE_BasenameW(LPCWSTR szPath)
*/
HRESULT WINAPI DllGetClassObject(REFCLSID pclsid, REFIID piid, LPVOID *ppv)
{
HRESULT hr;
TRACE("(%s,%s,%p)\n", debugstr_guid(pclsid), debugstr_guid(piid), ppv);
if (pclsid == NULL || piid == NULL || ppv == NULL)
return E_FAIL;
return AVIFILE_CreateClassFactory(pclsid,piid,ppv);
hr = AVIFILE_CreateClassFactory(pclsid,piid,ppv);
if (SUCCEEDED(hr))
return hr;
return avifil32_DllGetClassObject(pclsid,piid,ppv);
}
/*****************************************************************************
......
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