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