quartz: Remove tabs from acmwrapper.c
Chris Robinson
chris.kcat at gmail.com
Wed Mar 28 00:28:38 CDT 2007
-------------- next part --------------
From 1d705e01e69df16e0d2f1802f0710195818afd8a Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat at gmail.com>
Date: Tue, 27 Mar 2007 22:27:20 -0700
Subject: [PATCH] quartz: Remove tabs from acmwrapper.c
---
dlls/quartz/acmwrapper.c | 174 +++++++++++++++++++++++-----------------------
1 files changed, 87 insertions(+), 87 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
index 344779c..bf1753b 100644
--- a/dlls/quartz/acmwrapper.c
+++ b/dlls/quartz/acmwrapper.c
@@ -77,78 +77,78 @@ static HRESULT ACMWrapper_ProcessSampleData(TransformFilterImpl* pTransformFilte
hr = IPin_ConnectionMediaType(This->tf.ppPins[0], &amt);
if (FAILED(hr)) {
- ERR("Unable to retrieve media type\n");
- return hr;
+ ERR("Unable to retrieve media type\n");
+ return hr;
}
while(!stop)
{
- DWORD rem_buf = This->max_size - This->current_size;
- DWORD rem_smp = size - offset;
- DWORD copy_size = min(rem_buf, rem_smp);
-
- memcpy(This->buffer + This->current_size, data + offset, copy_size);
- This->current_size += copy_size;
- offset += copy_size;
-
- if (offset >= size)
- stop = TRUE;
- if (This->current_size < This->max_size)
- break;
+ DWORD rem_buf = This->max_size - This->current_size;
+ DWORD rem_smp = size - offset;
+ DWORD copy_size = min(rem_buf, rem_smp);
+
+ memcpy(This->buffer + This->current_size, data + offset, copy_size);
+ This->current_size += copy_size;
+ offset += copy_size;
+
+ if (offset >= size)
+ stop = TRUE;
+ if (This->current_size < This->max_size)
+ break;
- hr = OutputPin_GetDeliveryBuffer((OutputPin*)This->tf.ppPins[1], &pSample, NULL, NULL, 0);
- if (FAILED(hr)) {
- ERR("Unable to get delivery buffer (%x)\n", hr);
- return hr;
- }
-
- hr = IMediaSample_SetActualDataLength(pSample, 0);
- assert(hr == S_OK);
-
- hr = IMediaSample_GetPointer(pSample, &pbDstStream);
- if (FAILED(hr)) {
- ERR("Unable to get pointer to buffer (%x)\n", hr);
- goto error;
- }
- cbDstStream = IMediaSample_GetSize(pSample);
-
- ash.cbStruct = sizeof(ash);
- ash.fdwStatus = 0;
- ash.dwUser = 0;
- ash.pbSrc = This->buffer;
- ash.cbSrcLength = This->current_size;
- ash.pbDst = pbDstStream;
- ash.cbDstLength = cbDstStream;
-
- if ((res = acmStreamPrepareHeader(This->has, &ash, 0))) {
- ERR("Cannot prepare header %d\n", res);
- goto error;
- }
-
- unprepare_header = TRUE;
-
- if ((res = acmStreamConvert(This->has, &ash, This->reinit_codec ? ACM_STREAMCONVERTF_START : 0))) {
- ERR("Cannot convert data header %d\n", res);
- goto error;
- }
- This->reinit_codec = FALSE;
-
- TRACE("used in %u, used out %u\n", ash.cbSrcLengthUsed, ash.cbDstLengthUsed);
-
- hr = IMediaSample_SetActualDataLength(pSample, ash.cbDstLengthUsed);
- assert(hr == S_OK);
-
- if (ash.cbSrcLengthUsed < ash.cbSrcLength) {
- This->current_size = ash.cbSrcLength - ash.cbSrcLengthUsed;
- memmove(This->buffer, This->buffer + ash.cbSrcLengthUsed, This->current_size);
- }
- else
- This->current_size = 0;
-
- hr = OutputPin_SendSample((OutputPin*)This->tf.ppPins[1], pSample);
- if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) {
- ERR("Error sending sample (%x)\n", hr);
- goto error;
+ hr = OutputPin_GetDeliveryBuffer((OutputPin*)This->tf.ppPins[1], &pSample, NULL, NULL, 0);
+ if (FAILED(hr)) {
+ ERR("Unable to get delivery buffer (%x)\n", hr);
+ return hr;
+ }
+
+ hr = IMediaSample_SetActualDataLength(pSample, 0);
+ assert(hr == S_OK);
+
+ hr = IMediaSample_GetPointer(pSample, &pbDstStream);
+ if (FAILED(hr)) {
+ ERR("Unable to get pointer to buffer (%x)\n", hr);
+ goto error;
+ }
+ cbDstStream = IMediaSample_GetSize(pSample);
+
+ ash.cbStruct = sizeof(ash);
+ ash.fdwStatus = 0;
+ ash.dwUser = 0;
+ ash.pbSrc = This->buffer;
+ ash.cbSrcLength = This->current_size;
+ ash.pbDst = pbDstStream;
+ ash.cbDstLength = cbDstStream;
+
+ if ((res = acmStreamPrepareHeader(This->has, &ash, 0))) {
+ ERR("Cannot prepare header %d\n", res);
+ goto error;
+ }
+
+ unprepare_header = TRUE;
+
+ if ((res = acmStreamConvert(This->has, &ash, This->reinit_codec ? ACM_STREAMCONVERTF_START : 0))) {
+ ERR("Cannot convert data header %d\n", res);
+ goto error;
+ }
+ This->reinit_codec = FALSE;
+
+ TRACE("used in %u, used out %u\n", ash.cbSrcLengthUsed, ash.cbDstLengthUsed);
+
+ hr = IMediaSample_SetActualDataLength(pSample, ash.cbDstLengthUsed);
+ assert(hr == S_OK);
+
+ if (ash.cbSrcLengthUsed < ash.cbSrcLength) {
+ This->current_size = ash.cbSrcLength - ash.cbSrcLengthUsed;
+ memmove(This->buffer, This->buffer + ash.cbSrcLengthUsed, This->current_size);
+ }
+ else
+ This->current_size = 0;
+
+ hr = OutputPin_SendSample((OutputPin*)This->tf.ppPins[1], pSample);
+ if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) {
+ ERR("Error sending sample (%x)\n", hr);
+ goto error;
}
error:
@@ -180,40 +180,40 @@ static HRESULT ACMWrapper_ConnectInput(TransformFilterImpl* pTransformFilter, co
AM_MEDIA_TYPE* outpmt = &((OutputPin*)This->tf.ppPins[1])->pin.mtCurrent;
This->pWfIn = (LPWAVEFORMATEX)pmt->pbFormat;
- /* HACK */
- /* TRACE("ALIGN = %d\n", pACMWrapper->pWfIn->nBlockAlign); */
- /* pACMWrapper->pWfIn->nBlockAlign = 1; */
+ /* HACK */
+ /* TRACE("ALIGN = %d\n", pACMWrapper->pWfIn->nBlockAlign); */
+ /* pACMWrapper->pWfIn->nBlockAlign = 1; */
- /* Set output audio data to PCM */
+ /* Set output audio data to PCM */
CopyMediaType(outpmt, pmt);
outpmt->subtype.Data1 = WAVE_FORMAT_PCM;
- This->pWfOut = (WAVEFORMATEX*)outpmt->pbFormat;
- This->pWfOut->wFormatTag = WAVE_FORMAT_PCM;
- This->pWfOut->wBitsPerSample = 16;
- This->pWfOut->nBlockAlign = 4;
- This->pWfOut->cbSize = 0;
- This->pWfOut->nAvgBytesPerSec = This->pWfOut->nChannels * This->pWfOut->nSamplesPerSec
- * (This->pWfOut->wBitsPerSample/8);
+ This->pWfOut = (WAVEFORMATEX*)outpmt->pbFormat;
+ This->pWfOut->wFormatTag = WAVE_FORMAT_PCM;
+ This->pWfOut->wBitsPerSample = 16;
+ This->pWfOut->nBlockAlign = 4;
+ This->pWfOut->cbSize = 0;
+ This->pWfOut->nAvgBytesPerSec = This->pWfOut->nChannels * This->pWfOut->nSamplesPerSec
+ * (This->pWfOut->wBitsPerSample/8);
if (!(res = acmStreamOpen(&drv, NULL, This->pWfIn, This->pWfOut, NULL, 0, 0, 0)))
{
This->has = drv;
- if ((res = acmStreamSize(drv, OUTPUT_BUFFER_SIZE, &This->max_size, ACM_STREAMSIZEF_DESTINATION))) {
- ERR("Cannot retrieve input buffer size error %d!\n", res);
- This->max_size = INPUT_BUFFER_SIZE;
- }
+ if ((res = acmStreamSize(drv, OUTPUT_BUFFER_SIZE, &This->max_size, ACM_STREAMSIZEF_DESTINATION))) {
+ ERR("Cannot retrieve input buffer size error %d!\n", res);
+ This->max_size = INPUT_BUFFER_SIZE;
+ }
- TRACE("input buffer size %d\n", This->max_size);
+ TRACE("input buffer size %d\n", This->max_size);
/* Update buffer size of media samples in output */
((OutputPin*)This->tf.ppPins[1])->allocProps.cbBuffer = OUTPUT_BUFFER_SIZE;
-
+
TRACE("Connection accepted\n");
return S_OK;
}
- else
- FIXME("acmStreamOpen returned %d\n", res);
+ else
+ FIXME("acmStreamOpen returned %d\n", res);
FreeMediaType(outpmt);
TRACE("Unable to find a suitable ACM decompressor\n");
}
@@ -229,7 +229,7 @@ static HRESULT ACMWrapper_Cleanup(TransformFilterImpl* pTransformFilter)
TRACE("(%p)->()\n", This);
if (This->has)
- acmStreamClose(This->has, 0);
+ acmStreamClose(This->has, 0);
This->has = 0;
--
1.4.4.4
More information about the wine-patches
mailing list