Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/qdvd/navigator.c | 436 ++++++++++++++++++++++++++++++++++++ dlls/qdvd/tests/navigator.c | 2 +- 2 files changed, 437 insertions(+), 1 deletion(-)
diff --git a/dlls/qdvd/navigator.c b/dlls/qdvd/navigator.c index 00cb0af995..74bd9a3923 100644 --- a/dlls/qdvd/navigator.c +++ b/dlls/qdvd/navigator.c @@ -27,6 +27,7 @@ struct navigator { struct strmbase_filter filter; IDvdControl2 IDvdControl2_iface; + IDvdInfo2 IDvdInfo2_iface; };
static inline struct navigator *impl_from_strmbase_filter(struct strmbase_filter *filter) @@ -40,6 +41,8 @@ static HRESULT navigator_query_interface(struct strmbase_filter *iface, REFIID i
if (IsEqualGUID(iid, &IID_IDvdControl2)) *out = &filter->IDvdControl2_iface; + else if (IsEqualGUID(iid, &IID_IDvdInfo2)) + *out = &filter->IDvdInfo2_iface; else return E_NOINTERFACE;
@@ -504,6 +507,438 @@ static const struct IDvdControl2Vtbl dvd_control2_vtbl = dvd_control2_SelectDefaultSubpictureLanguage, };
+static struct navigator *impl_from_IDvdInfo2(IDvdInfo2 *iface) +{ + return CONTAINING_RECORD(iface, struct navigator, IDvdInfo2_iface); +} + +static HRESULT WINAPI dvd_info2_QueryInterface(IDvdInfo2 *iface, REFIID iid, void **out) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + return IUnknown_QueryInterface(filter->filter.outer_unk, iid, out); +} + +static ULONG WINAPI dvd_info2_AddRef(IDvdInfo2 *iface) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + return IUnknown_AddRef(filter->filter.outer_unk); +} + +static ULONG WINAPI dvd_info2_Release(IDvdInfo2 *iface) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + return IUnknown_Release(filter->filter.outer_unk); +} + +static HRESULT WINAPI dvd_info2_GetCurrentDomain(IDvdInfo2 *iface, DVD_DOMAIN *domain) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, domain %p.\n", filter, domain); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetCurrentLocation(IDvdInfo2 *iface, DVD_PLAYBACK_LOCATION2 *location) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, location %p.\n", filter, location); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetTotalTitleTime(IDvdInfo2 *iface, DVD_HMSF_TIMECODE *time, ULONG *flags) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, time %p, flags %p.\n", filter, time, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetCurrentButton(IDvdInfo2 *iface, ULONG *count, ULONG *current) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, count %p, current %p.\n", filter, count, current); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetCurrentAngle(IDvdInfo2 *iface, ULONG *count, ULONG *current) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, count %p, current %p.\n", filter, count, current); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetCurrentAudio(IDvdInfo2 *iface, ULONG *count, ULONG *current) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, count %p, current %p.\n", filter, count, current); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetCurrentSubpicture(IDvdInfo2 *iface, ULONG *count, ULONG *current, BOOL *enable) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, count %p, current %p, enable %p.\n", filter, count, current, enable); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetCurrentUOPS(IDvdInfo2 *iface, ULONG *uops) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, uops %p.\n", filter, uops); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetAllSPRMs(IDvdInfo2 *iface, SPRMARRAY *regs) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, regs %p.\n", filter, regs); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetAllGPRMs(IDvdInfo2 *iface, GPRMARRAY *regs) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, regs %p.\n", filter, regs); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetAudioLanguage(IDvdInfo2 *iface, ULONG stream, LCID *language) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, stream %u, language %p.\n", filter, stream, language); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetSubpictureLanguage(IDvdInfo2 *iface, ULONG stream, LCID *language) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, stream %u, language %p.\n", filter, stream, language); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetTitleAttributes(IDvdInfo2 *iface, ULONG index, + DVD_MenuAttributes *menu, DVD_TitleAttributes *title) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, index %u, menu %p, title %p.\n", filter, index, menu, title); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetVMGAttributes(IDvdInfo2 *iface, DVD_MenuAttributes *attr) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, attr %p.\n", filter, attr); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetVideoAttributes(IDvdInfo2 *iface, DVD_VideoAttributes *attr) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, attr %p.\n", filter, attr); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetAudioAttributes(IDvdInfo2 *iface, ULONG stream, DVD_AudioAttributes *attr) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, stream %u, attr %p.\n", filter, stream, attr); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetKaraokeAttributes(IDvdInfo2 *iface, ULONG stream, DVD_KaraokeAttributes *attr) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, stream %u, attr %p.\n", filter, stream, attr); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetSubpictureAttributes(IDvdInfo2 *iface, ULONG stream, + DVD_SubpictureAttributes *attr) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, stream %u, attr %p.\n", filter, stream, attr); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetCurrentVolumeInfo(IDvdInfo2 *iface, ULONG *volume_count, ULONG *current, + DVD_DISC_SIDE *side, ULONG *title_count) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, volume_count %p, current %p, side %p, title_count %p.\n", + filter, volume_count, current, side, title_count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDVDTextNumberOfLanguages(IDvdInfo2 *iface, ULONG *count) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, count %p.\n", filter, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDVDTextLanguageInfo(IDvdInfo2 *iface, ULONG index, ULONG *string_count, + LCID *language, enum DVD_TextCharSet *character_set) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, index %u, string_count %p, language %p, character_set %p.\n", + filter, index, string_count, language, character_set); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDVDTextStringAsNative(IDvdInfo2 *iface, ULONG lang_index, ULONG string_index, + BYTE *string, ULONG size, ULONG *ret_size, enum DVD_TextStringType *type) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, lang_index %u, string_index %u, string %p, size %u, ret_size %p, type %p.\n", + filter, lang_index, string_index, string, size, ret_size, type); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDVDTextStringAsUnicode(IDvdInfo2 *iface, ULONG lang_index, ULONG string_index, + WCHAR *string, ULONG size, ULONG *ret_size, enum DVD_TextStringType *type) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, lang_index %u, string_index %u, string %p, size %u, ret_size %p, type %p.\n", + filter, lang_index, string_index, string, size, ret_size, type); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetPlayerParentalLevel(IDvdInfo2 *iface, ULONG *level, BYTE country_code[2]) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, level %p, country_code %p.\n", filter, level, country_code); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetNumberOfChapters(IDvdInfo2 *iface, ULONG title, ULONG *count) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, title %u, count %p.\n", filter, title, count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetTitleParentalLevels(IDvdInfo2 *iface, ULONG title, ULONG *levels) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, title %u, levels %p.\n", filter, title, levels); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDVDDirectory(IDvdInfo2 *iface, WCHAR *path, ULONG size, ULONG *ret_size) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, path %p, size %u, ret_size %p.\n", filter, path, size, ret_size); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_IsAudioStreamEnabled(IDvdInfo2 *iface, ULONG stream, BOOL *enable) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, stream %u, enable %p.\n", filter, stream, enable); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDiscID(IDvdInfo2 *iface, const WCHAR *path, ULONGLONG *id) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, path %s, id %p.\n", filter, debugstr_w(path), id); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetState(IDvdInfo2 *iface, IDvdState **state) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, state %p.\n", filter, state); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetMenuLanguages(IDvdInfo2 *iface, LCID *languages, ULONG count, ULONG *ret_count) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, languages %p, count %u, ret_count %p.\n", filter, languages, count, ret_count); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetButtonAtPosition(IDvdInfo2 *iface, POINT point, ULONG *button) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, point %s, button %p.\n", filter, wine_dbgstr_point(&point), button); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetCmdFromEvent(IDvdInfo2 *iface, LONG_PTR param, IDvdCmd **cmd) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, param %#lx, cmd %p.\n", filter, param, cmd); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDefaultMenuLanguage(IDvdInfo2 *iface, LCID *language) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, language %p.\n", filter, language); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDefaultAudioLanguage(IDvdInfo2 *iface, LCID *language, + DVD_AUDIO_LANG_EXT *extension) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, language %p, extension %p.\n", filter, language, extension); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_SelectDefaultSubpictureLanguage(IDvdInfo2 *iface, LCID *language, + DVD_SUBPICTURE_LANG_EXT *extension) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, language %p, extension %p.\n", filter, language, extension); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetDecoderCaps(IDvdInfo2 *iface, DVD_DECODER_CAPS *caps) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, caps %p.\n", filter, caps); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_GetButtonRect(IDvdInfo2 *iface, ULONG button, RECT *rect) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, button %u, rect %p.\n", filter, button, rect); + + return E_NOTIMPL; +} + +static HRESULT WINAPI dvd_info2_IsSubpictureStreamEnabled(IDvdInfo2 *iface, ULONG stream, BOOL *enable) +{ + struct navigator *filter = impl_from_IDvdInfo2(iface); + + FIXME("filter %p, stream %u, enable %p.\n", filter, stream, enable); + + return E_NOTIMPL; +} + +static const struct IDvdInfo2Vtbl dvd_info2_vtbl = +{ + dvd_info2_QueryInterface, + dvd_info2_AddRef, + dvd_info2_Release, + dvd_info2_GetCurrentDomain, + dvd_info2_GetCurrentLocation, + dvd_info2_GetTotalTitleTime, + dvd_info2_GetCurrentButton, + dvd_info2_GetCurrentAngle, + dvd_info2_GetCurrentAudio, + dvd_info2_GetCurrentSubpicture, + dvd_info2_GetCurrentUOPS, + dvd_info2_GetAllSPRMs, + dvd_info2_GetAllGPRMs, + dvd_info2_GetAudioLanguage, + dvd_info2_GetSubpictureLanguage, + dvd_info2_GetTitleAttributes, + dvd_info2_GetVMGAttributes, + dvd_info2_GetVideoAttributes, + dvd_info2_GetAudioAttributes, + dvd_info2_GetKaraokeAttributes, + dvd_info2_GetSubpictureAttributes, + dvd_info2_GetCurrentVolumeInfo, + dvd_info2_GetDVDTextNumberOfLanguages, + dvd_info2_GetDVDTextLanguageInfo, + dvd_info2_GetDVDTextStringAsNative, + dvd_info2_GetDVDTextStringAsUnicode, + dvd_info2_GetPlayerParentalLevel, + dvd_info2_GetNumberOfChapters, + dvd_info2_GetTitleParentalLevels, + dvd_info2_GetDVDDirectory, + dvd_info2_IsAudioStreamEnabled, + dvd_info2_GetDiscID, + dvd_info2_GetState, + dvd_info2_GetMenuLanguages, + dvd_info2_GetButtonAtPosition, + dvd_info2_GetCmdFromEvent, + dvd_info2_GetDefaultMenuLanguage, + dvd_info2_GetDefaultAudioLanguage, + dvd_info2_SelectDefaultSubpictureLanguage, + dvd_info2_GetDecoderCaps, + dvd_info2_GetButtonRect, + dvd_info2_IsSubpictureStreamEnabled +}; + HRESULT navigator_create(IUnknown *outer, IUnknown **out) { struct navigator *object; @@ -513,6 +948,7 @@ HRESULT navigator_create(IUnknown *outer, IUnknown **out)
strmbase_filter_init(&object->filter, outer, &CLSID_DVDNavigator, &filter_ops); object->IDvdControl2_iface.lpVtbl = &dvd_control2_vtbl; + object->IDvdInfo2_iface.lpVtbl = &dvd_info2_vtbl;
TRACE("Created DVD Navigator filter %p.\n", object); *out = &object->filter.IUnknown_inner; diff --git a/dlls/qdvd/tests/navigator.c b/dlls/qdvd/tests/navigator.c index db2ba392dc..51999065cf 100644 --- a/dlls/qdvd/tests/navigator.c +++ b/dlls/qdvd/tests/navigator.c @@ -62,7 +62,7 @@ static void test_interfaces(void) todo_wine check_interface(filter, &IID_IDvdControl, TRUE); check_interface(filter, &IID_IDvdControl2, TRUE); todo_wine check_interface(filter, &IID_IDvdInfo, TRUE); - todo_wine check_interface(filter, &IID_IDvdInfo2, TRUE); + check_interface(filter, &IID_IDvdInfo2, TRUE); check_interface(filter, &IID_IMediaFilter, TRUE); check_interface(filter, &IID_IPersist, TRUE); todo_wine check_interface(filter, &IID_ISpecifyPropertyPages, TRUE);