mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
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:
parent
abd4846aaf
commit
3b5f1406f3
6 changed files with 6 additions and 6 deletions
|
@ -58,7 +58,7 @@
|
|||
#include <string>
|
||||
|
||||
#ifdef HAVE_WINMM
|
||||
#include <timeapi.h>
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (gst_d3d11_decoder_debug);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue