Commit bf7c05d8 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wmvcore: Move the async reader implementation to winegstreamer.

parent ba3fa425
...@@ -13,6 +13,7 @@ C_SRCS = \ ...@@ -13,6 +13,7 @@ C_SRCS = \
mfplat.c \ mfplat.c \
quartz_parser.c \ quartz_parser.c \
wg_parser.c \ wg_parser.c \
wm_asyncreader.c \
wm_syncreader.c wm_syncreader.c
IDL_SRCS = \ IDL_SRCS = \
......
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
@ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer() @ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer() @ stdcall -private DllUnregisterServer()
@ stdcall winegstreamer_create_wm_async_reader(ptr)
@ stdcall winegstreamer_create_wm_sync_reader(ptr) @ stdcall winegstreamer_create_wm_sync_reader(ptr)
...@@ -16,11 +16,8 @@ ...@@ -16,11 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "wmvcore.h" #include "gst_private.h"
#include "wmsdk.h" #include "wmsdk.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
...@@ -153,7 +150,7 @@ static ULONG WINAPI WMReader_Release(IWMReader *iface) ...@@ -153,7 +150,7 @@ static ULONG WINAPI WMReader_Release(IWMReader *iface)
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%d\n", This, ref);
if(!ref) if(!ref)
heap_free(This); free(This);
return ref; return ref;
} }
...@@ -2039,36 +2036,31 @@ static const IWMPacketSize2Vtbl WMPacketSize2Vtbl = ...@@ -2039,36 +2036,31 @@ static const IWMPacketSize2Vtbl WMPacketSize2Vtbl =
packetsize_SetMinPacketSize packetsize_SetMinPacketSize
}; };
HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader) HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader)
{ {
WMReader *reader; WMReader *object;
TRACE("(%p, %x, %p)\n", reserved, rights, ret_reader); TRACE("reader %p.\n", reader);
reader = heap_alloc(sizeof(*reader)); if (!(object = calloc(1, sizeof(*object))))
if(!reader)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
reader->IWMReader_iface.lpVtbl = &WMReaderVtbl; object->IReferenceClock_iface.lpVtbl = &ReferenceClockVtbl;
reader->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl; object->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl;
reader->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl; object->IWMLanguageList_iface.lpVtbl = &WMLanguageListVtbl;
reader->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl; object->IWMPacketSize2_iface.lpVtbl = &WMPacketSize2Vtbl;
reader->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl; object->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl;
reader->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl; object->IWMReader_iface.lpVtbl = &WMReaderVtbl;
reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl; object->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl;
reader->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl; object->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl;
reader->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl; object->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl;
reader->IWMLanguageList_iface.lpVtbl = &WMLanguageListVtbl; object->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
reader->IReferenceClock_iface.lpVtbl = &ReferenceClockVtbl; object->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl;
reader->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl; object->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
reader->IWMPacketSize2_iface.lpVtbl = &WMPacketSize2Vtbl; object->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
reader->ref = 1; object->ref = 1;
*ret_reader = &reader->IWMReader_iface; TRACE("Created async reader %p.\n", object);
*reader = (IWMReader *)&object->IWMReader_iface;
return S_OK; return S_OK;
} }
HRESULT WINAPI WMCreateReaderPriv(IWMReader **ret_reader)
{
return WMCreateReader(NULL, 0, ret_reader);
}
...@@ -6,7 +6,6 @@ DELAYIMPORTS = winegstreamer ...@@ -6,7 +6,6 @@ DELAYIMPORTS = winegstreamer
EXTRADLLFLAGS = -Wb,--prefer-native EXTRADLLFLAGS = -Wb,--prefer-native
C_SRCS = \ C_SRCS = \
reader.c \
wmvcore_main.c \ wmvcore_main.c \
writer.c writer.c
......
...@@ -25,8 +25,23 @@ ...@@ -25,8 +25,23 @@
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader);
HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader); HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader);
HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **reader)
{
TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader);
return winegstreamer_create_wm_async_reader(reader);
}
HRESULT WINAPI WMCreateReaderPriv(IWMReader **reader)
{
TRACE("reader %p.\n", reader);
return winegstreamer_create_wm_async_reader(reader);
}
HRESULT WINAPI WMCreateSyncReader(IUnknown *reserved, DWORD rights, IWMSyncReader **reader) HRESULT WINAPI WMCreateSyncReader(IUnknown *reserved, DWORD rights, IWMSyncReader **reader)
{ {
TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader); TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader);
......
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