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

wmvcore: Move the sync reader implementation to winegstreamer.

parent 009c1d66
MODULE = winegstreamer.dll MODULE = winegstreamer.dll
UNIXLIB = winegstreamer.so UNIXLIB = winegstreamer.so
IMPORTLIB = winegstreamer
IMPORTS = strmbase strmiids uuid ole32 mfuuid IMPORTS = strmbase strmiids uuid ole32 mfuuid
DELAYIMPORTS = mfplat DELAYIMPORTS = mfplat
EXTRAINCL = $(GSTREAMER_CFLAGS) EXTRAINCL = $(GSTREAMER_CFLAGS)
...@@ -11,7 +12,8 @@ C_SRCS = \ ...@@ -11,7 +12,8 @@ C_SRCS = \
media_source.c \ media_source.c \
mfplat.c \ mfplat.c \
quartz_parser.c \ quartz_parser.c \
wg_parser.c wg_parser.c \
wm_syncreader.c
IDL_SRCS = \ IDL_SRCS = \
winegstreamer_classes.idl winegstreamer_classes.idl
......
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
@ 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_sync_reader(ptr)
...@@ -16,11 +16,9 @@ ...@@ -16,11 +16,9 @@
* 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 "initguid.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);
...@@ -85,7 +83,7 @@ static ULONG WINAPI WMSyncReader_Release(IWMSyncReader2 *iface) ...@@ -85,7 +83,7 @@ static ULONG WINAPI WMSyncReader_Release(IWMSyncReader2 *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;
} }
...@@ -605,27 +603,20 @@ static const IWMProfile3Vtbl WMProfile3Vtbl = ...@@ -605,27 +603,20 @@ static const IWMProfile3Vtbl WMProfile3Vtbl =
WMProfile3_GetExpectedPacketCount WMProfile3_GetExpectedPacketCount
}; };
HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader **syncreader) HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader)
{ {
WMSyncReader *sync; WMSyncReader *object;
TRACE("(%p, %x, %p)\n", pcert, rights, syncreader);
sync = heap_alloc(sizeof(*sync)); TRACE("reader %p.\n", reader);
if (!sync) if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
sync->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl; object->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl;
sync->IWMSyncReader2_iface.lpVtbl = &WMSyncReader2Vtbl; object->IWMSyncReader2_iface.lpVtbl = &WMSyncReader2Vtbl;
sync->ref = 1; object->ref = 1;
*syncreader = (IWMSyncReader *)&sync->IWMSyncReader2_iface;
TRACE("Created sync reader %p.\n", object);
*reader = (IWMSyncReader *)&object->IWMSyncReader2_iface;
return S_OK; return S_OK;
} }
HRESULT WINAPI WMCreateSyncReaderPriv(IWMSyncReader **syncreader)
{
return WMCreateSyncReader(NULL, 0, syncreader);
}
MODULE = wmvcore.dll MODULE = wmvcore.dll
IMPORTLIB = wmvcore IMPORTLIB = wmvcore
IMPORTS = kernel32 IMPORTS = kernel32
DELAYIMPORTS = winegstreamer
EXTRADLLFLAGS = -Wb,--prefer-native EXTRADLLFLAGS = -Wb,--prefer-native
C_SRCS = \ C_SRCS = \
reader.c \ reader.c \
syncreader.c \
wmvcore_main.c \ wmvcore_main.c \
writer.c writer.c
......
...@@ -25,6 +25,22 @@ ...@@ -25,6 +25,22 @@
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader);
HRESULT WINAPI WMCreateSyncReader(IUnknown *reserved, DWORD rights, IWMSyncReader **reader)
{
TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader);
return winegstreamer_create_wm_sync_reader(reader);
}
HRESULT WINAPI WMCreateSyncReaderPriv(IWMSyncReader **reader)
{
TRACE("reader %p.\n", reader);
return winegstreamer_create_wm_sync_reader(reader);
}
HRESULT WINAPI WMCheckURLExtension(const WCHAR *url) HRESULT WINAPI WMCheckURLExtension(const WCHAR *url)
{ {
FIXME("(%s): stub\n", wine_dbgstr_w(url)); FIXME("(%s): stub\n", wine_dbgstr_w(url));
......
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