mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 13:34:53 +00:00
[AVIFIL32] Sync with Wine Staging 3.3. CORE-14434
This commit is contained in:
parent
0aba4966ff
commit
44836a6e12
|
@ -5,6 +5,7 @@ add_definitions(-D_WIN32_WINNT=0x600)
|
||||||
add_definitions(-D__WINESRC__ -DENTRY_PREFIX=avifil32_)
|
add_definitions(-D__WINESRC__ -DENTRY_PREFIX=avifil32_)
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
|
||||||
spec2def(avifil32.dll avifil32.spec ADD_IMPORTLIB)
|
spec2def(avifil32.dll avifil32.spec ADD_IMPORTLIB)
|
||||||
|
add_rpcproxy_files(avifil32.idl)
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
acmstream.c
|
acmstream.c
|
||||||
|
@ -17,16 +18,18 @@ list(APPEND SOURCE
|
||||||
icmstream.c
|
icmstream.c
|
||||||
tmpfile.c
|
tmpfile.c
|
||||||
wavfile.c
|
wavfile.c
|
||||||
avifile_private.h)
|
${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
|
||||||
|
precomp.h)
|
||||||
|
|
||||||
add_library(avifil32 SHARED
|
add_library(avifil32 SHARED
|
||||||
${SOURCE}
|
${SOURCE}
|
||||||
guid.c
|
guid.c
|
||||||
rsrc.rc
|
rsrc.rc
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/avifil32_p.c
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/avifil32.def)
|
${CMAKE_CURRENT_BINARY_DIR}/avifil32.def)
|
||||||
|
|
||||||
set_module_type(avifil32 win32dll)
|
set_module_type(avifil32 win32dll)
|
||||||
target_link_libraries(avifil32 wine ${PSEH_LIB})
|
target_link_libraries(avifil32 wine ${PSEH_LIB})
|
||||||
add_importlibs(avifil32 msacm32 msvfw32 winmm ole32 user32 advapi32 rpcrt4 msvcrt kernel32 ntdll)
|
add_importlibs(avifil32 msacm32 msvfw32 winmm ole32 user32 advapi32 rpcrt4 msvcrt kernel32 ntdll)
|
||||||
add_pch(avifil32 avifile_private.h SOURCE)
|
add_pch(avifil32 precomp.h SOURCE)
|
||||||
add_cd_file(TARGET avifil32 DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET avifil32 DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -16,8 +16,24 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "winerror.h"
|
||||||
|
#include "mmsystem.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
#include "msacm.h"
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
typedef struct _IAVIStreamImpl {
|
typedef struct _IAVIStreamImpl {
|
||||||
|
|
|
@ -17,9 +17,31 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "winnls.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "winreg.h"
|
||||||
|
#include "winerror.h"
|
||||||
|
|
||||||
|
#include "ole2.h"
|
||||||
|
#include "shellapi.h"
|
||||||
|
#include "shlobj.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
#include "msacm.h"
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
|
||||||
#include <winreg.h>
|
#include "wine/debug.h"
|
||||||
|
#include "wine/unicode.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* for AVIBuildFilterW -- uses fixed size table
|
* for AVIBuildFilterW -- uses fixed size table
|
||||||
|
|
|
@ -18,39 +18,42 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma makedep proxy
|
||||||
#pragma makedep register
|
#pragma makedep register
|
||||||
|
|
||||||
|
#include "avifile_ifaces.idl"
|
||||||
|
|
||||||
|
[
|
||||||
|
helpstring("IAVIStream & IAVIFile Proxy"),
|
||||||
|
threading(both),
|
||||||
|
uuid(0002000d-0000-0000-c000-000000000046)
|
||||||
|
]
|
||||||
|
coclass PSFactoryBuffer { interface IFactoryBuffer; }
|
||||||
|
|
||||||
[
|
[
|
||||||
helpstring("Microsoft AVI Files"),
|
helpstring("Microsoft AVI Files"),
|
||||||
threading(apartment),
|
threading(both),
|
||||||
uuid(00020000-0000-0000-C000-000000000046)
|
uuid(00020000-0000-0000-C000-000000000046)
|
||||||
]
|
]
|
||||||
coclass AVIFile { interface IAVIFile; }
|
coclass AVIFile { interface IAVIFile; }
|
||||||
|
|
||||||
[
|
[
|
||||||
helpstring("AVI Compressed Stream"),
|
helpstring("AVI Compressed Stream"),
|
||||||
threading(apartment),
|
threading(both),
|
||||||
uuid(00020001-0000-0000-c000-000000000046)
|
uuid(00020001-0000-0000-c000-000000000046)
|
||||||
]
|
]
|
||||||
coclass ICMStream { interface IAVIStream; }
|
coclass ICMStream { interface IAVIStream; }
|
||||||
|
|
||||||
[
|
[
|
||||||
helpstring("Microsoft Wave File"),
|
helpstring("Microsoft Wave File"),
|
||||||
threading(apartment),
|
threading(both),
|
||||||
uuid(00020003-0000-0000-c000-000000000046)
|
uuid(00020003-0000-0000-c000-000000000046)
|
||||||
]
|
]
|
||||||
coclass WAVFile { interface IAVIFile; }
|
coclass WAVFile { interface IAVIFile; }
|
||||||
|
|
||||||
[
|
|
||||||
helpstring("IAVIStream & IAVIFile Proxy"),
|
|
||||||
threading(apartment),
|
|
||||||
uuid(0002000d-0000-0000-c000-000000000046)
|
|
||||||
]
|
|
||||||
coclass AVIProxy { }
|
|
||||||
|
|
||||||
[
|
[
|
||||||
helpstring("ACM Compressed Audio Stream"),
|
helpstring("ACM Compressed Audio Stream"),
|
||||||
threading(apartment),
|
threading(both),
|
||||||
uuid(0002000f-0000-0000-c000-000000000046)
|
uuid(0002000f-0000-0000-c000-000000000046)
|
||||||
]
|
]
|
||||||
coclass ACMStream { interface IAVIStream; }
|
coclass ACMStream { interface IAVIStream; }
|
||||||
|
|
|
@ -30,7 +30,26 @@
|
||||||
* When index is missing it works, but index seems to be okay.
|
* When index is missing it works, but index seems to be okay.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "winnls.h"
|
||||||
|
#include "winerror.h"
|
||||||
|
#include "mmsystem.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
#include "extrachunk.h"
|
||||||
|
|
||||||
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
#ifndef IDX_PER_BLOCK
|
#ifndef IDX_PER_BLOCK
|
||||||
#define IDX_PER_BLOCK 2730
|
#define IDX_PER_BLOCK 2730
|
||||||
|
|
105
dll/win32/avifil32/avifile_ifaces.idl
Normal file
105
dll/win32/avifil32/avifile_ifaces.idl
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
* Proxy support for avifil32
|
||||||
|
*
|
||||||
|
* Copyright 2016 Dmitry Timoshkov
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These interface descriptions are supposed to be used for automatic proxy
|
||||||
|
* generation by an IDL compiler.
|
||||||
|
*
|
||||||
|
* While it's possible to convert include/vfw.h to an .idl, that's proved to
|
||||||
|
* be a major waste of an effort because the resulting interface descriptions
|
||||||
|
* can't be used for automatic proxy generation since they are not compatible
|
||||||
|
* with IDL compiler restrictions for proxies, and fixing them up would make
|
||||||
|
* generated vfw.h source incompatible with PSDK's equivalent.
|
||||||
|
*/
|
||||||
|
|
||||||
|
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);
|
||||||
|
};
|
|
@ -19,27 +19,8 @@
|
||||||
#ifndef __AVIFILE_PRIVATE_H
|
#ifndef __AVIFILE_PRIVATE_H
|
||||||
#define __AVIFILE_PRIVATE_H
|
#define __AVIFILE_PRIVATE_H
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#define WIN32_NO_STATUS
|
|
||||||
#define _INC_WINDOWS
|
|
||||||
#define COM_NO_WINDOWS_H
|
|
||||||
|
|
||||||
#define COBJMACROS
|
|
||||||
|
|
||||||
#include <windef.h>
|
#include <windef.h>
|
||||||
#include <winbase.h>
|
#include <winuser.h>
|
||||||
#include <wingdi.h>
|
|
||||||
#include <vfw.h>
|
|
||||||
|
|
||||||
#include <wine/debug.h>
|
|
||||||
#include <wine/unicode.h>
|
|
||||||
|
|
||||||
#include "extrachunk.h"
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
|
||||||
|
|
||||||
#ifndef MAX_AVISTREAMS
|
#ifndef MAX_AVISTREAMS
|
||||||
#define MAX_AVISTREAMS 8
|
#define MAX_AVISTREAMS 8
|
||||||
|
@ -55,6 +36,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
(lp)->biClrUsed * sizeof(RGBQUAD))
|
(lp)->biClrUsed * sizeof(RGBQUAD))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define IDD_SAVEOPTIONS 0x0100
|
||||||
|
#define IDC_INTERLEAVE 0x0110
|
||||||
|
#define IDC_INTERLEAVEEVERY 0x0111
|
||||||
|
#define IDC_STREAM 0x0112
|
||||||
|
#define IDC_OPTIONS 0x0113
|
||||||
|
#define IDC_FORMATTEXT 0x0114
|
||||||
|
|
||||||
|
#define IDS_WAVESTREAMFORMAT 0x0100
|
||||||
|
#define IDS_WAVEFILETYPE 0x0101
|
||||||
|
#define IDS_ALLMULTIMEDIA 0x0184
|
||||||
|
#define IDS_ALLFILES 0x0185
|
||||||
|
#define IDS_VIDEO 0x0189
|
||||||
|
#define IDS_AUDIO 0x0190
|
||||||
|
#define IDS_AVIFILETYPE 0x0192
|
||||||
|
#define IDS_UNCOMPRESSED 0x0193
|
||||||
|
|
||||||
DEFINE_AVIGUID(CLSID_ICMStream, 0x00020001, 0, 0);
|
DEFINE_AVIGUID(CLSID_ICMStream, 0x00020001, 0, 0);
|
||||||
DEFINE_AVIGUID(CLSID_WAVFile, 0x00020003, 0, 0);
|
DEFINE_AVIGUID(CLSID_WAVFile, 0x00020003, 0, 0);
|
||||||
DEFINE_AVIGUID(CLSID_ACMStream, 0x0002000F, 0, 0);
|
DEFINE_AVIGUID(CLSID_ACMStream, 0x0002000F, 0, 0);
|
||||||
|
@ -69,5 +66,6 @@ extern PGETFRAME AVIFILE_CreateGetFrame(PAVISTREAM pstream) DECLSPEC_HIDDEN;
|
||||||
extern PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, const PAVISTREAM *ppStreams) DECLSPEC_HIDDEN;
|
extern PAVIFILE AVIFILE_CreateAVITempFile(int nStreams, const PAVISTREAM *ppStreams) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
extern LPCWSTR AVIFILE_BasenameW(LPCWSTR szFileName) DECLSPEC_HIDDEN;
|
extern LPCWSTR AVIFILE_BasenameW(LPCWSTR szFileName) DECLSPEC_HIDDEN;
|
||||||
|
extern HRESULT WINAPI avifil32_DllGetClassObject(REFCLSID pclsid, REFIID piid, LPVOID *ppv) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
#endif /* __AVIFILE_PRIVATE_H */
|
#endif
|
||||||
|
|
|
@ -16,7 +16,24 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winerror.h"
|
||||||
|
#include "mmsystem.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
#include "extrachunk.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
#include "initguid.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
|
@ -265,7 +282,6 @@ static ULONG WINAPI IAVIEditStream_fnRelease(IAVIEditStream*iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,17 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "extrachunk.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
/* reads a chunk out of the extrachunk-structure */
|
/* reads a chunk out of the extrachunk-structure */
|
||||||
HRESULT ReadExtraChunk(const EXTRACHUNKS *extra,FOURCC ckid,LPVOID lpData,LPLONG size)
|
HRESULT ReadExtraChunk(const EXTRACHUNKS *extra,FOURCC ckid,LPVOID lpData,LPLONG size)
|
||||||
|
|
|
@ -19,6 +19,12 @@
|
||||||
#ifndef __WINE_EXTRACHUNK_H
|
#ifndef __WINE_EXTRACHUNK_H
|
||||||
#define __WINE_EXTRACHUNK_H
|
#define __WINE_EXTRACHUNK_H
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "mmsystem.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -46,4 +52,4 @@ HRESULT FindChunkAndKeepExtras(LPEXTRACHUNKS extra,HMMIO hmmio,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __WINE_EXTRACHUNK_H */
|
#endif
|
||||||
|
|
|
@ -16,9 +16,25 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "winerror.h"
|
||||||
|
#include "ole2.h"
|
||||||
|
#include "rpcproxy.h"
|
||||||
|
|
||||||
|
#include "initguid.h"
|
||||||
|
#include "vfw.h"
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
|
||||||
#include <rpcproxy.h>
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
HMODULE AVIFILE_hModule = NULL;
|
HMODULE AVIFILE_hModule = NULL;
|
||||||
|
|
||||||
|
@ -166,12 +182,18 @@ LPCWSTR AVIFILE_BasenameW(LPCWSTR szPath)
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI DllGetClassObject(REFCLSID pclsid, REFIID piid, LPVOID *ppv)
|
HRESULT WINAPI DllGetClassObject(REFCLSID pclsid, REFIID piid, LPVOID *ppv)
|
||||||
{
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("(%s,%s,%p)\n", debugstr_guid(pclsid), debugstr_guid(piid), ppv);
|
TRACE("(%s,%s,%p)\n", debugstr_guid(pclsid), debugstr_guid(piid), ppv);
|
||||||
|
|
||||||
if (pclsid == NULL || piid == NULL || ppv == NULL)
|
if (pclsid == NULL || piid == NULL || ppv == NULL)
|
||||||
return E_FAIL;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
|
@ -16,8 +16,20 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
#ifndef DIBPTR
|
#ifndef DIBPTR
|
||||||
#define DIBPTR(lp) ((LPBYTE)(lp) + (lp)->biSize + \
|
#define DIBPTR(lp) ((LPBYTE)(lp) + (lp)->biSize + \
|
||||||
(lp)->biClrUsed * sizeof(RGBQUAD))
|
(lp)->biClrUsed * sizeof(RGBQUAD))
|
||||||
|
@ -122,7 +134,6 @@ static ULONG WINAPI IGetFrame_fnRelease(IGetFrame *iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, iface);
|
HeapFree(GetProcessHeap(), 0, iface);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
|
@ -394,8 +405,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
|
||||||
lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD));
|
lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD));
|
||||||
if (lpbi->biBitCount <= 8)
|
if (lpbi->biBitCount <= 8)
|
||||||
ICDecompressGetPalette(This->hic, This->lpInFormat, This->lpOutFormat);
|
ICDecompressGetPalette(This->hic, This->lpInFormat, This->lpOutFormat);
|
||||||
|
|
||||||
return AVIERR_OK;
|
|
||||||
} else {
|
} else {
|
||||||
if (bBestDisplay) {
|
if (bBestDisplay) {
|
||||||
ICGetDisplayFormat(This->hic, This->lpInFormat,
|
ICGetDisplayFormat(This->hic, This->lpInFormat,
|
||||||
|
@ -405,64 +414,64 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
|
||||||
AVIFILE_CloseCompressor(This);
|
AVIFILE_CloseCompressor(This);
|
||||||
return AVIERR_NOCOMPRESSOR;
|
return AVIERR_NOCOMPRESSOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check output format */
|
|
||||||
if (This->lpOutFormat->biClrUsed == 0 &&
|
|
||||||
This->lpOutFormat->biBitCount <= 8)
|
|
||||||
This->lpOutFormat->biClrUsed = 1u << This->lpOutFormat->biBitCount;
|
|
||||||
if (This->lpOutFormat->biSizeImage == 0 &&
|
|
||||||
This->lpOutFormat->biCompression == BI_RGB) {
|
|
||||||
This->lpOutFormat->biSizeImage =
|
|
||||||
DIBWIDTHBYTES(*This->lpOutFormat) * This->lpOutFormat->biHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lpBits == NULL) {
|
|
||||||
DWORD size = This->lpOutFormat->biClrUsed * sizeof(RGBQUAD);
|
|
||||||
|
|
||||||
size += This->lpOutFormat->biSize + This->lpOutFormat->biSizeImage;
|
|
||||||
This->lpOutFormat = HeapReAlloc(GetProcessHeap(), 0, This->lpOutFormat, size);
|
|
||||||
if (This->lpOutFormat == NULL) {
|
|
||||||
AVIFILE_CloseCompressor(This);
|
|
||||||
return AVIERR_MEMORY;
|
|
||||||
}
|
|
||||||
This->lpOutBuffer = DIBPTR(This->lpOutFormat);
|
|
||||||
} else
|
|
||||||
This->lpOutBuffer = lpBits;
|
|
||||||
|
|
||||||
/* for user size was irrelevant */
|
|
||||||
if (dx == -1)
|
|
||||||
dx = This->lpOutFormat->biWidth;
|
|
||||||
if (dy == -1)
|
|
||||||
dy = This->lpOutFormat->biHeight;
|
|
||||||
|
|
||||||
/* need to resize? */
|
|
||||||
if (x != 0 || y != 0) {
|
|
||||||
if (dy == This->lpOutFormat->biHeight &&
|
|
||||||
dx == This->lpOutFormat->biWidth)
|
|
||||||
This->bResize = FALSE;
|
|
||||||
else
|
|
||||||
This->bResize = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (This->bResize) {
|
|
||||||
This->x = x;
|
|
||||||
This->y = y;
|
|
||||||
This->dx = dx;
|
|
||||||
This->dy = dy;
|
|
||||||
|
|
||||||
if (ICDecompressExBegin(This->hic,0,This->lpInFormat,This->lpInBuffer,0,
|
|
||||||
0,This->lpInFormat->biWidth,
|
|
||||||
This->lpInFormat->biHeight,This->lpOutFormat,
|
|
||||||
This->lpOutBuffer, x, y, dx, dy) == ICERR_OK)
|
|
||||||
return AVIERR_OK;
|
|
||||||
} else if (ICDecompressBegin(This->hic, This->lpInFormat,
|
|
||||||
This->lpOutFormat) == ICERR_OK)
|
|
||||||
return AVIERR_OK;
|
|
||||||
|
|
||||||
AVIFILE_CloseCompressor(This);
|
|
||||||
|
|
||||||
return AVIERR_COMPRESSOR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check output format */
|
||||||
|
if (This->lpOutFormat->biClrUsed == 0 &&
|
||||||
|
This->lpOutFormat->biBitCount <= 8)
|
||||||
|
This->lpOutFormat->biClrUsed = 1u << This->lpOutFormat->biBitCount;
|
||||||
|
if (This->lpOutFormat->biSizeImage == 0 &&
|
||||||
|
This->lpOutFormat->biCompression == BI_RGB) {
|
||||||
|
This->lpOutFormat->biSizeImage =
|
||||||
|
DIBWIDTHBYTES(*This->lpOutFormat) * This->lpOutFormat->biHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lpBits == NULL) {
|
||||||
|
DWORD size = This->lpOutFormat->biClrUsed * sizeof(RGBQUAD);
|
||||||
|
|
||||||
|
size += This->lpOutFormat->biSize + This->lpOutFormat->biSizeImage;
|
||||||
|
This->lpOutFormat = HeapReAlloc(GetProcessHeap(), 0, This->lpOutFormat, size);
|
||||||
|
if (This->lpOutFormat == NULL) {
|
||||||
|
AVIFILE_CloseCompressor(This);
|
||||||
|
return AVIERR_MEMORY;
|
||||||
|
}
|
||||||
|
This->lpOutBuffer = DIBPTR(This->lpOutFormat);
|
||||||
|
} else
|
||||||
|
This->lpOutBuffer = lpBits;
|
||||||
|
|
||||||
|
/* for user size was irrelevant */
|
||||||
|
if (dx == -1)
|
||||||
|
dx = This->lpOutFormat->biWidth;
|
||||||
|
if (dy == -1)
|
||||||
|
dy = This->lpOutFormat->biHeight;
|
||||||
|
|
||||||
|
/* need to resize? */
|
||||||
|
if (x != 0 || y != 0) {
|
||||||
|
if (dy == This->lpOutFormat->biHeight &&
|
||||||
|
dx == This->lpOutFormat->biWidth)
|
||||||
|
This->bResize = FALSE;
|
||||||
|
else
|
||||||
|
This->bResize = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (This->bResize) {
|
||||||
|
This->x = x;
|
||||||
|
This->y = y;
|
||||||
|
This->dx = dx;
|
||||||
|
This->dy = dy;
|
||||||
|
|
||||||
|
if (ICDecompressExBegin(This->hic,0,This->lpInFormat,This->lpInBuffer,0,
|
||||||
|
0,This->lpInFormat->biWidth,
|
||||||
|
This->lpInFormat->biHeight,This->lpOutFormat,
|
||||||
|
This->lpOutBuffer, x, y, dx, dy) == ICERR_OK)
|
||||||
|
return AVIERR_OK;
|
||||||
|
} else if (ICDecompressBegin(This->hic, This->lpInFormat,
|
||||||
|
This->lpOutFormat) == ICERR_OK)
|
||||||
|
return AVIERR_OK;
|
||||||
|
|
||||||
|
AVIFILE_CloseCompressor(This);
|
||||||
|
|
||||||
|
return AVIERR_COMPRESSOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct IGetFrameVtbl igetframeVtbl = {
|
static const struct IGetFrameVtbl igetframeVtbl = {
|
||||||
|
|
|
@ -16,8 +16,23 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "winerror.h"
|
||||||
|
#include "mmsystem.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
#define MAX_FRAMESIZE (16 * 1024 * 1024)
|
#define MAX_FRAMESIZE (16 * 1024 * 1024)
|
||||||
#define MAX_FRAMESIZE_DIFF 512
|
#define MAX_FRAMESIZE_DIFF 512
|
||||||
|
|
||||||
|
|
26
dll/win32/avifil32/precomp.h
Normal file
26
dll/win32/avifil32/precomp.h
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
|
||||||
|
#ifndef _AVIFILE_PRECOMP_H
|
||||||
|
#define _AVIFILE_PRECOMP_H
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#define WIN32_NO_STATUS
|
||||||
|
#define _INC_WINDOWS
|
||||||
|
#define COM_NO_WINDOWS_H
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
|
||||||
|
#include <windef.h>
|
||||||
|
#include <winbase.h>
|
||||||
|
#include <wingdi.h>
|
||||||
|
#include <wincon.h>
|
||||||
|
#include <vfw.h>
|
||||||
|
|
||||||
|
#include <wine/debug.h>
|
||||||
|
#include <wine/unicode.h>
|
||||||
|
|
||||||
|
#include "avifile_private.h"
|
||||||
|
#include "extrachunk.h"
|
||||||
|
|
||||||
|
#endif /* !_AVIFILE_PRECOMP_H */
|
|
@ -1,17 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define IDD_SAVEOPTIONS 0x0100
|
|
||||||
#define IDC_INTERLEAVE 0x0110
|
|
||||||
#define IDC_INTERLEAVEEVERY 0x0111
|
|
||||||
#define IDC_STREAM 0x0112
|
|
||||||
#define IDC_OPTIONS 0x0113
|
|
||||||
#define IDC_FORMATTEXT 0x0114
|
|
||||||
|
|
||||||
#define IDS_WAVESTREAMFORMAT 0x0100
|
|
||||||
#define IDS_WAVEFILETYPE 0x0101
|
|
||||||
#define IDS_ALLMULTIMEDIA 0x0184
|
|
||||||
#define IDS_ALLFILES 0x0185
|
|
||||||
#define IDS_VIDEO 0x0189
|
|
||||||
#define IDS_AUDIO 0x0190
|
|
||||||
#define IDS_AVIFILETYPE 0x0192
|
|
||||||
#define IDS_UNCOMPRESSED 0x0193
|
|
|
@ -18,10 +18,8 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <windef.h>
|
#include "avifile_private.h"
|
||||||
#include <winuser.h>
|
|
||||||
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,21 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "winerror.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
#include "extrachunk.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
|
@ -80,7 +94,6 @@ static ULONG WINAPI ITmpFile_fnRelease(IAVIFile *iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
|
|
|
@ -16,7 +16,27 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "winnls.h"
|
||||||
|
#include "winerror.h"
|
||||||
|
#include "mmsystem.h"
|
||||||
|
#include "vfw.h"
|
||||||
|
#include "msacm.h"
|
||||||
|
|
||||||
#include "avifile_private.h"
|
#include "avifile_private.h"
|
||||||
|
#include "extrachunk.h"
|
||||||
|
|
||||||
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(avifile);
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ reactos/dll/win32/advpack # Synced to WineStaging-3.3
|
||||||
reactos/dll/win32/atl # Synced to WineStaging-3.3
|
reactos/dll/win32/atl # Synced to WineStaging-3.3
|
||||||
reactos/dll/win32/atl80 # Synced to WineStaging-3.3
|
reactos/dll/win32/atl80 # Synced to WineStaging-3.3
|
||||||
reactos/dll/win32/atl100 # Synced to WineStaging-3.3
|
reactos/dll/win32/atl100 # Synced to WineStaging-3.3
|
||||||
reactos/dll/win32/avifil32 # Synced to Wine-3.0
|
reactos/dll/win32/avifil32 # Synced to WineStaging-3.3
|
||||||
reactos/dll/win32/bcrypt # Synced to WineStaging-1.9.23
|
reactos/dll/win32/bcrypt # Synced to WineStaging-1.9.23
|
||||||
reactos/dll/win32/browseui # Out of sync
|
reactos/dll/win32/browseui # Out of sync
|
||||||
reactos/dll/win32/cabinet # Synced to Wine-3.0
|
reactos/dll/win32/cabinet # Synced to Wine-3.0
|
||||||
|
|
Loading…
Reference in a new issue