Commit 4364ff8d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Build without -DWINE_NO_LONG_TYPES.

parent deb60967
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = quartz.dll MODULE = quartz.dll
IMPORTLIB = quartz IMPORTLIB = quartz
IMPORTS = strmiids dxguid strmbase uuid dsound msacm32 msvfw32 ole32 oleaut32 rpcrt4 user32 gdi32 advapi32 IMPORTS = strmiids dxguid strmbase uuid dsound msacm32 msvfw32 ole32 oleaut32 rpcrt4 user32 gdi32 advapi32
......
...@@ -110,7 +110,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed ...@@ -110,7 +110,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
hr = IMediaSample_GetPointer(pSample, &pbSrcStream); hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Cannot get pointer to sample data (%x)\n", hr); ERR("Failed to get input buffer pointer, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -135,8 +135,6 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed ...@@ -135,8 +135,6 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
tMed = tStart; tMed = tStart;
mtMed = mtStart; mtMed = mtStart;
TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
ash.pbSrc = pbSrcStream; ash.pbSrc = pbSrcStream;
ash.cbSrcLength = cbSrcStream; ash.cbSrcLength = cbSrcStream;
...@@ -145,7 +143,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed ...@@ -145,7 +143,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0); hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Unable to get delivery buffer (%x)\n", hr); ERR("Failed to get sample, hr %#lx.\n", hr);
return hr; return hr;
} }
IMediaSample_SetPreroll(pOutSample, preroll); IMediaSample_SetPreroll(pOutSample, preroll);
...@@ -155,7 +153,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed ...@@ -155,7 +153,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
hr = IMediaSample_GetPointer(pOutSample, &pbDstStream); hr = IMediaSample_GetPointer(pOutSample, &pbDstStream);
if (FAILED(hr)) { if (FAILED(hr)) {
ERR("Unable to get pointer to buffer (%x)\n", hr); ERR("Failed to get output buffer pointer, hr %#lx.\n", hr);
goto error; goto error;
} }
cbDstStream = IMediaSample_GetSize(pOutSample); cbDstStream = IMediaSample_GetSize(pOutSample);
...@@ -192,7 +190,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed ...@@ -192,7 +190,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
goto error; goto error;
} }
TRACE("used in %u/%u, used out %u/%u\n", ash.cbSrcLengthUsed, ash.cbSrcLength, ash.cbDstLengthUsed, ash.cbDstLength); TRACE("used in %lu/%lu, used out %lu/%lu\n", ash.cbSrcLengthUsed, ash.cbSrcLength, ash.cbDstLengthUsed, ash.cbDstLength);
hr = IMediaSample_SetActualDataLength(pOutSample, ash.cbDstLengthUsed); hr = IMediaSample_SetActualDataLength(pOutSample, ash.cbDstLengthUsed);
assert(hr == S_OK); assert(hr == S_OK);
...@@ -200,7 +198,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed ...@@ -200,7 +198,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
/* Bug in acm codecs? It apparently uses the input, but doesn't necessarily output immediately */ /* Bug in acm codecs? It apparently uses the input, but doesn't necessarily output immediately */
if (!ash.cbSrcLengthUsed) if (!ash.cbSrcLengthUsed)
{ {
WARN("Sample was skipped? Outputted: %u\n", ash.cbDstLengthUsed); WARN("Sample was skipped? Outputted: %lu\n", ash.cbDstLengthUsed);
ash.cbSrcLength = 0; ash.cbSrcLength = 0;
goto error; goto error;
} }
...@@ -243,7 +241,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed ...@@ -243,7 +241,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
hr = IMemInputPin_Receive(This->source.pMemInputPin, pOutSample); hr = IMemInputPin_Receive(This->source.pMemInputPin, pOutSample);
if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) { if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) {
if (FAILED(hr)) if (FAILED(hr))
ERR("Error sending sample (%x)\n", hr); ERR("Failed to send sample, hr %#lx.\n", hr);
goto error; goto error;
} }
...@@ -419,7 +417,7 @@ static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface, ...@@ -419,7 +417,7 @@ static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface,
IQualityControl *peer; IQualityControl *peer;
HRESULT hr = S_OK; HRESULT hr = S_OK;
TRACE("filter %p, sender %p, type %#x, proportion %u, late %s, timestamp %s.\n", TRACE("filter %p, sender %p, type %#x, proportion %ld, late %s, timestamp %s.\n",
filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp)); filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp));
if (filter->source_qc_sink) if (filter->source_qc_sink)
...@@ -492,7 +490,7 @@ static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface) ...@@ -492,7 +490,7 @@ static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface)
HRESULT hr; HRESULT hr;
if (filter->source.pin.peer && FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator))) if (filter->source.pin.peer && FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
ERR("Failed to commit allocator, hr %#x.\n", hr); ERR("Failed to commit allocator, hr %#lx.\n", hr);
return S_OK; return S_OK;
} }
......
...@@ -101,14 +101,13 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface, ...@@ -101,14 +101,13 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
struct avi_decompressor *This = impl_from_strmbase_filter(iface->pin.filter); struct avi_decompressor *This = impl_from_strmbase_filter(iface->pin.filter);
VIDEOINFOHEADER *source_format; VIDEOINFOHEADER *source_format;
HRESULT hr; HRESULT hr;
DWORD res;
IMediaSample* pOutSample = NULL; IMediaSample* pOutSample = NULL;
DWORD cbDstStream; LONG cbDstStream, cbSrcStream;
LPBYTE pbDstStream; LPBYTE pbDstStream;
DWORD cbSrcStream;
LPBYTE pbSrcStream; LPBYTE pbSrcStream;
LONGLONG tStart, tStop; LONGLONG tStart, tStop;
DWORD flags = 0; DWORD flags = 0;
LRESULT res;
/* We do not expect pin connection state to change while the filter is /* We do not expect pin connection state to change while the filter is
* running. This guarantee is necessary, since otherwise we would have to * running. This guarantee is necessary, since otherwise we would have to
...@@ -131,20 +130,18 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface, ...@@ -131,20 +130,18 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
hr = IMediaSample_GetPointer(pSample, &pbSrcStream); hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Cannot get pointer to sample data (%x)\n", hr); ERR("Failed to get input buffer pointer, hr %#lx.\n", hr);
return hr; return hr;
} }
cbSrcStream = IMediaSample_GetActualDataLength(pSample); cbSrcStream = IMediaSample_GetActualDataLength(pSample);
TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
/* Update input size to match sample size */ /* Update input size to match sample size */
This->pBihIn->biSizeImage = cbSrcStream; This->pBihIn->biSizeImage = cbSrcStream;
hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0); hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0);
if (FAILED(hr)) { if (FAILED(hr)) {
ERR("Unable to get delivery buffer (%x)\n", hr); ERR("Failed to get sample, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -153,14 +150,14 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface, ...@@ -153,14 +150,14 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
hr = IMediaSample_GetPointer(pOutSample, &pbDstStream); hr = IMediaSample_GetPointer(pOutSample, &pbDstStream);
if (FAILED(hr)) { if (FAILED(hr)) {
ERR("Unable to get pointer to buffer (%x)\n", hr); ERR("Failed to get output buffer pointer, hr %#lx.\n", hr);
IMediaSample_Release(pOutSample); IMediaSample_Release(pOutSample);
return hr; return hr;
} }
cbDstStream = IMediaSample_GetSize(pOutSample); cbDstStream = IMediaSample_GetSize(pOutSample);
if (cbDstStream < source_format->bmiHeader.biSizeImage) if (cbDstStream < source_format->bmiHeader.biSizeImage)
{ {
ERR("Sample size is too small (%u < %u).\n", cbDstStream, source_format->bmiHeader.biSizeImage); ERR("Sample size is too small (%ld < %lu).\n", cbDstStream, source_format->bmiHeader.biSizeImage);
IMediaSample_Release(pOutSample); IMediaSample_Release(pOutSample);
return E_FAIL; return E_FAIL;
} }
...@@ -175,7 +172,7 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface, ...@@ -175,7 +172,7 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
res = ICDecompress(This->hvid, flags, This->pBihIn, pbSrcStream, &source_format->bmiHeader, pbDstStream); res = ICDecompress(This->hvid, flags, This->pBihIn, pbSrcStream, &source_format->bmiHeader, pbDstStream);
if (res != ICERR_OK) if (res != ICERR_OK)
ERR("Error occurred during the decompression (%x)\n", res); ERR("Failed to decompress, error %Id.\n", res);
/* Drop sample if it's intended to be dropped */ /* Drop sample if it's intended to be dropped */
if (flags & ICDECOMPRESS_HURRYUP) { if (flags & ICDECOMPRESS_HURRYUP) {
...@@ -198,7 +195,7 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface, ...@@ -198,7 +195,7 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
hr = IMemInputPin_Receive(This->source.pMemInputPin, pOutSample); hr = IMemInputPin_Receive(This->source.pMemInputPin, pOutSample);
if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) if (hr != S_OK && hr != VFW_E_NOT_CONNECTED)
ERR("Error sending sample (%x)\n", hr); ERR("Failed to send sample, hr %#lx.\n", hr);
IMediaSample_Release(pOutSample); IMediaSample_Release(pOutSample);
return hr; return hr;
...@@ -228,7 +225,7 @@ static HRESULT avi_decompressor_sink_connect(struct strmbase_sink *iface, IPin * ...@@ -228,7 +225,7 @@ static HRESULT avi_decompressor_sink_connect(struct strmbase_sink *iface, IPin *
if (This->hvid) if (This->hvid)
{ {
DWORD bih_size; DWORD bih_size;
DWORD result; LRESULT result;
/* Copy bitmap header from media type to 1 for input and 1 for output */ /* Copy bitmap header from media type to 1 for input and 1 for output */
bih_size = bmi->biSize + bmi->biClrUsed * 4; bih_size = bmi->biSize + bmi->biClrUsed * 4;
...@@ -242,7 +239,7 @@ static HRESULT avi_decompressor_sink_connect(struct strmbase_sink *iface, IPin * ...@@ -242,7 +239,7 @@ static HRESULT avi_decompressor_sink_connect(struct strmbase_sink *iface, IPin *
if ((result = ICDecompressQuery(This->hvid, This->pBihIn, NULL))) if ((result = ICDecompressQuery(This->hvid, This->pBihIn, NULL)))
{ {
WARN("No decompressor found, error %d.\n", result); WARN("No decompressor found, error %Id.\n", result);
return VFW_E_TYPE_NOT_ACCEPTED; return VFW_E_TYPE_NOT_ACCEPTED;
} }
...@@ -479,7 +476,7 @@ static HRESULT WINAPI avi_decompressor_source_qc_Notify(IQualityControl *iface, ...@@ -479,7 +476,7 @@ static HRESULT WINAPI avi_decompressor_source_qc_Notify(IQualityControl *iface,
{ {
struct avi_decompressor *filter = impl_from_source_IQualityControl(iface); struct avi_decompressor *filter = impl_from_source_IQualityControl(iface);
TRACE("filter %p, sender %p, type %#x, proportion %u, late %s, timestamp %s.\n", TRACE("filter %p, sender %p, type %#x, proportion %ld, late %s, timestamp %s.\n",
filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp)); filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp));
EnterCriticalSection(&filter->filter.stream_cs); EnterCriticalSection(&filter->filter.stream_cs);
...@@ -555,12 +552,12 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface) ...@@ -555,12 +552,12 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface)
source_format = (VIDEOINFOHEADER *)filter->sink.pin.mt.pbFormat; source_format = (VIDEOINFOHEADER *)filter->sink.pin.mt.pbFormat;
if ((res = ICDecompressBegin(filter->hvid, filter->pBihIn, &source_format->bmiHeader))) if ((res = ICDecompressBegin(filter->hvid, filter->pBihIn, &source_format->bmiHeader)))
{ {
ERR("ICDecompressBegin() failed, error %ld.\n", res); ERR("ICDecompressBegin() failed, error %Id.\n", res);
return E_FAIL; return E_FAIL;
} }
if (FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator))) if (FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
ERR("Failed to commit allocator, hr %#x.\n", hr); ERR("Failed to commit allocator, hr %#lx.\n", hr);
return S_OK; return S_OK;
} }
...@@ -575,7 +572,7 @@ static HRESULT avi_decompressor_cleanup_stream(struct strmbase_filter *iface) ...@@ -575,7 +572,7 @@ static HRESULT avi_decompressor_cleanup_stream(struct strmbase_filter *iface)
if (filter->hvid && (res = ICDecompressEnd(filter->hvid))) if (filter->hvid && (res = ICDecompressEnd(filter->hvid)))
{ {
ERR("ICDecompressEnd() failed, error %ld.\n", res); ERR("ICDecompressEnd() failed, error %Id.\n", res);
return E_FAIL; return E_FAIL;
} }
......
...@@ -126,7 +126,7 @@ static void DSoundRender_UpdatePositions(struct dsound_render *This, DWORD *seqw ...@@ -126,7 +126,7 @@ static void DSoundRender_UpdatePositions(struct dsound_render *This, DWORD *seqw
adv = playpos - old_playpos; adv = playpos - old_playpos;
This->last_playpos = playpos; This->last_playpos = playpos;
if (adv) { if (adv) {
TRACE("Moving from %u to %u: clearing %u bytes\n", old_playpos, playpos, adv); TRACE("Moving from %lu to %lu: clearing %lu bytes.\n", old_playpos, playpos, adv);
IDirectSoundBuffer_Lock(This->dsbuffer, old_playpos, adv, (void**)&buf1, &size1, (void**)&buf2, &size2, 0); IDirectSoundBuffer_Lock(This->dsbuffer, old_playpos, adv, (void**)&buf1, &size1, (void**)&buf2, &size2, 0);
memset(buf1, wfx->wBitsPerSample == 8 ? 128 : 0, size1); memset(buf1, wfx->wBitsPerSample == 8 ? 128 : 0, size1);
memset(buf2, wfx->wBitsPerSample == 8 ? 128 : 0, size2); memset(buf2, wfx->wBitsPerSample == 8 ? 128 : 0, size2);
...@@ -190,19 +190,19 @@ static HRESULT DSoundRender_GetWritePos(struct dsound_render *This, ...@@ -190,19 +190,19 @@ static HRESULT DSoundRender_GetWritePos(struct dsound_render *This,
past = min_writepos_t - write_at; past = min_writepos_t - write_at;
if (past >= 0) { if (past >= 0) {
DWORD skipbytes = pos_from_time(This, past); DWORD skipbytes = pos_from_time(This, past);
WARN("Skipping %u bytes\n", skipbytes); WARN("Skipping %lu bytes.\n", skipbytes);
*skip = skipbytes; *skip = skipbytes;
*ret_writepos = min_writepos; *ret_writepos = min_writepos;
} else { } else {
DWORD aheadbytes = pos_from_time(This, -past); DWORD aheadbytes = pos_from_time(This, -past);
WARN("Advancing %u bytes\n", aheadbytes); WARN("Advancing %lu bytes.\n", aheadbytes);
*ret_writepos = (min_writepos + aheadbytes) % This->buf_size; *ret_writepos = (min_writepos + aheadbytes) % This->buf_size;
} }
} else /* delta_t > 0 */ { } else /* delta_t > 0 */ {
DWORD aheadbytes; DWORD aheadbytes;
WARN("Delta too big %s/%s, too far ahead\n", debugstr_time(delta_t), debugstr_time(max_lag)); WARN("Delta too big %s/%s, too far ahead\n", debugstr_time(delta_t), debugstr_time(max_lag));
aheadbytes = pos_from_time(This, delta_t); aheadbytes = pos_from_time(This, delta_t);
WARN("Advancing %u bytes\n", aheadbytes); WARN("Advancing %lu bytes.\n", aheadbytes);
if (delta_t >= DSoundRenderer_Max_Fill) if (delta_t >= DSoundRenderer_Max_Fill)
return S_FALSE; return S_FALSE;
*ret_writepos = (min_writepos + aheadbytes) % This->buf_size; *ret_writepos = (min_writepos + aheadbytes) % This->buf_size;
...@@ -254,13 +254,13 @@ static HRESULT DSoundRender_SendSampleData(struct dsound_render *This, ...@@ -254,13 +254,13 @@ static HRESULT DSoundRender_SendSampleData(struct dsound_render *This,
if (This->sink.flushing || This->filter.state == State_Stopped) if (This->sink.flushing || This->filter.state == State_Stopped)
return This->filter.state == State_Paused ? S_OK : VFW_E_WRONG_STATE; return This->filter.state == State_Paused ? S_OK : VFW_E_WRONG_STATE;
if (ret != WAIT_TIMEOUT) if (ret != WAIT_TIMEOUT)
ERR("%x\n", ret); ERR("WaitForSingleObject() returned %ld.\n", ret);
continue; continue;
} }
tStart = -1; tStart = -1;
if (skip) if (skip)
FIXME("Sample dropped %u of %u bytes\n", skip, size); FIXME("Sample dropped %lu of %lu bytes.\n", skip, size);
if (skip >= size) if (skip >= size)
return S_OK; return S_OK;
data += skip; data += skip;
...@@ -268,7 +268,7 @@ static HRESULT DSoundRender_SendSampleData(struct dsound_render *This, ...@@ -268,7 +268,7 @@ static HRESULT DSoundRender_SendSampleData(struct dsound_render *This,
hr = IDirectSoundBuffer_Lock(This->dsbuffer, writepos, min(free, size), (void**)&buf1, &size1, (void**)&buf2, &size2, 0); hr = IDirectSoundBuffer_Lock(This->dsbuffer, writepos, min(free, size), (void**)&buf1, &size1, (void**)&buf2, &size2, 0);
if (hr != DS_OK) { if (hr != DS_OK) {
ERR("Unable to lock sound buffer! (%x)\n", hr); ERR("Failed to lock sound buffer, hr %#lx.\n", hr);
break; break;
} }
memcpy(buf1, data, size1); memcpy(buf1, data, size1);
...@@ -276,7 +276,7 @@ static HRESULT DSoundRender_SendSampleData(struct dsound_render *This, ...@@ -276,7 +276,7 @@ static HRESULT DSoundRender_SendSampleData(struct dsound_render *This,
memcpy(buf2, data+size1, size2); memcpy(buf2, data+size1, size2);
IDirectSoundBuffer_Unlock(This->dsbuffer, buf1, size1, buf2, size2); IDirectSoundBuffer_Unlock(This->dsbuffer, buf1, size1, buf2, size2);
This->writepos = (writepos + size1 + size2) % This->buf_size; This->writepos = (writepos + size1 + size2) % This->buf_size;
TRACE("Wrote %u bytes at %u, next at %u - (%u/%u)\n", size1+size2, writepos, This->writepos, free, size); TRACE("Wrote %lu bytes at %lu, next at %lu - (%lu/%lu)\n", size1+size2, writepos, This->writepos, free, size);
data += size1 + size2; data += size1 + size2;
size -= size1 + size2; size -= size1 + size2;
} }
...@@ -330,13 +330,13 @@ static HRESULT DSoundRender_DoRenderSample(struct dsound_render *This, IMediaSam ...@@ -330,13 +330,13 @@ static HRESULT DSoundRender_DoRenderSample(struct dsound_render *This, IMediaSam
hr = IMediaSample_GetPointer(pSample, &pbSrcStream); hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Cannot get pointer to sample data (%x)\n", hr); ERR("Failed to get buffer pointer, hr %#lx.\n", hr);
return hr; return hr;
} }
hr = IMediaSample_GetTime(pSample, &tStart, &tStop); hr = IMediaSample_GetTime(pSample, &tStart, &tStop);
if (FAILED(hr)) { if (FAILED(hr)) {
ERR("Cannot get sample time (%x)\n", hr); ERR("Failed to get sample time, hr %#lx.\n", hr);
tStart = tStop = -1; tStart = tStop = -1;
} }
...@@ -347,8 +347,6 @@ static HRESULT DSoundRender_DoRenderSample(struct dsound_render *This, IMediaSam ...@@ -347,8 +347,6 @@ static HRESULT DSoundRender_DoRenderSample(struct dsound_render *This, IMediaSam
} }
cbSrcStream = IMediaSample_GetActualDataLength(pSample); cbSrcStream = IMediaSample_GetActualDataLength(pSample);
TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream);
return DSoundRender_SendSampleData(This, tStart, tStop, pbSrcStream, cbSrcStream); return DSoundRender_SendSampleData(This, tStart, tStop, pbSrcStream, cbSrcStream);
} }
...@@ -416,17 +414,17 @@ static HRESULT dsound_render_sink_connect(struct strmbase_sink *iface, IPin *pee ...@@ -416,17 +414,17 @@ static HRESULT dsound_render_sink_connect(struct strmbase_sink *iface, IPin *pee
hr = IDirectSound8_CreateSoundBuffer(This->dsound, &buf_desc, &This->dsbuffer, NULL); hr = IDirectSound8_CreateSoundBuffer(This->dsound, &buf_desc, &This->dsbuffer, NULL);
This->writepos = This->buf_size; This->writepos = This->buf_size;
if (FAILED(hr)) if (FAILED(hr))
ERR("Can't create sound buffer (%x)\n", hr); ERR("Failed to create sound buffer, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
hr = IDirectSoundBuffer_SetVolume(This->dsbuffer, This->volume); hr = IDirectSoundBuffer_SetVolume(This->dsbuffer, This->volume);
if (FAILED(hr)) if (FAILED(hr))
ERR("Can't set volume to %d (%x)\n", This->volume, hr); ERR("Failed to set volume to %ld, hr %#lx.\n", This->volume, hr);
hr = IDirectSoundBuffer_SetPan(This->dsbuffer, This->pan); hr = IDirectSoundBuffer_SetPan(This->dsbuffer, This->pan);
if (FAILED(hr)) if (FAILED(hr))
ERR("Can't set pan to %d (%x)\n", This->pan, hr); ERR("Failed to set pan to %ld, hr %#lx.\n", This->pan, hr);
hr = S_OK; hr = S_OK;
} }
...@@ -701,7 +699,7 @@ HRESULT WINAPI basic_audio_GetTypeInfoCount(IBasicAudio *iface, UINT *count) ...@@ -701,7 +699,7 @@ HRESULT WINAPI basic_audio_GetTypeInfoCount(IBasicAudio *iface, UINT *count)
HRESULT WINAPI basic_audio_GetTypeInfo(IBasicAudio *iface, UINT index, HRESULT WINAPI basic_audio_GetTypeInfo(IBasicAudio *iface, UINT index,
LCID lcid, ITypeInfo **typeinfo) LCID lcid, ITypeInfo **typeinfo)
{ {
TRACE("iface %p, index %u, lcid %#x, typeinfo %p.\n", iface, index, lcid, typeinfo); TRACE("iface %p, index %u, lcid %#lx, typeinfo %p.\n", iface, index, lcid, typeinfo);
return strmbase_get_typeinfo(IBasicAudio_tid, typeinfo); return strmbase_get_typeinfo(IBasicAudio_tid, typeinfo);
} }
...@@ -711,7 +709,7 @@ HRESULT WINAPI basic_audio_GetIDsOfNames(IBasicAudio *iface, REFIID iid, ...@@ -711,7 +709,7 @@ HRESULT WINAPI basic_audio_GetIDsOfNames(IBasicAudio *iface, REFIID iid,
ITypeInfo *typeinfo; ITypeInfo *typeinfo;
HRESULT hr; HRESULT hr;
TRACE("iface %p, iid %s, names %p, count %u, lcid %#x, ids %p.\n", TRACE("iface %p, iid %s, names %p, count %u, lcid %#lx, ids %p.\n",
iface, debugstr_guid(iid), names, count, lcid, ids); iface, debugstr_guid(iid), names, count, lcid, ids);
if (SUCCEEDED(hr = strmbase_get_typeinfo(IBasicAudio_tid, &typeinfo))) if (SUCCEEDED(hr = strmbase_get_typeinfo(IBasicAudio_tid, &typeinfo)))
...@@ -728,7 +726,7 @@ static HRESULT WINAPI basic_audio_Invoke(IBasicAudio *iface, DISPID id, REFIID i ...@@ -728,7 +726,7 @@ static HRESULT WINAPI basic_audio_Invoke(IBasicAudio *iface, DISPID id, REFIID i
ITypeInfo *typeinfo; ITypeInfo *typeinfo;
HRESULT hr; HRESULT hr;
TRACE("iface %p, id %d, iid %s, lcid %#x, flags %#x, params %p, result %p, excepinfo %p, error_arg %p.\n", TRACE("iface %p, id %ld, iid %s, lcid %#lx, flags %#x, params %p, result %p, excepinfo %p, error_arg %p.\n",
iface, id, debugstr_guid(iid), lcid, flags, params, result, excepinfo, error_arg); iface, id, debugstr_guid(iid), lcid, flags, params, result, excepinfo, error_arg);
if (SUCCEEDED(hr = strmbase_get_typeinfo(IBasicAudio_tid, &typeinfo))) if (SUCCEEDED(hr = strmbase_get_typeinfo(IBasicAudio_tid, &typeinfo)))
...@@ -743,7 +741,7 @@ static HRESULT WINAPI Basicaudio_put_Volume(IBasicAudio *iface, ...@@ -743,7 +741,7 @@ static HRESULT WINAPI Basicaudio_put_Volume(IBasicAudio *iface,
LONG lVolume) { LONG lVolume) {
struct dsound_render *This = impl_from_IBasicAudio(iface); struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%d)\n", This, iface, lVolume); TRACE("filter %p, volume %ld.\n", This, lVolume);
if (lVolume > DSBVOLUME_MAX || lVolume < DSBVOLUME_MIN) if (lVolume > DSBVOLUME_MAX || lVolume < DSBVOLUME_MIN)
return E_INVALIDARG; return E_INVALIDARG;
...@@ -774,7 +772,7 @@ static HRESULT WINAPI Basicaudio_put_Balance(IBasicAudio *iface, ...@@ -774,7 +772,7 @@ static HRESULT WINAPI Basicaudio_put_Balance(IBasicAudio *iface,
LONG lBalance) { LONG lBalance) {
struct dsound_render *This = impl_from_IBasicAudio(iface); struct dsound_render *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%d)\n", This, iface, lBalance); TRACE("filter %p, balance %ld.\n", This, lBalance);
if (lBalance < DSBPAN_LEFT || lBalance > DSBPAN_RIGHT) if (lBalance < DSBPAN_LEFT || lBalance > DSBPAN_RIGHT)
return E_INVALIDARG; return E_INVALIDARG;
...@@ -963,7 +961,7 @@ static HRESULT WINAPI dsound_render_qc_Notify(IQualityControl *iface, ...@@ -963,7 +961,7 @@ static HRESULT WINAPI dsound_render_qc_Notify(IQualityControl *iface,
{ {
struct dsound_render *filter = impl_from_IQualityControl(iface); struct dsound_render *filter = impl_from_IQualityControl(iface);
FIXME("filter %p, sender %p, type %#x, proportion %u, late %s, timestamp %s, stub!\n", FIXME("filter %p, sender %p, type %#x, proportion %ld, late %s, timestamp %s, stub!\n",
filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp)); filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp));
return E_NOTIMPL; return E_NOTIMPL;
......
...@@ -217,7 +217,7 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID ...@@ -217,7 +217,7 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID
if ((file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, if ((file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
{ {
WARN("Failed to open file %s, error %u.\n", debugstr_w(filename), GetLastError()); WARN("Failed to open file %s, error %lu.\n", debugstr_w(filename), GetLastError());
return FALSE; return FALSE;
} }
...@@ -393,14 +393,14 @@ static DWORD CALLBACK io_thread(void *arg) ...@@ -393,14 +393,14 @@ static DWORD CALLBACK io_thread(void *arg)
EnterCriticalSection(&filter->sample_cs); EnterCriticalSection(&filter->sample_cs);
req = CONTAINING_RECORD(ovl, struct request, ovl); req = CONTAINING_RECORD(ovl, struct request, ovl);
TRACE("Got sample %u.\n", req - filter->requests); TRACE("Got sample %Iu.\n", req - filter->requests);
assert(req >= filter->requests && req < filter->requests + filter->max_requests); assert(req >= filter->requests && req < filter->requests + filter->max_requests);
if (ret) if (ret)
WakeConditionVariable(&filter->sample_cv); WakeConditionVariable(&filter->sample_cv);
else else
{ {
ERR("GetQueuedCompletionStatus() returned failure, error %u.\n", GetLastError()); ERR("GetQueuedCompletionStatus() returned failure, error %lu.\n", GetLastError());
req->sample = NULL; req->sample = NULL;
} }
...@@ -624,7 +624,6 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_sourc ...@@ -624,7 +624,6 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_sourc
FreeMediaType(&This->pin.mt); FreeMediaType(&This->pin.mt);
} }
TRACE(" -- %x\n", hr);
return hr; return hr;
} }
...@@ -712,7 +711,7 @@ static HRESULT WINAPI FileAsyncReader_Request(IAsyncReader *iface, IMediaSample ...@@ -712,7 +711,7 @@ static HRESULT WINAPI FileAsyncReader_Request(IAsyncReader *iface, IMediaSample
HRESULT hr; HRESULT hr;
BYTE *data; BYTE *data;
TRACE("filter %p, sample %p, cookie %#lx.\n", filter, sample, cookie); TRACE("filter %p, sample %p, cookie %#Ix.\n", filter, sample, cookie);
if (!sample) if (!sample)
return E_POINTER; return E_POINTER;
...@@ -765,7 +764,7 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader *iface, ...@@ -765,7 +764,7 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader *iface,
struct async_reader *filter = impl_from_IAsyncReader(iface); struct async_reader *filter = impl_from_IAsyncReader(iface);
unsigned int i; unsigned int i;
TRACE("filter %p, timeout %u, sample %p, cookie %p.\n", filter, timeout, sample, cookie); TRACE("filter %p, timeout %lu, sample %p, cookie %p.\n", filter, timeout, sample, cookie);
*sample = NULL; *sample = NULL;
*cookie = 0; *cookie = 0;
...@@ -824,7 +823,7 @@ static BOOL sync_read(HANDLE file, LONGLONG offset, LONG length, BYTE *buffer, D ...@@ -824,7 +823,7 @@ static BOOL sync_read(HANDLE file, LONGLONG offset, LONG length, BYTE *buffer, D
if (ret || GetLastError() == ERROR_IO_PENDING) if (ret || GetLastError() == ERROR_IO_PENDING)
ret = GetOverlappedResult(file, &ovl, read_len, TRUE); ret = GetOverlappedResult(file, &ovl, read_len, TRUE);
TRACE("Returning %u bytes.\n", *read_len); TRACE("Returning %lu bytes.\n", *read_len);
CloseHandle(ovl.hEvent); CloseHandle(ovl.hEvent);
return ret; return ret;
...@@ -873,7 +872,7 @@ static HRESULT WINAPI FileAsyncReader_SyncRead(IAsyncReader *iface, ...@@ -873,7 +872,7 @@ static HRESULT WINAPI FileAsyncReader_SyncRead(IAsyncReader *iface,
HRESULT hr; HRESULT hr;
BOOL ret; BOOL ret;
TRACE("filter %p, offset %s, length %d, buffer %p.\n", TRACE("filter %p, offset %s, length %ld, buffer %p.\n",
filter, wine_dbgstr_longlong(offset), length, buffer); filter, wine_dbgstr_longlong(offset), length, buffer);
ret = sync_read(filter->file, offset, length, buffer, &read_len); ret = sync_read(filter->file, offset, length, buffer, &read_len);
......
...@@ -260,13 +260,13 @@ const char * qzdebugstr_guid( const GUID * id ) ...@@ -260,13 +260,13 @@ const char * qzdebugstr_guid( const GUID * id )
return debugstr_guid(id); return debugstr_guid(id);
} }
LONG WINAPI AmpFactorToDB(LONG ampfactor) int WINAPI AmpFactorToDB(int ampfactor)
{ {
FIXME("(%d) Stub!\n", ampfactor); FIXME("(%d) Stub!\n", ampfactor);
return 0; return 0;
} }
LONG WINAPI DBToAmpFactor(LONG db) int WINAPI DBToAmpFactor(int db)
{ {
FIXME("(%d) Stub!\n", db); FIXME("(%d) Stub!\n", db);
/* Avoid divide by zero (probably during range computation) in Windows Media Player 6.4 */ /* Avoid divide by zero (probably during range computation) in Windows Media Player 6.4 */
...@@ -283,7 +283,8 @@ DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen) ...@@ -283,7 +283,8 @@ DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen)
DWORD res; DWORD res;
WCHAR errorW[MAX_ERROR_TEXT_LEN]; WCHAR errorW[MAX_ERROR_TEXT_LEN];
TRACE("(%x,%p,%d)\n", hr, buffer, maxlen); TRACE("hr %#lx, buffer %p, maxlen %lu.\n", hr, buffer, maxlen);
if (!buffer) if (!buffer)
return 0; return 0;
...@@ -305,7 +306,7 @@ DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR buffer, DWORD maxlen) ...@@ -305,7 +306,7 @@ DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR buffer, DWORD maxlen)
unsigned int len; unsigned int len;
WCHAR error[MAX_ERROR_TEXT_LEN]; WCHAR error[MAX_ERROR_TEXT_LEN];
FIXME("(%x,%p,%d) stub\n", hr, buffer, maxlen); TRACE("hr %#lx, buffer %p, maxlen %lu.\n", hr, buffer, maxlen);
if (!buffer) return 0; if (!buffer) return 0;
swprintf(error, ARRAY_SIZE(error), L"Error: 0x%lx", hr); swprintf(error, ARRAY_SIZE(error), L"Error: 0x%lx", hr);
......
...@@ -135,7 +135,7 @@ static ULONG WINAPI BaseMemAllocator_AddRef(IMemAllocator * iface) ...@@ -135,7 +135,7 @@ static ULONG WINAPI BaseMemAllocator_AddRef(IMemAllocator * iface)
BaseMemAllocator *This = impl_from_IMemAllocator(iface); BaseMemAllocator *This = impl_from_IMemAllocator(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->() AddRef from %d\n", iface, ref - 1); TRACE("%p increasing refcount to %lu.\n", This, ref);
return ref; return ref;
} }
...@@ -145,7 +145,7 @@ static ULONG WINAPI BaseMemAllocator_Release(IMemAllocator * iface) ...@@ -145,7 +145,7 @@ static ULONG WINAPI BaseMemAllocator_Release(IMemAllocator * iface)
BaseMemAllocator *This = impl_from_IMemAllocator(iface); BaseMemAllocator *This = impl_from_IMemAllocator(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->() Release from %d\n", iface, ref + 1); TRACE("%p decreasing refcount to %lu.\n", This, ref);
if (!ref) if (!ref)
{ {
...@@ -166,7 +166,7 @@ static HRESULT WINAPI BaseMemAllocator_SetProperties(IMemAllocator * iface, ALLO ...@@ -166,7 +166,7 @@ static HRESULT WINAPI BaseMemAllocator_SetProperties(IMemAllocator * iface, ALLO
TRACE("(%p)->(%p, %p)\n", This, pRequest, pActual); TRACE("(%p)->(%p, %p)\n", This, pRequest, pActual);
TRACE("Requested %d buffers, size %d, alignment %d, prefix %d.\n", TRACE("Requested %ld buffers, size %ld, alignment %ld, prefix %ld.\n",
pRequest->cBuffers, pRequest->cbBuffer, pRequest->cbAlign, pRequest->cbPrefix); pRequest->cBuffers, pRequest->cbBuffer, pRequest->cbAlign, pRequest->cbPrefix);
EnterCriticalSection(This->pCritSect); EnterCriticalSection(This->pCritSect);
...@@ -236,7 +236,7 @@ static HRESULT WINAPI BaseMemAllocator_Commit(IMemAllocator * iface) ...@@ -236,7 +236,7 @@ static HRESULT WINAPI BaseMemAllocator_Commit(IMemAllocator * iface)
{ {
if (!(This->hSemWaiting = CreateSemaphoreW(NULL, This->props.cBuffers, This->props.cBuffers, NULL))) if (!(This->hSemWaiting = CreateSemaphoreW(NULL, This->props.cBuffers, This->props.cBuffers, NULL)))
{ {
ERR("Couldn't create semaphore (error was %u)\n", GetLastError()); ERR("Failed to create semaphore, error %lu.\n", GetLastError());
hr = HRESULT_FROM_WIN32(GetLastError()); hr = HRESULT_FROM_WIN32(GetLastError());
} }
else else
...@@ -245,7 +245,7 @@ static HRESULT WINAPI BaseMemAllocator_Commit(IMemAllocator * iface) ...@@ -245,7 +245,7 @@ static HRESULT WINAPI BaseMemAllocator_Commit(IMemAllocator * iface)
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
This->bCommitted = TRUE; This->bCommitted = TRUE;
else else
ERR("fnAlloc failed with error 0x%x\n", hr); ERR("Failed to allocate, hr %#lx.\n", hr);
} }
} }
} }
...@@ -278,15 +278,13 @@ static HRESULT WINAPI BaseMemAllocator_Decommit(IMemAllocator * iface) ...@@ -278,15 +278,13 @@ static HRESULT WINAPI BaseMemAllocator_Decommit(IMemAllocator * iface)
else else
{ {
if (This->lWaiting != 0) if (This->lWaiting != 0)
ERR("Waiting: %d\n", This->lWaiting); ERR("Waiting: %ld\n", This->lWaiting);
This->bCommitted = FALSE; This->bCommitted = FALSE;
CloseHandle(This->hSemWaiting); CloseHandle(This->hSemWaiting);
This->hSemWaiting = NULL; This->hSemWaiting = NULL;
hr = This->fnFree(iface); hr = This->fnFree(iface);
if (FAILED(hr))
ERR("fnFree failed with error 0x%x\n", hr);
} }
} }
} }
...@@ -302,8 +300,9 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa ...@@ -302,8 +300,9 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa
/* NOTE: The pStartTime and pEndTime parameters are not applied to the sample. /* NOTE: The pStartTime and pEndTime parameters are not applied to the sample.
* The allocator might use these values to determine which buffer it retrieves */ * The allocator might use these values to determine which buffer it retrieves */
TRACE("(%p)->(%p, %p, %p, %x)\n", This, pSample, pStartTime, pEndTime, dwFlags); TRACE("allocator %p, sample %p, start_time %p, end_time %p, flags %#lx.\n",
This, pSample, pStartTime, pEndTime, dwFlags);
*pSample = NULL; *pSample = NULL;
...@@ -351,7 +350,7 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa ...@@ -351,7 +350,7 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa
LeaveCriticalSection(This->pCritSect); LeaveCriticalSection(This->pCritSect);
if (hr != S_OK) if (hr != S_OK)
WARN("%08x\n", hr); WARN("Returning hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -379,10 +378,8 @@ static HRESULT WINAPI BaseMemAllocator_ReleaseBuffer(IMemAllocator * iface, IMed ...@@ -379,10 +378,8 @@ static HRESULT WINAPI BaseMemAllocator_ReleaseBuffer(IMemAllocator * iface, IMed
if (list_empty(&This->used_list) && This->bDecommitQueued && This->bCommitted) if (list_empty(&This->used_list) && This->bDecommitQueued && This->bCommitted)
{ {
HRESULT hrfree;
if (This->lWaiting != 0) if (This->lWaiting != 0)
ERR("Waiting: %d\n", This->lWaiting); ERR("Waiting: %ld\n", This->lWaiting);
This->bCommitted = FALSE; This->bCommitted = FALSE;
This->bDecommitQueued = FALSE; This->bDecommitQueued = FALSE;
...@@ -390,8 +387,7 @@ static HRESULT WINAPI BaseMemAllocator_ReleaseBuffer(IMemAllocator * iface, IMed ...@@ -390,8 +387,7 @@ static HRESULT WINAPI BaseMemAllocator_ReleaseBuffer(IMemAllocator * iface, IMed
CloseHandle(This->hSemWaiting); CloseHandle(This->hSemWaiting);
This->hSemWaiting = NULL; This->hSemWaiting = NULL;
if (FAILED(hrfree = This->fnFree(iface))) This->fnFree(iface);
ERR("fnFree failed with error 0x%x\n", hrfree);
} }
} }
LeaveCriticalSection(This->pCritSect); LeaveCriticalSection(This->pCritSect);
...@@ -399,7 +395,7 @@ static HRESULT WINAPI BaseMemAllocator_ReleaseBuffer(IMemAllocator * iface, IMed ...@@ -399,7 +395,7 @@ static HRESULT WINAPI BaseMemAllocator_ReleaseBuffer(IMemAllocator * iface, IMed
/* notify a waiting thread that there is now a free buffer */ /* notify a waiting thread that there is now a free buffer */
if (This->hSemWaiting && !ReleaseSemaphore(This->hSemWaiting, 1, NULL)) if (This->hSemWaiting && !ReleaseSemaphore(This->hSemWaiting, 1, NULL))
{ {
ERR("ReleaseSemaphore failed with error %u\n", GetLastError()); ERR("Failed to release semaphore, error %lu.\n", GetLastError());
hr = HRESULT_FROM_WIN32(GetLastError()); hr = HRESULT_FROM_WIN32(GetLastError());
} }
...@@ -479,7 +475,7 @@ static ULONG WINAPI StdMediaSample2_AddRef(IMediaSample2 * iface) ...@@ -479,7 +475,7 @@ static ULONG WINAPI StdMediaSample2_AddRef(IMediaSample2 * iface)
StdMediaSample2 *This = impl_from_IMediaSample2(iface); StdMediaSample2 *This = impl_from_IMediaSample2(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(): new ref = %d\n", This, ref); TRACE("%p increasing refcount to %lu.\n", This, ref);
return ref; return ref;
} }
...@@ -489,7 +485,7 @@ static ULONG WINAPI StdMediaSample2_Release(IMediaSample2 * iface) ...@@ -489,7 +485,7 @@ static ULONG WINAPI StdMediaSample2_Release(IMediaSample2 * iface)
StdMediaSample2 *This = impl_from_IMediaSample2(iface); StdMediaSample2 *This = impl_from_IMediaSample2(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(): new ref = %d\n", This, ref); TRACE("%p decreasing refcount to %lu.\n", This, ref);
if (!ref) if (!ref)
{ {
...@@ -645,11 +641,11 @@ static HRESULT WINAPI StdMediaSample2_SetActualDataLength(IMediaSample2 * iface, ...@@ -645,11 +641,11 @@ static HRESULT WINAPI StdMediaSample2_SetActualDataLength(IMediaSample2 * iface,
{ {
StdMediaSample2 *This = impl_from_IMediaSample2(iface); StdMediaSample2 *This = impl_from_IMediaSample2(iface);
TRACE("(%p)->(%d)\n", iface, len); TRACE("sample %p, len %ld.\n", This, len);
if ((len > This->props.cbBuffer) || (len < 0)) if ((len > This->props.cbBuffer) || (len < 0))
{ {
WARN("Tried to set length to %d, while max is %d\n", len, This->props.cbBuffer); ERR("Length %ld exceeds maximum %ld.\n", len, This->props.cbBuffer);
return VFW_E_BUFFER_OVERFLOW; return VFW_E_BUFFER_OVERFLOW;
} }
else else
...@@ -766,7 +762,7 @@ static HRESULT WINAPI StdMediaSample2_GetProperties(IMediaSample2 * iface, DWORD ...@@ -766,7 +762,7 @@ static HRESULT WINAPI StdMediaSample2_GetProperties(IMediaSample2 * iface, DWORD
{ {
StdMediaSample2 *This = impl_from_IMediaSample2(iface); StdMediaSample2 *This = impl_from_IMediaSample2(iface);
TRACE("(%p)->(%d, %p)\n", iface, cbProperties, pbProperties); TRACE("sample %p, size %lu, properties %p.\n", This, cbProperties, pbProperties);
memcpy(pbProperties, &This->props, min(cbProperties, sizeof(This->props))); memcpy(pbProperties, &This->props, min(cbProperties, sizeof(This->props)));
...@@ -777,7 +773,7 @@ static HRESULT WINAPI StdMediaSample2_SetProperties(IMediaSample2 * iface, DWORD ...@@ -777,7 +773,7 @@ static HRESULT WINAPI StdMediaSample2_SetProperties(IMediaSample2 * iface, DWORD
{ {
StdMediaSample2 *This = impl_from_IMediaSample2(iface); StdMediaSample2 *This = impl_from_IMediaSample2(iface);
TRACE("(%p)->(%d, %p)\n", iface, cbProperties, pbProperties); TRACE("sample %p, size %lu, properties %p.\n", This, cbProperties, pbProperties);
/* NOTE: pbBuffer and cbBuffer are read-only */ /* NOTE: pbBuffer and cbBuffer are read-only */
memcpy(&This->props, pbProperties, min(cbProperties, AM_SAMPLE2_PROP_SIZE_WRITABLE)); memcpy(&This->props, pbProperties, min(cbProperties, AM_SAMPLE2_PROP_SIZE_WRITABLE));
...@@ -896,7 +892,7 @@ static HRESULT StdMemAllocator_Free(IMemAllocator * iface) ...@@ -896,7 +892,7 @@ static HRESULT StdMemAllocator_Free(IMemAllocator * iface)
/* free memory */ /* free memory */
if (!VirtualFree(This->pMemory, 0, MEM_RELEASE)) if (!VirtualFree(This->pMemory, 0, MEM_RELEASE))
{ {
ERR("Couldn't free memory. Error: %u\n", GetLastError()); ERR("Failed to free memory, error %lu.\n", GetLastError());
return HRESULT_FROM_WIN32(GetLastError()); return HRESULT_FROM_WIN32(GetLastError());
} }
......
...@@ -66,7 +66,7 @@ static ULONG WINAPI seeking_passthrough_AddRef(IUnknown *iface) ...@@ -66,7 +66,7 @@ static ULONG WINAPI seeking_passthrough_AddRef(IUnknown *iface)
struct seeking_passthrough *passthrough = impl_from_IUnknown(iface); struct seeking_passthrough *passthrough = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&passthrough->refcount); ULONG refcount = InterlockedIncrement(&passthrough->refcount);
TRACE("%p increasing refcount to %u.\n", passthrough, refcount); TRACE("%p increasing refcount to %lu.\n", passthrough, refcount);
return refcount; return refcount;
} }
...@@ -75,7 +75,7 @@ static ULONG WINAPI seeking_passthrough_Release(IUnknown *iface) ...@@ -75,7 +75,7 @@ static ULONG WINAPI seeking_passthrough_Release(IUnknown *iface)
struct seeking_passthrough *passthrough = impl_from_IUnknown(iface); struct seeking_passthrough *passthrough = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&passthrough->refcount); ULONG refcount = InterlockedDecrement(&passthrough->refcount);
TRACE("%p decreasing refcount to %u.\n", passthrough, refcount); TRACE("%p decreasing refcount to %lu.\n", passthrough, refcount);
if (!refcount) if (!refcount)
{ {
strmbase_passthrough_cleanup(&passthrough->passthrough); strmbase_passthrough_cleanup(&passthrough->passthrough);
......
...@@ -127,7 +127,7 @@ static HRESULT register_filters(struct regsvr_filter const *list) ...@@ -127,7 +127,7 @@ static HRESULT register_filters(struct regsvr_filter const *list)
} }
if (FAILED(hr)) { if (FAILED(hr)) {
ERR("failed to register with hresult 0x%x\n", hr); ERR("failed to register with hresult %#lx\n", hr);
CoTaskMemFree(prfp2); CoTaskMemFree(prfp2);
break; break;
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz); WINE_DEFAULT_DEBUG_CHANNEL(quartz);
static int cookie_counter; static LONG cookie_counter;
struct advise_sink struct advise_sink
{ {
...@@ -42,7 +42,8 @@ struct system_clock ...@@ -42,7 +42,8 @@ struct system_clock
IUnknown *outer_unk; IUnknown *outer_unk;
LONG refcount; LONG refcount;
BOOL thread_created, thread_stopped; LONG thread_created;
BOOL thread_stopped;
HANDLE thread; HANDLE thread;
LARGE_INTEGER frequency; LARGE_INTEGER frequency;
REFERENCE_TIME last_time; REFERENCE_TIME last_time;
...@@ -90,7 +91,7 @@ static ULONG WINAPI system_clock_inner_AddRef(IUnknown *iface) ...@@ -90,7 +91,7 @@ static ULONG WINAPI system_clock_inner_AddRef(IUnknown *iface)
struct system_clock *clock = impl_from_IUnknown(iface); struct system_clock *clock = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&clock->refcount); ULONG refcount = InterlockedIncrement(&clock->refcount);
TRACE("%p increasing refcount to %u.\n", clock, refcount); TRACE("%p increasing refcount to %lu.\n", clock, refcount);
return refcount; return refcount;
} }
...@@ -101,7 +102,7 @@ static ULONG WINAPI system_clock_inner_Release(IUnknown *iface) ...@@ -101,7 +102,7 @@ static ULONG WINAPI system_clock_inner_Release(IUnknown *iface)
ULONG refcount = InterlockedDecrement(&clock->refcount); ULONG refcount = InterlockedDecrement(&clock->refcount);
struct advise_sink *sink, *cursor; struct advise_sink *sink, *cursor;
TRACE("%p decreasing refcount to %u.\n", clock, refcount); TRACE("%p decreasing refcount to %lu.\n", clock, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -267,7 +268,7 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock *iface, ...@@ -267,7 +268,7 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock *iface,
{ {
struct system_clock *clock = impl_from_IReferenceClock(iface); struct system_clock *clock = impl_from_IReferenceClock(iface);
TRACE("clock %p, base %s, offset %s, event %#lx, cookie %p.\n", TRACE("clock %p, base %s, offset %s, event %#Ix, cookie %p.\n",
clock, debugstr_time(base), debugstr_time(offset), event, cookie); clock, debugstr_time(base), debugstr_time(offset), event, cookie);
if (base + offset <= 0) if (base + offset <= 0)
...@@ -281,7 +282,7 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, ...@@ -281,7 +282,7 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface,
{ {
struct system_clock *clock = impl_from_IReferenceClock(iface); struct system_clock *clock = impl_from_IReferenceClock(iface);
TRACE("clock %p, start %s, period %s, semaphore %#lx, cookie %p.\n", TRACE("clock %p, start %s, period %s, semaphore %#Ix, cookie %p.\n",
clock, debugstr_time(start), debugstr_time(period), semaphore, cookie); clock, debugstr_time(start), debugstr_time(period), semaphore, cookie);
if (start <= 0 || period <= 0) if (start <= 0 || period <= 0)
...@@ -295,7 +296,7 @@ static HRESULT WINAPI SystemClockImpl_Unadvise(IReferenceClock *iface, DWORD_PTR ...@@ -295,7 +296,7 @@ static HRESULT WINAPI SystemClockImpl_Unadvise(IReferenceClock *iface, DWORD_PTR
struct system_clock *clock = impl_from_IReferenceClock(iface); struct system_clock *clock = impl_from_IReferenceClock(iface);
struct advise_sink *sink; struct advise_sink *sink;
TRACE("clock %p, cookie %#lx.\n", clock, cookie); TRACE("clock %p, cookie %#Ix.\n", clock, cookie);
EnterCriticalSection(&clock->cs); EnterCriticalSection(&clock->cs);
......
...@@ -92,7 +92,7 @@ static HRESULT video_renderer_render(struct strmbase_renderer *iface, IMediaSamp ...@@ -92,7 +92,7 @@ static HRESULT video_renderer_render(struct strmbase_renderer *iface, IMediaSamp
hr = IMediaSample_GetPointer(pSample, &pbSrcStream); hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("Cannot get pointer to sample data (%x)\n", hr); ERR("Failed to get buffer pointer, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -277,7 +277,7 @@ static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface, ...@@ -277,7 +277,7 @@ static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface,
{ {
struct video_renderer *This = impl_from_IVideoWindow(iface); struct video_renderer *This = impl_from_IVideoWindow(iface);
TRACE("(%p/%p)->(%p): %d\n", This, iface, FullScreenMode, This->FullScreenMode); TRACE("window %p, fullscreen %p.\n", This, FullScreenMode);
if (!FullScreenMode) if (!FullScreenMode)
return E_POINTER; return E_POINTER;
...@@ -292,7 +292,7 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG f ...@@ -292,7 +292,7 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG f
struct video_renderer *filter = impl_from_IVideoWindow(iface); struct video_renderer *filter = impl_from_IVideoWindow(iface);
HWND window = filter->window.hwnd; HWND window = filter->window.hwnd;
FIXME("filter %p, fullscreen %d.\n", filter, fullscreen); FIXME("filter %p, fullscreen %ld.\n", filter, fullscreen);
if (fullscreen) if (fullscreen)
{ {
...@@ -399,7 +399,7 @@ static HRESULT WINAPI overlay_GetPalette(IOverlay *iface, DWORD *count, PALETTEE ...@@ -399,7 +399,7 @@ static HRESULT WINAPI overlay_GetPalette(IOverlay *iface, DWORD *count, PALETTEE
static HRESULT WINAPI overlay_SetPalette(IOverlay *iface, DWORD count, PALETTEENTRY *palette) static HRESULT WINAPI overlay_SetPalette(IOverlay *iface, DWORD count, PALETTEENTRY *palette)
{ {
FIXME("iface %p, count %u, palette %p, stub!\n", iface, count, palette); FIXME("iface %p, count %lu, palette %p, stub!\n", iface, count, palette);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -445,7 +445,7 @@ static HRESULT WINAPI overlay_GetVideoPosition(IOverlay *iface, RECT *source, RE ...@@ -445,7 +445,7 @@ static HRESULT WINAPI overlay_GetVideoPosition(IOverlay *iface, RECT *source, RE
static HRESULT WINAPI overlay_Advise(IOverlay *iface, IOverlayNotify *sink, DWORD flags) static HRESULT WINAPI overlay_Advise(IOverlay *iface, IOverlayNotify *sink, DWORD flags)
{ {
FIXME("iface %p, sink %p, flags %#x, stub!\n", iface, sink, flags); FIXME("iface %p, sink %p, flags %#lx, stub!\n", iface, sink, flags);
return E_NOTIMPL; return E_NOTIMPL;
} }
......
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