ReactOS 0.4.15-dev-7670-g69b08be
avifile_private.h File Reference
#include <windef.h>
#include <winuser.h>
Include dependency graph for avifile_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_AVISTREAMS   8
 
#define WIDTHBYTES(i)   (((i+31)&(~31))/8)
 
#define DIBWIDTHBYTES(bi)   WIDTHBYTES((bi).biWidth * (bi).biBitCount)
 
#define DIBPTR(lp)
 
#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
 

Functions

 DEFINE_AVIGUID (CLSID_ICMStream, 0x00020001, 0, 0)
 
 DEFINE_AVIGUID (CLSID_WAVFile, 0x00020003, 0, 0)
 
 DEFINE_AVIGUID (CLSID_ACMStream, 0x0002000F, 0, 0)
 
HRESULT AVIFILE_CreateAVIFile (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN
 
HRESULT AVIFILE_CreateWAVFile (IUnknown *outer_unk, REFIID riid, void **ret_iface) DECLSPEC_HIDDEN
 
HRESULT AVIFILE_CreateACMStream (REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN
 
HRESULT AVIFILE_CreateICMStream (REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN
 
PGETFRAME AVIFILE_CreateGetFrame (PAVISTREAM pstream) DECLSPEC_HIDDEN
 
PAVIFILE AVIFILE_CreateAVITempFile (int nStreams, const PAVISTREAM *ppStreams) DECLSPEC_HIDDEN
 
LPCWSTR AVIFILE_BasenameW (LPCWSTR szFileName) DECLSPEC_HIDDEN
 
HRESULT WINAPI avifil32_DllGetClassObject (REFCLSID pclsid, REFIID piid, LPVOID *ppv) DECLSPEC_HIDDEN
 

Variables

HMODULE AVIFILE_hModule DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ DIBPTR

#define DIBPTR (   lp)
Value:
((LPBYTE)(lp) + (lp)->biSize + \
(lp)->biClrUsed * sizeof(RGBQUAD))
ULONG RGBQUAD
Definition: precomp.h:50
unsigned char * LPBYTE
Definition: typedefs.h:53

Definition at line 35 of file avifile_private.h.

◆ DIBWIDTHBYTES

#define DIBWIDTHBYTES (   bi)    WIDTHBYTES((bi).biWidth * (bi).biBitCount)

Definition at line 31 of file avifile_private.h.

◆ IDC_FORMATTEXT

#define IDC_FORMATTEXT   0x0114

Definition at line 44 of file avifile_private.h.

◆ IDC_INTERLEAVE

#define IDC_INTERLEAVE   0x0110

Definition at line 40 of file avifile_private.h.

◆ IDC_INTERLEAVEEVERY

#define IDC_INTERLEAVEEVERY   0x0111

Definition at line 41 of file avifile_private.h.

◆ IDC_OPTIONS

#define IDC_OPTIONS   0x0113

Definition at line 43 of file avifile_private.h.

◆ IDC_STREAM

#define IDC_STREAM   0x0112

Definition at line 42 of file avifile_private.h.

◆ IDD_SAVEOPTIONS

#define IDD_SAVEOPTIONS   0x0100

Definition at line 39 of file avifile_private.h.

◆ IDS_ALLFILES

#define IDS_ALLFILES   0x0185

Definition at line 49 of file avifile_private.h.

◆ IDS_ALLMULTIMEDIA

#define IDS_ALLMULTIMEDIA   0x0184

Definition at line 48 of file avifile_private.h.

◆ IDS_AUDIO

#define IDS_AUDIO   0x0190

Definition at line 51 of file avifile_private.h.

◆ IDS_AVIFILETYPE

#define IDS_AVIFILETYPE   0x0192

Definition at line 52 of file avifile_private.h.

◆ IDS_UNCOMPRESSED

#define IDS_UNCOMPRESSED   0x0193

Definition at line 53 of file avifile_private.h.

◆ IDS_VIDEO

#define IDS_VIDEO   0x0189

Definition at line 50 of file avifile_private.h.

◆ IDS_WAVEFILETYPE

#define IDS_WAVEFILETYPE   0x0101

Definition at line 47 of file avifile_private.h.

◆ IDS_WAVESTREAMFORMAT

#define IDS_WAVESTREAMFORMAT   0x0100

Definition at line 46 of file avifile_private.h.

◆ MAX_AVISTREAMS

#define MAX_AVISTREAMS   8

Definition at line 26 of file avifile_private.h.

◆ WIDTHBYTES

#define WIDTHBYTES (   i)    (((i+31)&(~31))/8)

Definition at line 30 of file avifile_private.h.

Function Documentation

◆ avifil32_DllGetClassObject()

HRESULT WINAPI avifil32_DllGetClassObject ( REFCLSID  pclsid,
REFIID  piid,
LPVOID ppv 
)

Referenced by DllGetClassObject().

◆ AVIFILE_BasenameW()

LPCWSTR AVIFILE_BasenameW ( LPCWSTR  szFileName)

Definition at line 162 of file factory.c.

163{
164#define SLASH(w) ((w) == '/' || (w) == '\\')
165
166 LPCWSTR szCur;
167
168 for (szCur = szPath + lstrlenW(szPath);
169 szCur > szPath && !SLASH(*szCur) && *szCur != ':';)
170 szCur--;
171
172 if (szCur == szPath)
173 return szCur;
174 else
175 return szCur + 1;
176
177#undef SLASH
178}
#define SLASH(w)
#define lstrlenW
Definition: compat.h:750
LPCWSTR szPath
Definition: env.c:37
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by AVIFILE_LoadFile(), and IPersistFile_fnLoad().

◆ AVIFILE_CreateACMStream()

HRESULT AVIFILE_CreateACMStream ( REFIID  riid,
LPVOID ppobj 
)

Definition at line 704 of file acmstream.c.

705{
706 IAVIStreamImpl *pstream;
707 HRESULT hr;
708
709 assert(riid != NULL && ppv != NULL);
710
711 *ppv = NULL;
712
714 if (pstream == NULL)
715 return AVIERR_MEMORY;
716
717 pstream->IAVIStream_iface.lpVtbl = &iacmst;
718
720 if (FAILED(hr))
721 HeapFree(GetProcessHeap(), 0, pstream);
722
723 return hr;
724}
static const struct IAVIStreamVtbl iacmst
Definition: acmstream.c:687
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define assert(x)
Definition: debug.h:53
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FAILED(hr)
Definition: intsafe.h:51
HRESULT hr
Definition: shlfolder.c:183
IAVIStream IAVIStream_iface
Definition: acmstream.c:41
#define IAVIStream_QueryInterface(p, a, b)
Definition: vfw.h:1175
#define AVIERR_MEMORY
Definition: vfw.h:1745

Referenced by IClassFactory_fnCreateInstance().

◆ AVIFILE_CreateAVIFile()

HRESULT AVIFILE_CreateAVIFile ( IUnknown pUnkOuter,
REFIID  riid,
LPVOID ppobj 
)

◆ AVIFILE_CreateAVITempFile()

PAVIFILE AVIFILE_CreateAVITempFile ( int  nStreams,
const PAVISTREAM ppStreams 
)

Definition at line 220 of file tmpfile.c.

221{
222 ITmpFileImpl *tmpFile;
223 int i;
224
226 if (tmpFile == NULL)
227 return NULL;
228
229 tmpFile->IAVIFile_iface.lpVtbl = &itmpft;
230 tmpFile->ref = 1;
231 memset(&tmpFile->fInfo, 0, sizeof(tmpFile->fInfo));
232
233 tmpFile->fInfo.dwStreams = nStreams;
234 tmpFile->ppStreams = HeapAlloc(GetProcessHeap(), 0, nStreams * sizeof(PAVISTREAM));
235 if (tmpFile->ppStreams == NULL) {
236 HeapFree(GetProcessHeap(), 0, tmpFile);
237 return NULL;
238 }
239
240 for (i = 0; i < nStreams; i++) {
241 AVISTREAMINFOW sInfo;
242
243 tmpFile->ppStreams[i] = ppStreams[i];
244
245 AVIStreamAddRef(ppStreams[i]);
246 AVIStreamInfoW(ppStreams[i], &sInfo, sizeof(sInfo));
247 if (i == 0) {
248 tmpFile->fInfo.dwScale = sInfo.dwScale;
249 tmpFile->fInfo.dwRate = sInfo.dwRate;
250 if (!sInfo.dwScale || !sInfo.dwRate) {
251 tmpFile->fInfo.dwScale = 1;
252 tmpFile->fInfo.dwRate = 100;
253 }
254 }
255
258
259 {
260 DWORD tmp;
261
262 tmp = MulDiv(AVIStreamSampleToTime(ppStreams[i], sInfo.dwLength),
263 tmpFile->fInfo.dwScale, tmpFile->fInfo.dwRate * 1000);
264 if (tmpFile->fInfo.dwLength < tmp)
265 tmpFile->fInfo.dwLength = tmp;
266
267 tmp = sInfo.rcFrame.right - sInfo.rcFrame.left;
268 if (tmpFile->fInfo.dwWidth < tmp)
269 tmpFile->fInfo.dwWidth = tmp;
270 tmp = sInfo.rcFrame.bottom - sInfo.rcFrame.top;
271 if (tmpFile->fInfo.dwHeight < tmp)
272 tmpFile->fInfo.dwHeight = tmp;
273 }
274 }
275
276 return &tmpFile->IAVIFile_iface;
277}
LONG WINAPI AVIStreamSampleToTime(PAVISTREAM pstream, LONG lSample)
Definition: api.c:894
ULONG WINAPI AVIStreamAddRef(PAVISTREAM pstream)
Definition: api.c:434
INT nStreams
Definition: api.c:60
HRESULT WINAPI AVIStreamInfoW(PAVISTREAM pstream, LPAVISTREAMINFOW asi, LONG size)
Definition: api.c:522
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
#define memset(x, y, z)
Definition: compat.h:39
DWORD dwRate
Definition: avifil32.idl:78
DWORD dwWidth
Definition: avifil32.idl:75
DWORD dwStreams
Definition: avifil32.idl:73
DWORD dwSuggestedBufferSize
Definition: avifil32.idl:74
DWORD dwHeight
Definition: avifil32.idl:76
DWORD dwScale
Definition: avifil32.idl:77
DWORD dwLength
Definition: avifil32.idl:79
DWORD dwSuggestedBufferSize
Definition: avifil32.idl:40
LONG ref
Definition: tmpfile.c:39
IAVIFile IAVIFile_iface
Definition: tmpfile.c:38
AVIFILEINFOW fInfo
Definition: tmpfile.c:41
PAVISTREAM * ppStreams
Definition: tmpfile.c:42
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
static const struct IAVIFileVtbl itmpft
Definition: tmpfile.c:207

Referenced by AVIMakeFileFromStreams().

◆ AVIFILE_CreateGetFrame()

PGETFRAME AVIFILE_CreateGetFrame ( PAVISTREAM  pstream)

Definition at line 487 of file getframe.c.

488{
489 IGetFrameImpl *pg;
490
491 /* check parameter */
492 if (pStream == NULL)
493 return NULL;
494
496 if (pg != NULL) {
497 pg->IGetFrame_iface.lpVtbl = &igetframeVtbl;
498 pg->ref = 1;
499 pg->lCurrentFrame = -1;
500 pg->pStream = pStream;
501 IAVIStream_AddRef(pStream);
502 }
503
504 return &pg->IGetFrame_iface;
505}
static const struct IGetFrameVtbl igetframeVtbl
Definition: getframe.c:477
IGetFrame IGetFrame_iface
Definition: getframe.c:42
LONG lCurrentFrame
Definition: getframe.c:54
PAVISTREAM pStream
Definition: getframe.c:47
#define IAVIStream_AddRef(p)
Definition: vfw.h:1176

Referenced by AVIStreamGetFrameOpen().

◆ AVIFILE_CreateICMStream()

HRESULT AVIFILE_CreateICMStream ( REFIID  riid,
LPVOID ppobj 
)

Definition at line 727 of file icmstream.c.

728{
729 IAVIStreamImpl *pstream;
730 HRESULT hr;
731
732 assert(riid != NULL && ppv != NULL);
733
734 *ppv = NULL;
735
737 if (pstream == NULL)
738 return AVIERR_MEMORY;
739
740 pstream->IAVIStream_iface.lpVtbl = &iicmst;
741 AVIFILE_Reset(pstream);
742
744 if (FAILED(hr))
745 HeapFree(GetProcessHeap(), 0, pstream);
746
747 return hr;
748}
static void AVIFILE_Reset(IAVIStreamImpl *This)
Definition: icmstream.c:83
static const struct IAVIStreamVtbl iicmst
Definition: icmstream.c:710

Referenced by IClassFactory_fnCreateInstance().

◆ AVIFILE_CreateWAVFile()

HRESULT AVIFILE_CreateWAVFile ( IUnknown outer_unk,
REFIID  riid,
void **  ret_iface 
)

Definition at line 978 of file wavfile.c.

979{
980 IAVIFileImpl *pfile;
981 HRESULT hr;
982
983 *ret_iface = NULL;
984
985 pfile = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pfile));
986 if (!pfile)
987 return AVIERR_MEMORY;
988
989 pfile->IUnknown_inner.lpVtbl = &unk_vtbl;
990 pfile->IAVIFile_iface.lpVtbl = &iwavft;
991 pfile->IPersistFile_iface.lpVtbl = &iwavpft;
992 pfile->IAVIStream_iface.lpVtbl = &iwavst;
993 pfile->ref = 1;
994 if (outer_unk)
995 pfile->outer_unk = outer_unk;
996 else
997 pfile->outer_unk = &pfile->IUnknown_inner;
998
999 hr = IUnknown_QueryInterface(&pfile->IUnknown_inner, riid, ret_iface);
1000 IUnknown_Release(&pfile->IUnknown_inner);
1001
1002 return hr;
1003}
IAVIFile IAVIFile_iface
Definition: avifile.c:93
IUnknown * outer_unk
Definition: avifile.c:95
IUnknown IUnknown_inner
Definition: avifile.c:92
LONG ref
Definition: avifile.c:96
IPersistFile IPersistFile_iface
Definition: avifile.c:94
IAVIStream IAVIStream_iface
Definition: wavfile.c:93
static const struct IAVIFileVtbl iwavft
Definition: wavfile.c:412
static const struct IAVIStreamVtbl iwavst
Definition: wavfile.c:961
static const struct IPersistFileVtbl iwavpft
Definition: wavfile.c:583
static const IUnknownVtbl unk_vtbl
Definition: wavfile.c:190

Referenced by IClassFactory_fnCreateInstance().

◆ DEFINE_AVIGUID() [1/3]

DEFINE_AVIGUID ( CLSID_ACMStream  ,
0x0002000F  ,
,
 
)

◆ DEFINE_AVIGUID() [2/3]

DEFINE_AVIGUID ( CLSID_ICMStream  ,
0x00020001  ,
,
 
)

◆ DEFINE_AVIGUID() [3/3]

DEFINE_AVIGUID ( CLSID_WAVFile  ,
0x00020003  ,
,
 
)

Variable Documentation

◆ DECLSPEC_HIDDEN

HMODULE AVIFILE_hModule DECLSPEC_HIDDEN
extern

Definition at line 289 of file d3dcompiler_private.h.