Merge with MPC-HC 6d1472b2f18266d92e5bc068667de348c0cd3b3b.
[xy_vsfilter.git] / src / subtitles / BaseSub.h
blobd30c235f278ed6c3803c8176cc81a20effac5467
1 /*
2 * (C) 2006-2012 see Authors.txt
4 * This file is part of MPC-HC.
6 * MPC-HC is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * MPC-HC is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #include "CompositionObject.h"
25 #define ReftimeToCString(rt) ReftimeToString(rt).GetString()
26 enum SUBTITLE_TYPE {
27 ST_DVB,
28 ST_HDMV
31 class CBaseSub
33 public:
35 static const REFERENCE_TIME INVALID_TIME = _I64_MIN;
37 CBaseSub(SUBTITLE_TYPE nType);
38 virtual ~CBaseSub();
40 virtual HRESULT ParseSample(IMediaSample* pSample) = NULL;
41 virtual void Reset() = NULL;
42 virtual POSITION GetStartPosition(REFERENCE_TIME rt, double fps) = NULL;
43 virtual POSITION GetNext(POSITION pos) = NULL;
44 virtual REFERENCE_TIME GetStart(POSITION nPos) = NULL;
45 virtual REFERENCE_TIME GetStop(POSITION nPos) = NULL;
46 virtual void Render(SubPicDesc& spd, REFERENCE_TIME rt, RECT& bbox) = NULL;
47 virtual HRESULT GetTextureSize(POSITION pos, SIZE& MaxTextureSize, SIZE& VideoSize, POINT& VideoTopLeft) = NULL;
49 protected:
50 SUBTITLE_TYPE m_nType;