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:
authortetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
committertetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
commita9b7bf3fb3e1334d8defd05ca4cfae870b4912e5 (patch)
tree2dab453d94d5e003379a6cc895eceb84c80e23ec /src/subtitles/HdmvSub.h
parentaafd49a91f7c2fa9c7103971c16fa6e1b29e8bfd (diff)
astyle formatting cleanup to make the sourcecode more accessible
switch used: astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren http://astyle.sourceforge.net/ git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1783 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/HdmvSub.h')
-rw-r--r--src/subtitles/HdmvSub.h164
1 files changed, 84 insertions, 80 deletions
diff --git a/src/subtitles/HdmvSub.h b/src/subtitles/HdmvSub.h
index 950d10584..b800f8fda 100644
--- a/src/subtitles/HdmvSub.h
+++ b/src/subtitles/HdmvSub.h
@@ -1,4 +1,4 @@
-/*
+/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
@@ -30,95 +30,99 @@ class CHdmvSub : public CBaseSub
{
public:
- static const REFERENCE_TIME INVALID_TIME = _I64_MIN;
-
- enum HDMV_SEGMENT_TYPE
- {
- NO_SEGMENT = 0xFFFF,
- PALETTE = 0x14,
- OBJECT = 0x15,
- PRESENTATION_SEG = 0x16,
- WINDOW_DEF = 0x17,
- INTERACTIVE_SEG = 0x18,
- END_OF_DISPLAY = 0x80,
- HDMV_SUB1 = 0x81,
- HDMV_SUB2 = 0x82
- };
-
-
- struct VIDEO_DESCRIPTOR
- {
- SHORT nVideoWidth;
- SHORT nVideoHeight;
- BYTE bFrameRate; // <= Frame rate here!
- };
-
- struct COMPOSITION_DESCRIPTOR
- {
- SHORT nNumber;
- BYTE bState;
- };
-
- struct SEQUENCE_DESCRIPTOR
- {
- BYTE bFirstIn : 1;
- BYTE bLastIn : 1;
- BYTE bReserved : 8;
- };
-
- CHdmvSub();
- ~CHdmvSub();
-
- HRESULT ParseSample (IMediaSample* pSample);
-
-
- POSITION GetStartPosition(REFERENCE_TIME rt, double fps);
- POSITION GetNext(POSITION pos) { m_pObjects.GetNext(pos); return pos; };
-
-
- virtual REFERENCE_TIME GetStart(POSITION nPos)
- {
- CompositionObject* pObject = m_pObjects.GetAt(nPos);
- return pObject!=NULL ? pObject->m_rtStart : INVALID_TIME;
- };
- virtual REFERENCE_TIME GetStop(POSITION nPos)
- {
- CompositionObject* pObject = m_pObjects.GetAt(nPos);
- return pObject!=NULL ? pObject->m_rtStop : INVALID_TIME;
- };
-
- void Render(SubPicDesc& spd, REFERENCE_TIME rt, RECT& bbox);
- HRESULT GetTextureSize (POSITION pos, SIZE& MaxTextureSize, SIZE& VideoSize, POINT& VideoTopLeft);
- void Reset();
+ static const REFERENCE_TIME INVALID_TIME = _I64_MIN;
+
+ enum HDMV_SEGMENT_TYPE
+ {
+ NO_SEGMENT = 0xFFFF,
+ PALETTE = 0x14,
+ OBJECT = 0x15,
+ PRESENTATION_SEG = 0x16,
+ WINDOW_DEF = 0x17,
+ INTERACTIVE_SEG = 0x18,
+ END_OF_DISPLAY = 0x80,
+ HDMV_SUB1 = 0x81,
+ HDMV_SUB2 = 0x82
+ };
+
+
+ struct VIDEO_DESCRIPTOR
+ {
+ SHORT nVideoWidth;
+ SHORT nVideoHeight;
+ BYTE bFrameRate; // <= Frame rate here!
+ };
+
+ struct COMPOSITION_DESCRIPTOR
+ {
+ SHORT nNumber;
+ BYTE bState;
+ };
+
+ struct SEQUENCE_DESCRIPTOR
+ {
+ BYTE bFirstIn : 1;
+ BYTE bLastIn : 1;
+ BYTE bReserved : 8;
+ };
+
+ CHdmvSub();
+ ~CHdmvSub();
+
+ HRESULT ParseSample(IMediaSample* pSample);
+
+
+ POSITION GetStartPosition(REFERENCE_TIME rt, double fps);
+ POSITION GetNext(POSITION pos)
+ {
+ m_pObjects.GetNext(pos);
+ return pos;
+ };
+
+
+ virtual REFERENCE_TIME GetStart(POSITION nPos)
+ {
+ CompositionObject* pObject = m_pObjects.GetAt(nPos);
+ return pObject != NULL ? pObject->m_rtStart : INVALID_TIME;
+ };
+ virtual REFERENCE_TIME GetStop(POSITION nPos)
+ {
+ CompositionObject* pObject = m_pObjects.GetAt(nPos);
+ return pObject != NULL ? pObject->m_rtStop : INVALID_TIME;
+ };
+
+ void Render(SubPicDesc& spd, REFERENCE_TIME rt, RECT& bbox);
+ HRESULT GetTextureSize(POSITION pos, SIZE& MaxTextureSize, SIZE& VideoSize, POINT& VideoTopLeft);
+ void Reset();
private :
- HDMV_SEGMENT_TYPE m_nCurSegment;
- BYTE* m_pSegBuffer;
- int m_nTotalSegBuffer;
- int m_nSegBufferPos;
- int m_nSegSize;
+ HDMV_SEGMENT_TYPE m_nCurSegment;
+ BYTE* m_pSegBuffer;
+ int m_nTotalSegBuffer;
+ int m_nSegBufferPos;
+ int m_nSegSize;
- VIDEO_DESCRIPTOR m_VideoDescriptor;
+ VIDEO_DESCRIPTOR m_VideoDescriptor;
- CompositionObject* m_pCurrentObject;
- CAtlList<CompositionObject*> m_pObjects;
+ CompositionObject* m_pCurrentObject;
+ CAtlList<CompositionObject*> m_pObjects;
- HDMV_PALETTE* m_pDefaultPalette;
- int m_nDefaultPaletteNbEntry;
+ HDMV_PALETTE* m_pDefaultPalette;
+ int m_nDefaultPaletteNbEntry;
- int m_nColorNumber;
+ int m_nColorNumber;
- int ParsePresentationSegment(CGolombBuffer* pGBuffer);
- void ParsePalette(CGolombBuffer* pGBuffer, USHORT nSize);
- void ParseObject(CGolombBuffer* pGBuffer, USHORT nUnitSize);
+ int ParsePresentationSegment(CGolombBuffer* pGBuffer);
+ void ParsePalette(CGolombBuffer* pGBuffer, USHORT nSize);
+ void ParseObject(CGolombBuffer* pGBuffer, USHORT nUnitSize);
- void ParseVideoDescriptor(CGolombBuffer* pGBuffer, VIDEO_DESCRIPTOR* pVideoDescriptor);
- void ParseCompositionDescriptor(CGolombBuffer* pGBuffer, COMPOSITION_DESCRIPTOR* pCompositionDescriptor);
- void ParseCompositionObject(CGolombBuffer* pGBuffer, CompositionObject* pCompositionObject);
+ void ParseVideoDescriptor(CGolombBuffer* pGBuffer, VIDEO_DESCRIPTOR* pVideoDescriptor);
+ void ParseCompositionDescriptor(CGolombBuffer* pGBuffer, COMPOSITION_DESCRIPTOR* pCompositionDescriptor);
+ void ParseCompositionObject(CGolombBuffer* pGBuffer, CompositionObject* pCompositionObject);
- void AllocSegment(int nSize);
+ void AllocSegment(int nSize);
- CompositionObject* FindObject(REFERENCE_TIME rt);
+ CompositionObject* FindObject(REFERENCE_TIME rt);
};