4 * Copyright 2020 Gijs Vermeulen
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library 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 GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "qdvd_private.h"
22 #include "wine/strmbase.h"
24 WINE_DEFAULT_DEBUG_CHANNEL(qdvd
);
28 struct strmbase_filter filter
;
29 IDvdControl2 IDvdControl2_iface
;
30 IDvdInfo2 IDvdInfo2_iface
;
33 static inline struct navigator
*impl_from_strmbase_filter(struct strmbase_filter
*filter
)
35 return CONTAINING_RECORD(filter
, struct navigator
, filter
);
38 static HRESULT
navigator_query_interface(struct strmbase_filter
*iface
, REFIID iid
, void **out
)
40 struct navigator
*filter
= impl_from_strmbase_filter(iface
);
42 if (IsEqualGUID(iid
, &IID_IDvdControl2
))
43 *out
= &filter
->IDvdControl2_iface
;
44 else if (IsEqualGUID(iid
, &IID_IDvdInfo2
))
45 *out
= &filter
->IDvdInfo2_iface
;
49 IUnknown_AddRef((IUnknown
*)*out
);
53 static struct strmbase_pin
*navigator_get_pin(struct strmbase_filter
*iface
, unsigned int index
)
58 static void navigator_destroy(struct strmbase_filter
*iface
)
60 struct navigator
*filter
= impl_from_strmbase_filter(iface
);
62 strmbase_filter_cleanup(&filter
->filter
);
66 static const struct strmbase_filter_ops filter_ops
=
68 .filter_query_interface
= navigator_query_interface
,
69 .filter_get_pin
= navigator_get_pin
,
70 .filter_destroy
= navigator_destroy
,
73 static struct navigator
*impl_from_IDvdControl2(IDvdControl2
*iface
)
75 return CONTAINING_RECORD(iface
, struct navigator
, IDvdControl2_iface
);
78 static HRESULT WINAPI
dvd_control2_QueryInterface(IDvdControl2
*iface
, REFIID iid
, void **out
)
80 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
81 return IUnknown_QueryInterface(filter
->filter
.outer_unk
, iid
, out
);
84 static ULONG WINAPI
dvd_control2_AddRef(IDvdControl2
*iface
)
86 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
87 return IUnknown_AddRef(filter
->filter
.outer_unk
);
90 static ULONG WINAPI
dvd_control2_Release(IDvdControl2
*iface
)
92 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
93 return IUnknown_Release(filter
->filter
.outer_unk
);
96 static HRESULT WINAPI
dvd_control2_PlayTitle(IDvdControl2
*iface
, ULONG title
, DWORD flags
, IDvdCmd
**cmd
)
98 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
100 FIXME("filter %p, title %u, flags %#x, cmd %p.\n", filter
, title
, flags
, cmd
);
105 static HRESULT WINAPI
dvd_control2_PlayChapterInTitle(IDvdControl2
*iface
, ULONG title
, ULONG chapter
,
106 DWORD flags
, IDvdCmd
**cmd
)
108 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
110 FIXME("filter %p, title %u, chapter %u, flags %#x, cmd %p.\n", filter
, title
, chapter
, flags
, cmd
);
115 static HRESULT WINAPI
dvd_control2_PlayTimeInTitle(IDvdControl2
*iface
, ULONG title
, DVD_HMSF_TIMECODE
*time
,
116 DWORD flags
, IDvdCmd
**cmd
)
118 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
120 FIXME("filter %p, title %u, time %p, flags %#x, cmd %p.\n", filter
, title
, time
, flags
, cmd
);
125 static HRESULT WINAPI
dvd_control2_Stop(IDvdControl2
*iface
)
127 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
129 FIXME("filter %p.\n", filter
);
134 static HRESULT WINAPI
dvd_control2_ReturnFromSubmenu(IDvdControl2
*iface
, DWORD flags
, IDvdCmd
**cmd
)
136 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
138 FIXME("filter %p, flags %#x, cmd %p.\n", filter
, flags
, cmd
);
143 static HRESULT WINAPI
dvd_control2_PlayAtTime(IDvdControl2
*iface
, DVD_HMSF_TIMECODE
*time
, DWORD flags
, IDvdCmd
**cmd
)
145 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
147 FIXME("filter %p, time %p, flags %#x, cmd %p.\n", filter
, time
, flags
, cmd
);
152 static HRESULT WINAPI
dvd_control2_PlayChapter(IDvdControl2
*iface
, ULONG chapter
, DWORD flags
, IDvdCmd
**cmd
)
154 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
156 FIXME("filter %p, chapter %u, flags %#x, cmd %p.\n", filter
, chapter
, flags
, cmd
);
161 static HRESULT WINAPI
dvd_control2_PlayPrevChapter(IDvdControl2
*iface
, DWORD flags
, IDvdCmd
**cmd
)
163 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
165 FIXME("filter %p, flags %#x, cmd %p.\n", filter
, flags
, cmd
);
170 static HRESULT WINAPI
dvd_control2_ReplayChapter(IDvdControl2
*iface
, DWORD flags
, IDvdCmd
**cmd
)
172 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
174 FIXME("filter %p, flags %#x, cmd %p.\n", filter
, flags
, cmd
);
179 static HRESULT WINAPI
dvd_control2_PlayNextChapter(IDvdControl2
*iface
, DWORD flags
, IDvdCmd
**cmd
)
181 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
183 FIXME("filter %p, flags %#x, cmd %p.\n", filter
, flags
, cmd
);
188 static HRESULT WINAPI
dvd_control2_PlayForwards(IDvdControl2
*iface
, double speed
, DWORD flags
, IDvdCmd
**cmd
)
190 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
192 FIXME("filter %p, speed %f, flags %#x, cmd %p.\n", filter
, speed
, flags
, cmd
);
197 static HRESULT WINAPI
dvd_control2_PlayBackwards(IDvdControl2
*iface
, double speed
, DWORD flags
, IDvdCmd
**cmd
)
199 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
201 FIXME("filter %p, speed %f, flags %#x, cmd %p.\n", filter
, speed
, flags
, cmd
);
206 static HRESULT WINAPI
dvd_control2_ShowMenu(IDvdControl2
*iface
, DVD_MENU_ID id
, DWORD flags
, IDvdCmd
**cmd
)
208 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
210 FIXME("filter %p, id %d, flags %#x, cmd %p.\n", filter
, id
, flags
, cmd
);
215 static HRESULT WINAPI
dvd_control2_Resume(IDvdControl2
*iface
, DWORD flags
, IDvdCmd
**cmd
)
217 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
219 FIXME("filter %p, flags %#x, cmd %p.\n", filter
, flags
, cmd
);
224 static HRESULT WINAPI
dvd_control2_SelectRelativeButton(IDvdControl2
*iface
, DVD_RELATIVE_BUTTON button
)
226 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
228 FIXME("filter %p, button %d.\n", filter
, button
);
233 static HRESULT WINAPI
dvd_control2_ActivateButton(IDvdControl2
*iface
)
235 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
237 FIXME("filter %p.\n", filter
);
242 static HRESULT WINAPI
dvd_control2_SelectButton(IDvdControl2
*iface
, ULONG button
)
244 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
246 FIXME("filter %p, button %u.\n", filter
, button
);
251 static HRESULT WINAPI
dvd_control2_SelectAndActivateButton(IDvdControl2
*iface
, ULONG button
)
253 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
255 FIXME("filter %p, button %u.\n", filter
, button
);
260 static HRESULT WINAPI
dvd_control2_StillOff(IDvdControl2
*iface
)
262 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
264 FIXME("filter %p.\n", filter
);
269 static HRESULT WINAPI
dvd_control2_Pause(IDvdControl2
*iface
, BOOL enable
)
271 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
273 FIXME("filter %p, enable %d.\n", filter
, enable
);
278 static HRESULT WINAPI
dvd_control2_SelectAudioStream(IDvdControl2
*iface
, ULONG stream
, DWORD flags
, IDvdCmd
**cmd
)
280 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
282 FIXME("filter %p, stream %u, flags %#x, cmd %p.\n", filter
, stream
, flags
, cmd
);
287 static HRESULT WINAPI
dvd_control2_SelectSubpictureStream(IDvdControl2
*iface
, ULONG stream
, DWORD flags
, IDvdCmd
**cmd
)
289 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
291 FIXME("filter %p, stream %u, flags %#x, cmd %p.\n", filter
, stream
, flags
, cmd
);
296 static HRESULT WINAPI
dvd_control2_SetSubpictureState(IDvdControl2
*iface
, BOOL enable
, DWORD flags
, IDvdCmd
**cmd
)
298 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
300 FIXME("filter %p, enable %d, flags %#x, cmd %p.\n", filter
, enable
, flags
, cmd
);
305 static HRESULT WINAPI
dvd_control2_SelectAngle(IDvdControl2
*iface
, ULONG angle
, DWORD flags
, IDvdCmd
**cmd
)
307 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
309 FIXME("filter %p, angle %u, flags %#x, cmd %p.\n", filter
, angle
, flags
, cmd
);
314 static HRESULT WINAPI
dvd_control2_SelectParentalLevel(IDvdControl2
*iface
, ULONG level
)
316 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
318 FIXME("filter %p, level %u.\n", filter
, level
);
323 static HRESULT WINAPI
dvd_control2_SelectParentalCountry(IDvdControl2
*iface
, BYTE country
[2])
325 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
327 FIXME("filter %p, country %p.\n", filter
, country
);
332 static HRESULT WINAPI
dvd_control2_SelectKaraokeAudioPresentationMode(IDvdControl2
*iface
, ULONG mode
)
334 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
336 FIXME("filter %p, mode %u.\n", filter
, mode
);
341 static HRESULT WINAPI
dvd_control2_SelectVideoModePreference(IDvdControl2
*iface
, ULONG mode
)
343 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
345 FIXME("filter %p, mode %u.\n", filter
, mode
);
350 static HRESULT WINAPI
dvd_control2_SetDVDDirectory(IDvdControl2
*iface
, const WCHAR
*path
)
352 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
354 FIXME("filter %p, path %s.\n", filter
, debugstr_w(path
));
359 static HRESULT WINAPI
dvd_control2_ActivateAtPosition(IDvdControl2
*iface
, POINT point
)
361 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
363 FIXME("filter %p, point %s.\n", filter
, wine_dbgstr_point(&point
));
368 static HRESULT WINAPI
dvd_control2_SelectAtPosition(IDvdControl2
*iface
, POINT point
)
370 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
372 FIXME("filter %p, point %s.\n", filter
, wine_dbgstr_point(&point
));
377 static HRESULT WINAPI
dvd_control2_PlayChaptersAutoStop(IDvdControl2
*iface
, ULONG title
, ULONG chapter
, ULONG count
,
378 DWORD flags
, IDvdCmd
**cmd
)
380 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
382 FIXME("filter %p, title %u, chapter %u, count %u, flags %#x, cmd %p.\n", filter
, title
, chapter
, count
, flags
, cmd
);
387 static HRESULT WINAPI
dvd_control2_AcceptParentalLevelChange(IDvdControl2
*iface
, BOOL accept
)
389 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
391 FIXME("filter %p, accept %d.\n", filter
, accept
);
396 static HRESULT WINAPI
dvd_control2_SetOption(IDvdControl2
*iface
, DVD_OPTION_FLAG flag
, BOOL option
)
398 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
400 FIXME("filter %p, flag %d, option %d.\n", filter
, flag
, option
);
405 static HRESULT WINAPI
dvd_control2_SetState(IDvdControl2
*iface
, IDvdState
*state
, DWORD flags
, IDvdCmd
**cmd
)
407 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
409 FIXME("filter %p, state %p, flags %#x, cmd %p.\n", filter
, state
, flags
, cmd
);
414 static HRESULT WINAPI
dvd_control2_PlayPeriodInTitleAutoStop(IDvdControl2
*iface
, ULONG title
,
415 DVD_HMSF_TIMECODE
*start_time
, DVD_HMSF_TIMECODE
*end_time
, DWORD flags
, IDvdCmd
**cmd
)
417 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
419 FIXME("filter %p, title %u, start_time %p, end_time %p, flags %#x, cmd %p.\n",
420 filter
, title
, start_time
, end_time
, flags
, cmd
);
425 static HRESULT WINAPI
dvd_control2_SetGRPM(IDvdControl2
*iface
, ULONG index
, WORD value
, DWORD flags
, IDvdCmd
**cmd
)
427 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
429 FIXME("filter %p, index %u, value %i, flags %#x, cmd %p.\n", filter
, index
, value
, flags
, cmd
);
434 static HRESULT WINAPI
dvd_control2_SelectDefaultMenuLanguage(IDvdControl2
*iface
, LCID language
)
436 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
438 FIXME("filter %p, language %#x.\n", filter
, language
);
443 static HRESULT WINAPI
dvd_control2_SelectDefaultAudioLanguage(IDvdControl2
*iface
, LCID language
,
444 DVD_AUDIO_LANG_EXT extension
)
446 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
448 FIXME("filter %p, language %#x, extension %d.\n", filter
, language
, extension
);
453 static HRESULT WINAPI
dvd_control2_SelectDefaultSubpictureLanguage(IDvdControl2
*iface
, LCID language
,
454 DVD_SUBPICTURE_LANG_EXT extension
)
456 struct navigator
*filter
= impl_from_IDvdControl2(iface
);
458 FIXME("filter %p, language %#x, extension %d.\n", filter
, language
, extension
);
463 static const struct IDvdControl2Vtbl dvd_control2_vtbl
=
465 dvd_control2_QueryInterface
,
467 dvd_control2_Release
,
468 dvd_control2_PlayTitle
,
469 dvd_control2_PlayChapterInTitle
,
470 dvd_control2_PlayTimeInTitle
,
472 dvd_control2_ReturnFromSubmenu
,
473 dvd_control2_PlayAtTime
,
474 dvd_control2_PlayChapter
,
475 dvd_control2_PlayPrevChapter
,
476 dvd_control2_ReplayChapter
,
477 dvd_control2_PlayNextChapter
,
478 dvd_control2_PlayForwards
,
479 dvd_control2_PlayBackwards
,
480 dvd_control2_ShowMenu
,
482 dvd_control2_SelectRelativeButton
,
483 dvd_control2_ActivateButton
,
484 dvd_control2_SelectButton
,
485 dvd_control2_SelectAndActivateButton
,
486 dvd_control2_StillOff
,
488 dvd_control2_SelectAudioStream
,
489 dvd_control2_SelectSubpictureStream
,
490 dvd_control2_SetSubpictureState
,
491 dvd_control2_SelectAngle
,
492 dvd_control2_SelectParentalLevel
,
493 dvd_control2_SelectParentalCountry
,
494 dvd_control2_SelectKaraokeAudioPresentationMode
,
495 dvd_control2_SelectVideoModePreference
,
496 dvd_control2_SetDVDDirectory
,
497 dvd_control2_ActivateAtPosition
,
498 dvd_control2_SelectAtPosition
,
499 dvd_control2_PlayChaptersAutoStop
,
500 dvd_control2_AcceptParentalLevelChange
,
501 dvd_control2_SetOption
,
502 dvd_control2_SetState
,
503 dvd_control2_PlayPeriodInTitleAutoStop
,
504 dvd_control2_SetGRPM
,
505 dvd_control2_SelectDefaultMenuLanguage
,
506 dvd_control2_SelectDefaultAudioLanguage
,
507 dvd_control2_SelectDefaultSubpictureLanguage
,
510 static struct navigator
*impl_from_IDvdInfo2(IDvdInfo2
*iface
)
512 return CONTAINING_RECORD(iface
, struct navigator
, IDvdInfo2_iface
);
515 static HRESULT WINAPI
dvd_info2_QueryInterface(IDvdInfo2
*iface
, REFIID iid
, void **out
)
517 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
518 return IUnknown_QueryInterface(filter
->filter
.outer_unk
, iid
, out
);
521 static ULONG WINAPI
dvd_info2_AddRef(IDvdInfo2
*iface
)
523 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
524 return IUnknown_AddRef(filter
->filter
.outer_unk
);
527 static ULONG WINAPI
dvd_info2_Release(IDvdInfo2
*iface
)
529 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
530 return IUnknown_Release(filter
->filter
.outer_unk
);
533 static HRESULT WINAPI
dvd_info2_GetCurrentDomain(IDvdInfo2
*iface
, DVD_DOMAIN
*domain
)
535 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
537 FIXME("filter %p, domain %p.\n", filter
, domain
);
542 static HRESULT WINAPI
dvd_info2_GetCurrentLocation(IDvdInfo2
*iface
, DVD_PLAYBACK_LOCATION2
*location
)
544 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
546 FIXME("filter %p, location %p.\n", filter
, location
);
551 static HRESULT WINAPI
dvd_info2_GetTotalTitleTime(IDvdInfo2
*iface
, DVD_HMSF_TIMECODE
*time
, ULONG
*flags
)
553 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
555 FIXME("filter %p, time %p, flags %p.\n", filter
, time
, flags
);
560 static HRESULT WINAPI
dvd_info2_GetCurrentButton(IDvdInfo2
*iface
, ULONG
*count
, ULONG
*current
)
562 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
564 FIXME("filter %p, count %p, current %p.\n", filter
, count
, current
);
569 static HRESULT WINAPI
dvd_info2_GetCurrentAngle(IDvdInfo2
*iface
, ULONG
*count
, ULONG
*current
)
571 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
573 FIXME("filter %p, count %p, current %p.\n", filter
, count
, current
);
578 static HRESULT WINAPI
dvd_info2_GetCurrentAudio(IDvdInfo2
*iface
, ULONG
*count
, ULONG
*current
)
580 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
582 FIXME("filter %p, count %p, current %p.\n", filter
, count
, current
);
587 static HRESULT WINAPI
dvd_info2_GetCurrentSubpicture(IDvdInfo2
*iface
, ULONG
*count
, ULONG
*current
, BOOL
*enable
)
589 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
591 FIXME("filter %p, count %p, current %p, enable %p.\n", filter
, count
, current
, enable
);
596 static HRESULT WINAPI
dvd_info2_GetCurrentUOPS(IDvdInfo2
*iface
, ULONG
*uops
)
598 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
600 FIXME("filter %p, uops %p.\n", filter
, uops
);
605 static HRESULT WINAPI
dvd_info2_GetAllSPRMs(IDvdInfo2
*iface
, SPRMARRAY
*regs
)
607 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
609 FIXME("filter %p, regs %p.\n", filter
, regs
);
614 static HRESULT WINAPI
dvd_info2_GetAllGPRMs(IDvdInfo2
*iface
, GPRMARRAY
*regs
)
616 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
618 FIXME("filter %p, regs %p.\n", filter
, regs
);
623 static HRESULT WINAPI
dvd_info2_GetAudioLanguage(IDvdInfo2
*iface
, ULONG stream
, LCID
*language
)
625 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
627 FIXME("filter %p, stream %u, language %p.\n", filter
, stream
, language
);
632 static HRESULT WINAPI
dvd_info2_GetSubpictureLanguage(IDvdInfo2
*iface
, ULONG stream
, LCID
*language
)
634 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
636 FIXME("filter %p, stream %u, language %p.\n", filter
, stream
, language
);
641 static HRESULT WINAPI
dvd_info2_GetTitleAttributes(IDvdInfo2
*iface
, ULONG index
,
642 DVD_MenuAttributes
*menu
, DVD_TitleAttributes
*title
)
644 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
646 FIXME("filter %p, index %u, menu %p, title %p.\n", filter
, index
, menu
, title
);
651 static HRESULT WINAPI
dvd_info2_GetVMGAttributes(IDvdInfo2
*iface
, DVD_MenuAttributes
*attr
)
653 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
655 FIXME("filter %p, attr %p.\n", filter
, attr
);
660 static HRESULT WINAPI
dvd_info2_GetVideoAttributes(IDvdInfo2
*iface
, DVD_VideoAttributes
*attr
)
662 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
664 FIXME("filter %p, attr %p.\n", filter
, attr
);
669 static HRESULT WINAPI
dvd_info2_GetAudioAttributes(IDvdInfo2
*iface
, ULONG stream
, DVD_AudioAttributes
*attr
)
671 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
673 FIXME("filter %p, stream %u, attr %p.\n", filter
, stream
, attr
);
678 static HRESULT WINAPI
dvd_info2_GetKaraokeAttributes(IDvdInfo2
*iface
, ULONG stream
, DVD_KaraokeAttributes
*attr
)
680 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
682 FIXME("filter %p, stream %u, attr %p.\n", filter
, stream
, attr
);
687 static HRESULT WINAPI
dvd_info2_GetSubpictureAttributes(IDvdInfo2
*iface
, ULONG stream
,
688 DVD_SubpictureAttributes
*attr
)
690 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
692 FIXME("filter %p, stream %u, attr %p.\n", filter
, stream
, attr
);
697 static HRESULT WINAPI
dvd_info2_GetCurrentVolumeInfo(IDvdInfo2
*iface
, ULONG
*volume_count
, ULONG
*current
,
698 DVD_DISC_SIDE
*side
, ULONG
*title_count
)
700 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
702 FIXME("filter %p, volume_count %p, current %p, side %p, title_count %p.\n",
703 filter
, volume_count
, current
, side
, title_count
);
708 static HRESULT WINAPI
dvd_info2_GetDVDTextNumberOfLanguages(IDvdInfo2
*iface
, ULONG
*count
)
710 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
712 FIXME("filter %p, count %p.\n", filter
, count
);
717 static HRESULT WINAPI
dvd_info2_GetDVDTextLanguageInfo(IDvdInfo2
*iface
, ULONG index
, ULONG
*string_count
,
718 LCID
*language
, enum DVD_TextCharSet
*character_set
)
720 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
722 FIXME("filter %p, index %u, string_count %p, language %p, character_set %p.\n",
723 filter
, index
, string_count
, language
, character_set
);
728 static HRESULT WINAPI
dvd_info2_GetDVDTextStringAsNative(IDvdInfo2
*iface
, ULONG lang_index
, ULONG string_index
,
729 BYTE
*string
, ULONG size
, ULONG
*ret_size
, enum DVD_TextStringType
*type
)
731 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
733 FIXME("filter %p, lang_index %u, string_index %u, string %p, size %u, ret_size %p, type %p.\n",
734 filter
, lang_index
, string_index
, string
, size
, ret_size
, type
);
739 static HRESULT WINAPI
dvd_info2_GetDVDTextStringAsUnicode(IDvdInfo2
*iface
, ULONG lang_index
, ULONG string_index
,
740 WCHAR
*string
, ULONG size
, ULONG
*ret_size
, enum DVD_TextStringType
*type
)
742 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
744 FIXME("filter %p, lang_index %u, string_index %u, string %p, size %u, ret_size %p, type %p.\n",
745 filter
, lang_index
, string_index
, string
, size
, ret_size
, type
);
750 static HRESULT WINAPI
dvd_info2_GetPlayerParentalLevel(IDvdInfo2
*iface
, ULONG
*level
, BYTE country_code
[2])
752 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
754 FIXME("filter %p, level %p, country_code %p.\n", filter
, level
, country_code
);
759 static HRESULT WINAPI
dvd_info2_GetNumberOfChapters(IDvdInfo2
*iface
, ULONG title
, ULONG
*count
)
761 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
763 FIXME("filter %p, title %u, count %p.\n", filter
, title
, count
);
768 static HRESULT WINAPI
dvd_info2_GetTitleParentalLevels(IDvdInfo2
*iface
, ULONG title
, ULONG
*levels
)
770 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
772 FIXME("filter %p, title %u, levels %p.\n", filter
, title
, levels
);
777 static HRESULT WINAPI
dvd_info2_GetDVDDirectory(IDvdInfo2
*iface
, WCHAR
*path
, ULONG size
, ULONG
*ret_size
)
779 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
781 FIXME("filter %p, path %p, size %u, ret_size %p.\n", filter
, path
, size
, ret_size
);
786 static HRESULT WINAPI
dvd_info2_IsAudioStreamEnabled(IDvdInfo2
*iface
, ULONG stream
, BOOL
*enable
)
788 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
790 FIXME("filter %p, stream %u, enable %p.\n", filter
, stream
, enable
);
795 static HRESULT WINAPI
dvd_info2_GetDiscID(IDvdInfo2
*iface
, const WCHAR
*path
, ULONGLONG
*id
)
797 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
799 FIXME("filter %p, path %s, id %p.\n", filter
, debugstr_w(path
), id
);
804 static HRESULT WINAPI
dvd_info2_GetState(IDvdInfo2
*iface
, IDvdState
**state
)
806 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
808 FIXME("filter %p, state %p.\n", filter
, state
);
813 static HRESULT WINAPI
dvd_info2_GetMenuLanguages(IDvdInfo2
*iface
, LCID
*languages
, ULONG count
, ULONG
*ret_count
)
815 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
817 FIXME("filter %p, languages %p, count %u, ret_count %p.\n", filter
, languages
, count
, ret_count
);
822 static HRESULT WINAPI
dvd_info2_GetButtonAtPosition(IDvdInfo2
*iface
, POINT point
, ULONG
*button
)
824 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
826 FIXME("filter %p, point %s, button %p.\n", filter
, wine_dbgstr_point(&point
), button
);
831 static HRESULT WINAPI
dvd_info2_GetCmdFromEvent(IDvdInfo2
*iface
, LONG_PTR param
, IDvdCmd
**cmd
)
833 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
835 FIXME("filter %p, param %#lx, cmd %p.\n", filter
, param
, cmd
);
840 static HRESULT WINAPI
dvd_info2_GetDefaultMenuLanguage(IDvdInfo2
*iface
, LCID
*language
)
842 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
844 FIXME("filter %p, language %p.\n", filter
, language
);
849 static HRESULT WINAPI
dvd_info2_GetDefaultAudioLanguage(IDvdInfo2
*iface
, LCID
*language
,
850 DVD_AUDIO_LANG_EXT
*extension
)
852 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
854 FIXME("filter %p, language %p, extension %p.\n", filter
, language
, extension
);
859 static HRESULT WINAPI
dvd_info2_SelectDefaultSubpictureLanguage(IDvdInfo2
*iface
, LCID
*language
,
860 DVD_SUBPICTURE_LANG_EXT
*extension
)
862 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
864 FIXME("filter %p, language %p, extension %p.\n", filter
, language
, extension
);
869 static HRESULT WINAPI
dvd_info2_GetDecoderCaps(IDvdInfo2
*iface
, DVD_DECODER_CAPS
*caps
)
871 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
873 FIXME("filter %p, caps %p.\n", filter
, caps
);
878 static HRESULT WINAPI
dvd_info2_GetButtonRect(IDvdInfo2
*iface
, ULONG button
, RECT
*rect
)
880 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
882 FIXME("filter %p, button %u, rect %p.\n", filter
, button
, rect
);
887 static HRESULT WINAPI
dvd_info2_IsSubpictureStreamEnabled(IDvdInfo2
*iface
, ULONG stream
, BOOL
*enable
)
889 struct navigator
*filter
= impl_from_IDvdInfo2(iface
);
891 FIXME("filter %p, stream %u, enable %p.\n", filter
, stream
, enable
);
896 static const struct IDvdInfo2Vtbl dvd_info2_vtbl
=
898 dvd_info2_QueryInterface
,
901 dvd_info2_GetCurrentDomain
,
902 dvd_info2_GetCurrentLocation
,
903 dvd_info2_GetTotalTitleTime
,
904 dvd_info2_GetCurrentButton
,
905 dvd_info2_GetCurrentAngle
,
906 dvd_info2_GetCurrentAudio
,
907 dvd_info2_GetCurrentSubpicture
,
908 dvd_info2_GetCurrentUOPS
,
909 dvd_info2_GetAllSPRMs
,
910 dvd_info2_GetAllGPRMs
,
911 dvd_info2_GetAudioLanguage
,
912 dvd_info2_GetSubpictureLanguage
,
913 dvd_info2_GetTitleAttributes
,
914 dvd_info2_GetVMGAttributes
,
915 dvd_info2_GetVideoAttributes
,
916 dvd_info2_GetAudioAttributes
,
917 dvd_info2_GetKaraokeAttributes
,
918 dvd_info2_GetSubpictureAttributes
,
919 dvd_info2_GetCurrentVolumeInfo
,
920 dvd_info2_GetDVDTextNumberOfLanguages
,
921 dvd_info2_GetDVDTextLanguageInfo
,
922 dvd_info2_GetDVDTextStringAsNative
,
923 dvd_info2_GetDVDTextStringAsUnicode
,
924 dvd_info2_GetPlayerParentalLevel
,
925 dvd_info2_GetNumberOfChapters
,
926 dvd_info2_GetTitleParentalLevels
,
927 dvd_info2_GetDVDDirectory
,
928 dvd_info2_IsAudioStreamEnabled
,
931 dvd_info2_GetMenuLanguages
,
932 dvd_info2_GetButtonAtPosition
,
933 dvd_info2_GetCmdFromEvent
,
934 dvd_info2_GetDefaultMenuLanguage
,
935 dvd_info2_GetDefaultAudioLanguage
,
936 dvd_info2_SelectDefaultSubpictureLanguage
,
937 dvd_info2_GetDecoderCaps
,
938 dvd_info2_GetButtonRect
,
939 dvd_info2_IsSubpictureStreamEnabled
942 HRESULT
navigator_create(IUnknown
*outer
, IUnknown
**out
)
944 struct navigator
*object
;
946 if (!(object
= calloc(1, sizeof(*object
))))
947 return E_OUTOFMEMORY
;
949 strmbase_filter_init(&object
->filter
, outer
, &CLSID_DVDNavigator
, &filter_ops
);
950 object
->IDvdControl2_iface
.lpVtbl
= &dvd_control2_vtbl
;
951 object
->IDvdInfo2_iface
.lpVtbl
= &dvd_info2_vtbl
;
953 TRACE("Created DVD Navigator filter %p.\n", object
);
954 *out
= &object
->filter
.IUnknown_inner
;