Commit 37e9f0ea authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Move the IWMReaderTimecode implementation to the wm_reader object.

parent dd182a92
...@@ -120,6 +120,7 @@ struct wm_reader ...@@ -120,6 +120,7 @@ struct wm_reader
IWMPacketSize2 IWMPacketSize2_iface; IWMPacketSize2 IWMPacketSize2_iface;
IWMProfile3 IWMProfile3_iface; IWMProfile3 IWMProfile3_iface;
IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface; IWMReaderPlaylistBurn IWMReaderPlaylistBurn_iface;
IWMReaderTimecode IWMReaderTimecode_iface;
LONG refcount; LONG refcount;
const struct wm_reader_ops *ops; const struct wm_reader_ops *ops;
......
...@@ -30,7 +30,6 @@ struct async_reader ...@@ -30,7 +30,6 @@ struct async_reader
IWMReaderNetworkConfig2 IWMReaderNetworkConfig2_iface; IWMReaderNetworkConfig2 IWMReaderNetworkConfig2_iface;
IWMReaderStreamClock IWMReaderStreamClock_iface; IWMReaderStreamClock IWMReaderStreamClock_iface;
IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface; IWMReaderTypeNegotiation IWMReaderTypeNegotiation_iface;
IWMReaderTimecode IWMReaderTimecode_iface;
IReferenceClock IReferenceClock_iface; IReferenceClock IReferenceClock_iface;
}; };
...@@ -1143,53 +1142,6 @@ static const IWMReaderTypeNegotiationVtbl WMReaderTypeNegotiationVtbl = ...@@ -1143,53 +1142,6 @@ static const IWMReaderTypeNegotiationVtbl WMReaderTypeNegotiationVtbl =
negotiation_TryOutputProps negotiation_TryOutputProps
}; };
static struct async_reader *impl_from_IWMReaderTimecode(IWMReaderTimecode *iface)
{
return CONTAINING_RECORD(iface, struct async_reader, IWMReaderTimecode_iface);
}
static HRESULT WINAPI timecode_QueryInterface(IWMReaderTimecode *iface, REFIID riid, void **ppv)
{
struct async_reader *This = impl_from_IWMReaderTimecode(iface);
return IWMReader_QueryInterface(&This->IWMReader_iface, riid, ppv);
}
static ULONG WINAPI timecode_AddRef(IWMReaderTimecode *iface)
{
struct async_reader *This = impl_from_IWMReaderTimecode(iface);
return IWMReader_AddRef(&This->IWMReader_iface);
}
static ULONG WINAPI timecode_Release(IWMReaderTimecode *iface)
{
struct async_reader *This = impl_from_IWMReaderTimecode(iface);
return IWMReader_Release(&This->IWMReader_iface);
}
static HRESULT WINAPI timecode_GetTimecodeRangeCount(IWMReaderTimecode *iface, WORD num, WORD *count)
{
struct async_reader *This = impl_from_IWMReaderTimecode(iface);
FIXME("%p, %d, %p\n", This, num, count);
return E_NOTIMPL;
}
static HRESULT WINAPI timecode_GetTimecodeRangeBounds(IWMReaderTimecode *iface, WORD stream, WORD range,
DWORD *start_timecode, DWORD *end_timecode)
{
struct async_reader *This = impl_from_IWMReaderTimecode(iface);
FIXME("%p, %d, %d, %p, %p\n", This, stream, range, start_timecode, end_timecode);
return E_NOTIMPL;
}
static const IWMReaderTimecodeVtbl WMReaderTimecodeVtbl =
{
timecode_QueryInterface,
timecode_AddRef,
timecode_Release,
timecode_GetTimecodeRangeCount,
timecode_GetTimecodeRangeBounds
};
static struct async_reader *impl_from_IReferenceClock(IReferenceClock *iface) static struct async_reader *impl_from_IReferenceClock(IReferenceClock *iface)
{ {
return CONTAINING_RECORD(iface, struct async_reader, IReferenceClock_iface); return CONTAINING_RECORD(iface, struct async_reader, IReferenceClock_iface);
...@@ -1291,9 +1243,6 @@ static void *async_reader_query_interface(struct wm_reader *iface, REFIID iid) ...@@ -1291,9 +1243,6 @@ static void *async_reader_query_interface(struct wm_reader *iface, REFIID iid)
if (IsEqualIID(iid, &IID_IWMReaderStreamClock)) if (IsEqualIID(iid, &IID_IWMReaderStreamClock))
return &reader->IWMReaderStreamClock_iface; return &reader->IWMReaderStreamClock_iface;
if (IsEqualIID(iid, &IID_IWMReaderTimecode))
return &reader->IWMReaderTimecode_iface;
if (IsEqualIID(iid, &IID_IWMReaderTypeNegotiation)) if (IsEqualIID(iid, &IID_IWMReaderTypeNegotiation))
return &reader->IWMReaderTypeNegotiation_iface; return &reader->IWMReaderTypeNegotiation_iface;
...@@ -1332,7 +1281,6 @@ HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader) ...@@ -1332,7 +1281,6 @@ HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader)
object->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl; object->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl;
object->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl; object->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl;
object->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl; object->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl;
object->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
object->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl; object->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
TRACE("Created async reader %p.\n", object); TRACE("Created async reader %p.\n", object);
......
...@@ -57,6 +57,10 @@ static HRESULT WINAPI profile_QueryInterface(IWMProfile3 *iface, REFIID iid, voi ...@@ -57,6 +57,10 @@ static HRESULT WINAPI profile_QueryInterface(IWMProfile3 *iface, REFIID iid, voi
{ {
*out = &reader->IWMReaderPlaylistBurn_iface; *out = &reader->IWMReaderPlaylistBurn_iface;
} }
else if (IsEqualIID(iid, &IID_IWMReaderTimecode))
{
*out = &reader->IWMReaderTimecode_iface;
}
else if (!(*out = reader->ops->query_interface(reader, iid))) else if (!(*out = reader->ops->query_interface(reader, iid)))
{ {
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
...@@ -705,6 +709,56 @@ static const IWMReaderPlaylistBurnVtbl playlist_vtbl = ...@@ -705,6 +709,56 @@ static const IWMReaderPlaylistBurnVtbl playlist_vtbl =
playlist_EndPlaylistBurn, 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) void wm_reader_init(struct wm_reader *reader, const struct wm_reader_ops *ops)
{ {
reader->IWMHeaderInfo3_iface.lpVtbl = &header_info_vtbl; reader->IWMHeaderInfo3_iface.lpVtbl = &header_info_vtbl;
...@@ -712,6 +766,7 @@ void wm_reader_init(struct wm_reader *reader, const struct wm_reader_ops *ops) ...@@ -712,6 +766,7 @@ void wm_reader_init(struct wm_reader *reader, const struct wm_reader_ops *ops)
reader->IWMPacketSize2_iface.lpVtbl = &packet_size_vtbl; reader->IWMPacketSize2_iface.lpVtbl = &packet_size_vtbl;
reader->IWMProfile3_iface.lpVtbl = &profile_vtbl; reader->IWMProfile3_iface.lpVtbl = &profile_vtbl;
reader->IWMReaderPlaylistBurn_iface.lpVtbl = &playlist_vtbl; reader->IWMReaderPlaylistBurn_iface.lpVtbl = &playlist_vtbl;
reader->IWMReaderTimecode_iface.lpVtbl = &timecode_vtbl;
reader->refcount = 1; reader->refcount = 1;
reader->ops = ops; reader->ops = ops;
} }
...@@ -154,7 +154,7 @@ static void test_wmsyncreader_interfaces(void) ...@@ -154,7 +154,7 @@ static void test_wmsyncreader_interfaces(void)
check_interface(reader, &IID_IWMProfile2, TRUE); check_interface(reader, &IID_IWMProfile2, TRUE);
check_interface(reader, &IID_IWMProfile3, TRUE); check_interface(reader, &IID_IWMProfile3, TRUE);
check_interface(reader, &IID_IWMReaderPlaylistBurn, TRUE); check_interface(reader, &IID_IWMReaderPlaylistBurn, TRUE);
todo_wine check_interface(reader, &IID_IWMReaderTimecode, TRUE); check_interface(reader, &IID_IWMReaderTimecode, TRUE);
check_interface(reader, &IID_IWMSyncReader, TRUE); check_interface(reader, &IID_IWMSyncReader, TRUE);
check_interface(reader, &IID_IWMSyncReader2, TRUE); check_interface(reader, &IID_IWMSyncReader2, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment