2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
24 #include "..\..\..\subtitles\STS.h"
30 [uuid("EBE1FB08-3957-47ca-AF13-5827E5442E56")]
31 interface IDirectVobSub
: public IUnknown
33 STDMETHOD(get_FileName
) (THIS_
34 WCHAR
* fn
// fn should point to a buffer allocated to at least the length of MAX_PATH (=260)
37 STDMETHOD(put_FileName
) (THIS_
41 STDMETHOD(get_LanguageCount
) (THIS_
45 STDMETHOD(get_LanguageName
) (THIS_
47 WCHAR
** ppName
// the returned *ppName is allocated with CoTaskMemAlloc
50 STDMETHOD(get_SelectedLanguage
) (THIS_
54 STDMETHOD(put_SelectedLanguage
) (THIS_
58 STDMETHOD(get_HideSubtitles
) (THIS_
62 STDMETHOD(put_HideSubtitles
) (THIS_
66 STDMETHOD(get_PreBuffering
) (THIS_
70 STDMETHOD(put_PreBuffering
) (THIS_
74 STDMETHOD(get_Placement
) (THIS_
75 bool* fOverridePlacement
,
80 STDMETHOD(put_Placement
) (THIS_
81 bool fOverridePlacement
,
86 STDMETHOD(get_VobSubSettings
) (THIS_
88 bool* fOnlyShowForcedSubs
,
92 STDMETHOD(put_VobSubSettings
) (THIS_
94 bool fOnlyShowForcedSubs
,
98 STDMETHOD(get_TextSettings
) (THIS_
100 int lflen
, // depending on lflen, lf must point to LOGFONTA or LOGFONTW
104 bool* fAdvancedRenderer
107 STDMETHOD(put_TextSettings
) (THIS_
113 bool fAdvancedRenderer
116 STDMETHOD(get_Flip
) (THIS_
121 STDMETHOD(put_Flip
) (THIS_
126 STDMETHOD(get_OSD
) (THIS_
130 STDMETHOD(put_OSD
) (THIS_
134 STDMETHOD(get_SaveFullPath
) (THIS_
138 STDMETHOD(put_SaveFullPath
) (THIS_
142 STDMETHOD(get_SubtitleTiming
) (THIS_
148 STDMETHOD(put_SubtitleTiming
) (THIS_
154 STDMETHOD(get_MediaFPS
) (THIS_
159 STDMETHOD(put_MediaFPS
) (THIS_
164 // no longer supported
166 STDMETHOD(get_ColorFormat
) (THIS_
170 STDMETHOD(put_ColorFormat
) (THIS_
176 STDMETHOD(get_ZoomRect
) (THIS_
180 STDMETHOD(put_ZoomRect
) (THIS_
186 STDMETHOD(UpdateRegistry
) (THIS_
191 STDMETHOD(HasConfigDialog
) (THIS_
195 STDMETHOD(ShowConfigDialog
) (THIS_
// if available, this will popup a child dialog allowing the user to edit the style options
202 STDMETHOD(IsSubtitleReloaderLocked
) (THIS_
206 STDMETHOD(LockSubtitleReloader
) (THIS_
210 STDMETHOD(get_SubtitleReloader
) (THIS_
214 STDMETHOD(put_SubtitleReloader
) (THIS_
220 STDMETHOD(get_ExtendPicture
) (THIS_
221 int* horizontal
, // 0 - disabled, 1 - mod32 extension (width = (width+31)&~31)
222 int* vertical
, // 0 - disabled, 1 - 16:9, 2 - 4:3, 0x80 - crop (use crop together with 16:9 or 4:3, eg 0x81 will crop to 16:9 if the picture was taller)
223 int* resx2
, // 0 - disabled, 1 - enabled, 2 - depends on the original resolution
224 int* resx2minw
, // resolution doubler will be used if width*height <= resx2minw*resx2minh (resx2minw*resx2minh equals to 384*288 by default)
228 STDMETHOD(put_ExtendPicture
) (THIS_
236 STDMETHOD(get_LoadSettings
) (THIS_
237 int* level
, // 0 - when needed, 1 - always, 2 - disabled
243 STDMETHOD(put_LoadSettings
) (THIS_
251 [uuid("FE6EC6A0-21CA-4970-9EF0-B296F7F38AF0")]
252 interface ISubClock
: public IUnknown
254 STDMETHOD(SetTime
)(REFERENCE_TIME rt
) PURE
;
255 STDMETHOD_(REFERENCE_TIME
, GetTime
)() PURE
;
258 [uuid("0665B760-FBC1-46C3-A35F-E471527C96A4")]
259 interface ISubClock2
: public ISubClock
261 STDMETHOD(SetAvgTimePerFrame
)(REFERENCE_TIME rt
) PURE
;
262 STDMETHOD(GetAvgTimePerFrame
)(REFERENCE_TIME
* prt
) PURE
; // return S_OK only if *prt was set and is valid
265 [uuid("AB52FC9C-2415-4dca-BC1C-8DCC2EAE8150")]
266 interface IDirectVobSub2
: public IDirectVobSub
268 STDMETHOD(AdviseSubClock
) (THIS_
272 STDMETHOD_(bool, get_Forced
) (THIS_
275 STDMETHOD(put_Forced
) (THIS_
279 STDMETHOD(get_TextSettings
) (THIS_
283 STDMETHOD(put_TextSettings
) (THIS_
287 STDMETHOD(get_AspectRatioSettings
) (THIS_
288 CSimpleTextSubtitle::EPARCompensationType
* ePARCompensationType
291 STDMETHOD(put_AspectRatioSettings
) (THIS_
292 CSimpleTextSubtitle::EPARCompensationType
* ePARCompensationType