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/2167>
This commit is contained in:
Seungha Yang 2022-04-12 01:01:23 +09:00 committed by GStreamer Marge Bot
parent abd4846aaf
commit 3b5f1406f3
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

@ -90,7 +90,7 @@ if d3d11_winapi_desktop
message('Enable D3D11 Desktop Duplication API')
endif
# multimedia clock is desktop only API
if has_decoder and winmm_lib.found() and cc.has_header('timeapi.h')
if has_decoder and 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

@ -6,7 +6,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