61#define CONVERT_STREAM_to_THIS(a) do { \
63 acmStreamSize(This->has,*(a) * This->lpInFormat->nBlockAlign,\
64 &__bytes, ACM_STREAMSIZEF_SOURCE); \
65 *(a) = __bytes / This->lpOutFormat->nBlockAlign; } while(0)
67#define CONVERT_THIS_to_STREAM(a) do { \
69 acmStreamSize(This->has,*(a) * This->lpOutFormat->nBlockAlign,\
70 &__bytes, ACM_STREAMSIZEF_DESTINATION); \
71 *(a) = __bytes / This->lpInFormat->nBlockAlign; } while(0)
94 This->lpInFormat, &
This->cbInFormat);
110 }
else if (
This->lpOutFormat ==
NULL)
118 This->sInfo.dwSampleSize =
This->lpOutFormat->nBlockAlign;
119 This->sInfo.dwScale =
This->lpOutFormat->nBlockAlign;
120 This->sInfo.dwRate =
This->lpOutFormat->nAvgBytesPerSec;
146 *
obj = &
This->IAVIStream_iface;
191 This->cbInFormat = 0;
196 This->cbOutFormat = 0;
222 TRACE(
"(%p,0x%08lX,0x%08lX)\n", iface, lParam1, lParam2);
240 This->sInfo.fccHandler = 0;
261 This->cbOutFormat = 0;
332 if (formatsize ==
NULL)
344 *formatsize =
This->cbOutFormat;
351 if (*formatsize < This->cbOutFormat) {
352 *formatsize =
This->cbOutFormat;
356 *formatsize =
This->cbOutFormat;
376 if (
This->cbInFormat != formatsize ||
390 This->cbInFormat = formatsize;
415 TRACE(
"(%p,%d,%d,%p,%d,%p,%p)\n", iface,
start,
samples,
buffer,
416 buffersize, bytesread, samplesread);
419 if (bytesread !=
NULL)
421 if (samplesread !=
NULL)
433 if (
This->cbInFormat ==
This->cbOutFormat &&
436 bytesread, samplesread);
441 samples = buffersize /
This->lpOutFormat->nBlockAlign;
443 if (
samples *
This->lpOutFormat->nBlockAlign > buffersize)
444 samples = buffersize /
This->lpOutFormat->nBlockAlign;
448 if (bytesread ==
NULL && samplesread ==
NULL)
451 if (bytesread !=
NULL)
452 *bytesread =
samples *
This->lpOutFormat->nBlockAlign;
453 if (samplesread !=
NULL)
466 if (
This->acmStreamHdr.pbDst !=
NULL) {
469 This->acmStreamHdr.dwDstUser = 0;
473 if (
This->acmStreamHdr.pbSrc ==
NULL ||
474 This->acmStreamHdr.dwSrcUser <
size) {
475 if (
This->acmStreamHdr.pbSrc ==
NULL)
479 if (
This->acmStreamHdr.pbSrc ==
NULL)
481 This->acmStreamHdr.dwSrcUser =
size;
484 This->acmStreamHdr.cbStruct =
sizeof(
This->acmStreamHdr);
485 This->acmStreamHdr.cbSrcLengthUsed = 0;
486 This->acmStreamHdr.cbDstLengthUsed = 0;
487 This->acmStreamHdr.cbSrcLength =
size;
491 This->acmStreamHdr.cbSrcLength,
498 This->acmStreamHdr.cbDstLength = buffersize;
502 This->acmStreamHdr.cbDstLength = 0;
513 This->acmStreamHdr.cbDstLength = 0;
516 if (bytesread !=
NULL)
517 *bytesread =
This->acmStreamHdr.cbDstLengthUsed;
518 if (samplesread !=
NULL)
520 This->acmStreamHdr.cbDstLengthUsed /
This->lpOutFormat->nBlockAlign;
536 TRACE(
"(%p,%d,%d,%p,%d,0x%08X,%p,%p)\n", iface,
start,
samples,
537 buffer, buffersize,
flags, sampwritten, byteswritten);
540 if (sampwritten !=
NULL)
542 if (byteswritten !=
NULL)
565 flags, sampwritten, byteswritten);
569 if (
This->acmStreamHdr.pbSrc !=
NULL) {
572 This->acmStreamHdr.dwSrcUser = 0;
576 if (
This->acmStreamHdr.pbDst ==
NULL ||
577 This->acmStreamHdr.dwDstUser <
size) {
578 if (
This->acmStreamHdr.pbDst ==
NULL)
582 if (
This->acmStreamHdr.pbDst ==
NULL)
584 This->acmStreamHdr.dwDstUser =
size;
586 This->acmStreamHdr.cbStruct =
sizeof(
This->acmStreamHdr);
587 This->acmStreamHdr.cbSrcLengthUsed = 0;
588 This->acmStreamHdr.cbDstLengthUsed = 0;
589 This->acmStreamHdr.cbDstLength =
This->acmStreamHdr.dwDstUser;
593 This->acmStreamHdr.cbSrcLength = buffersize;
597 This->acmStreamHdr.cbSrcLength = 0;
610 This->acmStreamHdr.cbSrcLength = 0;
616 This->lpOutFormat->nBlockAlign,
This->acmStreamHdr.pbDst,
617 This->acmStreamHdr.cbDstLengthUsed,
flags,sampwritten,
660 TRACE(
"(%p,0x%08X,%p,%p)\n", iface, fcc, lp, lpread);
672 TRACE(
"(%p,0x%08x,%p,%d)\n", iface, fcc, lp,
size);
682 FIXME(
"(%p,%p,%d): stub\n", iface,
info, infolen);
687static const struct IAVIStreamVtbl
iacmst = {
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static HRESULT WINAPI ACMStream_fnSetFormat(IAVIStream *iface, LONG pos, LPVOID format, LONG formatsize)
static HRESULT WINAPI ACMStream_fnCreate(IAVIStream *iface, LPARAM lParam1, LPARAM lParam2)
static const struct IAVIStreamVtbl iacmst
static HRESULT WINAPI ACMStream_fnWrite(IAVIStream *iface, LONG start, LONG samples, LPVOID buffer, LONG buffersize, DWORD flags, LPLONG sampwritten, LPLONG byteswritten)
#define CONVERT_STREAM_to_THIS(a)
static HRESULT WINAPI ACMStream_fnReadFormat(IAVIStream *iface, LONG pos, LPVOID format, LONG *formatsize)
static HRESULT WINAPI ACMStream_fnInfo(IAVIStream *iface, LPAVISTREAMINFOW psi, LONG size)
static HRESULT AVIFILE_OpenCompressor(IAVIStreamImpl *This)
static HRESULT WINAPI ACMStream_fnReadData(IAVIStream *iface, DWORD fcc, LPVOID lp, LPLONG lpread)
#define CONVERT_THIS_to_STREAM(a)
struct _IAVIStreamImpl IAVIStreamImpl
static LONG WINAPI ACMStream_fnFindSample(IAVIStream *iface, LONG pos, LONG flags)
static HRESULT WINAPI ACMStream_fnWriteData(IAVIStream *iface, DWORD fcc, LPVOID lp, LONG size)
static IAVIStreamImpl * impl_from_IAVIStream(IAVIStream *iface)
static HRESULT WINAPI ACMStream_fnQueryInterface(IAVIStream *iface, REFIID refiid, LPVOID *obj)
static ULONG WINAPI ACMStream_fnRelease(IAVIStream *iface)
HRESULT AVIFILE_CreateACMStream(REFIID riid, LPVOID *ppv)
static ULONG WINAPI ACMStream_fnAddRef(IAVIStream *iface)
static HRESULT WINAPI ACMStream_fnRead(IAVIStream *iface, LONG start, LONG samples, LPVOID buffer, LONG buffersize, LPLONG bytesread, LPLONG samplesread)
static HRESULT WINAPI ACMStream_fnSetInfo(IAVIStream *iface, LPAVISTREAMINFOW info, LONG infolen)
static HRESULT WINAPI ACMStream_fnDelete(IAVIStream *iface, LONG start, LONG samples)
#define InterlockedIncrement
#define InterlockedDecrement
static const WCHAR avifile[]
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose)
MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare)
MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert)
MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare)
MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
#define memcpy(s1, s2, n)
struct _WAVEFORMATEX * LPWAVEFORMATEX
struct pcmwaveformat_tag PCMWAVEFORMAT
#define ACMSTREAMHEADER_STATUSF_PREPARED
#define ACM_STREAMOPENF_NONREALTIME
#define ACM_FORMATSUGGESTF_WFORMATTAG
#define IsEqualGUID(rguid1, rguid2)
ACMSTREAMHEADER acmStreamHdr
LPWAVEFORMATEX lpInFormat
IAVIStream IAVIStream_iface
LPWAVEFORMATEX lpOutFormat
#define CONTAINING_RECORD(address, type, field)
#define IAVIStream_SetFormat(p, a, b, c)
#define IAVIStream_AddRef(p)
#define AVIERR_NOCOMPRESSOR
#define IAVIStream_WriteData(p, a, b, c)
#define IAVIStream_QueryInterface(p, a, b)
#define AVIERR_UNSUPPORTED
#define IAVIStream_Delete(p, a, b)
#define ICQUALITY_DEFAULT
#define IAVIStream_Read(p, a, b, c, d, e, f)
#define AVIFILECAPS_CANWRITE
#define IAVIStream_ReadFormat(p, a, b, c)
#define IAVIStream_ReadData(p, a, b, c)
#define AVIStreamFormatSize(pavi, lPos, plSize)
#define AVIERR_COMPRESSOR
struct IAVIStream * PAVISTREAM
#define AVIERR_BUFFERTOOSMALL
#define IAVIStream_Write(p, a, b, c, d, e, f, g)
#define IAVIStream_Release(p)
#define IAVIStream_Info(p, a, b)
#define IAVIStream_FindSample(p, a, b)
#define OLE_E_ENUM_NOMORE
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)