Commit 5e70f1cf authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

wmvcore: Move async reader from winegstreamer/wm_asyncreader.c.

parent 30c33c2f
......@@ -22,7 +22,6 @@ C_SRCS = \
wg_parser.c \
wg_sample.c \
wg_transform.c \
wm_asyncreader.c \
wm_reader.c \
wma_decoder.c \
wmv_decoder.c
......
......@@ -147,6 +147,4 @@ HRESULT aac_decoder_create(REFIID riid, void **ret);
HRESULT h264_decoder_create(REFIID riid, void **ret);
HRESULT video_processor_create(REFIID riid, void **ret);
HRESULT WINAPI winegstreamer_create_wm_sync_reader(IUnknown *outer, void **out);
#endif /* __GST_PRIVATE_INCLUDED__ */
......@@ -2,5 +2,4 @@
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
@ stdcall winegstreamer_create_wm_async_reader(ptr)
@ stdcall winegstreamer_create_wm_sync_reader(ptr ptr)
......@@ -6,6 +6,7 @@ DELAYIMPORTS = winegstreamer
EXTRADLLFLAGS = -Wb,--prefer-native
C_SRCS = \
async_reader.c \
wmvcore_main.c \
writer.c
......
......@@ -16,8 +16,21 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "gst_private.h"
#include <stdarg.h>
#include <stddef.h>
#include <stdbool.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#define EXTERN_GUID DEFINE_GUID
#include "initguid.h"
#include "wmvcore_private.h"
#include "wmsdk.h"
#include "wine/debug.h"
#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
......@@ -1881,7 +1894,7 @@ static const IReferenceClockVtbl ReferenceClockVtbl =
refclock_Unadvise
};
HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader)
static HRESULT WINAPI async_reader_create(IWMReader **reader)
{
struct async_reader *object;
HRESULT hr;
......@@ -1927,3 +1940,17 @@ failed:
free(object);
return hr;
}
HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **reader)
{
TRACE("reserved %p, rights %#lx, reader %p.\n", reserved, rights, reader);
return async_reader_create(reader);
}
HRESULT WINAPI WMCreateReaderPriv(IWMReader **reader)
{
TRACE("reader %p.\n", reader);
return async_reader_create(reader);
}
......@@ -16,32 +16,21 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wmvcore.h"
#include <stdarg.h>
#include <stddef.h>
#include "initguid.h"
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "wmvcore_private.h"
#include "wmsdk.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader);
HRESULT WINAPI winegstreamer_create_wm_sync_reader(IUnknown *outer, void **out);
HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **reader)
{
TRACE("reserved %p, rights %#lx, 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)
{
TRACE("reserved %p, rights %#lx, reader %p.\n", reserved, rights, reader);
......
......@@ -17,10 +17,34 @@
*/
#include <stdarg.h>
#include <stddef.h>
#define COBJMACROS
#define EXTERN_GUID DEFINE_GUID
#include "windef.h"
#include "winbase.h"
#include "objidl.h"
#include "wine/debug.h"
HRESULT WINAPI winegstreamer_create_wm_sync_reader(IUnknown *outer, void **out);
static inline const char *debugstr_time(LONGLONG time)
{
ULONGLONG abstime = time >= 0 ? time : -time;
unsigned int i = 0, j = 0;
char buffer[23], rev[23];
while (abstime || i <= 8)
{
buffer[i++] = '0' + (abstime % 10);
abstime /= 10;
if (i == 7) buffer[i++] = '.';
}
if (time < 0) buffer[i++] = '-';
while (i--) rev[j++] = buffer[i];
while (rev[j-1] == '0' && rev[j-2] != '.') --j;
rev[j] = 0;
return wine_dbg_sprintf("%s", rev);
}
......@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wmvcore.h"
#include "wmvcore_private.h"
#include "wmsdkidl.h"
#include "wine/debug.h"
......
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