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);
687 static const struct IAVIStreamVtbl
iacmst = {
#define AVIERR_NOCOMPRESSOR
#define CONVERT_THIS_to_STREAM(a)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static HRESULT WINAPI ACMStream_fnQueryInterface(IAVIStream *iface, REFIID refiid, LPVOID *obj)
static IAVIStreamImpl * impl_from_IAVIStream(IAVIStream *iface)
#define AVIERR_COMPRESSOR
#define IAVIStream_Info(p, a, b)
HRESULT AVIFILE_CreateACMStream(REFIID riid, LPVOID *ppv)
static HRESULT WINAPI ACMStream_fnInfo(IAVIStream *iface, LPAVISTREAMINFOW psi, LONG size)
static ULONG WINAPI ACMStream_fnAddRef(IAVIStream *iface)
#define ACM_FORMATSUGGESTF_WFORMATTAG
#define IAVIStream_Release(p)
static HRESULT WINAPI ACMStream_fnReadFormat(IAVIStream *iface, LONG pos, LPVOID format, LONG *formatsize)
#define OLE_E_ENUM_NOMORE
struct pcmwaveformat_tag PCMWAVEFORMAT
static HRESULT WINAPI ACMStream_fnSetInfo(IAVIStream *iface, LPAVISTREAMINFOW info, LONG infolen)
#define IAVIStream_ReadData(p, a, b, c)
static const WCHAR avifile[]
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define AVIStreamFormatSize(pavi, lPos, plSize)
static HRESULT WINAPI ACMStream_fnSetFormat(IAVIStream *iface, LONG pos, LPVOID format, LONG formatsize)
static HRESULT WINAPI ACMStream_fnWrite(IAVIStream *iface, LONG start, LONG samples, LPVOID buffer, LONG buffersize, DWORD flags, LPLONG sampwritten, LPLONG byteswritten)
WINE_DEFAULT_DEBUG_CHANNEL(avifile)
#define ICQUALITY_DEFAULT
#define IAVIStream_AddRef(p)
struct _WAVEFORMATEX * LPWAVEFORMATEX
struct IAVIStream * PAVISTREAM
MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare)
struct _IAVIStreamImpl IAVIStreamImpl
#define IAVIStream_ReadFormat(p, a, b, c)
static HRESULT WINAPI ACMStream_fnReadData(IAVIStream *iface, DWORD fcc, LPVOID lp, LPLONG lpread)
#define AVIFILECAPS_CANWRITE
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
#define AVIERR_BUFFERTOOSMALL
#define AVIERR_UNSUPPORTED
LPWAVEFORMATEX lpInFormat
#define IAVIStream_Write(p, a, b, c, d, e, f, g)
#define IAVIStream_Read(p, a, b, c, d, e, f)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define IAVIStream_SetFormat(p, a, b, c)
static const struct IAVIStreamVtbl iacmst
static ULONG WINAPI ACMStream_fnRelease(IAVIStream *iface)
#define InterlockedDecrement
#define IAVIStream_WriteData(p, a, b, c)
#define memcpy(s1, s2, n)
IAVIStream IAVIStream_iface
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
static HRESULT WINAPI ACMStream_fnRead(IAVIStream *iface, LONG start, LONG samples, LPVOID buffer, LONG buffersize, LPLONG bytesread, LPLONG samplesread)
#define IAVIStream_QueryInterface(p, a, b)
static HRESULT WINAPI ACMStream_fnWriteData(IAVIStream *iface, DWORD fcc, LPVOID lp, LONG size)
static LONG WINAPI ACMStream_fnFindSample(IAVIStream *iface, LONG pos, LONG flags)
#define InterlockedIncrement
static HRESULT WINAPI ACMStream_fnDelete(IAVIStream *iface, LONG start, LONG samples)
#define IAVIStream_Delete(p, a, b)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare)
#define CONVERT_STREAM_to_THIS(a)
#define ACM_STREAMOPENF_NONREALTIME
#define ACMSTREAMHEADER_STATUSF_PREPARED
static HRESULT AVIFILE_OpenCompressor(IAVIStreamImpl *This)
static HRESULT WINAPI ACMStream_fnCreate(IAVIStream *iface, LPARAM lParam1, LPARAM lParam2)
ACMSTREAMHEADER acmStreamHdr
LPWAVEFORMATEX lpOutFormat
#define IAVIStream_FindSample(p, a, b)
#define HeapFree(x, y, z)
MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert)
MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose)