diff options
author | Underground78 <underground78@users.sourceforge.net> | 2011-08-07 23:52:16 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2011-08-07 23:52:16 +0400 |
commit | 5471777a7952b806434e0c9a959cc08ee648dcaa (patch) | |
tree | 7d0d1885e905d3ae65550309d916b25c408fb8ae /src/Subtitles | |
parent | 6da02ad7b229b91ded4bc62446552e4a1e24c3e8 (diff) |
- Rename "hash" so that there is no ambiguity with std::hash.
- Avoid a macro redefinition.
- Make some signed/unsigned conversions explicit.
- Fix a few unused variables.
- Reduce the scope of a few variables.
- Don't use extra class name qualificater in header files.
- Initilialize a few variables.
- Fix the case for some file names.
- Remove some useless casts.
- Cosmetics (remove empty lines at the end of some files, ...)
Patch by XhmikosR.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3605 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/Subtitles')
-rw-r--r-- | src/Subtitles/CCDecoder.h | 2 | ||||
-rw-r--r-- | src/Subtitles/DVBSub.cpp | 1 | ||||
-rw-r--r-- | src/Subtitles/GFN.h | 4 | ||||
-rw-r--r-- | src/Subtitles/HdmvSub.cpp | 10 | ||||
-rw-r--r-- | src/Subtitles/Rasterizer.h | 1 | ||||
-rw-r--r-- | src/Subtitles/RenderedHdmvSubtitle.cpp | 1 | ||||
-rw-r--r-- | src/Subtitles/STS.cpp | 16 | ||||
-rw-r--r-- | src/Subtitles/STS.h | 4 | ||||
-rw-r--r-- | src/Subtitles/SubtitleInputPin.cpp | 2 | ||||
-rw-r--r-- | src/Subtitles/USFSubtitles.h | 4 | ||||
-rw-r--r-- | src/Subtitles/VobSubFileRipper.cpp | 7 |
11 files changed, 21 insertions, 31 deletions
diff --git a/src/Subtitles/CCDecoder.h b/src/Subtitles/CCDecoder.h index c27caff4a..22e4794db 100644 --- a/src/Subtitles/CCDecoder.h +++ b/src/Subtitles/CCDecoder.h @@ -48,5 +48,3 @@ public: return m_sts;
}
};
-
-
diff --git a/src/Subtitles/DVBSub.cpp b/src/Subtitles/DVBSub.cpp index 231281239..4c31c8032 100644 --- a/src/Subtitles/DVBSub.cpp +++ b/src/Subtitles/DVBSub.cpp @@ -562,4 +562,3 @@ HRESULT CDVBSub::ParseObject(CGolombBuffer& gb, WORD wSegLength) return hr;
}
-
diff --git a/src/Subtitles/GFN.h b/src/Subtitles/GFN.h index 222433e01..ccd63f859 100644 --- a/src/Subtitles/GFN.h +++ b/src/Subtitles/GFN.h @@ -27,7 +27,11 @@ enum exttype {EXTSRT = 0, EXTSUB, EXTSMI, EXTPSB, EXTSSA, EXTASS, EXTIDX, EXTUSF, EXTXSS, EXTRT};
extern TCHAR* exttypestr[];
+
+
typedef struct {
CString fn; /*exttype ext;*/
} SubFile;
+
+
extern void GetSubFileNames(CString fn, CAtlArray<CString>& paths, CAtlArray<SubFile>& ret);
diff --git a/src/Subtitles/HdmvSub.cpp b/src/Subtitles/HdmvSub.cpp index 83faf78ae..04146eb89 100644 --- a/src/Subtitles/HdmvSub.cpp +++ b/src/Subtitles/HdmvSub.cpp @@ -191,13 +191,13 @@ int CHdmvSub::ParsePresentationSegment(CGolombBuffer* pGBuffer) {
COMPOSITION_DESCRIPTOR CompositionDescriptor;
BYTE nObjectNumber;
- bool palette_update_flag;
- BYTE palette_id_ref;
+ //bool palette_update_flag;
+ //BYTE palette_id_ref;
ParseVideoDescriptor(pGBuffer, &m_VideoDescriptor);
ParseCompositionDescriptor(pGBuffer, &CompositionDescriptor);
- palette_update_flag = !!(pGBuffer->ReadByte() & 0x80);
- palette_id_ref = pGBuffer->ReadByte();
+ pGBuffer->ReadByte(); //palette_update_flag = !!(pGBuffer->ReadByte() & 0x80);
+ pGBuffer->ReadByte(); //palette_id_ref = pGBuffer->ReadByte();
nObjectNumber = pGBuffer->ReadByte();
if (nObjectNumber > 0) {
@@ -361,5 +361,3 @@ CompositionObject* CHdmvSub::FindObject(REFERENCE_TIME rt) return NULL;
}
-
-
diff --git a/src/Subtitles/Rasterizer.h b/src/Subtitles/Rasterizer.h index 8a7732c5a..9c3fe7a54 100644 --- a/src/Subtitles/Rasterizer.h +++ b/src/Subtitles/Rasterizer.h @@ -183,4 +183,3 @@ public: #endif
void FillSolidRect(SubPicDesc& spd, int x, int y, int nWidth, int nHeight, DWORD lColor);
};
-
diff --git a/src/Subtitles/RenderedHdmvSubtitle.cpp b/src/Subtitles/RenderedHdmvSubtitle.cpp index 6dc70e1b7..d1acf3f7a 100644 --- a/src/Subtitles/RenderedHdmvSubtitle.cpp +++ b/src/Subtitles/RenderedHdmvSubtitle.cpp @@ -177,4 +177,3 @@ HRESULT CRenderedHdmvSubtitle::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME m_rtStart = tStart;
return S_OK;
}
-
diff --git a/src/Subtitles/STS.cpp b/src/Subtitles/STS.cpp index da609b235..c15642e1f 100644 --- a/src/Subtitles/STS.cpp +++ b/src/Subtitles/STS.cpp @@ -1720,7 +1720,6 @@ static bool OpenXombieSub(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet CStringW buff;
while(file->ReadString(buff)) {
- float version = 0;
buff.Trim();
if(buff.IsEmpty() || buff.GetAt(0) == ';') {
@@ -1729,16 +1728,16 @@ static bool OpenXombieSub(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet CStringW entry;
- // try {
+ //try {
entry = GetStr(buff, '=');
- // }
- // catch(...) {continue;}
+ //}
+ //catch(...) {continue;}
entry.MakeLower();
- if(entry == L"version") {
- version = (float)GetFloat(buff);
- } else if(entry == L"screenhorizontal") {
+ /*if(entry == L"version") {
+ float version = (float)GetFloat(buff);
+ } else*/ if(entry == L"screenhorizontal") {
try {
ret.m_dstScreenSize.cx = GetInt(buff);
} catch(...) {
@@ -3498,7 +3497,6 @@ bool MOD_PNGIMAGE::processData(png_structp png_ptr) png_uint_32 bit_depth;
png_infop info_ptr;
- int number_of_passes;
/* initialize stuff */
info_ptr = png_create_info_struct(png_ptr);
@@ -3547,7 +3545,7 @@ bool MOD_PNGIMAGE::processData(png_structp png_ptr) png_set_gray_to_rgb(png_ptr);
}
- number_of_passes = png_set_interlace_handling(png_ptr);
+ png_set_interlace_handling(png_ptr); //int number_of_passes =
png_read_update_info(png_ptr, info_ptr);
/* read file */
diff --git a/src/Subtitles/STS.h b/src/Subtitles/STS.h index fe62dfcff..e205be8bb 100644 --- a/src/Subtitles/STS.h +++ b/src/Subtitles/STS.h @@ -372,7 +372,5 @@ class CHtmlColorMap : public CAtlMap<CString, DWORD, CStringElementTraits<CStrin public:
CHtmlColorMap();
};
-extern CHtmlColorMap g_colors;
-
-
+extern CHtmlColorMap g_colors;
diff --git a/src/Subtitles/SubtitleInputPin.cpp b/src/Subtitles/SubtitleInputPin.cpp index 64c3eaef9..6f764aad2 100644 --- a/src/Subtitles/SubtitleInputPin.cpp +++ b/src/Subtitles/SubtitleInputPin.cpp @@ -221,7 +221,6 @@ public IUnknown { STDMETHOD(toto)() = NULL;
};
-
STDMETHODIMP CSubtitleInputPin::Receive(IMediaSample* pSample)
{
HRESULT hr;
@@ -378,7 +377,6 @@ STDMETHODIMP CSubtitleInputPin::Receive(IMediaSample* pSample) return hr;
}
-
bool CSubtitleInputPin::IsHdmvSub(const CMediaType* pmt)
{
return pmt->majortype == MEDIATYPE_Subtitle && (pmt->subtype == MEDIASUBTYPE_HDMVSUB || // Blu ray presentation graphics
diff --git a/src/Subtitles/USFSubtitles.h b/src/Subtitles/USFSubtitles.h index 8470192cb..9c67deef2 100644 --- a/src/Subtitles/USFSubtitles.h +++ b/src/Subtitles/USFSubtitles.h @@ -85,7 +85,7 @@ public: virtual ~CUSFSubtitles();
bool Read(LPCTSTR fn);
- // bool Write(LPCTSTR fn); // TODO
+ //bool Write(LPCTSTR fn); // TODO
metadata_t metadata;
CAutoPtrList<style_t> styles;
@@ -93,5 +93,5 @@ public: CAutoPtrList<text_t> texts;
bool ConvertToSTS(CSimpleTextSubtitle& sts);
- // bool ConvertFromSTS(CSimpleTextSubtitle& sts); // TODO
+ //bool ConvertFromSTS(CSimpleTextSubtitle& sts); // TODO
};
diff --git a/src/Subtitles/VobSubFileRipper.cpp b/src/Subtitles/VobSubFileRipper.cpp index ba6317bbd..86fde3f8d 100644 --- a/src/Subtitles/VobSubFileRipper.cpp +++ b/src/Subtitles/VobSubFileRipper.cpp @@ -561,7 +561,7 @@ bool CVobSubFileRipper::Create() CVobDec vd;
- __int64 SCR, PTS = 0, tOffset = 0, tPrevOffset = 0, tTotal = 0, tStart = 0;
+ __int64 PTS = 0, tOffset = 0, tPrevOffset = 0, tTotal = 0, tStart = 0;
int vob = 0, cell = 0;
bool fDiscontinuity = false, fDiscontinuityFixApplied = false, fNavpackFound = false;
@@ -689,13 +689,13 @@ bool CVobSubFileRipper::Create() }
}
- SCR = (__int64(buff[0x04] & 0x38) >> 3) << 30
+ /*__int64 SCR = (__int64(buff[0x04] & 0x38) >> 3) << 30
| __int64(buff[0x04] & 0x03) << 28
| __int64(buff[0x05]) << 20
| (__int64(buff[0x06] & 0xf8) >> 3) << 15
| __int64(buff[0x06] & 0x03) << 13
| __int64(buff[0x07]) << 5
- | (__int64(buff[0x08] & 0xf8) >> 3) << 0;
+ | (__int64(buff[0x08] & 0xf8) >> 3) << 0;*/
bool hasPTS = false;
@@ -1243,4 +1243,3 @@ void VSFRipperData::Copy(VSFRipperData& rd) selids[key] = val;
}
}
-
|