Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2012-02-05 13:27:07 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2012-02-05 13:27:07 +0400
commit6cb2939b677159a85147c6500835c194ee1ccf86 (patch)
tree54994b57d8df3203b276d15ee73c46d227ea6826 /src/filters/muxer/WavDest
parente736ccc10964dfcd571d1b0f07327819c31a63a9 (diff)
apply astyle
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4039 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/muxer/WavDest')
-rw-r--r--src/filters/muxer/WavDest/WavDest.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/filters/muxer/WavDest/WavDest.cpp b/src/filters/muxer/WavDest/WavDest.cpp
index 05d68a2a5..ca876cf74 100644
--- a/src/filters/muxer/WavDest/WavDest.cpp
+++ b/src/filters/muxer/WavDest/WavDest.cpp
@@ -73,9 +73,9 @@ CFilterApp theApp;
CWavDestFilter::CWavDestFilter(LPUNKNOWN pUnk, HRESULT* phr)
: CTransformFilter(NAME("WavDest filter"), pUnk, __uuidof(this))
{
- if(SUCCEEDED(*phr)) {
- if(CWavDestOutputPin* pOut = DNew CWavDestOutputPin(this, phr)) {
- if(SUCCEEDED(*phr)) {
+ if (SUCCEEDED(*phr)) {
+ if (CWavDestOutputPin* pOut = DNew CWavDestOutputPin(this, phr)) {
+ if (SUCCEEDED(*phr)) {
m_pOutput = pOut;
} else {
delete pOut;
@@ -85,8 +85,8 @@ CWavDestFilter::CWavDestFilter(LPUNKNOWN pUnk, HRESULT* phr)
return;
}
- if(CTransformInputPin* pIn = DNew CTransformInputPin(NAME("Transform input pin"), this, phr, L"In")) {
- if(SUCCEEDED(*phr)) {
+ if (CTransformInputPin* pIn = DNew CTransformInputPin(NAME("Transform input pin"), this, phr, L"In")) {
+ if (SUCCEEDED(*phr)) {
m_pInput = pIn;
} else {
delete pIn;
@@ -113,7 +113,7 @@ HRESULT CWavDestFilter::Receive(IMediaSample* pSample)
HRESULT hr = CTransformFilter::Receive(pSample);
// don't update the count if Deliver() downstream fails.
- if(hr != S_OK) {
+ if (hr != S_OK) {
m_cbWavData = cbOld;
}
@@ -125,14 +125,14 @@ HRESULT CWavDestFilter::Transform(IMediaSample* pIn, IMediaSample* pOut)
REFERENCE_TIME rtStart, rtEnd;
HRESULT hr = Copy(pIn, pOut);
- if(FAILED(hr)) {
+ if (FAILED(hr)) {
return hr;
}
// Prepare it for writing
LONG lActual = pOut->GetActualDataLength();
- if(m_cbWavData + m_cbHeader + lActual < m_cbWavData + m_cbHeader ) { // overflow
+ if (m_cbWavData + m_cbHeader + lActual < m_cbWavData + m_cbHeader ) { // overflow
return E_FAIL;
}
@@ -163,12 +163,12 @@ HRESULT CWavDestFilter::Copy(IMediaSample* pSource, IMediaSample* pDest) const
// Copy the sample times
REFERENCE_TIME TimeStart, TimeEnd;
- if(NOERROR == pSource->GetTime(&TimeStart, &TimeEnd)) {
+ if (NOERROR == pSource->GetTime(&TimeStart, &TimeEnd)) {
pDest->SetTime(&TimeStart, &TimeEnd);
}
LONGLONG MediaStart, MediaEnd;
- if(pSource->GetMediaTime(&MediaStart, &MediaEnd) == NOERROR) {
+ if (pSource->GetMediaTime(&MediaStart, &MediaEnd) == NOERROR) {
pDest->SetMediaTime(&MediaStart, &MediaEnd);
}
@@ -194,7 +194,7 @@ HRESULT CWavDestFilter::GetMediaType(int iPosition, CMediaType* pMediaType)
{
ASSERT(iPosition == 0 || iPosition == 1);
- if(iPosition == 0) {
+ if (iPosition == 0) {
pMediaType->SetType(&MEDIATYPE_Stream);
pMediaType->SetSubtype(&MEDIASUBTYPE_WAVE);
return S_OK;
@@ -205,7 +205,7 @@ HRESULT CWavDestFilter::GetMediaType(int iPosition, CMediaType* pMediaType)
HRESULT CWavDestFilter::DecideBufferSize(IMemAllocator* pAlloc, ALLOCATOR_PROPERTIES* pProperties)
{
- if(m_pInput->IsConnected() == FALSE) {
+ if (m_pInput->IsConnected() == FALSE) {
return E_UNEXPECTED;
}
@@ -219,7 +219,7 @@ HRESULT CWavDestFilter::DecideBufferSize(IMemAllocator* pAlloc, ALLOCATOR_PROPER
CComPtr<IMemAllocator> pInAlloc;
ALLOCATOR_PROPERTIES InProps;
- if(SUCCEEDED(hr = m_pInput->GetAllocator(&pInAlloc))
+ if (SUCCEEDED(hr = m_pInput->GetAllocator(&pInAlloc))
&& SUCCEEDED(hr = pInAlloc->GetProperties(&InProps))) {
pProperties->cbBuffer = InProps.cbBuffer;
} else {
@@ -229,13 +229,13 @@ HRESULT CWavDestFilter::DecideBufferSize(IMemAllocator* pAlloc, ALLOCATOR_PROPER
ASSERT(pProperties->cbBuffer);
ALLOCATOR_PROPERTIES Actual;
- if(FAILED(hr = pAlloc->SetProperties(pProperties,&Actual))) {
+ if (FAILED(hr = pAlloc->SetProperties(pProperties,&Actual))) {
return hr;
}
ASSERT(Actual.cBuffers == 1);
- if(pProperties->cBuffers > Actual.cBuffers
+ if (pProperties->cBuffers > Actual.cBuffers
|| pProperties->cbBuffer > Actual.cbBuffer) {
return E_FAIL;
}
@@ -278,7 +278,7 @@ HRESULT CWavDestFilter::StopStreaming()
}
HRESULT hr = ((IMemInputPin *) pDwnstrmInputPin)->QueryInterface(IID_IStream, (void **)&pStream);
- if(SUCCEEDED(hr)) {
+ if (SUCCEEDED(hr)) {
BYTE *pb = (BYTE *)_alloca(m_cbHeader);
RIFFLIST *pRiffWave = (RIFFLIST *)pb;
@@ -300,7 +300,7 @@ HRESULT CWavDestFilter::StopStreaming()
ZeroMemory(&li, sizeof(li));
hr = pStream->Seek(li, STREAM_SEEK_SET, 0);
- if(SUCCEEDED(hr)) {
+ if (SUCCEEDED(hr)) {
hr = pStream->Write(pb, m_cbHeader, 0);
}
pStream->Release();
@@ -321,7 +321,7 @@ STDMETHODIMP CWavDestOutputPin::EnumMediaTypes(IEnumMediaTypes** ppEnum)
HRESULT CWavDestOutputPin::CheckMediaType(const CMediaType* pmt)
{
- if(pmt->majortype == MEDIATYPE_Stream && pmt->subtype == MEDIASUBTYPE_WAVE) {
+ if (pmt->majortype == MEDIATYPE_Stream && pmt->subtype == MEDIASUBTYPE_WAVE) {
return S_OK;
} else {
return S_FALSE;