Sweden-Number/dlls/winegstreamer/wm_reader.c

773 lines
25 KiB
C

/*
* Copyright 2012 Austin English
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "gst_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
static struct wm_reader *impl_from_IWMProfile3(IWMProfile3 *iface)
{
return CONTAINING_RECORD(iface, struct wm_reader, IWMProfile3_iface);
}
static HRESULT WINAPI profile_QueryInterface(IWMProfile3 *iface, REFIID iid, void **out)
{
struct wm_reader *reader = impl_from_IWMProfile3(iface);
TRACE("reader %p, iid %s, out %p.\n", reader, debugstr_guid(iid), out);
if (IsEqualIID(iid, &IID_IWMHeaderInfo)
|| IsEqualIID(iid, &IID_IWMHeaderInfo2)
|| IsEqualIID(iid, &IID_IWMHeaderInfo3))
{
*out = &reader->IWMHeaderInfo3_iface;
}
else if (IsEqualIID(iid, &IID_IWMLanguageList))
{
*out = &reader->IWMLanguageList_iface;
}
else if (IsEqualIID(iid, &IID_IWMPacketSize)
|| IsEqualIID(iid, &IID_IWMPacketSize2))
{
*out = &reader->IWMPacketSize2_iface;
}
else if (IsEqualIID(iid, &IID_IUnknown)
|| IsEqualIID(iid, &IID_IWMProfile)
|| IsEqualIID(iid, &IID_IWMProfile2)
|| IsEqualIID(iid, &IID_IWMProfile3))
{
*out = &reader->IWMProfile3_iface;
}
else if (IsEqualIID(iid, &IID_IWMReaderPlaylistBurn))
{
*out = &reader->IWMReaderPlaylistBurn_iface;
}
else if (IsEqualIID(iid, &IID_IWMReaderTimecode))
{
*out = &reader->IWMReaderTimecode_iface;
}
else if (!(*out = reader->ops->query_interface(reader, iid)))
{
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown *)*out);
return S_OK;
}
static ULONG WINAPI profile_AddRef(IWMProfile3 *iface)
{
struct wm_reader *reader = impl_from_IWMProfile3(iface);
ULONG refcount = InterlockedIncrement(&reader->refcount);
TRACE("%p increasing refcount to %u.\n", reader, refcount);
return refcount;
}
static ULONG WINAPI profile_Release(IWMProfile3 *iface)
{
struct wm_reader *reader = impl_from_IWMProfile3(iface);
ULONG refcount = InterlockedDecrement(&reader->refcount);
TRACE("%p decreasing refcount to %u.\n", reader, refcount);
if (!refcount)
reader->ops->destroy(reader);
return refcount;
}
static HRESULT WINAPI profile_GetVersion(IWMProfile3 *iface, WMT_VERSION *version)
{
FIXME("iface %p, version %p, stub!\n", iface, version);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetName(IWMProfile3 *iface, WCHAR *name, DWORD *length)
{
FIXME("iface %p, name %p, length %p, stub!\n", iface, name, length);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_SetName(IWMProfile3 *iface, const WCHAR *name)
{
FIXME("iface %p, name %s, stub!\n", iface, debugstr_w(name));
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetDescription(IWMProfile3 *iface, WCHAR *description, DWORD *length)
{
FIXME("iface %p, description %p, length %p, stub!\n", iface, description, length);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_SetDescription(IWMProfile3 *iface, const WCHAR *description)
{
FIXME("iface %p, description %s, stub!\n", iface, debugstr_w(description));
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetStreamCount(IWMProfile3 *iface, DWORD *count)
{
FIXME("iface %p, count %p, stub!\n", iface, count);
if (!count)
return E_INVALIDARG;
*count = 0;
return S_OK;
}
static HRESULT WINAPI profile_GetStream(IWMProfile3 *iface, DWORD index, IWMStreamConfig **config)
{
FIXME("iface %p, index %d, config %p, stub!\n", iface, index, config);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetStreamByNumber(IWMProfile3 *iface, WORD stream_number, IWMStreamConfig **config)
{
FIXME("iface %p, stream_number %u, config %p, stub!\n", iface, stream_number, config);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_RemoveStream(IWMProfile3 *iface, IWMStreamConfig *config)
{
FIXME("iface %p, config %p, stub!\n", iface, config);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_RemoveStreamByNumber(IWMProfile3 *iface, WORD stream_number)
{
FIXME("iface %p, stream_number %u, stub!\n", iface, stream_number);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_AddStream(IWMProfile3 *iface, IWMStreamConfig *config)
{
FIXME("iface %p, config %p, stub!\n", iface, config);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_ReconfigStream(IWMProfile3 *iface, IWMStreamConfig *config)
{
FIXME("iface %p, config %p, stub!\n", iface, config);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_CreateNewStream(IWMProfile3 *iface, REFGUID type, IWMStreamConfig **config)
{
FIXME("iface %p, type %s, config %p, stub!\n", iface, debugstr_guid(type), config);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetMutualExclusionCount(IWMProfile3 *iface, DWORD *count)
{
FIXME("iface %p, count %p, stub!\n", iface, count);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetMutualExclusion(IWMProfile3 *iface, DWORD index, IWMMutualExclusion **excl)
{
FIXME("iface %p, index %u, excl %p, stub!\n", iface, index, excl);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_RemoveMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion *excl)
{
FIXME("iface %p, excl %p, stub!\n", iface, excl);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_AddMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion *excl)
{
FIXME("iface %p, excl %p, stub!\n", iface, excl);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_CreateNewMutualExclusion(IWMProfile3 *iface, IWMMutualExclusion **excl)
{
FIXME("iface %p, excl %p, stub!\n", iface, excl);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetProfileID(IWMProfile3 *iface, GUID *id)
{
FIXME("iface %p, id %p, stub!\n", iface, id);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetStorageFormat(IWMProfile3 *iface, WMT_STORAGE_FORMAT *format)
{
FIXME("iface %p, format %p, stub!\n", iface, format);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_SetStorageFormat(IWMProfile3 *iface, WMT_STORAGE_FORMAT format)
{
FIXME("iface %p, format %#x, stub!\n", iface, format);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetBandwidthSharingCount(IWMProfile3 *iface, DWORD *count)
{
FIXME("iface %p, count %p, stub!\n", iface, count);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetBandwidthSharing(IWMProfile3 *iface, DWORD index, IWMBandwidthSharing **sharing)
{
FIXME("iface %p, index %d, sharing %p, stub!\n", iface, index, sharing);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_RemoveBandwidthSharing( IWMProfile3 *iface, IWMBandwidthSharing *sharing)
{
FIXME("iface %p, sharing %p, stub!\n", iface, sharing);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_AddBandwidthSharing(IWMProfile3 *iface, IWMBandwidthSharing *sharing)
{
FIXME("iface %p, sharing %p, stub!\n", iface, sharing);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_CreateNewBandwidthSharing( IWMProfile3 *iface, IWMBandwidthSharing **sharing)
{
FIXME("iface %p, sharing %p, stub!\n", iface, sharing);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization **stream)
{
FIXME("iface %p, stream %p, stub!\n", iface, stream);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_SetStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization *stream)
{
FIXME("iface %p, stream %p, stub!\n", iface, stream);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_RemoveStreamPrioritization(IWMProfile3 *iface)
{
FIXME("iface %p, stub!\n", iface);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_CreateNewStreamPrioritization(IWMProfile3 *iface, IWMStreamPrioritization **stream)
{
FIXME("iface %p, stream %p, stub!\n", iface, stream);
return E_NOTIMPL;
}
static HRESULT WINAPI profile_GetExpectedPacketCount(IWMProfile3 *iface, QWORD duration, QWORD *count)
{
FIXME("iface %p, duration %s, count %p, stub!\n", iface, debugstr_time(duration), count);
return E_NOTIMPL;
}
static const IWMProfile3Vtbl profile_vtbl =
{
profile_QueryInterface,
profile_AddRef,
profile_Release,
profile_GetVersion,
profile_GetName,
profile_SetName,
profile_GetDescription,
profile_SetDescription,
profile_GetStreamCount,
profile_GetStream,
profile_GetStreamByNumber,
profile_RemoveStream,
profile_RemoveStreamByNumber,
profile_AddStream,
profile_ReconfigStream,
profile_CreateNewStream,
profile_GetMutualExclusionCount,
profile_GetMutualExclusion,
profile_RemoveMutualExclusion,
profile_AddMutualExclusion,
profile_CreateNewMutualExclusion,
profile_GetProfileID,
profile_GetStorageFormat,
profile_SetStorageFormat,
profile_GetBandwidthSharingCount,
profile_GetBandwidthSharing,
profile_RemoveBandwidthSharing,
profile_AddBandwidthSharing,
profile_CreateNewBandwidthSharing,
profile_GetStreamPrioritization,
profile_SetStreamPrioritization,
profile_RemoveStreamPrioritization,
profile_CreateNewStreamPrioritization,
profile_GetExpectedPacketCount,
};
static struct wm_reader *impl_from_IWMHeaderInfo3(IWMHeaderInfo3 *iface)
{
return CONTAINING_RECORD(iface, struct wm_reader, IWMHeaderInfo3_iface);
}
static HRESULT WINAPI header_info_QueryInterface(IWMHeaderInfo3 *iface, REFIID iid, void **out)
{
struct wm_reader *reader = impl_from_IWMHeaderInfo3(iface);
return IWMProfile3_QueryInterface(&reader->IWMProfile3_iface, iid, out);
}
static ULONG WINAPI header_info_AddRef(IWMHeaderInfo3 *iface)
{
struct wm_reader *reader = impl_from_IWMHeaderInfo3(iface);
return IWMProfile3_AddRef(&reader->IWMProfile3_iface);
}
static ULONG WINAPI header_info_Release(IWMHeaderInfo3 *iface)
{
struct wm_reader *reader = impl_from_IWMHeaderInfo3(iface);
return IWMProfile3_Release(&reader->IWMProfile3_iface);
}
static HRESULT WINAPI header_info_GetAttributeCount(IWMHeaderInfo3 *iface, WORD stream_number, WORD *count)
{
FIXME("iface %p, stream_number %u, count %p, stub!\n", iface, stream_number, count);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetAttributeByIndex(IWMHeaderInfo3 *iface, WORD index, WORD *stream_number,
WCHAR *name, WORD *name_len, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *size)
{
FIXME("iface %p, index %u, stream_number %p, name %p, name_len %p, type %p, value %p, size %p, stub!\n",
iface, index, stream_number, name, name_len, type, value, size);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetAttributeByName(IWMHeaderInfo3 *iface, WORD *stream_number,
const WCHAR *name, WMT_ATTR_DATATYPE *type, BYTE *value, WORD *size)
{
FIXME("iface %p, stream_number %p, name %s, type %p, value %p, size %p, stub!\n",
iface, stream_number, debugstr_w(name), type, value, size);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_SetAttribute(IWMHeaderInfo3 *iface, WORD stream_number,
const WCHAR *name, WMT_ATTR_DATATYPE type, const BYTE *value, WORD size)
{
FIXME("iface %p, stream_number %u, name %s, type %#x, value %p, size %u, stub!\n",
iface, stream_number, debugstr_w(name), type, value, size);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetMarkerCount(IWMHeaderInfo3 *iface, WORD *count)
{
FIXME("iface %p, count %p, stub!\n", iface, count);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetMarker(IWMHeaderInfo3 *iface,
WORD index, WCHAR *name, WORD *len, QWORD *time)
{
FIXME("iface %p, index %u, name %p, len %p, time %p, stub!\n", iface, index, name, len, time);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_AddMarker(IWMHeaderInfo3 *iface, const WCHAR *name, QWORD time)
{
FIXME("iface %p, name %s, time %s, stub!\n", iface, debugstr_w(name), debugstr_time(time));
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_RemoveMarker(IWMHeaderInfo3 *iface, WORD index)
{
FIXME("iface %p, index %u, stub!\n", iface, index);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetScriptCount(IWMHeaderInfo3 *iface, WORD *count)
{
FIXME("iface %p, count %p, stub!\n", iface, count);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetScript(IWMHeaderInfo3 *iface, WORD index, WCHAR *type,
WORD *type_len, WCHAR *command, WORD *command_len, QWORD *time)
{
FIXME("iface %p, index %u, type %p, type_len %p, command %p, command_len %p, time %p, stub!\n",
iface, index, type, type_len, command, command_len, time);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_AddScript(IWMHeaderInfo3 *iface,
const WCHAR *type, const WCHAR *command, QWORD time)
{
FIXME("iface %p, type %s, command %s, time %s, stub!\n",
iface, debugstr_w(type), debugstr_w(command), debugstr_time(time));
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_RemoveScript(IWMHeaderInfo3 *iface, WORD index)
{
FIXME("iface %p, index %u, stub!\n", iface, index);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetCodecInfoCount(IWMHeaderInfo3 *iface, DWORD *count)
{
FIXME("iface %p, count %p, stub!\n", iface, count);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetCodecInfo(IWMHeaderInfo3 *iface, DWORD index, WORD *name_len,
WCHAR *name, WORD *desc_len, WCHAR *desc, WMT_CODEC_INFO_TYPE *type, WORD *size, BYTE *info)
{
FIXME("iface %p, index %u, name_len %p, name %p, desc_len %p, desc %p, type %p, size %p, info %p, stub!\n",
iface, index, name_len, name, desc_len, desc, type, size, info);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetAttributeCountEx(IWMHeaderInfo3 *iface, WORD stream_number, WORD *count)
{
FIXME("iface %p, stream_number %u, count %p, stub!\n", iface, stream_number, count);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetAttributeIndices(IWMHeaderInfo3 *iface, WORD stream_number,
const WCHAR *name, WORD *lang_index, WORD *indices, WORD *count)
{
FIXME("iface %p, stream_number %u, name %s, lang_index %p, indices %p, count %p, stub!\n",
iface, stream_number, debugstr_w(name), lang_index, indices, count);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_GetAttributeByIndexEx(IWMHeaderInfo3 *iface,
WORD stream_number, WORD index, WCHAR *name, WORD *name_len,
WMT_ATTR_DATATYPE *type, WORD *lang_index, BYTE *value, DWORD *size)
{
FIXME("iface %p, stream_number %u, index %u, name %p, name_len %p,"
" type %p, lang_index %p, value %p, size %p, stub!\n",
iface, stream_number, index, debugstr_w(name), name_len, type, lang_index, value, size);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_ModifyAttribute(IWMHeaderInfo3 *iface, WORD stream_number,
WORD index, WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD size)
{
FIXME("iface %p, stream_number %u, index %u, type %#x, lang_index %u, value %p, size %u, stub!\n",
iface, stream_number, index, type, lang_index, value, size);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_AddAttribute(IWMHeaderInfo3 *iface,
WORD stream_number, const WCHAR *name, WORD *index,
WMT_ATTR_DATATYPE type, WORD lang_index, const BYTE *value, DWORD size)
{
FIXME("iface %p, stream_number %u, name %s, index %p, type %#x, lang_index %u, value %p, size %u, stub!\n",
iface, stream_number, debugstr_w(name), index, type, lang_index, value, size);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_DeleteAttribute(IWMHeaderInfo3 *iface, WORD stream_number, WORD index)
{
FIXME("iface %p, stream_number %u, index %u, stub!\n", iface, stream_number, index);
return E_NOTIMPL;
}
static HRESULT WINAPI header_info_AddCodecInfo(IWMHeaderInfo3 *iface, const WCHAR *name,
const WCHAR *desc, WMT_CODEC_INFO_TYPE type, WORD size, BYTE *info)
{
FIXME("iface %p, name %s, desc %s, type %#x, size %u, info %p, stub!\n",
info, debugstr_w(name), debugstr_w(desc), type, size, info);
return E_NOTIMPL;
}
static const IWMHeaderInfo3Vtbl header_info_vtbl =
{
header_info_QueryInterface,
header_info_AddRef,
header_info_Release,
header_info_GetAttributeCount,
header_info_GetAttributeByIndex,
header_info_GetAttributeByName,
header_info_SetAttribute,
header_info_GetMarkerCount,
header_info_GetMarker,
header_info_AddMarker,
header_info_RemoveMarker,
header_info_GetScriptCount,
header_info_GetScript,
header_info_AddScript,
header_info_RemoveScript,
header_info_GetCodecInfoCount,
header_info_GetCodecInfo,
header_info_GetAttributeCountEx,
header_info_GetAttributeIndices,
header_info_GetAttributeByIndexEx,
header_info_ModifyAttribute,
header_info_AddAttribute,
header_info_DeleteAttribute,
header_info_AddCodecInfo,
};
static struct wm_reader *impl_from_IWMLanguageList(IWMLanguageList *iface)
{
return CONTAINING_RECORD(iface, struct wm_reader, IWMLanguageList_iface);
}
static HRESULT WINAPI language_list_QueryInterface(IWMLanguageList *iface, REFIID iid, void **out)
{
struct wm_reader *reader = impl_from_IWMLanguageList(iface);
return IWMProfile3_QueryInterface(&reader->IWMProfile3_iface, iid, out);
}
static ULONG WINAPI language_list_AddRef(IWMLanguageList *iface)
{
struct wm_reader *reader = impl_from_IWMLanguageList(iface);
return IWMProfile3_AddRef(&reader->IWMProfile3_iface);
}
static ULONG WINAPI language_list_Release(IWMLanguageList *iface)
{
struct wm_reader *reader = impl_from_IWMLanguageList(iface);
return IWMProfile3_Release(&reader->IWMProfile3_iface);
}
static HRESULT WINAPI language_list_GetLanguageCount(IWMLanguageList *iface, WORD *count)
{
FIXME("iface %p, count %p, stub!\n", iface, count);
return E_NOTIMPL;
}
static HRESULT WINAPI language_list_GetLanguageDetails(IWMLanguageList *iface,
WORD index, WCHAR *lang, WORD *len)
{
FIXME("iface %p, index %u, lang %p, len %p, stub!\n", iface, index, lang, len);
return E_NOTIMPL;
}
static HRESULT WINAPI language_list_AddLanguageByRFC1766String(IWMLanguageList *iface,
const WCHAR *lang, WORD *index)
{
FIXME("iface %p, lang %s, index %p, stub!\n", iface, debugstr_w(lang), index);
return E_NOTIMPL;
}
static const IWMLanguageListVtbl language_list_vtbl =
{
language_list_QueryInterface,
language_list_AddRef,
language_list_Release,
language_list_GetLanguageCount,
language_list_GetLanguageDetails,
language_list_AddLanguageByRFC1766String,
};
static struct wm_reader *impl_from_IWMPacketSize2(IWMPacketSize2 *iface)
{
return CONTAINING_RECORD(iface, struct wm_reader, IWMPacketSize2_iface);
}
static HRESULT WINAPI packet_size_QueryInterface(IWMPacketSize2 *iface, REFIID iid, void **out)
{
struct wm_reader *reader = impl_from_IWMPacketSize2(iface);
return IWMProfile3_QueryInterface(&reader->IWMProfile3_iface, iid, out);
}
static ULONG WINAPI packet_size_AddRef(IWMPacketSize2 *iface)
{
struct wm_reader *reader = impl_from_IWMPacketSize2(iface);
return IWMProfile3_AddRef(&reader->IWMProfile3_iface);
}
static ULONG WINAPI packet_size_Release(IWMPacketSize2 *iface)
{
struct wm_reader *reader = impl_from_IWMPacketSize2(iface);
return IWMProfile3_Release(&reader->IWMProfile3_iface);
}
static HRESULT WINAPI packet_size_GetMaxPacketSize(IWMPacketSize2 *iface, DWORD *size)
{
FIXME("iface %p, size %p, stub!\n", iface, size);
return E_NOTIMPL;
}
static HRESULT WINAPI packet_size_SetMaxPacketSize(IWMPacketSize2 *iface, DWORD size)
{
FIXME("iface %p, size %u, stub!\n", iface, size);
return E_NOTIMPL;
}
static HRESULT WINAPI packet_size_GetMinPacketSize(IWMPacketSize2 *iface, DWORD *size)
{
FIXME("iface %p, size %p, stub!\n", iface, size);
return E_NOTIMPL;
}
static HRESULT WINAPI packet_size_SetMinPacketSize(IWMPacketSize2 *iface, DWORD size)
{
FIXME("iface %p, size %u, stub!\n", iface, size);
return E_NOTIMPL;
}
static const IWMPacketSize2Vtbl packet_size_vtbl =
{
packet_size_QueryInterface,
packet_size_AddRef,
packet_size_Release,
packet_size_GetMaxPacketSize,
packet_size_SetMaxPacketSize,
packet_size_GetMinPacketSize,
packet_size_SetMinPacketSize,
};
static struct wm_reader *impl_from_IWMReaderPlaylistBurn(IWMReaderPlaylistBurn *iface)
{
return CONTAINING_RECORD(iface, struct wm_reader, IWMReaderPlaylistBurn_iface);
}
static HRESULT WINAPI playlist_QueryInterface(IWMReaderPlaylistBurn *iface, REFIID iid, void **out)
{
struct wm_reader *reader = impl_from_IWMReaderPlaylistBurn(iface);
return IWMProfile3_QueryInterface(&reader->IWMProfile3_iface, iid, out);
}
static ULONG WINAPI playlist_AddRef(IWMReaderPlaylistBurn *iface)
{
struct wm_reader *reader = impl_from_IWMReaderPlaylistBurn(iface);
return IWMProfile3_AddRef(&reader->IWMProfile3_iface);
}
static ULONG WINAPI playlist_Release(IWMReaderPlaylistBurn *iface)
{
struct wm_reader *reader = impl_from_IWMReaderPlaylistBurn(iface);
return IWMProfile3_Release(&reader->IWMProfile3_iface);
}
static HRESULT WINAPI playlist_InitPlaylistBurn(IWMReaderPlaylistBurn *iface, DWORD count,
const WCHAR **filenames, IWMStatusCallback *callback, void *context)
{
FIXME("iface %p, count %u, filenames %p, callback %p, context %p, stub!\n",
iface, count, filenames, callback, context);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_GetInitResults(IWMReaderPlaylistBurn *iface, DWORD count, HRESULT *hrs)
{
FIXME("iface %p, count %u, hrs %p, stub!\n", iface, count, hrs);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_Cancel(IWMReaderPlaylistBurn *iface)
{
FIXME("iface %p, stub!\n", iface);
return E_NOTIMPL;
}
static HRESULT WINAPI playlist_EndPlaylistBurn(IWMReaderPlaylistBurn *iface, HRESULT hr)
{
FIXME("iface %p, hr %#x, stub!\n", iface, hr);
return E_NOTIMPL;
}
static const IWMReaderPlaylistBurnVtbl playlist_vtbl =
{
playlist_QueryInterface,
playlist_AddRef,
playlist_Release,
playlist_InitPlaylistBurn,
playlist_GetInitResults,
playlist_Cancel,
playlist_EndPlaylistBurn,
};
static struct wm_reader *impl_from_IWMReaderTimecode(IWMReaderTimecode *iface)
{
return CONTAINING_RECORD(iface, struct wm_reader, IWMReaderTimecode_iface);
}
static HRESULT WINAPI timecode_QueryInterface(IWMReaderTimecode *iface, REFIID iid, void **out)
{
struct wm_reader *reader = impl_from_IWMReaderTimecode(iface);
return IWMProfile3_QueryInterface(&reader->IWMProfile3_iface, iid, out);
}
static ULONG WINAPI timecode_AddRef(IWMReaderTimecode *iface)
{
struct wm_reader *reader = impl_from_IWMReaderTimecode(iface);
return IWMProfile3_AddRef(&reader->IWMProfile3_iface);
}
static ULONG WINAPI timecode_Release(IWMReaderTimecode *iface)
{
struct wm_reader *reader = impl_from_IWMReaderTimecode(iface);
return IWMProfile3_Release(&reader->IWMProfile3_iface);
}
static HRESULT WINAPI timecode_GetTimecodeRangeCount(IWMReaderTimecode *iface,
WORD stream_number, WORD *count)
{
FIXME("iface %p, stream_number %u, count %p, stub!\n", iface, stream_number, count);
return E_NOTIMPL;
}
static HRESULT WINAPI timecode_GetTimecodeRangeBounds(IWMReaderTimecode *iface,
WORD stream_number, WORD index, DWORD *start, DWORD *end)
{
FIXME("iface %p, stream_number %u, index %u, start %p, end %p, stub!\n",
iface, stream_number, index, start, end);
return E_NOTIMPL;
}
static const IWMReaderTimecodeVtbl timecode_vtbl =
{
timecode_QueryInterface,
timecode_AddRef,
timecode_Release,
timecode_GetTimecodeRangeCount,
timecode_GetTimecodeRangeBounds,
};
void wm_reader_init(struct wm_reader *reader, const struct wm_reader_ops *ops)
{
reader->IWMHeaderInfo3_iface.lpVtbl = &header_info_vtbl;
reader->IWMLanguageList_iface.lpVtbl = &language_list_vtbl;
reader->IWMPacketSize2_iface.lpVtbl = &packet_size_vtbl;
reader->IWMProfile3_iface.lpVtbl = &profile_vtbl;
reader->IWMReaderPlaylistBurn_iface.lpVtbl = &playlist_vtbl;
reader->IWMReaderTimecode_iface.lpVtbl = &timecode_vtbl;
reader->refcount = 1;
reader->ops = ops;
}