win32: Enable high-resolution timer for MinGW build

timeapi.h is missing in our MinGW toolchain. Include mmsystem.h
header instead, which defines struct and APIs in case of our MinGW
toolchain. Note that in case of native Windows10 SDK (MSVC build),
mmsystem.h will include timeapi.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2153>
This commit is contained in:
Seungha Yang 2022-04-12 01:01:23 +09:00 committed by GStreamer Marge Bot
parent c1a3aaa3ec
commit 2548014dfc
6 changed files with 6 additions and 6 deletions

View file

@ -58,7 +58,7 @@
#include <string>
#ifdef HAVE_WINMM
#include <timeapi.h>
#include <mmsystem.h>
#endif
GST_DEBUG_CATEGORY_EXTERN (gst_d3d11_decoder_debug);

View file

@ -66,7 +66,7 @@ if d3d11_winapi_desktop
'gstd3d11screencapturesrc.cpp']
# multimedia clock is desktop only API
if winmm_lib.found() and cc.has_header('timeapi.h')
if winmm_lib.found() and cc.has_header('mmsystem.h')
extra_args += ['-DHAVE_WINMM']
extra_dep += [winmm_lib]
endif

View file

@ -42,7 +42,7 @@
#ifdef HAVE_WINMM
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <timeapi.h>
#include <mmsystem.h>
#endif
#include "gst-play-kb.h"

View file

@ -18,7 +18,7 @@ if host_system == 'windows'
if not building_for_uwp
winmm_lib = cc.find_library('winmm', required: false)
if winmm_lib.found() and cc.has_header('timeapi.h')
if winmm_lib.found() and cc.has_header('mmsystem.h')
extra_args += ['-DHAVE_WINMM']
extra_deps += [winmm_lib]
endif

View file

@ -47,7 +47,7 @@
#include <locale.h> /* for LC_ALL */
#include "tools.h"
#ifdef HAVE_WINMM
#include <timeapi.h>
#include <mmsystem.h>
#endif
extern volatile gboolean glib_on_error_halt;

View file

@ -10,7 +10,7 @@ extra_launch_arg = []
if gst_parse
if host_system == 'windows' and not building_for_uwp
winmm_lib = cc.find_library('winmm', required: false)
if winmm_lib.found() and cc.has_header('timeapi.h')
if winmm_lib.found() and cc.has_header('mmsystem.h')
extra_launch_dep += [winmm_lib]
extra_launch_arg += ['-DHAVE_WINMM']
endif