Add a switch option for switching between use upstream filter's preferred media type...
[xy_vsfilter.git] / src / filters / transform / vsfilter / IDirectVobSub.h
bloba8a5bff115ae06fae7a069c54ebcc5aed573cb63
1 /*
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)
8 * any later version.
9 *
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
22 #pragma once
24 #include "../../../subtitles/STS.h"
25 #include "../BaseVideoFilter/BaseVideoFilter.h"
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
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)
36 ) PURE;
38 STDMETHOD(put_FileName) (THIS_
39 WCHAR* fn
40 ) PURE;
42 STDMETHOD(get_LanguageCount) (THIS_
43 int* nLangs
44 ) PURE;
46 STDMETHOD(get_LanguageName) (THIS_
47 int iLanguage,
48 WCHAR** ppName // the returned *ppName is allocated with CoTaskMemAlloc
49 ) PURE;
51 STDMETHOD(get_SelectedLanguage) (THIS_
52 int* iSelected
53 ) PURE;
55 STDMETHOD(put_SelectedLanguage) (THIS_
56 int iSelected
57 ) PURE;
59 STDMETHOD(get_HideSubtitles) (THIS_
60 bool* fHideSubtitles
61 ) PURE;
63 STDMETHOD(put_HideSubtitles) (THIS_
64 bool fHideSubtitles
65 ) PURE;
67 STDMETHOD(get_PreBuffering) (THIS_
68 bool* fDoPreBuffering
69 ) PURE;
71 STDMETHOD(put_PreBuffering) (THIS_
72 bool fDoPreBuffering
73 ) PURE;
75 STDMETHOD(get_UseBT709) (THIS_
76 bool* fUseBT709
77 ) PURE;
79 STDMETHOD(put_UseBT709) (THIS_
80 bool fUseBT709
81 ) PURE;
83 STDMETHOD(get_Placement) (THIS_
84 bool* fOverridePlacement,
85 int* xperc,
86 int* yperc
87 ) PURE;
89 STDMETHOD(put_Placement) (THIS_
90 bool fOverridePlacement,
91 int xperc,
92 int yperc
93 ) PURE;
95 STDMETHOD(get_VobSubSettings) (THIS_
96 bool* fBuffer,
97 bool* fOnlyShowForcedSubs,
98 bool* fPolygonize
99 ) PURE;
101 STDMETHOD(put_VobSubSettings) (THIS_
102 bool fBuffer,
103 bool fOnlyShowForcedSubs,
104 bool fPolygonize
105 ) PURE;
107 STDMETHOD(get_TextSettings) (THIS_
108 void* lf,
109 int lflen, // depending on lflen, lf must point to LOGFONTA or LOGFONTW
110 COLORREF* color,
111 bool* fShadow,
112 bool* fOutline,
113 bool* fAdvancedRenderer
114 ) PURE;
116 STDMETHOD(put_TextSettings) (THIS_
117 void* lf,
118 int lflen,
119 COLORREF color,
120 bool fShadow,
121 bool fOutline,
122 bool fAdvancedRenderer
123 ) PURE;
125 STDMETHOD(get_Flip) (THIS_
126 bool* fPicture,
127 bool* fSubtitles
128 ) PURE;
130 STDMETHOD(put_Flip) (THIS_
131 bool fPicture,
132 bool fSubtitles
133 ) PURE;
135 STDMETHOD(get_OSD) (THIS_
136 bool* fOSD
137 ) PURE;
139 STDMETHOD(put_OSD) (THIS_
140 bool fOSD
141 ) PURE;
143 STDMETHOD(get_SaveFullPath) (THIS_
144 bool* fSaveFullPath
145 ) PURE;
147 STDMETHOD(put_SaveFullPath) (THIS_
148 bool fSaveFullPath
149 ) PURE;
151 STDMETHOD(get_SubtitleTiming) (THIS_
152 int* delay,
153 int* speedmul,
154 int* speeddiv
155 ) PURE;
157 STDMETHOD(put_SubtitleTiming) (THIS_
158 int delay,
159 int speedmul,
160 int speeddiv
161 ) PURE;
163 STDMETHOD(get_MediaFPS) (THIS_
164 bool* fEnabled,
165 double* fps
166 ) PURE;
168 STDMETHOD(put_MediaFPS) (THIS_
169 bool fEnabled,
170 double fps
171 ) PURE;
173 // no longer supported
175 STDMETHOD(get_ColorFormat) (THIS_
176 int* iPosition
177 ) PURE;
179 STDMETHOD(put_ColorFormat) (THIS_
180 int iPosition
181 ) PURE;
184 STDMETHOD(get_OutputColorFormat) (THIS_
185 ColorSpaceId* preferredOrder,
186 bool* fSelected,
187 UINT* count
188 ) PURE;
189 STDMETHOD(put_OutputColorFormat) (THIS_
190 const ColorSpaceId* preferredOrder,
191 const bool* fSelected,
192 UINT count
193 ) PURE;
196 STDMETHOD(get_InputColorFormat) (THIS_
197 ColorSpaceId* preferredOrder,
198 bool* fSelected,
199 UINT* count
200 ) PURE;
201 STDMETHOD(put_InputColorFormat) (THIS_
202 const ColorSpaceId* preferredOrder,
203 const bool* fSelected,
204 UINT count
205 ) PURE;
208 STDMETHOD(get_ZoomRect) (THIS_
209 NORMALIZEDRECT* rect
210 ) PURE;
212 STDMETHOD(put_ZoomRect) (THIS_
213 NORMALIZEDRECT* rect
214 ) PURE;
218 STDMETHOD(UpdateRegistry) (THIS_
219 ) PURE;
223 STDMETHOD(HasConfigDialog) (THIS_
224 int iSelected
225 ) PURE;
227 STDMETHOD(ShowConfigDialog) (THIS_ // if available, this will popup a child dialog allowing the user to edit the style options
228 int iSelected,
229 HWND hWndParent
230 ) PURE;
234 STDMETHOD(IsSubtitleReloaderLocked) (THIS_
235 bool* fLocked
236 ) PURE;
238 STDMETHOD(LockSubtitleReloader) (THIS_
239 bool fLock
240 ) PURE;
242 STDMETHOD(get_SubtitleReloader) (THIS_
243 bool* fDisabled
244 ) PURE;
246 STDMETHOD(put_SubtitleReloader) (THIS_
247 bool fDisable
248 ) PURE;
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)
257 int* resx2minh
258 ) PURE;
260 STDMETHOD(put_ExtendPicture) (THIS_
261 int horizontal,
262 int vertical,
263 int resx2,
264 int resx2minw,
265 int resx2minh
266 ) PURE;
268 STDMETHOD(get_LoadSettings) (THIS_
269 int* level, // 0 - when needed, 1 - always, 2 - disabled
270 bool* fExternalLoad,
271 bool* fWebLoad,
272 bool* fEmbeddedLoad
273 ) PURE;
275 STDMETHOD(put_LoadSettings) (THIS_
276 int level,
277 bool fExternalLoad,
278 bool fWebLoad,
279 bool fEmbeddedLoad
280 ) PURE;
282 STDMETHOD(get_OverlayCacheMaxItemNum) (THIS_
283 int* overlay_cache_max_item_num
284 ) PURE;
286 STDMETHOD(put_OverlayCacheMaxItemNum) (THIS_
287 int overlay_cache_max_item_num
288 ) PURE;
290 STDMETHOD(get_ScanLineDataCacheMaxItemNum) (THIS_
291 int* scan_line_data_cache_max_item_num
292 ) PURE;
294 STDMETHOD(put_ScanLineDataCacheMaxItemNum) (THIS_
295 int scan_line_data_cache_max_item_num
296 ) PURE;
298 STDMETHOD(get_PathDataCacheMaxItemNum) (THIS_
299 int* path_data_cache_max_item_num
300 ) PURE;
302 STDMETHOD(put_PathDataCacheMaxItemNum) (THIS_
303 int path_data_cache_max_item_num
304 ) PURE;
306 STDMETHOD(get_OverlayNoBlurCacheMaxItemNum) (THIS_
307 int* overlay_no_blur_cache_max_item_num
308 ) PURE;
310 STDMETHOD(put_OverlayNoBlurCacheMaxItemNum) (THIS_
311 int overlay_no_blur_cache_max_item_num
312 ) PURE;
314 struct CachesInfo
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
326 ) PURE;
329 STDMETHOD(get_SubpixelPositionLevel) (THIS_
330 int* subpixel_pos_level
331 ) PURE;
333 STDMETHOD(put_SubpixelPositionLevel) (THIS_
334 int subpixel_pos_level
335 ) PURE;
338 STDMETHOD(get_FollowUpstreamPreferredOrder) (THIS_
339 bool *fFollowUpstreamPreferredOrder
340 ) PURE;
342 STDMETHOD(put_FollowUpstreamPreferredOrder) (THIS_
343 bool fFollowUpstreamPreferredOrder
344 ) PURE;
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_
365 ISubClock* pSubClock
366 ) PURE;
368 STDMETHOD_(bool, get_Forced) (THIS_
369 ) PURE;
371 STDMETHOD(put_Forced) (THIS_
372 bool fForced
373 ) PURE;
375 STDMETHOD(get_TextSettings) (THIS_
376 STSStyle* pDefStyle
377 ) PURE;
379 STDMETHOD(put_TextSettings) (THIS_
380 STSStyle* pDefStyle
381 ) PURE;
383 STDMETHOD(get_AspectRatioSettings) (THIS_
384 CSimpleTextSubtitle::EPARCompensationType* ePARCompensationType
385 ) PURE;
387 STDMETHOD(put_AspectRatioSettings) (THIS_
388 CSimpleTextSubtitle::EPARCompensationType* ePARCompensationType
389 ) PURE;
393 #ifdef __cplusplus
395 #endif