wmvcore: Support IWMHeaderInfo/2/3 interfaces in IWMReader.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a6d6bebede
commit
b1702c41b5
|
@ -98,13 +98,13 @@ static void test_wmreader_interfaces(void)
|
|||
ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||
|
||||
hr = IWMReader_QueryInterface(reader, &IID_IWMHeaderInfo, (void **)&header);
|
||||
todo_wine ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||
|
||||
hr = IWMReader_QueryInterface(reader, &IID_IWMHeaderInfo2, (void **)&header2);
|
||||
todo_wine ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||
|
||||
hr = IWMReader_QueryInterface(reader, &IID_IWMHeaderInfo3, (void **)&header3);
|
||||
todo_wine ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||
|
||||
hr = IWMReader_QueryInterface(reader, &IID_IWMProfile, (void **)&profile);
|
||||
todo_wine ok(hr == S_OK, "Failed 0x%08x\n", hr);
|
||||
|
|
|
@ -72,6 +72,7 @@ typedef struct {
|
|||
IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface;
|
||||
IWMReaderTimecode IWMReaderTimecode_iface;
|
||||
IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface;
|
||||
IWMHeaderInfo3 IWMHeaderInfo3_iface;
|
||||
LONG ref;
|
||||
} WMReader;
|
||||
|
||||
|
@ -129,6 +130,15 @@ static HRESULT WINAPI WMReader_QueryInterface(IWMReader *iface, REFIID riid, voi
|
|||
}else if(IsEqualGUID(riid, &IID_IWMReaderPlaylistBurn)) {
|
||||
TRACE("(%p)->(IWMReaderPlaylistBurn %p)\n", This, ppv);
|
||||
*ppv = &This->IWMReaderPlaylistBurn_iface;
|
||||
}else if(IsEqualGUID(riid, &IID_IWMHeaderInfo)) {
|
||||
TRACE("(%p)->(IWMHeaderInfo %p)\n", This, ppv);
|
||||
*ppv = &This->IWMHeaderInfo3_iface;
|
||||
}else if(IsEqualGUID(riid, &IID_IWMHeaderInfo2)) {
|
||||
TRACE("(%p)->(IWMHeaderInfo2 %p)\n", This, ppv);
|
||||
*ppv = &This->IWMHeaderInfo3_iface;
|
||||
}else if(IsEqualGUID(riid, &IID_IWMHeaderInfo3)) {
|
||||
TRACE("(%p)->(IWMHeaderInfo3 %p)\n", This, ppv);
|
||||
*ppv = &This->IWMHeaderInfo3_iface;
|
||||
}else {
|
||||
*ppv = NULL;
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
|
@ -1351,6 +1361,225 @@ static const IWMReaderPlaylistBurnVtbl WMReaderPlaylistBurnVtbl =
|
|||
playlist_EndPlaylistBurn
|
||||
};
|
||||
|
||||
static inline WMReader *impl_from_IWMHeaderInfo3(IWMHeaderInfo3 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, WMReader, IWMHeaderInfo3_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_QueryInterface(IWMHeaderInfo3 *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI headerinfo_AddRef(IWMHeaderInfo3 *iface)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
return IWMReader_AddRef(&This->IWMReader_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI headerinfo_Release(IWMHeaderInfo3 *iface)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
return IWMReader_Release(&This->IWMReader_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetAttributeCount(IWMHeaderInfo3 *iface, WORD stream_num, WORD *attributes)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %p\n", This, stream_num, attributes);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetAttributeByIndex(IWMHeaderInfo3 *iface, WORD index, WORD *stream_num,
|
||||
WCHAR *name, WORD *name_len, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %p, %p, %p, %p, %p, %p\n", This, index, stream_num, name, name_len, type,
|
||||
value, length);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetAttributeByName(IWMHeaderInfo3 *iface, WORD *stream_num, LPCWSTR name,
|
||||
WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %p, %s, %p, %p, %p\n", This, stream_num, debugstr_w(name), type, value, length);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_SetAttribute(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name,
|
||||
WMT_ATTR_DATATYPE type, const BYTE *value, WORD length)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %s, %d, %p, %d\n", This, stream_num, debugstr_w(name), type, value, length);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetMarkerCount(IWMHeaderInfo3 *iface, WORD *markers)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %p\n", This, markers);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetMarker(IWMHeaderInfo3 *iface, WORD index, WCHAR *marker_name,
|
||||
WORD *marker_len, QWORD *marker_time)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %p, %p, %p\n", This, index, marker_name, marker_len, marker_time);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_AddMarker(IWMHeaderInfo3 *iface, LPCWSTR_WMSDK_TYPE_SAFE marker_name,
|
||||
QWORD marker_time)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %p, %s\n", This, marker_name, wine_dbgstr_longlong(marker_time));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_RemoveMarker(IWMHeaderInfo3 *iface, WORD index)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d\n", This, index);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetScriptCount(IWMHeaderInfo3 *iface, WORD *scripts)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %p\n", This, scripts);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetScript(IWMHeaderInfo3 *iface, WORD index, WCHAR *type,
|
||||
WORD *type_len, WCHAR *command, WORD *command_len, QWORD *script_time)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %p, %p, %p, %p, %p\n", This, index, type, type_len, command, command_len, script_time);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_AddScript(IWMHeaderInfo3 *iface, LPCWSTR_WMSDK_TYPE_SAFE type,
|
||||
LPCWSTR_WMSDK_TYPE_SAFE command, QWORD script_time)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %s, %p, %s\n", This, debugstr_w(type), debugstr_w(command), wine_dbgstr_longlong(script_time));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_RemoveScript(IWMHeaderInfo3 *iface, WORD index)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d\n", This, index);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetCodecInfoCount(IWMHeaderInfo3 *iface, DWORD *codec_infos)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %p\n", This, codec_infos);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetCodecInfo(IWMHeaderInfo3 *iface, DWORD index, WORD *name_len,
|
||||
WCHAR *name, WORD *description_len, WCHAR *description, WMT_CODEC_INFO_TYPE *codec_type,
|
||||
WORD *codec_info_cnt, BYTE *codec_info)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %p, %p, %p, %p, %p, %p, %p\n", This, index, name_len, name, description_len,
|
||||
description, codec_type, codec_info_cnt, codec_info);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetAttributeCountEx(IWMHeaderInfo3 *iface, WORD stream_num, WORD *attributes)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %p\n", This, stream_num, attributes);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetAttributeIndices(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name,
|
||||
WORD *lang_index, WORD *indices, WORD *count)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %s, %p, %p, %p\n", This, stream_num, debugstr_w(name), lang_index, indices, count);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_GetAttributeByIndexEx(IWMHeaderInfo3 *iface, WORD stream_num,
|
||||
WORD index, LPWSTR name, WORD *name_len, WMT_ATTR_DATATYPE *type, WORD *lang_index,
|
||||
BYTE *value, DWORD *data_len)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %d, %s, %p, %p, %p, %p, %p\n", This, stream_num, index, debugstr_w(name), name_len,
|
||||
type, lang_index, value, data_len);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_ModifyAttribute(IWMHeaderInfo3 *iface, WORD stream_num,
|
||||
WORD index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD length)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %d, %d, %d, %p, %d\n", This, stream_num, index, type, lang_index, value, length);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_AddAttribute(IWMHeaderInfo3 *iface, WORD stream_num, LPCWSTR name,
|
||||
WORD *index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD length)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %s, %p, %d, %d, %p, %d\n", This, stream_num, debugstr_w(name), index,
|
||||
type, lang_index, value, length);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_DeleteAttribute(IWMHeaderInfo3 *iface, WORD stream_num, WORD index)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %d, %d\n", This, stream_num, index);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI headerinfo_AddCodecInfo(IWMHeaderInfo3 *iface, LPCWSTR_WMSDK_TYPE_SAFE name,
|
||||
LPCWSTR_WMSDK_TYPE_SAFE description, WMT_CODEC_INFO_TYPE codec_type, WORD codec_info_cnt,
|
||||
BYTE *codec_info)
|
||||
{
|
||||
WMReader *This = impl_from_IWMHeaderInfo3(iface);
|
||||
FIXME("%p, %p, %p, %d, %d, %p\n", This, name, description, codec_type, codec_info_cnt,
|
||||
codec_info);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IWMHeaderInfo3Vtbl WMHeaderInfo3Vtbl =
|
||||
{
|
||||
headerinfo_QueryInterface,
|
||||
headerinfo_AddRef,
|
||||
headerinfo_Release,
|
||||
headerinfo_GetAttributeCount,
|
||||
headerinfo_GetAttributeByIndex,
|
||||
headerinfo_GetAttributeByName,
|
||||
headerinfo_SetAttribute,
|
||||
headerinfo_GetMarkerCount,
|
||||
headerinfo_GetMarker,
|
||||
headerinfo_AddMarker,
|
||||
headerinfo_RemoveMarker,
|
||||
headerinfo_GetScriptCount,
|
||||
headerinfo_GetScript,
|
||||
headerinfo_AddScript,
|
||||
headerinfo_RemoveScript,
|
||||
headerinfo_GetCodecInfoCount,
|
||||
headerinfo_GetCodecInfo,
|
||||
headerinfo_GetAttributeCountEx,
|
||||
headerinfo_GetAttributeIndices,
|
||||
headerinfo_GetAttributeByIndexEx,
|
||||
headerinfo_ModifyAttribute,
|
||||
headerinfo_AddAttribute,
|
||||
headerinfo_DeleteAttribute,
|
||||
headerinfo_AddCodecInfo
|
||||
};
|
||||
|
||||
HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader)
|
||||
{
|
||||
WMReader *reader;
|
||||
|
@ -1369,6 +1598,7 @@ HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_
|
|||
reader->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
|
||||
reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
|
||||
reader->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
|
||||
reader->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl;
|
||||
reader->ref = 1;
|
||||
|
||||
*ret_reader = &reader->IWMReader_iface;
|
||||
|
|
Loading…
Reference in New Issue