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"
25 #include "../BaseVideoFilter/BaseVideoFilter.h"
31 [uuid("EBE1FB08-3957-47ca-AF13-5827E5442E56")]
32 interface IDirectVobSub
: public IUnknown
34 STDMETHOD(get_FileName
) (THIS_
35 WCHAR
* fn
// fn should point to a buffer allocated to at least the length of MAX_PATH (=260)
38 STDMETHOD(put_FileName
) (THIS_
42 STDMETHOD(get_LanguageCount
) (THIS_
46 STDMETHOD(get_LanguageName
) (THIS_
48 WCHAR
** ppName
// the returned *ppName is allocated with CoTaskMemAlloc
51 STDMETHOD(get_SelectedLanguage
) (THIS_
55 STDMETHOD(put_SelectedLanguage
) (THIS_
59 STDMETHOD(get_HideSubtitles
) (THIS_
63 STDMETHOD(put_HideSubtitles
) (THIS_
67 STDMETHOD(get_PreBuffering
) (THIS_
71 STDMETHOD(put_PreBuffering
) (THIS_
75 STDMETHOD(get_UseBT709
) (THIS_
79 STDMETHOD(put_UseBT709
) (THIS_
83 STDMETHOD(get_Placement
) (THIS_
84 bool* fOverridePlacement
,
89 STDMETHOD(put_Placement
) (THIS_
90 bool fOverridePlacement
,
95 STDMETHOD(get_VobSubSettings
) (THIS_
97 bool* fOnlyShowForcedSubs
,
101 STDMETHOD(put_VobSubSettings
) (THIS_
103 bool fOnlyShowForcedSubs
,
107 STDMETHOD(get_TextSettings
) (THIS_
109 int lflen
, // depending on lflen, lf must point to LOGFONTA or LOGFONTW
113 bool* fAdvancedRenderer
116 STDMETHOD(put_TextSettings
) (THIS_
122 bool fAdvancedRenderer
125 STDMETHOD(get_Flip
) (THIS_
130 STDMETHOD(put_Flip
) (THIS_
135 STDMETHOD(get_OSD
) (THIS_
139 STDMETHOD(put_OSD
) (THIS_
143 STDMETHOD(get_SaveFullPath
) (THIS_
147 STDMETHOD(put_SaveFullPath
) (THIS_
151 STDMETHOD(get_SubtitleTiming
) (THIS_
157 STDMETHOD(put_SubtitleTiming
) (THIS_
163 STDMETHOD(get_MediaFPS
) (THIS_
168 STDMETHOD(put_MediaFPS
) (THIS_
173 // no longer supported
175 STDMETHOD(get_ColorFormat
) (THIS_
179 STDMETHOD(put_ColorFormat
) (THIS_
184 STDMETHOD(get_OutputColorFormat
) (THIS_
185 ColorSpaceId
* preferredOrder
,
189 STDMETHOD(put_OutputColorFormat
) (THIS_
190 const ColorSpaceId
* preferredOrder
,
191 const bool* fSelected
,
196 STDMETHOD(get_InputColorFormat
) (THIS_
197 ColorSpaceId
* preferredOrder
,
201 STDMETHOD(put_InputColorFormat
) (THIS_
202 const ColorSpaceId
* preferredOrder
,
203 const bool* fSelected
,
208 STDMETHOD(get_ZoomRect
) (THIS_
212 STDMETHOD(put_ZoomRect
) (THIS_
218 STDMETHOD(UpdateRegistry
) (THIS_
223 STDMETHOD(HasConfigDialog
) (THIS_
227 STDMETHOD(ShowConfigDialog
) (THIS_
// if available, this will popup a child dialog allowing the user to edit the style options
234 STDMETHOD(IsSubtitleReloaderLocked
) (THIS_
238 STDMETHOD(LockSubtitleReloader
) (THIS_
242 STDMETHOD(get_SubtitleReloader
) (THIS_
246 STDMETHOD(put_SubtitleReloader
) (THIS_
252 STDMETHOD(get_ExtendPicture
) (THIS_
253 int* horizontal
, // 0 - disabled, 1 - mod32 extension (width = (width+31)&~31)
254 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)
255 int* resx2
, // 0 - disabled, 1 - enabled, 2 - depends on the original resolution
256 int* resx2minw
, // resolution doubler will be used if width*height <= resx2minw*resx2minh (resx2minw*resx2minh equals to 384*288 by default)
260 STDMETHOD(put_ExtendPicture
) (THIS_
268 STDMETHOD(get_LoadSettings
) (THIS_
269 int* level
, // 0 - when needed, 1 - always, 2 - disabled
275 STDMETHOD(put_LoadSettings
) (THIS_
282 STDMETHOD(get_OverlayCacheMaxItemNum
) (THIS_
283 int* overlay_cache_max_item_num
286 STDMETHOD(put_OverlayCacheMaxItemNum
) (THIS_
287 int overlay_cache_max_item_num
290 STDMETHOD(get_ScanLineDataCacheMaxItemNum
) (THIS_
291 int* scan_line_data_cache_max_item_num
294 STDMETHOD(put_ScanLineDataCacheMaxItemNum
) (THIS_
295 int scan_line_data_cache_max_item_num
298 STDMETHOD(get_PathDataCacheMaxItemNum
) (THIS_
299 int* path_data_cache_max_item_num
302 STDMETHOD(put_PathDataCacheMaxItemNum
) (THIS_
303 int path_data_cache_max_item_num
306 STDMETHOD(get_OverlayNoBlurCacheMaxItemNum
) (THIS_
307 int* overlay_no_blur_cache_max_item_num
310 STDMETHOD(put_OverlayNoBlurCacheMaxItemNum
) (THIS_
311 int overlay_no_blur_cache_max_item_num
316 std::size_t path_cache_cur_item_num
, path_cache_query_count
,path_cache_hit_count
,
317 scanline_cache_cur_item_num
, scanline_cache_query_count
,scanline_cache_hit_count
,
318 non_blur_cache_cur_item_num
, non_blur_cache_query_count
,non_blur_cache_hit_count
,
319 overlay_cache_cur_item_num
, overlay_cache_query_count
,overlay_cache_hit_count
,
320 interpolate_cache_cur_item_num
, interpolate_cache_query_count
,interpolate_cache_hit_count
,
321 text_info_cache_cur_item_num
, text_info_cache_query_count
, text_info_cache_hit_count
,
322 word_info_cache_cur_item_num
, word_info_cache_query_count
, word_info_cache_hit_count
;
324 STDMETHOD(get_CachesInfo
) (THIS_
325 CachesInfo
* cache_info
329 STDMETHOD(get_SubpixelPositionLevel
) (THIS_
330 int* subpixel_pos_level
333 STDMETHOD(put_SubpixelPositionLevel
) (THIS_
334 int subpixel_pos_level
338 STDMETHOD(get_FollowUpstreamPreferredOrder
) (THIS_
339 bool *fFollowUpstreamPreferredOrder
342 STDMETHOD(put_FollowUpstreamPreferredOrder
) (THIS_
343 bool fFollowUpstreamPreferredOrder
347 [uuid("FE6EC6A0-21CA-4970-9EF0-B296F7F38AF0")]
348 interface ISubClock
: public IUnknown
350 STDMETHOD(SetTime
)(REFERENCE_TIME rt
) PURE
;
351 STDMETHOD_(REFERENCE_TIME
, GetTime
)() PURE
;
354 [uuid("0665B760-FBC1-46C3-A35F-E471527C96A4")]
355 interface ISubClock2
: public ISubClock
357 STDMETHOD(SetAvgTimePerFrame
)(REFERENCE_TIME rt
) PURE
;
358 STDMETHOD(GetAvgTimePerFrame
)(REFERENCE_TIME
* prt
) PURE
; // return S_OK only if *prt was set and is valid
361 [uuid("AB52FC9C-2415-4dca-BC1C-8DCC2EAE8150")]
362 interface IDirectVobSub2
: public IDirectVobSub
364 STDMETHOD(AdviseSubClock
) (THIS_
368 STDMETHOD_(bool, get_Forced
) (THIS_
371 STDMETHOD(put_Forced
) (THIS_
375 STDMETHOD(get_TextSettings
) (THIS_
379 STDMETHOD(put_TextSettings
) (THIS_
383 STDMETHOD(get_AspectRatioSettings
) (THIS_
384 CSimpleTextSubtitle::EPARCompensationType
* ePARCompensationType
387 STDMETHOD(put_AspectRatioSettings
) (THIS_
388 CSimpleTextSubtitle::EPARCompensationType
* ePARCompensationType