diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-07-01 02:13:07 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-07-01 02:13:07 +0400 |
commit | cc4059cc8a6baa8ac84b1e6ee2b410cd5af2f6d3 (patch) | |
tree | 92034db8ae916af70d13b7ccd7ba42fd77838b83 /src/filters/parser/BaseSplitter | |
parent | f48f540221189b2a6861db465465afdd0b0a4275 (diff) |
keep the style constant
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@5320 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/BaseSplitter')
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitter.h | 36 | ||||
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitterFile.h | 6 | ||||
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp | 34 |
3 files changed, 47 insertions, 29 deletions
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.h b/src/filters/parser/BaseSplitter/BaseSplitter.h index 11ce8a999..7aa304780 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitter.h +++ b/src/filters/parser/BaseSplitter/BaseSplitter.h @@ -119,7 +119,7 @@ public: DeleteMediaType(pmt);
}
}
- virtual int GetDataSize() {return (int)GetCount();}
+ virtual int GetDataSize() { return (int)GetCount(); }
void SetData(const void* ptr, DWORD len) {
SetCount(len);
memcpy(GetData(), ptr, len);
@@ -256,7 +256,7 @@ public: HRESULT DecideBufferSize(IMemAllocator* pAlloc, ALLOCATOR_PROPERTIES* pProperties);
HRESULT CheckMediaType(const CMediaType* pmt);
HRESULT GetMediaType(int iPosition, CMediaType* pmt);
- CMediaType& CurrentMediaType() {return m_mt;}
+ CMediaType& CurrentMediaType() { return m_mt; }
STDMETHODIMP Notify(IBaseFilter* pSender, Quality q);
@@ -292,8 +292,8 @@ public: // IBitRateInfo
- STDMETHODIMP_(DWORD) GetCurrentBitRate() {return m_brs.nCurrentBitRate;}
- STDMETHODIMP_(DWORD) GetAverageBitRate() {return m_brs.nAverageBitRate;}
+ STDMETHODIMP_(DWORD) GetCurrentBitRate() { return m_brs.nCurrentBitRate; }
+ STDMETHODIMP_(DWORD) GetAverageBitRate() { return m_brs.nAverageBitRate; }
};
class CBaseSplitterFilter
@@ -434,10 +434,10 @@ public: // IDispatch
- STDMETHODIMP GetTypeInfoCount(UINT* pctinfo) {return E_NOTIMPL;}
- STDMETHODIMP GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo** pptinfo) {return E_NOTIMPL;}
- STDMETHODIMP GetIDsOfNames(REFIID riid, OLECHAR** rgszNames, UINT cNames, LCID lcid, DISPID* rgdispid) {return E_NOTIMPL;}
- STDMETHODIMP Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr) {return E_NOTIMPL;}
+ STDMETHODIMP GetTypeInfoCount(UINT* pctinfo) { return E_NOTIMPL; }
+ STDMETHODIMP GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo** pptinfo) { return E_NOTIMPL; }
+ STDMETHODIMP GetIDsOfNames(REFIID riid, OLECHAR** rgszNames, UINT cNames, LCID lcid, DISPID* rgdispid) { return E_NOTIMPL; }
+ STDMETHODIMP Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr) { return E_NOTIMPL; }
// IAMMediaContent
@@ -446,14 +446,14 @@ public: STDMETHODIMP get_Rating(BSTR* pbstrRating);
STDMETHODIMP get_Description(BSTR* pbstrDescription);
STDMETHODIMP get_Copyright(BSTR* pbstrCopyright);
- STDMETHODIMP get_BaseURL(BSTR* pbstrBaseURL) {return E_NOTIMPL;}
- STDMETHODIMP get_LogoURL(BSTR* pbstrLogoURL) {return E_NOTIMPL;}
- STDMETHODIMP get_LogoIconURL(BSTR* pbstrLogoURL) {return E_NOTIMPL;}
- STDMETHODIMP get_WatermarkURL(BSTR* pbstrWatermarkURL) {return E_NOTIMPL;}
- STDMETHODIMP get_MoreInfoURL(BSTR* pbstrMoreInfoURL) {return E_NOTIMPL;}
- STDMETHODIMP get_MoreInfoBannerImage(BSTR* pbstrMoreInfoBannerImage) {return E_NOTIMPL;}
- STDMETHODIMP get_MoreInfoBannerURL(BSTR* pbstrMoreInfoBannerURL) {return E_NOTIMPL;}
- STDMETHODIMP get_MoreInfoText(BSTR* pbstrMoreInfoText) {return E_NOTIMPL;}
+ STDMETHODIMP get_BaseURL(BSTR* pbstrBaseURL) { return E_NOTIMPL; }
+ STDMETHODIMP get_LogoURL(BSTR* pbstrLogoURL) { return E_NOTIMPL; }
+ STDMETHODIMP get_LogoIconURL(BSTR* pbstrLogoURL) { return E_NOTIMPL; }
+ STDMETHODIMP get_WatermarkURL(BSTR* pbstrWatermarkURL) { return E_NOTIMPL; }
+ STDMETHODIMP get_MoreInfoURL(BSTR* pbstrMoreInfoURL) { return E_NOTIMPL; }
+ STDMETHODIMP get_MoreInfoBannerImage(BSTR* pbstrMoreInfoBannerImage) { return E_NOTIMPL; }
+ STDMETHODIMP get_MoreInfoBannerURL(BSTR* pbstrMoreInfoBannerURL) { return E_NOTIMPL; }
+ STDMETHODIMP get_MoreInfoText(BSTR* pbstrMoreInfoText) { return E_NOTIMPL; }
// IAMExtendedSeeking
@@ -462,8 +462,8 @@ public: STDMETHODIMP get_CurrentMarker(long* pCurrentMarker);
STDMETHODIMP GetMarkerTime(long MarkerNum, double* pMarkerTime);
STDMETHODIMP GetMarkerName(long MarkerNum, BSTR* pbstrMarkerName);
- STDMETHODIMP put_PlaybackSpeed(double Speed) {return E_NOTIMPL;}
- STDMETHODIMP get_PlaybackSpeed(double* pSpeed) {return E_NOTIMPL;}
+ STDMETHODIMP put_PlaybackSpeed(double Speed) { return E_NOTIMPL; }
+ STDMETHODIMP get_PlaybackSpeed(double* pSpeed) { return E_NOTIMPL; }
// IKeyFrameInfo
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFile.h b/src/filters/parser/BaseSplitter/BaseSplitterFile.h index a0ed15366..9c1ac4f4c 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFile.h +++ b/src/filters/parser/BaseSplitter/BaseSplitterFile.h @@ -55,7 +55,7 @@ public: __int64 GetPos();
__int64 GetAvailable();
__int64 GetLength(bool fUpdate = false);
- __int64 GetRemaining() {return max(0, GetLength() - GetPos());}
+ __int64 GetRemaining() { return max(0, GetLength() - GetPos()); }
virtual void Seek(__int64 pos);
UINT64 UExpGolombRead();
@@ -65,8 +65,8 @@ public: void BitByteAlign(), BitFlush();
HRESULT ByteRead(BYTE* pData, __int64 len);
- bool IsStreaming() const {return m_fStreaming;}
- bool IsRandomAccess() const {return m_fRandomAccess;}
+ bool IsStreaming() const { return m_fStreaming; }
+ bool IsRandomAccess() const { return m_fRandomAccess; }
HRESULT HasMoreData(__int64 len = 1, DWORD ms = 1);
};
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp index 665768dfa..ae0ca0974 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp @@ -211,7 +211,10 @@ bool CBaseSplitterFileEx::Read(peshdr& h, BYTE code) if (h.fpts) {
if (h.type == mpeg2) {
BYTE b = (BYTE)BitRead(4);
- if (!(h.fdts && b == 3 || !h.fdts && b == 2)) {/*ASSERT(0); */return false;}
+ if (!(h.fdts && b == 3 || !h.fdts && b == 2)) {
+ /*ASSERT(0);*/
+ return false;
+ }
}
h.pts = 0;
@@ -225,7 +228,10 @@ bool CBaseSplitterFileEx::Read(peshdr& h, BYTE code) }
if (h.fdts) {
- if ((BYTE)BitRead(4) != 1) {/*ASSERT(0); */return false;}
+ if ((BYTE)BitRead(4) != 1) {
+ /*ASSERT(0);*/
+ return false;
+ }
h.dts = 0;
h.dts |= BitRead(3) << 30;
@@ -987,7 +993,9 @@ bool CBaseSplitterFileEx::Read(lpcmhdr& h, CMediaType* pmt) bool CBaseSplitterFileEx::Read(dvdalpcmhdr& h, int len, CMediaType* pmt)
{
memset(&h, 0, sizeof(h));
- if (len < 8) { return false; }
+ if (len < 8) {
+ return false;
+ }
h.firstaudioframe = (WORD)BitRead(16);// Byte pointer to start of first audio frame.
h.unknown1 = (BYTE)BitRead(8); // Unknown - e.g. 0x10 for stereo, 0x00 for surround
@@ -1090,7 +1098,9 @@ bool CBaseSplitterFileEx::Read(hdmvlpcmhdr& h, CMediaType* pmt) bool CBaseSplitterFileEx::Read(mlphdr& h, int len, CMediaType* pmt, bool find_sync)
{
memset(&h, 0, sizeof(h));
- if (len < 20) { return false; }
+ if (len < 20) {
+ return false;
+ }
__int64 startpos = GetPos();
@@ -1664,8 +1674,12 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt) memset(vi, 0, len);
// vi->hdr.dwBitRate = ;
vi->hdr.AvgTimePerFrame = h.AvgTimePerFrame;
- if (!h.sar.num) { h.sar.num = 1; }
- if (!h.sar.den) { h.sar.den = 1; }
+ if (!h.sar.num) {
+ h.sar.num = 1;
+ }
+ if (!h.sar.den) {
+ h.sar.den = 1;
+ }
CSize aspect(h.width * h.sar.num, h.height * h.sar.den);
int lnko = LNKO(aspect.cx, aspect.cy);
if (lnko > 1) {
@@ -2127,8 +2141,12 @@ bool CBaseSplitterFileEx::Read(vc1hdr& h, int len, CMediaType* pmt, int guid_fla memset(vi, 0, vi_len);
vi->AvgTimePerFrame = (10000000I64 * nFrameRateNum) / nFrameRateDen;
- if (!h.sar.num) { h.sar.num = 1; }
- if (!h.sar.den) { h.sar.den = 1; }
+ if (!h.sar.num) {
+ h.sar.num = 1;
+ }
+ if (!h.sar.den) {
+ h.sar.den = 1;
+ }
CSize aspect = CSize(h.width * h.sar.num, h.height * h.sar.den);
if (h.width == h.sar.num && h.height == h.sar.den) {
aspect = CSize(h.width, h.height);
|